hexsha stringlengths 40 40 | size int64 5 1.05M | ext stringclasses 98
values | lang stringclasses 21
values | max_stars_repo_path stringlengths 3 945 | max_stars_repo_name stringlengths 4 118 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 945 | max_issues_repo_name stringlengths 4 118 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 134k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 945 | max_forks_repo_name stringlengths 4 135 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 1.05M | avg_line_length float64 1 1.03M | max_line_length int64 2 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
616feced33981a0a207747cabcb1fd929d82c13c | 6,492 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1873.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1873.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1873.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x1ac24, %rsi
lea addresses_WC_ht+0x1bf84, %rdi
nop
nop
nop
nop
nop
inc %rbp
mov $10, %rcx
rep movsb
nop
nop
and %r12, %r12
lea addresses_A_ht+0x1cd24, %r15
nop
nop
nop
nop
nop
cmp %r12, %r12
mov $0x6162636465666768, %rbp
movq %rbp, (%r15)
xor %r15, %r15
lea addresses_D_ht+0xeb24, %rsi
lea addresses_normal_ht+0x98a4, %rdi
nop
nop
nop
nop
sub $21840, %r13
mov $58, %rcx
rep movsq
add $3940, %rcx
lea addresses_UC_ht+0x4624, %rdi
sub $53478, %r12
mov (%rdi), %r13d
nop
nop
nop
add %r15, %r15
lea addresses_normal_ht+0xe7a4, %rsi
nop
nop
nop
nop
nop
inc %r12
vmovups (%rsi), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %rcx
nop
nop
and %r12, %r12
lea addresses_normal_ht+0xa24, %rdi
nop
nop
xor %rbp, %rbp
mov (%rdi), %r12
nop
nop
nop
nop
cmp %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %r8
push %rax
push %rcx
push %rsi
// Store
lea addresses_RW+0x4204, %r8
nop
nop
nop
cmp $64469, %r15
movw $0x5152, (%r8)
cmp $36555, %rsi
// Store
mov $0x724, %r8
sub $29407, %rax
mov $0x5152535455565758, %r15
movq %r15, %xmm6
movups %xmm6, (%r8)
nop
nop
nop
add %r14, %r14
// Store
lea addresses_US+0x10ca8, %rax
nop
nop
nop
nop
nop
xor $45434, %r12
mov $0x5152535455565758, %r15
movq %r15, %xmm5
movups %xmm5, (%rax)
nop
nop
nop
dec %rax
// Load
mov $0x23a85400000001a4, %r14
dec %rcx
movaps (%r14), %xmm3
vpextrq $0, %xmm3, %r8
nop
nop
nop
nop
nop
sub $12185, %r14
// Faulty Load
lea addresses_normal+0xae24, %r14
clflush (%r14)
nop
add %rsi, %rsi
mov (%r14), %rcx
lea oracles, %rax
and $0xff, %rcx
shlq $12, %rcx
mov (%rax,%rcx,1), %rcx
pop %rsi
pop %rcx
pop %rax
pop %r8
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_NC', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 5}}
{'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 36.268156 | 2,999 | 0.656808 |
5437fa6c147f64a1c4cb34133cf416a137e99ea8 | 447 | kt | Kotlin | app/src/main/java/com/github/mbarrben/moviedb/commons/network/DefaultHeadersInterceptor.kt | mbarrben/moviedb | bcebd39b3d77724b066f126dff0b4b029825b302 | [
"Apache-2.0"
] | 20 | 2015-02-15T22:42:02.000Z | 2021-05-25T08:06:43.000Z | app/src/main/java/com/github/mbarrben/moviedb/commons/network/DefaultHeadersInterceptor.kt | mbarrben/moviedb | bcebd39b3d77724b066f126dff0b4b029825b302 | [
"Apache-2.0"
] | 9 | 2017-01-06T23:39:50.000Z | 2017-06-10T07:52:17.000Z | app/src/main/java/com/github/mbarrben/moviedb/commons/network/DefaultHeadersInterceptor.kt | mbarrben/moviedb | bcebd39b3d77724b066f126dff0b4b029825b302 | [
"Apache-2.0"
] | 2 | 2015-03-03T08:03:53.000Z | 2016-05-09T07:20:08.000Z | package com.github.mbarrben.moviedb.commons.network
import okhttp3.Interceptor
import okhttp3.Response
class DefaultHeadersInterceptor : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
val request = chain.request().newBuilder()
.addHeader("Accept", "application/json")
.addHeader("Content-Type", "application/json")
.build()
return chain.proceed(request)
}
} | 31.928571 | 64 | 0.686801 |
16de19704d6eaf6f8d2132af08b7adf50a821bcf | 456 | ts | TypeScript | lib/js/modules/location.d.ts | MarkRunWu/react-native-baidumap-sdk | 1ff5324907ec37dfb614bdb879e9900016374465 | [
"MIT"
] | null | null | null | lib/js/modules/location.d.ts | MarkRunWu/react-native-baidumap-sdk | 1ff5324907ec37dfb614bdb879e9900016374465 | [
"MIT"
] | null | null | null | lib/js/modules/location.d.ts | MarkRunWu/react-native-baidumap-sdk | 1ff5324907ec37dfb614bdb879e9900016374465 | [
"MIT"
] | null | null | null | import { Location } from "../types";
declare type Options = {
gps: boolean;
distanceFilter: number;
};
declare type Listener = (listener: {
timestamp: number;
altitude: number;
speed: number;
} & Location) => void;
declare const _default: {
init(): Promise<void>;
start: () => any;
stop: () => any;
setOptions: (options: Options) => any;
addLocationListener: (listener: Listener) => any;
};
export default _default;
| 24 | 53 | 0.627193 |
f7399de6bdf681e85ea186b35fe1bec4f9ca1e5c | 1,835 | c | C | c_wrappers/src/cc_markovst_gs.c | okamumu/Markov.core | 3de31b2f7e02da6a2da71183154bd7c6fac0752c | [
"MIT"
] | null | null | null | c_wrappers/src/cc_markovst_gs.c | okamumu/Markov.core | 3de31b2f7e02da6a2da71183154bd7c6fac0752c | [
"MIT"
] | null | null | null | c_wrappers/src/cc_markovst_gs.c | okamumu/Markov.core | 3de31b2f7e02da6a2da71183154bd7c6fac0752c | [
"MIT"
] | null | null | null | //
void f90_markovst_gs_dense_(int* n, double* Q, int* ldq, double* xstart, int* incxs,
double* x, int* incx, int* maxiter, double* rtol, int* steps,
int* iter, double* rerror, int* info, void (*callback)(int*,double*));
void f90_markovst_gs_csr_(int* n, double* Q, int* rowptr, int* colind, int* nnz,
double* xstart, int* incxs, double* x, int* incx,
int* maxiter, double* rtol, int* steps,
int* iter, double* rerror, int* info, void (*callback)(int*,double*));
void f90_markovst_gs_csc_(int* n, double* Q, int* colptr, int* rowind, int* nnz,
double* xstart, int* incxs, double* x, int* incx,
int* maxiter, double* rtol, int* steps,
int* iter, double* rerror, int* info, void (*callback)(int*,double*));
///
void cc_markovst_gs_dense(int n, double* Q, int ldq, double* xstart, int incxs,
double* x, int incx, int maxiter, double rtol, int steps,
int* iter, double* rerror, int* info, void (*callback)(int*,double*)) {
f90_markovst_gs_dense_(&n, Q, &ldq, xstart, &incxs, x, &incx,
&maxiter, &rtol, &steps, iter, rerror, info, callback);
}
void cc_markovst_gs_csr(int n, double* Q, int* rowptr, int* colind, int nnz,
double* xstart, int incxs, double* x, int incx,
int maxiter, double rtol, int steps,
int* iter, double* rerror, int* info, void (*callback)(int*,double*)) {
f90_markovst_gs_csr_(&n, Q, rowptr, colind, &nnz, xstart, &incxs,
x, &incx, &maxiter, &rtol, &steps, iter, rerror, info, callback);
}
void cc_markovst_gs_csc(int n, double* Q, int* colptr, int* rowind, int nnz,
double* xstart, int incxs, double* x, int incx,
int maxiter, double rtol, int steps,
int* iter, double* rerror, int* info, void (*callback)(int*,double*)) {
f90_markovst_gs_csc_(&n, Q, colptr, rowind, &nnz, xstart, &incxs,
x, &incx, &maxiter, &rtol, &steps, iter, rerror, info, callback);
}
| 41.704545 | 84 | 0.671935 |
39434996836edd9dea7fe058b95f69a4f5c16369 | 5,932 | html | HTML | test_resources/mock_good_results_div_contents.html | baparham/py-anki-card-creator | de12788cd7697cc940b60eac0e178a20449a090e | [
"MIT"
] | null | null | null | test_resources/mock_good_results_div_contents.html | baparham/py-anki-card-creator | de12788cd7697cc940b60eac0e178a20449a090e | [
"MIT"
] | null | null | null | test_resources/mock_good_results_div_contents.html | baparham/py-anki-card-creator | de12788cd7697cc940b60eac0e178a20449a090e | [
"MIT"
] | null | null | null | <table class="images_table" style="table-layout:fixed" width="100%"><tbody><tr><td style="width:25%;word-wrap:break-word"><a href="/url?q=http://conceptodefinicion.de/hombre/&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IFjAA&usg=AOvVaw3ILwCa88kubbPQRCiK56VS"><img height="103" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ0AfsT7skEL4okSp_DqbPCW4f5ucUqwvMeVU2SNpqG6ZxhFirWIQBYUwg" width="137" alt="Resultado de imagen para hombre"></a><br><cite title="conceptodefinicion.de">conceptodefinicion.de</cite><br>Qué es <b>Hombre</b>? - Su Definición, Concepto y Significado<br>645 × 485 - 76 k - jpg</td><td style="width:25%;word-wrap:break-word"><a href="/url?q=https://www.elcorteingles.es/moda/A20672140-traje-de-hombre-dustin-liso-negro/&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IGDAB&usg=AOvVaw0hYom__9MLhYEDag12P7c5"><img height="137" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSIVin2tbOCsLBM3Rt9oisJVkcQ6HJi9erSDZi4GFCl5UQkOYbsMCxcrBM" width="110" alt="Resultado de imagen para hombre"></a><br><cite title="elcorteingles.es">elcorteingles.es</cite><br>Traje de <b>hombre</b> Dustin liso negro · Dustin · Moda · El Corte Inglés<br>516 × 640 - 34 k - jpg</td><td style="width:25%;word-wrap:break-word"><a href="/url?q=https://www.elcorteingles.es/moda/A9943697-traje-de-hombre-dustin/&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IGjAC&usg=AOvVaw2-e2f8hg5l9wYt1SbUb1uQ"><img height="137" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ_Bbtzl7l4sjBpSzs-sdFV5Gdwd0xi4nI3BDkJ4nU1Qny8LjvGb4t0yQYS" width="110" alt="Resultado de imagen para hombre"></a><br><cite title="elcorteingles.es">elcorteingles.es</cite><br>Traje de <b>hombre</b> Dustin · Dustin · Moda · El Corte Inglés<br>516 × 640 - 29 k - jpg</td><td style="width:25%;word-wrap:break-word"><a href="/url?q=https://www.fashionspark.com/hombre/9453-jeans-hombre-101-skinny.html&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IHDAD&usg=AOvVaw06ebllR4lOQU59Fgm_A_oY"><img height="127" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRGK7gRyhGjU7rBI2os8pErlyGBWkaWpq2sT90KNTE1qGupCHZDQeWV2d8" width="85" alt="Resultado de imagen para hombre"></a><br><cite title="fashionspark.com">fashionspark.com</cite><br>Jeans <b>Hombre</b> 101 Skinny - Fashion's Park Tienda Online<br>300 × 450 - 16 k - jpg</td></tr><tr><td style="width:25%;word-wrap:break-word"><a href="/url?q=http://latam.askmen.com/tips-de-estilo/7863/article/el-look-2017-para-el-hombre-de-ciudad&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IHjAE&usg=AOvVaw38wimqN0xxwc3OXKnN_X5k"><img height="83" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS8nNezCwLlFVeIO0RVSTJP6XkLHq4HGxmoY72YQOmDoj1MfQIU41ZT40I" width="150" alt="Resultado de imagen para hombre"></a><br><cite title="latam.askmen.com">latam.askmen.com</cite><br>look 2017 para el <b>hombre</b> de ciudad - Tips de estilo<br>1210 × 666 - 717 k - png</td><td style="width:25%;word-wrap:break-word"><a href="/url?q=http://www.salud180.com/salud-dia-dia/asi-es-el-hombre-ideal-segun-la-ciencia&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IIDAF&usg=AOvVaw0DGw9NY8YHPMn-MtedlXbW"><img height="82" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRrUA67pKmBr9PXd5997ez0cA4ttHCsrH-vSt9I60gHV4UWV7Cv6bUJ9dOD" width="135" alt="Resultado de imagen para hombre"></a><br><cite title="salud180.com">salud180.com</cite><br>Así es el <b>hombre</b> ideal según la ciencia | Salud180<br>600 × 364 - 21 k - jpg</td><td style="width:25%;word-wrap:break-word"><a href="/url?q=https://www.venca.es/p/013047/camiseta-de-hombre-basica-lisa-con-doble-pespunte-en-el-cuello&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IIjAG&usg=AOvVaw0Ft4nS3a1jxb3RXH225GHS"><img height="143" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRpWqVeOpu-Dx-Rnr57RgX0UBShdUQF1A66tHx0t6VdO1sMKtQ8BcjaShQ" width="107" alt="Resultado de imagen para hombre"></a><br><cite title="venca.es">venca.es</cite><br>Camiseta de <b>hombre</b> básica lisa con doble pespunte en el cuello ...<br>591 × 791 - 36 k - jpg</td><td style="width:25%;word-wrap:break-word"><a href="/url?q=https://fiftyfactory.com/es/es/hombre&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IJDAH&usg=AOvVaw3PH9Zg93w1fMkDWGqak5Vt"><img height="146" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRoP9ceEyssfStg642p5s-w_WCWrxkrsVpfc7Nrin79QBgtFHFhu0GQbpVT" width="97" alt="Resultado de imagen para hombre"></a><br><cite title="fiftyfactory.com">fiftyfactory.com</cite><br>Outlet Ropa de <b>Hombre</b> | Fifty Factory<br>600 × 900 - 100 k - jpg</td></tr><tr><td style="width:25%;word-wrap:break-word"><a href="/url?q=https://www.montagneoutdoors.com.ar/es/producto/1939-buzo-de-hombre-byron&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IJjAI&usg=AOvVaw3Koao3K1Dpnd0qjj1bkuBV"><img height="150" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSojQRUJURj01_qoK2BpiXMDjF9uqvE_-Ll-ebZEAva9fYiM4sr8c86YWtsDg" width="150" alt="Resultado de imagen para hombre"></a><br><cite title="montagneoutdoors.com.ar">montagneoutdoors.com.ar</cite><br>Buzo de <b>hombre</b> Byron<br>1200 × 1200 - 288 k - jpg</td><td style="width:25%;word-wrap:break-word"><a href="/url?q=https://www.montagneoutdoors.com.ar/es/producto/102-campera-de-hombre-ivory&sa=U&ved=0ahUKEwi32prIy4vbAhXJ5oMKHQtKDeMQwW4IKDAJ&usg=AOvVaw3B48FY_kME9GCIGGu7kun-"><img height="150" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQyk8_649n61ucOBix-iBVdb9Hk-bms6L2QmaADCWatgrJD0l2l0AtuDaTe" width="150" alt="Resultado de imagen para hombre"></a><br><cite title="montagneoutdoors.com.ar">montagneoutdoors.com.ar</cite><br>Montagne: camperas, campera, camperas <b>hombres</b>, camperas de ...<br>1200 × 1200 - 221 k - jpg</td></tr></tbody></table><ol></ol> | 5,932 | 5,932 | 0.777141 |
3b6af88c7c1d434cca5c173ac0943b05a2749a78 | 8,236 | c | C | example/repl.c | linneman/tinyscheme | a4591144ccb69d7a944adb708adcd37e765dc37d | [
"BSD-3-Clause"
] | 13 | 2016-10-02T01:46:56.000Z | 2021-01-01T18:30:36.000Z | example/repl.c | linneman/tinyscheme-integration-example | a4591144ccb69d7a944adb708adcd37e765dc37d | [
"BSD-3-Clause"
] | 1 | 2017-05-29T12:20:38.000Z | 2017-05-29T12:20:38.000Z | example/repl.c | linneman/tinyscheme | a4591144ccb69d7a944adb708adcd37e765dc37d | [
"BSD-3-Clause"
] | 2 | 2015-04-09T21:35:50.000Z | 2016-01-19T17:07:29.000Z | /*
* A threaded server
* by Martin Broadhurst (www.martinbroadhurst.com)
* Compile with -pthread
*/
#include <stdio.h>
#include <string.h> /* memset() */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <netdb.h>
#include <pthread.h>
#include <fcntl.h>
#include <getopt.h>
#include <scheme.h>
#include <dynload.h>
#define PORT "37146" /* Port to listen on */
#define BACKLOG 10 /* Passed to listen() */
#define MAX_BUF_SIZE 1000
#define INIT_FILE1 "./init.scm"
#define INIT_FILE2 "/etc/init.scm"
#define INIT_FILE3 "/usr/local/etc/init.scm"
static char scheme_init_file[80];
/* scheme_load_string does not like
carriage returns so strip them out */
void strip_cr( char *p, int max_len )
{
int i;
for( i=0; i < max_len && p[i]!='\0'; ++i )
;
if( i > 0 && p[i-1]=='\n' )
p[i-1] = '\0';
}
/**
* illustration of a C function binding
try:
(func1 "hello" 42 1.24)
*/
static pointer func1(scheme *sc, pointer args)
{
pointer arg;
pointer retval;
char *strarg;
double realnumber;
int intnumber;
int i = 1;
char outbuf[80];
while( args != sc->NIL )
{
outbuf[0] = '\0';
if( is_string( arg = pair_car(args)) )
{
strarg = string_value( arg );
snprintf( outbuf, sizeof(outbuf), "argument %d is string %s\n", i++, strarg );
}
else if( is_real( arg = pair_car(args) ) )
{
realnumber = rvalue( arg );
snprintf( outbuf, sizeof(outbuf), "argument %d is real number %lf\n", i++, realnumber );
}
else if( is_integer( arg = pair_car(args) ) )
{
intnumber = ivalue( arg );
snprintf( outbuf, sizeof(outbuf), "argument %d is integer number %d\n", i++, intnumber );
}
if( outbuf[0] != '\0' )
putstr( sc, outbuf );
args = pair_cdr( args );
}
if( i > 1 )
retval = sc -> T;
else
retval = sc -> F;
return(retval);
}
static int read_init_file( scheme* sc, const char* filename, FILE* fd_msg_socket )
{
FILE* fp;
fp = fopen( filename, "r" );
if( fp != NULL )
{
if( fd_msg_socket )
fprintf( fd_msg_socket, "initialized with init file %s\n", filename );
scheme_load_named_file( sc, fp, filename );
if( sc->retcode!=0 && fd_msg_socket ) {
fprintf( fd_msg_socket, "Errors encountered reading %s\n", filename );
}
fclose( fp );
return sc->retcode;
}
else
return -1;
}
static void init_ff( scheme* sc )
{
/* illustration how to define a "foreign" function
implemented in C */
scheme_define( sc, sc->global_env, mk_symbol( sc, "func1" ), mk_foreign_func( sc, func1 ) );
}
/* read-print-eval-loop invoked from socket handler thread */
static void *repl(void *pnewsock)
{
/* send(), recv(), close() */
int sockfd = *((int*)pnewsock);
FILE *fdin, *fdout;
scheme sc;
/* intialize the scheme object */
if( !scheme_init(&sc) ) {
fprintf(stderr,"Could not initialize scheme interpreter!\n");
return NULL;
}
fdin = fdopen( sockfd, "r" );
fdout = fdopen( sockfd, "w" );
/* set standard input and output ports */
sc.interactive_repl=1;
scheme_set_input_port_file(&sc, fdin );
scheme_set_output_port_file(&sc, fdout );
fprintf( fdout, "tinyscheme %s\n", tiny_scheme_version );
init_ff( &sc );
/* read sceme initialization file, try various locations */
if( read_init_file( &sc, scheme_init_file, fdout ) )
if( read_init_file( &sc, INIT_FILE2, fdout ) )
if( read_init_file( &sc, INIT_FILE3, fdout ) )
fprintf( fdout, "(quit) exits repl session.\n" );
scheme_load_named_file( &sc, fdin, 0);
printf("close connection!\n");
fclose( fdin );
fclose( fdout );
close( sockfd );
scheme_deinit(&sc);
return NULL;
}
void print_help( const char* app_name )
{
printf("%s: tinyscheme repl server\n\n", app_name );
printf("Invocation: %s [ options ]\n\n", app_name );
printf("Options:\n");
printf("--port\n-p\n");
printf("\tSpecifies the port the server is connected to. Default port %s is used\n", PORT);
printf("\tin case nothing is specified.\n\n");
printf("--console\n-c\n");
printf("\tConnect repl server to standard I/O.\n\n");
printf("--init\n-i\n");
printf("\tSpecifies the scheme init script loaded after start up.\n\n");
printf("--help\n-h\n");
printf("\tThis help screen.\n\n");
printf("(C) GNU-General Public Licence, written by Otto Linnemann, 2015\n\n");
}
int main( int argc, char* argv[] )
{
int sock;
char port[6];
pthread_t thread;
struct addrinfo hints, *res;
int reuseaddr = 1; /* true */
int optindex, optchar, error = 0;
int console_flag = 0;
const struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "port", required_argument, NULL, 'p' },
{ "init", required_argument, NULL, 'i' },
{ NULL }
};
/* default arguments */
strncpy( scheme_init_file, INIT_FILE1, sizeof(scheme_init_file) );
strncpy( port, PORT, sizeof(port) );
/* parse command line arguments, port, init file, etc */
#if HAVE_GETOPT_LONG
/*
* retrieve command line options, currently only -w
*/
while( ( optchar = getopt_long( argc, argv, "hcp:i:", long_options, &optindex ) ) != -1 )
{
switch ( optchar )
{
case 'h':
print_help( argv[0] );
return -1;
break;
case 'c':
console_flag = 1;
break;
case 'p':
strncpy(port, optarg, sizeof(port) );
break;
case 'i':
strncpy( scheme_init_file, optarg, sizeof(scheme_init_file) );
break;
default:
fprintf(stderr, "input argument error!\n");
return -1;
}
}
argv += (optind-1);
argc -= (optind-1);
#endif
printf( "starting tinyscheme %s server\n", tiny_scheme_version );
/* main loop */
if( console_flag )
{
/* standard I/O */
scheme sc;
/* intialize the scheme object */
if( !scheme_init(&sc) ) {
fprintf(stderr,"Could not initialize scheme interpreter!\n");
return -1;
}
/* set standard input and output ports */
sc.interactive_repl=1;
scheme_set_input_port_file(&sc, stdin );
scheme_set_output_port_file(&sc, stdout );
printf( "tinyscheme %s\n", tiny_scheme_version );
/* read sceme initialization file, try various locations */
if( read_init_file( &sc, scheme_init_file, stdout ) )
if( read_init_file( &sc, INIT_FILE2, stdout ) )
if( read_init_file( &sc, INIT_FILE3, stdout ) )
init_ff( &sc );
printf( "(quit) exits repl session.\n" );
scheme_load_named_file( &sc, stdin, 0 );
printf("exit repl!\n");
scheme_deinit(&sc);
}
else
{
/* socket I/O */
/* Get the address info */
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
if (getaddrinfo(NULL, port, &hints, &res) != 0) {
perror("getaddrinfo");
return 1;
}
/* Create the socket */
sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if (sock == -1) {
perror("socket");
return 1;
}
/* Enable the socket to reuse the address */
if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(int)) == -1) {
perror("setsockopt");
return 1;
}
/* Bind to the address */
if (bind(sock, res->ai_addr, res->ai_addrlen) == -1) {
perror("bind");
return 0;
}
freeaddrinfo(res);
/* Listen */
if (listen(sock, BACKLOG) == -1) {
perror("listen");
return 0;
}
printf( "waiting for connections on port %s ...\n", port );
while (1)
{
size_t size = sizeof(struct sockaddr_in);
struct sockaddr_in their_addr;
int newsock = accept( sock, (struct sockaddr*)&their_addr, ((socklen_t *)&size) );
if (newsock == -1)
{
perror("accept");
}
else
{
printf( "Got a connection from %s on port %d\n",
inet_ntoa(their_addr.sin_addr), htons(their_addr.sin_port));
if ( pthread_create(&thread, NULL, repl, &newsock) != 0 ) {
fprintf(stderr, "Failed to create thread\n");
}
}
} /* while(1) */
}
close(sock);
return 0;
}
| 24.294985 | 95 | 0.598349 |
2a0a1e98ae31e4d51192db6e7d53ec5bc0a35b48 | 5,400 | java | Java | gloomhavenhelper/src/main/java/com/subjecttochange/ghhelper/persistence/service/SessionService.java | ajsmith57/gloomhaven-helper | a8ceb9cc7831060b478e3c3a189ce3717f834331 | [
"MIT"
] | 1 | 2020-09-18T16:17:41.000Z | 2020-09-18T16:17:41.000Z | gloomhavenhelper/src/main/java/com/subjecttochange/ghhelper/persistence/service/SessionService.java | ajsmith57/gloomhaven-helper | a8ceb9cc7831060b478e3c3a189ce3717f834331 | [
"MIT"
] | null | null | null | gloomhavenhelper/src/main/java/com/subjecttochange/ghhelper/persistence/service/SessionService.java | ajsmith57/gloomhaven-helper | a8ceb9cc7831060b478e3c3a189ce3717f834331 | [
"MIT"
] | null | null | null | package com.subjecttochange.ghhelper.persistence.service;
import com.subjecttochange.ghhelper.exception.Errors;
import com.subjecttochange.ghhelper.exception.ResourceNotFoundException;
import com.subjecttochange.ghhelper.persistence.model.orm.Element;
import com.subjecttochange.ghhelper.persistence.model.orm.Room;
import com.subjecttochange.ghhelper.persistence.model.orm.Stat;
import com.subjecttochange.ghhelper.persistence.model.orm.monster.Action;
import com.subjecttochange.ghhelper.persistence.model.orm.monster.Monster;
import com.subjecttochange.ghhelper.persistence.model.orm.monster.MonsterInstance;
import com.subjecttochange.ghhelper.persistence.model.orm.monster.Status;
import com.subjecttochange.ghhelper.persistence.model.responsebodies.*;
import com.subjecttochange.ghhelper.persistence.repository.MonsterRepository;
import com.subjecttochange.ghhelper.persistence.repository.RoomRepository;
import com.subjecttochange.ghhelper.persistence.repository.StatRepository;
import com.subjecttochange.ghhelper.persistence.repository.StatusRepository;
import org.hibernate.Hibernate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
@Service
public class SessionService {
private final RoomRepository roomRepository;
private final MonsterRepository monsterRepository;
private final StatusRepository statusRepository;
private final StatRepository statRepository;
@Autowired
public SessionService(RoomRepository roomRepository, MonsterRepository monsterRepository,
StatusRepository statusRepository, StatRepository statRepository) {
this.roomRepository = roomRepository;
this.monsterRepository = monsterRepository;
this.statusRepository = statusRepository;
this.statRepository = statRepository;
}
public Page<SessionResponseBody> getRooms(String hash, Pageable pageable) {
Page<Room> rooms;
if (hash == null) {
rooms = roomRepository.findAll(pageable);
} else {
Room room = roomRepository.findByHash(hash).orElseThrow(() ->
new ResourceNotFoundException(Errors.NO_HASH_ROOM + hash));
rooms = new PageImpl<>(Collections.singletonList(room));
}
List<Status> statuses = statusRepository.findAll();
List<Stat> stats = statRepository.findAll();
ArrayList<SessionResponseBody> sessionResponse = new ArrayList<>();
for (Room room : rooms) {
List<ElementResponseBody> elementResponses = new ArrayList<>();
for (Element element : room.getElements()) {
elementResponses.add(ElementResponseBody.create(element));
}
RoomResponseBody roomResponse = RoomResponseBody.create(room, elementResponses);
sessionResponse.add(SessionResponseBody.create(
roomResponse,
new ArrayList<>(buildMonsterResponses(room)),
new ArrayList<>(buildStatusResponses(statuses)),
new ArrayList<>(buildStatResponses(stats))
));
}
return new PageImpl<>(sessionResponse);
}
private Collection<MonsterResponseBody> buildMonsterResponses(Room room) {
Map<Long, MonsterResponseBody> namedMonsterBodies = new TreeMap<>();
List<Monster> monsters = monsterRepository.findAllByLevel(room.getScenarioLevel());
for (Monster monster : monsters) {
Hibernate.initialize(monster.getAttributes());
Hibernate.initialize(monster.getEliteAttributes());
MonsterResponseBody monsterResponseBody = MonsterResponseBody.create(monster);
Action currentAction = null;
if (room.getDecks().containsKey(monster)) {
currentAction = room.getDecks().get(monster).getCurrentAction();
}
if (currentAction != null) {
monsterResponseBody.setMonsterAction(MonsterActionResponseBody.create(currentAction));
}
namedMonsterBodies.put(monster.getId(), monsterResponseBody);
}
for (MonsterInstance monsterInstance : room.getMonsterInstances()) {
Hibernate.initialize(monsterInstance.getActiveStatuses());
Monster monster = monsterInstance.getMonster();
namedMonsterBodies.get(monster.getId())
.getMonsterInstances()
.add(MonsterInstanceResponseBody.create(monsterInstance));
}
return namedMonsterBodies.values();
}
private Collection<StatusResponseBody> buildStatusResponses(List<Status> statuses) {
List<StatusResponseBody> result = new ArrayList<>();
for (Status status : statuses) {
result.add(StatusResponseBody.create(status));
}
return result;
}
private Collection<StatResponseBody> buildStatResponses(List<Stat> stats) {
List<StatResponseBody> result = new ArrayList<>();
for (Stat stat : stats) {
result.add(StatResponseBody.create(stat));
}
return result;
}
}
| 40.298507 | 102 | 0.70537 |
33540431b9a26faac654f1b19ce26f5f4928bf80 | 775 | sql | SQL | dbms/tests/queries/0_stateless/00168_buffer_defaults.sql | ricpersi/ClickHouse | cc3de4115fb52ba181f19a262d750a7e8888f48b | [
"Apache-2.0"
] | 1 | 2019-12-03T18:28:40.000Z | 2019-12-03T18:28:40.000Z | dbms/tests/queries/0_stateless/00168_buffer_defaults.sql | ricpersi/ClickHouse | cc3de4115fb52ba181f19a262d750a7e8888f48b | [
"Apache-2.0"
] | 1 | 2019-04-22T01:27:06.000Z | 2019-04-22T01:27:06.000Z | dbms/tests/queries/0_stateless/00168_buffer_defaults.sql | ricpersi/ClickHouse | cc3de4115fb52ba181f19a262d750a7e8888f48b | [
"Apache-2.0"
] | 1 | 2019-12-31T17:52:32.000Z | 2019-12-31T17:52:32.000Z | DROP TABLE IF EXISTS test.mt_00168;
DROP TABLE IF EXISTS test.mt_00168_buffer;
CREATE TABLE test.mt_00168 (EventDate Date, UTCEventTime DateTime, MoscowEventDate Date DEFAULT toDate(UTCEventTime)) ENGINE = MergeTree(EventDate, UTCEventTime, 8192);
CREATE TABLE test.mt_00168_buffer AS test.mt_00168 ENGINE = Buffer(test, mt_00168, 16, 10, 100, 10000, 1000000, 10000000, 100000000);
DESC TABLE test.mt_00168;
DESC TABLE test.mt_00168_buffer;
INSERT INTO test.mt_00168 (EventDate, UTCEventTime) VALUES ('2015-06-09', '2015-06-09 01:02:03');
SELECT * FROM test.mt_00168_buffer;
INSERT INTO test.mt_00168_buffer (EventDate, UTCEventTime) VALUES ('2015-06-09', '2015-06-09 01:02:03');
SELECT * FROM test.mt_00168_buffer;
DROP TABLE test.mt_00168_buffer;
DROP TABLE test.mt_00168;
| 59.615385 | 168 | 0.792258 |
fb6d58b1214247bf4b8a1ba348d7cbba82c1c404 | 2,810 | h | C | protocol.h | marcielazevedo/ll | aa23a126586a433194c5a24122d80667fbcca465 | [
"MIT"
] | null | null | null | protocol.h | marcielazevedo/ll | aa23a126586a433194c5a24122d80667fbcca465 | [
"MIT"
] | null | null | null | protocol.h | marcielazevedo/ll | aa23a126586a433194c5a24122d80667fbcca465 | [
"MIT"
] | null | null | null | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2015 Mark Samman <mark.samman@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef FS_PROTOCOL_H_D71405071ACF4137A4B1203899DE80E1
#define FS_PROTOCOL_H_D71405071ACF4137A4B1203899DE80E1
#include "connection.h"
class Protocol
{
public:
explicit Protocol(Connection_ptr connection) : m_connection(connection), m_key(), m_refCount(), m_encryptionEnabled(false), m_checksumEnabled(true), m_rawMessages(false) {}
virtual ~Protocol() = default;
// non-copyable
Protocol(const Protocol&) = delete;
Protocol& operator=(const Protocol&) = delete;
virtual void parsePacket(NetworkMessage&) {}
virtual void onSendMessage(OutputMessage_ptr msg);
void onRecvMessage(NetworkMessage& msg);
virtual void onRecvFirstMessage(NetworkMessage& msg) = 0;
virtual void onConnect() {}
Connection_ptr getConnection() const {
return m_connection;
}
void setConnection(Connection_ptr connection) {
m_connection = connection;
}
uint32_t getIP() const;
void addRef() {
++m_refCount;
}
void unRef() {
--m_refCount;
}
//Use this function for autosend messages only
OutputMessage_ptr getOutputBuffer(int32_t size);
protected:
void enableXTEAEncryption() {
m_encryptionEnabled = true;
}
void disableXTEAEncryption() {
m_encryptionEnabled = false;
}
void setXTEAKey(const uint32_t* key) {
memcpy(m_key, key, sizeof(uint32_t) * 4);
}
void enableChecksum() {
m_checksumEnabled = true;
}
void disableChecksum() {
m_checksumEnabled = false;
}
void XTEA_encrypt(OutputMessage& msg) const;
bool XTEA_decrypt(NetworkMessage& msg) const;
static bool RSA_decrypt(NetworkMessage& msg);
void setRawMessages(bool value) {
m_rawMessages = value;
}
virtual void releaseProtocol();
virtual void deleteProtocolTask();
friend class Connection;
OutputMessage_ptr m_outputBuffer;
private:
Connection_ptr m_connection;
uint32_t m_key[4];
uint32_t m_refCount;
bool m_encryptionEnabled;
bool m_checksumEnabled;
bool m_rawMessages;
};
#endif
| 27.54902 | 174 | 0.743416 |
58b0445fd52774b03be4332f5a9be9a34877b3bb | 1,024 | kt | Kotlin | src/main/kotlin/br/com/jiratorio/repository/NativeIssueRepository.kt | LeonardoFerreiraa/jirareport | 845540e238f47fbd05c1f7f6839152545521c63e | [
"MIT"
] | 20 | 2018-11-08T02:00:33.000Z | 2021-09-06T12:56:30.000Z | src/main/kotlin/br/com/jiratorio/repository/NativeIssueRepository.kt | jirareport/jirareport | 845540e238f47fbd05c1f7f6839152545521c63e | [
"MIT"
] | 31 | 2019-07-26T19:37:05.000Z | 2021-11-17T08:38:38.000Z | src/main/kotlin/br/com/jiratorio/repository/NativeIssueRepository.kt | LeonardoFerreiraa/jirareport | 845540e238f47fbd05c1f7f6839152545521c63e | [
"MIT"
] | 8 | 2019-05-09T21:23:00.000Z | 2021-07-29T21:26:18.000Z | package br.com.jiratorio.repository
import br.com.jiratorio.domain.DynamicFieldsValues
import br.com.jiratorio.domain.entity.BoardEntity
import br.com.jiratorio.domain.issue.Issue
import br.com.jiratorio.domain.request.SearchIssueRequest
import java.time.LocalDateTime
interface NativeIssueRepository {
fun findByExample(board: BoardEntity, dynamicFilters: Map<String, Array<String>>, searchIssueRequest: SearchIssueRequest): List<Issue>
fun findAllDynamicFieldValues(boardId: Long): List<DynamicFieldsValues>
fun findAllEstimatesByBoardId(boardId: Long): Set<String>
fun findAllSystemsByBoardId(boardId: Long): Set<String>
fun findAllEpicsByBoardId(boardId: Long): Set<String>
fun findAllIssueTypesByBoardId(boardId: Long): Set<String>
fun findAllIssueProjectsByBoardId(boardId: Long): Set<String>
fun findAllIssuePrioritiesByBoardId(boardId: Long): Set<String>
fun findAllKeysByBoardIdAndDates(boardId: Long, startDate: LocalDateTime, endDate: LocalDateTime): Set<String>
}
| 34.133333 | 138 | 0.802734 |
3e37f6e62359e73ada85bace1e3319a237fc6715 | 2,270 | sql | SQL | scripts/createTables.sql | HACApp/backend | b17b5d70282c19eef2d79ecc89613b6026a12a80 | [
"Apache-2.0"
] | null | null | null | scripts/createTables.sql | HACApp/backend | b17b5d70282c19eef2d79ecc89613b6026a12a80 | [
"Apache-2.0"
] | null | null | null | scripts/createTables.sql | HACApp/backend | b17b5d70282c19eef2d79ecc89613b6026a12a80 | [
"Apache-2.0"
] | 2 | 2020-04-06T08:42:19.000Z | 2020-04-10T08:36:19.000Z | CREATE TABLE `challenge_status` (
`id` bigint NOT NULL AUTO_INCREMENT,
`challenge_id` bigint NOT NULL,
`state` int DEFAULT NULL,
`time_stamp` datetime DEFAULT NULL,
`user_id` bigint NOT NULL,
PRIMARY KEY (`id`),
KEY `userIndex` (`user_id`),
KEY `challengeIndex` (`challenge_id`)
);
CREATE TABLE `challenges` (
`id` bigint NOT NULL AUTO_INCREMENT,
`add_to_treasure_chest` bit(1) NOT NULL,
`category` varchar(16) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`created_by_import` bit(1) NOT NULL,
`created_by_user_id` bigint NOT NULL,
`deleted_at` datetime DEFAULT NULL,
`image_url` varchar(255) DEFAULT NULL,
`description` varchar(2048) DEFAULT NULL,
`duration_seconds` bigint DEFAULT NULL,
`kind` varchar(16) DEFAULT NULL,
`material` varchar(255) DEFAULT NULL,
`points_loose` int NOT NULL,
`points_win` int NOT NULL,
`repeatable_after_days` int DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
`dtype` varchar(31) NOT NULL,
PRIMARY KEY (`id`),
KEY `challengeCategoryIndex` (`category`),
KEY `challengeCreatedByUserIdIndex` (`created_by_user_id`)
);
CREATE TABLE `ignored_challenges` (
`id` bigint NOT NULL AUTO_INCREMENT,
`challenge_id` bigint NOT NULL,
`time_stamp` datetime DEFAULT NULL,
`user_id` bigint NOT NULL,
PRIMARY KEY (`id`),
KEY `userIndex` (`user_id`),
KEY `challengeIndex` (`challenge_id`)
);
CREATE TABLE `marked_challenges` (
`id` bigint NOT NULL AUTO_INCREMENT,
`challenge_id` bigint NOT NULL,
`time_stamp` datetime DEFAULT NULL,
`user_id` bigint NOT NULL,
PRIMARY KEY (`id`),
KEY `userIndex` (`user_id`),
KEY `challengeIndex` (`challenge_id`)
);
CREATE TABLE `timer` (
`id` bigint NOT NULL,
`linked_id` bigint NOT NULL,
`type` varchar(16) DEFAULT NULL,
`valid_until` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `timerTypeIndex` (`type`)
);
CREATE TABLE `users` (
`id` bigint NOT NULL AUTO_INCREMENT,
`admin` bit(1) NOT NULL,
`created_at` datetime DEFAULT NULL,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
`last_request_at` datetime DEFAULT NULL,
`user_id` binary(16) DEFAULT NULL,
`user_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `userUserIdIndex` (`user_id`)
); | 30.266667 | 60 | 0.712335 |
16689b56096dda35e7798fc6034971a01ab65dc9 | 490 | h | C | ZP/GeneralHospital/D_PersonCenter/D_LoginViewController.h | abbothzhang/MyProject | de1b68ed59aaa8aa8d783c49868bbe83fe7f3d76 | [
"MIT"
] | 2 | 2015-12-24T02:34:50.000Z | 2018-07-08T22:12:57.000Z | ZP/GeneralHospital/D_PersonCenter/D_LoginViewController.h | abbothzhang/MyProject | de1b68ed59aaa8aa8d783c49868bbe83fe7f3d76 | [
"MIT"
] | null | null | null | ZP/GeneralHospital/D_PersonCenter/D_LoginViewController.h | abbothzhang/MyProject | de1b68ed59aaa8aa8d783c49868bbe83fe7f3d76 | [
"MIT"
] | null | null | null | //
// D_LoginViewController.h
// GeneralHospital
//
// Created by 夏科杰 on 14/11/3.
// Copyright (c) 2014年 夏科杰. All rights reserved.
//
#import "UcmedViewStyle.h"
#import "UXTextField.h"
typedef void(^LoginBlock)(void);
@interface D_LoginViewController : UcmedViewStyle<UITextFieldDelegate,UIAlertViewDelegate>
{
UXTextField *UserName;
UXTextField *Password;
LoginBlock LoginB;
}
-(void)setLoginBlock:(LoginBlock)loginBlock;
@property (nonatomic, assign) BOOL isBack;
@end
| 22.272727 | 90 | 0.742857 |
cb0b914332b9dbaf9159da7955f6525eb7401386 | 349 | h | C | iOS/Pocker/Pocker/SettingViewController.h | zhouxm/poker | 8d06708f6a5a18c270ec8bbc2f7579ed1ec6580b | [
"MIT"
] | 53 | 2016-07-07T15:32:41.000Z | 2022-02-07T02:24:08.000Z | iOS/Pocker/Pocker/SettingViewController.h | Garvanzz/poker | 241bd35e1afdef1f74d4f4e6b9b3226fe9138c92 | [
"MIT"
] | 5 | 2017-07-16T23:32:33.000Z | 2019-06-18T12:30:49.000Z | iOS/Pocker/Pocker/SettingViewController.h | Garvanzz/poker | 241bd35e1afdef1f74d4f4e6b9b3226fe9138c92 | [
"MIT"
] | 40 | 2016-06-20T00:58:21.000Z | 2022-02-08T17:56:25.000Z | //
// SettingViewController.h
// Pocker
//
// Created by zhengying on 3/9/15.
// Copyright (c) 2015 zhengying. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SettingViewController : UIViewController
@property(nonatomic, weak) IBOutlet UISwitch* linodeSwitch;
@property(nonatomic, weak) IBOutlet UITextField* txtFieldUserName;
@end
| 23.266667 | 66 | 0.753582 |
df2093e46bd3adbd6c78a172c4eedb0277764b71 | 1,361 | rb | Ruby | spec/chronopost/integration/labels/create_spec.rb | BloomAndWild/chronopost | eab4c1e985c56d40af76d909a064b68824bb5bd2 | [
"MIT"
] | null | null | null | spec/chronopost/integration/labels/create_spec.rb | BloomAndWild/chronopost | eab4c1e985c56d40af76d909a064b68824bb5bd2 | [
"MIT"
] | null | null | null | spec/chronopost/integration/labels/create_spec.rb | BloomAndWild/chronopost | eab4c1e985c56d40af76d909a064b68824bb5bd2 | [
"MIT"
] | null | null | null | # frozen_string_literal: true
RSpec.xdescribe Chronopost::Labels::Create, '.for' do
let(:shipper) do
{
shipperName: 'Test Shipper',
shipperCivility: 'M',
shipperAdress1: 'Folie-Méricourt, 15B',
shipperZipCode: '75011',
shipperCity: 'PARIS',
shipperCountry: 'FR',
}
end
let(:customer) do
{
customerName: 'Test Customer',
customerCivility: 'M',
customerAdress1: 'Folie-Méricourt 15B',
customerZipCode: '75011',
customerCity: 'PARIS',
customerCountry: 'FR',
}
end
let(:recipient) do
{
recipientName: 'Test Recipient',
recipientCivility: 'M',
recipientAdress1: 'Rue Pasteur, 211',
recipientZipCode: '33200',
recipientCity: 'BORDEAUX',
recipientCountry: 'FR',
}
end
let(:parcel) do
{
shipDate: '2018-04-03T12:29:36+02:00',
shipHour: '12',
weight: '2.0',
height: '0',
length: '0',
width: '0',
}
end
it_behaves_like :query do
let(:params) do
{
shipperValue: shipper,
customerValue: customer,
recipientValue: recipient,
refValue: { recipientRef: '0554S' },
skybillValue: parcel,
}
end
let(:response_keys) do
%i(
reservation_number
result_multi_parcel_value
)
end
end
end
| 20.313433 | 53 | 0.577517 |
cbcd51321afe044ea565514d6a3eb39a7a4e09f6 | 3,434 | go | Go | int8.go | gellel/slice | c6544acdc10d190633c128393b142ddd9654af83 | [
"MIT"
] | 2 | 2019-06-19T19:56:56.000Z | 2019-06-19T20:10:21.000Z | int8.go | gellel/slice | c6544acdc10d190633c128393b142ddd9654af83 | [
"MIT"
] | null | null | null | int8.go | gellel/slice | c6544acdc10d190633c128393b142ddd9654af83 | [
"MIT"
] | null | null | null | package slice
import "sort"
// Inter8 is the interface that handles a int8 collection.
type Inter8 interface {
Append(...int8) Inter8
Bounds(int) bool
Concatenate(Inter8) Inter8
Each(func(int, int8)) Inter8
EachBreak(func(int, int8) bool) Inter8
EachReverse(func(int, int8)) Inter8
EachReverseBreak(func(int, int8) bool) Inter8
Fetch(int) int8
Get(int) (int8, bool)
Len() int
Less(int, int) bool
Map(func(int, int8) int8) Inter8
Poll() int8
Pop() int8
Precatenate(Inter8) Inter8
Prepend(...int8) Inter8
Push(...int8) int
Replace(int, int8) bool
Set() Inter8
Slice(int, int) Inter8
Sort() Inter8
Swap(int, int)
Unshift(...int8) int
Values() []int8
}
// NewInter8 returns a new Inter8 interface.
func NewInter8(i ...int8) Inter8 {
return (&inter8{&Slice{}}).Append(i...)
}
type inter8 struct{ s *Slice }
func (i8 *inter8) Append(i ...int8) Inter8 {
i8.s.Append(int8ToInterface(i...)...)
return i8
}
func (i8 *inter8) Bounds(i int) bool {
return i8.s.Bounds(i)
}
func (i8 *inter8) Concatenate(f Inter8) Inter8 {
i8.s.Concatenate(f.(*inter8).s)
return i8
}
func (i8 *inter8) Each(fn func(int, int8)) Inter8 {
i8.s.Each(func(i int, v interface{}) {
fn(i, (v.(int8)))
})
return i8
}
func (i8 *inter8) EachBreak(fn func(int, int8) bool) Inter8 {
i8.s.EachBreak(func(i int, v interface{}) bool {
return fn(i, (v.(int8)))
})
return i8
}
func (i8 *inter8) EachReverse(fn func(int, int8)) Inter8 {
i8.s.EachReverse(func(i int, v interface{}) {
fn(i, (v.(int8)))
})
return i8
}
func (i8 *inter8) EachReverseBreak(fn func(int, int8) bool) Inter8 {
i8.s.EachReverseBreak(func(i int, v interface{}) bool {
return fn(i, (v.(int8)))
})
return i8
}
func (i8 *inter8) Fetch(i int) int8 {
var s, _ = i8.Get(i)
return s
}
func (i8 *inter8) Get(i int) (int8, bool) {
var (
ok bool
s int8
)
ok = i8.Bounds(i)
if ok {
s = (i8.s.Fetch(i)).(int8)
}
return s, ok
}
func (i8 *inter8) Len() int {
return (i8.s.Len())
}
func (i8 *inter8) Less(i int, j int) bool {
return i8.Fetch(i) < i8.Fetch(j)
}
func (i8 *inter8) Map(fn func(int, int8) int8) Inter8 {
i8.s.Map(func(i int, v interface{}) interface{} {
return fn(i, (v.(int8)))
})
return i8
}
func (i8 *inter8) Poll() int8 {
var (
n int8
v = i8.s.Poll()
)
if v != nil {
n = (v.(int8))
}
return n
}
func (i8 *inter8) Pop() int8 {
var (
n int8
v = i8.s.Pop()
)
if v != nil {
n = (v.(int8))
}
return n
}
func (i8 *inter8) Precatenate(f Inter8) Inter8 {
i8.s.Precatenate(f.(*inter8).s)
return i8
}
func (i8 *inter8) Prepend(i ...int8) Inter8 {
i8.s.Prepend(int8ToInterface(i...)...)
return i8
}
func (i8 *inter8) Push(i ...int8) int {
return i8.s.Push(int8ToInterface(i...))
}
func (i8 *inter8) Replace(i int, n int8) bool {
return (i8.s.Replace(i, n))
}
func (i8 *inter8) Set() Inter8 {
i8.s.Set()
return i8
}
func (i8 *inter8) Slice(i int, j int) Inter8 {
i8.s.Slice(i, j)
return i8
}
func (i8 *inter8) Sort() Inter8 {
sort.Sort(i8)
return i8
}
func (i8 *inter8) Swap(i int, j int) {
i8.s.Swap(i, j)
}
func (i8 *inter8) Unshift(i ...int8) int {
return (i8.s.Unshift(int8ToInterface(i...)))
}
func (i8 *inter8) Values() []int8 {
var v = make([]int8, i8.Len())
i8.Each(func(i int, n int8) {
v[i] = n
})
return v
}
func int8ToInterface(n ...int8) []interface{} {
var (
i int
v int8
x = make([]interface{}, (len(n)))
)
for i, v = range n {
x[i] = v
}
return x
}
| 17.520408 | 68 | 0.622598 |
70c50b5bb31f3406c3229a1707a44e385cc74774 | 945 | h | C | src/generics/gbinary_heap/gpriority_queue.h | Manu-sh/data_structures | 82547710d0e77a5e3e5d6b49ee04bea9ecb31f48 | [
"MIT"
] | null | null | null | src/generics/gbinary_heap/gpriority_queue.h | Manu-sh/data_structures | 82547710d0e77a5e3e5d6b49ee04bea9ecb31f48 | [
"MIT"
] | null | null | null | src/generics/gbinary_heap/gpriority_queue.h | Manu-sh/data_structures | 82547710d0e77a5e3e5d6b49ee04bea9ecb31f48 | [
"MIT"
] | null | null | null | #undef CLASSNAME
#define CLASSNAME priority_queue
#include "../ccommon.h"
int _(maxSize)();
/* get a new heap ctx back */
STRUCT * _(new)(bool (*lt)(TYPENAME,TYPENAME));
/* free the memory */
void _(free)(STRUCT *hp);
/* true if there are no elements */
bool _(isEmpty)(const STRUCT *hp);
/* retrieve but not remove the root */
TYPENAME _(peek)(const STRUCT *hp);
/* number of elements that heap contains */
int _(length)(const STRUCT *hp);
/* add an element */
bool _(add)(STRUCT *hp, const TYPENAME e);
/* it dosn't check if heap is empty so you MUST check it calling _(isEmpty()) */
TYPENAME _(remove)(STRUCT *hp);
/* replace the root with another element then fix the heap if is needed
return the previous root on success, NULL if an error is occurred.
More efficient than get followed by add, since only need to balance once,
not twice, and appropriate for fixed-size heaps. */
TYPENAME _(replace)(STRUCT *hp, const TYPENAME e); | 28.636364 | 80 | 0.711111 |
dfdde88f79d8795454ef8574b523100eade9d2d6 | 536 | ts | TypeScript | Modulo_04/TYPESCRIPT/Capitulo_11/poo/bank/entitys/pf/fisic_people_acount.ts | EdiJunior88/NewTab_Academy_Projetos | f510f44c14c87582529c2e93ec5d17bbaee2bb65 | [
"MIT"
] | 3 | 2022-01-08T05:02:48.000Z | 2022-01-31T19:03:48.000Z | Modulo_04/TYPESCRIPT/Capitulo_11/poo/bank/entitys/pf/fisic_people_acount.ts | EdiJunior88/NewTab_Academy_Projetos | f510f44c14c87582529c2e93ec5d17bbaee2bb65 | [
"MIT"
] | null | null | null | Modulo_04/TYPESCRIPT/Capitulo_11/poo/bank/entitys/pf/fisic_people_acount.ts | EdiJunior88/NewTab_Academy_Projetos | f510f44c14c87582529c2e93ec5d17bbaee2bb65 | [
"MIT"
] | null | null | null | import { Acount } from '../acount';
import { IAcount } from '../interfaces/acount_interface';
import { IFisicPeople } from '../interfaces/fisic_people_interface';
export class FisicPeopleAcount extends Acount implements IAcount, IFisicPeople {
//Polimorfismo
cpf: number;
name: string;
email: string;
constructor(
cpf: number,
name: string,
email: string,
nameOfHolder: string,
amount: number
) {
super(nameOfHolder, amount);
this.cpf = cpf;
this.name = name;
this.email = email;
}
}
| 22.333333 | 80 | 0.673507 |
f77c6e6c79d907c5858861337c5d3d39196a61d5 | 82 | h | C | ios/PrivateKitSdk.h | PrivateKit/PrivateKit-SDK | dfdda7198490a03b98eeceeb952b93826854e1d8 | [
"MIT"
] | null | null | null | ios/PrivateKitSdk.h | PrivateKit/PrivateKit-SDK | dfdda7198490a03b98eeceeb952b93826854e1d8 | [
"MIT"
] | null | null | null | ios/PrivateKitSdk.h | PrivateKit/PrivateKit-SDK | dfdda7198490a03b98eeceeb952b93826854e1d8 | [
"MIT"
] | 2 | 2020-05-13T07:27:14.000Z | 2020-05-14T17:28:52.000Z | #import <React/RCTViewManager.h>
@interface PrivateKitSdk : RCTViewManager
@end
| 13.666667 | 41 | 0.792683 |
d4501e822b27f19a95cb438271ffc8c97237550f | 477 | lua | Lua | rojtertibia/bin/Debug/data/spells/scripts/monster/fury skill reducer.lua | nneesshh/ot_about | a2fd7acb9a0b229593304a2f7119993227bbdf15 | [
"MIT"
] | null | null | null | rojtertibia/bin/Debug/data/spells/scripts/monster/fury skill reducer.lua | nneesshh/ot_about | a2fd7acb9a0b229593304a2f7119993227bbdf15 | [
"MIT"
] | null | null | null | rojtertibia/bin/Debug/data/spells/scripts/monster/fury skill reducer.lua | nneesshh/ot_about | a2fd7acb9a0b229593304a2f7119993227bbdf15 | [
"MIT"
] | 2 | 2019-12-11T04:13:15.000Z | 2020-02-15T14:42:13.000Z | local condition = Condition(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, 5000)
condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, 60)
condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 70)
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_YELLOW)
combat:setArea(createCombatArea(AREA_CIRCLE3X3))
combat:setCondition(condition)
function onCastSpell(creature, var)
return combat:execute(creature, var)
end
| 34.071429 | 63 | 0.863732 |
8e13655a90a684489afe37e69ed3ed21d011117a | 370 | rb | Ruby | spec/classes/keystone_client_spec.rb | bodepd/puppet-keystone | e381349c1b838301dd730aa3cd146ecacc75aa7c | [
"Apache-2.0"
] | null | null | null | spec/classes/keystone_client_spec.rb | bodepd/puppet-keystone | e381349c1b838301dd730aa3cd146ecacc75aa7c | [
"Apache-2.0"
] | null | null | null | spec/classes/keystone_client_spec.rb | bodepd/puppet-keystone | e381349c1b838301dd730aa3cd146ecacc75aa7c | [
"Apache-2.0"
] | null | null | null | require 'spec_helper'
describe 'keystone::client' do
describe "with default parameters" do
it { should contain_package('python-keystoneclient').with_ensure('present') }
end
describe "with specified version" do
let :params do
{:ensure => '2013.1'}
end
it { should contain_package('python-keystoneclient').with_ensure('2013.1') }
end
end
| 21.764706 | 81 | 0.694595 |
d9acbf9d86f54a0f909c1111b7bcbb850261947f | 2,676 | swift | Swift | XXAlertTransition/Classes/XXPresentationController.swift | shine93/XXAlertTransition | fe2f1f55f1efd8396ba86b6c6f92aa7b17aedb02 | [
"MIT"
] | 2 | 2021-01-11T12:13:11.000Z | 2021-07-17T14:11:22.000Z | XXAlertTransition/Classes/XXPresentationController.swift | shine93/XXAlertTransition | fe2f1f55f1efd8396ba86b6c6f92aa7b17aedb02 | [
"MIT"
] | null | null | null | XXAlertTransition/Classes/XXPresentationController.swift | shine93/XXAlertTransition | fe2f1f55f1efd8396ba86b6c6f92aa7b17aedb02 | [
"MIT"
] | null | null | null | //
// XXPresentationController.swift
// XXUIComponent
//
// Created by 魏梦雪 on 2021/1/8.
// Copyright © 2021 魏梦雪. All rights reserved.
//
import UIKit
//XXTransitionProtocol: present的VC需要遵循
public protocol XXTransitionProtocol {
var customTransitionDelegate: UIViewControllerTransitioningDelegate? { get } //这个很重要,要是全局的,要不然transitionDelegete会不生效。
}
public class XXPresentationController: UIPresentationController {
let dimmingView = UIView()
public override var shouldPresentInFullscreen: Bool {
return false
}
public override var adaptivePresentationStyle: UIModalPresentationStyle {
return .overCurrentContext
}
public override func size(forChildContentContainer container: UIContentContainer, withParentContainerSize parentSize: CGSize) -> CGSize {
return container.preferredContentSize
}
public override var frameOfPresentedViewInContainerView: CGRect {
guard let containerView = containerView else {
return CGRect()
}
let containerBounds = containerView.bounds
var presentedViewFrame = containerBounds
presentedViewFrame.size = size(forChildContentContainer: presentedViewController, withParentContainerSize: containerBounds.size)
presentedViewFrame.origin.x = containerBounds.size.width / 2 - presentedViewFrame.size.width / 2
presentedViewFrame.origin.y = containerBounds.size.height / 2 - presentedViewFrame.size.height / 2
return presentedViewFrame
}
public override func presentationTransitionWillBegin() {
dimmingView.backgroundColor = UIColor.black
dimmingView.alpha = 0.0
containerView?.insertSubview(dimmingView, at: 0)
guard let coordinator = presentedViewController.transitionCoordinator else {
return
}
coordinator.animate(alongsideTransition: { (_) in
self.dimmingView.alpha = 0.4
}, completion: nil)
}
public override func dismissalTransitionWillBegin() {
guard let coordinator = presentedViewController.transitionCoordinator else {
return
}
coordinator.animate(alongsideTransition: { (_) in
self.dimmingView.alpha = 0.0
}) { (_) in
self.dimmingView.removeFromSuperview()
}
}
public override func containerViewWillLayoutSubviews() {
super.containerViewWillLayoutSubviews()
guard let containerView = containerView else {
return
}
//不能写dimmingView.bounds
dimmingView.frame = containerView.bounds
presentedView?.frame = frameOfPresentedViewInContainerView
}
}
| 32.240964 | 141 | 0.702915 |
eed6e6c039d225ee5483a96bbff1b774409139f4 | 308 | sql | SQL | src/main/resources/db/migration/V0_25__Alter_WasteBuyer.sql | hasirudala/buguri-server | 663c1b6cfcc81af6ef623f0eda50e112a25890af | [
"Apache-2.0"
] | 1 | 2020-03-09T06:05:35.000Z | 2020-03-09T06:05:35.000Z | src/main/resources/db/migration/V0_25__Alter_WasteBuyer.sql | hasirudala/buguri-server | 663c1b6cfcc81af6ef623f0eda50e112a25890af | [
"Apache-2.0"
] | 3 | 2019-11-19T05:36:36.000Z | 2019-12-30T09:41:24.000Z | src/main/resources/db/migration/V0_25__Alter_WasteBuyer.sql | hasirudala/buguri-server | 663c1b6cfcc81af6ef623f0eda50e112a25890af | [
"Apache-2.0"
] | 1 | 2020-02-08T12:57:44.000Z | 2020-02-08T12:57:44.000Z | ALTER TABLE waste_buyers
ADD COLUMN zone_id INTEGER REFERENCES zones(id),
ADD COLUMN address CHARACTER VARYING(255),
ADD COLUMN is_kspcb_authorized BOOLEAN DEFAULT FALSE;
CREATE TABLE waste_buyers_items (
buyer_id INTEGER REFERENCES waste_buyers(id),
item_id INTEGER REFERENCES waste_items(id)
);
| 30.8 | 55 | 0.808442 |
fe5f656598c5691599b63541e86fadd49245d76d | 2,088 | kt | Kotlin | platform/platform-impl/src/com/intellij/ide/plugins/JarOrderStarter.kt | nvartolomei/intellij-community | 1aac326dadacf65d45decc25cef21f94f7b80d69 | [
"Apache-2.0"
] | null | null | null | platform/platform-impl/src/com/intellij/ide/plugins/JarOrderStarter.kt | nvartolomei/intellij-community | 1aac326dadacf65d45decc25cef21f94f7b80d69 | [
"Apache-2.0"
] | null | null | null | platform/platform-impl/src/com/intellij/ide/plugins/JarOrderStarter.kt | nvartolomei/intellij-community | 1aac326dadacf65d45decc25cef21f94f7b80d69 | [
"Apache-2.0"
] | null | null | null | // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide.plugins
import com.intellij.openapi.application.ApplicationStarter
import com.intellij.openapi.diagnostic.logger
import com.intellij.util.lang.ClassPath
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
import kotlin.system.exitProcess
/**
* This class is used in build scripts for providing classes and modules loading orders.
*
* Performance tests show 200ms startup performance improvement after adding jar files order
* Performance tests (mostly Windows) show 600ms startup performance improvement after reordering classes in jar files
*/
@Suppress("UNCHECKED_CAST")
internal class JarOrderStarter : ApplicationStarter {
override fun getCommandName() = "jarOrder"
override fun getRequiredModality() = ApplicationStarter.NOT_IN_EDT
override fun main(args: List<String>) {
try {
generateJarAccessLog(Paths.get(args[1]))
}
catch (e: Throwable) {
logger<JarOrderStarter>().error(e)
exitProcess(1)
}
finally {
exitProcess(0)
}
}
fun generateJarAccessLog(outFile: Path) {
val classLoader = JarOrderStarter::class.java.classLoader
val getClassPath = classLoader::class.java.getDeclaredMethod("getClassPath")
getClassPath.isAccessible = true
val getLoadedClasses = getClassPath.invoke(classLoader)::class.java.getDeclaredMethod("getLoadedClasses")
getLoadedClasses.isAccessible = true
val itemsFromBootstrap = getLoadedClasses.invoke(null) as Collection<Map.Entry<String, Path>>
val itemsFromCore = ClassPath.getLoadedClasses()
val items = LinkedHashSet<Map.Entry<String, Path>>(itemsFromBootstrap.size + itemsFromCore.size)
items.addAll(itemsFromBootstrap)
items.addAll(itemsFromCore)
val builder = StringBuilder()
for (item in items) {
builder.append(item.key).append(':').append(item.value)
builder.append('\n')
}
Files.writeString(outFile, builder)
}
}
| 36.631579 | 140 | 0.751916 |
58b843c0c5a8315b99ac0379efac8873215dfdfd | 1,011 | kt | Kotlin | defitrack-rest/defitrack-erc20/src/main/java/io/defitrack/erc20/LPtokenService.kt | defitrack/defitrack-core | fe8c17ace7722edfebdc500e01ea39215b02f6a4 | [
"MIT"
] | 2 | 2021-12-09T15:10:28.000Z | 2022-01-27T14:27:48.000Z | defitrack-rest/defitrack-erc20/src/main/java/io/defitrack/erc20/LPtokenService.kt | defitrack/defitrack-core | fe8c17ace7722edfebdc500e01ea39215b02f6a4 | [
"MIT"
] | 10 | 2021-11-09T15:12:04.000Z | 2022-02-15T14:32:27.000Z | defitrack-rest/defitrack-erc20/src/main/java/io/defitrack/erc20/LPtokenService.kt | defitrack/defitrack-core | fe8c17ace7722edfebdc500e01ea39215b02f6a4 | [
"MIT"
] | 2 | 2021-11-09T10:08:50.000Z | 2021-12-23T13:29:41.000Z | package io.defitrack.erc20
import io.defitrack.abi.ABIResource
import io.defitrack.common.network.Network
import io.defitrack.evm.contract.BlockchainGatewayProvider
import io.defitrack.market.pooling.contract.LPTokenContract
import io.github.reactivecircus.cache4k.Cache
import org.springframework.stereotype.Service
import java.util.*
@Service
class LPtokenService(
private val abiService: ABIResource,
private val blockchainGatewayProvider: BlockchainGatewayProvider
) {
private val cache = Cache.Builder().build<String, LPTokenContract>()
val lpABI by lazy {
abiService.getABI("uniswap/UniswapV2Pair.json")
}
suspend fun getLP(network: Network, address: String): LPTokenContract {
val key = "${network.name}-${address.lowercase(Locale.getDefault())}"
return cache.get(key) {
LPTokenContract(
blockchainGatewayProvider.getGateway(network),
lpABI,
address = address
)
}
}
} | 30.636364 | 77 | 0.707221 |
df39f0e2ad69058be58f840dc50079d001ab6f89 | 151 | rb | Ruby | lib/lane.rb | susestudio/kanban | 6408aec1a4bf9d60b9c8196d4884ffc088029e28 | [
"MIT"
] | 14 | 2015-03-18T19:25:51.000Z | 2018-08-21T14:52:54.000Z | writing/lib/lane.rb | lmmx/kanban | f8b299dce229c2f5a1771e118fef9b08c2b1e56b | [
"MIT"
] | 1 | 2018-04-26T08:50:42.000Z | 2018-04-26T19:13:15.000Z | lib/lane.rb | susestudio/kanban | 6408aec1a4bf9d60b9c8196d4884ffc088029e28 | [
"MIT"
] | null | null | null | class Lane
attr_accessor :key, :title, :limit
def initialize key, title, limit
@key = key
@title = title
@limit = limit
end
end
| 12.583333 | 36 | 0.615894 |
e9d0ee3a25facdb129385ffc18c2e1543beba69e | 423 | rb | Ruby | cookbooks/filebeat-oss/attributes/paths.rb | wazuh/ossec-cookbook | 9e2ef3c39cd70cc5ad026a2268a1973920734677 | [
"Apache-2.0"
] | 16 | 2018-01-20T19:04:52.000Z | 2022-03-13T21:24:56.000Z | cookbooks/filebeat-oss/attributes/paths.rb | wazuh/ossec-cookbook | 9e2ef3c39cd70cc5ad026a2268a1973920734677 | [
"Apache-2.0"
] | 84 | 2018-03-26T05:32:45.000Z | 2022-03-22T08:09:26.000Z | cookbooks/filebeat-oss/attributes/paths.rb | wazuh/ossec-cookbook | 9e2ef3c39cd70cc5ad026a2268a1973920734677 | [
"Apache-2.0"
] | 21 | 2018-03-09T18:42:53.000Z | 2022-03-27T06:42:56.000Z | # Cookbook Name:: filebeat-oss
# Attribute:: paths
# Author:: Wazuh <info@wazuh.com>
default['filebeat']['config_path'] = '/etc/filebeat'
default['filebeat']['wazuh_module_path'] = '/usr/share/filebeat/module'
default['filebeat']['certs_path'] = "#{node['filebeat']['config_path']}/certs"
default['elastic']['config_path'] = "/etc/elasticsearch"
default['elastic']['certs_path'] = "#{node['elastic']['config_path']}/certs" | 47 | 78 | 0.699764 |
9d1fb8a24683562eca556c3f2c04c634ef89d597 | 808 | html | HTML | template/loading.otp.html | majianyu2007/odata | 42d8751f2eb54bb35838a1f505ab6d13c5dd694c | [
"MIT"
] | 27 | 2019-07-07T13:00:23.000Z | 2022-03-25T18:42:45.000Z | template/loading.otp.html | majianyu2007/odata | 42d8751f2eb54bb35838a1f505ab6d13c5dd694c | [
"MIT"
] | 8 | 2020-08-19T12:54:17.000Z | 2022-01-08T03:11:34.000Z | template/loading.otp.html | majianyu2007/odata | 42d8751f2eb54bb35838a1f505ab6d13c5dd694c | [
"MIT"
] | 7 | 2019-08-11T04:39:35.000Z | 2021-05-20T09:52:41.000Z | <style>
.loading{
position:fixed;
z-index:200;
width:100%;
height:100%;
margin:0 auto;
background-color:#FFFFFF;
}
#loadingpic{
position:fixed;
margin:0 auto;
left:50%;
top:50%;
transform:translate(-50%,-50%);
}
@keyframes loadin{
0% {
opacity:0;
}
100%{
z-index:200;
opacity:1;
}
}
@keyframes loadout{
0% {
opacity:1;
}
100%{
z-index:-1;
opacity:0;
}
}
.loadshow{
animation:loadin 0.5s ease forwards;
}
.loadhide{
animation:loadout 0.5s ease forwards;
}
</style>
<div class='loading' id='loading'><img src='./loadingcloth.gif' id='loadingpic'></img></div>
<loadset style='display:none'>
{
"animations": {
"in": {
"id:loading": "loadshow"
},
"out": {
"id:loading": "loadhide"
}
},
"listening":"id:loading"
}
</loadset> | 14.690909 | 92 | 0.592822 |
134459625d51bde8c097eb41a36e38d38d3cca55 | 760 | asm | Assembly | asm/showtext/main.asm | BoKoIsMe/J1900_FreeBSD | 19c4f7f01a37f4eda11a64040dad307a06563fb9 | [
"BSD-2-Clause"
] | null | null | null | asm/showtext/main.asm | BoKoIsMe/J1900_FreeBSD | 19c4f7f01a37f4eda11a64040dad307a06563fb9 | [
"BSD-2-Clause"
] | null | null | null | asm/showtext/main.asm | BoKoIsMe/J1900_FreeBSD | 19c4f7f01a37f4eda11a64040dad307a06563fb9 | [
"BSD-2-Clause"
] | null | null | null | .286
.model small,stdcall
include showtext.inc
includelib showtext.lib
drawChar proto,location:WORD,char:BYTE,color:BYTE
.data
currentPosition COORD <0,0>
szString db "Welcom to the ASM world.",0dh,0ah,0
LENSTRING EQU $ - szString
.stack 200h
.code
.startup
push ds
pop es
mov ah,0002h
int 10h
mov ax,10
mov currentPosition.X,ax
mov ax,12
mov currentPosition.Y,ax
mov si,offset szString
mov cx,LENSTRING - 3
@@:
invoke drawChar,offset currentPosition,[si],foreGroundYellow or highlight or backGroundBlue
inc currentPosition.X
.IF currentPosition.X == 79
mov currentPosition.X,0
inc currentPosition.Y
.ENDIF
.IF currentPosition.Y == 24
mov currentPosition.Y,0
.ENDIF
inc si
loop @B
.exit
end
| 19 | 93 | 0.717105 |
4fc09aa70a8fb0a856647b79a2278c4be83827fa | 58,223 | sql | SQL | db/stratagy.sql | roneyChauhan/saarthi | e6c7a5302d803e4060b87acc315e90130c37735a | [
"MIT"
] | null | null | null | db/stratagy.sql | roneyChauhan/saarthi | e6c7a5302d803e4060b87acc315e90130c37735a | [
"MIT"
] | null | null | null | db/stratagy.sql | roneyChauhan/saarthi | e6c7a5302d803e4060b87acc315e90130c37735a | [
"MIT"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 31, 2019 at 05:02 PM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `stratagy`
--
-- --------------------------------------------------------
--
-- Table structure for table `bharat_admin`
--
CREATE TABLE `bharat_admin` (
`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`first_name` varchar(255) NOT NULL,
`last_name` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_admin`
--
INSERT INTO `bharat_admin` (`id`, `username`, `first_name`, `last_name`, `password`, `is_active`) VALUES
(1, 'admin', 'Sumit', 'V', 'e10adc3949ba59abbe56e057f20f883e', 1);
-- --------------------------------------------------------
--
-- Table structure for table `bharat_attachment`
--
CREATE TABLE `bharat_attachment` (
`id` int(11) NOT NULL,
`path` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_attachment`
--
INSERT INTO `bharat_attachment` (`id`, `path`, `type`, `created_date`) VALUES
(1, '/uploads/brand/c4ca4238a0b923820dcc509a6f75849b/6.jpg', 'image', '2019-10-14 17:50:16'),
(2, '/uploads/brand/c81e728d9d4c2f636f067f89cc14862c/8.jpg', 'image', '2019-10-14 17:50:59'),
(3, '/uploads/brand/eccbc87e4b5ce2fe28308fd9f2a7baf3/6.jpg', 'image', '2019-10-14 17:51:18'),
(4, '/uploads/brand/a87ff679a2f3e71d9181a67b7542122c/8.jpg', 'image', '2019-10-14 17:51:32'),
(5, '/uploads/brand/e4da3b7fbbce2345d7772b0674a318d5/7.jpg', 'image', '2019-10-14 17:51:48'),
(6, '/uploads/vehicle_photos/a87ff679a2f3e71d9181a67b7542122c/vehicle_photo/1575481078_7.jpg', 'image', '2019-12-04 17:43:15'),
(12, '/uploads/vehicle_photos/c81e728d9d4c2f636f067f89cc14862c/vehicle_photo/1576089204_2017-honda-accord_coupe-lx-s-vin1hgct1b34ha001662-768px-n01_550x310.jpg', 'image', '2019-12-11 18:33:30'),
(13, '/uploads/vehicle_photos/c81e728d9d4c2f636f067f89cc14862c/vehicle_photo/1576089208_31443713-hyundai_elite_i20_550x310.jpg', 'image', '2019-12-11 18:33:30'),
(14, '/uploads/vehicle_photos/a87ff679a2f3e71d9181a67b7542122c/vehicle_photo/1576089235_1552676931-8228_550x310.jpg', 'image', '2019-12-11 18:33:58'),
(15, '/uploads/vehicle_photos/eccbc87e4b5ce2fe28308fd9f2a7baf3/vehicle_photo/1576089252_c3eed710c1894ea0447b2d6148f0105e_550x310.png', 'image', '2019-12-11 18:34:14'),
(16, '/uploads/vehicle_photos/e4da3b7fbbce2345d7772b0674a318d5/vehicle_photo/1576089269_Honda_Civic_White_550x310.jpeg', 'image', '2019-12-11 18:34:34'),
(17, '/uploads/vehicle_photos/e4da3b7fbbce2345d7772b0674a318d5/vehicle_photo/1576089273_images_550x310.jpg', 'image', '2019-12-11 18:34:34'),
(18, '/uploads/vehicle_photos/8f14e45fceea167a5a36dedd4bea2543/vehicle_photo/1576089296_lucid-roundup-TA_550x310.jpg', 'image', '2019-12-11 18:34:58'),
(20, '/uploads/vehicle_photos/c4ca4238a0b923820dcc509a6f75849b/vehicle_photo/1576089346_pexels-photo-210019_550x310.jpeg', 'image', '2019-12-11 18:35:48'),
(21, '/uploads/vehicle_photos/1679091c5a880faf6fb5e6087eb1b2dc/vehicle_photo/1576089404_photo-1523676060187-f55189a71f5e_550x310.jpg', 'image', '2019-12-11 18:36:51');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_booking`
--
CREATE TABLE `bharat_booking` (
`id` int(11) NOT NULL,
`reference_id` varchar(255) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`vehical_id` int(11) DEFAULT NULL,
`transaction_id` varchar(255) DEFAULT NULL,
`total_amount` double(9,2) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
`token` varchar(255) DEFAULT NULL,
`check_sum_arr` text,
`transaction_date` datetime DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`modify_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_booking`
--
INSERT INTO `bharat_booking` (`id`, `reference_id`, `user_id`, `vehical_id`, `transaction_id`, `total_amount`, `status`, `token`, `check_sum_arr`, `transaction_date`, `created_date`, `modify_date`) VALUES
(1, 'SRT_1572977307', 1, 3, '1572977307', 500.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-11-05 13:08:27', '2019-11-05 18:08:27'),
(2, 'SRT_1572977649', 1, 3, '1572977649', 300.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-11-05 13:14:09', '2019-11-05 18:14:09'),
(3, 'SRT_1572978351', 1, 3, '1572978351', 200.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-11-05 13:25:51', '2019-11-05 18:25:51'),
(4, 'SRT_1572980433', 2, 7, '1572980433', 400.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-11-05 14:00:33', '2019-11-05 19:00:33'),
(5, 'SRT1573155163', 4, 1, '1573155163', 300.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-11-07 14:32:43', '2019-11-07 19:32:43'),
(6, 'SRT1573155498', 4, 1, '1573155498', 300.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-11-07 14:38:18', '2019-11-07 19:38:18'),
(7, 'SRT1573155607', 5, 1, '20191108111212800110168119200987759', 10.00, 'TXN_SUCCESS', '', 'qiAOewa+/d1F4wcZ8d428jTN9wUo1nL3DbLcausfkZ4KlEmFHoNqD5X7vKukA+GfSEbiBJjp8xzKXtNBNU54SvOnqAL7zkhnRqMlGQ0dq40=', '0000-00-00 00:00:00', '2019-11-07 14:40:07', '2019-11-07 19:40:07'),
(8, 'SRT_1573156193', 5, 1, '1573156193', 300.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-11-07 14:49:53', '2019-11-07 19:49:53'),
(9, 'SRT_1573576780', 6, 3, '20191112111212800110168135301003891', 5.00, 'TXN_SUCCESS', '', 'afoJLZiv8v6hTYKFw5RRYHbervRnRQQtyAjt4fYv7hV6rd4kkzPWuPobGdK6RFWVWsSlSTSIUPXiao1YP9ra38D8HXZt6n0VSF/zTIpjBlI=', '0000-00-00 00:00:00', '2019-11-12 11:39:40', '2019-11-12 16:39:40'),
(10, 'SRT_1574355979', 12, 2, '20191121111212800110168613301041106', 5.00, 'TXN_SUCCESS', '', 'MrE9kKxfsBOP9VPinnEA0m5XoQgHXlXkR+BxKJ1ylpvIlmI2utm56ey1lWH3jyzzqDnU2kF1xiemNVh+fXq4akwyi+ECd+mDQnm1C+NFXuY=', '0000-00-00 00:00:00', '2019-11-21 12:06:19', '2019-11-21 17:06:19'),
(11, 'SRT_1574356287', 13, 2, '1574356287', 300.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-11-21 12:11:27', '2019-11-21 17:11:27'),
(12, 'SRT_1574874612', 4, 1, '20191127111212800110168598601054484', 5.00, 'TXN_SUCCESS', '', '00JmYIGXYej2ukc7WlF9KwGqMvUbVfvGtBPuwM0VL4OoHX3s8fPEOwxulUbuLeeRkeCzQKNvhW8bTCXaEvHpWMp0gg3Oq9jsQVVyEmlVLsc=', '0000-00-00 00:00:00', '2019-11-27 12:10:12', '2019-11-27 17:10:12'),
(13, 'SRT_1574874879', 4, 5, '20191127111212800110168585001032578', 5.00, 'TXN_SUCCESS', '', 'wSBW1evWwYw9wAtKs27qwkxPUoBRb8WWDCYM2Jr0nS+OhcE1jyISU/Qn+wDwRxnWRRLE11AnD8/0h/PeWliwg/tJOl6jryJb8Rxm8ZtXtDs=', '0000-00-00 00:00:00', '2019-11-27 12:14:39', '2019-11-27 17:14:39'),
(14, 'SRT_1575184564', 14, 2, '1575184565', 5250.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-12-01 02:16:05', '2019-12-01 07:16:05'),
(15, 'SRT_1575199505', 15, 2, '20191201111212800110168560901062401', 5.00, 'TXN_SUCCESS', '', 'pAk06Xz+sXDaCvOgNpudVYjO/Bcy3V4aKw4dpHO0fjT6yjSdT8hJtgabaYE3wtLlqPGeoTSPqRWDvN0P9SaMcDQuIoiaO3n4HQRkO9ezVE8=', '0000-00-00 00:00:00', '2019-12-01 06:25:06', '2019-12-01 11:25:06'),
(16, 'SRT_1575201173', 16, 1, '20191201111212800110168559001053951', 5.00, 'TXN_SUCCESS', '', 'm5b7l0yXwXJ+rlFXLbJKqBJ0DDurPgmcuQcA8mZZGfeLVT0AkNNMVLe0FdVUec45kinN0a/QfA9JzVm5VqjN8CnV33mTirALrdi1boRXA14=', '0000-00-00 00:00:00', '2019-12-01 06:52:53', '2019-12-01 11:52:53'),
(17, 'SRT_1576089934', 17, 1, '1576089934', 3500.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-12-11 13:45:34', '2019-12-11 18:45:34'),
(18, 'SRT_1576257745', 18, 2, '20191213111212800110168532601097257', 5.00, 'TXN_SUCCESS', '', 'BwVywJCnGA5C0dcbNwCmD0fFriijc7z+0WdZ46yBTC7vthkjpjLgs4fzNN3JJ6cMAlMnM9vjPtIScfRs/0lJEy07WT2+4HGqokJFDjMvEa0=', '0000-00-00 00:00:00', '2019-12-13 12:22:26', '2019-12-13 17:22:26'),
(19, 'SRT_1576258610', 18, 1, '20191213111212800110168521401111945', 5.00, 'TXN_SUCCESS', '', '1i4rvQpNh7QMrsy3GdcYAfhBs/LotzPotxguJZ974AGz+HM7bns/lu2RZOx8GDlyFnettbRtsYQEnK4KRfEsLkWA3MOYH2ehyjPn9QgvE3g=', '0000-00-00 00:00:00', '2019-12-13 12:36:50', '2019-12-13 17:36:50'),
(20, 'SRT_1576262282', 19, 1, '1576262282', 7000.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-12-13 13:38:02', '2019-12-13 18:38:02'),
(21, 'SRT_1576262332', 19, 1, '1576262332', 10500.00, 'Pending', '', '', '0000-00-00 00:00:00', '2019-12-13 13:38:52', '2019-12-13 18:38:52'),
(22, 'SRT_1576262605', 19, 1, '20191214111212800110168289201096602', 5.00, 'TXN_SUCCESS', '', 'YoADM310BwsSDBkT9K+fMW0wdMUXD6xGaXNxixdvwE2iTzqV1JfueEwAvb6pN6jw7ka6Vv2w5xkXgfQr7dUhu7te+sxbDJRkA9PVYMnvdkY=', '0000-00-00 00:00:00', '2019-12-13 13:43:25', '2019-12-13 18:43:25'),
(23, 'SRT_1576262757', 19, 1, '20191214111212800110168270801099408', 5.00, 'TXN_SUCCESS', '', '1tHWshofKsbeudkUUZWg1q/8Zk2OVHeXO1CUL5yjYcmdkDx+80YgFoTcW9jR7EJk8644yqf9ZoCgTeL3uElkzeJTuXqg5/dQylfSGWNSHNc=', '0000-00-00 00:00:00', '2019-12-13 13:45:57', '2019-12-13 18:45:57'),
(24, 'SRT_1576262837', 19, 1, '20191214111212800110168263701100863', 5.00, 'TXN_SUCCESS', '', '5KakEm36nDH43Fu9tV0npLui2HbB64VXM3LyqPPXXL77E77pGC6Ck3AvOyQivvJ/9vqvbPe3P4SzPH561RSK07mbREBFkOx2N8Lx2zEyTS4=', '0000-00-00 00:00:00', '2019-12-13 13:47:17', '2019-12-13 18:47:17'),
(25, 'SRT_1577209889', 20, 2, '20191224111212800110168255901126563', 5.00, 'TXN_SUCCESS', NULL, 'MjkIrSIS+pXBIv9tYDICycwhigKkbI1X4YXh+hGq75zbEBdhDJ67nVrjXVpD9sMfksXJD6sW4aiuNtdk3uVTy/vBjpV9IttdqXy07khsguM=', NULL, '2019-12-24 12:51:29', '2019-12-24 17:51:29'),
(26, 'SRT_1577378642', 1, 1, '1577378642', 3500.00, 'Pending', NULL, NULL, NULL, '2019-12-26 11:44:02', '2019-12-26 16:44:02'),
(27, 'SRT_1577378813', 1, 2, '20191226111212800110168239001131212', 5.00, 'TXN_SUCCESS', NULL, 'yLKFkDWp1YBIpIgOtg1pw60cPxxthZLg7qTSw4JpQg56Fl3S3AtfSWfqPkaJwivdr71dz3AGzrC9a7ceKybu550JWk/jC8u1qKCoL0qtR/c=', NULL, '2019-12-26 11:46:53', '2019-12-26 16:46:53'),
(28, 'SRT_1577471973', 3, 1, '1577471974', 3500.00, 'Pending', NULL, NULL, NULL, '2019-12-27 13:39:34', '2019-12-27 18:39:34'),
(29, 'SRT_1577723443', 3, 2, '20191230111212800110168217701127757', 5.00, 'TXN_SUCCESS', NULL, 'vURqgJDUsiSr5LtwmcJMWV5mDmMMUi2zsDLOQ8aWPKF/FlGrz1ABCmOVxwpXAfPw6aVrGQl1UCFzzzeNhUbw7HCuCdT/kuSGcXUBWL3nxK0=', NULL, '2019-12-30 11:30:43', '2019-12-30 16:30:43'),
(30, 'SRT_1577726182', 3, 2, '1577726182', 5250.00, 'Pending', NULL, NULL, NULL, '2019-12-30 12:16:22', '2019-12-30 17:16:22'),
(31, 'SRT_1577736236', 3, 2, '20191231111212800110168983901143935', 5.00, 'TXN_SUCCESS', NULL, '+JTeoh7XMcwnTWpv+uLFymJ6Jk60s/VR1fGNGYX84F0NjpbwWoHBLChXgM3mYNFORQ3Rvd7pXZtXCU934cd1fP5a8jZYH18JyNipAj8AEjk=', NULL, '2019-12-30 15:03:56', '2019-12-30 20:03:56'),
(32, 'SRT_1577736652', 21, 1, '20191231111212800110168973101154229', 5.00, 'TXN_SUCCESS', NULL, 'IebNnGy0V+gSmyn8Xcq+E58DdBLXr3kwVxSMr3tVKSFzfTGZkk25HLL6+8xpJWS61c9u8ACsQfHLjJVnOf4LlDGQCRcwp1Uj7DMQrInPgYU=', NULL, '2019-12-30 15:10:52', '2019-12-30 20:10:52'),
(33, 'SRT_1577741719', 21, 2, '1577741719', 5250.00, 'Pending', NULL, NULL, NULL, '2019-12-30 16:35:19', '2019-12-30 21:35:19');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_booking_detail`
--
CREATE TABLE `bharat_booking_detail` (
`id` int(11) NOT NULL,
`booking_id` int(11) DEFAULT NULL,
`service_type` tinyint(1) DEFAULT NULL COMMENT '0 = one way, 1 out station',
`trip_location` int(11) DEFAULT NULL,
`drop_location` int(11) DEFAULT NULL,
`pickup_date` date DEFAULT NULL,
`pickup_time` time DEFAULT NULL,
`drop_date` date DEFAULT NULL,
`drop_time` time DEFAULT NULL,
`trip_days` int(11) DEFAULT NULL,
`modify_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_booking_detail`
--
INSERT INTO `bharat_booking_detail` (`id`, `booking_id`, `service_type`, `trip_location`, `drop_location`, `pickup_date`, `pickup_time`, `drop_date`, `drop_time`, `trip_days`, `modify_date`) VALUES
(1, 1, 0, 263, 0, '2019-07-11', '12:00:00', '0000-00-00', '00:00:00', 0, '2019-11-05 18:08:27'),
(2, 2, 0, 263, 0, '2019-07-11', '23:00:00', '0000-00-00', '00:00:00', 0, '2019-11-05 18:14:09'),
(3, 3, 0, 263, 0, '2019-07-11', '04:00:00', '0000-00-00', '00:00:00', 0, '2019-11-05 18:25:51'),
(4, 4, 0, 285, 0, '1969-12-31', '07:00:00', '0000-00-00', '00:00:00', 0, '2019-11-05 19:00:33'),
(5, 5, 0, 268, 0, '2019-12-11', '17:30:00', '0000-00-00', '00:00:00', 0, '2019-11-07 19:32:44'),
(6, 6, 0, 268, 0, '1969-12-31', '18:30:00', '0000-00-00', '00:00:00', 0, '2019-11-07 19:38:18'),
(7, 7, 0, 272, 0, '1969-12-31', '05:30:00', '0000-00-00', '00:00:00', 0, '2019-11-07 19:40:07'),
(8, 8, 0, 263, 0, '1969-12-31', '07:00:00', '0000-00-00', '00:00:00', 0, '2019-11-07 19:49:53'),
(9, 9, 0, 285, 274, '1969-12-31', '00:00:00', '0000-00-00', '00:00:00', 0, '2019-11-12 16:39:40'),
(10, 10, 0, 285, 263, '1969-12-31', '12:00:00', '0000-00-00', '00:00:00', 0, '2019-11-21 17:06:19'),
(11, 11, 0, 285, 263, '1969-12-31', '00:00:00', '0000-00-00', '00:00:00', 0, '2019-11-21 17:11:27'),
(12, 12, 0, 285, 263, '1969-12-31', '12:00:00', '0000-00-00', '00:00:00', 0, '2019-11-27 17:10:13'),
(13, 13, 0, 263, 285, '1969-12-31', '12:00:00', '0000-00-00', '00:00:00', 0, '2019-11-27 17:14:39'),
(14, 14, 1, 285, 263, '2019-02-12', '02:00:00', '2019-04-12', '00:20:19', 0, '2019-12-01 07:16:05'),
(15, 15, 1, 285, 263, '2019-02-12', '02:00:00', '2019-06-12', '00:20:19', 0, '2019-12-01 11:25:06'),
(16, 16, 1, 285, 263, '2019-12-04', '02:00:00', '2019-12-10', '02:00:00', 0, '2019-12-01 11:52:53'),
(17, 17, 0, 285, 263, '2019-12-13', '01:00:00', '0000-00-00', '00:00:00', 0, '2019-12-11 18:45:34'),
(18, 18, 0, 285, 263, '2019-12-17', '16:00:00', '0000-00-00', '00:00:00', 0, '2019-12-13 17:22:26'),
(19, 19, 0, 285, 263, '2019-12-15', '02:00:00', '0000-00-00', '00:00:00', 0, '2019-12-13 17:36:51'),
(20, 20, 1, 285, 263, '2019-12-17', '02:00:00', '0000-00-00', '00:00:00', 2, '2019-12-13 18:38:02'),
(21, 21, 1, 285, 263, '2019-12-19', '02:00:00', '0000-00-00', '00:00:00', 3, '2019-12-13 18:38:52'),
(22, 22, 1, 285, 263, '2019-12-24', '02:00:00', '0000-00-00', '00:00:00', 2, '2019-12-13 18:43:25'),
(23, 23, 1, 285, 263, '2019-12-14', '00:00:00', '0000-00-00', '00:00:00', 2, '2019-12-13 18:45:57'),
(24, 24, 0, 269, 289, '2019-12-24', '02:00:00', '0000-00-00', '00:00:00', 0, '2019-12-13 18:47:17'),
(25, 25, 0, 285, 263, '2019-12-25', '00:00:00', NULL, NULL, NULL, '2019-12-24 17:51:29'),
(26, 26, 0, 285, 263, '2019-12-27', '12:00:00', NULL, NULL, NULL, '2019-12-26 16:44:02'),
(27, 27, 0, 285, 263, '2019-12-28', '12:00:00', NULL, NULL, NULL, '2019-12-26 16:46:53'),
(28, 28, 0, 285, 263, '2019-12-29', '18:00:00', NULL, NULL, NULL, '2019-12-27 18:39:34'),
(29, 29, NULL, 285, 263, '2019-12-30', '23:55:00', NULL, NULL, NULL, '2019-12-30 16:30:43'),
(30, 30, NULL, 285, 263, '1969-12-31', '00:00:00', NULL, NULL, NULL, '2019-12-30 17:16:22'),
(31, 31, NULL, 285, 263, '2019-12-31', '07:53:00', NULL, NULL, NULL, '2019-12-30 20:03:56'),
(32, 32, 1, 285, 263, '2019-12-31', '01:34:00', NULL, NULL, 4, '2019-12-30 20:10:52'),
(33, 33, NULL, 285, 263, '2019-12-31', '03:04:00', NULL, NULL, NULL, '2019-12-30 21:35:20');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_brands`
--
CREATE TABLE `bharat_brands` (
`id` int(11) NOT NULL,
`brand_name` varchar(255) DEFAULT NULL,
`image` int(11) DEFAULT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`created_date` datetime DEFAULT NULL,
`modify_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_brands`
--
INSERT INTO `bharat_brands` (`id`, `brand_name`, `image`, `is_active`, `created_date`, `modify_date`) VALUES
(1, 'Maruti', 1, 1, '2019-10-14 13:47:39', '2019-10-14 17:50:37'),
(2, 'BMW', 2, 1, '2019-10-14 13:50:59', '2019-10-14 17:50:59'),
(3, 'Audi', 3, 1, '2019-10-14 13:51:18', '2019-10-14 17:51:18'),
(4, 'Nissan', 4, 1, '2019-10-14 13:51:32', '2019-10-14 17:51:32'),
(5, 'Toyota', 5, 1, '2019-10-14 13:51:48', '2019-10-14 17:51:48');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_category`
--
CREATE TABLE `bharat_category` (
`id` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`image` int(11) DEFAULT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`created_date` datetime DEFAULT NULL,
`modify_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_category`
--
INSERT INTO `bharat_category` (`id`, `name`, `image`, `is_active`, `created_date`, `modify_date`) VALUES
(1, 'category 1', 1, 1, '2019-10-14 13:47:39', '2019-10-16 17:06:13'),
(2, 'category 2', 2, 1, '2019-10-14 13:50:59', '2019-10-16 17:06:19'),
(6, 'category 3', 0, 1, '2019-10-16 13:09:10', '2019-10-16 17:09:10'),
(7, 'sdfsdfdsf', 0, 1, '2019-11-12 13:50:32', '2019-11-12 18:50:32'),
(8, 'zxvzvcxv', 0, 0, '2019-11-12 13:53:57', '2019-11-13 17:42:04');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_cities`
--
CREATE TABLE `bharat_cities` (
`id` int(11) NOT NULL,
`city_name` varchar(255) NOT NULL,
`city_code` int(11) DEFAULT NULL,
`state_code` int(11) DEFAULT NULL,
`status` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_cities`
--
INSERT INTO `bharat_cities` (`id`, `city_name`, `city_code`, `state_code`, `status`) VALUES
(1, 'Alipur', 101, 1, 0),
(2, 'Andaman Island', 102, 1, 0),
(3, 'Anderson Island', 103, 1, 0),
(4, 'Arainj-Laka-Punga', 104, 1, 0),
(5, 'Austinabad', 105, 1, 0),
(6, 'Bamboo Flat', 106, 1, 0),
(7, 'Barren Island', 107, 1, 0),
(8, 'Beadonabad', 108, 1, 0),
(9, 'Betapur', 109, 1, 0),
(10, 'Bindraban', 110, 1, 0),
(11, 'Bonington', 111, 1, 0),
(12, 'Brookesabad', 112, 1, 0),
(13, 'Cadell Point', 113, 1, 0),
(14, 'Calicut', 114, 1, 0),
(15, 'Chetamale', 115, 1, 0),
(16, 'Cinque Islands', 116, 1, 0),
(17, 'Defence Island', 117, 1, 0),
(18, 'Digilpur', 118, 1, 0),
(19, 'Dolyganj', 119, 1, 0),
(20, 'Flat Island', 120, 1, 0),
(21, 'Geinyale', 121, 1, 0),
(22, 'Great Coco Island', 122, 1, 0),
(23, 'Haddo', 123, 1, 0),
(24, 'Havelock Island', 124, 1, 0),
(25, 'Henry Lawrence Island', 125, 1, 0),
(26, 'Herbertabad', 126, 1, 0),
(27, 'Hobdaypur', 127, 1, 0),
(28, 'Ilichar', 128, 1, 0),
(29, 'Ingoie', 128, 1, 0),
(30, 'Inteview Island', 130, 1, 0),
(31, 'Jangli Ghat', 131, 1, 0),
(32, 'Jhon Lawrence Island', 132, 1, 0),
(33, 'Karen', 133, 1, 0),
(34, 'Kartara', 134, 1, 0),
(35, 'KYD Islannd', 135, 1, 0),
(36, 'Landfall Island', 136, 1, 0),
(37, 'Little Andmand', 137, 1, 0),
(38, 'Little Coco Island', 138, 1, 0),
(39, 'Long Island', 138, 1, 0),
(40, 'Maimyo', 140, 1, 0),
(41, 'Malappuram', 141, 1, 0),
(42, 'Manglutan', 142, 1, 0),
(43, 'Manpur', 143, 1, 0),
(44, 'Mitha Khari', 144, 1, 0),
(45, 'Neill Island', 145, 1, 0),
(46, 'Nicobar Island', 146, 1, 0),
(47, 'North Brother Island', 147, 1, 0),
(48, 'North Passage Island', 148, 1, 0),
(49, 'North Sentinel Island', 149, 1, 0),
(50, 'Nothen Reef Island', 150, 1, 0),
(51, 'Outram Island', 151, 1, 0),
(52, 'Pahlagaon', 152, 1, 0),
(53, 'Palalankwe', 153, 1, 0),
(54, 'Passage Island', 154, 1, 0),
(55, 'Phaiapong', 155, 1, 0),
(56, 'Phoenix Island', 156, 1, 0),
(57, 'Port Blair', 157, 1, 0),
(58, 'Preparis Island', 158, 1, 0),
(59, 'Protheroepur', 159, 1, 0),
(60, 'Rangachang', 160, 1, 0),
(61, 'Rongat', 161, 1, 0),
(62, 'Rutland Island', 162, 1, 0),
(63, 'Sabari', 163, 1, 0),
(64, 'Saddle Peak', 164, 1, 0),
(65, 'Shadipur', 165, 1, 0),
(66, 'Smith Island', 166, 1, 0),
(67, 'Sound Island', 167, 1, 0),
(68, 'South Sentinel Island', 168, 1, 0),
(69, 'Spike Island', 169, 1, 0),
(70, 'Tarmugli Island', 170, 1, 0),
(71, 'Taylerabad', 171, 1, 0),
(72, 'Titaije', 172, 1, 0),
(73, 'Toibalawe', 173, 1, 0),
(74, 'Tusonabad', 174, 1, 0),
(75, 'West Island', 175, 1, 0),
(76, 'Wimberleyganj', 176, 1, 0),
(77, 'Yadita', 177, 1, 0),
(78, 'Adilabad', 201, 2, 0),
(79, 'Anantapur', 201, 2, 0),
(80, 'Chittoor', 203, 2, 0),
(81, 'Cuddapah', 204, 2, 0),
(82, 'East Godavari', 205, 2, 0),
(83, 'Guntur', 206, 2, 0),
(84, 'Hyderabad', 207, 2, 0),
(85, 'Karimnagar', 208, 2, 0),
(86, 'Khammam', 209, 2, 0),
(87, 'Krishna', 210, 2, 0),
(88, 'Kurnool', 211, 2, 0),
(89, 'Mahabubnagar', 212, 2, 0),
(90, 'Medak', 213, 2, 0),
(91, 'Nalgonda', 214, 2, 0),
(92, 'Nellore', 215, 2, 0),
(93, 'Nizamabad', 216, 2, 0),
(94, 'Prakasam', 217, 2, 0),
(95, 'Rangareddy', 218, 2, 0),
(96, 'Srikakulam', 219, 2, 0),
(97, 'Visakhapatnam', 220, 2, 0),
(98, 'Vizianagaram', 221, 2, 0),
(99, 'Warangal', 222, 2, 0),
(100, 'West Godavari', 223, 2, 0),
(101, 'Anjaw', 301, 3, 0),
(102, 'Changlang', 302, 3, 0),
(103, 'Dibang Valley', 303, 3, 0),
(104, 'East Kameng', 304, 3, 0),
(105, 'East Siang', 305, 3, 0),
(106, 'Itanagar', 306, 3, 0),
(107, 'Kurung Kumey', 307, 3, 0),
(108, 'Lohit', 308, 3, 0),
(109, 'Lower Dibang Valley', 309, 3, 0),
(110, 'Lower Subansiri', 310, 3, 0),
(111, 'Papum Pare', 311, 3, 0),
(112, 'Tawang', 312, 3, 0),
(113, 'Tirap', 313, 3, 0),
(114, 'Upper Siang', 314, 3, 0),
(115, 'Upper Subansiri', 315, 3, 0),
(116, 'West Kameng', 316, 3, 0),
(117, 'West Siang', 317, 3, 0),
(118, 'Barpeta', 401, 4, 0),
(119, 'Bongaigaon', 402, 4, 0),
(120, 'Cachar', 403, 4, 0),
(121, 'Darrang', 404, 4, 0),
(122, 'Dhemaji', 405, 4, 0),
(123, 'Dhubri', 406, 4, 0),
(124, 'Dibrugarh', 407, 4, 0),
(125, 'Goalpara', 408, 4, 0),
(126, 'Golaghat', 409, 4, 0),
(127, 'Guwahati', 410, 4, 0),
(128, 'Hailakandi', 411, 4, 0),
(129, 'Jorhat', 412, 4, 0),
(130, 'Kamrup', 413, 4, 0),
(131, 'Karbi Anglong', 414, 4, 0),
(132, 'Karimganj', 415, 4, 0),
(133, 'Kokrajhar', 416, 4, 0),
(134, 'Lakhimpur', 417, 4, 0),
(135, 'Marigaon', 418, 4, 0),
(136, 'Nagaon', 419, 4, 0),
(137, 'Nalbari', 420, 4, 0),
(138, 'North Cachar Hills', 421, 4, 0),
(139, 'Silchar', 422, 4, 0),
(140, 'Sivasagar', 423, 4, 0),
(141, 'Sonitpur', 424, 4, 0),
(142, 'Tinsukia', 425, 4, 0),
(143, 'Udalguri', 426, 4, 0),
(144, 'Araria', 501, 5, 0),
(145, 'Aurangabad', 502, 5, 0),
(146, 'Banka', 503, 5, 0),
(147, 'Begusarai', 504, 5, 0),
(148, 'Bhagalpur', 505, 5, 0),
(149, 'Bhojpur', 506, 5, 0),
(150, 'Buxar', 507, 5, 0),
(151, 'Darbhanga', 508, 5, 0),
(152, 'East Champaran', 509, 5, 0),
(153, 'Gaya', 510, 5, 0),
(154, 'Gopalganj', 511, 5, 0),
(155, 'Jamshedpur', 512, 5, 0),
(156, 'Jamui', 513, 5, 0),
(157, 'Jehanabad', 514, 5, 0),
(158, 'Kaimur (Bhabua)', 515, 5, 0),
(159, 'Katihar', 516, 5, 0),
(160, 'Khagaria', 517, 5, 0),
(161, 'Kishanganj', 518, 5, 0),
(162, 'Lakhisarai', 519, 5, 0),
(163, 'Madhepura', 520, 5, 0),
(164, 'Madhubani', 521, 5, 0),
(165, 'Munger', 522, 5, 0),
(166, 'Muzaffarpur', 523, 5, 0),
(167, 'Nalanda', 524, 5, 0),
(168, 'Nawada', 525, 5, 0),
(169, 'Patna', 526, 5, 0),
(170, 'Purnia', 527, 5, 0),
(171, 'Rohtas', 528, 5, 0),
(172, 'Saharsa', 529, 5, 0),
(173, 'Samastipur', 530, 5, 0),
(174, 'Saran', 531, 5, 0),
(175, 'Sheikhpura', 532, 5, 0),
(176, 'Sheohar', 533, 5, 0),
(177, 'Sitamarhi', 534, 5, 0),
(178, 'Siwan', 535, 5, 0),
(179, 'Supaul', 536, 5, 0),
(180, 'Vaishali', 537, 5, 0),
(181, 'West Champaran', 538, 5, 0),
(182, 'Chandigarh', 601, 6, 0),
(183, 'Mani Marja', 602, 6, 0),
(184, 'Bastar', 701, 7, 0),
(185, 'Bhilai', 702, 7, 0),
(186, 'Bijapur', 703, 7, 0),
(187, 'Bilaspur', 704, 7, 0),
(188, 'Dhamtari', 705, 7, 0),
(189, 'Durg', 706, 7, 0),
(190, 'Janjgir-Champa', 707, 7, 0),
(191, 'Jashpur', 708, 7, 0),
(192, 'Kabirdham-Kawardha', 709, 7, 0),
(193, 'Korba', 710, 7, 0),
(194, 'Korea', 711, 7, 0),
(195, 'Mahasamund', 712, 7, 0),
(196, 'Narayanpur', 713, 7, 0),
(197, 'Norh Bastar-Kanker', 714, 7, 0),
(198, 'Raigarh', 715, 7, 0),
(199, 'Raipur', 716, 7, 0),
(200, 'Rajnandgaon', 717, 7, 0),
(201, 'South Bastar-Dantewada', 718, 7, 0),
(202, 'Surguja', 719, 7, 0),
(203, 'Amal', 801, 8, 0),
(204, 'Amli', 802, 8, 0),
(205, 'Bedpa', 803, 8, 0),
(206, 'Chikhli', 804, 8, 0),
(207, 'Dadra & Nagar Haveli', 805, 8, 0),
(208, 'Dahikhed', 806, 8, 0),
(209, 'Dolara', 807, 8, 0),
(210, 'Galonda', 808, 8, 0),
(211, 'Kanadi', 809, 8, 0),
(212, 'Karchond', 810, 8, 0),
(213, 'Khadoli', 811, 8, 0),
(214, 'Kharadpada', 812, 8, 0),
(215, 'Kherabari', 813, 8, 0),
(216, 'Kherdi', 814, 8, 0),
(217, 'Kothar', 815, 8, 0),
(218, 'Luari', 816, 8, 0),
(219, 'Mashat', 817, 8, 0),
(220, 'Rakholi', 818, 8, 0),
(221, 'Rudana', 819, 8, 0),
(222, 'Saili', 820, 8, 0),
(223, 'Sili', 821, 8, 0),
(224, 'Silvassa', 822, 8, 0),
(225, 'Sindavni', 823, 8, 0),
(226, 'Udva', 824, 8, 0),
(227, 'Umbarkoi', 825, 8, 0),
(228, 'Vansda', 826, 8, 0),
(229, 'Vasona', 827, 8, 0),
(230, 'Velugam', 828, 8, 0),
(231, 'Brancavare', 901, 9, 0),
(232, 'Dagasi', 902, 9, 0),
(233, 'Daman', 903, 9, 0),
(234, 'Diu', 904, 9, 0),
(235, 'Magarvara', 905, 9, 0),
(236, 'Nagwa', 906, 9, 0),
(237, 'Pariali', 907, 9, 0),
(238, 'Passo Covo', 908, 9, 0),
(239, 'Central Delhi', 1001, 10, 0),
(240, 'East Delhi', 1002, 10, 0),
(241, 'New Delhi', 1003, 10, 0),
(242, 'North Delhi', 1004, 10, 0),
(243, 'North East Delhi', 1005, 10, 0),
(244, 'North West Delhi', 1006, 10, 0),
(245, 'Old Delhi', 1007, 10, 0),
(246, 'South Delhi', 1008, 10, 0),
(247, 'South West Delhi', 1009, 10, 0),
(248, 'West Delhi', 1010, 10, 0),
(249, 'Canacona', 1101, 11, 0),
(250, 'Candolim', 1102, 11, 0),
(251, 'Chinchinim', 1103, 11, 0),
(252, 'Cortalim', 1104, 11, 0),
(253, 'Goa', 1105, 11, 0),
(254, 'Jua', 1106, 11, 0),
(255, 'Madgaon', 1107, 11, 0),
(256, 'Mahem', 1108, 11, 0),
(257, 'Mapuca', 1109, 11, 0),
(258, 'Marmagao', 1110, 11, 0),
(259, 'Panji', 1111, 11, 0),
(260, 'Ponda', 1112, 11, 0),
(261, 'Sanvordem', 1113, 11, 0),
(262, 'Terekhol', 1114, 11, 0),
(263, 'Ahmedabad', 1201, 12, 1),
(264, 'Amreli', 1202, 12, 1),
(265, 'Anand', 1203, 12, 1),
(266, 'Banaskantha', 1204, 12, 1),
(267, 'Baroda', 1205, 12, 1),
(268, 'Bharuch', 1206, 12, 1),
(269, 'Bhavnagar', 1207, 12, 1),
(270, 'Dahod', 1208, 12, 1),
(271, 'Dang', 1209, 12, 1),
(272, 'Dwarka', 1210, 12, 1),
(273, 'Gandhinagar', 1211, 12, 1),
(274, 'Jamnagar', 1212, 12, 1),
(275, 'Junagadh', 1213, 12, 1),
(276, 'Kheda', 1214, 12, 1),
(277, 'Kutch', 1215, 12, 1),
(278, 'Mehsana', 1216, 12, 1),
(279, 'Nadiad', 1217, 12, 1),
(280, 'Narmada', 1218, 12, 1),
(281, 'Navsari', 1219, 12, 1),
(282, 'Panchmahals', 1220, 12, 1),
(283, 'Patan', 1221, 12, 1),
(284, 'Porbandar', 1222, 12, 1),
(285, 'Rajkot', 1223, 12, 1),
(286, 'Sabarkantha', 1224, 12, 1),
(287, 'Surat', 1225, 12, 1),
(288, 'Surendranagar', 1226, 12, 1),
(289, 'Vadodara', 1227, 12, 1),
(290, 'Valsad', 1228, 12, 1),
(291, 'Vapi', 1229, 12, 1),
(292, 'Ambala', 1301, 13, 0),
(293, 'Bhiwani', 1302, 13, 0),
(294, 'Faridabad', 1303, 13, 0),
(295, 'Fatehabad', 1304, 13, 0),
(296, 'Gurgaon', 1305, 13, 0),
(297, 'Hisar', 1306, 13, 0),
(298, 'Jhajjar', 1307, 13, 0),
(299, 'Jind', 1308, 13, 0),
(300, 'Kaithal', 1309, 13, 0),
(301, 'Karnal', 1310, 13, 0),
(302, 'Kurukshetra', 1311, 13, 0),
(303, 'Mahendragarh', 1312, 13, 0),
(304, 'Mewat', 1313, 13, 0),
(305, 'Panchkula', 1314, 13, 0),
(306, 'Panipat', 1315, 13, 0),
(307, 'Rewari', 1316, 13, 0),
(308, 'Rohtak', 1317, 13, 0),
(309, 'Sirsa', 1318, 13, 0),
(310, 'Sonipat', 1319, 13, 0),
(311, 'Yamunanagar', 1320, 13, 0),
(312, 'Bilaspur', 1401, 14, 0),
(313, 'Chamba', 1402, 14, 0),
(314, 'Dalhousie', 1403, 14, 0),
(315, 'Hamirpur', 1404, 14, 0),
(316, 'Kangra', 1405, 14, 0),
(317, 'Kinnaur', 1406, 14, 0),
(318, 'Kullu', 1407, 14, 0),
(319, 'Lahaul & Spiti', 1408, 14, 0),
(320, 'Mandi', 1409, 14, 0),
(321, 'Shimla', 1410, 14, 0),
(322, 'Sirmaur', 1411, 14, 0),
(323, 'Solan', 1412, 14, 0),
(324, 'Una', 1413, 14, 0),
(325, 'Anantnag', 1501, 15, 0),
(326, 'Baramulla', 1502, 15, 0),
(327, 'Budgam', 1503, 15, 0),
(328, 'Doda', 1504, 15, 0),
(329, 'Jammu', 1505, 15, 0),
(330, 'Kargil', 1506, 15, 0),
(331, 'Kathua', 1507, 15, 0),
(332, 'Kupwara', 1508, 15, 0),
(333, 'Leh', 1509, 15, 0),
(334, 'Poonch', 1510, 15, 0),
(335, 'Pulwama', 1511, 15, 0),
(336, 'Rajauri', 1512, 15, 0),
(337, 'Srinagar', 1513, 15, 0),
(338, 'Udhampur', 1514, 15, 0),
(339, 'Bokaro', 1601, 16, 0),
(340, 'Chatra', 1602, 16, 0),
(341, 'Deoghar', 1603, 16, 0),
(342, 'Dhanbad', 1604, 16, 0),
(343, 'Dumka', 1605, 16, 0),
(344, 'East Singhbhum', 1606, 16, 0),
(345, 'Garhwa', 1607, 16, 0),
(346, 'Giridih', 1608, 16, 0),
(347, 'Godda', 1609, 16, 0),
(348, 'Gumla', 1610, 16, 0),
(349, 'Hazaribag', 1611, 16, 0),
(350, 'Jamtara', 1612, 16, 0),
(351, 'Koderma', 1613, 16, 0),
(352, 'Latehar', 1614, 16, 0),
(353, 'Lohardaga', 1615, 16, 0),
(354, 'Pakur', 1616, 16, 0),
(355, 'Palamu', 1617, 16, 0),
(356, 'Ranchi', 1618, 16, 0),
(357, 'Sahibganj', 1619, 16, 0),
(358, 'Seraikela', 1620, 16, 0),
(359, 'Simdega', 1621, 16, 0),
(360, 'West Singhbhum', 1622, 16, 0),
(361, 'Bagalkot', 1701, 17, 0),
(362, 'Bangalore', 1702, 17, 0),
(363, 'Bangalore Rural', 1703, 17, 0),
(364, 'Belgaum', 1704, 17, 0),
(365, 'Bellary', 1705, 17, 0),
(366, 'Bhatkal', 1706, 17, 0),
(367, 'Bidar', 1707, 17, 0),
(368, 'Bijapur', 1708, 17, 0),
(369, 'Chamrajnagar', 1709, 17, 0),
(370, 'Chickmagalur', 1710, 17, 0),
(371, 'Chikballapur', 1711, 17, 0),
(372, 'Chitradurga', 1712, 17, 0),
(373, 'Dakshina Kannada', 1713, 17, 0),
(374, 'Davanagere', 1714, 17, 0),
(375, 'Dharwad', 1715, 17, 0),
(376, 'Gadag', 1716, 17, 0),
(377, 'Gulbarga', 1717, 17, 0),
(378, 'Hampi', 1718, 17, 0),
(379, 'Hassan', 1719, 17, 0),
(380, 'Haveri', 1720, 17, 0),
(381, 'Hospet', 1721, 17, 0),
(382, 'Karwar', 1722, 17, 0),
(383, 'Kodagu', 1723, 17, 0),
(384, 'Kolar', 1724, 17, 0),
(385, 'Koppal', 1725, 17, 0),
(386, 'Madikeri', 1726, 17, 0),
(387, 'Mandya', 1727, 17, 0),
(388, 'Mangalore', 1728, 17, 0),
(389, 'Manipal', 1729, 17, 0),
(390, 'Mysore', 1730, 17, 0),
(391, 'Raichur', 1731, 17, 0),
(392, 'Shimoga', 1732, 17, 0),
(393, 'Sirsi', 1733, 17, 0),
(394, 'Sringeri', 1734, 17, 0),
(395, 'Srirangapatna', 1735, 17, 0),
(396, 'Tumkur', 1736, 17, 0),
(397, 'Udupi', 1737, 17, 0),
(398, 'Uttara Kannada', 1738, 17, 0),
(399, 'Alappuzha', 1801, 18, 0),
(400, 'Alleppey', 1802, 18, 0),
(401, 'Alwaye', 1803, 18, 0),
(402, 'Ernakulam', 1804, 18, 0),
(403, 'Idukki', 1805, 18, 0),
(404, 'Kannur', 1806, 18, 0),
(405, 'Kasargod', 1807, 18, 0),
(406, 'Kochi', 1808, 18, 0),
(407, 'Kollam', 1809, 18, 0),
(408, 'Kottayam', 1810, 18, 0),
(409, 'Kovalam', 1811, 18, 0),
(410, 'Kozhikode', 1812, 18, 0),
(411, 'Malappuram', 1813, 18, 0),
(412, 'Palakkad', 1814, 18, 0),
(413, 'Pathanamthitta', 1815, 18, 0),
(414, 'Perumbavoor', 1816, 18, 0),
(415, 'Thiruvananthapuram', 1817, 18, 0),
(416, 'Thrissur', 1818, 18, 0),
(417, 'Trichur', 1819, 18, 0),
(418, 'Trivandrum', 1820, 18, 0),
(419, 'Wayanad', 1821, 18, 0),
(420, 'Agatti Island', 1901, 19, 0),
(421, 'Bingaram Island', 1902, 19, 0),
(422, 'Bitra Island', 1903, 19, 0),
(423, 'Chetlat Island', 1904, 19, 0),
(424, 'Kadmat Island', 1905, 19, 0),
(425, 'Kalpeni Island', 1906, 19, 0),
(426, 'Kavaratti Island', 1907, 19, 0),
(427, 'Kiltan Island', 1908, 19, 0),
(428, 'Lakshadweep Sea', 1909, 19, 0),
(429, 'Minicoy Island', 1910, 19, 0),
(430, 'North Island', 1911, 19, 0),
(431, 'South Island', 1912, 19, 0),
(432, 'Anuppur', 2001, 20, 0),
(433, 'Ashoknagar', 2002, 20, 0),
(434, 'Balaghat', 2003, 20, 0),
(435, 'Barwani', 2004, 20, 0),
(436, 'Betul', 2005, 20, 0),
(437, 'Bhind', 2006, 20, 0),
(438, 'Bhopal', 2007, 20, 0),
(439, 'Burhanpur', 2008, 20, 0),
(440, 'Chhatarpur', 2009, 20, 0),
(441, 'Chhindwara', 2010, 20, 0),
(442, 'Damoh', 2011, 20, 0),
(443, 'Datia', 2012, 20, 0),
(444, 'Dewas', 2013, 20, 0),
(445, 'Dhar', 2014, 20, 0),
(446, 'Dindori', 2015, 20, 0),
(447, 'Guna', 2016, 20, 0),
(448, 'Gwalior', 2017, 20, 0),
(449, 'Harda', 2018, 20, 0),
(450, 'Hoshangabad', 2019, 20, 0),
(451, 'Indore', 2020, 20, 0),
(452, 'Jabalpur', 2021, 20, 0),
(453, 'Jagdalpur', 2022, 20, 0),
(454, 'Jhabua', 2023, 20, 0),
(455, 'Katni', 2024, 20, 0),
(456, 'Khandwa', 2025, 20, 0),
(457, 'Khargone', 2026, 20, 0),
(458, 'Mandla', 2027, 20, 0),
(459, 'Mandsaur', 2028, 20, 0),
(460, 'Morena', 2029, 20, 0),
(461, 'Narsinghpur', 2030, 20, 0),
(462, 'Neemuch', 2031, 20, 0),
(463, 'Panna', 2032, 20, 0),
(464, 'Raisen', 2033, 20, 0),
(465, 'Rajgarh', 2034, 20, 0),
(466, 'Ratlam', 2035, 20, 0),
(467, 'Rewa', 2036, 20, 0),
(468, 'Sagar', 2037, 20, 0),
(469, 'Satna', 2038, 20, 0),
(470, 'Sehore', 2039, 20, 0),
(471, 'Seoni', 2040, 20, 0),
(472, 'Shahdol', 2041, 20, 0),
(473, 'Shajapur', 2042, 20, 0),
(474, 'Sheopur', 2043, 20, 0),
(475, 'Shivpuri', 2044, 20, 0),
(476, 'Sidhi', 2045, 20, 0),
(477, 'Tikamgarh', 2046, 20, 0),
(478, 'Ujjain', 2047, 20, 0),
(479, 'Umaria', 2048, 20, 0),
(480, 'Vidisha', 2049, 20, 0),
(481, 'Ahmednagar', 2101, 21, 0),
(482, 'Akola', 2102, 21, 0),
(483, 'Amravati', 2103, 21, 0),
(484, 'Aurangabad', 2104, 21, 0),
(485, 'Beed', 2105, 21, 0),
(486, 'Bhandara', 2106, 21, 0),
(487, 'Buldhana', 2107, 21, 0),
(488, 'Chandrapur', 2108, 21, 0),
(489, 'Dhule', 2109, 21, 0),
(490, 'Gadchiroli', 2110, 21, 0),
(491, 'Gondia', 2111, 21, 0),
(492, 'Hingoli', 2112, 21, 0),
(493, 'Jalgaon', 2113, 21, 0),
(494, 'Jalna', 2114, 21, 0),
(495, 'Kolhapur', 2115, 21, 0),
(496, 'Latur', 2116, 21, 0),
(497, 'Mahabaleshwar', 2117, 21, 0),
(498, 'Mumbai', 2118, 21, 0),
(499, 'Mumbai City', 2119, 21, 0),
(500, 'Mumbai Suburban', 2120, 21, 0),
(501, 'Nagpur', 2121, 21, 0),
(502, 'Nanded', 2122, 21, 0),
(503, 'Nandurbar', 2123, 21, 0),
(504, 'Nashik', 2124, 21, 0),
(505, 'Osmanabad', 2125, 21, 0),
(506, 'Parbhani', 2126, 21, 0),
(507, 'Pune', 2127, 21, 0),
(508, 'Raigad', 2128, 21, 0),
(509, 'Ratnagiri', 2129, 21, 0),
(510, 'Sangli', 2130, 21, 0),
(511, 'Satara', 2131, 21, 0),
(512, 'Sholapur', 2132, 21, 0),
(513, 'Sindhudurg', 2133, 21, 0),
(514, 'Thane', 2134, 21, 0),
(515, 'Wardha', 2135, 21, 0),
(516, 'Washim', 2136, 21, 0),
(517, 'Yavatmal', 2137, 21, 0),
(518, 'Bishnupur', 2201, 22, 0),
(519, 'Chandel', 2202, 22, 0),
(520, 'Churachandpur', 2203, 22, 0),
(521, 'Imphal East', 2204, 22, 0),
(522, 'Imphal West', 2205, 22, 0),
(523, 'Senapati', 2206, 22, 0),
(524, 'Tamenglong', 2207, 22, 0),
(525, 'Thoubal', 2208, 22, 0),
(526, 'Ukhrul', 2209, 22, 0),
(527, 'East Garo Hills', 2301, 23, 0),
(528, 'East Khasi Hills', 2302, 23, 0),
(529, 'Jaintia Hills', 2303, 23, 0),
(530, 'Ri Bhoi', 2304, 23, 0),
(531, 'Shillong', 2305, 23, 0),
(532, 'South Garo Hills', 2306, 23, 0),
(533, 'West Garo Hills', 2307, 23, 0),
(534, 'West Khasi Hills', 2308, 23, 0),
(535, 'Aizawl', 2401, 24, 0),
(536, 'Champhai', 2402, 24, 0),
(537, 'Kolasib', 2403, 24, 0),
(538, 'Lawngtlai', 2404, 24, 0),
(539, 'Lunglei', 2405, 24, 0),
(540, 'Mamit', 2406, 24, 0),
(541, 'Saiha', 2407, 24, 0),
(542, 'Serchhip', 2408, 24, 0),
(543, 'Dimapur', 2501, 25, 0),
(544, 'Kohima', 2502, 25, 0),
(545, 'Mokokchung', 2503, 25, 0),
(546, 'Mon', 2504, 25, 0),
(547, 'Phek', 2505, 25, 0),
(548, 'Tuensang', 2506, 25, 0),
(549, 'Wokha', 2507, 25, 0),
(550, 'Zunheboto', 2508, 25, 0),
(551, 'Angul', 2601, 26, 0),
(552, 'Balangir', 2602, 26, 0),
(553, 'Balasore', 2603, 26, 0),
(554, 'Baleswar', 2604, 26, 0),
(555, 'Bargarh', 2605, 26, 0),
(556, 'Berhampur', 2606, 26, 0),
(557, 'Bhadrak', 2607, 26, 0),
(558, 'Bhubaneswar', 2608, 26, 0),
(559, 'Boudh', 2609, 26, 0),
(560, 'Cuttack', 2610, 26, 0),
(561, 'Deogarh', 2611, 26, 0),
(562, 'Dhenkanal', 2612, 26, 0),
(563, 'Gajapati', 2613, 26, 0),
(564, 'Ganjam', 2614, 26, 0),
(565, 'Jagatsinghapur', 2615, 26, 0),
(566, 'Jajpur', 2616, 26, 0),
(567, 'Jharsuguda', 2617, 26, 0),
(568, 'Kalahandi', 2618, 26, 0),
(569, 'Kandhamal', 2619, 26, 0),
(570, 'Kendrapara', 2620, 26, 0),
(571, 'Kendujhar', 2621, 26, 0),
(572, 'Khordha', 2622, 26, 0),
(573, 'Koraput', 2623, 26, 0),
(574, 'Malkangiri', 2624, 26, 0),
(575, 'Mayurbhanj', 2625, 26, 0),
(576, 'Nabarangapur', 2626, 26, 0),
(577, 'Nayagarh', 2627, 26, 0),
(578, 'Nuapada', 2628, 26, 0),
(579, 'Puri', 2629, 26, 0),
(580, 'Rayagada', 2630, 26, 0),
(581, 'Rourkela', 2631, 26, 0),
(582, 'Sambalpur', 2632, 26, 0),
(583, 'Subarnapur', 2633, 26, 0),
(584, 'Sundergarh', 2634, 26, 0),
(585, 'Bahur', 2701, 27, 0),
(586, 'Karaikal', 2701, 27, 0),
(587, 'Mahe', 2701, 27, 0),
(588, 'Pondicherry', 2701, 27, 0),
(589, 'Purnankuppam', 2701, 27, 0),
(590, 'Valudavur', 2701, 27, 0),
(591, 'Villianur', 2701, 27, 0),
(592, 'Yanam', 2701, 27, 0),
(593, 'Amritsar', 2801, 28, 0),
(594, 'Barnala', 2801, 28, 0),
(595, 'Bathinda', 2801, 28, 0),
(596, 'Faridkot', 2801, 28, 0),
(597, 'Fatehgarh Sahib', 2801, 28, 0),
(598, 'Ferozepur', 2801, 28, 0),
(599, 'Gurdaspur', 2801, 28, 0),
(600, 'Hoshiarpur', 2801, 28, 0),
(601, 'Jalandhar', 2801, 28, 0),
(602, 'Kapurthala', 2801, 28, 0),
(603, 'Ludhiana', 2801, 28, 0),
(604, 'Mansa', 2801, 28, 0),
(605, 'Moga', 2801, 28, 0),
(606, 'Muktsar', 2801, 28, 0),
(607, 'Nawanshahr', 2801, 28, 0),
(608, 'Pathankot', 2801, 28, 0),
(609, 'Patiala', 2801, 28, 0),
(610, 'Rupnagar', 2801, 28, 0),
(611, 'Sangrur', 2801, 28, 0),
(612, 'SAS Nagar', 2801, 28, 0),
(613, 'Tarn Taran', 2801, 28, 0),
(614, 'Ajmer', 2901, 29, 0),
(615, 'Alwar', 2902, 29, 0),
(616, 'Banswara', 2903, 29, 0),
(617, 'Baran', 2904, 29, 0),
(618, 'Barmer', 2905, 29, 0),
(619, 'Bharatpur', 2906, 29, 0),
(620, 'Bhilwara', 2907, 29, 0),
(621, 'Bikaner', 2908, 29, 0),
(622, 'Bundi', 2909, 29, 0),
(623, 'Chittorgarh', 2910, 29, 0),
(624, 'Churu', 2911, 29, 0),
(625, 'Dausa', 2912, 29, 0),
(626, 'Dholpur', 2913, 29, 0),
(627, 'Dungarpur', 2914, 29, 0),
(628, 'Hanumangarh', 2915, 29, 0),
(629, 'Jaipur', 2916, 29, 0),
(630, 'Jaisalmer', 2917, 29, 0),
(631, 'Jalore', 2918, 29, 0),
(632, 'Jhalawar', 2919, 29, 0),
(633, 'Jhunjhunu', 2920, 29, 0),
(634, 'Jodhpur', 2921, 29, 0),
(635, 'Karauli', 2922, 29, 0),
(636, 'Kota', 2923, 29, 0),
(637, 'Nagaur', 2924, 29, 0),
(638, 'Pali', 2925, 29, 0),
(639, 'Pilani', 2926, 29, 0),
(640, 'Rajsamand', 2927, 29, 0),
(641, 'Sawai Madhopur', 2928, 29, 0),
(642, 'Sikar', 2929, 29, 0),
(643, 'Sirohi', 2930, 29, 0),
(644, 'Sri Ganganagar', 2931, 29, 0),
(645, 'Tonk', 2932, 29, 0),
(646, 'Udaipur', 2933, 29, 0),
(647, 'Barmiak', 3001, 30, 0),
(648, 'Be', 3002, 30, 0),
(649, 'Bhurtuk', 3003, 30, 0),
(650, 'Chhubakha', 3004, 30, 0),
(651, 'Chidam', 3005, 30, 0),
(652, 'Chubha', 3006, 30, 0),
(653, 'Chumikteng', 3007, 30, 0),
(654, 'Dentam', 3008, 30, 0),
(655, 'Dikchu', 3009, 30, 0),
(656, 'Dzongri', 3010, 30, 0),
(657, 'Gangtok', 3011, 30, 0),
(658, 'Gauzing', 3012, 30, 0),
(659, 'Gyalshing', 3013, 30, 0),
(660, 'Hema', 3014, 30, 0),
(661, 'Kerung', 3015, 30, 0),
(662, 'Lachen', 3016, 30, 0),
(663, 'Lachung', 3017, 30, 0),
(664, 'Lema', 3018, 30, 0),
(665, 'Lingtam', 3019, 30, 0),
(666, 'Lungthu', 3020, 30, 0),
(667, 'Mangan', 3021, 30, 0),
(668, 'Namchi', 3022, 30, 0),
(669, 'Namthang', 3023, 30, 0),
(670, 'Nanga', 3024, 30, 0),
(671, 'Nantang', 3025, 30, 0),
(672, 'Naya Bazar', 3026, 30, 0),
(673, 'Padamachen', 3027, 30, 0),
(674, 'Pakhyong', 3028, 30, 0),
(675, 'Pemayangtse', 3029, 30, 0),
(676, 'Phensang', 3030, 30, 0),
(677, 'Rangli', 3031, 30, 0),
(678, 'Rinchingpong', 3032, 30, 0),
(679, 'Sakyong', 3033, 30, 0),
(680, 'Samdong', 3034, 30, 0),
(681, 'Singtam', 3035, 30, 0),
(682, 'Siniolchu', 3035, 30, 0),
(683, 'Sombari', 3036, 30, 0),
(684, 'Soreng', 3037, 30, 0),
(685, 'Sosing', 3038, 30, 0),
(686, 'Tekhug', 3039, 30, 0),
(687, 'Temi', 3040, 30, 0),
(688, 'Tsetang', 3041, 30, 0),
(689, 'Tsomgo', 3042, 30, 0),
(690, 'Tumlong', 3043, 30, 0),
(691, 'Yangang', 3044, 30, 0),
(692, 'Yumtang', 3045, 30, 0),
(693, 'Chennai', 3101, 31, 0),
(694, 'Chidambaram', 3102, 31, 0),
(695, 'Chingleput', 3103, 31, 0),
(696, 'Coimbatore', 3104, 31, 0),
(697, 'Courtallam', 3105, 31, 0),
(698, 'Cuddalore', 3106, 31, 0),
(699, 'Dharmapuri', 3107, 31, 0),
(700, 'Dindigul', 3108, 31, 0),
(701, 'Erode', 3109, 31, 0),
(702, 'Hosur', 3110, 31, 0),
(703, 'Kanchipuram', 3111, 31, 0),
(704, 'Kanyakumari', 3112, 31, 0),
(705, 'Karaikudi', 3113, 31, 0),
(706, 'Karur', 3114, 31, 0),
(707, 'Kodaikanal', 3115, 31, 0),
(708, 'Kovilpatti', 3116, 31, 0),
(709, 'Krishnagiri', 3117, 31, 0),
(710, 'Kumbakonam', 3118, 31, 0),
(711, 'Madurai', 3119, 31, 0),
(712, 'Mayiladuthurai', 3120, 31, 0),
(713, 'Nagapattinam', 3121, 31, 0),
(714, 'Nagarcoil', 3122, 31, 0),
(715, 'Namakkal', 3123, 31, 0),
(716, 'Neyveli', 3124, 31, 0),
(717, 'Nilgiris', 3125, 31, 0),
(718, 'Ooty', 3126, 31, 0),
(719, 'Palani', 3127, 31, 0),
(720, 'Perambalur', 3128, 31, 0),
(721, 'Pollachi', 3129, 31, 0),
(722, 'Pudukkottai', 3130, 31, 0),
(723, 'Rajapalayam', 3131, 31, 0),
(724, 'Ramanathapuram', 3132, 31, 0),
(725, 'Salem', 3133, 31, 0),
(726, 'Sivaganga', 3134, 31, 0),
(727, 'Sivakasi', 3135, 31, 0),
(728, 'Thanjavur', 3136, 31, 0),
(729, 'Theni', 3137, 31, 0),
(730, 'Thoothukudi', 3138, 31, 0),
(731, 'Tiruchirappalli', 3139, 31, 0),
(732, 'Tirunelveli', 3140, 31, 0),
(733, 'Tirupur', 3141, 31, 0),
(734, 'Tiruvallur', 3142, 31, 0),
(735, 'Tiruvannamalai', 3143, 31, 0),
(736, 'Tiruvarur', 3144, 31, 0),
(737, 'Trichy', 3145, 31, 0),
(738, 'Tuticorin', 3146, 31, 0),
(739, 'Vellore', 3147, 31, 0),
(740, 'Villupuram', 3148, 31, 0),
(741, 'Virudhunagar', 3149, 31, 0),
(742, 'Yercaud', 3150, 31, 0),
(743, 'Agartala', 3201, 32, 0),
(744, 'Ambasa', 3202, 32, 0),
(745, 'Bampurbari', 3203, 32, 0),
(746, 'Belonia', 3204, 32, 0),
(747, 'Dhalai', 3205, 32, 0),
(748, 'Dharam Nagar', 3206, 32, 0),
(749, 'Kailashahar', 3207, 32, 0),
(750, 'Kamal Krishnabari', 3208, 32, 0),
(751, 'Khopaiyapara', 3209, 32, 0),
(752, 'Khowai', 3210, 32, 0),
(753, 'Phuldungsei', 3211, 32, 0),
(754, 'Radha Kishore Pur', 3212, 32, 0),
(755, 'Tripura', 3213, 32, 0);
-- --------------------------------------------------------
--
-- Table structure for table `bharat_inquiry`
--
CREATE TABLE `bharat_inquiry` (
`id` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`subject` varchar(255) DEFAULT NULL,
`message` text,
`trip_details` text,
`created_date` datetime DEFAULT NULL,
`modify_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_inquiry`
--
INSERT INTO `bharat_inquiry` (`id`, `name`, `email`, `subject`, `message`, `trip_details`, `created_date`, `modify_date`) VALUES
(1, 'Kishan', 'kishan@gmail.com', 'Please guide me', 'I want to send', '{\"trip_location\":\"263\",\"drop_location\":\"285\",\"trip_location_name\":\"Ahmedabad-GUJARAT\",\"drop_location_name\":\"Rajkot-GUJARAT\",\"pick_date\":\"29\\/11\\/2019\",\"pick_time\":\"12:00 pm\",\"seating_capacity\":\"5\",\"car_id\":\"c2FydGhpNQ%3D%3D\",\"route_price\":7000}', '2019-11-27 13:13:16', '2019-11-27 18:13:16');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_route`
--
CREATE TABLE `bharat_route` (
`id` int(11) NOT NULL,
`from_location` int(11) DEFAULT NULL,
`to_location` int(11) DEFAULT NULL,
`from_city` varchar(255) DEFAULT NULL,
`to_city` varchar(255) DEFAULT NULL,
`from_state` varchar(255) DEFAULT NULL,
`to_state` varchar(255) DEFAULT NULL,
`kilometer` int(11) DEFAULT NULL,
`is_active` tinyint(1) DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`modify_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_route`
--
INSERT INTO `bharat_route` (`id`, `from_location`, `to_location`, `from_city`, `to_city`, `from_state`, `to_state`, `kilometer`, `is_active`, `created_date`, `modify_date`) VALUES
(1, 263, 285, 'Ahmedabad', 'Rajkot', 'GUJARAT', 'GUJARAT', 350, 1, '2019-11-14 12:49:09', '2019-11-14 18:53:47'),
(2, 285, 272, 'Rajkot', 'Dwarka', 'GUJARAT', 'GUJARAT', 300, 1, '2019-11-14 12:51:01', '2019-11-14 18:36:40'),
(3, 285, 274, 'Rajkot', 'Jamnagar', 'Gujarat', 'Gujarat', 350, 1, '2019-11-14 13:07:49', '2019-12-01 12:09:28'),
(4, 285, 288, 'Rajkot', 'Surendranagar', 'GUJARAT', 'GUJARAT', 70, 1, '2019-11-14 13:08:40', '2019-11-14 18:33:40'),
(5, 285, 273, 'Rajkot', 'Gandhinagar', 'GUJARAT', 'GUJARAT', 250, 1, '2019-11-14 13:26:21', '2019-11-14 18:26:21'),
(6, 289, 269, 'Vadodara', 'Bhavnagar', 'GUJARAT', 'GUJARAT', 450, 1, '2019-11-14 13:54:26', '2019-11-26 02:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_sitesettings`
--
CREATE TABLE `bharat_sitesettings` (
`id` int(11) NOT NULL,
`from_name` varchar(255) NOT NULL,
`from_email` varchar(255) NOT NULL,
`day_min_km` int(11) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_sitesettings`
--
INSERT INTO `bharat_sitesettings` (`id`, `from_name`, `from_email`, `day_min_km`, `is_active`) VALUES
(1, 'abc', 'abc', 300, 1);
-- --------------------------------------------------------
--
-- Table structure for table `bharat_state`
--
CREATE TABLE `bharat_state` (
`id` int(11) NOT NULL,
`state` varchar(255) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_state`
--
INSERT INTO `bharat_state` (`id`, `state`, `status`) VALUES
(1, 'ANDAMAN AND NICOBAR ISLANDS', 0),
(2, 'ANDHRA PRADESH', 0),
(3, 'ARUNACHAL PRADESH', 0),
(4, 'ASSAM', 0),
(5, 'BIHAR', 0),
(6, 'CHATTISGARH', 0),
(7, 'CHANDIGARH', 0),
(8, 'DAMAN AND DIU', 0),
(9, 'DELHI', 0),
(10, 'DADRA AND NAGAR HAVELI', 1),
(11, 'GOA', 0),
(12, 'GUJARAT', 1),
(13, 'HIMACHAL PRADESH', 0),
(14, 'HARYANA', 0),
(15, 'JAMMU AND KASHMIR', 0),
(16, 'JHARKHAND', 0),
(17, 'KERALA', 0),
(18, 'KARNATAKA', 0),
(19, 'LAKSHADWEEP', 0),
(20, 'MEGHALAYA', 0),
(21, 'MAHARASHTRA', 0),
(22, 'MANIPUR', 0),
(23, 'MADHYA PRADESH', 0),
(24, 'MIZORAM', 0),
(25, 'NAGALAND', 0),
(26, 'ORISSA', 0),
(27, 'PUNJAB', 0),
(28, 'PONDICHERRY', 0),
(29, 'RAJASTHAN', 0),
(30, 'SIKKIM', 0),
(31, 'TAMIL NADU', 0),
(32, 'TRIPURA', 0),
(33, 'UTTARAKHAND', 0),
(34, 'UTTAR PRADESH', 0),
(35, 'WEST BENGAL', 0),
(36, 'TELANGANA', 0);
-- --------------------------------------------------------
--
-- Table structure for table `bharat_user`
--
CREATE TABLE `bharat_user` (
`id` int(11) NOT NULL,
`username` varchar(255) DEFAULT NULL,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0 = Inactive , 1 Active',
`activation_code` varchar(255) DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`modify_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_user`
--
INSERT INTO `bharat_user` (`id`, `username`, `first_name`, `last_name`, `phone`, `email`, `password`, `is_active`, `activation_code`, `created_date`, `modify_date`) VALUES
(1, 'SRT_kishan', 'kishan', '', '1234567895', 'abc@gmail.com', 'c2FydGhpMTIzNDU2', 1, '', '2019-11-05 13:08:27', '2019-11-05 18:08:27'),
(3, 'SRT_Kishan Chavda', 'Kishan Chavda', '', '8866699038', 'ca.kishanchavda@gmail.com', 'c2FydGhpMTIzNDU2', 1, '', '2019-11-07 13:45:12', '2019-11-07 18:45:12'),
(4, 'SRT_Ravi Jadav', 'Ravi Jadav', '', '8485978745', 'kishan@gmail.com', 'c2FydGhpMTIzNDU2Nw%3D%3D', 1, '', '2019-11-07 14:32:43', '2019-11-07 19:32:43'),
(5, 'SRT_Kishan', 'Kishan', '', '1234567898', 'test@gmail.com', 'c2FydGhpMTIzNDU2', 1, '', '2019-11-07 14:40:07', '2019-11-07 19:40:07'),
(6, 'SRT_Kishan Chavda', 'Kishan Chavda', '', '7778915545', 'test@gmail.com', 'c2FydGhpMTIzNDU2', 1, '', '2019-11-12 11:39:40', '2019-11-12 16:39:40'),
(7, '', 'Kishan', 'Chavda', '1234567898', 'kishan123@gmail.com', 'c2FydGhpQWJjQDEyMw%3D%3D', 1, '', '2019-11-15 12:57:20', '2019-11-15 17:57:20'),
(8, '', 'Sumit', 'Vegad', '1234567898', 'sumit@gmail.com', 'c2FydGhpQWJjQDEyMw%3D%3D', 0, '', '2019-11-15 13:01:26', '2019-11-15 18:01:26'),
(9, '', 'sumit', 'vegad', '1234567895', 'sumit@abcgmail.com', 'c2FydGhpQWJjQDEyMw%3D%3D', 0, '', '2019-11-15 13:02:08', '2019-11-15 18:02:08'),
(10, '', 'abc', 'abc', '8866699038', 'abc123@gmail.com', 'c2FydGhpYWJjQDEyMw%3D%3D', 0, '', '2019-11-20 13:42:08', '2019-11-20 18:42:08'),
(11, '', 'abc', 'abc', '8866699038', 'abc123@gmail.com', 'c2FydGhpYWJjQDEyMw%3D%3D', 0, '', '2019-11-20 13:42:28', '2019-11-20 18:42:28'),
(12, 'SRT_dsafsfewrwrtw', 'dsafsfewrwrtw', '', '879798777987', 'k1@gmail.com', 'c2FydGhpMTIzNDU2', 1, '', '2019-11-21 12:06:19', '2019-11-21 17:06:19'),
(13, 'SRT_sdfsdf', 'sdfsdf', '', 'sdfsdf', 'sdfsdf', 'c2FydGhpMTIzNDU2', 1, '', '2019-11-21 12:11:27', '2019-11-21 17:11:27'),
(14, 'SRT_fsdfsd', 'fsdfsd', '', 'sfds', 'sdfsaf', 'c2FydGhpMTIzNDU2', 1, '', '2019-12-01 02:16:04', '2019-12-01 07:16:04'),
(15, 'SRT_gsdg', 'gsdg', '', 'sdfg', 'sdgfd', 'c2FydGhpMTIzNDU2', 1, '', '2019-12-01 06:25:05', '2019-12-01 11:25:05'),
(16, 'SRT_sdfsdf', 'sdfsdf', '', 'sdf', 'sdfsdf', 'c2FydGhpMTIzNDU2', 1, '', '2019-12-01 06:52:53', '2019-12-01 11:52:53'),
(17, '', 'Kishan', 'Rathod', '1234567898', 'test123@gmail.com', 'c2FydGhpSzFzaEBuNTg%3D', 0, '', '2019-12-11 13:18:54', '2019-12-11 18:18:54'),
(18, 'SRT_Ravi Jadav', 'Ravi Jadav', '', '9898748671', '', 'c2FydGhpMTIzNDU2', 1, '', '2019-12-13 12:22:25', '2019-12-13 17:22:25'),
(19, 'SRT_Rahul', 'Rahul', 'Gohel', '1234567890', '', 'c2FydGhpMTIzNDU2', 1, '', '2019-12-13 13:38:02', '2019-12-13 18:38:02'),
(20, 'SRT_ravi', 'ravi', NULL, '1231231235', NULL, 'c2FydGhpMTIzNDU2', 1, NULL, '2019-12-24 12:51:29', '2019-12-24 17:51:29'),
(21, 'SRT_abcSumit', 'abcSumit', NULL, '9722074310', NULL, 'c2FydGhpMTIzNDU2', 1, NULL, '2019-12-30 15:10:52', '2019-12-30 20:10:52');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_vehicle`
--
CREATE TABLE `bharat_vehicle` (
`id` int(11) NOT NULL,
`title` varchar(150) DEFAULT NULL,
`brand` int(11) DEFAULT NULL,
`category` int(11) DEFAULT NULL,
`overview` longtext,
`seating_capacity` int(11) DEFAULT NULL,
`min_hours` int(11) DEFAULT NULL,
`local_km` int(11) DEFAULT NULL,
`hours_price` double(11,2) DEFAULT NULL,
`min_day` int(11) DEFAULT NULL,
`outstation_km` int(11) DEFAULT NULL,
`outstation_price` double(11,2) DEFAULT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`created_date` datetime DEFAULT NULL,
`modify_date` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_vehicle`
--
INSERT INTO `bharat_vehicle` (`id`, `title`, `brand`, `category`, `overview`, `seating_capacity`, `min_hours`, `local_km`, `hours_price`, `min_day`, `outstation_km`, `outstation_price`, `is_active`, `created_date`, `modify_date`) VALUES
(1, 'Bolero', NULL, 2, 'vtretrvet', 2, 8, 80, 300.00, 1, 1, 10.00, 1, '0000-00-00 00:00:00', '2019-11-26 01:46:00'),
(2, 'Scorpio', NULL, 2, 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam nibh. Nunc varius facilisis eros. Sed erat. In in velit quis arcu ornare laoreet. Curabitur adipiscing luctus massa. Integer ut purus ac augue commodo commodo. Nunc nec mi eu justo tempor consectetuer. Etiam vitae nisl. In dignissim lacus ut ante. Cras elit lectus, bibendum a, adipiscing vitae, commodo et, dui. Ut tincidunt tortor. Donec nonummy, enim in lacinia pulvinar, velit tellus scelerisque augue, ac posuere libero urna eget neque. Cras ipsum. Vestibulum pretium, lectus nec venenatis volutpat, purus lectus ultrices risus, a condimentum risus mi et quam. Pellentesque auctor fringilla neque. Duis eu massa ut lorem iaculis vestibulum. Maecenas facilisis elit sed justo. Quisque volutpat malesuada velit. ', 4, 8, 80, 300.00, 1, 1, 15.00, 1, '0000-00-00 00:00:00', '2019-11-26 01:27:14'),
(3, 'Maruti Zen', NULL, 0, 'Lorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsum', 5, 8, 80, 300.00, 1, 300, 500.00, 0, '0000-00-00 00:00:00', '2019-12-11 18:34:14'),
(4, 'Tavera', NULL, 0, 'Lorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsumLorem ipsum', 6, 8, 80, 300.00, 1, 300, 500.00, 0, '0000-00-00 00:00:00', '2019-12-04 17:43:15'),
(5, 'Inova', NULL, 2, 'vtretrvet', 5, 8, 80, 300.00, 1, 1, 20.00, 0, '0000-00-00 00:00:00', '2019-11-26 02:31:53'),
(6, 'Ertiga', NULL, 0, 'asdsad sad asd asd asd as dsad asd as dasdas d sd sdfsdfsd', 6, 8, 80, 300.00, 1, 300, 500.00, 1, '2019-10-15 13:48:22', '2019-12-11 18:35:15'),
(7, 'ETOS', NULL, 6, 'testing', 5, 8, 80, 300.00, 1, 300, 600.00, 1, '2019-10-16 13:27:05', '2019-10-18 19:29:43');
-- --------------------------------------------------------
--
-- Table structure for table `bharat_vehicle_image`
--
CREATE TABLE `bharat_vehicle_image` (
`id` int(11) NOT NULL,
`vehicle_id` int(11) NOT NULL,
`image` int(11) NOT NULL,
`created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bharat_vehicle_image`
--
INSERT INTO `bharat_vehicle_image` (`id`, `vehicle_id`, `image`, `created_date`) VALUES
(7, 2, 12, '2019-12-11 18:33:30'),
(8, 2, 13, '2019-12-11 18:33:30'),
(9, 4, 14, '2019-12-11 18:33:58'),
(10, 3, 15, '2019-12-11 18:34:14'),
(11, 5, 16, '2019-12-11 18:34:34'),
(12, 5, 17, '2019-12-11 18:34:34'),
(13, 7, 18, '2019-12-11 18:34:58'),
(15, 1, 20, '2019-12-11 18:35:48'),
(16, 6, 21, '2019-12-11 18:36:51');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `bharat_admin`
--
ALTER TABLE `bharat_admin`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_attachment`
--
ALTER TABLE `bharat_attachment`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_booking`
--
ALTER TABLE `bharat_booking`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_booking_detail`
--
ALTER TABLE `bharat_booking_detail`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_brands`
--
ALTER TABLE `bharat_brands`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_category`
--
ALTER TABLE `bharat_category`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_cities`
--
ALTER TABLE `bharat_cities`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_inquiry`
--
ALTER TABLE `bharat_inquiry`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_route`
--
ALTER TABLE `bharat_route`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_sitesettings`
--
ALTER TABLE `bharat_sitesettings`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_state`
--
ALTER TABLE `bharat_state`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_user`
--
ALTER TABLE `bharat_user`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_vehicle`
--
ALTER TABLE `bharat_vehicle`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bharat_vehicle_image`
--
ALTER TABLE `bharat_vehicle_image`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `bharat_admin`
--
ALTER TABLE `bharat_admin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `bharat_attachment`
--
ALTER TABLE `bharat_attachment`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `bharat_booking`
--
ALTER TABLE `bharat_booking`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;
--
-- AUTO_INCREMENT for table `bharat_booking_detail`
--
ALTER TABLE `bharat_booking_detail`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;
--
-- AUTO_INCREMENT for table `bharat_brands`
--
ALTER TABLE `bharat_brands`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `bharat_category`
--
ALTER TABLE `bharat_category`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `bharat_cities`
--
ALTER TABLE `bharat_cities`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=756;
--
-- AUTO_INCREMENT for table `bharat_inquiry`
--
ALTER TABLE `bharat_inquiry`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `bharat_route`
--
ALTER TABLE `bharat_route`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `bharat_state`
--
ALTER TABLE `bharat_state`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;
--
-- AUTO_INCREMENT for table `bharat_user`
--
ALTER TABLE `bharat_user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `bharat_vehicle`
--
ALTER TABLE `bharat_vehicle`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `bharat_vehicle_image`
--
ALTER TABLE `bharat_vehicle_image`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| 40.348579 | 885 | 0.623242 |
42b653d5fbc16264793ec9b33f8aee8d742b24e2 | 4,609 | kt | Kotlin | web-app/src/acceptanceTest/kotlin/com/bphenriques/employeeshifts/shift/CRUDShiftsMultipleEmployeesTests.kt | bphenriques-lab/employee-shift-api-challenge | 2e6eb52e500d1ba855418963a5dc12ae97cd8aa7 | [
"MIT"
] | null | null | null | web-app/src/acceptanceTest/kotlin/com/bphenriques/employeeshifts/shift/CRUDShiftsMultipleEmployeesTests.kt | bphenriques-lab/employee-shift-api-challenge | 2e6eb52e500d1ba855418963a5dc12ae97cd8aa7 | [
"MIT"
] | null | null | null | web-app/src/acceptanceTest/kotlin/com/bphenriques/employeeshifts/shift/CRUDShiftsMultipleEmployeesTests.kt | bphenriques-lab/employee-shift-api-challenge | 2e6eb52e500d1ba855418963a5dc12ae97cd8aa7 | [
"MIT"
] | null | null | null | package com.bphenriques.employeeshifts.shift
import com.bphenriques.employeeshifts.domain.employee.model.Employee
import com.bphenriques.employeeshifts.testhelper.EmployeeTestClient
import com.bphenriques.employeeshifts.testhelper.SQLUtil
import com.bphenriques.employeeshifts.testhelper.ShiftTestClient
import com.bphenriques.employeeshifts.testhelper.truncatedToMinute
import com.bphenriques.test.Generator.newEmployee
import com.bphenriques.test.Generator.newShift
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.http.MediaType
import org.springframework.jdbc.core.JdbcTemplate
import org.springframework.test.annotation.DirtiesContext
import java.time.Instant
import java.time.temporal.ChronoUnit
@SpringBootTest
@AutoConfigureWebTestClient
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
class CRUDShiftsMultipleEmployeesTests {
@Autowired
private lateinit var employeeTestClient: EmployeeTestClient
@Autowired
private lateinit var shiftTestClient: ShiftTestClient
@Autowired
private lateinit var jdbcTemplate: JdbcTemplate
private val now = Instant.parse("2020-01-01T12:00:00Z")
@BeforeEach
fun setup() {
SQLUtil.clearAll(jdbcTemplate)
}
@Test
fun `Create, read, update, and delete shifts for multiple employees`() {
val employee1 = createEmployee(newEmployee())
val employee2 = createEmployee(newEmployee())
val employee3 = createEmployee(newEmployee())
val shift1Employee1 = newShift().copy(employeeId = employee1.id, startShift = now, endShift = now.plus(1, ChronoUnit.MINUTES))
val shift2Employee1 = newShift().copy(employeeId = employee1.id, startShift = now.plus(1, ChronoUnit.MINUTES), endShift = now.plus(2, ChronoUnit.MINUTES))
val shift1Employee2 = newShift().copy(employeeId = employee2.id, startShift = now, endShift = now.plus(1, ChronoUnit.MINUTES))
val shift1Employee3 = newShift().copy(employeeId = employee3.id, startShift = now, endShift = now.plus(1, ChronoUnit.MINUTES))
val allShifts = listOf(shift1Employee1, shift2Employee1, shift1Employee2, shift1Employee3)
// Create
val createdShifts = shiftTestClient.upsertShifts(allShifts).run {
expectStatus().isOk
expectHeader().contentType(MediaType.APPLICATION_JSON)
shiftTestClient.extractShifts(this)
}
Assertions.assertEquals(allShifts.truncatedToMinute(), createdShifts.map { it.copy(id = 0) })
// Find
val getByEmployee1And2 = shiftTestClient.findShiftsByEmployeeId(listOf(employee1.id, employee2.id)).run {
expectStatus().isOk
expectHeader().contentType(MediaType.APPLICATION_JSON)
}
Assertions.assertEquals(
createdShifts.filter { it.employeeId == employee1.id || it.employeeId == employee2.id }.toSet(),
shiftTestClient.extractShifts(getByEmployee1And2).toSet()
)
// Update
val moveAllShiftsUp = createdShifts.map {
it.copy(
startShift = it.startShift.plus(1, ChronoUnit.HOURS),
endShift = it.endShift.plus(1, ChronoUnit.HOURS)
)
}
shiftTestClient.upsertShifts(moveAllShiftsUp).run {
expectStatus().isOk
expectHeader().contentType(MediaType.APPLICATION_JSON)
}
val updatedShifts = shiftTestClient.findShiftsByEmployeeId(moveAllShiftsUp.map { it.employeeId }).run {
shiftTestClient.extractShifts(this)
}
Assertions.assertEquals(
moveAllShiftsUp.toSet(),
updatedShifts.toSet()
)
// Delete
shiftTestClient.deleteShiftsId(updatedShifts.filter { it.employeeId == employee1.id }.map { it.id }).run {
expectStatus().isOk
}
Assertions.assertEquals(
updatedShifts.filterNot { it.employeeId == employee1.id },
shiftTestClient.extractShifts(shiftTestClient.findShiftsByEmployeeId(listOf(employee1.id, employee2.id, employee3.id)))
)
}
private fun createEmployee(employee: Employee): Employee =
employeeTestClient.createEmployee(employee).run {
expectStatus().isCreated
employeeTestClient.extractEmployee(this)
}
}
| 43.074766 | 162 | 0.717292 |
e7754a9d2c331c149e0407b2018953cc8e3344ef | 1,025 | js | JavaScript | fileSystem/school-projects/development/jqueryfordesignerscas213/cas213week8/js/assign8.1.js | nomad-mystic/nomadmystic | 7814c1f7c1a45464df5896d03dd3c3bed0f763d0 | [
"MIT"
] | 1 | 2016-06-15T08:36:56.000Z | 2016-06-15T08:36:56.000Z | fileSystem/school-projects/development/jqueryfordesignerscas213/cas213week8/js/assign8.1.js | nomad-mystic/nomadmystic | 7814c1f7c1a45464df5896d03dd3c3bed0f763d0 | [
"MIT"
] | 1 | 2016-06-08T13:05:41.000Z | 2016-06-08T13:06:07.000Z | fileSystem/school-projects/development/jqueryfordesignerscas213/cas213week8/js/assign8.1.js | nomad-mystic/nomadmystic | 7814c1f7c1a45464df5896d03dd3c3bed0f763d0 | [
"MIT"
] | null | null | null | /*
file = assign8.1.js
programmer = keith Murphy
date = 11-13-2014
*/
$(document).ready(function() {
var loadingImage = $('<img src="images/ajax-loader.gif">');
$('#jaxed-nav a').each(function(){
$(this).attr('href', '#' + $(this).attr('href'));
});// end each
$(window).bind('hashchange', function(e) {
var url = e.fragment;
setTimeout(function(){
$('#hole').load(url + ' #hole-fill');
}, 1000); // added by RON
$('#jaxed-nav li.current').removeClass('current');
if (url) {
$('#hole').append('<p id="loading"></p>');
$('#loading').append(loadingImage);
$('#jaxed-nav a[href="#' + url + '"]').parents('li').addClass('current');
$('#hole-fill').fadeOut('fast', function(){
$('#loading').show();
});
} else {
$('#jaxed-nav li:first-child').addClass('current');
}
});//end hashchange
$(window).trigger('hashchange');
});//end ready | 27.702703 | 85 | 0.489756 |
fc589167ad589aedef4289357f832421e432d6d7 | 27,199 | css | CSS | css/style.css | justaniewska/Recreational-Kaprekar-iteration | d72019f40a485a8df04a8e8f5c498625a9c5d1e4 | [
"Unlicense"
] | null | null | null | css/style.css | justaniewska/Recreational-Kaprekar-iteration | d72019f40a485a8df04a8e8f5c498625a9c5d1e4 | [
"Unlicense"
] | null | null | null | css/style.css | justaniewska/Recreational-Kaprekar-iteration | d72019f40a485a8df04a8e8f5c498625a9c5d1e4 | [
"Unlicense"
] | null | null | null | @font-face {
font-family: 'primeregular';
src: url("prime_regular-webfont.woff2") format("woff2"), url("prime_regular-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
@font-face {
font-family: 'abeezeeregular';
src: url("abeezee-regular-webfont.woff2") format("woff2"), url("abeezee-regular-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on July 4, 2017 */
@font-face {
font-family: 'work_sansbold';
src: url("worksans-bold-webfont.woff2") format("woff2"), url("worksans-bold-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
@font-face {
font-family: 'work_sansextrabold';
src: url("worksans-extrabold-webfont.woff2") format("woff2"), url("worksans-extrabold-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
@font-face {
font-family: 'work_sansextralight';
src: url("worksans-extralight-webfont.woff2") format("woff2"), url("worksans-extralight-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
@font-face {
font-family: 'work_sanslight';
src: url("worksans-light-webfont.woff2") format("woff2"), url("worksans-light-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
@font-face {
font-family: 'work_sansregular';
src: url("worksans-regular-webfont.woff2") format("woff2"), url("worksans-regular-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
@font-face {
font-family: 'work_sanssemibold';
src: url("worksans-semibold-webfont.woff2") format("woff2"), url("worksans-semibold-webfont.woff") format("woff");
font-weight: normal;
font-style: normal; }
@keyframes buttonHover {
0% {
background-color: #AAD922; }
100% {
background-color: #EAE8E5; } }
@keyframes numButtonHover {
0% {
background-color: rgba(63, 63, 63, 0.5); }
100% {
background-color: #EAE8E5; } }
/* line 5, scss/style.scss */
* {
box-sizing: border-box;
margin: 0;
padding: 0; }
/* line 11, scss/style.scss */
body {
font-family: "work_sansregular";
font-size: 100%;
color: #0F0F0F;
padding-top: 1vh; }
/* line 18, scss/style.scss */
.shadow {
width: 95vw;
margin: 0 auto;
box-shadow: 0.1vw 0.1vw 0.5vw rgba(63, 63, 63, 0.4); }
@media (min-width: 768px) and (max-width: 1023px) {
/* line 18, scss/style.scss */
.shadow {
width: 80vw; } }
@media (min-width: 1024px) {
/* line 18, scss/style.scss */
.shadow {
width: 50vw; } }
/* line 30, scss/style.scss */
header {
height: 10vh;
display: flex;
justify-content: space-between;
padding-left: 5%;
padding-top: 5%;
padding-right: 5%; }
/* line 37, scss/style.scss */
header h1 {
font-family: "work_sansextrabold";
font-size: 1.2em;
text-transform: uppercase;
flex-grow: 2; }
@media (min-width: 768px) and (max-width: 1023px) {
/* line 37, scss/style.scss */
header h1 {
font-size: 1.75em; } }
@media (min-width: 1024px) {
/* line 37, scss/style.scss */
header h1 {
font-size: 2em; } }
/* line 49, scss/style.scss */
header i.fa {
font-size: 1.5em; }
@media (min-width: 768px) and (max-width: 1023px) {
/* line 49, scss/style.scss */
header i.fa {
font-size: 2em; } }
@media (min-width: 1024px) {
/* line 49, scss/style.scss */
header i.fa {
font-size: 2.5em; } }
/* line 60, scss/style.scss */
.container {
width: 100%;
background-color: #EAE8E5; }
/* line 65, scss/style.scss */
.input {
height: 50vh; }
/* line 69, scss/style.scss */
.output {
height: 30vh;
background-color: #F6F6F6;
border-left: 0.1vw solid #EAE8E5;
border-right: 0.1vw solid #EAE8E5;
position: relative;
display: flex;
justify-content: center; }
/* line 77, scss/style.scss */
.output .dropdownInfo {
width: 95%;
background-color: #F6F6F6;
box-shadow: 0.1vw 0.1vw 0.5vw #3F3F3F;
position: absolute;
top: -3vh;
z-index: 1;
padding: 1.1vh 1.4vw 1.1vh 1.4vw; }
@media (min-width: 768px) and (max-width: 1023px) {
/* line 77, scss/style.scss */
.output .dropdownInfo {
width: 80%; } }
@media (min-width: 1024px) {
/* line 77, scss/style.scss */
.output .dropdownInfo {
width: 80%; } }
/* line 91, scss/style.scss */
.output .dropdownInfo p {
font-family: "work_sansextralight";
font-size: 1.1em;
line-height: 1.2em;
text-align: justify;
padding-bottom: 2vh; }
@media (min-width: 768px) and (max-width: 1023px) {
/* line 91, scss/style.scss */
.output .dropdownInfo p {
font-size: 1.3em;
line-height: 1.4em; } }
@media (min-width: 1024px) {
/* line 91, scss/style.scss */
.output .dropdownInfo p {
font-size: 1.3em;
line-height: 1.5em; } }
/* line 106, scss/style.scss */
.output .dropdownInfo p.quotationSource {
border-top: 1px solid #3F3F3F;
font-size: 1em;
text-align: left;
padding-top: 2vh;
padding-bottom: 0; }
/* line 112, scss/style.scss */
.output .dropdownInfo p.quotationSource a {
text-decoration: none;
font-family: "work_sansregular";
color: #0F0F0F; }
/* line 119, scss/style.scss */
.output .numberOutput {
width: 100%;
text-align: right;
font-size: 5em;
position: absolute;
bottom: 1.5vh;
right: 1vw; }
/* line 127, scss/style.scss */
.output .invisible {
display: none; }
/* line 130, scss/style.scss */
.output .resultDisplay {
position: absolute;
bottom: 1.5vh;
padding: 0 2vw;
text-align: right;
font-size: 1.8em; }
@media (min-width: 768px) and (max-width: 1023px) {
/* line 130, scss/style.scss */
.output .resultDisplay {
font-size: 2.5em; } }
@media (min-width: 1024px) {
/* line 130, scss/style.scss */
.output .resultDisplay {
font-size: 2.5em; } }
/* line 143, scss/style.scss */
.output ul {
list-style-type: none; }
/* line 148, scss/style.scss */
.row {
width: 100%;
height: 25%;
display: flex;
justify-content: space-between;
align-items: center; }
/* line 154, scss/style.scss */
.row .numButton, .row .button {
height: 100%;
display: flex;
align-items: center;
justify-content: center; }
/* line 160, scss/style.scss */
.row .numButton {
width: 33.3333%; }
/* line 162, scss/style.scss */
.row .numButton .digit {
font-family: "work_sanssemibold";
font-size: 2em; }
/* line 166, scss/style.scss */
.row .numButton:hover {
animation-name: numButtonHover;
animation-duration: 0.5s;
animation-timing-function: ease-in;
animation-fill-mode: forwards;
animation-direction: normal; }
@media (min-width: 1024px) {
/* line 166, scss/style.scss */
.row .numButton:hover {
animation-name: numButtonHover;
animation-duration: 0.5s;
animation-timing-function: ease-in;
animation-fill-mode: forwards;
animation-direction: reverse; } }
/* line 173, scss/style.scss */
.row .button {
width: 33.3333%; }
/* line 175, scss/style.scss */
.row .button:hover {
animation-name: buttonHover;
animation-duration: 0.5s;
animation-timing-function: ease-in;
animation-fill-mode: forwards;
animation-direction: normal; }
@media (min-width: 1024px) {
/* line 175, scss/style.scss */
.row .button:hover {
animation-name: buttonHover;
animation-duration: 0.5s;
animation-timing-function: ease-in;
animation-fill-mode: forwards;
animation-direction: reverse; } }
/* line 181, scss/style.scss */
.row .button p {
font-size: 0.9em;
text-transform: uppercase;
font-weight: bold;
color: #5122d9; }
@media (min-width: 1024px) {
/* line 181, scss/style.scss */
.row .button p {
font-size: 1.1em; } }
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUuY3NzIiwic291cmNlcyI6WyJzdHlsZS5zY3NzIiwiX2ZvbnRzLnNjc3MiLCJfdmFyaWFibGVzLnNjc3MiLCJfYW5pbWF0aW9ucy5zY3NzIl0sInNvdXJjZXNDb250ZW50IjpbIkBpbXBvcnQgJ2ZvbnRzJztcclxuQGltcG9ydCAndmFyaWFibGVzJztcclxuQGltcG9ydCAnYW5pbWF0aW9ucyc7XHJcblxyXG4qIHtcclxuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XHJcbiAgICBtYXJnaW46IDA7XHJcbiAgICBwYWRkaW5nOiAwO1xyXG59XHJcblxyXG5ib2R5IHtcclxuICAgIGZvbnQtZmFtaWx5OiAkcHJpbWFyeUZvbnQ7XHJcbiAgICBmb250LXNpemU6IDEwMCU7XHJcbiAgICBjb2xvcjogJGZvbnRDb2xvcjtcclxuICAgIHBhZGRpbmctdG9wOiAxdmg7XHJcbn1cclxuXHJcbi5zaGFkb3cge1xyXG4gICAgd2lkdGg6IDk1dnc7XHJcbiAgICBtYXJnaW46IDAgYXV0bztcclxuICAgIGJveC1zaGFkb3c6IDAuMXZ3IDAuMXZ3IDAuNXZ3IHRyYW5zcGFyZW50aXplKCRzZWNvbmRhcnlDb2xvciwgMC42KTtcclxuICAgIEBtZWRpYSAjeyR0YWJsZXR9IHtcclxuICAgICAgICB3aWR0aDogODB2dztcclxuICAgIH1cclxuICAgIEBtZWRpYSAjeyRkZXNrdG9wfSB7XHJcbiAgICAgICAgd2lkdGg6IDUwdnc7XHJcbiAgICB9XHJcbn1cclxuXHJcbmhlYWRlciB7XHJcbiAgICBoZWlnaHQ6IDEwdmg7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xyXG4gICAgcGFkZGluZy1sZWZ0OiA1JTtcclxuICAgIHBhZGRpbmctdG9wOiA1JTtcclxuICAgIHBhZGRpbmctcmlnaHQ6IDUlO1xyXG4gICAgaDEge1xyXG4gICAgICAgIGZvbnQtZmFtaWx5OiAkaGVhZGVyRm9udDtcclxuICAgICAgICBmb250LXNpemU6IDEuMmVtO1xyXG4gICAgICAgIHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XHJcbiAgICAgICAgZmxleC1ncm93OiAyO1xyXG4gICAgICAgIEBtZWRpYSAjeyR0YWJsZXR9IHtcclxuICAgICAgICAgICAgZm9udC1zaXplOiAxLjc1ZW07XHJcbiAgICAgICAgfVxyXG4gICAgICAgIEBtZWRpYSAjeyRkZXNrdG9wfSB7XHJcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMmVtO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGkuZmEge1xyXG4gICAgICAgIGZvbnQtc2l6ZTogMS41ZW07XHJcbiAgICAgICAgQG1lZGlhICN7JHRhYmxldH0ge1xyXG4gICAgICAgICAgICBmb250LXNpemU6IDJlbTtcclxuICAgICAgICB9XHJcbiAgICAgICAgQG1lZGlhICN7JGRlc2t0b3B9IHtcclxuICAgICAgICAgICAgZm9udC1zaXplOiAyLjVlbTtcclxuICAgICAgICB9XHJcbiAgICB9IFxyXG59XHJcblxyXG4uY29udGFpbmVyIHtcclxuICAgIHdpZHRoOiAxMDAlO1xyXG4gICAgYmFja2dyb3VuZC1jb2xvcjogJGJhc2VDb2xvcjtcclxufVxyXG5cclxuLmlucHV0IHtcclxuICAgIGhlaWdodDogNTB2aDtcclxufVxyXG5cclxuLm91dHB1dCB7XHJcbiAgICBoZWlnaHQ6IDMwdmg7XHJcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAkc3dhcENvbG9yO1xyXG4gICAgYm9yZGVyLWxlZnQ6IC4xdncgc29saWQgJGJhc2VDb2xvcjtcclxuICAgIGJvcmRlci1yaWdodDogLjF2dyBzb2xpZCAkYmFzZUNvbG9yO1xyXG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xyXG4gICAgLmRyb3Bkb3duSW5mbyB7XHJcbiAgICAgICAgd2lkdGg6IDk1JTtcclxuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAkc3dhcENvbG9yO1xyXG4gICAgICAgIGJveC1zaGFkb3c6IDAuMXZ3IDAuMXZ3IDAuNXZ3ICRzZWNvbmRhcnlDb2xvcjtcclxuICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICAgICAgdG9wOiAtM3ZoO1xyXG4gICAgICAgIHotaW5kZXg6IDE7XHJcbiAgICAgICAgcGFkZGluZzogMS4xdmggMS40dncgMS4xdmggMS40dnc7XHJcbiAgICAgICAgQG1lZGlhICN7JHRhYmxldH0ge1xyXG4gICAgICAgICAgICB3aWR0aDogODAlO1xyXG4gICAgICAgIH1cclxuICAgICAgICBAbWVkaWEgI3skZGVza3RvcH0ge1xyXG4gICAgICAgICAgICB3aWR0aDogODAlO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwIHtcclxuICAgICAgICAgICAgZm9udC1mYW1pbHk6ICRpbmZvRm9udDtcclxuICAgICAgICAgICAgZm9udC1zaXplOiAxLjFlbTtcclxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDEuMmVtO1xyXG4gICAgICAgICAgICB0ZXh0LWFsaWduOiBqdXN0aWZ5O1xyXG4gICAgICAgICAgICBwYWRkaW5nLWJvdHRvbTogMnZoO1xyXG4gICAgICAgICAgICBAbWVkaWEgI3skdGFibGV0fSB7XHJcbiAgICAgICAgICAgICAgICBmb250LXNpemU6IDEuM2VtO1xyXG4gICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNGVtO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIEBtZWRpYSAjeyRkZXNrdG9wfSB7XHJcbiAgICAgICAgICAgICAgICBmb250LXNpemU6IDEuM2VtO1xyXG4gICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNWVtO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHAucXVvdGF0aW9uU291cmNlIHtcclxuICAgICAgICAgICAgYm9yZGVyLXRvcDogMXB4IHNvbGlkICRzZWNvbmRhcnlDb2xvcjtcclxuICAgICAgICAgICAgZm9udC1zaXplOiAxZW07XHJcbiAgICAgICAgICAgIHRleHQtYWxpZ246IGxlZnQ7XHJcbiAgICAgICAgICAgIHBhZGRpbmctdG9wOiAydmg7XHJcbiAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAwO1xyXG4gICAgICAgICAgICBhIHtcclxuICAgICAgICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcclxuICAgICAgICAgICAgICAgIGZvbnQtZmFtaWx5OiAkcHJpbWFyeUZvbnQ7XHJcbiAgICAgICAgICAgICAgICBjb2xvcjogJGZvbnRDb2xvcjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIC5udW1iZXJPdXRwdXQge1xyXG4gICAgICAgIHdpZHRoOiAxMDAlO1xyXG4gICAgICAgIHRleHQtYWxpZ246IHJpZ2h0O1xyXG4gICAgICAgIGZvbnQtc2l6ZTogNWVtO1xyXG4gICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgICAgICBib3R0b206IDEuNXZoO1xyXG4gICAgICAgIHJpZ2h0OiAxdnc7XHJcbiAgICB9XHJcbiAgICAuaW52aXNpYmxlIHtcclxuICAgICAgICBkaXNwbGF5OiBub25lO1xyXG4gICAgfVxyXG4gICAgLnJlc3VsdERpc3BsYXkge1xyXG4gICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgICAgICBib3R0b206IDEuNXZoO1xyXG4gICAgICAgIHBhZGRpbmc6IDAgMnZ3O1xyXG4gICAgICAgIHRleHQtYWxpZ246IHJpZ2h0O1xyXG4gICAgICAgIGZvbnQtc2l6ZTogMS44ZW07XHJcbiAgICAgICAgQG1lZGlhICN7JHRhYmxldH0ge1xyXG4gICAgICAgICAgICBmb250LXNpemU6IDIuNWVtO1xyXG4gICAgICAgIH1cclxuICAgICAgICBAbWVkaWEgI3skZGVza3RvcH0ge1xyXG4gICAgICAgICAgICBmb250LXNpemU6IDIuNWVtO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHVsIHtcclxuICAgICAgICBsaXN0LXN0eWxlLXR5cGU6IG5vbmU7XHJcbiAgICB9XHJcbn1cclxuXHJcbi5yb3cge1xyXG4gICAgd2lkdGg6IDEwMCU7XHJcbiAgICBoZWlnaHQ6IDI1JTtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XHJcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xyXG4gICAgLm51bUJ1dHRvbiwgLmJ1dHRvbiB7XHJcbiAgICAgICAgaGVpZ2h0OiAxMDAlO1xyXG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcclxuICAgIH1cclxuICAgIC5udW1CdXR0b24ge1xyXG4gICAgICAgIHdpZHRoOiAzMy4zMzMzJTtcclxuICAgICAgICAuZGlnaXQge1xyXG4gICAgICAgICAgICBmb250LWZhbWlseTogJGRpZ2l0Rm9udDtcclxuICAgICAgICAgICAgZm9udC1zaXplOiAyZW07XHJcbiAgICAgICAgfVxyXG4gICAgICAgICY6aG92ZXIge1xyXG4gICAgICAgICAgICBAaW5jbHVkZSBob3ZlckFuaW1hdGlvbihudW1CdXR0b25Ib3Zlciwgbm9ybWFsKTtcclxuICAgICAgICAgICAgQG1lZGlhICN7JGRlc2t0b3B9IHtcclxuICAgICAgICAgICAgICAgIEBpbmNsdWRlIGhvdmVyQW5pbWF0aW9uKG51bUJ1dHRvbkhvdmVyLCByZXZlcnNlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIC5idXR0b24ge1xyXG4gICAgICAgIHdpZHRoOiAzMy4zMzMzJTtcclxuICAgICAgICAmOmhvdmVyIHtcclxuICAgICAgICAgICAgQGluY2x1ZGUgaG92ZXJBbmltYXRpb24oYnV0dG9uSG92ZXIsIG5vcm1hbCk7XHJcbiAgICAgICAgICAgIEBtZWRpYSAjeyRkZXNrdG9wfSB7XHJcbiAgICAgICAgICAgICAgICBAaW5jbHVkZSBob3ZlckFuaW1hdGlvbihidXR0b25Ib3ZlciwgcmV2ZXJzZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcCB7XHJcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMC45ZW07XHJcbiAgICAgICAgICAgIHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XHJcbiAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiBib2xkO1xyXG4gICAgICAgICAgICBjb2xvcjogY29tcGxlbWVudCgkYWNjZW50Q29sb3IpO1xyXG4gICAgICAgICAgICBAbWVkaWEgI3skZGVza3RvcH0ge1xyXG4gICAgICAgICAgICAgICAgZm9udC1zaXplOiAxLjFlbTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG4iLCJAZm9udC1mYWNlIHtcclxuICAgIGZvbnQtZmFtaWx5OiAncHJpbWVyZWd1bGFyJztcclxuICAgIHNyYzogdXJsKCdwcmltZV9yZWd1bGFyLXdlYmZvbnQud29mZjInKSBmb3JtYXQoJ3dvZmYyJyksXHJcbiAgICAgICAgdXJsKCdwcmltZV9yZWd1bGFyLXdlYmZvbnQud29mZicpIGZvcm1hdCgnd29mZicpO1xyXG4gICAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcclxuICAgIGZvbnQtc3R5bGU6IG5vcm1hbDtcclxufVxyXG5cclxuQGZvbnQtZmFjZSB7XHJcbiAgICBmb250LWZhbWlseTogJ2FiZWV6ZWVyZWd1bGFyJztcclxuICAgIHNyYzogdXJsKCdhYmVlemVlLXJlZ3VsYXItd2ViZm9udC53b2ZmMicpIGZvcm1hdCgnd29mZjInKSxcclxuICAgICAgICAgdXJsKCdhYmVlemVlLXJlZ3VsYXItd2ViZm9udC53b2ZmJykgZm9ybWF0KCd3b2ZmJyk7XHJcbiAgICBmb250LXdlaWdodDogbm9ybWFsO1xyXG4gICAgZm9udC1zdHlsZTogbm9ybWFsO1xyXG5cclxufVxyXG5cclxuLyohIEdlbmVyYXRlZCBieSBGb250IFNxdWlycmVsIChodHRwczovL3d3dy5mb250c3F1aXJyZWwuY29tKSBvbiBKdWx5IDQsIDIwMTcgKi9cclxuXHJcblxyXG5cclxuQGZvbnQtZmFjZSB7XHJcbiAgICBmb250LWZhbWlseTogJ3dvcmtfc2Fuc2JvbGQnO1xyXG4gICAgc3JjOiB1cmwoJ3dvcmtzYW5zLWJvbGQtd2ViZm9udC53b2ZmMicpIGZvcm1hdCgnd29mZjInKSxcclxuICAgICAgICAgdXJsKCd3b3Jrc2Fucy1ib2xkLXdlYmZvbnQud29mZicpIGZvcm1hdCgnd29mZicpO1xyXG4gICAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcclxuICAgIGZvbnQtc3R5bGU6IG5vcm1hbDtcclxuXHJcbn1cclxuXHJcblxyXG5cclxuXHJcbkBmb250LWZhY2Uge1xyXG4gICAgZm9udC1mYW1pbHk6ICd3b3JrX3NhbnNleHRyYWJvbGQnO1xyXG4gICAgc3JjOiB1cmwoJ3dvcmtzYW5zLWV4dHJhYm9sZC13ZWJmb250LndvZmYyJykgZm9ybWF0KCd3b2ZmMicpLFxyXG4gICAgICAgICB1cmwoJ3dvcmtzYW5zLWV4dHJhYm9sZC13ZWJmb250LndvZmYnKSBmb3JtYXQoJ3dvZmYnKTtcclxuICAgIGZvbnQtd2VpZ2h0OiBub3JtYWw7XHJcbiAgICBmb250LXN0eWxlOiBub3JtYWw7XHJcblxyXG59XHJcblxyXG5cclxuXHJcblxyXG5AZm9udC1mYWNlIHtcclxuICAgIGZvbnQtZmFtaWx5OiAnd29ya19zYW5zZXh0cmFsaWdodCc7XHJcbiAgICBzcmM6IHVybCgnd29ya3NhbnMtZXh0cmFsaWdodC13ZWJmb250LndvZmYyJykgZm9ybWF0KCd3b2ZmMicpLFxyXG4gICAgICAgICB1cmwoJ3dvcmtzYW5zLWV4dHJhbGlnaHQtd2ViZm9udC53b2ZmJykgZm9ybWF0KCd3b2ZmJyk7XHJcbiAgICBmb250LXdlaWdodDogbm9ybWFsO1xyXG4gICAgZm9udC1zdHlsZTogbm9ybWFsO1xyXG5cclxufVxyXG5cclxuXHJcblxyXG5cclxuQGZvbnQtZmFjZSB7XHJcbiAgICBmb250LWZhbWlseTogJ3dvcmtfc2Fuc2xpZ2h0JztcclxuICAgIHNyYzogdXJsKCd3b3Jrc2Fucy1saWdodC13ZWJmb250LndvZmYyJykgZm9ybWF0KCd3b2ZmMicpLFxyXG4gICAgICAgICB1cmwoJ3dvcmtzYW5zLWxpZ2h0LXdlYmZvbnQud29mZicpIGZvcm1hdCgnd29mZicpO1xyXG4gICAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcclxuICAgIGZvbnQtc3R5bGU6IG5vcm1hbDtcclxuXHJcbn1cclxuXHJcblxyXG5cclxuXHJcbkBmb250LWZhY2Uge1xyXG4gICAgZm9udC1mYW1pbHk6ICd3b3JrX3NhbnNyZWd1bGFyJztcclxuICAgIHNyYzogdXJsKCd3b3Jrc2Fucy1yZWd1bGFyLXdlYmZvbnQud29mZjInKSBmb3JtYXQoJ3dvZmYyJyksXHJcbiAgICAgICAgIHVybCgnd29ya3NhbnMtcmVndWxhci13ZWJmb250LndvZmYnKSBmb3JtYXQoJ3dvZmYnKTtcclxuICAgIGZvbnQtd2VpZ2h0OiBub3JtYWw7XHJcbiAgICBmb250LXN0eWxlOiBub3JtYWw7XHJcblxyXG59XHJcblxyXG5cclxuXHJcblxyXG5AZm9udC1mYWNlIHtcclxuICAgIGZvbnQtZmFtaWx5OiAnd29ya19zYW5zc2VtaWJvbGQnO1xyXG4gICAgc3JjOiB1cmwoJ3dvcmtzYW5zLXNlbWlib2xkLXdlYmZvbnQud29mZjInKSBmb3JtYXQoJ3dvZmYyJyksXHJcbiAgICAgICAgIHVybCgnd29ya3NhbnMtc2VtaWJvbGQtd2ViZm9udC53b2ZmJykgZm9ybWF0KCd3b2ZmJyk7XHJcbiAgICBmb250LXdlaWdodDogbm9ybWFsO1xyXG4gICAgZm9udC1zdHlsZTogbm9ybWFsO1xyXG5cclxufSIsIi8vIG1lZGlhXHJcbiR0YWJsZXQ6IFwiKG1pbi13aWR0aDogNzY4cHgpIGFuZCAobWF4LXdpZHRoOiAxMDIzcHgpXCI7XHJcbiRkZXNrdG9wOiBcIihtaW4td2lkdGg6IDEwMjRweClcIjtcclxuXHJcbi8vIGNvbG9yc1xyXG4kc2Vjb25kYXJ5Q29sb3I6ICMzRjNGM0Y7XHJcbiRzd2FwQ29sb3I6ICNGNkY2RjY7XHJcbiRiYXNlQ29sb3I6ICNFQUU4RTU7XHJcbiRhY2NlbnRDb2xvcjogI0FBRDkyMjtcclxuJGZvbnRDb2xvcjogIzBGMEYwRjtcclxuXHJcbi8vZm9udHNcclxuJHByaW1hcnlGb250OiAnd29ya19zYW5zcmVndWxhcic7XHJcbiRoZWFkZXJGb250OiAnd29ya19zYW5zZXh0cmFib2xkJztcclxuJGluZm9Gb250OiAnd29ya19zYW5zZXh0cmFsaWdodCc7XHJcbiRkaWdpdEZvbnQ6ICd3b3JrX3NhbnNzZW1pYm9sZCc7IiwiQGtleWZyYW1lcyBidXR0b25Ib3ZlciB7XHJcbiAgICAwJSB7XHJcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJGFjY2VudENvbG9yO1xyXG4gICAgfVxyXG4gICAgMTAwJSB7XHJcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJGJhc2VDb2xvcjtcclxuICAgIH1cclxuXHJcbn1cclxuXHJcbkBrZXlmcmFtZXMgbnVtQnV0dG9uSG92ZXIge1xyXG4gICAgMCUge1xyXG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50aXplKCRzZWNvbmRhcnlDb2xvciwgLjUpO1xyXG4gICAgfVxyXG4gICAgMTAwJSB7XHJcbiAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJGJhc2VDb2xvcjtcclxuICAgIH1cclxufVxyXG5cclxuQG1peGluIGhvdmVyQW5pbWF0aW9uKCRhbmltYXRpb25OYW1lLCAkZGlyZWN0aW9uKSB7XHJcbiAgICBhbmltYXRpb24tbmFtZTogJGFuaW1hdGlvbk5hbWU7XHJcbiAgICBhbmltYXRpb24tZHVyYXRpb246IDAuNXM7XHJcbiAgICBhbmltYXRpb24tdGltaW5nLWZ1bmN0aW9uOiBlYXNlLWluO1xyXG4gICAgYW5pbWF0aW9uLWZpbGwtbW9kZTogZm9yd2FyZHM7XHJcbiAgICBhbmltYXRpb24tZGlyZWN0aW9uOiAkZGlyZWN0aW9uO1xyXG59Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQ0FBLFVBQVU7RUFDTixXQUFXLEVBQUUsY0FBYztFQUMzQixHQUFHLEVBQUUsa0NBQWtDLENBQUMsZUFBZSxFQUNuRCxpQ0FBaUMsQ0FBQyxjQUFjO0VBQ3BELFdBQVcsRUFBRSxNQUFNO0VBQ25CLFVBQVUsRUFBRSxNQUFNOztBQUd0QixVQUFVO0VBQ04sV0FBVyxFQUFFLGdCQUFnQjtFQUM3QixHQUFHLEVBQUUsb0NBQW9DLENBQUMsZUFBZSxFQUNwRCxtQ0FBbUMsQ0FBQyxjQUFjO0VBQ3ZELFdBQVcsRUFBRSxNQUFNO0VBQ25CLFVBQVUsRUFBRSxNQUFNOztBQUl0QixnRkFBZ0Y7QUFJaEYsVUFBVTtFQUNOLFdBQVcsRUFBRSxlQUFlO0VBQzVCLEdBQUcsRUFBRSxrQ0FBa0MsQ0FBQyxlQUFlLEVBQ2xELGlDQUFpQyxDQUFDLGNBQWM7RUFDckQsV0FBVyxFQUFFLE1BQU07RUFDbkIsVUFBVSxFQUFFLE1BQU07O0FBT3RCLFVBQVU7RUFDTixXQUFXLEVBQUUsb0JBQW9CO0VBQ2pDLEdBQUcsRUFBRSx1Q0FBdUMsQ0FBQyxlQUFlLEVBQ3ZELHNDQUFzQyxDQUFDLGNBQWM7RUFDMUQsV0FBVyxFQUFFLE1BQU07RUFDbkIsVUFBVSxFQUFFLE1BQU07O0FBT3RCLFVBQVU7RUFDTixXQUFXLEVBQUUscUJBQXFCO0VBQ2xDLEdBQUcsRUFBRSx3Q0FBd0MsQ0FBQyxlQUFlLEVBQ3hELHVDQUF1QyxDQUFDLGNBQWM7RUFDM0QsV0FBVyxFQUFFLE1BQU07RUFDbkIsVUFBVSxFQUFFLE1BQU07O0FBT3RCLFVBQVU7RUFDTixXQUFXLEVBQUUsZ0JBQWdCO0VBQzdCLEdBQUcsRUFBRSxtQ0FBbUMsQ0FBQyxlQUFlLEVBQ25ELGtDQUFrQyxDQUFDLGNBQWM7RUFDdEQsV0FBVyxFQUFFLE1BQU07RUFDbkIsVUFBVSxFQUFFLE1BQU07O0FBT3RCLFVBQVU7RUFDTixXQUFXLEVBQUUsa0JBQWtCO0VBQy9CLEdBQUcsRUFBRSxxQ0FBcUMsQ0FBQyxlQUFlLEVBQ3JELG9DQUFvQyxDQUFDLGNBQWM7RUFDeEQsV0FBVyxFQUFFLE1BQU07RUFDbkIsVUFBVSxFQUFFLE1BQU07O0FBT3RCLFVBQVU7RUFDTixXQUFXLEVBQUUsbUJBQW1CO0VBQ2hDLEdBQUcsRUFBRSxzQ0FBc0MsQ0FBQyxlQUFlLEVBQ3RELHFDQUFxQyxDQUFDLGNBQWM7RUFDekQsV0FBVyxFQUFFLE1BQU07RUFDbkIsVUFBVSxFQUFFLE1BQU07O0FFdEZ0QixVQUFVLENBQVYsV0FBVTtFQUNOLEFBQUEsRUFBRTtJQUNFLGdCQUFnQixFRE1WLE9BQU87RUNKakIsQUFBQSxJQUFJO0lBQ0EsZ0JBQWdCLEVERVosT0FBTzs7QUNHbkIsVUFBVSxDQUFWLGNBQVU7RUFDTixBQUFBLEVBQUU7SUFDRSxnQkFBZ0IsRUFBRSxxQkFBbUM7RUFFekQsQUFBQSxJQUFJO0lBQ0EsZ0JBQWdCLEVEUlosT0FBTzs7O0FGSG5CLEFBQUEsQ0FBQyxDQUFDO0VBQ0UsVUFBVSxFQUFFLFVBQVU7RUFDdEIsTUFBTSxFQUFFLENBQUM7RUFDVCxPQUFPLEVBQUUsQ0FBQyxHQUNiOzs7QUFFRCxBQUFBLElBQUksQ0FBQztFQUNELFdBQVcsRUVDRCxrQkFBa0I7RUZBNUIsU0FBUyxFQUFFLElBQUk7RUFDZixLQUFLLEVFSkcsT0FBTztFRktmLFdBQVcsRUFBRSxHQUFHLEdBQ25COzs7QUFFRCxBQUFBLE9BQU8sQ0FBQztFQUNKLEtBQUssRUFBRSxJQUFJO0VBQ1gsTUFBTSxFQUFFLE1BQU07RUFDZCxVQUFVLEVBQUUsS0FBSyxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMscUJBQW9DLEdBT3JFO0VBTkcsTUFBTSxFQUFFLFNBQVMsRUFBRSxLQUFLLE9BQU8sU0FBUyxFQUFFLE1BQU07O0lBSnBELEFBQUEsT0FBTyxDQUFDO01BS0EsS0FBSyxFQUFFLElBQUksR0FLbEI7RUFIRyxNQUFNLEVBQUUsU0FBUyxFQUFFLE1BQU07O0lBUDdCLEFBQUEsT0FBTyxDQUFDO01BUUEsS0FBSyxFQUFFLElBQUksR0FFbEI7OztBQUVELEFBQUEsTUFBTSxDQUFDO0VBQ0gsTUFBTSxFQUFFLElBQUk7RUFDWixPQUFPLEVBQUUsSUFBSTtFQUNiLGVBQWUsRUFBRSxhQUFhO0VBQzlCLFlBQVksRUFBRSxFQUFFO0VBQ2hCLFdBQVcsRUFBRSxFQUFFO0VBQ2YsYUFBYSxFQUFFLEVBQUUsR0FzQnBCOztFQTVCRCxBQU9JLE1BUEUsQ0FPRixFQUFFLENBQUM7SUFDQyxXQUFXLEVFeEJOLG9CQUFvQjtJRnlCekIsU0FBUyxFQUFFLEtBQUs7SUFDaEIsY0FBYyxFQUFFLFNBQVM7SUFDekIsU0FBUyxFQUFFLENBQUMsR0FPZjtJQU5HLE1BQU0sRUFBRSxTQUFTLEVBQUUsS0FBSyxPQUFPLFNBQVMsRUFBRSxNQUFNOztNQVp4RCxBQU9JLE1BUEUsQ0FPRixFQUFFLENBQUM7UUFNSyxTQUFTLEVBQUUsTUFBTSxHQUt4QjtJQUhHLE1BQU0sRUFBRSxTQUFTLEVBQUUsTUFBTTs7TUFmakMsQUFPSSxNQVBFLENBT0YsRUFBRSxDQUFDO1FBU0ssU0FBUyxFQUFFLEdBQUcsR0FFckI7O0VBbEJMLEFBbUJJLE1BbkJFLENBbUJGLENBQUMsQUFBQSxHQUFHLENBQUM7SUFDRCxTQUFTLEVBQUUsS0FBSyxHQU9uQjtJQU5HLE1BQU0sRUFBRSxTQUFTLEVBQUUsS0FBSyxPQUFPLFNBQVMsRUFBRSxNQUFNOztNQXJCeEQsQUFtQkksTUFuQkUsQ0FtQkYsQ0FBQyxBQUFBLEdBQUcsQ0FBQztRQUdHLFNBQVMsRUFBRSxHQUFHLEdBS3JCO0lBSEcsTUFBTSxFQUFFLFNBQVMsRUFBRSxNQUFNOztNQXhCakMsQUFtQkksTUFuQkUsQ0FtQkYsQ0FBQyxBQUFBLEdBQUcsQ0FBQztRQU1HLFNBQVMsRUFBRSxLQUFLLEdBRXZCOzs7QUFHTCxBQUFBLFVBQVUsQ0FBQztFQUNQLEtBQUssRUFBRSxJQUFJO0VBQ1gsZ0JBQWdCLEVFdERSLE9BQU8sR0Z1RGxCOzs7QUFFRCxBQUFBLE1BQU0sQ0FBQztFQUNILE1BQU0sRUFBRSxJQUFJLEdBQ2Y7OztBQUVELEFBQUEsT0FBTyxDQUFDO0VBQ0osTUFBTSxFQUFFLElBQUk7RUFDWixnQkFBZ0IsRUVoRVIsT0FBTztFRmlFZixXQUFXLEVBQUUsS0FBSSxDQUFDLEtBQUssQ0VoRWYsT0FBTztFRmlFZixZQUFZLEVBQUUsS0FBSSxDQUFDLEtBQUssQ0VqRWhCLE9BQU87RUZrRWYsUUFBUSxFQUFFLFFBQVE7RUFDbEIsT0FBTyxFQUFFLElBQUk7RUFDYixlQUFlLEVBQUUsTUFBTSxHQXNFMUI7O0VBN0VELEFBUUksT0FSRyxDQVFILGFBQWEsQ0FBQztJQUNWLEtBQUssRUFBRSxHQUFHO0lBQ1YsZ0JBQWdCLEVFeEVaLE9BQU87SUZ5RVgsVUFBVSxFQUFFLEtBQUssQ0FBQyxLQUFLLENBQUMsS0FBSyxDRTFFcEIsT0FBTztJRjJFaEIsUUFBUSxFQUFFLFFBQVE7SUFDbEIsR0FBRyxFQUFFLElBQUk7SUFDVCxPQUFPLEVBQUUsQ0FBQztJQUNWLE9BQU8sRUFBRSx1QkFBdUIsR0FrQ25DO0lBakNHLE1BQU0sRUFBRSxTQUFTLEVBQUUsS0FBSyxPQUFPLFNBQVMsRUFBRSxNQUFNOztNQWhCeEQsQUFRSSxPQVJHLENBUUgsYUFBYSxDQUFDO1FBU04sS0FBSyxFQUFFLEdBQUcsR0FnQ2pCO0lBOUJHLE1BQU0sRUFBRSxTQUFTLEVBQUUsTUFBTTs7TUFuQmpDLEFBUUksT0FSRyxDQVFILGFBQWEsQ0FBQztRQVlOLEtBQUssRUFBRSxHQUFHLEdBNkJqQjs7SUFqREwsQUFzQlEsT0F0QkQsQ0FRSCxhQUFhLENBY1QsQ0FBQyxDQUFDO01BQ0UsV0FBVyxFRTdFWixxQkFBcUI7TUY4RXBCLFNBQVMsRUFBRSxLQUFLO01BQ2hCLFdBQVcsRUFBRSxLQUFLO01BQ2xCLFVBQVUsRUFBRSxPQUFPO01BQ25CLGNBQWMsRUFBRSxHQUFHLEdBU3RCO01BUkcsTUFBTSxFQUFFLFNBQVMsRUFBRSxLQUFLLE9BQU8sU0FBUyxFQUFFLE1BQU07O1FBNUI1RCxBQXNCUSxPQXRCRCxDQVFILGFBQWEsQ0FjVCxDQUFDLENBQUM7VUFPTSxTQUFTLEVBQUUsS0FBSztVQUNoQixXQUFXLEVBQUUsS0FBSyxHQU16QjtNQUpHLE1BQU0sRUFBRSxTQUFTLEVBQUUsTUFBTTs7UUFoQ3JDLEFBc0JRLE9BdEJELENBUUgsYUFBYSxDQWNULENBQUMsQ0FBQztVQVdNLFNBQVMsRUFBRSxLQUFLO1VBQ2hCLFdBQVcsRUFBRSxLQUFLLEdBRXpCOztJQXBDVCxBQXFDUSxPQXJDRCxDQVFILGFBQWEsQ0E2QlQsQ0FBQyxBQUFBLGdCQUFnQixDQUFDO01BQ2QsVUFBVSxFQUFFLEdBQUcsQ0FBQyxLQUFLLENFckdoQixPQUFPO01Gc0daLFNBQVMsRUFBRSxHQUFHO01BQ2QsVUFBVSxFQUFFLElBQUk7TUFDaEIsV0FBVyxFQUFFLEdBQUc7TUFDaEIsY0FBYyxFQUFFLENBQUMsR0FNcEI7O01BaERULEFBMkNZLE9BM0NMLENBUUgsYUFBYSxDQTZCVCxDQUFDLEFBQUEsZ0JBQWdCLENBTWIsQ0FBQyxDQUFDO1FBQ0UsZUFBZSxFQUFFLElBQUk7UUFDckIsV0FBVyxFRXJHYixrQkFBa0I7UUZzR2hCLEtBQUssRUV6R1QsT0FBTyxHRjBHTjs7RUEvQ2IsQUFrREksT0FsREcsQ0FrREgsYUFBYSxDQUFDO0lBQ1YsS0FBSyxFQUFFLElBQUk7SUFDWCxVQUFVLEVBQUUsS0FBSztJQUNqQixTQUFTLEVBQUUsR0FBRztJQUNkLFFBQVEsRUFBRSxRQUFRO0lBQ2xCLE1BQU0sRUFBRSxLQUFLO0lBQ2IsS0FBSyxFQUFFLEdBQUcsR0FDYjs7RUF6REwsQUEwREksT0ExREcsQ0EwREgsVUFBVSxDQUFDO0lBQ1AsT0FBTyxFQUFFLElBQUksR0FDaEI7O0VBNURMLEFBNkRJLE9BN0RHLENBNkRILGNBQWMsQ0FBQztJQUNYLFFBQVEsRUFBRSxRQUFRO0lBQ2xCLE1BQU0sRUFBRSxLQUFLO0lBQ2IsT0FBTyxFQUFFLEtBQUs7SUFDZCxVQUFVLEVBQUUsS0FBSztJQUNqQixTQUFTLEVBQUUsS0FBSyxHQU9uQjtJQU5HLE1BQU0sRUFBRSxTQUFTLEVBQUUsS0FBSyxPQUFPLFNBQVMsRUFBRSxNQUFNOztNQW5FeEQsQUE2REksT0E3REcsQ0E2REgsY0FBYyxDQUFDO1FBT1AsU0FBUyxFQUFFLEtBQUssR0FLdkI7SUFIRyxNQUFNLEVBQUUsU0FBUyxFQUFFLE1BQU07O01BdEVqQyxBQTZESSxPQTdERyxDQTZESCxjQUFjLENBQUM7UUFVUCxTQUFTLEVBQUUsS0FBSyxHQUV2Qjs7RUF6RUwsQUEwRUksT0ExRUcsQ0EwRUgsRUFBRSxDQUFDO0lBQ0MsZUFBZSxFQUFFLElBQUksR0FDeEI7OztBQUdMLEFBQUEsSUFBSSxDQUFDO0VBQ0QsS0FBSyxFQUFFLElBQUk7RUFDWCxNQUFNLEVBQUUsR0FBRztFQUNYLE9BQU8sRUFBRSxJQUFJO0VBQ2IsZUFBZSxFQUFFLGFBQWE7RUFDOUIsV0FBVyxFQUFFLE1BQU0sR0FzQ3RCOztFQTNDRCxBQU1JLElBTkEsQ0FNQSxVQUFVLEVBTmQsQUFNZ0IsSUFOWixDQU1ZLE9BQU8sQ0FBQztJQUNoQixNQUFNLEVBQUUsSUFBSTtJQUNaLE9BQU8sRUFBRSxJQUFJO0lBQ2IsV0FBVyxFQUFFLE1BQU07SUFDbkIsZUFBZSxFQUFFLE1BQU0sR0FDMUI7O0VBWEwsQUFZSSxJQVpBLENBWUEsVUFBVSxDQUFDO0lBQ1AsS0FBSyxFQUFFLFFBQVEsR0FXbEI7O0lBeEJMLEFBY1EsSUFkSixDQVlBLFVBQVUsQ0FFTixNQUFNLENBQUM7TUFDSCxXQUFXLEVFbkpYLG1CQUFtQjtNRm9KbkIsU0FBUyxFQUFFLEdBQUcsR0FDakI7O0lBakJULEFBWUksSUFaQSxDQVlBLFVBQVUsQUFNTixNQUFPLENBQUM7TUdqSlosY0FBYyxFSGtKa0IsY0FBYztNR2pKOUMsa0JBQWtCLEVBQUUsSUFBSTtNQUN4Qix5QkFBeUIsRUFBRSxPQUFPO01BQ2xDLG1CQUFtQixFQUFFLFFBQVE7TUFDN0IsbUJBQW1CLEVIOEk2QixNQUFNLEdBSWpEO01BSEcsTUFBTSxFQUFFLFNBQVMsRUFBRSxNQUFNOztRQXBCckMsQUFZSSxJQVpBLENBWUEsVUFBVSxBQU1OLE1BQU8sQ0FBQztVR2pKWixjQUFjLEVIb0pzQixjQUFjO1VHbkpsRCxrQkFBa0IsRUFBRSxJQUFJO1VBQ3hCLHlCQUF5QixFQUFFLE9BQU87VUFDbEMsbUJBQW1CLEVBQUUsUUFBUTtVQUM3QixtQkFBbUIsRUhnSmlDLE9BQU8sR0FFdEQ7O0VBdkJULEFBeUJJLElBekJBLENBeUJBLE9BQU8sQ0FBQztJQUNKLEtBQUssRUFBRSxRQUFRLEdBZ0JsQjs7SUExQ0wsQUF5QkksSUF6QkEsQ0F5QkEsT0FBTyxBQUVILE1BQU8sQ0FBQztNRzFKWixjQUFjLEVIMkprQixXQUFXO01HMUozQyxrQkFBa0IsRUFBRSxJQUFJO01BQ3hCLHlCQUF5QixFQUFFLE9BQU87TUFDbEMsbUJBQW1CLEVBQUUsUUFBUTtNQUM3QixtQkFBbUIsRUh1SjBCLE1BQU0sR0FJOUM7TUFIRyxNQUFNLEVBQUUsU0FBUyxFQUFFLE1BQU07O1FBN0JyQyxBQXlCSSxJQXpCQSxDQXlCQSxPQUFPLEFBRUgsTUFBTyxDQUFDO1VHMUpaLGNBQWMsRUg2SnNCLFdBQVc7VUc1Si9DLGtCQUFrQixFQUFFLElBQUk7VUFDeEIseUJBQXlCLEVBQUUsT0FBTztVQUNsQyxtQkFBbUIsRUFBRSxRQUFRO1VBQzdCLG1CQUFtQixFSHlKOEIsT0FBTyxHQUVuRDs7SUFoQ1QsQUFpQ1EsSUFqQ0osQ0F5QkEsT0FBTyxDQVFILENBQUMsQ0FBQztNQUNFLFNBQVMsRUFBRSxLQUFLO01BQ2hCLGNBQWMsRUFBRSxTQUFTO01BQ3pCLFdBQVcsRUFBRSxJQUFJO01BQ2pCLEtBQUssRUFBRSxPQUF3QixHQUlsQztNQUhHLE1BQU0sRUFBRSxTQUFTLEVBQUUsTUFBTTs7UUF0Q3JDLEFBaUNRLElBakNKLENBeUJBLE9BQU8sQ0FRSCxDQUFDLENBQUM7VUFNTSxTQUFTLEVBQUUsS0FBSyxHQUV2QiJ9 */
| 96.450355 | 19,030 | 0.880106 |
83a8ddd1381a36effada75aeee6cf8e2b8fe212f | 6,978 | rs | Rust | src/lib.rs | MichalGniadek/mdbook-rolltables | f4888e0146dfb0c7e8b6665f7af4ced89e51347d | [
"MIT"
] | null | null | null | src/lib.rs | MichalGniadek/mdbook-rolltables | f4888e0146dfb0c7e8b6665f7af4ced89e51347d | [
"MIT"
] | null | null | null | src/lib.rs | MichalGniadek/mdbook-rolltables | f4888e0146dfb0c7e8b6665f7af4ced89e51347d | [
"MIT"
] | null | null | null | #![warn(missing_docs)]
#![doc = include_str!("../README.md")]
use anyhow::anyhow;
use mdbook::{
book::{Book, Chapter},
errors::Result,
preprocess::{Preprocessor, PreprocessorContext},
BookItem,
};
use pulldown_cmark::{Alignment, Event, Options, Parser, Tag};
use pulldown_cmark_to_cmark::cmark;
use std::iter;
use toml::Value;
/// The struct that implements Preprocessor trait.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct RollTables;
impl Preprocessor for RollTables {
fn name(&self) -> &str {
"rolltables"
}
fn run(&self, ctx: &PreprocessorContext, mut book: Book) -> Result<Book> {
let cfg = ctx.config.get_preprocessor(self.name()).unwrap();
let head_separator = match cfg.get("head-separator") {
Some(Value::String(s)) => s.clone(),
Some(_) => Err(anyhow!("head-separator must be a string"))?,
None => "".into(),
};
let separator = match cfg.get("separator") {
Some(Value::String(s)) => s.clone(),
Some(_) => Err(anyhow!("separator must be a string"))?,
None => ".".into(),
};
let warn_unusual_dice = match cfg.get("warn-unusual-dice") {
Some(Value::Boolean(b)) => *b,
Some(_) => Err(anyhow!("warn-unusual-dice must be a bool"))?,
None => false,
};
book.for_each_mut(|item| {
if let BookItem::Chapter(chapter) = item {
self.handle_chapter(chapter, &head_separator, &separator, warn_unusual_dice)
}
});
Ok(book)
}
}
impl RollTables {
fn handle_chapter(
&self,
chapter: &mut Chapter,
head_separator: &str,
separator: &str,
warn_unusual_dice: bool,
) {
let mut buf = String::with_capacity(chapter.content.len());
let mut events = Parser::new_ext(&chapter.content, Options::ENABLE_TABLES);
let mut state = cmark(iter::empty::<Event>(), &mut buf, None).unwrap();
while let Some(ev) = events.next() {
if let Event::Start(Tag::Table(alignment)) = ev {
let mut table = MarkdownTable::new(alignment, &mut events);
if table.head()[0] == [Event::Text("d".into())]
&& table.rows().iter().all(|row| row[0].is_empty())
{
let count = table.rows().len();
let (head, iter) =
get_dice_iterator(count, head_separator, separator, warn_unusual_dice);
table.head_mut()[0] = head;
for (i, row) in iter.zip(table.rows_mut()) {
row[0] = i;
}
}
state = cmark(table.events_iter(), &mut buf, Some(state)).unwrap();
} else {
state = cmark(iter::once(ev), &mut buf, Some(state)).unwrap();
}
}
chapter.content = buf;
}
}
#[derive(Debug, Clone, PartialEq)]
struct MarkdownTable<'a> {
alignment: Vec<Alignment>,
content: Vec<Vec<Vec<Event<'a>>>>,
}
impl<'a> MarkdownTable<'a> {
fn new(alignment: Vec<Alignment>, parser: &mut Parser<'a>) -> Self {
let mut content = vec![];
loop {
match parser.next().unwrap() {
Event::Start(Tag::TableHead | Tag::TableRow) => content.push(vec![]),
Event::Start(Tag::TableCell) => content.last_mut().unwrap().push(vec![]),
Event::End(Tag::TableHead | Tag::TableRow | Tag::TableCell) => {}
Event::End(Tag::Table(_)) => break Self { alignment, content },
ev => content.last_mut().unwrap().last_mut().unwrap().push(ev),
}
}
}
fn head(&self) -> &[Vec<Event<'a>>] {
&self.content[0][..]
}
fn head_mut(&mut self) -> &mut [Vec<Event<'a>>] {
&mut self.content[0][..]
}
fn rows(&self) -> &[Vec<Vec<Event<'a>>>] {
&self.content[1..]
}
fn rows_mut(&mut self) -> &mut [Vec<Vec<Event<'a>>>] {
&mut self.content[1..]
}
fn events_iter(&'a self) -> impl Iterator<Item = Event<'a>> {
fn cell_events_iter<'b>(cell: &'b Vec<Event<'b>>) -> impl Iterator<Item = Event<'b>> {
iter::empty()
.chain(iter::once(Event::Start(Tag::TableCell)))
.chain(cell.iter().cloned())
.chain(iter::once(Event::End(Tag::TableCell)))
}
iter::empty()
.chain(iter::once(Event::Start(Tag::Table(self.alignment.clone()))))
// Head
.chain(iter::once(Event::Start(Tag::TableHead)))
.chain(self.head().iter().flat_map(cell_events_iter))
.chain(iter::once(Event::End(Tag::TableHead)))
// Rows
.chain(self.rows().iter().flat_map(|row| {
// Row
iter::empty()
.chain(iter::once(Event::Start(Tag::TableRow)))
.chain(row.iter().flat_map(cell_events_iter))
.chain(iter::once(Event::End(Tag::TableRow)))
}))
.chain(iter::once(Event::End(Tag::Table(self.alignment.clone()))))
}
}
fn get_dice_iterator<'a>(
count: usize,
head_separator: &'a str,
separator: &'a str,
warn_unusual_dice: bool,
) -> (
Vec<Event<'a>>,
Box<dyn Iterator<Item = Vec<Event<'a>>> + 'a>,
) {
fn map_string_to_event<'b>(
iter: impl Iterator<Item = String> + 'b,
) -> Box<dyn Iterator<Item = Vec<Event<'b>>> + 'b> {
Box::new(iter.map(|s| vec![Event::Text(s.into())]))
}
let combined_dice = |a: usize, b: usize| {
(
vec![Event::Text(format!("d{}{}{}", a, head_separator, b).into())],
map_string_to_event(
(1..=a)
.flat_map(move |die| iter::repeat(die).zip(1..=b))
.map(move |(n0, n1)| format!("{}{}{}", n0, separator, n1)),
),
)
};
match count {
16 => combined_dice(4, 4),
24 => combined_dice(6, 4),
32 => combined_dice(8, 4),
36 => combined_dice(6, 6),
48 => combined_dice(8, 6),
64 => combined_dice(8, 8),
3 => (
vec![Event::Text("d6".into())],
map_string_to_event(
vec![
String::from("1, 2"),
String::from("3, 4"),
String::from("5, 6"),
]
.into_iter(),
),
),
_ => {
if warn_unusual_dice && ![4, 6, 8, 10, 12, 20, 100].contains(&count) {
eprintln!("Warning: Roll table created with unusual dice: d{}", count);
}
(
vec![Event::Text(format!("d{}", count).into())],
map_string_to_event((1..=count).map(|i| format!("{}", i))),
)
}
}
}
| 32.156682 | 95 | 0.497277 |
d442ca1f111ec5bf0338578c4fc4b369671ada44 | 375 | sql | SQL | Chapter06/r2/03_run_more_optimised_query.sql | xvanausloos/Snowflake-Cookbook | 4c52e2b7c334632a6c0cdac656c1108c7dc42111 | [
"MIT"
] | 40 | 2021-04-13T00:57:19.000Z | 2022-03-12T04:09:43.000Z | Chapter06/r2/03_run_more_optimised_query.sql | xvanausloos/Snowflake-Cookbook | 4c52e2b7c334632a6c0cdac656c1108c7dc42111 | [
"MIT"
] | 2 | 2021-12-02T13:50:54.000Z | 2021-12-05T19:50:09.000Z | Chapter06/r2/03_run_more_optimised_query.sql | xvanausloos/Snowflake-Cookbook | 4c52e2b7c334632a6c0cdac656c1108c7dc42111 | [
"MIT"
] | 41 | 2020-11-10T22:49:40.000Z | 2022-03-06T06:40:16.000Z | -- add additional where clause to the query to eliminate partitions
-- and review through query profile how big a difference this makes
USE SCHEMA SNOWFLAKE_SAMPLE_DATA.TPCDS_SF10TCL;
SELECT
d_year
,sr_customer_sk as ctr_customer_sk
,sr_store_sk as ctr_store_sk
,SR_RETURN_AMT_INC_TAX
FROM store_returns,date_dim
WHERE sr_returned_date_sk = d_date_sk
AND d_year = 1999;
| 23.4375 | 67 | 0.832 |
308991cf37909ac9b2ff9d4f0a1fb12ebb1e823d | 290 | html | HTML | web/irrru/test_page_files/tags.html | viktorgreamer/agent1.pro | 03d762c41bc437ec9330ab085ce3ddb952032c66 | [
"BSD-3-Clause"
] | null | null | null | web/irrru/test_page_files/tags.html | viktorgreamer/agent1.pro | 03d762c41bc437ec9330ab085ce3ddb952032c66 | [
"BSD-3-Clause"
] | null | null | null | web/irrru/test_page_files/tags.html | viktorgreamer/agent1.pro | 03d762c41bc437ec9330ab085ce3ddb952032c66 | [
"BSD-3-Clause"
] | null | null | null |
<!-- saved from url=(0080)https://ams.creativecdn.com/tags?id=pr_zyo99Ps4zQWfu8b6Oa0X_offer_696505002&tc=1 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"></pre></body></html> | 96.666667 | 178 | 0.731034 |
73a0a416cc84871bd96938d1327c8d454ce25da0 | 115 | sql | SQL | formationDotNET/FormationDotNET/AfficherTableCroissant.sql | dmc95/CSharp | 4b321e64e065cc63238844a83ebfbdb4afb66d01 | [
"MIT"
] | null | null | null | formationDotNET/FormationDotNET/AfficherTableCroissant.sql | dmc95/CSharp | 4b321e64e065cc63238844a83ebfbdb4afb66d01 | [
"MIT"
] | null | null | null | formationDotNET/FormationDotNET/AfficherTableCroissant.sql | dmc95/CSharp | 4b321e64e065cc63238844a83ebfbdb4afb66d01 | [
"MIT"
] | null | null | null | -- Affichage de la Table Ordonnées par nom de famille croissant
SELECT * FROM Personne Pers
ORDER BY Pers.Nom ASC | 28.75 | 64 | 0.782609 |
776fc54afa45f0147e659408594b131a5bc357e1 | 140 | asm | Assembly | test_data/ligador_carregador/moodle_B.asm | Perruci/sb20172 | c7e803c97e389ff7455e6a10cfa238175a186cb4 | [
"MIT"
] | null | null | null | test_data/ligador_carregador/moodle_B.asm | Perruci/sb20172 | c7e803c97e389ff7455e6a10cfa238175a186cb4 | [
"MIT"
] | 1 | 2017-10-22T01:43:05.000Z | 2017-10-22T01:46:29.000Z | test_data/ligador_carregador/moodle_B.asm | Perruci/sb20172 | c7e803c97e389ff7455e6a10cfa238175a186cb4 | [
"MIT"
] | null | null | null |
mod_b: begin
section text
val: extern
l1: extern
public y
public mod_b
output y
output val
output y + 2
jmp l1
section data
y: space 3
end
| 9.333333 | 12 | 0.757143 |
333f156ecd7a1158f32275d1b8314dcca890498e | 5,762 | swift | Swift | SpotifyKitTests/ModelStubs/Track.swift | haversnail/SpotifyKit | b605f41ec1a466f9b262caef67847db9c5a4de72 | [
"Apache-2.0"
] | 9 | 2017-12-08T15:36:17.000Z | 2018-11-06T05:11:52.000Z | SpotifyKitTests/ModelStubs/Track.swift | haversnail/SpotifyKit | b605f41ec1a466f9b262caef67847db9c5a4de72 | [
"Apache-2.0"
] | 1 | 2018-12-27T23:33:19.000Z | 2019-11-11T18:21:42.000Z | SpotifyKitTests/ModelStubs/Track.swift | haversnail/SpotifyKit | b605f41ec1a466f9b262caef67847db9c5a4de72 | [
"Apache-2.0"
] | 2 | 2019-08-22T04:39:15.000Z | 2020-04-24T06:11:23.000Z | //
// Track.swift
// SpotifyKitTests
//
// Created by Alexander Havermale on 7/23/17.
// Copyright © 2018 Alex Havermale.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
let trackData = """
{
"album" : {
"album_type" : "album",
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/3le6xeRZTGOKsUrIHSHEKs"
},
"href" : "https://api.spotify.com/v1/artists/3le6xeRZTGOKsUrIHSHEKs",
"id" : "3le6xeRZTGOKsUrIHSHEKs",
"name" : "Vibrolux",
"type" : "artist",
"uri" : "spotify:artist:3le6xeRZTGOKsUrIHSHEKs"
} ],
"external_urls" : {
"spotify" : "https://open.spotify.com/album/2iZq3oEOQvi24pwnMAtyob"
},
"href" : "https://api.spotify.com/v1/albums/2iZq3oEOQvi24pwnMAtyob",
"id" : "2iZq3oEOQvi24pwnMAtyob",
"images" : [ {
"height" : 640,
"url" : "https://i.scdn.co/image/d609a0ec6b2384809aab8d307aa79076cebafa9e",
"width" : 640
}, {
"height" : 300,
"url" : "https://i.scdn.co/image/0f2acc67ed53c4f377e93b1a64ff7d0a79dd8d5f",
"width" : 300
}, {
"height" : 64,
"url" : "https://i.scdn.co/image/d17dadb14de09957ae28bbd80d86a3dac8b09753",
"width" : 64
} ],
"name" : "Mountain",
"type" : "album",
"uri" : "spotify:album:2iZq3oEOQvi24pwnMAtyob"
},
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/3le6xeRZTGOKsUrIHSHEKs"
},
"href" : "https://api.spotify.com/v1/artists/3le6xeRZTGOKsUrIHSHEKs",
"id" : "3le6xeRZTGOKsUrIHSHEKs",
"name" : "Vibrolux",
"type" : "artist",
"uri" : "spotify:artist:3le6xeRZTGOKsUrIHSHEKs"
} ],
"disc_number" : 1,
"duration_ms" : 157666,
"explicit" : false,
"external_ids" : {
"isrc" : "uscgh1386337"
},
"external_urls" : {
"spotify" : "https://open.spotify.com/track/7g1YqCZblmFepoevFFVP7t"
},
"href" : "https://api.spotify.com/v1/tracks/7g1YqCZblmFepoevFFVP7t",
"id" : "7g1YqCZblmFepoevFFVP7t",
"is_playable" : true,
"name" : "My Thing",
"popularity" : 14,
"preview_url" : "https://p.scdn.co/mp3-preview/36b1991141d0721a7e55530d6fe9786d1cdd3593?cid=8897482848704f2a8f8d7c79726a70d4",
"track_number" : 1,
"type" : "track",
"uri" : "spotify:track:7g1YqCZblmFepoevFFVP7t"
}
""".data(using: .utf8)!
let trackArrayData = """
{
"tracks" : [ {
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/6FQqZYVfTNQ1pCqfkwVFEa"
},
"href" : "https://api.spotify.com/v1/artists/6FQqZYVfTNQ1pCqfkwVFEa",
"id" : "6FQqZYVfTNQ1pCqfkwVFEa",
"name" : "Foals",
"type" : "artist",
"uri" : "spotify:artist:6FQqZYVfTNQ1pCqfkwVFEa"
} ],
"disc_number" : 1,
"duration_ms" : 244293,
"explicit" : false,
"external_urls" : {
"spotify" : "https://open.spotify.com/track/53L6A3I9vf7rgEZnMzx54E"
},
"href" : "https://api.spotify.com/v1/tracks/53L6A3I9vf7rgEZnMzx54E",
"id" : "53L6A3I9vf7rgEZnMzx54E",
"name" : "Mountain At My Gates",
"popularity" : 72,
"preview_url" : "https://p.scdn.co/mp3-preview/8814a6a480833a971a92e75476787a8d5ad82987?cid=8897482848704f2a8f8d7c79726a70d4",
"track_number" : 2,
"type" : "track",
"uri" : "spotify:track:53L6A3I9vf7rgEZnMzx54E"
}, {
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/4kI8Ie27vjvonwaB2ePh8T"
},
"href" : "https://api.spotify.com/v1/artists/4kI8Ie27vjvonwaB2ePh8T",
"id" : "4kI8Ie27vjvonwaB2ePh8T",
"name" : "Portugal. The Man",
"type" : "artist",
"uri" : "spotify:artist:4kI8Ie27vjvonwaB2ePh8T"
} ],
"disc_number" : 1,
"duration_ms" : 163250,
"explicit" : false,
"external_urls" : {
"spotify" : "https://open.spotify.com/track/7FESgYLcOufHqKlwrvJN60"
},
"href" : "https://api.spotify.com/v1/tracks/7FESgYLcOufHqKlwrvJN60",
"id" : "7FESgYLcOufHqKlwrvJN60",
"name" : "Feel It Still",
"popularity" : 89,
"preview_url" : "https://p.scdn.co/mp3-preview/5b50706cd5bbadf1c77cba0d7a5b883c84d2c808?cid=8897482848704f2a8f8d7c79726a70d4",
"track_number" : 1,
"type" : "track",
"uri" : "spotify:track:7FESgYLcOufHqKlwrvJN60"
}, {
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/3le6xeRZTGOKsUrIHSHEKs"
},
"href" : "https://api.spotify.com/v1/artists/3le6xeRZTGOKsUrIHSHEKs",
"id" : "3le6xeRZTGOKsUrIHSHEKs",
"name" : "Vibrolux",
"type" : "artist",
"uri" : "spotify:artist:3le6xeRZTGOKsUrIHSHEKs"
} ],
"disc_number" : 1,
"duration_ms" : 157666,
"explicit" : false,
"external_urls" : {
"spotify" : "https://open.spotify.com/track/7g1YqCZblmFepoevFFVP7t"
},
"href" : "https://api.spotify.com/v1/tracks/7g1YqCZblmFepoevFFVP7t",
"id" : "7g1YqCZblmFepoevFFVP7t",
"name" : "My Thing",
"popularity" : 16,
"preview_url" : "https://p.scdn.co/mp3-preview/36b1991141d0721a7e55530d6fe9786d1cdd3593?cid=8897482848704f2a8f8d7c79726a70d4",
"track_number" : 1,
"type" : "track",
"uri" : "spotify:track:7g1YqCZblmFepoevFFVP7t"
} ]
}
""".data(using: .utf8)!
| 33.894118 | 130 | 0.632419 |
0ba1dc47fec515daa7ce78ab6cbd344fd812af6f | 113,179 | py | Python | networking_vsphere/tests/unit/agent/test_ovsvapp_agent.py | Mirantis/vmware-dvs | 37b874f9bf40b47d0de231c640367275fb3afb9b | [
"Apache-2.0"
] | 8 | 2015-04-23T15:36:56.000Z | 2019-03-06T13:23:28.000Z | networking_vsphere/tests/unit/agent/test_ovsvapp_agent.py | Mirantis/vmware-dvs | 37b874f9bf40b47d0de231c640367275fb3afb9b | [
"Apache-2.0"
] | 1 | 2016-10-04T13:24:50.000Z | 2016-10-04T13:24:50.000Z | networking_vsphere/tests/unit/agent/test_ovsvapp_agent.py | Mirantis/vmware-dvs | 37b874f9bf40b47d0de231c640367275fb3afb9b | [
"Apache-2.0"
] | 19 | 2015-09-15T13:25:01.000Z | 2019-09-03T08:23:21.000Z | # Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import mock
import time
import logging
from oslo_config import cfg
from networking_vsphere.agent import ovsvapp_agent
from networking_vsphere.common import constants as ovsvapp_const
from networking_vsphere.common import error
from networking_vsphere.tests import base
from networking_vsphere.tests.unit.drivers import fake_manager
from networking_vsphere.utils import resource_util
from neutron.agent.common import ovs_lib
from neutron.common import utils as n_utils
from neutron.plugins.common import constants as p_const
from neutron.plugins.common import utils as p_utils
from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_neutron_agent as ovs_agent # noqa
from neutron.plugins.ml2.drivers.openvswitch.agent import vlanmanager
NETWORK_ID = 'fake_net_id'
VNIC_ADDED = 'VNIC_ADDED'
FAKE_DEVICE_ID = 'fake_device_id'
FAKE_VM = 'fake_vm'
FAKE_HOST_1 = 'fake_host_1'
FAKE_HOST_2 = 'fake_host_2'
FAKE_CLUSTER_MOID = 'fake_cluster_moid'
FAKE_CLUSTER_1 = 'fake_cluster_1'
FAKE_CLUSTER_2 = 'fake_cluster_2'
FAKE_VCENTER = 'fake_vcenter'
FAKE_PORT_1 = 'fake_port_1'
FAKE_PORT_2 = 'fake_port_2'
FAKE_PORT_3 = 'fake_port_3'
FAKE_PORT_4 = 'fake_port_4'
MAC_ADDRESS = '01:02:03:04:05:06'
FAKE_CONTEXT = 'fake_context'
FAKE_SG = {'fake_sg': 'fake_sg_rule'}
FAKE_SG_RULE = {'security_group_source_groups': ['fake_rule_1',
'fake_rule_2',
'fake_rule_3'],
'security_group_rules': [
{'ethertype': 'IPv4',
'direction': 'egress',
'security_group_id': 'fake_id'
}],
'sg_provider_rules': [
{'ethertype': 'IPv4',
'direction': 'egress',
'source_port_range_min': 67,
'source_port_range_max': 67,
'port_range_min': 68,
'port_range_max': 68
}]
}
FAKE_SG_RULES = {FAKE_PORT_1: FAKE_SG_RULE}
FAKE_SG_RULES_MULTI_PORTS = {FAKE_PORT_1: FAKE_SG_RULE,
FAKE_PORT_2: FAKE_SG_RULE
}
FAKE_SG_RULES_MISSING = {FAKE_PORT_1: {'security_group_source_groups': [
'fake_rule_1',
'fake_rule_2',
'fake_rule_3'],
'sg_provider_rules': [],
'security_group_rules': [
{'ethertype': 'IPv4',
'direction': 'egress'
}]
}
}
FAKE_SG_RULES_PARTIAL = {FAKE_PORT_1: {'security_group_source_groups': [
'fake_rule_1',
'fake_rule_2',
'fake_rule_3'],
'sg_provider_rules': [],
'security_group_rules': [
{'ethertype': 'IPv4',
'direction': 'egress',
'port_range_min': 22,
'port_range_max': 22
}]
}
}
DEVICE = {'id': FAKE_DEVICE_ID,
'cluster_id': FAKE_CLUSTER_1,
'host': FAKE_HOST_1,
'vcenter': FAKE_VCENTER}
class SampleEvent(object):
def __init__(self, type, host, cluster, srcobj, host_changed=False):
self.event_type = type
self.host_name = host
self.cluster_id = cluster
self.src_obj = srcobj
self.host_changed = host_changed
class VM(object):
def __init__(self, uuid, vnics):
self.uuid = uuid
self.vnics = vnics
class SamplePort(object):
def __init__(self, port_uuid, mac_address=None, pg_id=None):
self.port_uuid = port_uuid
self.mac_address = mac_address
self.pg_id = pg_id
class SamplePortUIDMac(object):
def __init__(self, port_uuid, mac_address):
self.port_uuid = port_uuid
self.mac_address = mac_address
class TestOVSvAppAgentRestart(base.TestCase):
@mock.patch('neutron.common.config.init')
@mock.patch('neutron.common.config.setup_logging')
@mock.patch('neutron.agent.ovsdb.api.'
'API.get')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.RpcPluginApi')
@mock.patch('neutron.agent.securitygroups_rpc.SecurityGroupServerRpcApi')
@mock.patch('neutron.agent.rpc.PluginReportStateAPI')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.OVSvAppPluginApi')
@mock.patch('neutron.context.get_admin_context_without_session')
@mock.patch('neutron.agent.rpc.create_consumers')
@mock.patch('neutron.plugins.ml2.drivers.openvswitch.agent.'
'ovs_neutron_agent.OVSNeutronAgent.setup_integration_br')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.'
'OVSvAppAgent.setup_ovs_bridges')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.'
'OVSvAppAgent.setup_security_br')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.'
'OVSvAppAgent._init_ovs_flows')
@mock.patch('networking_vsphere.drivers.ovs_firewall.OVSFirewallDriver.'
'check_ovs_firewall_restart')
@mock.patch('networking_vsphere.drivers.ovs_firewall.'
'OVSFirewallDriver.setup_base_flows')
@mock.patch('neutron.agent.common.ovs_lib.OVSBridge.create')
@mock.patch('neutron.agent.common.ovs_lib.OVSBridge.set_secure_mode')
@mock.patch('neutron.agent.common.ovs_lib.OVSBridge.get_port_ofport')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.OVSvAppAgent.__init__')
def setUp(self, mock_ovs_init, mock_get_port_ofport,
mock_set_secure_mode, mock_create_ovs_bridge,
mock_setup_base_flows, mock_check_ovs_firewall_restart,
mock_init_ovs_flows, mock_setup_security_br,
mock_setup_ovs_bridges,
mock_setup_integration_br, mock_create_consumers,
mock_get_admin_context_without_session, mock_ovsvapp_pluginapi,
mock_plugin_report_stateapi, mock_securitygroup_server_rpcapi,
mock_rpc_pluginapi, mock_ovsdb_api, mock_setup_logging,
mock_init):
super(TestOVSvAppAgentRestart, self).setUp()
cfg.CONF.set_override('security_bridge_mapping',
"fake_sec_br:fake_if", 'SECURITYGROUP')
mock_get_port_ofport.return_value = 5
mock_ovs_init.return_value = None
self.agent = ovsvapp_agent.OVSvAppAgent()
self.agent.run_refresh_firewall_loop = False
self.LOG = ovsvapp_agent.LOG
self.agent.monitor_log = logging.getLogger('monitor')
def test_check_ovsvapp_agent_restart(self):
self.agent.int_br = mock.Mock()
with mock.patch.object(self.agent.int_br, 'bridge_exists',
return_value=True) as mock_br_exists, \
mock.patch.object(self.agent.int_br, 'dump_flows_for_table',
return_value='') as mock_dump_flows:
self.assertFalse(self.agent.check_ovsvapp_agent_restart())
self.assertTrue(mock_br_exists.called)
self.assertTrue(mock_dump_flows.called)
mock_dump_flows.return_value = 'cookie = 0x0'
self.assertTrue(self.agent.check_ovsvapp_agent_restart())
self.assertTrue(mock_br_exists.called)
self.assertTrue(mock_dump_flows.called)
class TestOVSvAppAgent(base.TestCase):
@mock.patch('neutron.common.config.init')
@mock.patch('neutron.common.config.setup_logging')
@mock.patch('neutron.agent.ovsdb.api.'
'API.get')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.RpcPluginApi')
@mock.patch('neutron.agent.securitygroups_rpc.SecurityGroupServerRpcApi')
@mock.patch('neutron.agent.rpc.PluginReportStateAPI')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.OVSvAppPluginApi')
@mock.patch('neutron.context.get_admin_context_without_session')
@mock.patch('neutron.agent.rpc.create_consumers')
@mock.patch('neutron.plugins.ml2.drivers.openvswitch.agent.'
'ovs_neutron_agent.OVSNeutronAgent.setup_integration_br')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.'
'OVSvAppAgent.check_ovsvapp_agent_restart')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.'
'OVSvAppAgent.setup_ovs_bridges')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.'
'OVSvAppAgent.setup_security_br')
@mock.patch('networking_vsphere.agent.ovsvapp_agent.'
'OVSvAppAgent._init_ovs_flows')
@mock.patch('networking_vsphere.drivers.ovs_firewall.OVSFirewallDriver.'
'check_ovs_firewall_restart')
@mock.patch('networking_vsphere.drivers.ovs_firewall.'
'OVSFirewallDriver.setup_base_flows')
@mock.patch('neutron.agent.common.ovs_lib.OVSBridge.create')
@mock.patch('neutron.agent.common.ovs_lib.OVSBridge.set_secure_mode')
@mock.patch('neutron.agent.common.ovs_lib.OVSBridge.get_port_ofport')
def setUp(self, mock_get_port_ofport,
mock_set_secure_mode, mock_create_ovs_bridge,
mock_setup_base_flows, mock_check_ovs_firewall_restart,
mock_init_ovs_flows, mock_setup_security_br,
mock_setup_ovs_bridges, mock_check_ovsvapp_agent_restart,
mock_setup_integration_br, mock_create_consumers,
mock_get_admin_context_without_session, mock_ovsvapp_pluginapi,
mock_plugin_report_stateapi, mock_securitygroup_server_rpcapi,
mock_rpc_pluginapi, mock_ovsdb_api, mock_setup_logging,
mock_init):
super(TestOVSvAppAgent, self).setUp()
cfg.CONF.set_override('security_bridge_mapping',
"fake_sec_br:fake_if", 'SECURITYGROUP')
mock_check_ovsvapp_agent_restart.return_value = False
mock_get_port_ofport.return_value = 5
self.agent = ovsvapp_agent.OVSvAppAgent()
self.agent.run_refresh_firewall_loop = False
self.LOG = ovsvapp_agent.LOG
self.agent.monitor_log = logging.getLogger('monitor')
def _build_port(self, port):
port = {'admin_state_up': False,
'id': port,
'device': DEVICE,
'network_id': NETWORK_ID,
'physical_network': 'physnet1',
'segmentation_id': '1001',
'lvid': 1,
'network_type': 'vlan',
'fixed_ips': [{'subnet_id': 'subnet_uuid',
'ip_address': '1.1.1.1'}],
'device_owner': 'compute:None',
'security_groups': FAKE_SG,
'mac_address': MAC_ADDRESS,
'device_id': FAKE_DEVICE_ID
}
return port
def _build_update_port(self, port):
port = {'admin_state_up': False,
'id': port,
'network_id': NETWORK_ID,
'fixed_ips': [{'subnet_id': 'subnet_uuid',
'ip_address': '1.1.1.1'}],
'device_owner': 'compute:None',
'security_groups': FAKE_SG,
'mac_address': MAC_ADDRESS,
'device_id': FAKE_DEVICE_ID
}
return port
def test_setup_security_br_none(self):
cfg.CONF.set_override('security_bridge_mapping',
None, 'SECURITYGROUP')
self.agent.sec_br = mock.Mock()
with mock.patch.object(self.LOG, 'warning') as mock_logger_warn,\
mock.patch.object(self.agent.sec_br, 'bridge_exists'
) as mock_ovs_bridge:
self.assertRaises(SystemExit,
self.agent.setup_security_br)
self.assertTrue(mock_logger_warn.called)
self.assertFalse(mock_ovs_bridge.called)
def test_setup_security_br(self):
cfg.CONF.set_override('security_bridge_mapping',
"br-fake:fake_if", 'SECURITYGROUP')
self.agent.sec_br = mock.Mock()
self.agent.int_br = mock.Mock()
with mock.patch.object(self.LOG, 'info') as mock_logger_info, \
mock.patch.object(ovs_lib, "OVSBridge") as mock_ovs_br, \
mock.patch.object(self.agent.sec_br,
"add_patch_port",
return_value=5), \
mock.patch.object(self.agent.int_br,
"add_patch_port",
return_value=6):
self.agent.setup_security_br()
self.assertTrue(mock_ovs_br.called)
self.assertTrue(self.agent.sec_br.add_patch_port.called)
self.assertTrue(mock_logger_info.called)
def test_recover_security_br_none(self):
cfg.CONF.set_override('security_bridge_mapping',
None, 'SECURITYGROUP')
self.agent.sec_br = mock.Mock()
with mock.patch.object(self.LOG, 'warning') as mock_logger_warn, \
mock.patch.object(self.agent.sec_br, 'bridge_exists'
) as mock_ovs_bridge:
self.assertRaises(SystemExit,
self.agent.recover_security_br)
self.assertTrue(mock_logger_warn.called)
self.assertFalse(mock_ovs_bridge.called)
@mock.patch('neutron.agent.common.ovs_lib.OVSBridge')
def test_recover_security_br(self, mock_ovs_bridge):
cfg.CONF.set_override('security_bridge_mapping',
"br-sec:physnet1", 'SECURITYGROUP')
self.agent.int_br = mock.Mock()
self.agent.sec_br = mock.Mock()
mock_br = mock_ovs_bridge.return_value
with mock.patch.object(self.LOG, 'info') as mock_logger_info, \
mock.patch.object(mock_br, 'bridge_exists'), \
mock.patch.object(mock_br, 'add_patch_port') as mock_add_patch_port, \
mock.patch.object(self.agent.int_br,
"get_port_ofport",
return_value=6), \
mock.patch.object(mock_br,
"get_port_ofport",
return_value=6), \
mock.patch.object(mock_br,
"delete_port") as mock_delete_port:
mock_br.get_bridge_for_iface.return_value = 'br-sec'
self.agent.recover_security_br()
self.assertTrue(mock_logger_info.called)
self.assertFalse(mock_delete_port.called)
self.assertFalse(mock_add_patch_port.called)
mock_br.get_bridge_for_iface.return_value = 'br-fake'
self.agent.recover_security_br()
self.assertTrue(mock_logger_info.called)
self.assertTrue(mock_delete_port.called)
self.assertTrue(mock_add_patch_port.called)
@mock.patch('neutron.agent.ovsdb.api.'
'API.get')
def test_recover_physical_bridges(self, mock_ovsdb_api):
cfg.CONF.set_override('bridge_mappings',
["physnet1:br-eth1"], 'OVSVAPP')
self.agent.bridge_mappings = n_utils.parse_mappings(
cfg.CONF.OVSVAPP.bridge_mappings)
with mock.patch.object(self.LOG, 'info') as mock_logger_info, \
mock.patch.object(self.LOG, 'error') as mock_logger_error, \
mock.patch.object(self.agent, "br_phys_cls") as mock_ovs_br, \
mock.patch.object(ovs_lib.BaseOVS,
"get_bridges",
return_value=['br-eth1']
), \
mock.patch.object(p_utils, 'get_interface_name'
) as mock_int_name, \
mock.patch.object(self.agent.int_br,
"get_port_ofport",
return_value=6) as mock_get_ofport:
self.agent.recover_physical_bridges(self.agent.bridge_mappings)
self.assertTrue(mock_logger_info.called)
self.assertFalse(mock_logger_error.called)
self.assertTrue(mock_ovs_br.called)
self.assertTrue(mock_get_ofport.called)
self.assertTrue(mock_int_name.called)
self.assertEqual(self.agent.int_ofports['physnet1'], 6)
def test_init_ovs_flows(self):
cfg.CONF.set_override('bridge_mappings',
["physnet1:br-eth1"], 'OVSVAPP')
self.agent.bridge_mappings = n_utils.parse_mappings(
cfg.CONF.OVSVAPP.bridge_mappings)
self.agent.patch_sec_ofport = 5
self.agent.int_ofports = {'physnet1': 'br-eth1'}
self.agent.phys_ofports = {"physnet1": "br-eth1"}
port = self._build_port(FAKE_PORT_1)
br = self._build_phys_brs(port)
self.agent.br = mock.Mock()
with mock.patch.object(self.agent.int_br,
"delete_flows"
) as mock_int_br_delete_flows, \
mock.patch.object(self.agent,
"br_phys_cls") as mock_ovs_br, \
mock.patch.object(self.agent.int_br,
"add_flow") as mock_int_br_add_flow:
self.agent._init_ovs_flows(self.agent.bridge_mappings)
self.assertTrue(mock_int_br_delete_flows.called)
self.assertTrue(mock_ovs_br.called)
self.assertTrue(br.delete_flows.called)
self.assertTrue(br.add_flows.called)
self.assertTrue(mock_int_br_add_flow.called)
def test_update_port_bindings(self):
self.agent.ports_to_bind.add("fake_port")
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_ports_binding",
return_value=set(["fake_port"])
) as mock_update_ports_binding, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception:
self.agent._update_port_bindings()
self.assertTrue(mock_update_ports_binding.called)
self.assertFalse(self.agent.ports_to_bind)
self.assertFalse(mock_log_exception.called)
def test_update_port_bindings_rpc_exception(self):
self.agent.ports_to_bind.add("fake_port")
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_ports_binding",
side_effect=Exception()
) as mock_update_port_binding, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception:
self.assertRaises(
error.OVSvAppNeutronAgentError,
self.agent._update_port_bindings)
self.assertTrue(mock_update_port_binding.called)
self.assertTrue(mock_log_exception.called)
self.assertEqual(set(['fake_port']),
self.agent.ports_to_bind)
def test_update_port_bindings_partial(self):
self.agent.ports_to_bind.add("fake_port1")
self.agent.ports_to_bind.add("fake_port2")
self.agent.ports_to_bind.add("fake_port3")
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_ports_binding",
return_value=set(["fake_port1",
"fake_port2"])
) as mock_update_port_binding, \
mock.patch.object(self.LOG, 'exception'):
self.agent._update_port_bindings()
self.assertTrue(mock_update_port_binding.called)
self.assertEqual(set(["fake_port3"]),
self.agent.ports_to_bind)
def test_setup_ovs_bridges_vlan(self):
cfg.CONF.set_override('tenant_network_types',
"vlan", 'OVSVAPP')
cfg.CONF.set_override('bridge_mappings',
["physnet1:br-eth1"], 'OVSVAPP')
with mock.patch.object(self.agent, 'setup_physical_bridges'
) as mock_phys_brs, \
mock.patch.object(self.agent, '_init_ovs_flows'
) as mock_init_ovs_flows:
self.agent.setup_ovs_bridges()
mock_phys_brs.assert_called_with(self.agent.bridge_mappings)
mock_init_ovs_flows.assert_called_with(self.agent.bridge_mappings)
@mock.patch('neutron.agent.ovsdb.api.'
'API.get')
def test_setup_ovs_bridges_vxlan(self, mock_ovsdb_api):
self.agent.local_ip = "10.10.10.10"
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
with mock.patch.object(self.agent, 'setup_tunnel_br'
) as mock_setup_tunnel_br, \
mock.patch.object(self.agent, 'setup_tunnel_br_flows'
) as mock_setup_tunnel_br_flows:
self.agent.setup_ovs_bridges()
mock_setup_tunnel_br.assert_called_with("br-tun")
self.assertTrue(mock_setup_tunnel_br_flows.called)
def test_setup_ovs_bridges_vxlan_ofport(self):
cfg.CONF.set_override('tenant_network_types',
"vxlan", 'OVSVAPP')
cfg.CONF.set_override('local_ip',
"10.10.10.10", 'OVSVAPP')
cfg.CONF.set_override('tunnel_bridge',
"br-tun", 'OVSVAPP')
self.agent.tun_br = mock.Mock()
self.agent.int_br = mock.Mock()
self.agent.local_ip = "10.10.10.10"
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
with mock.patch.object(self.agent.tun_br,
"add_patch_port",
return_value=5), \
mock.patch.object(self.agent.int_br,
"add_patch_port",
return_value=6), \
mock.patch.object(self.agent, 'setup_tunnel_br_flows'
) as mock_setup_tunnel_br_flows:
self.agent.setup_ovs_bridges()
self.assertTrue(self.agent.tun_br.add_patch_port.called)
self.assertEqual(self.agent.patch_tun_ofport, 6)
self.assertEqual(self.agent.patch_int_ofport, 5)
self.assertTrue(mock_setup_tunnel_br_flows.called)
def test_mitigate_ovs_restart_vlan(self):
self.agent.refresh_firewall_required = False
self.agent.devices_to_filter = set(['1111'])
self.agent.cluster_host_ports = set(['1111'])
self.agent.cluster_other_ports = set(['2222'])
with mock.patch.object(self.LOG, 'info') as mock_logger_info, \
mock.patch.object(self.agent, "setup_integration_br"
) as mock_int_br, \
mock.patch.object(self.agent, "setup_physical_bridges"
) as mock_phys_brs, \
mock.patch.object(self.agent, "setup_security_br"
) as mock_sec_br, \
mock.patch.object(self.agent.sg_agent, "init_firewall"
) as mock_init_fw, \
mock.patch.object(self.agent, "setup_tunnel_br"
) as mock_setup_tunnel_br,\
mock.patch.object(self.agent, 'setup_tunnel_br_flows'
) as mock_setup_tunnel_br_flows, \
mock.patch.object(self.agent, "_init_ovs_flows"
) as mock_init_flows, \
mock.patch.object(self.agent.monitor_log, "warning"
) as monitor_warning, \
mock.patch.object(self.agent.monitor_log, "info"
) as monitor_info:
self.agent.mitigate_ovs_restart()
self.assertTrue(mock_int_br.called)
self.assertTrue(mock_phys_brs.called)
self.assertTrue(mock_sec_br.called)
self.assertFalse(mock_setup_tunnel_br.called)
self.assertFalse(mock_setup_tunnel_br_flows.called)
self.assertTrue(mock_init_fw.called)
self.assertTrue(mock_init_flows.called)
self.assertTrue(self.agent.refresh_firewall_required)
self.assertEqual(2, len(self.agent.devices_to_filter))
monitor_warning.assert_called_with("ovs: broken")
monitor_info.assert_called_with("ovs: ok")
self.assertTrue(mock_logger_info.called)
def test_mitigate_ovs_restart_vxlan(self):
self.agent.enable_tunneling = True
self.agent.refresh_firewall_required = False
self.agent.devices_to_filter = set(['1111'])
self.agent.cluster_host_ports = set(['1111'])
self.agent.cluster_other_ports = set(['2222'])
with mock.patch.object(self.LOG, 'info') as mock_logger_info, \
mock.patch.object(self.agent, "setup_integration_br"), \
mock.patch.object(self.agent, "setup_physical_bridges"
) as mock_phys_brs, \
mock.patch.object(self.agent, "setup_security_br"), \
mock.patch.object(self.agent.sg_agent, "init_firewall"
), \
mock.patch.object(self.agent, "setup_tunnel_br"
) as mock_setup_tunnel_br,\
mock.patch.object(self.agent, 'setup_tunnel_br_flows'
) as mock_setup_tunnel_br_flows, \
mock.patch.object(self.agent, "tunnel_sync"
) as mock_tun_sync, \
mock.patch.object(self.agent, "_init_ovs_flows"), \
mock.patch.object(self.agent.monitor_log, "warning"
) as monitor_warning, \
mock.patch.object(self.agent.monitor_log, "info"
) as monitor_info:
self.agent.mitigate_ovs_restart()
self.assertTrue(mock_setup_tunnel_br.called)
self.assertTrue(mock_setup_tunnel_br_flows.called)
self.assertFalse(mock_phys_brs.called)
self.assertTrue(mock_tun_sync.called)
self.assertTrue(self.agent.refresh_firewall_required)
self.assertEqual(len(self.agent.devices_to_filter), 2)
monitor_warning.assert_called_with("ovs: broken")
monitor_info.assert_called_with("ovs: ok")
self.assertTrue(mock_logger_info.called)
def test_mitigate_ovs_restart_exception(self):
self.agent.enable_tunneling = False
self.agent.refresh_firewall_required = False
self.agent.devices_to_filter = set()
self.agent.cluster_host_ports = set(['1111'])
self.agent.cluster_other_ports = set(['2222'])
with mock.patch.object(self.LOG, "info") as mock_logger_info, \
mock.patch.object(self.agent, "setup_integration_br",
side_effect=Exception()) as mock_int_br, \
mock.patch.object(self.agent, "setup_physical_bridges"
) as mock_phys_brs, \
mock.patch.object(self.agent, "setup_tunnel_br"
) as mock_setup_tunnel_br,\
mock.patch.object(self.agent, 'setup_tunnel_br_flows'
) as mock_setup_tunnel_br_flows, \
mock.patch.object(self.LOG, "exception"
) as mock_exception_log, \
mock.patch.object(self.agent.monitor_log, "warning"
) as monitor_warning, \
mock.patch.object(self.agent.monitor_log, "info"
) as monitor_info:
self.agent.mitigate_ovs_restart()
self.assertTrue(mock_int_br.called)
self.assertFalse(mock_phys_brs.called)
self.assertFalse(mock_setup_tunnel_br.called)
self.assertFalse(mock_setup_tunnel_br_flows.called)
self.assertFalse(mock_logger_info.called)
self.assertTrue(mock_exception_log.called)
self.assertFalse(self.agent.refresh_firewall_required)
self.assertEqual(0, len(self.agent.devices_to_filter))
monitor_warning.assert_called_with("ovs: broken")
self.assertFalse(monitor_info.called)
def _get_fake_port(self, port_id):
return {'id': port_id,
'port_id': port_id,
'mac_address': MAC_ADDRESS,
'fixed_ips': [{'subnet_id': 'subnet_uuid',
'ip_address': '1.1.1.1'}],
'security_groups': FAKE_SG,
'segmentation_id': 1232,
'lvid': 1,
'network_id': 'fake_network',
'device_id': FAKE_DEVICE_ID,
'admin_state_up': True,
'physical_network': 'physnet1',
'network_type': 'vlan'}
def _build_phys_brs(self, port):
phys_net = port['physical_network']
self.agent.phys_brs[phys_net] = {}
self.agent.phys_brs[phys_net]['eth_ofport'] = 5
br = self.agent.phys_brs[phys_net]['br'] = mock.Mock()
br.add_flows(port['segmentation_id'],
port['mac_address'],
5)
br.delete_flows(port['mac_address'],
port['segmentation_id'])
return br
def test_process_port(self):
fakeport = self._get_fake_port(FAKE_PORT_1)
self.agent.ports_dict = {}
self.agent.vlan_manager.mapping = {}
br = self._build_phys_brs(fakeport)
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.vnic_info[FAKE_PORT_1] = fakeport
with mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan:
status = self.agent._process_port(fakeport)
self.assertIn(FAKE_PORT_1, self.agent.ports_dict)
self.assertTrue(status)
mock_add_devices.assert_called_with([fakeport])
mock_prov_local_vlan.assert_called_with(fakeport)
self.assertTrue(br.add_flows.called)
self.assertNotIn(FAKE_PORT_1, self.agent.vnic_info)
def test_process_port_existing_network(self):
fakeport = self._get_fake_port(FAKE_PORT_1)
self.agent.ports_dict = {}
self.agent.vlan_manager.mapping = {}
br = self._build_phys_brs(fakeport)
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.vnic_info[FAKE_PORT_1] = {}
self._build_lvm(fakeport)
with mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan:
status = self.agent._process_port(fakeport)
self.assertIn(FAKE_PORT_1, self.agent.ports_dict)
self.assertTrue(status)
mock_add_devices.assert_called_with([fakeport])
self.assertFalse(mock_prov_local_vlan.called)
self.assertTrue(br.add_flows.called)
def test_process_uncached_devices_with_few_devices(self):
devices = set(['123', '234', '345', '456', '567', '678',
'1123', '1234', '1345', '1456', '1567', '1678'])
with mock.patch('eventlet.GreenPool.spawn_n') as mock_spawn_thread, \
mock.patch.object(self.LOG, 'exception') as mock_log_exception:
self.agent._process_uncached_devices(devices)
self.assertTrue(mock_spawn_thread.called)
self.assertEqual(1, mock_spawn_thread.call_count)
self.assertFalse(mock_log_exception.called)
def test_process_uncached_devices_with_more_devices(self):
devices = set(['123', '234', '345', '456', '567', '678',
'1123', '1234', '1345', '1456', '1567', '1678',
'2123', '2234', '2345', '2456', '2567', '2678',
'3123', '3234', '3345', '3456', '3567', '3678',
'4123', '4234', '4345', '4456', '4567', '4678',
'5123', '5234', '5345', '5456', '5567', '5678',
'6123', '6234', '6345', '6456', '6567', '6678'])
with mock.patch('eventlet.GreenPool.spawn_n') as mock_spawn_thread, \
mock.patch.object(self.LOG, 'exception') as mock_log_exception:
self.agent._process_uncached_devices(devices)
self.assertTrue(mock_spawn_thread.called)
self.assertEqual(2, mock_spawn_thread.call_count)
self.assertFalse(mock_log_exception.called)
def test_process_uncached_devices_sublist_single_port_vlan(self):
fakeport_1 = self._get_fake_port(FAKE_PORT_1)
self.agent.ports_dict = {}
br = self._build_phys_brs(fakeport_1)
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.vnic_info[FAKE_PORT_1] = fakeport_1
devices = [FAKE_PORT_1]
self.agent.vlan_manager.mapping = {}
with mock.patch.object(self.agent.ovsvapp_rpc,
'get_ports_details_list',
return_value=[fakeport_1]
) as mock_get_ports_details_list, \
mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_to_filter, \
mock.patch.object(self.agent.sg_agent, 'refresh_firewall'
)as mock_refresh_firewall, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_provision_local_vlan, \
mock.patch.object(self.LOG, 'exception') as mock_log_exception:
self.agent._process_uncached_devices_sublist(devices)
self.assertTrue(mock_get_ports_details_list.called)
self.assertEqual(1, mock_add_devices_to_filter.call_count)
self.assertTrue(mock_refresh_firewall.called)
self.assertTrue(mock_provision_local_vlan.called)
self.assertFalse(mock_log_exception.called)
self.assertNotIn(FAKE_PORT_1, self.agent.vnic_info)
self.assertTrue(br.add_flows.called)
def test_process_uncached_devices_sublist_multiple_port_vlan(self):
fakeport_1 = self._get_fake_port(FAKE_PORT_1)
fakeport_2 = self._get_fake_port(FAKE_PORT_2)
self.agent.ports_dict = {}
self.agent.vlan_manager.mapping = {}
br = self._build_phys_brs(fakeport_1)
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.cluster_host_ports.add(FAKE_PORT_2)
self.agent.vnic_info[FAKE_PORT_1] = fakeport_1
self.agent.vnic_info[FAKE_PORT_2] = fakeport_2
devices = [FAKE_PORT_1, FAKE_PORT_2]
with mock.patch.object(self.agent.ovsvapp_rpc,
'get_ports_details_list',
return_value=[fakeport_1, fakeport_2]
) as mock_get_ports_details_list, \
mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_to_filter, \
mock.patch.object(self.agent.sg_agent, 'refresh_firewall'
)as mock_refresh_firewall, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.LOG, 'exception') as mock_log_exception:
self.agent._process_uncached_devices_sublist(devices)
self.assertTrue(mock_get_ports_details_list.called)
self.assertEqual(2, mock_add_devices_to_filter.call_count)
self.assertTrue(mock_refresh_firewall.called)
self.assertTrue(mock_prov_local_vlan.called)
self.assertFalse(mock_log_exception.called)
self.assertNotIn(FAKE_PORT_1, self.agent.vnic_info)
self.assertNotIn(FAKE_PORT_2, self.agent.vnic_info)
self.assertTrue(br.add_flows.called)
def test_process_uncached_devices_sublist_single_port_vxlan(self):
fakeport_1 = self._get_fake_port(FAKE_PORT_1)
fakeport_1["network_type"] = p_const.TYPE_VXLAN
self.agent.ports_dict = {}
self.agent.vlan_manager.mapping = {}
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.vnic_info[FAKE_PORT_1] = fakeport_1
devices = [FAKE_PORT_1]
with mock.patch.object(self.agent.ovsvapp_rpc,
'get_ports_details_list',
return_value=[fakeport_1]
) as mock_get_ports_details_list, \
mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_to_filter, \
mock.patch.object(self.agent.sg_agent, 'refresh_firewall'
)as mock_refresh_firewall, \
mock.patch.object(self.agent, '_populate_lvm'), \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.LOG, 'exception') as mock_log_exception:
self.agent._process_uncached_devices_sublist(devices)
self.assertTrue(mock_get_ports_details_list.called)
self.assertTrue(mock_prov_local_vlan.called)
self.assertEqual(1, mock_add_devices_to_filter.call_count)
self.assertTrue(mock_refresh_firewall.called)
self.assertFalse(mock_log_exception.called)
self.assertNotIn(FAKE_PORT_1, self.agent.vnic_info)
def test_process_uncached_devices_sublist_multiple_port_vxlan(self):
fakeport_1 = self._get_fake_port(FAKE_PORT_1)
fakeport_2 = self._get_fake_port(FAKE_PORT_2)
fakeport_1["network_type"] = p_const.TYPE_VXLAN
fakeport_2["network_type"] = p_const.TYPE_VXLAN
self.agent.ports_dict = {}
self.agent.vlan_manager.mapping = {}
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.cluster_host_ports.add(FAKE_PORT_2)
self.agent.vnic_info[FAKE_PORT_1] = fakeport_1
self.agent.vnic_info[FAKE_PORT_2] = fakeport_2
devices = [FAKE_PORT_1, FAKE_PORT_2]
with mock.patch.object(self.agent.ovsvapp_rpc,
'get_ports_details_list',
return_value=[fakeport_1, fakeport_2]
) as mock_get_ports_details_list, \
mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_to_filter, \
mock.patch.object(self.agent.sg_agent, 'refresh_firewall'
)as mock_refresh_firewall, \
mock.patch.object(self.agent, '_populate_lvm'), \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.LOG, 'exception') as mock_log_exception:
self.agent._process_uncached_devices_sublist(devices)
self.assertTrue(mock_get_ports_details_list.called)
self.assertTrue(mock_prov_local_vlan.called)
self.assertEqual(2, mock_add_devices_to_filter.call_count)
self.assertTrue(mock_refresh_firewall.called)
self.assertFalse(mock_log_exception.called)
self.assertNotIn(FAKE_PORT_1, self.agent.vnic_info)
self.assertNotIn(FAKE_PORT_2, self.agent.vnic_info)
def test_process_uncached_devices_sublist_stale_vm_port(self):
fakeport_1 = self._get_fake_port(FAKE_PORT_1)
fakeport_2 = self._get_fake_port(FAKE_PORT_2)
fakeport_3 = self._get_fake_port(FAKE_PORT_3)
self.agent.ports_dict = {}
self.agent.vlan_manager.mapping = {}
self._build_phys_brs(fakeport_1)
self._build_phys_brs(fakeport_2)
self._build_phys_brs(fakeport_3)
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.cluster_host_ports.add(FAKE_PORT_2)
self.agent.ports_to_bind = set([FAKE_PORT_3, FAKE_PORT_4])
self.agent.vnic_info[FAKE_PORT_1] = fakeport_1
self.agent.vnic_info[FAKE_PORT_2] = fakeport_2
self.agent.vnic_info[FAKE_PORT_3] = fakeport_3
devices = [FAKE_PORT_1, FAKE_PORT_2, FAKE_PORT_3]
self.agent.sg_agent.remove_devices_filter = mock.Mock()
with mock.patch.object(self.agent.ovsvapp_rpc,
'get_ports_details_list',
return_value=[fakeport_1, fakeport_2]
) as mock_get_ports_details_list, \
mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_to_filter, \
mock.patch.object(self.agent.sg_agent, 'refresh_firewall'
)as mock_refresh_firewall, \
mock.patch.object(self.agent.sg_agent,
'remove_devices_filter'
)as mock_remove_device_filter, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.agent, '_remove_stale_ports_flows'), \
mock.patch.object(self.agent, '_block_stale_ports'), \
mock.patch.object(self.LOG, 'exception') as mock_log_exception:
self.agent._process_uncached_devices_sublist(devices)
self.assertTrue(mock_get_ports_details_list.called)
self.assertEqual(2, mock_add_devices_to_filter.call_count)
self.assertTrue(mock_refresh_firewall.called)
self.assertTrue(mock_prov_local_vlan.called)
self.assertFalse(mock_log_exception.called)
self.assertNotIn(FAKE_PORT_3, self.agent.ports_to_bind)
self.assertIn(FAKE_PORT_4, self.agent.ports_to_bind)
self.assertNotIn(FAKE_PORT_1, self.agent.vnic_info)
self.assertNotIn(FAKE_PORT_2, self.agent.vnic_info)
self.assertNotIn(FAKE_PORT_3, self.agent.vnic_info)
mock_remove_device_filter.assert_called_with(FAKE_PORT_3)
def test_update_firewall(self):
fakeport_1 = self._get_fake_port(FAKE_PORT_1)
fakeport_2 = self._get_fake_port(FAKE_PORT_2)
self._build_phys_brs(fakeport_1)
self._build_phys_brs(fakeport_2)
self.agent.devices_to_filter = set([FAKE_PORT_1,
FAKE_PORT_2])
self.agent.ports_dict = {FAKE_PORT_1: fakeport_1}
self.agent.vnic_info[FAKE_PORT_1] = {}
self.agent.vnic_info[FAKE_PORT_2] = {}
self.agent.refresh_firewall_required = True
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
with mock.patch.object(self.agent.ovsvapp_rpc,
'get_ports_details_list',
return_value=[fakeport_1, fakeport_2]
) as mock_get_ports_details_list, \
mock.patch.object(self.agent.sg_agent, 'refresh_firewall'
) as mock_refresh_firewall, \
mock.patch.object(self.agent, '_provision_local_vlan'
), \
mock.patch.object(self.agent, '_remove_stale_ports_flows'), \
mock.patch.object(self.agent, '_block_stale_ports'), \
mock.patch.object(self.agent.monitor_log, "warning"
) as monitor_warning, \
mock.patch.object(self.agent.monitor_log, "info"
) as monitor_info:
self.agent._update_firewall()
self.assertFalse(self.agent.refresh_firewall_required)
self.assertFalse(self.agent.devices_to_filter)
self.assertIn(FAKE_PORT_2, self.agent.ports_dict)
mock_get_ports_details_list.assert_called_with(
self.agent.context,
[FAKE_PORT_2],
self.agent.agent_id,
self.agent.vcenter_id,
self.agent.cluster_id)
mock_refresh_firewall.assert_called_with(set([FAKE_PORT_1,
FAKE_PORT_2]))
self.assertEqual(2, monitor_warning.call_count)
self.assertEqual(2, monitor_info.call_count)
def test_update_firewall_get_ports_exception(self):
fakeport_1 = self._get_fake_port(FAKE_PORT_1)
self.agent.devices_to_filter = set([FAKE_PORT_1,
FAKE_PORT_2])
self.agent.ports_dict = {FAKE_PORT_1: fakeport_1}
self.agent.refresh_firewall_required = True
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
with mock.patch.object(self.agent.ovsvapp_rpc,
'get_ports_details_list',
side_effect=Exception()
) as mock_get_ports_details_list, \
mock.patch.object(self.agent.sg_agent, 'refresh_firewall'
) as mock_refresh_firewall, \
mock.patch.object(self.agent.monitor_log, "warning"
) as monitor_warning, \
mock.patch.object(self.agent.monitor_log, "info"
) as monitor_info:
self.agent._update_firewall()
self.assertTrue(self.agent.refresh_firewall_required)
self.assertEqual(set([FAKE_PORT_2]), self.agent.devices_to_filter)
self.assertNotIn(FAKE_PORT_2, self.agent.ports_dict)
mock_get_ports_details_list.assert_called_with(
self.agent.context,
[FAKE_PORT_2],
self.agent.agent_id,
self.agent.vcenter_id,
self.agent.cluster_id)
mock_refresh_firewall.assert_called_with(set([FAKE_PORT_1]))
self.assertEqual(2, monitor_warning.call_count)
self.assertEqual(1, monitor_info.call_count)
def test_check_for_updates_no_updates(self):
self.agent.refresh_firewall_required = False
self.agent.ports_to_bind = None
with mock.patch.object(self.agent, 'check_ovs_status',
return_value=4) as mock_check_ovs, \
mock.patch.object(self.agent, '_update_firewall'
) as mock_update_firewall, \
mock.patch.object(self.agent.sg_agent,
'firewall_refresh_needed',
return_value=False
) as mock_firewall_refresh, \
mock.patch.object(self.agent.sg_agent, 'refresh_port_filters'
) as mock_refresh_port_filters, \
mock.patch.object(self.agent, '_update_port_bindings'
) as mock_update_port_bindings:
self.agent._check_for_updates()
self.assertTrue(mock_check_ovs.called)
self.assertFalse(mock_update_firewall.called)
self.assertTrue(mock_firewall_refresh.called)
self.assertFalse(mock_refresh_port_filters.called)
self.assertFalse(mock_update_port_bindings.called)
def test_check_for_updates_ovs_restarted(self):
self.agent.refresh_firewall_required = False
self.agent.ports_to_bind = None
with mock.patch.object(self.agent, 'check_ovs_status',
return_value=0) as mock_check_ovs, \
mock.patch.object(self.agent, 'mitigate_ovs_restart'
) as mock_mitigate, \
mock.patch.object(self.agent, '_update_firewall'
) as mock_update_firewall, \
mock.patch.object(self.agent.sg_agent,
'firewall_refresh_needed',
return_value=False
) as mock_firewall_refresh, \
mock.patch.object(self.agent, '_update_port_bindings'
) as mock_update_port_bindings:
self.agent._check_for_updates()
self.assertTrue(mock_check_ovs.called)
self.assertTrue(mock_mitigate.called)
self.assertFalse(mock_update_firewall.called)
self.assertTrue(mock_firewall_refresh.called)
self.assertFalse(mock_update_port_bindings.called)
@mock.patch.object(ovsvapp_agent.OVSvAppAgent, 'check_ovs_status')
def test_check_for_updates_ovs_dead(self, check_ovs_status):
check_ovs_status.return_value = 2
self.agent.refresh_firewall_required = False
self.agent.ports_to_bind = None
with mock.patch.object(self.agent, 'mitigate_ovs_restart'
) as mock_mitigate, \
mock.patch.object(self.agent, '_update_firewall'
) as mock_update_firewall, \
mock.patch.object(self.agent.sg_agent,
'firewall_refresh_needed',
return_value=False
) as mock_firewall_refresh, \
mock.patch.object(self.agent, '_update_port_bindings'
) as mock_update_port_bindings:
self.agent._check_for_updates()
self.assertTrue(self.agent.ovsvapp_mitigation_required)
self.assertTrue(check_ovs_status.called)
self.assertFalse(mock_mitigate.called)
self.assertTrue(mock_firewall_refresh.called)
self.assertFalse(mock_update_port_bindings.called)
check_ovs_status.return_value = 1
self.agent._check_for_updates()
self.assertTrue(check_ovs_status.called)
self.assertTrue(mock_mitigate.called)
self.assertFalse(mock_update_firewall.called)
self.assertTrue(mock_firewall_refresh.called)
self.assertFalse(mock_update_port_bindings.called)
self.assertFalse(self.agent.ovsvapp_mitigation_required)
def test_check_for_updates_devices_to_filter(self):
self.agent.refresh_firewall_required = True
self.agent.ports_to_bind = None
with mock.patch.object(self.agent, 'check_ovs_status',
return_value=4) as mock_check_ovs, \
mock.patch.object(self.agent, 'mitigate_ovs_restart'
) as mock_mitigate, \
mock.patch.object(self.agent, '_update_firewall'
) as mock_update_firewall,\
mock.patch.object(self.agent.sg_agent,
'firewall_refresh_needed',
return_value=False
) as mock_firewall_refresh, \
mock.patch.object(self.agent, '_update_port_bindings'
) as mock_update_port_bindings:
self.agent._check_for_updates()
self.assertTrue(mock_check_ovs.called)
self.assertFalse(mock_mitigate.called)
self.assertTrue(mock_update_firewall.called)
self.assertTrue(mock_firewall_refresh.called)
self.assertFalse(mock_update_port_bindings.called)
def test_check_for_updates_firewall_refresh(self):
self.agent.refresh_firewall_required = False
self.agent.ports_to_bind = None
with mock.patch.object(self.agent, 'check_ovs_status',
return_value=4) as mock_check_ovs, \
mock.patch.object(self.agent, '_update_firewall'
) as mock_update_firewall, \
mock.patch.object(self.agent.sg_agent,
'firewall_refresh_needed',
return_value=True
) as mock_firewall_refresh,\
mock.patch.object(self.agent.sg_agent, 'refresh_port_filters'
) as mock_refresh_port_filters, \
mock.patch.object(self.agent, '_update_port_bindings'
) as mock_update_port_bindings:
self.agent._check_for_updates()
self.assertTrue(mock_check_ovs.called)
self.assertFalse(mock_update_firewall.called)
self.assertTrue(mock_firewall_refresh.called)
self.assertTrue(mock_refresh_port_filters.called)
self.assertFalse(mock_update_port_bindings.called)
def test_check_for_updates_port_bindings(self):
self.agent.refresh_firewall_required = False
self.agent.ports_to_bind.add("fake_port")
with mock.patch.object(self.agent, 'check_ovs_status',
return_value=4) as mock_check_ovs, \
mock.patch.object(self.agent, '_update_firewall'
) as mock_update_firewall, \
mock.patch.object(self.agent.sg_agent,
'firewall_refresh_needed',
return_value=False
) as mock_firewall_refresh, \
mock.patch.object(self.agent, '_update_port_bindings'
) as mock_update_port_bindings:
self.agent._check_for_updates()
self.assertTrue(mock_check_ovs.called)
self.assertFalse(mock_update_firewall.called)
self.assertTrue(mock_firewall_refresh.called)
self.assertTrue(mock_update_port_bindings.called)
def test_update_devices_up(self):
self.agent.devices_up_list.append(FAKE_PORT_1)
ret_value = {'devices_up': [FAKE_PORT_1],
'failed_devices_up': []}
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_devices_up",
return_value=ret_value
) as update_devices_up, \
mock.patch.object(self.LOG, 'exception'
) as log_exception:
self.agent._update_devices_up()
self.assertTrue(update_devices_up.called)
self.assertFalse(self.agent.devices_up_list)
self.assertFalse(log_exception.called)
def test_update_devices_up_rpc_exception(self):
self.agent.devices_up_list.append(FAKE_PORT_1)
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_devices_up",
side_effect=Exception()
) as update_devices_up, \
mock.patch.object(self.LOG, 'exception'
) as log_exception:
self.agent._update_devices_up()
self.assertTrue(update_devices_up.called)
self.assertEqual([FAKE_PORT_1], self.agent.devices_up_list)
self.assertTrue(log_exception.called)
def test_update_devices_up_partial(self):
self.agent.devices_up_list = [FAKE_PORT_1, FAKE_PORT_2, FAKE_PORT_3]
ret_value = {'devices_up': [FAKE_PORT_1, FAKE_PORT_2],
'failed_devices_up': [FAKE_PORT_3]}
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_devices_up",
return_value=ret_value
) as update_devices_up, \
mock.patch.object(self.LOG, 'exception'
) as log_exception:
self.agent._update_devices_up()
self.assertTrue(update_devices_up.called)
self.assertEqual([FAKE_PORT_3], self.agent.devices_up_list)
self.assertFalse(log_exception.called)
def test_update_devices_down(self):
self.agent.devices_down_list.append(FAKE_PORT_1)
ret_value = {'devices_down': [FAKE_PORT_1],
'failed_devices_down': []}
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_devices_down",
return_value=ret_value
) as update_devices_down, \
mock.patch.object(self.LOG, 'exception'
) as log_exception:
self.agent._update_devices_down()
self.assertTrue(update_devices_down.called)
self.assertFalse(self.agent.devices_down_list)
self.assertFalse(log_exception.called)
def test_update_devices_down_rpc_exception(self):
self.agent.devices_down_list.append(FAKE_PORT_1)
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_devices_down",
side_effect=Exception()
) as update_devices_down, \
mock.patch.object(self.LOG, 'exception'
) as log_exception:
self.agent._update_devices_down()
self.assertTrue(update_devices_down.called)
self.assertEqual([FAKE_PORT_1], self.agent.devices_down_list)
self.assertTrue(log_exception.called)
def test_update_devices_down_partial(self):
self.agent.devices_down_list = [FAKE_PORT_1, FAKE_PORT_2, FAKE_PORT_3]
ret_value = {'devices_down': [FAKE_PORT_1, FAKE_PORT_2],
'failed_devices_down': [FAKE_PORT_3]}
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_devices_down",
return_value=ret_value
) as update_devices_down, \
mock.patch.object(self.LOG, 'exception'
) as log_exception:
self.agent._update_devices_down()
self.assertTrue(update_devices_down.called)
self.assertEqual([FAKE_PORT_3], self.agent.devices_down_list)
self.assertFalse(log_exception.called)
def test_report_state(self):
with mock.patch.object(self.agent.state_rpc,
"report_state") as report_st:
self.agent._report_state()
report_st.assert_called_with(self.agent.context,
self.agent.agent_state,
True)
self.assertNotIn("start_flag", self.agent.agent_state)
self.assertFalse(self.agent.use_call)
self.assertEqual(cfg.CONF.host,
self.agent.agent_state["host"])
def test_report_state_fail(self):
with mock.patch.object(self.agent.state_rpc,
"report_state",
side_effect=Exception()) as mock_report_st, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception:
self.agent._report_state()
mock_report_st.assert_called_with(self.agent.context,
self.agent.agent_state,
True)
self.assertTrue(mock_log_exception.called)
def test_process_event_ignore_event(self):
vm = VM(FAKE_VM, [])
event = SampleEvent(VNIC_ADDED, FAKE_HOST_1,
FAKE_CLUSTER_MOID, vm)
with mock.patch.object(self.agent,
"_notify_device_added") as mock_add_vm, \
mock.patch.object(self.agent,
"_notify_device_updated") as mock_update_vm, \
mock.patch.object(self.agent,
"_notify_device_deleted") as mock_del_vm, \
mock.patch.object(self.LOG, 'debug') as mock_log_debug:
self.agent.process_event(event)
self.assertFalse(mock_add_vm.called)
self.assertFalse(mock_update_vm.called)
self.assertFalse(mock_del_vm.called)
self.assertTrue(mock_log_debug.called)
def test_process_event_exception(self):
vm = VM(FAKE_VM, [])
event = SampleEvent(ovsvapp_const.VM_CREATED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm)
with mock.patch.object(self.agent,
"_notify_device_added",
side_effect=Exception()) as mock_add_vm, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception, \
mock.patch.object(self.LOG, 'error') as mock_log_error:
self.agent.process_event(event)
self.assertTrue(mock_add_vm.called)
self.assertTrue(mock_log_error.called)
self.assertTrue(mock_log_exception.called)
def test_process_event_vm_create_nonics_non_host_non_cluster(self):
self.agent.esx_hostname = FAKE_HOST_2
vm = VM(FAKE_VM, [])
event = SampleEvent(ovsvapp_const.VM_CREATED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm)
self.agent.state = ovsvapp_const.AGENT_RUNNING
with mock.patch.object(self.agent,
"_notify_device_added") as device_added:
self.agent.process_event(event)
self.assertTrue(device_added.called)
def test_process_event_vm_create_nonics_non_host(self):
self.agent.esx_hostname = FAKE_HOST_2
vm = VM(FAKE_VM, [])
event = SampleEvent(ovsvapp_const.VM_CREATED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm)
self.agent.state = ovsvapp_const.AGENT_RUNNING
with mock.patch.object(self.agent,
"_notify_device_added") as device_added:
self.agent.process_event(event)
self.assertTrue(device_added.called)
self.assertEqual(FAKE_CLUSTER_MOID, self.agent.cluster_moid)
def test_process_event_vm_create_nics_non_host(self):
self.agent.esx_hostname = FAKE_HOST_2
vm_port1 = SamplePort(FAKE_PORT_1)
vm_port2 = SamplePort(FAKE_PORT_2)
vm = VM(FAKE_VM, ([vm_port1, vm_port2]))
event = SampleEvent(ovsvapp_const.VM_CREATED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.sec_br = mock.Mock()
with mock.patch.object(self.agent.sec_br, 'dump_flows_for',
return_value='mock_flow') as mock_dump_flows:
self.agent.process_event(event)
self.assertTrue(mock_dump_flows.called)
for vnic in vm.vnics:
self.assertIn(vnic.port_uuid, self.agent.devices_to_filter)
self.assertIn(vnic.port_uuid, self.agent.cluster_other_ports)
self.assertNotIn(vnic.port_uuid, self.agent.cluster_host_ports)
def test_process_event_vm_create_nics_host(self):
self.agent.esx_hostname = FAKE_HOST_1
vm_port1 = SamplePort(FAKE_PORT_1)
vm_port2 = SamplePort(FAKE_PORT_2)
vm = VM(FAKE_VM, ([vm_port1, vm_port2]))
event = SampleEvent(ovsvapp_const.VM_CREATED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.sec_br = mock.Mock()
with mock.patch.object(self.agent.sec_br, 'dump_flows_for',
return_value='mock_flow') as mock_dump_flows:
self.agent.process_event(event)
self.assertTrue(mock_dump_flows.called)
for vnic in vm.vnics:
self.assertIn(vnic.port_uuid, self.agent.devices_to_filter)
self.assertIn(vnic.port_uuid, self.agent.cluster_host_ports)
self.assertNotIn(vnic.port_uuid, self.agent.cluster_other_ports)
with mock.patch.object(self.agent.sec_br, 'dump_flows_for',
return_value='') as mock_dump_flows, \
mock.patch.object(self.agent.ovsvapp_rpc,
"get_ports_for_device",
return_value=True) as mock_get_ports:
self.agent.process_event(event)
self.assertTrue(mock_dump_flows.called)
self.assertTrue(mock_get_ports.called)
def test_process_event_vm_updated_nonhost(self):
self.agent.esx_hostname = FAKE_HOST_2
vm_port1 = SamplePort(FAKE_PORT_1)
port = self._build_port(FAKE_PORT_1)
self.agent.ports_dict[port['id']] = self.agent._build_port_info(
port)
vm = VM(FAKE_VM, [vm_port1])
event = SampleEvent(ovsvapp_const.VM_UPDATED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm, True)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.process_event(event)
self.assertIn(FAKE_PORT_1, self.agent.cluster_other_ports)
def test_process_event_vm_delete_hosted_vm_vlan(self):
self.agent.esx_hostname = FAKE_HOST_1
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
port = self._build_port(FAKE_PORT_1)
br = self._build_phys_brs(port)
self.agent.ports_dict[port['id']] = self.agent._build_port_info(
port)
vm_port = SamplePortUIDMac(FAKE_PORT_1, MAC_ADDRESS)
vm = VM(FAKE_VM, ([vm_port]))
event = SampleEvent(ovsvapp_const.VM_DELETED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self._build_lvm(port)
self.agent.net_mgr.initialize_driver()
with mock.patch.object(self.agent.net_mgr.get_driver(),
"post_delete_vm",
) as mock_post_del_vm, \
mock.patch.object(self.LOG, 'debug'), \
mock.patch.object(self.agent.net_mgr.get_driver(),
"delete_network") as mock_del_net:
self.agent.process_event(event)
for vnic in vm.vnics:
self.assertNotIn(vnic.port_uuid, self.agent.cluster_host_ports)
self.assertTrue(mock_post_del_vm.called)
self.assertFalse(mock_del_net.called)
self.assertTrue(br.delete_flows.called)
def test_process_event_vm_delete_hosted_vm_vxlan(self):
self.agent.esx_hostname = FAKE_HOST_1
self.agent.cluster_host_ports.add(FAKE_PORT_1)
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
port = self._build_port(FAKE_PORT_1)
port['network_type'] = p_const.TYPE_VXLAN
self.agent.ports_dict[port['id']] = self.agent._build_port_info(
port)
vm_port = SamplePortUIDMac(FAKE_PORT_1, MAC_ADDRESS)
vm = VM(FAKE_VM, ([vm_port]))
event = SampleEvent(ovsvapp_const.VM_DELETED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
with mock.patch.object(self.agent.net_mgr.get_driver(),
"post_delete_vm",
return_value=True) as (post_del_vm):
self.agent.process_event(event)
for vnic in vm.vnics:
self.assertNotIn(vnic.port_uuid, self.agent.cluster_host_ports)
self.assertTrue(post_del_vm.called)
def test_process_event_vm_delete_non_hosted_vm(self):
self.agent.esx_hostname = FAKE_HOST_2
self.agent.cluster_other_ports.add(FAKE_PORT_1)
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
port = self._build_port(FAKE_PORT_1)
self.agent.ports_dict[port['id']] = self.agent._build_port_info(
port)
vm_port = SamplePortUIDMac(FAKE_PORT_1, MAC_ADDRESS)
vm = VM(FAKE_VM, ([vm_port]))
event = SampleEvent(ovsvapp_const.VM_DELETED,
FAKE_HOST_1, FAKE_CLUSTER_MOID, vm)
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
self.agent.state = ovsvapp_const.AGENT_RUNNING
with mock.patch.object(self.agent.net_mgr.get_driver(),
"post_delete_vm",
return_value=True) as mock_post_del_vm, \
mock.patch.object(self.agent.net_mgr.get_driver(),
"delete_network") as mock_del_net:
self.agent.process_event(event)
for vnic in vm.vnics:
self.assertNotIn(vnic.port_uuid,
self.agent.cluster_other_ports)
self.assertTrue(mock_post_del_vm.called)
self.assertFalse(mock_del_net.called)
def test_notify_device_added_with_hosted_vm(self):
vm = VM(FAKE_VM, [])
host = FAKE_HOST_1
self.agent.esx_hostname = host
self.agent.state = ovsvapp_const.AGENT_RUNNING
with mock.patch.object(self.agent.ovsvapp_rpc,
"get_ports_for_device",
return_value=True) as mock_get_ports, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception, \
mock.patch.object(time, "sleep") as mock_time_sleep:
self.agent._notify_device_added(vm, host)
self.assertTrue(mock_get_ports.called)
self.assertFalse(mock_time_sleep.called)
self.assertFalse(mock_log_exception.called)
def test_notify_device_added_rpc_exception(self):
vm = VM(FAKE_VM, [])
host = FAKE_HOST_1
self.agent.esx_hostname = host
self.agent.state = ovsvapp_const.AGENT_RUNNING
with mock.patch.object(self.agent.ovsvapp_rpc,
"get_ports_for_device",
side_effect=Exception()) as mock_get_ports, \
mock.patch.object(self.LOG, 'exception'
)as mock_log_exception, \
mock.patch.object(time, "sleep") as mock_time_sleep:
self.assertRaises(
error.OVSvAppNeutronAgentError,
self.agent._notify_device_added, vm, host)
self.assertTrue(mock_log_exception.called)
self.assertTrue(mock_get_ports.called)
self.assertFalse(mock_time_sleep.called)
def test_notify_device_added_with_retry(self):
vm = VM(FAKE_VM, [])
host = FAKE_HOST_1
self.agent.esx_hostname = host
self.agent.state = ovsvapp_const.AGENT_RUNNING
with mock.patch.object(self.agent.ovsvapp_rpc,
"get_ports_for_device",
return_value=False) as mock_get_ports, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception, \
mock.patch.object(time, "sleep") as mock_time_sleep:
self.agent._notify_device_added(vm, host)
self.assertTrue(mock_get_ports.called)
self.assertTrue(mock_time_sleep.called)
self.assertFalse(mock_log_exception.called)
def test_notify_device_updated_migration_vlan(self):
host = FAKE_HOST_1
self.agent.esx_hostname = host
vm_port1 = SamplePort(FAKE_PORT_1)
vm = VM(FAKE_VM, [vm_port1])
port = self._build_port(FAKE_PORT_1)
self._build_phys_brs(port)
self.agent.ports_dict[port['id']] = self.agent._build_port_info(port)
self._build_lvm(port)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent._add_ports_to_host_ports([FAKE_PORT_1])
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_device_binding"
) as mock_update_device_binding, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception:
self.agent._notify_device_updated(vm, FAKE_HOST_2, True)
self.assertNotIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertFalse(mock_update_device_binding.called)
self.assertFalse(mock_log_exception.called)
def test_notify_device_update_not_found(self):
host = FAKE_HOST_1
self.agent.esx_hostname = host
vm_port1 = SamplePort(FAKE_PORT_1)
vm = VM(FAKE_VM, [vm_port1])
port = self._build_port(FAKE_PORT_1)
self._build_phys_brs(port)
self._build_lvm(port)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
br = self.agent.phys_brs[port['physical_network']]['br']
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_device_binding"
):
self.agent._notify_device_updated(vm, host, True)
self.assertFalse(br.add_drop_flows.called)
self.agent.ports_dict[port['id']] = self.agent._build_port_info(port)
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_device_binding"
):
self.agent._notify_device_updated(vm, host, True)
self.assertTrue(br.add_drop_flows.called)
def test_notify_device_updated_host_vlan(self):
host = FAKE_HOST_1
self.agent.esx_hostname = host
vm_port1 = SamplePort(FAKE_PORT_1)
vm = VM(FAKE_VM, [vm_port1])
port = self._build_port(FAKE_PORT_1)
self._build_phys_brs(port)
self.agent.ports_dict[port['id']] = self.agent._build_port_info(port)
self._build_lvm(port)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
br = self.agent.phys_brs[port['physical_network']]['br']
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_device_binding"
) as mock_update_device_binding:
self.agent._notify_device_updated(vm, host, True)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertTrue(mock_update_device_binding.called)
self.assertTrue(br.add_flows.called)
def test_notify_device_updated_vlan_rpc_exception(self):
host = FAKE_HOST_1
self.agent.esx_hostname = host
vm_port1 = SamplePort(FAKE_PORT_1)
vm = VM(FAKE_VM, [vm_port1])
port = self._build_port(FAKE_PORT_1)
br = self._build_phys_brs(port)
self.agent.ports_dict[port['id']] = self.agent._build_port_info(port)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_device_binding",
side_effect=Exception()
) as mock_update_device_binding, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception:
self.assertRaises(
error.OVSvAppNeutronAgentError,
self.agent._notify_device_updated, vm, host, True)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertTrue(br.add_flows.called)
self.assertTrue(mock_update_device_binding.called)
self.assertTrue(mock_log_exception.called)
def test_notify_device_updated_host_vlan_multiple_nic(self):
host = FAKE_HOST_1
self.agent.esx_hostname = host
vm_port1 = SamplePort(FAKE_PORT_1)
vm_port2 = SamplePort(FAKE_PORT_2)
vm = VM(FAKE_VM, ([vm_port1, vm_port2]))
port1 = self._build_port(FAKE_PORT_1)
port2 = self._build_port(FAKE_PORT_2)
br1 = self._build_phys_brs(port1)
br2 = self._build_phys_brs(port2)
self.agent.ports_dict[port1['id']] = self.agent._build_port_info(port1)
self.agent.ports_dict[port2['id']] = self.agent._build_port_info(port2)
self._build_lvm(port1)
self._build_lvm(port2)
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_device_binding"
) as mock_update_device_binding, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception:
self.agent._notify_device_updated(vm, host, True)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertTrue(mock_update_device_binding.called)
self.assertFalse(mock_log_exception.called)
self.assertEqual(1, mock_update_device_binding.call_count)
self.assertTrue(br1.add_flows.called)
self.assertTrue(br2.add_flows.called)
def _build_lvm(self, port):
try:
self.agent.vlan_manager.add(port['network_id'], port['lvid'],
port['network_type'],
port['physical_network'], '1234')
except vlanmanager.MappingAlreadyExists:
return None
def test_notify_device_updated_host_vxlan(self):
host = FAKE_HOST_1
self.agent.esx_hostname = host
vm_port1 = SamplePort(FAKE_PORT_1)
port1 = self._build_port(FAKE_PORT_1)
port1['network_type'] = p_const.TYPE_VXLAN
self.agent.ports_dict[port1['id']] = self.agent._build_port_info(port1)
vm = VM(FAKE_VM, [vm_port1])
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_device_binding"
) as mock_update_device_binding, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception:
self.agent._notify_device_updated(vm, host, True)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertTrue(mock_update_device_binding.called)
self.assertFalse(mock_log_exception.called)
def test_notify_device_updated_vxlan_rpc_exception(self):
host = FAKE_HOST_1
self.agent.esx_hostname = host
vm_port1 = SamplePort(FAKE_PORT_1)
vm = VM(FAKE_VM, [vm_port1])
self.agent.state = ovsvapp_const.AGENT_RUNNING
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
with mock.patch.object(self.agent.ovsvapp_rpc,
"update_device_binding",
side_effect=Exception()
) as mock_update_device_binding, \
mock.patch.object(self.LOG, 'exception'
) as mock_log_exception:
self.assertRaises(
error.OVSvAppNeutronAgentError,
self.agent._notify_device_updated, vm, host, True)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertTrue(mock_update_device_binding.called)
self.assertTrue(mock_log_exception.called)
def test_map_port_to_common_model_vlan(self):
expected_port = self._build_port(FAKE_PORT_1)
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
network, port = self.agent._map_port_to_common_model(expected_port)
expected_name = expected_port['network_id'] + "-" + FAKE_CLUSTER_MOID
self.assertEqual(expected_name, network.name)
self.assertEqual(expected_port['id'], port.uuid)
def test_map_port_to_common_model_vxlan(self):
expected_port = self._build_port(FAKE_PORT_1)
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
network, port = self.agent._map_port_to_common_model(expected_port, 1)
expected_name = expected_port['network_id'] + "-" + FAKE_CLUSTER_MOID
self.assertEqual(expected_name, network.name)
self.assertEqual(expected_port['id'], port.uuid)
def test_device_create_cluster_mismatch(self):
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_2
with mock.patch.object(self.agent,
'_process_create_ports',
return_value=True) as mock_create_ports, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.device_create(FAKE_CONTEXT,
device=DEVICE)
self.assertTrue(mock_logger_debug.called)
self.assertFalse(mock_create_ports.called)
def test_device_create_non_hosted_vm(self):
ports = [self._build_port(FAKE_PORT_1)]
self._build_phys_brs(ports[0])
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.esx_hostname = FAKE_HOST_2
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.devices_up_list = []
self.agent.vlan_manager.mapping = {}
with mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_fn, \
mock.patch.object(self.agent.sg_agent, 'ovsvapp_sg_update'
) as mock_sg_update_fn, \
mock.patch.object(self.agent.sg_agent, 'expand_sg_rules',
return_value=FAKE_SG_RULES
) as mock_expand_sg_rules, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.device_create(FAKE_CONTEXT,
device=DEVICE,
ports=ports,
sg_rules=mock.MagicMock())
self.assertTrue(mock_logger_debug.called)
mock_add_devices_fn.assert_called_with(ports)
self.assertIn(FAKE_PORT_1, self.agent.cluster_other_ports)
self.assertNotIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertFalse(self.agent.devices_up_list)
self.assertTrue(mock_sg_update_fn.called)
self.assertTrue(mock_expand_sg_rules.called)
self.assertTrue(mock_prov_local_vlan.called)
def test_device_create_hosted_vm_vlan(self):
ports = [self._build_port(FAKE_PORT_1)]
self._build_phys_brs(ports[0])
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.esx_hostname = FAKE_HOST_1
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.devices_up_list = []
self.agent.vlan_manager.mapping = {}
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
with mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_fn, \
mock.patch.object(self.agent.sg_agent, 'ovsvapp_sg_update'
) as mock_sg_update_fn, \
mock.patch.object(self.agent.sg_agent, 'expand_sg_rules',
return_value=FAKE_SG_RULES
) as mock_expand_sg_rules, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.device_create(FAKE_CONTEXT,
device=DEVICE,
ports=ports,
sg_rules=mock.MagicMock())
self.assertTrue(mock_logger_debug.called)
self.assertNotIn(FAKE_PORT_1, self.agent.cluster_other_ports)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertEqual([FAKE_PORT_1], self.agent.devices_up_list)
mock_add_devices_fn.assert_called_with(ports)
self.assertTrue(mock_sg_update_fn.called)
self.assertTrue(mock_expand_sg_rules.called)
self.assertTrue(mock_prov_local_vlan.called)
def test_device_create_hosted_vm_vlan_sg_rule_missing(self):
ports = [self._build_port(FAKE_PORT_1)]
self._build_phys_brs(ports[0])
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.esx_hostname = FAKE_HOST_1
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.devices_up_list = []
self.agent.vlan_manager.mapping = {}
self.agent.devices_to_filter = set()
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
with mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_fn, \
mock.patch.object(self.agent.sg_agent, 'ovsvapp_sg_update'
) as mock_sg_update_fn, \
mock.patch.object(self.agent.sg_agent, 'expand_sg_rules',
return_value=FAKE_SG_RULES_MISSING
) as mock_expand_sg_rules, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.device_create(FAKE_CONTEXT,
device=DEVICE,
ports=ports,
sg_rules=mock.MagicMock())
self.assertTrue(mock_logger_debug.called)
self.assertNotIn(FAKE_PORT_1, self.agent.cluster_other_ports)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertEqual([FAKE_PORT_1], self.agent.devices_up_list)
self.assertIn(FAKE_PORT_1, self.agent.devices_to_filter)
mock_add_devices_fn.assert_called_with(ports)
self.assertFalse(mock_sg_update_fn.called)
self.assertTrue(mock_expand_sg_rules.called)
self.assertTrue(mock_prov_local_vlan.called)
def test_device_create_hosted_vm_vlan_sg_rule_partial_missing(self):
ports = [self._build_port(FAKE_PORT_1)]
self._build_phys_brs(ports[0])
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.esx_hostname = FAKE_HOST_1
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.devices_up_list = []
self.agent.devices_to_filter = set()
self.agent.vlan_manager.mapping = {}
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
with mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_fn, \
mock.patch.object(self.agent.sg_agent, 'ovsvapp_sg_update'
) as mock_sg_update_fn, \
mock.patch.object(self.agent.sg_agent, 'expand_sg_rules',
return_value=FAKE_SG_RULES_PARTIAL
) as mock_expand_sg_rules, \
mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.device_create(FAKE_CONTEXT,
device=DEVICE,
ports=ports,
sg_rules=mock.MagicMock())
self.assertTrue(mock_logger_debug.called)
self.assertNotIn(FAKE_PORT_1, self.agent.cluster_other_ports)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertEqual([FAKE_PORT_1], self.agent.devices_up_list)
self.assertIn(FAKE_PORT_1, self.agent.devices_to_filter)
mock_add_devices_fn.assert_called_with(ports)
self.assertFalse(mock_sg_update_fn.called)
self.assertTrue(mock_expand_sg_rules.called)
self.assertTrue(mock_prov_local_vlan.called)
def test_device_create_hosted_vm_vxlan(self):
port = self._build_port(FAKE_PORT_1)
port['network_type'] = p_const.TYPE_VXLAN
ports = [port]
self.agent.vlan_manager.mapping = {}
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.esx_hostname = FAKE_HOST_1
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
self.agent.vlan_manager.mapping = {}
self.agent.devices_to_filter = set()
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
with mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.agent.sg_agent,
'add_devices_to_filter'
) as mock_add_devices_fn, \
mock.patch.object(self.agent.sg_agent, 'ovsvapp_sg_update'
) as mock_sg_update_fn, \
mock.patch.object(self.agent.sg_agent, 'expand_sg_rules',
return_value=FAKE_SG_RULES
) as mock_expand_sg_rules, \
mock.patch.object(self.agent.plugin_rpc, 'update_device_up'
) as mock_update_device_up, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.device_create(FAKE_CONTEXT,
device=DEVICE,
ports=ports,
sg_rules=mock.MagicMock())
self.assertTrue(mock_prov_local_vlan.called)
self.assertTrue(mock_logger_debug.called)
self.assertNotIn(FAKE_PORT_1, self.agent.cluster_other_ports)
self.assertNotIn(FAKE_PORT_1, self.agent.devices_to_filter)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
mock_add_devices_fn.assert_called_with(ports)
self.assertTrue(mock_sg_update_fn.called)
self.assertTrue(mock_expand_sg_rules.called)
self.assertTrue(mock_update_device_up.called)
def test_device_create_hosted_vm_vxlan_sg_rule_missing(self):
port = self._build_port(FAKE_PORT_1)
port['network_type'] = p_const.TYPE_VXLAN
ports = [port]
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.esx_hostname = FAKE_HOST_1
self.agent.tenant_network_types = [p_const.TYPE_VXLAN]
self.agent.vlan_manager.mapping = {}
self.agent.devices_to_filter = set()
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
with mock.patch.object(self.agent, '_provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.agent.sg_agent,
'add_devices_to_filter'
) as mock_add_devices_fn, \
mock.patch.object(self.agent.sg_agent, 'ovsvapp_sg_update'
) as mock_sg_update_fn, \
mock.patch.object(self.agent.sg_agent, 'expand_sg_rules',
return_value=FAKE_SG_RULES_MISSING
) as mock_expand_sg_rules, \
mock.patch.object(self.agent.plugin_rpc, 'update_device_up'
) as mock_update_device_up, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.device_create(FAKE_CONTEXT,
device=DEVICE,
ports=ports,
sg_rules=mock.MagicMock())
self.assertTrue(mock_prov_local_vlan.called)
self.assertTrue(mock_logger_debug.called)
self.assertNotIn(FAKE_PORT_1, self.agent.cluster_other_ports)
self.assertIn(FAKE_PORT_1, self.agent.devices_to_filter)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
mock_add_devices_fn.assert_called_with(ports)
self.assertFalse(mock_sg_update_fn.called)
self.assertTrue(mock_expand_sg_rules.called)
self.assertTrue(mock_update_device_up.called)
def test_device_create_hosted_vm_create_port_exception(self):
ports = [self._build_port(FAKE_PORT_1)]
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.esx_hostname = FAKE_HOST_1
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
self.agent.net_mgr.get_driver().create_port = mock.Mock(
side_effect=Exception())
with mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
), \
mock.patch.object(self.agent, '_provision_local_vlan'
), \
mock.patch.object(self.agent.sg_agent, 'ovsvapp_sg_update'
) as mock_sg_update_fn, \
mock.patch.object(self.agent.sg_agent, 'expand_sg_rules',
return_value=FAKE_SG_RULES
) as mock_expand_sg_rules, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug, \
mock.patch.object(self.LOG, 'exception') as mock_log_excep:
self.assertRaises(
error.OVSvAppNeutronAgentError,
self.agent.device_create,
FAKE_CONTEXT, device=DEVICE,
ports=ports, sg_rules=mock.MagicMock())
self.assertTrue(mock_logger_debug.called)
self.assertNotIn(FAKE_PORT_1, self.agent.cluster_other_ports)
self.assertIn(FAKE_PORT_1, self.agent.cluster_host_ports)
self.assertFalse(mock_sg_update_fn.called)
self.assertTrue(mock_expand_sg_rules.called)
self.assertTrue(mock_log_excep.called)
def test_port_update_admin_state_up(self):
port = self._build_port(FAKE_PORT_1)
self.agent.ports_dict[port['id']] = self.agent._build_port_info(
port)
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.cluster_host_ports = set([port['id']])
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
updated_port = self._build_update_port(FAKE_PORT_1)
updated_port['admin_state_up'] = True
self.devices_up_list = []
neutron_port = {'port': updated_port,
'segmentation_id': port['segmentation_id']}
with mock.patch.object(self.LOG, 'exception'
) as mock_log_exception, \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.port_update(FAKE_CONTEXT, **neutron_port)
self.assertEqual(neutron_port['port']['admin_state_up'],
self.agent.ports_dict[port['id']].
admin_state_up)
self.assertEqual([FAKE_PORT_1], self.agent.devices_up_list)
self.assertFalse(mock_log_exception.called)
self.assertTrue(mock_logger_debug.called)
def test_device_update_maintenance_mode(self):
kwargs = {'device_data': {'ovsvapp_agent': 'fake_agent_host_1',
'esx_host_name': FAKE_HOST_1,
'assigned_agent_host': FAKE_HOST_2}}
self.agent.hostname = FAKE_HOST_2
self.agent.esx_maintenance_mode = True
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
self.agent.net_mgr.get_driver().session = "fake_session"
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.vcenter_id = FAKE_VCENTER
with mock.patch.object(resource_util,
"get_vm_mor_by_name",
return_value="vm_mor") as vm_mor_by_name, \
mock.patch.object(resource_util,
"get_host_mor_by_name",
return_value="host_mor"
) as host_mor_by_name, \
mock.patch.object(resource_util,
"set_vm_poweroff") as power_off, \
mock.patch.object(resource_util,
"set_host_into_maintenance_mode"
) as maintenance_mode, \
mock.patch.object(resource_util,
"set_host_into_shutdown_mode"
) as shutdown_mode, \
mock.patch.object(self.agent.ovsvapp_rpc,
"update_cluster_lock") as cluster_lock, \
mock.patch.object(self.LOG, 'exception') as log_exception, \
mock.patch.object(time, 'sleep'):
self.agent.device_update(FAKE_CONTEXT, **kwargs)
self.assertTrue(vm_mor_by_name.called)
self.assertTrue(host_mor_by_name.called)
self.assertTrue(power_off.called)
self.assertTrue(maintenance_mode.called)
self.assertFalse(shutdown_mode.called)
self.assertTrue(cluster_lock.called)
cluster_lock.assert_called_with(self.agent.context,
cluster_id=self.agent.cluster_id,
vcenter_id=self.agent.vcenter_id,
success=True)
self.assertFalse(log_exception.called)
def test_device_update_shutdown_mode(self):
kwargs = {'device_data': {'ovsvapp_agent': 'fake_agent_host_1',
'esx_host_name': FAKE_HOST_1,
'assigned_agent_host': FAKE_HOST_2}}
self.agent.hostname = FAKE_HOST_2
self.agent.esx_maintenance_mode = False
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
self.agent.net_mgr.get_driver().session = "fake_session"
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.vcenter_id = FAKE_VCENTER
with mock.patch.object(resource_util,
"get_vm_mor_by_name",
return_value="vm_mor") as vm_mor_by_name, \
mock.patch.object(resource_util,
"get_host_mor_by_name",
return_value="host_mor"
) as host_mor_by_name, \
mock.patch.object(resource_util,
"set_vm_poweroff") as power_off, \
mock.patch.object(resource_util,
"set_host_into_maintenance_mode"
) as maintenance_mode, \
mock.patch.object(resource_util,
"set_host_into_shutdown_mode"
) as shutdown_mode, \
mock.patch.object(self.agent.ovsvapp_rpc,
"update_cluster_lock") as cluster_lock, \
mock.patch.object(self.LOG, 'exception') as log_exception, \
mock.patch.object(time, 'sleep'):
self.agent.device_update(FAKE_CONTEXT, **kwargs)
self.assertTrue(vm_mor_by_name.called)
self.assertTrue(host_mor_by_name.called)
self.assertFalse(power_off.called)
self.assertFalse(maintenance_mode.called)
self.assertTrue(shutdown_mode.called)
self.assertTrue(cluster_lock.called)
cluster_lock.assert_called_with(self.agent.context,
cluster_id=self.agent.cluster_id,
vcenter_id=self.agent.vcenter_id,
success=True)
self.assertFalse(log_exception.called)
def test_device_update_ovsvapp_alreadly_powered_off(self):
kwargs = {'device_data': {'ovsvapp_agent': 'fake_agent_host_1',
'esx_host_name': FAKE_HOST_1,
'assigned_agent_host': FAKE_HOST_2}}
self.agent.hostname = FAKE_HOST_2
self.agent.esx_maintenance_mode = True
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
self.agent.net_mgr.get_driver().session = "fake_session"
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.vcenter_id = FAKE_VCENTER
with mock.patch.object(resource_util,
"get_vm_mor_by_name",
return_value="vm_mor") as vm_mor_by_name, \
mock.patch.object(resource_util,
"get_host_mor_by_name",
return_value="host_mor"
) as host_mor_by_name, \
mock.patch.object(resource_util,
"set_vm_poweroff",
side_effect=Exception()) as power_off, \
mock.patch.object(resource_util,
"set_host_into_maintenance_mode"
) as maintenance_mode, \
mock.patch.object(resource_util,
"set_host_into_shutdown_mode"
) as shutdown_mode, \
mock.patch.object(self.agent.ovsvapp_rpc,
"update_cluster_lock") as cluster_lock, \
mock.patch.object(self.LOG, 'exception') as log_exception, \
mock.patch.object(time, 'sleep'):
self.agent.device_update(FAKE_CONTEXT, **kwargs)
self.assertTrue(vm_mor_by_name.called)
self.assertTrue(host_mor_by_name.called)
self.assertTrue(power_off.called)
self.assertTrue(maintenance_mode.called)
self.assertFalse(shutdown_mode.called)
self.assertTrue(cluster_lock.called)
cluster_lock.assert_called_with(self.agent.context,
cluster_id=self.agent.cluster_id,
vcenter_id=self.agent.vcenter_id,
success=True)
self.assertTrue(log_exception.called)
def test_device_update_maintenance_mode_exception(self):
kwargs = {'device_data': {'ovsvapp_agent': 'fake_agent_host_1',
'esx_host_name': FAKE_HOST_1,
'assigned_agent_host': FAKE_HOST_2}}
self.agent.hostname = FAKE_HOST_2
self.agent.esx_maintenance_mode = True
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
self.agent.net_mgr.get_driver().session = "fake_session"
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.vcenter_id = FAKE_VCENTER
with mock.patch.object(resource_util,
"get_vm_mor_by_name",
return_value="vm_mor") as vm_mor_by_name, \
mock.patch.object(resource_util,
"get_host_mor_by_name",
return_value="host_mor"
) as host_mor_by_name, \
mock.patch.object(resource_util,
"set_vm_poweroff",
side_effect=Exception()) as power_off, \
mock.patch.object(resource_util,
"set_host_into_maintenance_mode",
side_effect=Exception()
) as maintenance_mode, \
mock.patch.object(resource_util,
"set_host_into_shutdown_mode"
) as shutdown_mode, \
mock.patch.object(self.agent.ovsvapp_rpc,
"update_cluster_lock") as cluster_lock, \
mock.patch.object(self.LOG, 'exception') as log_exception, \
mock.patch.object(time, 'sleep') as time_sleep:
self.agent.device_update(FAKE_CONTEXT, **kwargs)
self.assertTrue(vm_mor_by_name.called)
self.assertTrue(host_mor_by_name.called)
self.assertTrue(power_off.called)
self.assertTrue(maintenance_mode.called)
self.assertFalse(shutdown_mode.called)
self.assertTrue(cluster_lock.called)
cluster_lock.assert_called_with(self.agent.context,
cluster_id=self.agent.cluster_id,
vcenter_id=self.agent.vcenter_id,
success=False)
self.assertTrue(log_exception.called)
self.assertTrue(time_sleep.called)
def test_enhanced_sg_provider_updated(self):
kwargs = {'network_id': NETWORK_ID}
with mock.patch.object(self.LOG, 'info') as log_info, \
mock.patch.object(self.agent.sg_agent, "sg_provider_updated"
) as mock_sg_provider_updated:
self.agent.enhanced_sg_provider_updated(FAKE_CONTEXT, **kwargs)
self.assertTrue(log_info.called)
mock_sg_provider_updated.assert_called_with(NETWORK_ID)
def test_device_create_hosted_vm_vlan_multiple_physnet(self):
port1 = self._build_port(FAKE_PORT_1)
port2 = self._build_port(FAKE_PORT_2)
port2['physical_network'] = "physnet2"
port2['segmentation_id'] = "2005"
port2['network_id'] = "fake_net2"
ports = [port1, port2]
self._build_phys_brs(port1)
self._build_phys_brs(port2)
self.agent.phys_ofports = {}
self.agent.phys_ofports[port1['physical_network']] = 4
self.agent.phys_ofports[port2['physical_network']] = 5
self.agent.vcenter_id = FAKE_VCENTER
self.agent.cluster_id = FAKE_CLUSTER_1
self.agent.cluster_moid = FAKE_CLUSTER_MOID
self.agent.esx_hostname = FAKE_HOST_1
self.agent.tenant_network_types = [p_const.TYPE_VLAN]
self.agent.devices_up_list = []
self.agent.net_mgr = fake_manager.MockNetworkManager("callback")
self.agent.net_mgr.initialize_driver()
self.agent.int_br = mock.Mock()
self.agent.vlan_manager.mapping = {}
self.agent.patch_sec_ofport = 1
self.agent.int_ofports = {'physnet1': 2, 'physnet2': 3}
with mock.patch.object(self.agent.sg_agent, 'add_devices_to_filter'
) as mock_add_devices_fn, \
mock.patch.object(self.agent.sg_agent, 'ovsvapp_sg_update'
), \
mock.patch.object(self.agent.int_br, 'provision_local_vlan'
) as mock_prov_local_vlan, \
mock.patch.object(self.agent.sg_agent, 'expand_sg_rules',
return_value=FAKE_SG_RULES_MULTI_PORTS
), \
mock.patch.object(self.LOG, 'debug') as mock_logger_debug:
self.agent.device_create(FAKE_CONTEXT,
device=DEVICE,
ports=ports,
sg_rules=mock.MagicMock())
self.assertTrue(mock_logger_debug.called)
self.assertEqual([FAKE_PORT_1, FAKE_PORT_2],
self.agent.devices_up_list)
mock_add_devices_fn.assert_called_with(ports)
self.assertTrue(mock_prov_local_vlan.called)
mock_prov_local_vlan.assert_any_call(
port1['network_type'],
port1['lvid'],
port1['segmentation_id'],
self.agent.patch_sec_ofport,
self.agent.int_ofports['physnet1'], None)
mock_prov_local_vlan.assert_any_call(
port2['network_type'],
port2['lvid'],
port2['segmentation_id'],
self.agent.patch_sec_ofport,
self.agent.int_ofports['physnet2'], None)
| 52.54364 | 96 | 0.594227 |
5c3d7f203e69a4a9d3b74f1ef396eac261536f65 | 40 | asm | Assembly | src/main/fragment/mos6502-common/_deref_pwuz1=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-common/_deref_pwuz1=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-common/_deref_pwuz1=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | ldy #0
sta ({z1}),y
tya
iny
sta ({z1}),y | 8 | 12 | 0.55 |
f70c31b77de4c3fd0c2402f2a6267b20127cc4cb | 4,823 | h | C | fboss/agent/hw/bcm/BcmHostKey.h | nathanawmk/fboss | 9f36dbaaae47202f9131598560c65715334a9a83 | [
"BSD-3-Clause"
] | 834 | 2015-03-10T18:12:28.000Z | 2022-03-31T20:16:17.000Z | fboss/agent/hw/bcm/BcmHostKey.h | nathanawmk/fboss | 9f36dbaaae47202f9131598560c65715334a9a83 | [
"BSD-3-Clause"
] | 82 | 2015-04-07T08:48:29.000Z | 2022-03-11T21:56:58.000Z | fboss/agent/hw/bcm/BcmHostKey.h | nathanawmk/fboss | 9f36dbaaae47202f9131598560c65715334a9a83 | [
"BSD-3-Clause"
] | 296 | 2015-03-11T03:45:37.000Z | 2022-03-14T22:54:22.000Z | /*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
#include <folly/poly/Regular.h>
extern "C" {
#include <bcm/types.h>
}
#include "fboss/agent/state/RouteNextHop.h"
namespace facebook::fboss {
struct IHostKey : folly::PolyExtends<
folly::poly::IEqualityComparable,
folly::poly::IStrictlyOrderable> {
template <class Base>
struct Interface : Base {
bcm_vrf_t getVrf() const {
return folly::poly_call<0>(*this);
}
folly::IPAddress addr() const {
return folly::poly_call<1>(*this);
}
std::optional<InterfaceID> intfID() const {
return folly::poly_call<2>(*this);
}
bool hasLabel() const {
return folly::poly_call<3>(*this);
}
uint32_t getLabel() const {
return folly::poly_call<4>(*this);
}
std::string str() const {
return folly::poly_call<5>(*this);
}
bool needsMplsTunnel() const {
return folly::poly_call<6>(*this);
}
LabelForwardingAction::LabelStack tunnelLabelStack() const {
return folly::poly_call<7>(*this);
}
}; // struct Interface
template <class T>
using Members = FOLLY_POLY_MEMBERS(
&T::getVrf,
&T::addr,
&T::intfID,
&T::hasLabel,
&T::getLabel,
&T::str,
&T::needsMplsTunnel,
&T::tunnelLabelStack);
}; // struct IHostKey
using HostKey = folly::Poly<IHostKey>;
class BcmHostKey {
public:
// Constructor based on the forward info
BcmHostKey(bcm_vrf_t vrf, const NextHop& fwd)
: BcmHostKey(vrf, fwd.addr(), fwd.intfID()) {}
// Constructor based on the IP address
BcmHostKey(
bcm_vrf_t vrf,
folly::IPAddress addr,
std::optional<InterfaceID> intfID = std::nullopt);
bcm_vrf_t getVrf() const {
return vrf_;
}
folly::IPAddress addr() const {
return addr_;
}
std::optional<InterfaceID> intfID() const {
return intfID_;
}
InterfaceID intf() const {
// could throw if intfID_ does not have value
return intfID_.value();
}
bool hasLabel() const {
return false;
}
uint32_t getLabel() const {
throw FbossError("unlabeled host key has no label");
return 0;
}
bool needsMplsTunnel() const {
return false;
}
LabelForwardingAction::LabelStack tunnelLabelStack() const {
throw FbossError("unlabeled host key has no label stack");
folly::assume_unreachable();
}
std::string str() const;
friend bool operator==(const BcmHostKey& a, const BcmHostKey& b);
friend bool operator<(const BcmHostKey& a, const BcmHostKey& b);
private:
bcm_vrf_t vrf_;
folly::IPAddress addr_;
std::optional<InterfaceID> intfID_;
};
class BcmLabeledHostKey {
public:
BcmLabeledHostKey(
bcm_vrf_t vrf,
uint32_t label,
folly::IPAddress addr,
InterfaceID intfID)
: vrf_(vrf), label_(label), addr_(addr), intfID_(intfID) {}
BcmLabeledHostKey(
bcm_vrf_t vrf,
LabelForwardingAction::LabelStack labels,
folly::IPAddress addr,
InterfaceID intfID)
: vrf_(vrf), labels_(std::move(labels)), addr_(addr), intfID_(intfID) {
if (labels_.size() == 0) {
throw FbossError("invalid label stack for labeled host key");
}
}
bcm_vrf_t getVrf() const {
return vrf_;
}
folly::IPAddress addr() const {
return addr_;
}
std::optional<InterfaceID> intfID() const {
return intfID_;
}
InterfaceID intf() const {
// could throw if intfID_ does not have value
return intfID_;
}
bool hasLabel() const {
return true;
}
uint32_t getLabel() const {
return labels_.size() == 0 ? label_ : labels_.front();
}
bool needsMplsTunnel() const {
return labels_.size() > 0;
}
LabelForwardingAction::LabelStack tunnelLabelStack() const {
if (!needsMplsTunnel()) {
throw FbossError(
"tunnel label stack requested for next hop that doesn't require "
"labels");
}
return labels_;
}
std::string str() const;
friend bool operator==(
const BcmLabeledHostKey& rhs,
const BcmLabeledHostKey& lhs);
friend bool operator<(
const BcmLabeledHostKey& rhs,
const BcmLabeledHostKey& lhs);
private:
bcm_vrf_t vrf_;
uint32_t label_{0};
LabelForwardingAction::LabelStack labels_;
folly::IPAddress addr_;
InterfaceID intfID_;
};
HostKey getNextHopKey(bcm_vrf_t vrf, const NextHop& nexthop);
void toAppend(const HostKey& key, std::string* result);
std::ostream& operator<<(std::ostream& os, const HostKey& key);
} // namespace facebook::fboss
| 22.537383 | 79 | 0.649388 |
9bc1651f5e75769617029e484b804f33c2d105f0 | 4,748 | js | JavaScript | web/app/sw.js | nicolasparada/nakama | 8d5aa79aa5ab30d405354408eb60399a345a20e1 | [
"0BSD"
] | 183 | 2017-09-16T12:59:48.000Z | 2022-03-21T02:19:19.000Z | web/app/sw.js | arjundoye/nakama | 31403b79476bf5176b4f18374cf87dbd67c85008 | [
"ISC"
] | 50 | 2019-02-01T06:16:40.000Z | 2021-12-26T18:30:04.000Z | web/app/sw.js | nakamauwu/nakama | a0b481441d3400602b83c9f6681e6fb3f871ef05 | [
"0BSD"
] | 28 | 2018-01-15T16:44:09.000Z | 2022-03-10T21:09:51.000Z | const OFFLINE_VERSION = 1
const CACHE_NAME = "offline"
const OFFLINE_URL = "/offline.html"
self.addEventListener("install", ev => {
ev.waitUntil(cacheOfflinePage())
self.skipWaiting()
})
async function cacheOfflinePage() {
const cache = await caches.open(CACHE_NAME)
await cache.add(new Request(OFFLINE_URL, { cache: "reload" }))
}
self.addEventListener("activate", ev => {
ev.waitUntil(enableNavigationPreload())
self.clients.claim()
})
async function enableNavigationPreload() {
if ("navigationPreload" in self.registration) {
await self.registration.navigationPreload.enable()
}
}
self.addEventListener("fetch", ev => {
if (ev.request.mode === "navigate") {
ev.respondWith(networkWithOfflineNavigationFallback(ev))
}
})
self.addEventListener("push", ev => {
if (!ev.data) {
return
}
const n = ev.data.json()
if (!n) {
return
}
ev.waitUntil(showNotification(n))
})
self.addEventListener("notificationclick", ev => {
ev.notification.close()
ev.waitUntil(openNotificationsPage(ev.notification.data))
})
async function showNotification(n) {
const title = notificationTitle(n)
const body = notificationBody(n)
return self.registration.showNotification(title, {
body,
tag: n.id,
timestamp: n.issuedAt,
data: n,
icon: location.origin + "/icons/logo-circle-512.png",
}).then(() => {
if ("setAppBadge" in navigator) {
return navigator.setAppBadge()
}
})
}
async function openNotificationsPage(n) {
return clients.matchAll({
type: "window"
}).then(clientList => {
const pathname = notificationPathname(n)
for (const client of clientList) {
if (client.url === pathname && "focus" in client) {
return client.focus()
}
}
for (const client of clientList) {
if (client.url === "/notifications" && "focus" in client) {
return client.focus()
}
}
for (const client of clientList) {
if ("focused" in client && client.focused) {
return client.navigate(pathname).then(client => "focus" in client ? client.focus() : client)
}
if ("visibilityState" in client && client.visibilityState === "visible") {
return client.navigate(pathname).then(client => "focus" in client ? client.focus() : client)
}
}
if ("openWindow" in clients) {
return clients.openWindow(pathname)
}
}).then(client => client.postMessage({
type: "notificationclick",
detail: n,
}).then(() => {
if ("clearAppBadge" in navigator) {
return navigator.clearAppBadge()
}
}))
}
function notificationPathname(n) {
if (typeof n.postID === "string" && n.postID !== "") {
return "/posts/" + encodeURIComponent(n.postID)
}
if (n.type === "follow") {
return "/@" + encodeURIComponent(n.actors[0])
}
return "/notifications"
}
async function networkWithOfflineNavigationFallback(ev) {
try {
const preloadResponse = await ev.preloadResponse
if (preloadResponse) {
return preloadResponse
}
const networkResponse = await fetch(ev.request)
return networkResponse
} catch (error) {
const cache = await caches.open(CACHE_NAME)
const cachedResponse = await cache.match(OFFLINE_URL)
return cachedResponse
}
}
function notificationTitle(n) {
switch (n.type) {
case "follow":
return "New follow"
case "comment":
return "New commented"
case "post_mention":
return "New post mention"
case "comment_mention":
return "New comment mention"
}
return "New notification"
}
function notificationBody(n) {
const getActors = () => {
const aa = n.actors
switch (aa.length) {
case 0:
return "Someone"
case 1:
return aa[0]
case 2:
return `${aa[0]} and ${aa[1]}`
}
return `${aa[0]} and ${aa.length - 1} others`
}
const getAction = () => {
switch (n.type) {
case "follow":
return "followed you"
case "comment":
return "commented in a post"
case "post_mention":
return "mentioned you in a post"
case "comment_mention":
return "mentioned you in a comment"
}
return "did something"
}
return getActors() + " " + getAction()
}
| 26.674157 | 108 | 0.567186 |
fb939f1b07c074013025ddf6eb10e5b93d811ec8 | 729 | h | C | JSandNative/JsObjcBridge.h | ProgramerSunny/jsCallObjc | 16595f27fffcb319775bd5548b518fc2308cea81 | [
"Apache-2.0"
] | null | null | null | JSandNative/JsObjcBridge.h | ProgramerSunny/jsCallObjc | 16595f27fffcb319775bd5548b518fc2308cea81 | [
"Apache-2.0"
] | null | null | null | JSandNative/JsObjcBridge.h | ProgramerSunny/jsCallObjc | 16595f27fffcb319775bd5548b518fc2308cea81 | [
"Apache-2.0"
] | null | null | null | //
// JsObjcModel.h
// JSandNative
//
// Created by 孙扬 on 16/8/24.
// Copyright © 2016年 MichealSun. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <JavaScriptCore/JavaScriptCore.h>
@protocol PsJsObjcDelegate <JSExport>
- (void)jsCallNativeWithParam:(NSDictionary *)param;
- (NSString *)jsCallNativeWithParamWithReturn:(NSDictionary *)param;
@end
@interface JsObjcBridge : NSObject <PsJsObjcDelegate>
@property (nonatomic, weak) JSContext *jsContext;
@property (nonatomic, weak) UIWebView *webView;
@property (nonatomic, copy) void (^pSJsObjcBridgeBlock)(NSDictionary *param);
@property (nonatomic, copy) NSString *(^pSJsObjcBridgeBlockWithReturn)(NSDictionary *param);
@end
| 25.137931 | 92 | 0.759945 |
3d38a6ae07f28df74b3747a32744e4e10244fa91 | 10,220 | rs | Rust | src/reader.rs | hroi/lopdf | 6ddddc0530dccf52ab8bd0d35287a8516480389e | [
"MIT"
] | null | null | null | src/reader.rs | hroi/lopdf | 6ddddc0530dccf52ab8bd0d35287a8516480389e | [
"MIT"
] | null | null | null | src/reader.rs | hroi/lopdf | 6ddddc0530dccf52ab8bd0d35287a8516480389e | [
"MIT"
] | null | null | null | use log::{error, warn};
use std::cmp;
use std::convert::TryInto;
use std::fs::File;
use std::io::Read;
use std::path::Path;
use std::sync::Mutex;
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
use rayon::prelude::*;
use super::parser;
use super::{Document, Object, ObjectId};
use crate::object_stream::ObjectStream;
use crate::xref::XrefEntry;
use crate::{Error, Result};
use crate::error::XrefError;
impl Document {
/// Load a PDF document from a specified file path.
#[inline]
pub fn load<P: AsRef<Path>>(path: P) -> Result<Document> {
let file = File::open(path)?;
let capacity = Some(file.metadata()?.len() as usize);
Self::load_internal(file, capacity)
}
/// Load a PDF document from an arbitrary source.
#[inline]
pub fn load_from<R: Read>(source: R) -> Result<Document> {
Self::load_internal(source, None)
}
fn load_internal<R: Read>(mut source: R, capacity: Option<usize>) -> Result<Document> {
let mut buffer = capacity.map(Vec::with_capacity).unwrap_or_else(Vec::new);
source.read_to_end(&mut buffer)?;
Reader {
buffer: &buffer,
document: Document::new(),
}.read()
}
/// Load a PDF document from a memory slice.
pub fn load_mem(buffer: &[u8]) -> Result<Document> {
buffer.try_into()
}
}
impl TryInto<Document> for &[u8] {
type Error = Error;
fn try_into(self) -> Result<Document> {
Reader {
buffer: self,
document: Document::new(),
}.read()
}
}
pub struct Reader<'a> {
buffer: &'a [u8],
document: Document,
}
/// Maximum allowed embedding of literal strings.
pub const MAX_BRACKET: usize = 100;
impl <'a> Reader<'a> {
/// Read whole document.
fn read(mut self) -> Result<Document> {
// The document structure can be expressed in PEG as:
// document <- header indirect_object* xref trailer xref_start
let version = parser::header(&self.buffer).ok_or(Error::Header)?;
let xref_start = Self::get_xref_start(&self.buffer)?;
if xref_start > self.buffer.len() {
return Err(Error::Xref(XrefError::Start));
}
let (mut xref, mut trailer) = parser::xref_and_trailer(&self.buffer[xref_start..], &self)?;
// Read previous Xrefs of linearized or incremental updated document.
let mut prev_xref_start = trailer.remove(b"Prev");
while let Some(prev) = prev_xref_start.and_then(|offset| offset.as_i64().ok()) {
let prev = prev as usize;
if prev > self.buffer.len() {
return Err(Error::Xref(XrefError::PrevStart));
}
let (prev_xref, mut prev_trailer) = parser::xref_and_trailer(&self.buffer[prev..], &self)?;
xref.extend(prev_xref);
// Read xref stream in hybrid-reference file
let prev_xref_stream_start = trailer.remove(b"XRefStm");
if let Some(prev) = prev_xref_stream_start.and_then(|offset| offset.as_i64().ok()) {
let prev = prev as usize;
if prev > self.buffer.len() {
return Err(Error::Xref(XrefError::StreamStart));
}
let (prev_xref, _) = parser::xref_and_trailer(&self.buffer[prev..], &self)?;
xref.extend(prev_xref);
}
prev_xref_start = prev_trailer.remove(b"Prev");
}
let xref_entry_count = xref.max_id() + 1;
if xref.size != xref_entry_count {
warn!("Size entry of trailer dictionary is {}, correct value is {}.", xref.size, xref_entry_count);
xref.size = xref_entry_count;
}
self.document.version = version;
self.document.max_id = xref.size - 1;
self.document.trailer = trailer;
self.document.reference_table = xref;
let zero_length_streams = Mutex::new(vec![]);
let object_streams = Mutex::new(vec![]);
let entries_filter_map = |(_, entry): (&_, &_)| {
if let XrefEntry::Normal { offset, .. } = *entry {
let (object_id, mut object) = self.read_object(offset as usize, None)
.map_err(|e| error!("Object load error: {:?}", e)).ok()?;
if let Ok(ref mut stream) = object.as_stream_mut() {
if stream.dict.type_is(b"ObjStm") {
let obj_stream = ObjectStream::new(stream).ok()?;
let mut object_streams = object_streams.lock().unwrap();
object_streams.extend(obj_stream.objects);
} else if stream.content.is_empty() {
let mut zero_length_streams = zero_length_streams.lock().unwrap();
zero_length_streams.push(object_id);
}
}
Some((object_id, object))
} else {
None
}
};
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
{
self.document.objects = self.document.reference_table.entries.par_iter().filter_map(entries_filter_map).collect();
}
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
{
self.document.objects = self.document.reference_table.entries.iter().filter_map(entries_filter_map).collect();
}
self.document.objects.extend(object_streams.into_inner().unwrap());
for object_id in zero_length_streams.into_inner().unwrap() {
let _ = self.set_stream_content(object_id);
}
Ok(self.document)
}
fn set_stream_content(&mut self, object_id: ObjectId) -> Result<()> {
let length = self.get_stream_length(object_id)?;
let stream = self.document.get_object_mut(object_id).and_then(Object::as_stream_mut)?;
let start = stream.start_position.ok_or(Error::ObjectNotFound)?;
if length < 0 {
return Err(Error::Syntax("Negative stream length.".to_string()));
}
let end = start + length as usize;
if end > self.buffer.len() {
return Err(Error::Syntax("Stream extends after document end.".to_string()));
}
stream.set_content(self.buffer[start..end].to_vec());
Ok(())
}
fn get_stream_length(&self, object_id: ObjectId) -> Result<i64> {
let object = self.document.get_object(object_id)?;
let stream = object.as_stream()?;
stream.dict.get(b"Length").and_then(|value| {
if let Ok(id) = value.as_reference() {
return self.document.get_object(id).and_then(Object::as_i64);
}
value.as_i64()
})
}
/// Get object offset by object id.
fn get_offset(&self, id: ObjectId) -> Result<u32> {
let entry = self.document.reference_table.get(id.0).ok_or(Error::ObjectNotFound)?;
match *entry {
XrefEntry::Normal { offset, generation } => {
if id.1 == generation {
Ok(offset)
} else {
Err(Error::ObjectNotFound)
}
}
_ => Err(Error::ObjectNotFound),
}
}
pub fn get_object(&self, id: ObjectId) -> Result<Object> {
let offset = self.get_offset(id)?;
let (_, obj) = self.read_object(offset as usize, Some(id))?;
Ok(obj)
}
fn read_object(&self, offset: usize, expected_id: Option<ObjectId>) -> Result<(ObjectId, Object)> {
if offset > self.buffer.len() {
return Err(Error::Offset(offset));
}
parser::indirect_object(&self.buffer, offset, expected_id, self)
}
fn get_xref_start(buffer: &[u8]) -> Result<usize> {
let seek_pos = buffer.len() - cmp::min(buffer.len(), 512);
Self::search_substring(buffer, b"%%EOF", seek_pos)
.and_then(|eof_pos| if eof_pos > 25 { Some(eof_pos) } else { None })
.and_then(|eof_pos| Self::search_substring(buffer, b"startxref", eof_pos - 25))
.ok_or(Error::Xref(XrefError::Start))
.and_then(|xref_pos| if xref_pos <= buffer.len() {
match parser::xref_start(&buffer[xref_pos..]) {
Some(startxref) => Ok(startxref as usize),
None => Err(Error::Xref(XrefError::Start)),
}
} else {
Err(Error::Xref(XrefError::Start))
})
}
fn search_substring(buffer: &[u8], pattern: &[u8], start_pos: usize) -> Option<usize> {
let mut seek_pos = start_pos;
let mut index = 0;
while seek_pos < buffer.len() && index < pattern.len() {
if buffer[seek_pos] == pattern[index] {
index += 1;
} else if index > 0 {
seek_pos -= index;
index = 0;
}
seek_pos += 1;
if index == pattern.len() {
let res = seek_pos - index;
return Self::search_substring(buffer, pattern, res + 1).or(Some(res));
}
}
None
}
}
#[test]
fn load_document() {
let mut doc = Document::load("assets/example.pdf").unwrap();
assert_eq!(doc.version, "1.5");
doc.save("test_2_load.pdf").unwrap();
}
#[test]
#[should_panic(expected = "Xref(Start)")]
fn load_short_document() {
let _doc = Document::load_mem(b"%PDF-1.5\n%%EOF\n").unwrap();
}
#[test]
fn load_many_shallow_brackets() {
let content: String = std::iter::repeat("()").take(MAX_BRACKET*10).map(|x| x.chars()).flatten().collect();
const STREAM_CRUFT: usize = 33;
let doc = format!("%PDF-1.5
1 0 obj<</Type/Pages/Kids[5 0 R]/Count 1/Resources 3 0 R/MediaBox[0 0 595 842]>>endobj
2 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier>>endobj
3 0 obj<</Font<</F1 2 0 R>>>>endobj
5 0 obj<</Type/Page/Parent 1 0 R/Contents[4 0 R]>>endobj
6 0 obj<</Type/Catalog/Pages 1 0 R>>endobj
4 0 obj<</Length {}>>stream
BT
/F1 48 Tf
100 600 Td
({}) Tj
ET
endstream endobj\n", content.len() + STREAM_CRUFT, content);
let doc = format!("{}xref
0 7
0000000000 65535 f
0000000009 00000 n
0000000096 00000 n
0000000155 00000 n
0000000291 00000 n
0000000191 00000 n
0000000248 00000 n
trailer
<</Root 6 0 R/Size 7>>
startxref
{}
%%EOF", doc, doc.len());
let _doc = Document::load_mem(doc.as_bytes()).unwrap();
}
#[test]
fn load_too_deep_brackets() {
let content: Vec<u8> = std::iter::repeat(b'(').take(MAX_BRACKET+1).chain(std::iter::repeat(b')').take(MAX_BRACKET+1)).collect();
let content = String::from_utf8(content).unwrap();
const STREAM_CRUFT: usize = 33;
let doc = format!("%PDF-1.5
1 0 obj<</Type/Pages/Kids[5 0 R]/Count 1/Resources 3 0 R/MediaBox[0 0 595 842]>>endobj
2 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier>>endobj
3 0 obj<</Font<</F1 2 0 R>>>>endobj
5 0 obj<</Type/Page/Parent 1 0 R/Contents[7 0 R 4 0 R]>>endobj
6 0 obj<</Type/Catalog/Pages 1 0 R>>endobj
7 0 obj<</Length 45>>stream
BT /F1 48 Tf 100 600 Td (Hello World!) Tj ET
endstream
endobj
4 0 obj<</Length {}>>stream
BT
/F1 48 Tf
100 600 Td
({}) Tj
ET
endstream endobj\n", content.len() + STREAM_CRUFT, content);
let doc = format!("{}xref
0 7
0000000000 65535 f
0000000009 00000 n
0000000096 00000 n
0000000155 00000 n
0000000387 00000 n
0000000191 00000 n
0000000254 00000 n
0000000297 00000 n
trailer
<</Root 6 0 R/Size 7>>
startxref
{}
%%EOF", doc, doc.len());
let doc = Document::load_mem(doc.as_bytes()).unwrap();
let pages = doc.get_pages().keys().map(|r| *r).collect::<Vec<_>>();
assert_eq!("Hello World!\n", doc.extract_text(&pages).unwrap());
}
| 29.45245 | 129 | 0.670254 |
2a42dc9a092b9fbca03fccfc96fcd4d441c0c908 | 4,849 | java | Java | parser/src/main/java/io/lindstrom/mpd/support/DurationDeserializer.java | AlecJY/mpd-tools | 7991b15e44e7152aa8da9278790452fea03aaeff | [
"MIT"
] | null | null | null | parser/src/main/java/io/lindstrom/mpd/support/DurationDeserializer.java | AlecJY/mpd-tools | 7991b15e44e7152aa8da9278790452fea03aaeff | [
"MIT"
] | null | null | null | parser/src/main/java/io/lindstrom/mpd/support/DurationDeserializer.java | AlecJY/mpd-tools | 7991b15e44e7152aa8da9278790452fea03aaeff | [
"MIT"
] | null | null | null | package io.lindstrom.mpd.support;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;
import java.time.Duration;
import java.time.format.DateTimeParseException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class DurationDeserializer extends JsonDeserializer<Duration> {
private static final int HOURS_PER_YEAR = 8766;
private static final int MINUTES_PER_MONTH = 43830;
private static final int HOURS_PER_DAY = 24;
// PnYnMnDTnHnMnS
private static final Pattern PATTERN =
Pattern.compile("([-+]?)P" +
"(?:([-+]?[0-9]+)Y)?" +
"(?:([-+]?[0-9]+)M)?" +
"(?:([-+]?[0-9]+)D)?" +
"(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]+))?S)?)?",
Pattern.CASE_INSENSITIVE);
private static Duration estimateDuration(long years, long months, long days) {
if (years > 0 || months > 0 || days > 0) {
return Duration.ofHours(HOURS_PER_YEAR * years)
.plusMinutes(MINUTES_PER_MONTH * months)
.plusHours(HOURS_PER_DAY * days);
} else {
return Duration.ZERO;
}
}
private static boolean isNegative(CharSequence text, int start, int end) {
return (start >= 0 && end == start + 1 && text.charAt(start) == '-');
}
static long parseFraction(CharSequence text, int start, int end, boolean negate) {
// regex limits to [0-9]{0,12}
if (start < 0 || end < 0 || end - start == 0) {
return 0;
}
// Duration only handle nano second resolution but xs:duration allows 12 decimals.
if (end - start > 9) {
end = start + 9;
}
long fraction = Long.parseLong(text, start, end, 10);
// for number strings smaller than 9 digits, interpret as if there were trailing zeros
for (int i = end - start; i < 9; i++) {
fraction *= 10;
}
if (negate) {
return -fraction;
} else {
return fraction;
}
}
private Duration parse(String text) {
Matcher matcher = PATTERN.matcher(text);
if (!matcher.matches()) {
throw new DateTimeParseException("Text cannot be parsed to a Duration", text, 0);
}
boolean negate = isNegative(text, matcher.start(1), matcher.end(1));
int yearStart = matcher.start(2), yearEnd = matcher.end(2);
int monthStart = matcher.start(3), monthEnd = matcher.end(3);
int dayStart = matcher.start(4), dayEnd = matcher.end(4);
int hourStart = matcher.start(6), hourEnd = matcher.end(6);
int minuteStart = matcher.start(7), minuteEnd = matcher.end(7);
int secondStart = matcher.start(8), secondEnd = matcher.end(8);
int fractionStart = matcher.start(9), fractionEnd = matcher.end(9);
int years = 0;
int months = 0;
int days = 0;
long hoursAsSecs = 0;
long minutesAsSecs = 0;
long seconds = 0;
long nanos = 0;
if (yearStart >= 0) {
years = Integer.parseInt(text, yearStart, yearEnd, 10);
}
if (monthStart >= 0) {
months = Integer.parseInt(text, monthStart, monthEnd, 10);
}
if (dayStart >= 0) {
days = Integer.parseInt(text, dayStart, dayEnd, 10);
}
if (hourStart >= 0) {
hoursAsSecs = Math.multiplyExact(3600L, Integer.parseInt(text, hourStart, hourEnd, 10));
}
if (minuteStart >= 0) {
minutesAsSecs = Math.multiplyExact(60L, Integer.parseInt(text, minuteStart, minuteEnd, 10));
}
if (secondStart >= 0) {
seconds = Integer.parseInt(text, secondStart, secondEnd, 10);
boolean negativeSecs = text.charAt(secondStart) == '-';
nanos = parseFraction(text, fractionStart, fractionEnd, negativeSecs);
}
long secondsTotal = Math.addExact(hoursAsSecs, Math.addExact(minutesAsSecs, seconds));
Duration duration = Duration.ofSeconds(secondsTotal, nanos).plus(estimateDuration(years, months, days));
if (negate) {
return duration.negated();
}
return duration;
}
@Override
public Duration deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
String text = p.getText();
try {
return parse(text);
} catch (Exception e) {
ctxt.reportWrongTokenException(this, p.currentToken(), "Text cannot be parsed to a Duration");
}
return null;
}
}
| 34.390071 | 112 | 0.573108 |
dd6e7b41ebcaa60bb3c323a66cc857c0f360aa0c | 3,644 | kt | Kotlin | mobile/src/main/java/ceg/avtechlabs/mba/ui/FavoritesActivity.kt | v-adhithyan/mba | e6fc0101bc5a914b56cec287a42a8dfb61169101 | [
"MIT"
] | 13 | 2017-06-11T04:25:10.000Z | 2020-09-28T07:05:56.000Z | mobile/src/main/java/ceg/avtechlabs/mba/ui/FavoritesActivity.kt | v-adhithyan/mba | e6fc0101bc5a914b56cec287a42a8dfb61169101 | [
"MIT"
] | null | null | null | mobile/src/main/java/ceg/avtechlabs/mba/ui/FavoritesActivity.kt | v-adhithyan/mba | e6fc0101bc5a914b56cec287a42a8dfb61169101 | [
"MIT"
] | 2 | 2018-04-16T09:50:27.000Z | 2018-06-12T23:20:31.000Z | package ceg.avtechlabs.mba.ui
import android.app.ProgressDialog
import android.content.Context
import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v7.widget.DefaultItemAnimator
import android.support.v7.widget.LinearLayoutManager
import android.util.Log
import android.view.View
import ceg.avtechlabs.mba.R
import ceg.avtechlabs.mba.adapters.FavoritesAdapter
import ceg.avtechlabs.mba.listeners.FavItemClickListener
import ceg.avtechlabs.mba.models.DronaDBHelper
import ceg.avtechlabs.mba.models.FavObject
import ceg.avtechlabs.mba.util.Globals
import cn.pedant.SweetAlert.SweetAlertDialog
import kotlinx.android.synthetic.main.favorite_content.*
import rx.Observable
import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper
import java.util.*
class FavoritesActivity : AppCompatActivity(), FavItemClickListener {
var progressDialog: SweetAlertDialog? = null
var favorites = ArrayList<FavObject>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
showProgressDialog()
Thread {
try {
Thread.sleep(1000)
} catch (ex: Exception) {}
}.start()
Observable.just<Unit>(Unit)
.map { DronaDBHelper(this@FavoritesActivity).getFavorites() }
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe { fav -> setContent(fav) }
}
override fun attachBaseContext(newBase: Context) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase))
}
private fun setContent(favorites: ArrayList<FavObject>?) {
if(favorites!!.size <= 0) {
setContentView(R.layout.activity_favorites)
} else {
setContentView(R.layout.favorite_content)
recycler_favorites.layoutManager = LinearLayoutManager(this)
recycler_favorites.itemAnimator = DefaultItemAnimator()
recycler_favorites.setHasFixedSize(true)
val adapter = FavoritesAdapter(this, favorites!!)
adapter.setClickListener(this)
recycler_favorites.adapter = adapter
this.favorites = favorites
}
hideProgressDialog()
}
private fun showProgressDialog() {
try{
progressDialog = SweetAlertDialog(this, SweetAlertDialog.PROGRESS_TYPE)
progressDialog!!.progressHelper!!.barColor = R.color.colorAccent
progressDialog!!.titleText = getString(R.string.loading)
progressDialog!!.setCancelable(false)
progressDialog!!.show()
} catch (ex: Exception) {
}
}
private fun hideProgressDialog() {
if(progressDialog!!.isShowing) { progressDialog!!.dismissWithAnimation() }
}
override fun onClick(view: View, position: Int) {
val fav = favorites[position]
val intent = Intent(this, FavorieReaderActivity::class.java)
intent.putExtra(NotificationReader.INTENT_READ_TITLE, fav.title)
intent.putExtra(NotificationReader.INTENT_READ_DESC, fav.content)
intent.putExtra(NotificationReader.INTENT_PUB_DATA, fav.date)
intent.putExtra(NotificationReader.INTENT_READ_URl, fav.imageUrl)
intent.putExtra(NotificationReader.INTENT_SOURCE, Globals.SOURCE_FAV)
startActivity(intent)
finish()
}
}
| 36.44 | 84 | 0.68551 |
d0d3b3ebbd3e3575c1a49f4f47b79f98b1ce308b | 1,788 | css | CSS | teorias.css | JessGCG/projeto-calinho | b7ddd286dfc4ff5088aae8d5f33ea3b6171fcd01 | [
"MIT"
] | null | null | null | teorias.css | JessGCG/projeto-calinho | b7ddd286dfc4ff5088aae8d5f33ea3b6171fcd01 | [
"MIT"
] | null | null | null | teorias.css | JessGCG/projeto-calinho | b7ddd286dfc4ff5088aae8d5f33ea3b6171fcd01 | [
"MIT"
] | null | null | null | :root{
--cor0: #DEC9DD;
--cor1: #FF36F9;
--cor2: #B720E3;
--cor3: #9B2FFA;
--cor4: #6732E6;
--cor5: #2E23FB;
}
body{
margin: 0px;
background-color: var(--cor0);
}
header{
background-image: linear-gradient(to bottom, var(--cor2), var(--cor4));
height: 150px;
}
header > h1{
text-align: center;
color: white;
font-family: Arial, Helvetica, sans-serif;
margin: 0px;
padding: 20px;
}
header > p{
text-align: center;
color: white;
font-family: Arial, Helvetica, sans-serif;
padding: 35px 20px 20px 20px;
margin: 0px;
}
main{
background-color: white;
margin: auto;
max-width: 700px;
min-width: 300px;
padding: 20px;
}
main > h2{
margin: 0px;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
}
main > p{
font-family: Arial, Helvetica, sans-serif;
text-indent: 20px;
}
main > img{
width: 100%;
}
article{
padding: 20px;
max-width: 700px;
min-width: 300px;
background-color: white;
margin: auto;
height: 465px;
border-radius: 0px 0px 5px 5px;
}
article > h3{
font-family: Arial, Helvetica, sans-serif;
}
article > div{
background-color: var(--cor3);
padding: 20px;
padding-bottom: 50%;
margin: 0px -20px 0px -20px;
position: relative;
}
article > input{
display: block;
margin: auto;
margin-top: 20px;
padding: 5px 10px 5px 10px;
font-family: Arial, Helvetica, sans-serif;
border-radius: 5px;
}
iframe{
position: absolute;
top: 5%;
left: 5%;
width: 90%;
height: 90%;
}
footer{
background-color: var(--cor5);
margin-top: 20px;
padding: 5px;
}
footer > p{
font-size: 20px;
color: white;
text-align: center;
margin: 0px;
} | 16.254545 | 75 | 0.59396 |
6ee90de67f4994bc15846f6cee581deb6951aac8 | 12,017 | html | HTML | _posts/2009-03-18-tracking-atlassian-confluence-usage-with-google-analytics.html | dvdsmpsn/dvdsmpsn.github.io | 27536810aeddd09275bac8265bfc8c086d9adba5 | [
"MIT"
] | null | null | null | _posts/2009-03-18-tracking-atlassian-confluence-usage-with-google-analytics.html | dvdsmpsn/dvdsmpsn.github.io | 27536810aeddd09275bac8265bfc8c086d9adba5 | [
"MIT"
] | null | null | null | _posts/2009-03-18-tracking-atlassian-confluence-usage-with-google-analytics.html | dvdsmpsn/dvdsmpsn.github.io | 27536810aeddd09275bac8265bfc8c086d9adba5 | [
"MIT"
] | null | null | null | ---
layout: post
title: Tracking Atlassian Confluence Server usage with Google Analytics
date: 2009-03-18 18:45:56.000000000 +00:00
type: post
published: true
status: publish
categories:
- analytics
- Uncategorised
tags:
- analytics
- atlassian
- confluence
- google analytics
- wiki
meta:
aktt_notify_twitter: 'no'
_syntaxhighlighter_encoded: '1'
_topsy_cache_timestamp: '1299703991'
_topsy_long_url: /2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/
topsy_short_url: http://bit.ly/9e90vC
_edit_last: '1'
tmac_last_id: '618797412237193216'
_thumbnail_id: '2119'
_pingme: '1'
_encloseme: '1'
author: David Simpson
excerpt_separator: <!--more-->
---
<p><a href="#update2020-03-03" title="Tracking Atlassian Confluence Cloud usage with Google Analytics">Updated 2020-03-03</a>: Tracking Atlassian Confluence Cloud usage with Google Analytics</p>
<p><a href="#update2014-08-14">Updated 2014-08-14</a>: Added Universal Analytics tracking code</p>
<p>Updated 2011-06-30: Changed to asynchronous Google Analytics tracking</p>
<p>You've chosen <a href="http://www.atlassian.com/software/confluence/">Confluence</a> as your Enterprise wiki and got it installed. People are using it. But how many people?</p>
<p>You could have a look at the <strong>Global Activity</strong> page on Confluence, but this might confuse matters. </p>
<p><a href="/wp-content/uploads/2009/03/confluence-global-activity1.png"><img src="{{ site.baseurl }}/wp-content/uploads/2009/03/confluence-global-activity1.png" alt="" title="Confluence - Global Activity" width="284" height="300" class="alignnone size-medium wp-image-217" /></a></p>
<p>You'll get to see graphs, but what do they really mean? The Global Activity statistics are at best very basic.</p>
<p>Better still, install Google Analytics and you'll have a much more accurate idea of what's going on. Best of all, it's really easy to install.<br />
<!--more-->
<h2>How to install Google Analytics on Confluence</h2>
<p>I'm assuming (for my sake) that you already know your way around Google Analytics.</p>
<h3>In Google Analytics</h3>
<p>Login to Google Analytics and add a new website profile</p>
<p>The settings will roughly mirror those in the screenshot below</p>
<p>
<a href="/wp-content/uploads/2009/03/google-analytics-account-settings.png">
<img src="{{ site.baseurl }}/wp-content/uploads/2009/03/google-analytics-account-settings.png" alt="" title="Google Analytics - Account Settings" />
</a>
</p>
<p>Make sure that you check "Do Track Site Search" against Site Search. Add <strong>queryString</strong> as the Query Parameter. This will allow you to monitor who is searching for what. </p>
<p><strong>Update (2009-11-12)</strong><br />
<em>Edit the Search Settings configuration like in the image to see search terms grouped by spaceKey in the internal search categories reports. Further details why can be seen <a href="/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/">here</a></em> </p>
<p>
<a href="/wp-content/uploads/2009/04/settings-site-search.png">
<img src="{{ site.baseurl }}/wp-content/uploads/2009/04/settings-site-search.png" alt="Settings - Site Search" title="settings-site-search" />
</a>
</p>
<p>The top search terms will suggest either content that's missing from the site, or something that is not easily found in the current information architecture. Either way, tracking this and acting on the findings should improve the user experience.</p>
<h3>In Confluence</h3>
<p>Login to Confluence as an administrator and add the GA tracking javascript code to the end of the page body...</p>
<p>Navigate to:</p>
<p>Dashboard | Administration | Look and Feel | Custom HTML</p>
<p>
<a href="/wp-content/uploads/2009/03/confluence-custom-html-1.png">
<img src="{{ site.baseurl }}/wp-content/uploads/2009/03/confluence-custom-html-1.png" alt="" title="Confluence - Custom HTML" />
</a>
</p>
<p>Click on the "Edit" button and add the javascript sample (with your tracker code) to the "At end of the HEAD" section:</p>
<p>
<a href="/wp-content/uploads/2009/03/confluence-custom-html-2.png">
<img src="{{ site.baseurl }}/wp-content/uploads/2009/03/confluence-custom-html-2.png" alt="" title="Confluence - Edit Custom HTML />
</a>
</p>
<p><b>Updated 2011-06-30: Changed to asynchronous Google Analytics tracking</b></p>
<pre><code>
<script type="text/javascript">
// See: /2009/03/18/tracking-atlassian-confluence-usage-with-google-analytics/
// Put this in Confluence Administration | Look and Feel | Custom HTML -- "At end of the HEAD"
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXX-XX']); // Your GA code here
_gaq.push(['_trackPageview']);</p>
// Add a page-level custom variable to record the space-key
if (typeof jQuery('meta[name=confluence-space-key]').attr("content") == 'string') {
_gaq.push(['_setCustomVar',
1, // This custom var is set to slot #1 of 5
'confluence-space-key', // The name acts as a kind of category for the user activity
jQuery('meta[name=confluence-space-key]').attr("content"), // This value of the custom variable
3 // Sets the scope to page-level
]);
}
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</code></pre>
<h2 id="update2014-08-14">Update 2014-08-14: Universal Analytics tracking code</h2>
<p>With the changes for Universal Analytics, custom variables have been replaced by custom dimensions. Currently there is not way to migrate data stored in custom variable into custom dimensions, so you'll just have to bite the bullet and hope for the best.</p>
<p>Additionally, unlike custom variables (which you could create on the fly with JavaScript) you now have to do some work in Google Analytics to set up a custom dimension.</p>
<h3>In Google Analytics</h3>
<p>Browse to <a href="https://www.google.com/analytics/web/?hl=en#management">Google Analytics Administration</a>. </p>
<ul>
<li>Select an <b>Account</b> and then a <b>Property</b> within that account</li>
<li>Expand <b>Custom Definitions</b> below a selected Property</li>
<li>Select <b>Custom Dimensions</b></li>
<li>Click on the <b>Custom Dimension Name</b> button</li>
<li>In the Add Custom Dimension screen
<ul>
<li>Type <b>Confluence Space Key</b> in the Name field</li>
<li>Select <b>Hit</b> from the <b>Scope</b> dropdown menu</li>
<li>Check the <b>Active</b> checkbox</li>
<li>Click the <b>Create</b> button</li>
</ul>
</li>
</ul>
<p>You now have a Custom Dimension named <b>Confluence Space Key</b> which is available for use within the Google Analytics interface. Next, you’ll need to populate this custom dimension with some data. </p>
<h3>In Confluence</h3>
<p>Browse to <b>Confluence Administration | Look and Feel | Custom HTML</b> and paste this in <b>At the END of the HEAD</b>:</p>
<pre><code>
<script>
// Standard Google Universal Analytics code
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=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.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
AJS.toInit(function(){
ga('create', 'UA-XXXX-Y', 'auto');
// Add a page-level custom variable to record the space-key
if (typeof AJS.params.spaceKey === 'string') {
ga('set', 'dimension1', AJS.params.spaceKey); // Set a `spaceKey` dimension at page level
}
ga('send', 'pageview');
});
</script>
</code></pre>
<h2>Results</h2>
<p>This works nicely, particularly as the <strike>custom variable</strike> custom dimension allows us to easily track all space related content separately, and thus facilitate the use of the <a href="https://plugins.atlassian.com/plugin/details/16722">(Google) Analytics reporting plugin for Confluence</a>.</p>
<p>
Screenshot of Content by Title report:<br />
<a href="/wp-content/uploads/2009/03/ga-results-content-by-title1.png">
<img src="{{ site.baseurl }}/wp-content/uploads/2009/03/ga-results-content-by-title1.png" alt="" title="Google Analytics Results - Content by Title" />
</a>
</p>
<p>
Screenshot of Site Search Terms report:<br />
<a href="/wp-content/uploads/2009/03/ga-results-site-search.png">
<img src="{{ site.baseurl }}/wp-content/uploads/2009/03/ga-results-site-search.png" alt="" title="Google Analytics Results - Site Search" />
</a>
</p>
<h2>Additional Notes</h2>
<h3>Note for users of Zen Foundation</h3>
<p>Zen Foundation overrides the <b>At the end of the HEAD</b> field, so adding the tracking code there will fail for Zen Foundation users. Instead, pop it at the end of the BODY.</p>
<h3>Note for users of Google Analytics plugins that track user's names</h3>
<p>If you're using a plugin that tracks users names by sending the name to Google, you will be in violation of the Google Analytics Terms of Service. Find out more by reading <a href="/2013/10/17/identifying-your-users-in-google-analytics-while-complying-with-section-7-of-the-terms-of-service/">Identifying your users in Google Analytics while complying with section 7 of the terms of service</a>. </p>
<p>If you are unsure of the plugin's compliance with the Google Analytics Terms of Service, <b>ask the plugin vendor for more details of how they comply</b> with <a href="/2013/10/17/identifying-your-users-in-google-analytics-while-complying-with-section-7-of-the-terms-of-service/">comply with section 7 of the Google Analytics terms of service</a>. </p>
<p>To prevent you from falling foul of this, I recommend AppFusions' <a href="http://www.appfusions.com/display/GANLC/Home">Google Analytics for Confluence</a> add-on which is <b>fully compliant with section 7 of the terms of service</b>.</p>
<h2 id="update2020-03-03">Tracking Atlassian Confluence Cloud usage with Google Analytics</h2>
<p>This method is not possible for Confluence Cloud because Atlassian do not allow you to add JavaScript code into their cloud products</p>
<p>Instead, the best option is to install an app which provides the same solution</p>
<ul>
<li><a target="_blank" href="https://dsapps.dev/">Google Analytics in Confluence - product website</a></li>
<li><a target="_blank" href="https://marketplace.atlassian.com/plugins/me.davidsimpson.confluence.addon.google-analytics-for-confluence/cloud/overview">Google Analytics in Confluence - Atlassian Marketplace Listing</a></li>
<li><a target="_blank" href="https://dsapps.atlassian.net/wiki/display/analytics/Documentation">Google Analytics in Confluence - Documentation</a></li>
</ul>
<h2>Further reading</h2>
<ul>
<li><a href="/2013/10/17/identifying-your-users-in-google-analytics-while-complying-with-section-7-of-the-terms-of-service/">Identifying your users in Google Analytics while complying with section 7 of the terms of service</a></li>
<li><a href="/2009/04/16/4-useful-tips-on-google-analytics-reporting-for-confluence/">4 Useful Tips on Google Analytics Reporting for Confluence</a></li>
<li><a href="/2010/01/02/announcing-google-analytics-plugin-for-confluence/">Announcing: Google Analytics plugin for Confluence</a></li>
</ul>
| 59.78607 | 404 | 0.697345 |
41021bafb05ec8077b07abc058ea2110af446e5e | 638 | c | C | base/headless/test/c/sacsec/sacsec.c | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/headless/test/c/sacsec/sacsec.c | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/headless/test/c/sacsec/sacsec.c | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | #include <windows.h>
#include <winioctl.h>
#include <stdio.h>
#include <malloc.h>
#include <Shlwapi.h>
#include <ntddsac.h>
#include <sacapi.h>
int _cdecl wmain(int argc, WCHAR **argv)
{
HANDLE SacHandle;
BOOL Status;
//
// Open the SAC
//
// SECURITY:
//
// this handle cannot be inherited
//
SacHandle = CreateFile(
L"\\\\.\\SAC\\",
0x1F01FF,
0,
NULL,
OPEN_EXISTING,
0,
NULL
);
if (SacHandle == INVALID_HANDLE_VALUE) {
Status = FALSE;
}
return 0;
}
| 14.837209 | 45 | 0.478056 |
9c60ce6d85aca261ae1043df6bdd467bf3c5ed10 | 166 | js | JavaScript | src/shaderGraph/point.js | raggedgenes/w-gl | 3dd98af5f64c05a3b83e3d931f832e0df8f459d9 | [
"MIT"
] | null | null | null | src/shaderGraph/point.js | raggedgenes/w-gl | 3dd98af5f64c05a3b83e3d931f832e0df8f459d9 | [
"MIT"
] | null | null | null | src/shaderGraph/point.js | raggedgenes/w-gl | 3dd98af5f64c05a3b83e3d931f832e0df8f459d9 | [
"MIT"
] | null | null | null | export default {
globals() {
return `
attribute float aPointSize;
`;
},
mainBody() {
return `
gl_PointSize = aPointSize * transformed[0][0];
`;
}
}; | 13.833333 | 48 | 0.596386 |
c7e00f4c83ea790ce50113696ec6fc270364ee29 | 1,087 | java | Java | webapp/src/main/java/simulation/data/gisdata/routes/Routes.java | GeoTecINIT/parking_occupancy_simulator | 1f3b5d59da51069d2b3008f1d1793c5683088223 | [
"MIT"
] | null | null | null | webapp/src/main/java/simulation/data/gisdata/routes/Routes.java | GeoTecINIT/parking_occupancy_simulator | 1f3b5d59da51069d2b3008f1d1793c5683088223 | [
"MIT"
] | null | null | null | webapp/src/main/java/simulation/data/gisdata/routes/Routes.java | GeoTecINIT/parking_occupancy_simulator | 1f3b5d59da51069d2b3008f1d1793c5683088223 | [
"MIT"
] | null | null | null | package simulation.data.gisdata.routes;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Routes {
private FieldAliases fieldAliases;
private String geometryType;
private SRSpatialReference spatialReference;
private List<ResponseFeature> features;
public Routes() {}
public Routes(FieldAliases fieldAliases, String geometryType,
SRSpatialReference spatialReference, List<ResponseFeature> features) {
super();
this.fieldAliases = fieldAliases;
this.geometryType = geometryType;
this.spatialReference = spatialReference;
this.features = features;
}
public FieldAliases getFieldAliases() {
return fieldAliases;
}
public String getGeometryType() {
return geometryType;
}
public SRSpatialReference getSpatialReference() {
return spatialReference;
}
public List<ResponseFeature> getFeatures() {
return features;
}
}
| 24.704545 | 74 | 0.76173 |
d37838a022f32a8c4810a6bb4f06c893ada923cf | 785 | sql | SQL | prisma/migrations/20220205134511_first_migration/migration.sql | ThisIsBenny/wishlist-webapp | 2e7ea74271cfeb2f799f56be2e843c1e0a483446 | [
"MIT"
] | null | null | null | prisma/migrations/20220205134511_first_migration/migration.sql | ThisIsBenny/wishlist-webapp | 2e7ea74271cfeb2f799f56be2e843c1e0a483446 | [
"MIT"
] | null | null | null | prisma/migrations/20220205134511_first_migration/migration.sql | ThisIsBenny/wishlist-webapp | 2e7ea74271cfeb2f799f56be2e843c1e0a483446 | [
"MIT"
] | null | null | null | -- CreateTable
CREATE TABLE "Wishlist" (
"id" TEXT NOT NULL PRIMARY KEY,
"title" TEXT NOT NULL,
"imageSrc" TEXT NOT NULL,
"slugUrlText" TEXT NOT NULL,
"description" TEXT NOT NULL DEFAULT ''
);
-- CreateTable
CREATE TABLE "Item" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"title" TEXT NOT NULL,
"url" TEXT NOT NULL DEFAULT '',
"imageSrc" TEXT NOT NULL DEFAULT '',
"description" TEXT NOT NULL,
"comment" TEXT NOT NULL DEFAULT '',
"bought" BOOLEAN NOT NULL DEFAULT false,
"wishlistId" TEXT NOT NULL,
CONSTRAINT "Item_wishlistId_fkey" FOREIGN KEY ("wishlistId") REFERENCES "Wishlist" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Wishlist_slugUrlText_key" ON "Wishlist"("slugUrlText");
| 31.4 | 130 | 0.689172 |
4a5f3ca4a2fb5a8b70b4cbc42b315ad6e65073aa | 236 | js | JavaScript | app/directives/list-item-custom/list-item-custom.ctrl.js | Hantiro/admin-template | fe1cf532c1a20d9067d276f8a044262629e045b0 | [
"MIT"
] | null | null | null | app/directives/list-item-custom/list-item-custom.ctrl.js | Hantiro/admin-template | fe1cf532c1a20d9067d276f8a044262629e045b0 | [
"MIT"
] | null | null | null | app/directives/list-item-custom/list-item-custom.ctrl.js | Hantiro/admin-template | fe1cf532c1a20d9067d276f8a044262629e045b0 | [
"MIT"
] | null | null | null | ;(function () {
'use strict';
angular
.module('app')
.controller('ListItemCustomCtrl', ListItemCustomCtrl);
ListItemCustomCtrl.$inject = ['$scope'];
function ListItemCustomCtrl($scope) {
}
})();
| 15.733333 | 62 | 0.588983 |
d5565d4b43ab02a180afcc8e0784bbee27ab806d | 940 | swift | Swift | THJG/THJG/Module/HomePage/Model/THJGProMarketInfoBean.swift | shengguoqiang/yyjg | 6620887dd54ba6c557d317e32aba422c328f5798 | [
"MIT"
] | null | null | null | THJG/THJG/Module/HomePage/Model/THJGProMarketInfoBean.swift | shengguoqiang/yyjg | 6620887dd54ba6c557d317e32aba422c328f5798 | [
"MIT"
] | null | null | null | THJG/THJG/Module/HomePage/Model/THJGProMarketInfoBean.swift | shengguoqiang/yyjg | 6620887dd54ba6c557d317e32aba422c328f5798 | [
"MIT"
] | null | null | null | /**
* 市场情况实体
*/
struct THJGProMarketInfoBean: THJGBaseBean {
var projectName: String
var marketInfos: [MarketInfoBean]
static func parse(_ data: JSONTYPE) -> THJGProMarketInfoBean {
var marketInfos = [MarketInfoBean]()
if let marketArray = data["marketInfos"].array {
for market in marketArray {
marketInfos.append(MarketInfoBean.parse(market))
}
}
return THJGProMarketInfoBean(projectName: data["projectName"].string ?? "",
marketInfos: marketInfos)
}
}
struct MarketInfoBean: THJGBaseBean {
var marketTitle: String
var marketContent: String
static func parse(_ data: JSONTYPE) -> MarketInfoBean {
return MarketInfoBean(marketTitle: data["marketTitle"].string ?? "",
marketContent: data["marketContent"].string ?? "")
}
}
| 27.647059 | 83 | 0.590426 |
b9b2993e9b7600a2c625d50b70778f0848baa5ee | 3,950 | h | C | sdk/DocuSignESign/Model/DSESAccountSignature.h | docusign/docusign-objc-client | 17758518642816b24a440cf8b1bec789ede4286d | [
"MIT"
] | 15 | 2016-01-19T23:20:40.000Z | 2021-11-14T16:51:12.000Z | sdk/DocuSignESign/Model/DSESAccountSignature.h | docusign/docusign-objc-client | 17758518642816b24a440cf8b1bec789ede4286d | [
"MIT"
] | 18 | 2016-02-26T12:43:05.000Z | 2022-03-29T01:41:40.000Z | sdk/DocuSignESign/Model/DSESAccountSignature.h | docusign/docusign-objc-client | 17758518642816b24a440cf8b1bec789ede4286d | [
"MIT"
] | 15 | 2016-02-11T22:08:01.000Z | 2021-11-14T16:51:05.000Z | #import <Foundation/Foundation.h>
#import <DSESObject.h>
/**
* DocuSign REST API
* The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
*
* OpenAPI spec version: v2.1
* Contact: devcenter@docusign.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#import <DSESDateStampProperties.h>
#import <DSESErrorDetails.h>
#import <DSESSignatureGroup.h>
#import <DSESSignatureUser.h>
@protocol DSESDateStampProperties;
@class DSESDateStampProperties;
@protocol DSESErrorDetails;
@class DSESErrorDetails;
@protocol DSESSignatureGroup;
@class DSESSignatureGroup;
@protocol DSESSignatureUser;
@class DSESSignatureUser;
@protocol DSESAccountSignature
@end
@interface DSESAccountSignature : DSESObject
/* [optional]
*/
@property(nonatomic) NSString* adoptedDateTime;
/* Indicates the date and time the item was created. [optional]
*/
@property(nonatomic) NSString* createdDateTime;
/* [optional]
*/
@property(nonatomic) NSString* customField;
@property(nonatomic) DSESDateStampProperties* dateStampProperties;
/* [optional]
*/
@property(nonatomic) NSString* disallowUserResizeStamp;
@property(nonatomic) DSESErrorDetails* errorDetails;
/* [optional]
*/
@property(nonatomic) NSString* externalID;
/* [optional]
*/
@property(nonatomic) NSString* imageBase64;
/* [optional]
*/
@property(nonatomic) NSString* imageType;
/* [optional]
*/
@property(nonatomic) NSString* initials150ImageId;
/* Contains the URI for an endpoint that you can use to retrieve the initials image. [optional]
*/
@property(nonatomic) NSString* initialsImageUri;
/* [optional]
*/
@property(nonatomic) NSString* isDefault;
/* The date and time the item was last modified. [optional]
*/
@property(nonatomic) NSString* lastModifiedDateTime;
/* [optional]
*/
@property(nonatomic) NSString* nrdsId;
/* [optional]
*/
@property(nonatomic) NSString* nrdsLastName;
/* [optional]
*/
@property(nonatomic) NSString* nrdsStatus;
/* [optional]
*/
@property(nonatomic) NSString* phoneticName;
/* [optional]
*/
@property(nonatomic) NSString* signature150ImageId;
/* [optional]
*/
@property(nonatomic) NSString* signatureFont;
/* [optional]
*/
@property(nonatomic) NSArray<DSESSignatureGroup>* signatureGroups;
/* Specifies the signature ID associated with the signature name. You can use the signature ID in the URI in place of the signature name, and the value stored in the `signatureName` property in the body is used. This allows the use of special characters (such as \"&\", \"<\", \">\") in a the signature name. Note that with each update to signatures, the returned signature ID might change, so the caller will need to trigger off the signature name to get the new signature ID. [optional]
*/
@property(nonatomic) NSString* signatureId;
/* Contains the URI for an endpoint that you can use to retrieve the signature image. [optional]
*/
@property(nonatomic) NSString* signatureImageUri;
/* [optional]
*/
@property(nonatomic) NSString* signatureInitials;
/* Specifies the user signature name. [optional]
*/
@property(nonatomic) NSString* signatureName;
/* [optional]
*/
@property(nonatomic) NSString* signatureRights;
/* [optional]
*/
@property(nonatomic) NSString* signatureType;
/* [optional]
*/
@property(nonatomic) NSArray<DSESSignatureUser>* signatureUsers;
/* [optional]
*/
@property(nonatomic) NSString* stampFormat;
/* [optional]
*/
@property(nonatomic) NSString* stampImageUri;
/* [optional]
*/
@property(nonatomic) NSString* stampSizeMM;
/* [optional]
*/
@property(nonatomic) NSString* stampType;
/* Indicates the envelope status. Valid values are: * sent - The envelope is sent to the recipients. * created - The envelope is saved as a draft and can be modified and sent later. [optional]
*/
@property(nonatomic) NSString* status;
@end
| 29.699248 | 488 | 0.751392 |
5b1d05ff04a50d724df5ca369fe808fe7708e5a2 | 1,293 | kt | Kotlin | klay-demo/src/main/kotlin/klay/tests/core/CanvasStressTest.kt | cdietze/klay | 72031aa267cd304a0612b31c871e2f5cf73d2c4c | [
"Apache-2.0"
] | 4 | 2018-09-30T06:36:13.000Z | 2019-03-26T02:37:25.000Z | klay-demo/src/main/kotlin/klay/tests/core/CanvasStressTest.kt | cdietze/klay | 72031aa267cd304a0612b31c871e2f5cf73d2c4c | [
"Apache-2.0"
] | null | null | null | klay-demo/src/main/kotlin/klay/tests/core/CanvasStressTest.kt | cdietze/klay | 72031aa267cd304a0612b31c871e2f5cf73d2c4c | [
"Apache-2.0"
] | null | null | null | package klay.tests.core
import euklid.f.MathUtil
import klay.core.Clock
import klay.scene.CanvasLayer
import kotlin.math.cos
import kotlin.math.sin
class CanvasStressTest(game: TestsGame) : Test(game, "Canvas Stress", "Animates a full-screen sized canvas, forcing a massive reupload of image data to " + "the GPU on every frame.") {
override fun init() {
val clayer = CanvasLayer(game.graphics, game.graphics.viewSize)
game.rootLayer.add(clayer)
var noSegs = 30
var direction = 1
conns.add(game.update.connect { clock: Clock ->
val canvas = clayer.begin()
canvas.clear()
canvas.setStrokeWidth(3f)
canvas.setStrokeColor(0x88ff0000.toInt())
noSegs += direction
if (noSegs > 50) direction = -1
if (noSegs < 20) direction = 1
val r = 100f
for (ii in 0..noSegs - 1) {
val angle = 2 * MathUtil.PI * ii / noSegs
val viewSize = game.plat.graphics.viewSize
val x = r * cos(angle) + viewSize.width / 2
val y = r * sin(angle) + viewSize.height / 2
canvas.strokeCircle(x, y, 100f)
}
clayer.end() // reupload the image data
})
}
}
| 32.325 | 184 | 0.576953 |
fd81856238e760cf6510358bb02744e5da4bce68 | 7,469 | swift | Swift | RsyncOSX/RemoteInfoTaskWorkQueue.swift | SjoenH/RsyncOSX | 40dc651a95fd5c7d535bf7b54d52a08dbdea443e | [
"MIT"
] | null | null | null | RsyncOSX/RemoteInfoTaskWorkQueue.swift | SjoenH/RsyncOSX | 40dc651a95fd5c7d535bf7b54d52a08dbdea443e | [
"MIT"
] | null | null | null | RsyncOSX/RemoteInfoTaskWorkQueue.swift | SjoenH/RsyncOSX | 40dc651a95fd5c7d535bf7b54d52a08dbdea443e | [
"MIT"
] | null | null | null | //
// RemoteInfoTaskWorkQueue.swift
// RsyncOSX
//
// Created by Thomas Evensen on 31.12.2017.
// Copyright © 2017 Thomas Evensen. All rights reserved.
//
// swiftlint:disable line_length
import Foundation
protocol SetRemoteInfo: class {
func setremoteinfo(remoteinfotask: RemoteInfoTaskWorkQueue?)
func getremoteinfo() -> RemoteInfoTaskWorkQueue?
}
class RemoteInfoTaskWorkQueue: SetConfigurations {
// (hiddenID, index)
typealias Row = (Int, Int)
var stackoftasktobeestimated: [Row]?
var outputprocess: OutputProcess?
var records: [NSMutableDictionary]?
weak var updateprogressDelegate: UpdateProgress?
weak var reloadtableDelegate: Reloadandrefresh?
weak var enablebackupbuttonDelegate: EnableQuicbackupButton?
weak var startstopProgressIndicatorDelegate: StartStopProgressIndicator?
var index: Int?
var maxnumber: Int?
var count: Int?
var inbatch: Bool?
private func prepareandstartexecutetasks() {
self.stackoftasktobeestimated = nil
self.stackoftasktobeestimated = [Row]()
for i in 0 ..< self.configurations!.getConfigurations().count {
if self.configurations!.getConfigurations()[i].task == ViewControllerReference.shared.synchronize ||
self.configurations!.getConfigurations()[i].task == ViewControllerReference.shared.snapshot {
if self.inbatch! {
if self.configurations!.getConfigurations()[i].batch == "yes" {
self.stackoftasktobeestimated?.append((self.configurations!.getConfigurations()[i].hiddenID, i))
}
} else {
self.stackoftasktobeestimated?.append((self.configurations!.getConfigurations()[i].hiddenID, i))
}
}
}
self.maxnumber = self.stackoftasktobeestimated?.count
}
private func startestimation() {
guard self.stackoftasktobeestimated!.count > 0 else { return }
self.outputprocess = OutputProcess()
self.index = self.stackoftasktobeestimated?.remove(at: 0).1
if self.stackoftasktobeestimated?.count == 0 {
self.stackoftasktobeestimated = nil
}
self.startstopProgressIndicatorDelegate?.start()
_ = EstimateRemoteInformationTask(index: self.index!, outputprocess: self.outputprocess, local: false)
}
func processTermination() {
self.count = self.stackoftasktobeestimated?.count
let record = RemoteInfoTask(outputprocess: self.outputprocess).record()
record.setValue(self.configurations?.getConfigurations()[self.index!].localCatalog, forKey: "localCatalog")
record.setValue(self.configurations?.getConfigurations()[self.index!].offsiteCatalog, forKey: "offsiteCatalog")
record.setValue(self.configurations?.getConfigurations()[self.index!].hiddenID, forKey: "hiddenID")
if self.configurations?.getConfigurations()[self.index!].offsiteServer.isEmpty == true {
record.setValue("localhost", forKey: "offsiteServer")
} else {
record.setValue(self.configurations?.getConfigurations()[self.index!].offsiteServer, forKey: "offsiteServer")
}
self.records?.append(record)
self.configurations?.estimatedlist?.append(record)
self.updateprogressDelegate?.processTermination()
guard self.stackoftasktobeestimated != nil else {
self.startstopProgressIndicatorDelegate?.stop()
return
}
self.outputprocess = nil
self.outputprocess = OutputProcess()
self.index = self.stackoftasktobeestimated?.remove(at: 0).1
if self.stackoftasktobeestimated?.count == 0 {
self.stackoftasktobeestimated = nil
}
_ = EstimateRemoteInformationTask(index: self.index!, outputprocess: self.outputprocess, local: false)
}
func setbackuplist(list: [NSMutableDictionary]) {
self.configurations?.quickbackuplist = [Int]()
for i in 0 ..< list.count {
self.configurations?.quickbackuplist!.append((list[i].value(forKey: "hiddenID") as? Int)!)
}
}
func sortbystrings(sort: Sort) {
var sortby: String?
guard self.records != nil else { return }
switch sort {
case .localCatalog:
sortby = "localCatalog"
case .backupId:
sortby = "backupIDCellID"
case .offsiteCatalog:
sortby = "offsiteCatalog"
case .offsiteServer:
sortby = "offsiteServer"
}
let sorted = self.records!.sorted {return ($0.value(forKey: sortby!) as? String)!.localizedStandardCompare(($1.value(forKey: sortby!) as? String)!) == .orderedAscending}
self.records = sorted
}
func selectalltaskswithnumbers(deselect: Bool) {
guard self.records != nil else { return }
for i in 0 ..< self.records!.count {
let number = (self.records![i].value(forKey: "transferredNumber") as? String) ?? "0"
let delete = (self.records![i].value(forKey: "deletefiles") as? String) ?? "0"
if Int(number)! > 0 || Int(delete)! > 0 {
if deselect {
self.records![i].setValue(0, forKey: "select")
} else {
self.records![i].setValue(1, forKey: "select")
}
}
}
}
func setbackuplist() {
guard self.records != nil else { return }
self.configurations?.quickbackuplist = [Int]()
for i in 0 ..< self.records!.count {
if self.records![i].value( forKey: "select") as? Int == 1 {
self.configurations?.quickbackuplist!.append((self.records![i].value(forKey: "hiddenID") as? Int)!)
}
}
}
func selectalltaskswithfilestobackup(deselect: Bool) {
self.selectalltaskswithnumbers(deselect: deselect)
self.reloadtableDelegate = ViewControllerReference.shared.getvcref(viewcontroller: .vcremoteinfo) as? ViewControllerRemoteInfo
self.enablebackupbuttonDelegate = ViewControllerReference.shared.getvcref(viewcontroller: .vcremoteinfo) as? ViewControllerRemoteInfo
self.reloadtableDelegate?.reloadtabledata()
self.enablebackupbuttonDelegate?.enablequickbackupbutton()
}
init(inbatch: Bool) {
self.inbatch = inbatch
if inbatch {
self.updateprogressDelegate = ViewControllerReference.shared.getvcref(viewcontroller: .vcbatch) as? ViewControllerBatch
self.startstopProgressIndicatorDelegate = ViewControllerReference.shared.getvcref(viewcontroller: .vcbatch) as? ViewControllerBatch
} else {
self.updateprogressDelegate = ViewControllerReference.shared.getvcref(viewcontroller: .vcremoteinfo) as? ViewControllerRemoteInfo
self.startstopProgressIndicatorDelegate = ViewControllerReference.shared.getvcref(viewcontroller: .vcremoteinfo) as? ViewControllerRemoteInfo
}
self.prepareandstartexecutetasks()
self.records = [NSMutableDictionary]()
self.configurations!.estimatedlist = nil
self.configurations!.estimatedlist = [NSMutableDictionary]()
self.startestimation()
}
}
extension RemoteInfoTaskWorkQueue: CountEstimating {
func maxCount() -> Int {
return self.maxnumber ?? 0
}
func inprogressCount() -> Int {
return self.stackoftasktobeestimated?.count ?? 0
}
}
| 43.678363 | 177 | 0.659258 |
858f9abd13af172c3160c9dbb98bb75ba78f1c50 | 365 | js | JavaScript | algorithms/search/binary-search/binary-search.js | shivajivarma/codebase-js | 6805bf009acf182c551aad7bb447fa6bcbf6da63 | [
"MIT"
] | null | null | null | algorithms/search/binary-search/binary-search.js | shivajivarma/codebase-js | 6805bf009acf182c551aad7bb447fa6bcbf6da63 | [
"MIT"
] | null | null | null | algorithms/search/binary-search/binary-search.js | shivajivarma/codebase-js | 6805bf009acf182c551aad7bb447fa6bcbf6da63 | [
"MIT"
] | null | null | null | function binarySearch(arr, num) {
let low = 0;
let high = arr.length;
let pos = -1;
while (low <= high) {
const mid = parseInt((low + high) / 2);
if (num === arr[mid]) {
pos = mid;
break;
} else if (num < arr[mid]) {
high = mid - 1;
} else {
low = mid + 1;
}
}
return pos;
}
module.exports = binarySearch;
| 16.590909 | 43 | 0.49863 |
e47e2063dc3d37d9cf005c0df33f69d78bcb419c | 568 | swift | Swift | BikeshareKit/BikeshareKit/Common/NSDateExtension.swift | thelowlypeon/bikeshare-kit | 5f0390dbf2a7627dafaffd66b125d1b05acf0ce2 | [
"MIT"
] | null | null | null | BikeshareKit/BikeshareKit/Common/NSDateExtension.swift | thelowlypeon/bikeshare-kit | 5f0390dbf2a7627dafaffd66b125d1b05acf0ce2 | [
"MIT"
] | null | null | null | BikeshareKit/BikeshareKit/Common/NSDateExtension.swift | thelowlypeon/bikeshare-kit | 5f0390dbf2a7627dafaffd66b125d1b05acf0ce2 | [
"MIT"
] | null | null | null | //
// NSDateExtension.swift
// BikeshareKit
//
// Created by Peter Compernolle on 12/19/15.
// Copyright © 2015 Out of Something, LLC. All rights reserved.
//
import Foundation
private var APIDateFormatter: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
formatter.timeZone = TimeZone(identifier: "UTC")
return formatter
}()
extension Date {
public static func fromAPIString(_ string: String?) -> Date? {
return string != nil ? APIDateFormatter.date(from: string!) : nil
}
}
| 24.695652 | 73 | 0.68662 |
bb327e59eafb5223c812ce562b50f3cebe16f607 | 887 | html | HTML | manuscript/page-1141/body.html | marvindanig/the-last-man | c71790f2ec4c36070aae0a9b1c17ca276679fed6 | [
"CECILL-B"
] | null | null | null | manuscript/page-1141/body.html | marvindanig/the-last-man | c71790f2ec4c36070aae0a9b1c17ca276679fed6 | [
"CECILL-B"
] | null | null | null | manuscript/page-1141/body.html | marvindanig/the-last-man | c71790f2ec4c36070aae0a9b1c17ca276679fed6 | [
"CECILL-B"
] | null | null | null | <div class="leaf flex"><div class="inner justify"><p> Perhaps, because we had now so few impulses urging to a choice between two modes of action, we were pleased to preserve the existence of one, and preferred the prospect of what we were to do, to the recollection of what had been done. We felt that for this year danger was past; and we believed that, for some months, we were secured to each other. There was a thrilling, agonizing delight in the thought--it filled the eyes with misty tears, it tore the heart with tumultuous heavings; frailer than the "snow fall in the river," were we each and all--but we strove to give life and individuality to the meteoric course of our several existences, and to feel that no moment escaped us unenjoyed. Thus tottering on the dizzy brink, we were happy. Yes! as we sat beneath the toppling rocks, beside the waterfalls, near</p></div> </div> | 887 | 887 | 0.776776 |
b1a6151356d2cf3cddfc869607b86e057d50b19d | 950 | h | C | include/GenieSys/AddressingModes/DataRegisterDirectMode.h | PaulTrampert/GenieSys | 637e7f764bc7faac8d0b5afcf22646e200562f6a | [
"MIT"
] | null | null | null | include/GenieSys/AddressingModes/DataRegisterDirectMode.h | PaulTrampert/GenieSys | 637e7f764bc7faac8d0b5afcf22646e200562f6a | [
"MIT"
] | 82 | 2020-12-17T04:03:10.000Z | 2022-03-24T17:54:28.000Z | include/GenieSys/AddressingModes/DataRegisterDirectMode.h | PaulTrampert/GenieSys | 637e7f764bc7faac8d0b5afcf22646e200562f6a | [
"MIT"
] | null | null | null | //
// Created by paul.trampert on 11/27/2020.
//
#pragma once
#include "AddressingMode.h"
namespace GenieSys {
class DataRegisterDirectResult : public GenieSys::AddressingResult {
public:
DataRegisterDirectResult(M68kCpu* cpu, Bus* bus, uint32_t address, std::vector<uint8_t> data);
void write(std::vector<uint8_t> data) override;
void write(uint8_t data) override;
void write(uint16_t data) override;
void write(uint32_t data) override;
};
class DataRegisterDirectMode : public GenieSys::AddressingMode {
public:
static const uint8_t MODE_ID = 0b000u;
DataRegisterDirectMode(M68kCpu *cpu, Bus *bus);
uint32_t getAddress(uint8_t regAddr) override;
uint8_t getModeId() override;
std::unique_ptr<AddressingResult> getData(uint8_t regAddr, uint8_t size) override;
std::string disassemble(uint8_t regAddr, uint8_t size) override;
};
}
| 29.6875 | 102 | 0.693684 |
dbdb1a018f36aa1ecaa6d04257e31d1940c0d1d4 | 483 | swift | Swift | Framework/Foundation/Dictionary.swift | BinaryArtists/tool.swift | dca8d5b14e8b9860711eb5b60b448fbe33ddee6c | [
"MIT"
] | 3 | 2018-12-25T12:50:51.000Z | 2020-02-07T03:43:36.000Z | Framework/Foundation/Dictionary.swift | BinaryArtists/suite.swift | dca8d5b14e8b9860711eb5b60b448fbe33ddee6c | [
"MIT"
] | null | null | null | Framework/Foundation/Dictionary.swift | BinaryArtists/suite.swift | dca8d5b14e8b9860711eb5b60b448fbe33ddee6c | [
"MIT"
] | null | null | null | import Foundation
// MARK: - Dictionary extension
/// This extension adds some useful functions to Dictionary.
public extension Dictionary {
// MARK: - Functions
/// Append a Value for a given Key in the Dictionary.
/// If the Key already exist it will be ovrewritten.
///
/// - Parameters:
/// - value: Value to be added.
/// - key: Key to be added.
mutating func append(_ value: Value, forKey key: Key) {
self[key] = value
}
}
| 26.833333 | 60 | 0.621118 |
751c5ed08cd89821059f65f6e49fb7289fea3900 | 564 | kt | Kotlin | sdk-ext-lib/src/main/java/cash/z/ecc/sdk/fixture/ZecSendFixture.kt | luckytokidoki/secant-android-wallet | b9dd9dc7562c28f25cf635bfac94d89b4ba18f5a | [
"MIT"
] | null | null | null | sdk-ext-lib/src/main/java/cash/z/ecc/sdk/fixture/ZecSendFixture.kt | luckytokidoki/secant-android-wallet | b9dd9dc7562c28f25cf635bfac94d89b4ba18f5a | [
"MIT"
] | null | null | null | sdk-ext-lib/src/main/java/cash/z/ecc/sdk/fixture/ZecSendFixture.kt | luckytokidoki/secant-android-wallet | b9dd9dc7562c28f25cf635bfac94d89b4ba18f5a | [
"MIT"
] | null | null | null | package cash.z.ecc.sdk.fixture
import cash.z.ecc.sdk.model.Memo
import cash.z.ecc.sdk.model.WalletAddress
import cash.z.ecc.sdk.model.Zatoshi
import cash.z.ecc.sdk.model.ZecSend
object ZecSendFixture {
const val ADDRESS: String = WalletAddressFixture.UNIFIED_ADDRESS_STRING
@Suppress("MagicNumber")
val AMOUNT = Zatoshi(123)
val MEMO = MemoFixture.new()
suspend fun new(
address: String = ADDRESS,
amount: Zatoshi = AMOUNT,
message: Memo = MEMO
) = ZecSend(WalletAddress.Unified.new(address), amount, message)
}
| 26.857143 | 75 | 0.714539 |
9ea13e7a1961f03b834270683bbd729d5b704495 | 89,793 | rs | Rust | components/hashes/blake2/tests/blake2b/short_msg_kat_256.rs | glatan/ghash | 22bc56f57bd8cc1817593e9d94d847a5bd56a040 | [
"Apache-2.0",
"MIT"
] | null | null | null | components/hashes/blake2/tests/blake2b/short_msg_kat_256.rs | glatan/ghash | 22bc56f57bd8cc1817593e9d94d847a5bd56a040 | [
"Apache-2.0",
"MIT"
] | null | null | null | components/hashes/blake2/tests/blake2b/short_msg_kat_256.rs | glatan/ghash | 22bc56f57bd8cc1817593e9d94d847a5bd56a040 | [
"Apache-2.0",
"MIT"
] | null | null | null | use dev_utils::impl_short_msg_kat;
#[rustfmt::skip]
const SHORT_MSG_KAT: [(&str, &str); 255] = [
(
// Len = 0
"",
"0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8"
),
(
// Len = 8
"13",
"a318ee67737d7d19b425d9500db52ae0e6b8e6b0d87b421995221a18fa02eec7"
),
(
// Len = 16
"4e75",
"f646710e0b2d9b03722d4889f7b3875250165dd336427fee5efd0240f75413fe"
),
(
// Len = 24
"6b98ca",
"16f3827ad80c6e9369da5f4d23eaf269cb847e1a532ee9cc930396ac2c0ab6c7"
),
(
// Len = 32
"fe0ddd87",
"f0eab27fa38863354739083d783cf60c29aa86a3886050e53a0ce46db110b203"
),
(
// Len = 40
"8c9f207e8e",
"73b247f2ec754a910120b498fd5dcf0b3a98c61c7e2f3aa2319a38f2e6fa51f4"
),
(
// Len = 48
"c14f274f386e",
"95362ad2b59655a4126e60bcd11977cedac4ba94c3a8057032ed8ed84659b2c3"
),
(
// Len = 56
"d53b3286137251",
"a7b79cf95f73670f7b92d1086752d86f2ce73cf1788c4149b4cd0023edf7b926"
),
(
// Len = 64
"3b9b664ee9dcba82",
"30ca792795c9009c1ec94e7e999615b294f00bcad183e50f0fcb17b169671f7f"
),
(
// Len = 72
"a7b99085411c24619a",
"d2e808249aed25efc80af5c79e555cabb7d047e8f62520dd52108a65391f686d"
),
(
// Len = 80
"b223ead9722248475e7b",
"0ad15f1b2aaa0a2a8fc3274860a8c2b9b145d322679bf01371578ac9127511e7"
),
(
// Len = 88
"ce71ed1fac8885fb7262b6",
"78b078940507fb411b5b00fd728d3d3a0deec8a77d31f42e32159c708cdaf9f0"
),
(
// Len = 96
"f4096f848fb0a1b3123b6635",
"c814e207002e11ae597880511c6a14543591001a76e70bd1a158f14b70384e42"
),
(
// Len = 104
"2540a74888efa704bd18f1dcc5",
"cfbc516c182b2084d9efda47acab0269692acf750e8716d79a99e967979e920e"
),
(
// Len = 112
"7961c1ebc477e0cee7655d980611",
"eb99528ceb4bd3db01f8da71df63b6450deb3bb3e71d930b8f0502e235254ec1"
),
(
// Len = 120
"ab4277e068b888b141775845347136",
"4723e1d4ea08b6fdff32a3e3a5835a71d1481ece2e8b183aa0fb81fe9b3606de"
),
(
// Len = 128
"1137b073f89b37707c0558e162f0e873",
"a990e01356f1f2661c341b009c85a4bf81f3a79b906f0a46cd68576691853281"
),
(
// Len = 136
"9b2aeb7c93a40544e67d9c2bb20d62c345",
"4d47488825806744cd2aba1d0221f4952485f393b308fbe63822769135f1bcd1"
),
(
// Len = 144
"13363eaf6dae2b73070dd6f7f64a93203510",
"a6d155b5202f0b88917abad819a5604ffff0b79c65fe97e09ba299c548f631ba"
),
(
// Len = 152
"b4da16f8c09395ec46a34e09e8613f2610add5",
"dc51266f58ec60ac52d93b0f962d5435ef66f18999259e76f5e71884fef20fdb"
),
(
// Len = 160
"3c20dc49f6d43f416860777914518f0d1123a2fe",
"7810540b9119237ff8375eb4ccdf20caf45b1c75c2162a3b90553ba9a141bb7d"
),
(
// Len = 168
"69454c722daeb254bf5f29fc80064677da86b843e7",
"14ad8d8ba7f9ae1e78148329c42b718bb1682a6d8919e19fed00f2a3d0a2ef81"
),
(
// Len = 176
"2fbcfc804b09926eac90d7f1dd4a1f8cfc734c5b9d48",
"6744d21d6592749cfe8dfe9c19fc044a2052a97ae78e0f43de57e853ef75911a"
),
(
// Len = 184
"dca38f537e150bc1fc3b7df8bcc8024e37aedf0f9fbc59",
"031ef64c31db199e920d26519d99e6e9a67c7d1ed57a454ad08621d066422074"
),
(
// Len = 192
"bf49553395b1d0de8e746de1f283edb47f283178e4fa7a33",
"4d301088d986fc8e719bd4d9246ee9ebcf1ab4899e573cb076b5ffbfc99dbfcd"
),
(
// Len = 200
"32281241c8cf9a8819f0bbafa28c8d3000fb12f37fffa8ff28",
"dac25cc8d2dbcea3ffed5634e4512efbb95afb46acef36cee0f489e54044f904"
),
(
// Len = 208
"da770dd4f241071b5448e423e36c3dd327ec76b37aa6b476b8a8",
"93cf81fb85ba1f667c8ffd5a480a4a4bb335d8f6b2378d7c279dfc7c864e28cd"
),
(
// Len = 216
"f5b851f4e02b6bee005e2f0779834f5da733c9e406f1d07da54b24",
"d5ae4e39de9866702d86dc4fd9d65b55dac7b816054c29b2c65fbc993c520b2a"
),
(
// Len = 224
"5ac1dc02b69553aa767f16647f749486ee18d64bbf0915a41006758d",
"ed2229863d4fbe6ef8020bfa5dd719709f6244b16f345ef3340f9f75459b68ce"
),
(
// Len = 232
"acc0b106818e0837245ce29adcf9ff5b6e93e15cabb8a86bc1bd0fd1c4",
"4a2b64a070f3e3b8ce785de245bbbd8be47839e7677f3319aa4d5d73bb5b4720"
),
(
// Len = 240
"845f70441076c69f7ffdc3dce05eb9d95d1448f1f6a49cae4d08700b1741",
"9e129cc0eaeb789a333c7c928be198aa52088ce23742a241bfe786a4f88a35dd"
),
(
// Len = 248
"cf9ca040e0b1b7a75137a414148572cd5fd0e2a7c1d84c5e879966f7a47e39",
"6bb3ca72c37a0e7c58ac592ae157148e6c6f1bf13fc97cecd54efcb869fb7ac7"
),
(
// Len = 256
"731ad9b4fb8b6ca2dca347f1b8cc64852c3468d3f5401f53c8b9babf5d38f8d1",
"f85da4f0b7646c10c85bd03f7322e9735d986af92cc4945bd3289f4bcd8e3a85"
),
(
// Len = 264
"52d2854e5df1f03a95382b4e058fd431c43c05b97c250d44dec7043bfffc0c52ce",
"bbe48c2eef836d7d437fc93852f666e5896b7bfb2f49a7d2294ecc553c4be30d"
),
(
// Len = 272
"92a02c84916619c99268ce223cffe67804a0f52aad3908743d43733a4fc609e26635",
"b6063b7230932ddb99bbb1c2bd8c8f7afb60ad015b973795877d49183614bea4"
),
(
// Len = 280
"66f79c80c12fe88f51248e379c93d791bd84cbc5f909096d4359334d3b9a82a1921f21",
"d6e28493ac5261746ff11a7261ae5415214e0abb1fddd51fcaea7b655fc7cdb0"
),
(
// Len = 288
"534e09e29f2e71d7ca04af5cc23427882d30919b74ebcec1266944c8fb63e94eb1f33151",
"72209abaa459964a720529fdc3033aa6771e8b7a3f7762160abe4a46557382fd"
),
(
// Len = 296
"21a229eca7d848690c6ff13aa083d5146ea4d6940d1a5c087e4657303a88815c2aaa48d182",
"9faeed34ff91ada6bf7806213218fac2eae639847b5f040257732f5b99092402"
),
(
// Len = 304
"903b8f002dc9a0b09fb51e438bb350a610582457af549138d6ee6280363403c76f92c79c5c68",
"26ff532ba1483f730aef6d546a175213198f16309e0e91bf6362fdd8b8bdc07e"
),
(
// Len = 312
"4dfb1d6c3ea91f8e5030e7748797c819cf9f07321f3e662305d6b6cd731235c00e532c4dfd4cdc",
"3006e9778cf2913f14b167aba7e0b83a386d39a6ec415c5168456b21774c58cb"
),
(
// Len = 320
"4d7cc3c1045b8a1e2a29265d4964c36c6a9a22370d356dce44c1fb91be476d0cc431cec98c58e7b7",
"8eba6f4404f38ad33b66831b563a955177340e31283e760be1c18e52db4e0ae5"
),
(
// Len = 328
"820e14cc72d838dd725b158091834fd5444a660391d40f5605dd1f92360649b9145d858735be65a81a",
"e0436872843b6e73f572a2f854b33d8277307aedf3e8ce9ce971f499e3b5240f"
),
(
// Len = 336
"7a28abfe788043c2e74654bb56aac133c9536ad09c23e5faa96d3067d2d8814d012d4b79ad8e3b95d590",
"4dbcf7baf1f3d496a758f3be85b676662b98d9f8cb42d0f6212834e6eebcf4f8"
),
(
// Len = 344
"512b3a125f0466cad402edb9fd97262dfef906804607ad92815b21bdf0f64d41228754818cba4b60bd391a",
"d47ec120f79e36fda3582fab5bb0df9748bfbce85ed3bc4b2178d2c2ef383b60"
),
(
// Len = 352
"bbd141e8d03bef5081f6fe14785a35354a2c838c4e0be1d0979c1bf7595512142654fdf68fec4711e346255b",
"77472ac690c002ce2bdee13cb5e309705bcbc5ede4474a5bd0ed797c195716d1"
),
(
// Len = 360
"a05b91ea871477d61f59a6b6f5c2ae4e17c1633e156135a44d7cb530c2db8c62361d4dbd32c593511e390813fb",
"7344240d401d21bfc7485bde409b57c49037d9ba1baedf7cab29368846a802b3"
),
(
// Len = 368
"b7621378c6528e2787327403e8a5c6c33229f95076b7823c4bd45a85dd6e8194d1940d97e69bbf6ece3471b6d938",
"ebade1840d4c7dccbfbf104f288ed584e34d9d78ce00b4dd73744564ce8d3cdc"
),
(
// Len = 376
"7a0c61735cd82bdf1476b36ffb90de7c25af113347f7ce06659d3ad7541410ce2071427d4a6d5c5fe30fcfdfa0ad5b",
"a9c5b2722fa57542c0601b00b75ee379ec05e2ce51687c107cfd4ff3fc0e5d8f"
),
(
// Len = 384
"c65d6cf9a564c8abca65e6a2bafbb2881c24ca996f38f5ce1b059dfaa64b566ca9c2664e272efaf194e0944edc46d7f8",
"42e73dd7c61d61e587750f80b97383cc1841673bbf06a35710e6917dbf7efaee"
),
(
// Len = 392
"6ba191dad986a9f58c47f03292469f3c09058a30348422c865b61741fdee396890cb436a52ec5fde345010c696b0039fb5",
"f1a556b4121434c0bc2c1aea22953f5c684754339ef1175bf53d236a0fcfe54e"
),
(
// Len = 400
"8dd0ea12f2b378a9cabaa6b9f40f49bf53b4113f13ef7363003afab03d9a66cb6a50de5d035606ce10ad8704bdd1c31085d5",
"9da0cf498cc63faf84b95cb0a7c1eaef3e9ad08b2f38e3b376cf919edcbcd00a"
),
(
// Len = 408
"5099c4c4fcc5fef7763c91dc08fb2de659303d60ff4e0e8652cb5716dcddec2c76b0f07376ef6aec2cfbc835f7f51b502659b1",
"abd5d5eef32504442c0fbb7b7dc4c060b3e4c8843dc0a44600b5553d6babfcff"
),
(
// Len = 416
"25a7bfacfa8b041167e1fd9357ae84ca24743510a030d9d628cff179f54b2a1bf2eac7ed75cbfedcacfc7004aaf5cecf6904df0a",
"25d5b01d2d5b4f8140db01ad251e5f71704d5684e5e8766b23c24938f1abaa86"
),
(
// Len = 424
"35b9e05d88d2d77d1d019910ec60fd612cfc3ed8f8aedda3a3ac730db05217e50cf84294ca1a11e81babf8080bf66937f2a710eb56",
"46d7169b06ef15142b796d9c6e5c4c05965e600cb54d74e3aa6253eb3bc8b3ce"
),
(
// Len = 432
"ed8ffa9902074a551f2f611772f5e28c07caa8b2c2b0beb81af5abc2069718f426138e291ad87e3a07df5179d43406dcfeae8ec15f4d",
"b0b2cb498e5b18fbc589bc08ce4ab07c49fc7fd9f423da04d8e8d099bf7d4e64"
),
(
// Len = 440
"7a7942253b49bd543de367cc0c81a48bbcab6a0e253f422c1b40daaa0139f77cb33aa2ee845f42c243a98e502b32dbe7de46f604853830",
"dc3ed334f630c9b0ad6f2c5cbcc87afdd2a051058768986a0df0f883b2f41ed0"
),
(
// Len = 448
"a1790a4c7b4443f7f87e99e602f829c43cd3528cff8567e763addd67331597d48ea22009e76401dfe29ac6e593f0aacfc3fd5bc282c3a9e5",
"b3aa7d713cdd69667736dc6f3e2357103fefec16cc3d467fbf0ea0478764b16a"
),
(
// Len = 456
"70874da39ce4782b8799356ffd364ee0d015c664057033c86e8e8bf05135d6c2bc23665908de848f78bafe76f04d57c1621d25688e5930fce8",
"d63aec240d4b0683021d54373dd5b8cffd7e9fbddf85bcccab2659de1229aaf1"
),
(
// Len = 464
"bced39f1c3fcaee76207ef418c7fba467e3036cc87f82fa51e973477c8315f841e9976e29524c9f82bb93ab739f4fdb7243483ac2cb2514b4986",
"5b964d737d3bea5e22f8fc6a8fb7625aebf8022e5566c98a180fce0e8ec1aca3"
),
(
// Len = 472
"c211b72196d5bb0cb8503082495c3b83137477112c9c45b04872629abdac2080bed7a254ad5d6165ae92e7f7ee237b0298f213c48e5974d7ccd771",
"8d1cb0290baeab35ef0edd73a63494c6fea895cb458d5b3771f41a572bfedb50"
),
(
// Len = 480
"8983910a4269ac97160af87cb88b64b079872b7b1f1e8fe4ade85884b52ff53eb38749f6f0f58d07ff8683b811e7688b6f94068eb296735f7fcbe334",
"45d88bf5eff8ec1eff88a9eb3df3b751c5e3e165d016746decd71d763bba2e09"
),
(
// Len = 488
"fbd973af61bca552b23259b1b9dc6acac4d25533665cc218f3357872015ca6fc3519ab97d651e98883423a3c1fa407e3765d16ddb9d8f6ac0e6e1f0fca",
"fbf576510ada981bc6d596a5ef39646da295b5e72ba26df5421602197e54f6c9"
),
(
// Len = 496
"c50b00dfb798b608813e8cc478c9e31dd1c6942edc71e7b56894c3d6b3d2a179dea259963a0f9fbc4d2b80c6f563e3c62978f405e9dcbb51717e282450ca",
"20a14e29a6339d8fe69b9367e52c10cb3a111b7b3d2b53b666ef125678e5ffef"
),
(
// Len = 504
"9e2e6cf7c5a70664635490e41a8547fe4c70764176601e31b28fafdab400a4522f1149f4b94f581ca4e800be6e48bdbbb834fc2f951a6147a911225d11c6b0",
"4481a18eaf445be85bac4ab452abd39261c9daea078f30a848ac5ebb565b02fb"
),
(
// Len = 512
"40d8f93491498daeed76aface4f76aa0b09f9ce034b7417b61529dbf63646fa43d69d9ceb2667da0dc2c4dc123b762d456ffb48ab6f5061847a4d7ab08475045",
"27cf4f6198dcb08102cafc5acd44118455d30b51a9489c6a01794202f9f51c2f"
),
(
// Len = 520
"b12914649091046dbd522ee10991b5609069eb475ff15fa79537539e7fa3e430ccf8945c8a99c947ebf829f489df551a484061a832c04fc8f8a26677454aa71243",
"4fbba446002035f9ad379922b1d443b3a35dd86db6d994386a5cfb30633ac286"
),
(
// Len = 528
"3b6fcdd43815bf313eb4bb1d09d5664a360e7cf75e44ef01ab6646f50e59394ac8061e011bde335993ee779dc4dde7faec63f14ba8e14c5347934956ec82a0b588bf",
"dafee8f52a19d2e5b5e9b170b8cb4b9ce1c9dafffa43f4897e4d9a4db9dfcd19"
),
(
// Len = 536
"b7a39eeafd31d975ce9d53b6983f198a8ac26bd715b36a5e0957e0a90c6969c30d07ae0a3887800725d3bdbd13d7479e99b275ae65df0d6f37ee19445782076489b66f",
"351d8a61890a4942c4fe77b16fd949c0e0d911466ae363cdae6d7a7f7d28dff2"
),
(
// Len = 544
"c23eefc963c28720d65e6774f719e9a67fc9b3ee00a20744f98a4c5d1303cdd541bc9fa47f26c455852cc97c46b323c67cd7b47d79bcc272470fd05a129d30535acff8d9",
"80f5a5b2579cf340759707342c82654f8d8d986d090ef8bdc25d44d2cdb38e1b"
),
(
// Len = 552
"f6bd2f7be9f8f830ac1bf628f3aba66c6868dfaf78af098a4d3adea70ad7810094b07c7ea874ae5490a47d845024f0b88ccf67047f708fcdaa6e74b445f5b5d9a531574ea6",
"b997a50f4b1b5b383353025195c7f35b4ecfd406f75f851dac31adc07218bdda"
),
(
// Len = 560
"06a337ab21bbfb45acb3d27c1ad7fb8b66c836d53deb1a33a0f3d8d24b277951cbb0fcec6cf83218ab0495c5dc9150435a8718977232ca1225a3e571cb5ec3960fc0827cb8b4",
"0a933da91ad2c219dffbe11cce48f6964182ebe1b3b77de63580a98bf7d73d51"
),
(
// Len = 568
"9563b92a2995bb79d81600f0ad73237885491c6bbae7c97d7dd93d0055f5b5ea596e158204d1fcdde7fdce9470f10df63a2961f4102a728d04b08d59a54244ffb15981b52a7d92",
"53129faebc678a039fdf7c37ab37cdd62d73f0e54e3f1dcbca753a410f9e83d4"
),
(
// Len = 576
"117a61a6ea52b4e08cdd4181ed6cf47b70a409ca4a4b0e49fc68cab2934845a5c2a64cadf9008d85ddcf07cb3cfc47aca15076eb9b853598ee004b814890270b3773b8307346b651",
"e0df8b5b581efc2a826b45a641da07f5e1a23c15312a13c7a6a6e875cfc1a722"
),
(
// Len = 584
"16be1d52ba64fe5cb4754750fb7de8e97e346bc7c492d2fc058b2c79d1e3cae7a1e73a5c4c38b800ae0050aa7d3894fc6dffc33192952e98215a11f23edcdadfc4143b104df310fcf4",
"da04df93e31836bdde47228c50f9627875c3521bf205c42d97970333119697d2"
),
(
// Len = 592
"60a671993a6e063a3138ccc76764e8c176dbff53b6df17cb1b28180f38150399bb7533f6e33a311473fddbda62c49cd99f9c2c557c4420976c39a6a54fa93e0b1e720101ad32162030f2",
"48fee0913b623bf00746c02497f943668e12e254229cdcd23602e6b5c9f089b7"
),
(
// Len = 600
"fb93b6986c553499abb0ddcc474905eeee54972d60b5a061b74d94cd6ec5bf69587601c4cb365e77e73b432f85491d749eb5a2fe6b425f228ff4f0fdb9b067112669d6f2a034698770acb7",
"9de923e3d27fd98e89238115d7750942f4b1e158074c7ccc87576659919fae2b"
),
(
// Len = 608
"f5f5d46a93890c91f44ef117dee507dc9eb843b0dead86d04dbb39d42ce68b22db608c6eea9800dfe7f1f6c5d6fea175b6e5269592ad66e069a0b5958641b761a144d08cddd06bc4c2628a99",
"478f6ff7487f09170f44e0b3932f7238ff1feca16702b37725532b154e20c3d5"
),
(
// Len = 616
"602c0e171235ada5e213854bb33ae0397b989b1ddc6ba9b93c157dfe770897d834a6f047db9decbdb1710865ace99f27813a455ea6ee17e20395e07b9d7853d21e4419f9e106b79377c0f823a9",
"f9c024ebebd6c747be0998fd8d28cb40abe3a7bad8000bf10407783af5eca01a"
),
(
// Len = 624
"974b2bd19089787fa15a82363bfed4b352a7d196c1cb77c7820b3f420363ec9aae186c3fa1e4be423f41797a3f4d2e91f50027b6cb9f7d4eaabc91ae1f7d49ce95b50d379acb7ada0df3544c4183",
"ec7ee9155b6fc91bb09a3f8edaf7aaee47c9e52928007734b24d139a083a59a0"
),
(
// Len = 632
"de368306ec4fa66a9d51272eff46ac481441fe227999eef373fbe7c847294b2660cf2c4d1ed2b7bb23deea2325966c3ad86a5c52044a4577462d408e568bb4b65ae10479b3bb34d79a1ffbbfb667f9",
"1fd3379677ac08d5b7f207f892b6ae3b7777248c0718723bf2b2dd33a4012f89"
),
(
// Len = 640
"8ed256e0d6a1264ee7548e75aa1a2a61750b65eebf212396bb43917bf9f97587cbcc68a16d8ff055e37eca8e99f4f00e0056fdbf7720553363e7af5de024e4acf04d4d5edc3eb3bfbc7e4e55723e6473",
"0d35411f77a611a50d875f1413bcff8b27353e8064240f98db83648c1c62695e"
),
(
// Len = 648
"9461320c828840e66fef43501328fd04764a62528815124593619b069f00793462ab40e53380cba36f0ff48338f187ae3ce901c5fe130a9174a69814a6114809bc88eef009ba9478ca88fb027a82b0b66b",
"2276b618e2d23a66e3aecdde8e8cdc2e60b3f78c6fa6933cc9f0c5f011fc4ab5"
),
(
// Len = 656
"b27b6ac686fc3a2d944fd4a597dd6220cc532986e7a250709e53ea2104a18db61df77ca3f3b7d18706a52d9e838fbf4fe2e9d6ca8b273a2a7a254b7ec6d834e3cfb087c368584b6efe780d8107ccd1eab5a7",
"44a4de2c480e18da0e8f09eb588645124f9fd28869e4f93197bac26afcd8fba9"
),
(
// Len = 664
"b541cff06b4915b6c7db8ffcbe5fad4622159e6d849de6911fee5ef0d813988e54677ebfb19376786f05752e642274873813f4bcb0da4ecfc8acc0a1bf593014c1aed372414aebb04f60dfb483533bbb663078",
"e4dc4cba41eba52b69f011d91e3e7bbec8e2098c5d769ac05adf6f7f86ad45af"
),
(
// Len = 672
"170bc6e6d472a7753200a546c1541a3495641f46b48025680479a3c0dfd438f6dffeddb3718529a385cee94723047cb9689cff1d1c2585219f29e17efd1975dd1853908ad8b92d5e8817a6ab1c226484be64a1db",
"30d8f10ab5c9288735bf72a7b727d167c2de39ad9f076c1ddd3625ffb35e89fd"
),
(
// Len = 680
"8a27fc2950dea84ef81e2b1171bc9b4a75c9a8fee04eaafc710f813073230bfd4a08279be7cfeadfed16f05fd28ba94855524735a1f1321200b44274d84e72235799bf3e69aa1d57c00db693995fdceeb224245316",
"9678c9ab1ee78084e7c473e55c1aa23d98aae761221e93833e1580aea09b1843"
),
(
// Len = 688
"5766160ca98be4f7fe084e97c78c0171aa5832b80ec5516ea24020c66574dcbddaf3c9837eae7b7db6ca147e5616ef006e22b87de70aec8a4b0d50b1812d6e5c2038e09fe65c1d9d26311c7c480c7db72e3634164121",
"0a71c02de654739e4041c2e538770c899846838ba60030f35a837bd8a4e6ef25"
),
(
// Len = 696
"a08c2ef13daf1fab0c40e4ede0ca49fd686f2f85eb7791692ebf9f63d6e084766db268ab6287566fc83b5ca805a5a56e14d4f3004c85697b4509de1bea63925816fa0378825ae84a9544f29be9980afe6dfdfeb9836834",
"8616be2e8090df0104a220c58571182b44eb807e4076825c265bcb94dd854b27"
),
(
// Len = 704
"c87212e35d7675b58c70b805f213ed3da83130431bc84d1a354b18eece812397f4357a51acef073860bf3d52d22a8f7b5cc0be78880c92be57abad262cd0bd21063872b22879ea883927db0c526b87af2b4627b352ba72aa",
"af0f59a8e86e574a915acc43d13ce3591789ebe99f43d2eeb79dc6e5180f5ba9"
),
(
// Len = 712
"651fd192ef8fb3f5c825a7f09f9278d9ba54e50cbf6cbceab3e39e059e10b0033082951f114815d96ebdca0e4f43e70997cc165639d241edb6dff354f0a3582125ed4037365611a513dbb3621e9b6cb568820ca1554e8e0c2e",
"848499fce82b4ac54ac25a366d83679f297c632cc61cd60267cc5bc8e386f73e"
),
(
// Len = 720
"81601e25b8404ba68082ddd79482ea6f364d8ed1b944393c51db919f6a9ecdebffec11b82c5c5eacdf3b8474be6ee3f4bb72c575b6ffb107da43a644e17330e15f41998b9ef7387e33bcf2f12bd6e6e748ac5cfeab0e068552ac",
"80e1f9a3715371172f0b924d3f540392a2782f5ef960f481a36dc693e6d9083c"
),
(
// Len = 728
"ca3420fa15803cae0cdba64559da024ccc2d22b2156a5e71690a806f90d21c5a073d551cbd92cbca6d710fc64b1113173f35ca54a028c509334679c319961e20d3743c9106085b73796b3ac47c4ddcbb83a60f23cfd52c021ca6c6",
"fc085647b5f0e2a2f1d0dc2afdc82313403a21ac99cb3feb633450c20bc0ad16"
),
(
// Len = 736
"353ce5560f5993a1609bfdd314680ed9e55cb5a1df5cb0022b862e2ea3d5f5d811da2e2134c1c2945cc0687128764a0ed200afb15c60b487e7e3b68ab8ab62c98691eaba52ad4eaf6db620962d6ba4ff6b53b1c7b4654f9b48062500",
"103d653ec46e71401437a8146fa23b0f2144327328422e736685a35b8ccbfcde"
),
(
// Len = 744
"b187ca3719b4f16c61401bcff73c6524a70923135dd5da113b2aac8330d284e1594e1973030bdf654bfb3442379967dfa38bf20060cd129bf7bf1f2791a409ebf3235ef62e3d5b7a3990bd702a2450cdb042ce1010e0ac07a0cb2f316f",
"990ccc9d8b30f1c9efbb33ad4cf9e8461134a7a70b32a256474f4022be3f19e2"
),
(
// Len = 752
"391c625c7a598bb8b506f145c3626fe8b23d98f50ba905ec550d8c213cbe9176daf3d2554d5e0d0264ff482862b71114f5aa0a015310eda91d7aca5a385bd0124fa3689c01769f6675e78fd79fa0ec944bf7959e07834724fd127f366d4f",
"c75d88f069136f531492e533f30bbb350d040a5be278cfea4d3c3cf5592b7cd4"
),
(
// Len = 760
"49bdf2b159f427f95b9de0ea757f8b6214d659aa75612dbd862bcf05613d55abfb485c543c844e98222e8397ae0ff9c2e5536c5bb49a183bc5e840272695d221dd2f761ab4c4b3d6f2366da04567632bbbd086706a9fab2f87ec56ae8229cf",
"a72bcbc6c0397432ce7fd61d4c81a6aa9b1ca2011a7006f1545871f49e1573ed"
),
(
// Len = 768
"6058457a0c092ee3fc64519daab801d674d15ce43bfc906a847cc132ffea015f4347da505108334e6d84eb183deceeb2bd4b96f8472763cba424fda30fff025247dca298e5d6e6525ad26a98be584a7ca3e175eb09d8b6adfdb4510cb3535efb",
"b3132d1b7fea096d1b5ffbc83bd0de3706b3edad062eee0a9608e24930ae7888"
),
(
// Len = 776
"30019315d77a68324cd2cb0b2b1587cff7fdba01d571aed225ffded9533dd4833e689915e201482fd4133a0029c2d020bf8a2195fcd06821d047fb2384cfa7c23841d81a432049183484185d46e87d06739f9b6f700391404b8c64cf5c0c92954d",
"c0a78ed0e89abed825d68618a3a15f09399e1a6b1b76d560e28bd59527e54030"
),
(
// Len = 784
"6baf908bf9a8bf7dc11dc4aa9bcb1e3a668eab6a1fecb5ac5085095c179eaa824e3b0e48e4cec6a5eb8b5086566ec1bcfd6c271c58ddc9a962d3067a72b0fdc1ec0b0ad0dad076c55bc64cb1350e6e327b964fd473197dd6ed84505f354d2121592b",
"72eeb111e66fa2aa63f4332675f051d2fcdde42955dd0eeb56658eeace1adfcc"
),
(
// Len = 792
"f133fc67f9572e460963547895cf0ee4a382fe2158eba5a94bdaf76cfb5098ed8494547dec83c4f6e6186e7ce77c608bfe5fac574a5100952cf70228479a15cc2f6a4a1bed0e12d326804f0efdb09afc0f46535a9853efc54bf1ed938b025fbb6ca9d7",
"f3af9cf52de9982eb8d5d933aa129951b4ed0b43dd247e479d4adf5aee2e94cd"
),
(
// Len = 800
"59b7e92dde697ded672e87633dceb698670a872c55781ae8041c48bf89f196e3a9801188ea8e7651bcfeb4facc6b9234761a61cc927bb59798fd5721efed05996e162258a498a961965e5b63caee974008f90d9b74c2320cbf892eaf773349e5496b3dee",
"8040b1424439f58ac5433b604b7c5d4be657d43ed0abedfa2b8513b3dc69ae6f"
),
(
// Len = 808
"03e74f9946abfd10999451a18d5e3c02206f0fe0f83d907071d955bb4493a9487af9e2c0a4dfd13d7422df02811b04a28a1383835113f3c3ed497e32dc287a57215c18c63bea03af0de3b18efeb63189cab40c1cc800dfb5495ee72687627ea8be976ff981",
"7e92b0f35f5e46dd7f8de142b62e16e706c07ec4b2be5520ebb797cc503f6c44"
),
(
// Len = 816
"73a98e565a1d54104ededb02ebf7caebd6803534685bbbcada648871d482f2472b809d869df197ecd072eebb69b9a63f3adc74a238306d1295f683697975b0a4f64d2a943fc2800f346fcb9d2872dd634e520686827398186a1b82e39132888880b21cc0749d",
"1fd3d761257639041735d47d39ff727b4f2f44f94adb53994059cca6c24920f1"
),
(
// Len = 824
"d0a90c9b46350d24985b769ee1f9127a127c96946027c7e8af479bcc081069d8b9767300ab802443dc9be2bd94f438a671ce3bd1f602baa64a55735265dc2a1f529d1ffe1d4442f9df24b77319f01a8abe555cb558165ba26ccff4d2ab1ef1febc11fdd9553fd3",
"b37442cf95ee5637af57cefb989c1b1f8c24a15ea5a2c473d0365a2a42e8cdc1"
),
(
// Len = 832
"34638ba87c7bc3073a1964f0717b4c14e71b08bac627abc5e3bdc2bc12029047651cf0e298b3ead2cd4ec23fca0e53b1295b6cf08217b665d57922e77bb32fe1cf1fc467d3ae3aa0fdfddfc70c3279368ee52611fddd76d25799bad24de9b41c087884db27bf7c25",
"317efc9a5ee1151d24a0a0b9cd1fa380419253039fce8511458da88bbd3f3cf6"
),
(
// Len = 840
"bc5becc88e66fe1c4b252d4903a41c5a3ed62d8bbfe2a8c75a2ca382eb1fa7a87a947009fb6f264695539098f8acf2368220c1420269095d96addf82cc872a471c9b50170a765e9fcaee38c29b2af91d4aba5f4d2369aaba168a3ce311662a2e017b450cf2a3acbd92",
"3408b9688b261ee8eb9e1484ab5dcc953f7b0103dc4351a8ae9b3e8573229281"
),
(
// Len = 848
"e47f2d0f794b5a33aba7571551112cdb4d0fedb43a1bb5b661c2a8046e659752e5c5625e11bc92bd63ead2b5fbfe90490e7efd4999b3fffa75a8ffe40d9737f35c99526e55e52bb9cffd6ecbfcff140b7d125417c653123bfb122009aa57fd07f150754735a000049d6f",
"48fee50b4b3815d2eb8db2a46537741db9e5b50d31e5a69bb3409d70ccd56b09"
),
(
// Len = 856
"d09a6ee4a5ecf7fa04bd4d17f9492a1953d47151db62a150aad6f0aadb8e1aab298990cf7587c97a4417913e60bb57b48fc9056b2ca6bbd67dac81583b9b04642494339a1cfc146113a69f7462f729f2c02e5decd519c252c544ab00dfb0650345989e6195b3c2a959621e",
"07e889da3bb9cf592ba13c7a639189ce6769093ce639010cca8c1db5872944a3"
),
(
// Len = 864
"bb5947ae19760b064b24c89eea0d49eaecf950f03ee88ea07e4163289bc546571e8e053804103e4f3507ee1f14370a01315af170438011c2c174ea5d3a31b458bfb991c3cacf13ffd7011eeb3929ec6b83dddcc75eed892062737d9ca431f564eb8627b5553bb42c3dd31877",
"dc57c53369015f90ffe1225ff95503ba8968462b616f436a5a635965fb687172"
),
(
// Len = 872
"fd04e281e2be4841acd2610e46deaaeb109f4ffb2677b17cb266a9f039c16737c64ab8a90900eab5d34bc3192a6e043a0e533634cbe7b07d4d596e861bd5bee120768b297775de4ac1a263eb1168251fbc5b54874205058f5e73167a49d55c694be792c35c700d1e13710924da",
"70385320d17d8c10350b864bf4ce1922755c9b62904ed74adea61bdcbf21c211"
),
(
// Len = 880
"2f44968b981dce9d225efc967476df4ad24895b9db58164c66345fd83e84b36dc849f86167c7fe8a25fa20997100e4444879fe24d214703949d0128854c5f61d0fef7e76b67c00db772175e821592c6ad32b8ea540fedf89cef11223b70840c6f7be3cad3a3d88b25efd9b7f57c8",
"47c24706469f889327061c2c7f85b0756f95d2c7b91650d16d747dedcfe924bc"
),
(
// Len = 888
"e92af378cf3377afbd46a0cf6957d7aa1ecf685a7ca3970555f603f0755ab95f84acd854df4f039c95a46bfffc43a91a1211758fb50d940b0397fc79f2b5d87661b0cb4000cfdd95744994708c3e8b9f4f002e050dc310115a0c8a4dc163c423148f64145f41aad38b3f44187dcfb7",
"4140b2d231cbac56a31672157c7b726b3c7a5108696f6a9215603002baed0108"
),
(
// Len = 896
"cdd0e6d2dea9e2ef04ef7a51b0dd15d3f1a538060479b0d804ef1c1c6cecd43abcba0c9a64ef8a68de04b98ee1cf62d3759ad97914895219796e36e65a0a2017c52cb1291b3c91fa404b88221bebf69086cf0a9b595cb4d3caeab925f5d93cbb06eee4222a761c6bc1a58edc90846c17",
"e68551eb26a17e6ba915df9f1132d7bd5162b5fd2d3936d64cdaa6525ac96257"
),
(
// Len = 904
"5476b2add367819e523ac34714ff021aeee73c185d58841ffd12fb8e9768a6ebdf5999b2c01a501255145a69145d830244c01ba2199fc117b2bda649254c3405a5ceb766e808793d1cd3a630312a3376ea4e1804eeda1ba097c1e9bd0e1ec2b3ec7a1ad48393129f67b8d098e3040ece52",
"ad0984a42604bfb78b83d1198a2f9384a7f0bd0c974254390ddc6a4e94ba25f6"
),
(
// Len = 912
"27d24001eee098afca55bee81872d4928ca9151fbbb58674861e578a2d26dd55f81d56e7feef97c84555b05dc785f0532e0672eabbf95e4218b6cd45dcaa9ad5c7f1bcc5e0538e25a83f836fc473c3f37a35dd362f3c7847f2458dceef27a4b719607df9b30c1f5c4ba3cb10178e0491c4e1",
"779417750df1668caefa30cd6766f4b3abede07a78c02ed47a74d8955086017d"
),
(
// Len = 920
"c7f31e3f3a1185c7df75ef842d08e4aa0298b622f402c5bf12dc4e166d12f8340617744128fa09086ff98c9d0270470408fe26fc01ecbc14c80a2a361d236b243bdf6663da6f6b4a68f7e76b682f6f712e966e2f832b434b356e825392ed78cdccde30a74e9cf1b694d822fd07916e3628dd65",
"528a0acaa54ba9aa598144185b8af5cd525fb5afd13e3bbb3a2183149a22bcb5"
),
(
// Len = 928
"ab08a9f73e177992a9660a7633e8a7da3643ccedd8a40fd5aca144e2ca21487629f16d6708e7f9b24e042981edd05c23142811edcd21c27ac3065c8d27a403519571b89e58b250a6b67a28a34a85c75fadd94c7bfb0ff5be15524c3df64f8e8cc1472b19f97cc0b0f6e853416d1ba11bf4ee97ef",
"4b4b3f87ca91f8c0c8c8c732ad55537295b73f6e226b12fe84a75020e7be99dc"
),
(
// Len = 936
"fd8cae13defa51d54adf620b278e24200ae5d100ce24413b40e25734d0ee24ce7bd2e15acc332f161292213920465a2a2c2b2bfa506d36914f8dc6207ceaeff8bdd1528a0482a11714c3513509ab6036d78b3028f866ba48f48069706b5969282abbb22f3d5446521797882143e8571b7487446dee",
"09563167caf2f0be08af722e50852b9eaf28708bfe29b0a5ba2285bc50125a5b"
),
(
// Len = 944
"feb6e27e2053e979bc12a377c5d3b519190830b19051f479a910ed30545a1e521101d13154bbaa11cd4e8993213eac3a46ddecd72ee050d7f03d0844982797a92968da7d24858ff1d31884f456312f9d0e1b743dfcc515ed021d329b45c9446e321fec56a47b487793cd6ceafe9c880cb8fd4ab4c25f",
"deba792744a520ff2a7c35e05d4629c1312f8318387c1ae2941d65304a963d1a"
),
(
// Len = 952
"a2c47dd45fc29ea431d1c31d28679970de2d3d4b173ce7a0489f9d92545ff2f7246fcb84326a29633bec8163541ad43348127e5f4e660096069e295bfe1b52228b1da7bd87d021c3bda22711bdfb44050dc3655b2965f22f031c8a0137dc24c3facc80829da1465a446d6c0168b10776746cd19dd2c4cd",
"edae75343288f8e5dd9950ad2a3d9dd20bade4823696d681cfc70fb6970957ff"
),
(
// Len = 960
"d6e058d81835fcdb30c95cb266fdf9c042662d44cfde4b4552b817f08adbbd60bb1638d34b35ae7bfe0a2e640827254b8e528f5d31dba38393ba731e95317f5147b72493edd30fecde3d51e7657732f3cac251fb9df47e31aef24f4424ce956c86baff738e0e606d4cb154b12887a5f24af6ede7eb6c1999",
"adc3a3b0b9d5e5440938702efb4c560aee5b00df2d4fed79244e290a0a1f8539"
),
(
// Len = 968
"5f68de833673efbc2eef30bcfe91294a427efc6b06a15d50984b3883b7511d17bafc9af0708aad9e79de5b776f85c2b104be1c0a607a5bf9c6937d7de59a959f972f9007b93ea5331c01aa8b866c3d8a2b5a948bd5f0849b840119699cae0933dd9a3a97d8e0caf4e1758067e2bef20d198799ee771e89fb1f",
"f112455a4765a17b2519b4a2ce0edca446394374a6879525a6d844e42af026dc"
),
(
// Len = 976
"a265bc516ff02f092bc6e10b91d6ed075655e91547f72ece901c46aea641ce49a78a9a167bca1fa69001b222d79f292ef412433c09720a9a8f51483593167f3aa11a501ce470c3757175974814c07609d3ba45dc2c5076bba1bff134d6716f778bbf94703057e5a1cc7ce9e13d60ea101a30ec478063032223f4",
"4a93a81af417de5e9ad7f1cd99d123bab21d1a7a3481d5424f0760d55e9ade58"
),
(
// Len = 984
"57f965c671f1860661b65d47572ac4410c01a2f611bd27fe04a76208ca85fc227f62e8f0546ff6b52554fd7d7fc1bf8bc26182d41fa9d22351352b1bba283d3a8b262bdf952295bb769239f654f881165a03ea79acbd9dfdf2c919adf257e87d7d135d1335f2ceac8508a2d90023f05b26dbd5d39873d18b3cea39",
"20c540b810d9e6e875c898e1b621369d4bfaba50658c874c1e5c9c1ad7225aea"
),
(
// Len = 992
"2f4121acbf340ad26afca11682a9b85caadc4c050327dbd6c04ea74c8b9285bad4a66793db7166456e075bf0b1144d5bf09961f3c13cca828b72ce160453d1d9fa386dd6aad31b18db77098c8b56e77cf0486fb285393411ac0328b157f98a5132f727ddcb43f5a6baff3246561ac2476231f9e86b2efa183122c988",
"b596a2b19549b7ce6a688c8359864356d35cb07d39da9e4c06a8b6ca0b9caf3f"
),
(
// Len = 1000
"1c53da4f4b022c164622bd0021ef47780909bf6c3bb955a7e74fbf197189a28edd7cdd287f093fc52bfcc64dec0ec5f5178562533eb7fa2507ba3f7943e107205ee449ddee89a31a866a6772782d6890b3cae4f182df1789995602dd3709fe95ee4873dcd117f657825ecafb8c328c3ffc70307f4f4808e99e0ac7d614",
"452eef9fdf39be51a4a2dd512485f050e3f84b12e232ca01c81cfa69e091eedc"
),
(
// Len = 1008
"c66c030ee0dfe0f7d6387a350275c1340100317231b0c17ab9ab18c473efd9395bdc483bbc28339260adc763228998248aca96bb7a583634044ef8773dd1b099aef8d46a2108fc82b5c4e5d84d7efdd7489393c3ecc9f7f018f06856c118ef7011c4da33ccd6b5829a9b5be81958c061eb5325d81d1cc9350c318cce4a7b",
"5a3b33a79a3ebc65f91ac394b52775bc0ea259320ed80c6e165203197619c488"
),
(
// Len = 1016
"3e5c40188f0def45908ae0eb72fa43335c2f868107a39dd0d9aa0165794ce1b7a822d0372fc07cbf4a5dabbd57eef0b31e7734251bd2f6f47cf85af5443caded5e7e248e3ea14e89fef94655e8370906af3d2cca0f22bf8c1b198160552f4db4ad7142ec1390751189bc6771f37077a3ada36dbdc62d4ae146cb419cfb8f51",
"0b8b6526bae25b8b895afc986632130db52e6103e86860167deec4a4954de704"
),
(
// Len = 1024
"a800939513230a25adc68c1ebafc965daa39cb6800f8b2e13f7e23dc79b22d22b3c0b7c7e4c1ec918879b0437546a020806b8980643b62a3ba86803339ad56ec6e0eb452d0a1e4581a949b90da3cb05ba83adb0c753eb030c43063fddebaea4cc89f9f994083f15a178debf2ca9c4d72d6287f4c67307c2b60e0293e9a148b63",
"ba0b4e9c2ca46977e397e33016d1725dbc32be5880a524b0ea4b783452aa80c2"
),
(
// Len = 1032
"b32afcf4adee4fc57c3ab746d604b9ac2d38f8946874c0c954ea08effe9353b2bd4fa76b3ef630ba30e70007ecbab319f2acae5b216f2475592c6558c0b80b7e08b2e946a81a01d90202e1eebc9408ae41b70a62262ed87f5b3dd71bf6e299fe9582453e9d47189f49f98d068d96b5ce4dbf3174ed09f34846cb643daefd3b4380",
"a9a6d8605229808daef48506301ee38a750e08bb2eca95e80a35e9275de38aac"
),
(
// Len = 1040
"81811dc999bc12934a1921e1cef02e8d21a37b2a96c4706228ad1126e954a66bd6c43470804703cb6024ac2f14dbbd357e385f15fdd077267e884c68ddf3d3b4b7082437502803b04dafe0628a9d9708d6f71ed3c895f9461e46affc3982b0f08bd528dbfd2b8c4bda6cad650a456de03d8bb40521ad4c40f4fb3d2d7eed1e09c346",
"91f3a0be826b4c07e6d5fc52882ba48ecad2a1c5078b57d98feae06acd6f5a28"
),
(
// Len = 1048
"e4c171710c4cddb9b1e8fe1fc83bab7c41cd2a8d0e1e894b4b07396a11fcb0f6bd2267c96f4583202d8240f6beeb72ffb99c8dc7bb1712071e4b713047222605448ecfb3d352d401d414f792006a92b9072081c23793ca56df3b86265dad2ca23bfb560e4d2a0f223f07b5407148fa78687b3ba00f05f6ee407d159e2a4140653c9773",
"8ee26df5decf38716d2c9cfe64831268e6537eb3af0cfdca2696ccf205f787f1"
),
(
// Len = 1056
"8ac183ac018b6142fcaa3c7512b7b0b2c6b6a9b4f726ca95510bd6b6486d2ad22fae7e3139e073368bafac9d675d502e13fae20a20aca071b8762800e452d2130051443a32b771bd671d5bce7babfc8ea5df99c68c393844af604594b317a7b469ecef9ca3605a0a7eb5d9f961d58807b421ce405b06850b67ca9f1be247cf4b33bee8d7",
"e70607fa4a36b98a47801833be40475efb536a8644e09074105717378a96033f"
),
(
// Len = 1064
"1f42e29df7bb975990206045422e869d350ba89cd648b7b88f8704c245ec9a642e7c022637997fc8badf0efc0e949943a042e0778a982f1a1f33dd652077ca4ef3cc742b66f4f420d3031de298b62538f906af849edf9ebe137b2333f3ed82e7baf71321eb0742bf0b5fa1a315c7db0fcd8b936b6b32297ead4db2a13b3488f52c9b1617a3",
"2c8f576b798a9d71565077727d941b66798878a3bb54f435fde73ef637109079"
),
(
// Len = 1072
"58d7aeb77951cd402ddc0eb9707a24a2a4a350f155f12c8a7a21b61638ceba91a668491fba165fe8f36ea264e8c6068c6a577dc048aa4ac3cc01d904d0939676fcdf95b7f6f59fea63414e4c0855d872ac5633f5007db8cd7f91d24f2568c621475cd83e527828b6ba7702c2ccda357931686e32e626ff65b8d1b5dd397cff81d8d8c02b50e8",
"366e884fb61b0926d55b25e4502d0d1218a462dc7cd0b5ae1fd5fe261eb3e3ef"
),
(
// Len = 1080
"e10a60e3cd2cbe02a6ef6b1421513b21b7f4f26dd12cead1aec3a96eeefa57cf05b7b2d2e471d58a60409e8292d9a349cd96b79fc2a17170641adf521536211aedd4ecd146c15ba702fa2994d4cddda26395412636b3979bce76ede3ac0ffe9ae4ea6b2aacc7d1afc1fb4395c821372cb67952ed2ce988fb6075de0d85dca769c7139474da6523",
"0a67de446302c1f554bf086b3d2c130dcdaba48d03aaf55459277ee43a5f8506"
),
(
// Len = 1088
"9b6166312a8769563ee2a92b0f93b30af328e900aec5a8178dbbab0195112431728b639c12ccf350af9c7cbf302fc92358b3240679cc1d0687c9071dda2c4e4db7b1e9ca7ddd1b2d7997eca9c6b6cd1e69f225e2be42e8460cf063e71cb234d4631e9ee1fbba0f7551fb1e17b1ec361ade5bfd9d9ee6e4aad64791f3fac6c85ee46640df204f5472",
"736266858c2a45efa30329aa98206519b3a0d17570cbff6ad4f9a53ed9773ba9"
),
(
// Len = 1096
"4a7389fc60c0173f1c14dcbafac165d109f7c403bd8c61a2f3a18214f1d7863c4a1038abd150eaed64c7a75f880d319104f695c282f6647698e68b8abd12c60823feb3f44e9ee2b3658a13ee9744809b3a155dbd0cc134a5a8bf2f65d2f56df5f321ea42bfccf625560913ed4e938988a9e645b5a87a5a503a89b60c7e24017245ecb505b8ab2b0fb5",
"45488a27e665251cac69c485edb3f68a12187d6ed508a5a8b4c7efd2f2e255a5"
),
(
// Len = 1104
"3efc03d2868b7b6cd131154c8b6686151d92944194078780bc8d3968b8481df64521c9cbad45387f774dcb02b45118d1e3ad1378b49af9712732d9df7af7d6bf18a08bc5e6c3445d110f60c56178974525aabdda45b64b6de8244d631b242334c4aef9ab713e08824e6848afe1e0f4078ab1e1d0682c3d51518ab56dafd8a173879b1ef9d9277c288fc4",
"0224c87a1a72a693c6bfb76eee751992a3c418aec6baa2e362a32d691cdac2fd"
),
(
// Len = 1112
"d770a4cc772f7e59ffe6853d38d7c8ed4477c5e5eb4d810a465b31c283c1875b322b27aa5ba5035b8c8998c46061b1a4d8778ac4c40bce0b6600cdeac15545f4806c9edc11a1379e2bd0628b311330098bbace4fc59d5b2c9d29165f7e5b53ffc8f1dbda931278bee3da4a14ee7a1e7934ecc9fa892427274d3d86cb99d9cb61cba63b5fb9b41e9c8e68b0",
"ec5730afd9b0c449b296ee6ba6332c733b31e1f4c29b895fcf3c48b39d811ea7"
),
(
// Len = 1120
"7ce3cff518bbbf1245e3396c3177f3fd10cdc872986eaef8286216c4f07f756d6244637a00228d4606c7b2373ea5344f72fdc20b6c700494d31a59c49ace31fc13957714b7055abecc0df60bb22b5a25281d31948d352860508125ea5056e764eb5f78a364d36230e0583b938396b9abb3ea3f412068a270eac75a3b1e429f0aa118ad05eb1036cc68725feb",
"2c9b3c44e9f7aa9818e47897e60114d02f854b5fb7f066f516fbbd44a3b6d235"
),
(
// Len = 1128
"091897bd03d6fe233fa1932a68ee6587300491d21c3fd8084f0ed4b78134a38a4c3a474f11467250e7067a50f4dfd725e468f801a7d009f7dfdeae601251eb5f8b33ae9c7921ed612768b21c4889422cf23a2d9a0b3791ea16404b289237881d6a36bae458a8468010f99c5882df84751ab21025eaa11001e25c297493b192fee84ce340f52ac105235d5ea63d",
"817db6ff5a3535a7a46006de43418f675a2d98047c8d9a730a516529120cf701"
),
(
// Len = 1136
"e31c57952c7d80ce8d81b0eaab247e5db67d46036087f88b48feaea65c55e33f713ad59db8566b45d81b308340aee1f72b27fa8caef317f7f2c69d4f1b808f8cbb642973bb94b993b0ea17f098f8e8c320e350cfd767c6c92d631848e4a8d5a00cfe14c893ce5b43b87334506b1c148c00645bd7cc22a0f985b9426a61170a6e161f36a9ed92eda60522f6713f0b",
"a23373b18aadfda09a4c74f364b2aa88fbec33f5075c87e76373502fd0d8d1da"
),
(
// Len = 1144
"fe3f7059163c7bb7360171786bd2907641a6967850830b3e2911602082a02c80df9cdaf6d956ad0f571e88c3f1183a32bfd0ab0f54b64d7ec7ae9e4a4ecbca2e67a52440fbd25053f1d816e2f05015b021c1c075770df33ebc92880a5d5338c5f95d06f42f5647212e5e041faf1acfd0db8f46529d3a905acc19642a6d9df066fbf65a2a4da24c7b01509bb06a6b80",
"90fbdf2faa51817e4c0c623c58a321d497879f7dd0c4fe4fd08f9fe2725ba310"
),
(
// Len = 1152
"45fbc797990128f3cd4258f8aff6e915f1df701c2d1368a814b844c422af4568ab0c00440e2937db6b90d41b86bd31779da293cab5fb73cab4b78ed767d43f13e13f57ef698fcbd41fa0f0a65d211dfbc3b1c579ad394361f1d23859a6786c88b8c377215343f673e3e6194107373dcbe80244953c87f62d592f8600a7f28960b601810944777c285e966a65cda731b5",
"b876fcb199858d8080269efdf0bd33ab1a70c9712942e628873330483ff60bcf"
),
(
// Len = 1160
"aa754ae6fd411357719958198ce17942e2fb4c2772c94fd15fb9372c6068e20bde2df1db6f0432e09e8af92b6c736d4e6eba75e183c5b2e27fe90fe052f1eb301edc0b8de13e6e7fc968ab35db198449d3f92b56bfdd393ec7481e1939094a58e556e6c69454465ebdf194980b18e2de120d34d1eb6e0fb3b62dccf03617491c6d2fe302842960421bf4da260cbc051fca",
"bb3e71957c5cfa311c5ece05b76db9f4b16ec2ccdae5832752326df795167250"
),
(
// Len = 1168
"3af0b6a8ff695e2d364f644d9880bac863bc4d8d1d8fa9116ad01e27d53df10f2ea7b82d11165b4766bf94ff404fc7a40b153128a5db3a0fab593781972991c5d049f3e2604e29c60dbdc54d0d8df118a3234148ff7c58abd6902c6db9bd328a07256c6773952d8153f3cf6081c17924e4bb6de438c68f0e56bc7b0f7aae9a81d406e8489c16c9ef0a99508b5acaaf3f861c",
"5ed66c835a790c5b0f10a4400de22a3fd53e39dd6feee607ec35742dcc61efc0"
),
(
// Len = 1176
"23bfe3b3cd396f4949e9f8e36bcce95314866ade767478c6ffd291af1218cc36d7afe9a4e959ee3242e616adb30001c8866ca7fce01fc3e0f25590046d5c3b440c24e9f57dd728c0be3f6e713f6f3ac5dbe1c2bc01869df3db2df84889338c9657758bd54db4950bf3047d3273b7f84f99bb0c9a41a98d1cd6856460b9f1f6106781e6b4367cc029803d5cf4f555448e105028",
"e5c0cb5192a9be780f8a5db3626aa1c34f376b0c352e1e4b8c3e3e01ee28004d"
),
(
// Len = 1184
"51f9b66ecf3cd32ff5c426062ba7ece0de69a007e9dd64ddd2b92161c972891b6b40893b7c5c6b712191774d39642d17cdcd1fb7ab83957e3db7df0729692295a9acd026083c982ace0f770774a41f42723ef91dc28e9bff457b066ee429038ed5d4b4de104c08de5c80e6d124051397440cb4079b5007e0cb0e4fb037533f0d27f3eb3840f4179d74fe6e99038130488ee54f2a",
"e96fa1baa2fe542bd3007ccf06c61a1f45282a1cd32e57635df051ce163bd72c"
),
(
// Len = 1192
"36570a02655ab29dadf1aad5e5960e258b25c20023319a27b3ca6f42b0bf6ce61777e87cd19b1a7f8dc454725b6298e7885be7ac8d81d3404c4382fd03eee41a65cc973768b1b6f5760b68d16e01b9f75ca0a3e922772a6fbaac6cbe9a51d8001e70388621ef7c97fae46969e5226042c3042ce67b56553603c2f49e13cd9e313dd7b85fc634f6c119602aff828b42468f6f2c0bc5",
"94da89c7ab6defb49f1d8c81637f54b417ab965d9b2a21fda699d9ec31744407"
),
(
// Len = 1200
"8241c84436665804058a42dc43a1a378986492f88e917a19d4c0a943edb4096ff6d2b42d390d313e98731bdb15be54ad22e6a5b17820cb4ce17490ce29993e206bf24da4007ee398f2ff7407bec8b5e1ae5b92267c5e735dd3032cfc9d6b1c095e69ae5ee892f7db916be350349831e2f4c40970227dcef580fbf21e660f27c479d52361671a3df9862049bab87a9dad3fa61d6223eb",
"7daa07c32922162a6d6f8573498affa1894943d51d0e0af8053a0467d672108a"
),
(
// Len = 1208
"58a4e64ac24d5aea12d3bf353527507220d79269914be42ef823d51585f901dd9ee8286136824b48560b7e8b32cefe52a591bb37dca066d5c33ceb4935ec27d3d54f340bd28053288bd2b4bda0b3104644cc7e206ce4f63020e17956cea12aa3f15faec3df02ec6ad4a128755438bc98043ab9701fafa140901a965fbcc102ad20b171ffb45d6a89fe92fe52cbbbebcff6a5401654e156",
"87180fdda8b017fc32c7729f4eff968d5bb05068a2e66c2424329bb890b5eca2"
),
(
// Len = 1216
"e5fced44b8ae4765cff8d6cead34393632cc358597f07166e616a7fc6b8853518441963cf0dea2bfd7798e84adc7bae093ef662bdfd891c6ee39c35ac117ac4558428248202508f79f967c4c5d362df126941c066caecc5be790b5a9a761eeffa47148c59750bd36e63983446fb0369644529cb101680ce9f9c292a02481a0c8f3e98e8a394bc020854465f5f59b8b3aee27ebf090f7d989",
"03ad79c487837bea5f73985e557f1761a25b1f8eda6d6a793c0ad265cee15b67"
),
(
// Len = 1224
"b96b2adeedcba7e0b4356aee812b0f066f74fb6410879effae8aef3f81c9c93b35f31a22bfc10273f66d627899727e09e67a6ef7010df6b097e6ef19afb955e5ac6f076b300adf2778429f11b41d1a9b9888929a95894b2d703b461ff49c05a00b0c0c3b16ec628e2e01a0e21fba7eb7431052d99a9d060ad84d2acce92f6df43c7a30536693e295958278b43df66c8007be5aa25c61ac34ae",
"8025d5238fa665450729f5afb18c2daddb6dc424d5ce459ac8f10d9def32be13"
),
(
// Len = 1232
"d70198076f8d43e9bd964f5179e5e6fb5d9b385407b95bc614fd2375aa57248159bc89c84accb108630159dce73fd844da1198e2caf4a9dff2cc549c24781e7d35a7467f74f787d8f9e1b4e0208c25fb9ebede68b38747a5539c4177155ff54a073bca7b3352532c33080d5495334f33f12e9ca5b5e44a08808b8095eb75e0f2b0ab6ee3fdc21031ca1e855f51d59343032fe8b81332c194be42",
"0c1529413c0069fbec515d23d812c15ab27abb7dc91ac3fccd6622e5fa7720cf"
),
(
// Len = 1240
"2aaab70b9d68b60b4cb4cd5ce5987a6af8cc3f8b0f42bbf7fbcf2abc63e9fe8e93b699301e503c6a040ac7e9a242549a0e94251dd6e115d2b0408f13298ea2bd443bee638b2ace9034967ad6d8ce71e662970439781a0c285a9b3c8429de416e1a2fd2a65aa1368e37b1650f80d6f6e36dfa1ce514290e6fc44af3ee29345d43642feabed0214d07d2b21752890d35f60852dc1d7bea8c4035802e",
"2631963d15a9fbe58c833d8ed0d00ecafad56b5147593be87f538597aa2d4b04"
),
(
// Len = 1248
"5fb58ca219bb8cd88cae259480d8abd261b90858c25a34dfd61f6c1655ec45b4a1d157bb8ce4931992b9ad129158e5f212ed4ad4477fb41e9e2034f40c79a8ad4aff69d7e3fcf175b59e8847f76d39095a84dda20391c0a2b2f597be6e3f6cb93fd59122d28298882020cf178e0921e88dff8b91914c344341cb02b00b6f6a4a45fb6c177e059f9f266fb7b478d89d05d729976975ccacb797ae67a2",
"1a589d33c791cc79e70b52110bc057b3c7880e5b5e1988eca62c6edfba1c140a"
),
(
// Len = 1256
"1ed2ed63ce5a7b4c5f1bec858aa33a027cd7085400a0bd766c692d041895a63667939a35ee15824d306ed3ba120dbd8ee5c5e3e665a05cd20a89d6221f7c598710f3bdff093f4c39ae20f4c02eb14f137732f9ddd355afdddf8500fe025985124d421256825e90317f84f2ad3641c0ad74ba8a47103925efbe25eec07f74d3cdb6e5243944b46ac3385c706e9e311c13eba65bfbe080eb9ea6d95f264d",
"c3dbecce03a67ef72815984e3e30a510d9e523a9668be387e84f77b7a94e62c6"
),
(
// Len = 1264
"33f30418183e5dcca92005069174a4c290b8ae3713aa179495b63b6e1562bc4955c1626dffbf3aa8e03fae71b35334440be37b1f8d93b42249f0915f524ea8a80f0a160eca50b7aa90651c44b85188c43404e3c29798e4e1887640dac5e982d4f398e3bee99a68790085bdb8d6457c0a4a60cce1f9b1c38128035cededdec2e177a59f604007d9408c97f963dc766d27d73a09d0ebcc5114d0ad02bd8cc4",
"54201a977ae3d810f52cc4e60e92c3c8b98df2283de0958f027be6f00dd4f58a"
),
(
// Len = 1272
"9e036a3e64ab463debd2d5e435b25ba3d932dde202c9af54de7f02e03d8ea5dc920f1af6ba6034a633098b69bbe60d9418eb771bb5266f93a67274e30019c09329da89e33bbe8a6fc715d883fce51814d08f3085b6a0195c128d4013a600a6cfdb2fb317ed3e86b5535e394f44516415e1959b9835b5f54742355ae93600b912306d291eabb0d4ff0f0d4f535fb469404905d97ebacec6fc0421e63b22a04d",
"1bfaaa166d7dac39d30ad05d4fbe054328e04cca8e0c4e371c2be7dc70b06c58"
),
(
// Len = 1280
"530d7771b92746b83653078ab2bbf4f304f9cd83b39b4ab09f6c97da8e3728e244a054fec79ab6feedbe89a0797e947e7761022bfd4cdc9cb9747748aba02af0407eee0818a506066390a7dc0f3c5b879e5db29baa8f376303afabaf4fd59f8f548e976c339e73962f1a733e57cec5f52c7890d608c8390c78e5bbc7bb5b570fe9ef7c1c8defb3bd0a26fb61f4c1572039e7f742b0314e281609f0d16447e14e",
"22f199253a92d7e9389c3e8c960491f14478dbe366d9d226d81c23974aac31fb"
),
(
// Len = 1288
"365d6bc44c1e8157457db9393e105a78f852baa98308d19912c16b77094cc53faa3004f74f864e940308ce421829ba117b75bafe7e8c98904d04075751cc96fbfd9bf24c2140e02449af6762d8217353972e5215baeaa508efac5f4079f63b76912dc3b26ea4d7b7533e192b608c7ff7bbd10c75bcb17dab5eddebd7d3264e64531117c1b5ef79082e92348e1fb385da8492504043ceeba2abd6797efcc7e350d9",
"4385a2f81f0529a9c59ab721b0a2023c541ef1aa07b47a2e1b8aec83c7528764"
),
(
// Len = 1296
"fb128eeb8b97191ecba73d7f2d1803bf684403362fa5e2061f6103e74454c040664f2bf2e74510b3ec4e321a6636d9cf7add06aa83e8b1a249b48a8e084bcf6f9bfb62824073362cc1694628a020f81bfefec581e77724302bafbf34fa8ea496890619c9794ff63bb93d64595e5c745c5b3ade42b10372ddb23111adc0b64349bd5c1237ac09726546d7bfa43333008f6ddfd11ee244fb95760d4236c4868081e393",
"1750c13fc8e07ae6f62338a1632c49430b0fb9049692f5360ea733dd86653853"
),
(
// Len = 1304
"b8909c2bf6e202b58636e887c55666977548db71dd517f208843a708c58b9b7d1b37a9111aabc7a0e2b027a7068d3e7cd61aedb46c6cd5f4b07cfd750799f323d09c34eb47fc8b2aacb3d1b340102f172b1ccb9789a08c3a1d89af2422a348f33f7dde87796ab1251d83d85e940775bf244157aee1e3e8ff6d98248f3b6c837be9620262ccb487ea376048cc67bd8c8cfee33ae0c622df33bb03c3f66f477159a974bb",
"13c9a21c710b3d4f90712c5ac4f10480228f85867e15ed038b0d7b12892ced93"
),
(
// Len = 1312
"7629436061a3a82d0a66b996659cd14563f32597ae295ba599a217f24c8caec3b5f1231694cc449f32fd36989a07defefb0395aa2df14fc69467b9e0f367a4a958c7bfed93038cc601c35f9cca3d9ac54130706e21c035b627ef971b563bc4af02849d9688295d8aedbc26b7fac07d3bf1eeaa13aee0c9d5cf60f1269cb5d69e3a7335c29d934c8a5072424b33c08724ae31375c120132e2622309fed8df9d1353d3d5f1",
"2f7eb49a068b1e1bb22ac501477089b4e4fbde4a94565f143cfff2629086757c"
),
(
// Len = 1320
"66227bb795be02c87e89ed2dbb2589cd26bbb089dfb987b89924cbedf7a0de5ec35a155819172197a10ec55c344e2a5a0adbe4e9956ba12f8f6c1c870dfbe5d156fb296f134a07b459cc118d1a3be82517cc0fac37b0dbc71df74e2bf334fc493026b84370bff8c98b0956a6453fcc5c0bdb08428ce409aadc58d6cf8dd218bdf9d1006990f9331c028ac348c98fa5d46bae17f79221a16e7a773e074a57c44428c5aeb9be",
"d7c7afe6a5b2bb1373a0a355ad702bfd37855f42b1fb439347fd7ecc7cc5db23"
),
(
// Len = 1328
"e1d6c16c990a3629af0a945d228bef432d5ebda59dc5f0f48a341d4fe2d70ec4add03147da67718a7205e79491d7d8bf369665d35b55c8e58ae5356dbd43326a1463b2efca23793c2960d1bb38a97b6f3fe0429b360b80c0f1b52eaef960190dc3cbfd8eef76ca19d79bd410454f7f8530c12066cca027bd56556c4fb5855d79515a0740d1d15aa86d2fb8b37f3738aff95815c6f93c844f92f09e4775fcc0c656c807279961",
"503895548a4c899ab644854d601f8e7979e1e0ca695e967da05f434312f5f559"
),
(
// Len = 1336
"d0079188ba10c0f3bfb94bd58044120493a4f532ec6a2ead31857539ac0f9b7d162c06d13cc6c4fc8010d10055e305e988fa1b74654a2197cf96d07ca56cfabc98008ed4c653d04763a247b8864da20e48be82ad08a445d83a1655e0824f9d1a4f2bef167fc05de262a59be8f33df63bfc79e9051d2edd58443339c783d7e1d303d0e982904764f3ec00dce03ed31b3a4c053f6a331dc27851fc3fd4d321a7d6f2915883d8bc76",
"dc12a13ac5ca172126ff197ac0503ddaa9757f7488d24707c6a0a142e487f363"
),
(
// Len = 1344
"c5bd52a6fb25c13572c675dcfa929f73e39bb3b86ed45f44c6f19d4aca59c0901713361239f748acbebd88b94f272d33c3e0eb31b54b767c3c13c6066d8796859acd97d4c4df80839c093dec306a1ff44b0b2601569d7e92b144991ecc30a367fd3b3bc21bbb46b7c483a4f5eec4ea39cf103b26adb9b95efe527dca822131805c6c427728882fed0cd4e3fa98cd3468dd6f8e8b2847e9269a67f01c88229de58fdf5cb7688ca474",
"8d8455fe9599de0b283f527b70491ef524f9a58aaff6a0894fcc190417f641c9"
),
(
// Len = 1352
"60876ff955a3613212efbd3b37a761d10e52ee96758b7c046bd9bbd4656049c6e8b8bf3d5b21706e112ea948d50b19e35e087ad394f6d7ffcf93d435f41dfbdcd5bb1a31dc8b9fedb949368e545072b258ed86ece45decb3f1c0e9e5dee5c2b3a0dce57d68846a21cea0b022f123d549105c36f4b923a8aae49290c2775276172f5b9497e0ffb8aea069d1918da7db9d031192bd343b6819cdf8db444a515c79adf1108df0c93c9033",
"b0fe3db77a38b1226d06ee0aeead47c4acac4e2801903904f6da833f80c0753d"
),
(
// Len = 1360
"0e22c0b5fd5eb90ef176432cde5cfad6383f21899c9b368dabc47d75010ea90f3069c42dc77d3cb9f47fe5d2dce0a91420cb9ebc66d549129ac7879bd531aa069a6f3362ed701be1ef01b4cce25ee102297fbf8f5509a1efd0298aa65a35acf5a4e058925074734075280d5886ee5bb06e1a40c323e2b2f40b3d9a6673475c1827b4aa78281eb89e46c5f6cdb4517e226cbee590a09884acd61f1349666f618e240b074d2ac0eb7085e2",
"572d7ac0a8ac38cdbaee10012bca356fc2de9f20ba956e97a05c83f21b31ab63"
),
(
// Len = 1368
"3e3a34bc5ca17a42311bdab5c7b1d4dafa3b4a5bca6f67d1bc9191a802178a4051bffdae6078f09193cb475b7c1b36775780d321f03bf2accc8354cf9adf10ec9f0d9a00868b911956d875d3f4ab4a4b2c1e6c1c595fc825e21df57dfd056a9c13049c998f2eb3e60728bafcd404470022b41c7b13e5a1f6039774009cde9db0e33a497369fd597025136cf918b4fa3b6916b77cfc5873ffefe7008cc59e3ca8d9861b428375b3a98820a3",
"79dadc772b1500dc367eb2a4da47fd1b73ce1a2feec736b7954ea330bbaa5529"
),
(
// Len = 1376
"a1d49ddc3eb493bab0ec2db0dc15b168da4fa582292b9e6bae131e579c3efb3d13981a514cad0cfd993aae764f5fde29af83acd8ae4b445d5f63b5fba2b039b5495307950014939a4e41109ea1efc85173752a22c06e7f1fd1351a74e654292fa731c4a8455843949a54323c43fa8db76fb8d93027594ff98e6a6d74bf97a366c8680f0ec152a35ba6d697ead125a141dd7b7104d4c1fe632c6bd7eb027b51cbe461d9a5b37d005a53984524",
"1d3ca933f55d886407a037ff348fee2e7898d6b46a5a87421d9c0f9a3545240c"
),
(
// Len = 1384
"bee7659c62d7a137989f9ac50a71b00ced02d7d163b177172e77718110b7a6ce9e0b6b00e30c387babd240b544f1c231f39903574b7a6e79f2dffb0396a1d235ad3d3690496e0cf4404daa843e6cb63106ba885134f6cb26d6c6296d68fba21539d8a68246b27687ff210c3e8dc26f937cf8e5b1efb1d8c6780234e0fed6f637af9cb9f64f307d4f51898dde4cfd72c9f5587be50953ac8155e06253b6588a66f5435c4574d994c56321a3b01f",
"05412f0bf9424cee515f2d63cb361f5591c5cbf1112e7759a3a74336abe22bf3"
),
(
// Len = 1392
"1679146ef4fa7848a6fa9d865cf03db57ba3abbf00f033d985f83da79cedc6b267db215cd59aa47c944203f13341a6aee5526de542a1bfc899fc6f35ea35e852100aaee6a453633996662ac9a8d1788d23e6726687312e202e9e5619d43f6be54a1acbef6e2f28049653ce3e2446cb482d3eaeb470ddd59f7b2cb8506b2335b63e01a5ac30cdb1c6217f0445c6d08ef30f3ca77f1a7d1e96a9d7e615fa1bcb391c70e54c3e96135f1618a5dce833",
"1faa1db93aab3545116efbaead6bbf396c8efc70141c156733fa6f6e822c6a8d"
),
(
// Len = 1400
"cff77077778af496209d6d07b268227ea13fef868c2d1d9f8d33b7330fa067de98d85610634aa684e7138b9a7bad181cec08a37836c018c3f3d0f702715fe10937371a9a82c01e6ad3a9044f571d6c44250fbd5bcfd51fc2a517c51776a721aedf3b4961fb67cbcf11d01f69ee8bad139a6a6f69408f2ce6a6f1fd1d991ecc785915da557ca5258e7644f764cfa5786a0fe7d34f77ff351ef1323b8a510703aa1cdd0099832528f9691f5d39c4d5a3",
"49a2d7eddf5cb079d0f29effc5c86549af281617e8c20615b07f6dc46cbab4c4"
),
(
// Len = 1408
"d4bd762435765953688c8ef3dd96f788b3d4884d57ad75511795af505a85f32e436a5278e1accb4a385a3d16f0349ea40926f161d467b2ebfd613b57e72f862a9ad9a27b856dc5bec803d5b937735d409a4fa16fb7545ab4b6960b9dc591c8606b6adbf0d8a1afa0a48459dcf8b61c9306be02bd135c71c9f37c67b90e2f19799af46a72961a133a9e6c169723332a29f22ce7068858d07bd53734e4674e5e0142c974d9e3871381f32a18175e434150",
"2806c60e9259fe6bfb8e9c1f3a05a115cad7f6f6950ec31957dff3bbe26d2fea"
),
(
// Len = 1416
"6f2856f8812673575ea83cc6f69ac739633c1246c426c8b850e1cfaf2410ff9339568cbb7dff12dba84ea29fe969d94da6ec946a125d22633ef112630212f73b6983f6e68309c22c5864cc42cea58f749124dfa4810107c0f31a23f62c1b32959f297c22323e4f8ba21bcd71c05ce65281c5f602c7fdc2ba17e6b14402e3d9a10c55c43f9413ca372f97a8f0f48e42755438781b363ad64e218792236a6cc577c289b6579d808ecc1737bc0cc6fe821a37",
"0da3433fb7561c540a1f792d9ba9380dd20336d6b8399ba528580113da82192b"
),
(
// Len = 1424
"fa366d340dbb56944e79ffbb3e767dc82dd465ad6332c59aeed160ed537b254db29282bf4ed8539d52535891cad55af7aabfa40df26aa8e13c09ce9084f4dd368660f5d53949728c9dca1d67a0785f4b3704582a6e010baa0ada3a8ece18c55579bb2ab2049c3fa1675d0908d568530d6cab37daac4285b71cc045ebd80b4051c66a04ca07436c6fa0757776deca834a75ba2522fdaad9196a1f04432a4495f1af9abbb6dd28267e9e9df57c6778c6dd32ec",
"dc2e58f6f490787074a1e67b7392c1ad83156ce3bcf0ad0b5ad860bac3e594f6"
),
(
// Len = 1432
"002f96da4901f94e452493db154375d1fa53f920d297bdc714243fda0172c602a25ddcec5fd53ba5face801012f5e10c48db2c1a73eae2870e2162109429123687ee23e6c45e8cbf2d0ccf3f02b14b4a8d7865016248887169eb82fe1495349c83588248b60f08e31bd8221d896e6817e6ce184916a1ba808c3d7ea1d2b33d560bc09ec1cfa7a5eb7fc709083672201d40386657d921d7665e560730094586150525d6d4cc7cc04b44c9547a3b74977cadfdd3",
"c5ff4d76dc03fed15b63d7594360c8bfcf7171624e16044b4950f48b14137148"
),
(
// Len = 1440
"871fabed7d02f5ae0b3a34213f5af8142674d572b89ec632da3bc957e9c72a70e6d65d64d85212e48d4705cca1fee1c872b63a2a55015d303d278726efb296d688f43a61474c46d4944ca1354a83fdbc3938e78f3945bf766c469d5bf8333181276ce26eb829434c75e482c0677f7da1b76431f1a9f068163605722f38a3b0600f93cfc8bc121532f798f25f186f01cfd432c17e222995592e078867ab39c7bbcc978489aa9abca132af014a1e021af335db7257",
"661d7c59214ca72d4ca133a1b42479b27ebb1e8d77a9fbe57bf3d63d556b2bab"
),
(
// Len = 1448
"0407b1330f399aba7362753ff9fac9a3948545c634461053492a477e05b9d60ac1873ed0c1d98b353b017535fb3ed98fc41f55f966654caf90942e964e05a1108ddfe14fb96c84f46df92a683804f8fc234df589b3423944d767da256d7c36fa5b17491483ce09f1c73459ff3852fc5b9ff2e453351d970d857233f2ee69ec4a80365f030468f4cc9d4eccd5a0c93140bb1594f1332bfeb99e31ab8c9a98d61bcf351ed49e13a03b626d1103364243f258d7e38b03",
"c14ec2f844101b96121b450b35ebea74f0c701daae66e2d528daf0aa7f6c3227"
),
(
// Len = 1456
"e244a114f02daf8904ca583ae92cd8fccc145f3926627068a662c17d464c812891223d8250ec0b55b7638fa08f689d5c7dfc96a35f060c0569cd83af1a04d8ac27152e780239cdba9d5d5a2dc5f88943f520e75427f35a90c1dd40dbe11887092eb58130ef4eeb8cab46b9713e43b534649c898b90e31c51c05d2da275b5aba46b2cd55a7bc0e72706a09844e44e7948ea02d47ae5f0cca64df948c3aef46719203c749cfc5bc302fb5c47e0aac02895c3fc10a9eddc",
"06d461f0ae022d60995624cb0a936326d54ba344f65c4b8ae43b2c1401b92389"
),
(
// Len = 1464
"4f3bd698fe858c669fada3134aa06e0da36a69ea4b13ab73a96f6fb9185d9568986c0097f18dfd903ba1a485411392e47efccfc9107b3cb9eaac720309086ba2746c3965fa37f535d89abb1aad4eff2b4bcef45b4a301535dd8739e78fa4890311c3690bfa5f41d3f9fdeea64cedd197bcc5f207f6073cd48f75bb1e1a44222b078b3702eb79d5e476c38ac2b15b596d214c741854b1ece327a70241eb256df3b1a5f59c1ecb80958f0a574066b1ae88fe23a052d48c36",
"1d8c03c6291827fec93e9fa5085b8f6444a6abf1b5639aca8a9444282e6cce7f"
),
(
// Len = 1472
"fb34393d1f5faa13104f08ac6ed42d0363385aa49f0c52270b75c75d4a54944688ce83a82d2dbb3d7dc4eaeb9917eefc5049a0ef56f3166169debfb33254fabb227d634fab1f8d28e477147d8f037ae04d1bcfa30ee60577c4c52bf71925b33ba3178b4e3718771b908c99208f1300dd2ecf813db586b47a4ce072650625a1a93c2cf873456f8fd5fb28f58b3cf5686bc5eaa87b705df6bc3d6822448dc3edcaf0e63e3655ce0c51f601dd33f7469ebd304638a1a32e5ee1",
"90bd636722ae821ad9e4ec0f42373e9007bfad0c04e6dbf39e53d256b8ac07cd"
),
(
// Len = 1480
"978125254513ef35f92e6c4efc78a0f37a7e2671c4c42ff50b6897ae97f58f2e76b553bbc843f1c1715d106dd5b1604f2f87c1f44cf1e957598106f076961eed4b72a913b59bd526f9e594cf96f51fc67ce0bac8d2a4202b25261c9cbc3b8a07ad341b62d0f089c9d61d986d13b7338f98ee586b937896b99eb3555aeee0629b157efee56e87ae45a547b2b8ffe64898d4a00368189a21b64d76113b5774d66cf2d451615c00a6024859bb474003df15a3e27dbb7d9e72ca15",
"ccf7521a511c1f853549e2ab8a977086d9d5e27128687db19f979774988fd44a"
),
(
// Len = 1488
"84056cf8dcd9ebb02b4c0d2bf30f744dcabb8dce9ba2717e1f2dfbbea0c5d324ca401da6190857455565714875e59640a0230e3bc67fb9e6adb5a44d7a787145b88eecd2964317eca888341e6dcb5e0eef6c4ab5ec039c99b941e633b9577971e665447da85b6951e49e6f5169ce60583aaa0e26aeabc067eca69ba5fe1417e5795b6222b7cb739b6ae3ecd3b14c2cecf63b13a4e6d30cd279a77878bb8f5d34eac056a18bca3cf6ae29c95f76f64c6d315f1218321eebacc663",
"f2dfd68dc4737c87b5786058cd2b75b602d3f6ab783384c150620574143bdae9"
),
(
// Len = 1496
"2581f282b5dd420c7fced6bcc484e68ee45d8431cab690ddcfc3fcba70c21d95431017f9ee5a066d29dd2aee62107c466d017838b8081587cb12413cd45fd11870e9125e4318cc6df5f65b5706d89e73d916ab911fc119ebd35b27a8baf8c02be2d38926eb5593e14cee3952c7d8c6a0ef72320f334bfa07a622af611b708cfd4315232f6bb611b7a54b0a6c24d00d13423f22768b1d7d313f2d925a9e1f58e1357b11a0312358d76e6244923351a67591c9ec1ce7694d2797e081",
"ddb1d4663b931422b1bab1ee01e696ba629d7d78ac165b9764f93f5ccb840f41"
),
(
// Len = 1504
"35ffd917345528d5874c2d5eba90a34dc3f4f43985bd25a1a58fefcc27d04d5ccf2774047d9dd904e90763a49806f25cfbe69681a4bc23494b121573e363d0b28b44b708e1910ccb99706f3176618e724724f3ebe017342c2a4a9f0dad6fbf38b3774095084d60a1bdd0d3343161a779859b6465b29991dce431e991a0a9c954200aea29584aca161a9d4b4cfef2c5848d2aea3fc47b1ca8ad05394daf03a2d00e8cf966d7c47cf261c73e60b904e5472ecf87f34ba39bf8a8d54658",
"a253e1dc7a98b9f4220e8d0dd72f2abc84829dbb2cbe7427f48b33de77534423"
),
(
// Len = 1512
"d8e828e675214d4de5c93f47917ea84b838d92b15c19a4a7bd40a06515e6beeecfe6d544082292eeecd2357d51ddc8d46b5b86c8752a70326b109880f6566fc63c440b45669d33526f68d0c0469894b2f41a7a6945ea9bb1fa3332f189a1b7c6e5c30b4c603f9ed0a76e91ee0726a0fb411b658605003800336af2bd0baa84f06d903ccdcfdb9e774a2f655255064d9621b21d27b35527e7bf19a4cbc329bb30b9f8fe88d49cff1fcb6571206cbfb78d71d4b42529dc0ce9f5b1b4b9da",
"3219039f7d5a6a549a5e8ca93fa9ac34bcfd9ae7d6843c7d0a0821b52531f093"
),
(
// Len = 1520
"70ea9369e81c3d851c5c5082cd71ee8c287cfefc3123260d301003e1c4bdbb34a74e9d8f6bdb158738650906d7f792ff7491fca5b523b3e533b7c6f774822c1bd1caab3ca5c0c3dd26cde3fdc576fd3908fadfbd1d92a3504a6a48beec75dabd3f86fae547bdc26d8aa66b501d6889266268e380fb87d045f11904de8ede9ccd6496b2ab547519df1c842f3aedb860502144d01ccba162bdba669c49443817a9cec955223f6f015cf43196e1e9f7320b3b022707a48ac55ef061a83599bf",
"9a2d7bc8ed730d3e990bafe567d92d59e47cd39346ac68d654ed55e02cff6122"
),
(
// Len = 1528
"de6889348bc8a38d2598bebb7aa7b2acb2eeafdaf55364bbb2551c5a8ab519691ea39ea96b423690daf44c549cff004feeb02ae4038e9fb5e4bb106e712ad88fcd763939b96fca936417e70016e85004997ae89c098752ed43635cb48d34445bab7d9464ed5ff85176e0528cc9a291621c7afe2602511345b470fa41a53f9d50bd31b5aa90aefc068e4f9357f224b90e9fb835a10a48e7beb9e1005e219dafdecf648960138667a1d5faf9c71fb3d6be6c0b60765447340d29356b4ad31a29",
"22de9a495ed03427255bda9a12b1a6e66c5f6257749f80c75e24a3692b126e33"
),
(
// Len = 1536
"a27fb302923969340f642dd783e0ad424cb9a2c30eeaf81c132d875e00a288a3223ca6b5750fe98574175cf8f80a3a45c3dd08d2c800eedc2e763a2f18c3d23bff78f07588dafafcf257f5ea612f2f240d38f6d538e4b1675bec9673af68afafe1a0256a7b1f676d765c58d78c88fc99c0f36ff9d82060330df7a7bd5f566c41f791ab72b113df286f3800fbc0fc9580f0047ac924dafc31d2a4ef32fb5b73f2ed1f649e3244c6a27cc69d3dc332beb336387d5b137a8de51e7c1719d88a0cc5",
"1badd7f98d2d033e71dbe278732b563f966a7b4466ab82af5dcbcdb858897ae4"
),
(
// Len = 1544
"aa7164ddb52a7f32f11c6fb54f2d698666e6e27960705e7eec7698c501a48aab15ef88cb1a07fe0b246dc1749b2afa0210dc7b704cdaef395088fe512c89fd4279860d938e0b9fb2796026158a21179afe930b4a6dfb84be838310af0d0df286930019210cb8d48618fb9ba21cb33d1a474865b543ea73c66d83767a90680024691a4575d21afbea15968d324aca4d9113b346579dba1e0a3d9485cefd86f266a038dc7352d75e686eeb9bb8b6e84aca9b9121384b3f4389d4c957d24f4a39f083",
"7d9df88a335a2307c398d8a7d4b6f5ffc14adea2e20334ffd1f73a25e26a6512"
),
(
// Len = 1552
"1563d6ecc13e5aadd91363c25d2d5def4f963b8ed9c462a21c35f2676ee2ea8346c06f07ffc9b4d9dc189b3a46f929958f65236829860b46bbfdad2ae097ad26581c2d58e6e231c3facdfd40c627d5558cf9bdb680c9fc3cc6aa66a74214cd9a30fbf217dd24dad8f1d819b700ef0d8de9cb43699440a65beb0c022d20cfc851cbbb69a8df4381d11c9a891c8a96aa7361eedcf52f83511a8f5347b0230f02eecb6b97aaaf187ccbb305e83d9c92b0fd818df3b01044caa0981250bb2253aaedbe41",
"a337096a9d20211ae97e65d4755b16369c00041dbe0eb96f4dce7556e9ff7771"
),
(
// Len = 1560
"986d5a14390d19214bb6b4fcb33589a7e59aecb03a84c28b40e4deebd19c2c690a877d43959765e04d1adc015066a8360095e63a19a9c55a8da4455f4172c84bf9468f8edef56f2c104c2d60b2d696b26b7dec8526b2e0b35725129898dbe4912274200069902c79dc5ada8e3071409cee2d2114e002c83727dbd0c0b7b451d92872d99202060cde60e66d9058ad2c46db4e5bbc5024f37800c339b7788a90a1fd6a33007040dfd1274c617ffa8ec6d5dd22912e4685a74749e0fec26b8f6368fa9769",
"7c7083fe69ac123b2b915a8c40f2125d7004f2390816bb390a2e61c1b5d5f108"
),
(
// Len = 1568
"6bd7483cff949d7e8f2c45650967f738ad7cdff5c6c0f3882b83eb947d83fde85a462559dac2d86aef1dcff984c6313243112709d21b92fd9e7e921c018f055cd52ab6b0ed8e1adcacead631b00864f3198bfdeca78fe9460e7c620f0b686be192229280b0ad5c5d97338e483bf23c557e394125c92b6cd7a7cfe7b3375395ca75274a26d5a6836dd911b61504f26a822caba8f5d614cd7de3b4311b08c6e57dee2fa3c3d62731b038e7c53cd92fbf06db67fbb27cc930607e617b862760041590a8d966",
"52dc095589c69e305db19d6b32238fee8f5cf0e236cb3ae362ff517ea12408fe"
),
(
// Len = 1576
"cf0a1607f2dc44cc0c04d2e86cce9ae897cb49152cc49c5425a06ab548441c174f331f410f640d1b69e003d5ae9ebe4569075b96cbf7eaf19855a6e199c2f9e8f51929057e3721e71724bcc5c37a0b2c8166c24d5ead3ef702e5d89ba8d1849eeaaea369e6c450fde90cc3ac87cfd808369b569448948c4b7964e722366bc0211a638a0028dafe11e7c1bd6e919677c732cd5c7a61e8c6db4cadfd8319bea433212e334a09315cf0f3195e84b0d64be2a3a85d059023e1ddd0de60ea9d051dbf3450093d82",
"77d4d27a7ed5d40432ec86652f73acd3dd52bad12ce8f1ab592983a62643bd22"
),
(
// Len = 1584
"652e757f8df93063451206ed700b7e93ec5c64cbbc4e69c26b28f6bc31343e9763b416f0ae4653f3595ae1c966605d53bcc11e7910883b7cb03238e1677778ca2b8fbad9d50ecd2f68aff8ce0f5621cb17404428c880a479b3dd5a1a54d3e480629f5938ad276716d660e5e5b607b1ce48f6f610779a892a78e444ccb8294d1ac9a75276ceba8da41a728ad0793c9ec13394d2aa2f5cd5a7411974f943c2140c696783372110dc3b83670bfda4aabfd73f92816eef561630708b2ab44d3ec1b6a544eec655ca",
"bea1a36fd399390ea73241c9a81b3d859acaf258f9aa1b4841a3ff2765c04eeb"
),
(
// Len = 1592
"02d9320ed6d6b896adf7282f6617867d48f70972ab57b06c0e56b1fc1d06c71fdff92db6cfe64c7dde74ac458c33c3d42acc46d523f742314ef32e6bf9f58ad9efb88fbf9fdc3c7d50e9c2dc1c86b14652f71c76ef5ea83d52d6a84ccc3325bcecb57b8b91b809e2a1ccbfbd527004a568211b577fc495d29b3e1e677144245efa9fea8c57f46ef8c02eb6139ebbb806dcd45e5c98f32e33314d9ba391bf028c5fec18b6e087afa1b566b454216d5afd41b95adaac880eded6a982676984f3c8700c7e51932ef2",
"c95a098b621cde6e737ad7d2018a0080c5738bc0ef8685b04ac623e3cc23a1c8"
),
(
// Len = 1600
"4894a79cb514f7b356b10d305e963e3c6ce8bed45142c819b3d4980467c6f7b05a9e4d10b345c309f6d13a54687991d56250a9b39272cd4647664aaf2c415f87e0ad9793f25b9ce92dd73d9550cf6bb21f1566b18734f8ce9a427dc684dd4d648ae5f77d4194666e6ba404bc736f6f9284d5440c093cdaa37f586a0336b868c19d5f3edef4a54d5f4a511cbdc08b50456094516ad12c0d51857854bb30bd7dcd1dbbac1161f971ab4b8d690c18b951794ea3e31fd0f1705569c51199838e67a04a14b2ab0e235759",
"73fae0b5cbf06009ca03d00950be5338d8a5393f4ee86ade781a8866f9a06af9"
),
(
// Len = 1608
"b1c065c97ab742c85b26e82b175981811f921aa22082436b97f517a5186effca2f6593a91cd67277fc5aa314b32495d2b6b075d733b842caad596fc6c86e90f7d424a1f0fa1368f76d0c0c2130a1f4e75269be8522014fcf5abf96222e261a024bbbf345cf5c3d3d68495e98eb537f3ebd3dc3df3f13ae99d245bc016cd704b793f7fd62533a9fbb84fe547051d3ae0e1171ed50859cea58e1a7594d7e5d0411550173a93c1364c011b931628cdf709e505eeed5fad92ddc808729fee52e103a3084e36d97482da801",
"0dc1600baeac13fcc12243e54933c119c56ccec0734b8b428318fa4d936356a5"
),
(
// Len = 1616
"5e0a8e3e7b2c8ed91b64d3f492b0751ad974ff08843a39081ea69f66d448683353f671ce2200a83e657b33f72ca812051c110ea04c47a96aee49d0c29138f5e42f66b352675b90ccd7c3c4036cd60988e81729345fd29e4d1b6f0fada80592d76c4529d3a0baa0777e647aea3b8372239b9c58fb6ff7488b6658380f5dcae6ca0f109eb0cb3e2749a2a233de26a601c1435abdb251053db85e76c7bc40ae8650bf24008a6328d405ca08e4f1afe5b3f24070a49176e24ad458129099c117e9803cea0b9f13e0a5dde889",
"847a3dafd6e993380be9fa12011adb4b7014538a30b341cae33ef23edf643f0c"
),
(
// Len = 1624
"cf976f828aaff22f4168118c3d699ecd035fe5ece021d7ecc1eacc66c8b4f0974c5f19d60f0c05507517dcb2817b7f84db6570bb8748a7483274affb289f9275feac4c0db9515e2e683be0e9b6606e91c5df4d4c27f5955a69445592e3e807e29553f04ea54e7c0e895cf840bd66d282451fcf6c1565c77ea91c108d04186f996c5fe811ad642037c118787e7e4a01c46ad1317f36f8fedf140f6c1927dcb3933b9ba5e900c621c1de99405de442224f1353cf494bcd2960dc967a03722d97aec93d98ca04b98be253cc40",
"f1315c0240c7e9cde9f5729664dfad5f4eb75cb1f3884da7f71ca09ea002d423"
),
(
// Len = 1632
"370e628722b5566c01239562ff2cdc039f0a9b4dd4d9e69edd9f29c0f2f6012a0563b1271908931b2b297d2b56592ff564cb4338a529d683c90043bcf644e6fca89823c2a1b7ddcde15af838b4282e18f47151999b271d652760211ea5081b4ea13e1042f6ed0fd8480810fc313e1525b066bf4c8edcb1b63dd3d5e3dbf0317d2f42bf252fcffe77d70e74094d8a2efef1ee4a7fcbfc3509cf0aedabfb1f282a61e85091b74e098f5d7e99ab08c8a9f9b6f47882f0ae8bc0b9796bb49894def97d2f8b357d94c5db125e861a",
"83f0cf6b13699f96e1cf05d6c736613d6bf5354cce0c6949c85522c1f37bf362"
),
(
// Len = 1640
"262f14dd248d5f143bebd4f46440a9fcd588f652b7818735164d1129ab9743d1c758aeebe50e0020f9d4155e15bf5bea47523dffd4c535ea124613bddd578fa5b03d91954c91b64665cca47b8bff65d352a3d2266807117a4d24372b7cc6d02c0461c250f2789758443bd4cf3b3aa28ddd75b4457dc5c0cbeaf7f666bec793c32955141cceab7512e649e2228384b061fa64a677296642135e397a1d000ee02a64f446329fbc44860526a889ab58eaa6bc911de6f860fa579a74749b8354c5e7480c1ae8c85f6ece861657316f",
"e32de6ce77e63266beabc5edc3d7c334eab6a69801ab461498c705d921473628"
),
(
// Len = 1648
"42d82bd4f512cc560c23f081988b04ec51ec355d071d26668cf4eca24c1e128ef63e62ec502f435c5334ddebc0e2d711cf0d6fd62a953db6892a59d5486c643faac62cfaf66f5749a4343464170c75e619e4bd447afafb032554d96dc13dad6b04d965fb49bc44edf178520984c7f09eacaee226a9dd2ace32043cf342e95e46c3c4410d8186fb73ff4d7c83156d22c11b04e8c4e113921317ce065ab865a07b29e288ab69841e68d19bece6080ea8241291e8f3a57b06bd4a0d170272b87e9c9b0647048b656c5c0058430966eb",
"d3af4858ae990126a97d1a7af625c61699c518f4c1e3902567dabdd245cf3e7b"
),
(
// Len = 1656
"2d787d166c229173e0db80f7def3af5c8f4a63d64fee3cbb4a3c138d467a7973f3f78a5f1a1bd3faf754f1d547a131d6ec94ad3b82e9f6cd260a5b6d84d5e077cc6bd7e686aae07efed2534673851c6019ca9b9cb4926ada9cc547209a28986693704d1a1a2d9819ffec5f73717cd38a466f27fa0191d59d561dbef1455757d9c7a5f4e1d28cfbd2785a46e9d61a741d899c188a2ded28840ae675503ecd2a05721ee745abe218243d5e0e13788331011f498c4c37b4d1429b4692d914bddf86dcc6cb87a9e3ace642baf9ba3d2bbc",
"4e4fb78780446af954871876796986d51eaedd6533ac5068a1ab06e51d29efa4"
),
(
// Len = 1664
"5c7449a9abfd7aed99c18073d53d525b1a1827a1c10b4ea74e08a10946ccc5a3410f4dec0dc7daa6895a195e986bbab384e25446eda3ed3cab8f45f25b0b959c1ae38927aa64ce33bee89257544c0ad82e5f1e1c020c59ae9b9ea1f7a93794c31a1eebc582b9f941a18b99f5d8a4ce0704ed2407f97db5951b578dc58e2288a940746ec22e6704d0f29dc5ca4294d24681f64d7b7303108f5a9d54e9c0dd92005100c37f67c74f5a651525a7a9f7ed2bed3aa6613eb7f098554481152113157314d9f37ba142d60758fbae02f29c2de0",
"2496ecfdc6327532c1c8eeb4ec4623761e56344cdea21dead3704c1595167579"
),
(
// Len = 1672
"d7d441158b32aee1772ff698430c0c57e5ffd38642a98d9aa53c9d98d9cb78b19fbac72bed750c64a502fde90f0940f408147b4bbe08e6634583fb1f4e73d0ee2e971a1b0d277fb32a7c9c3986dd2d8ef1a8daafb1c013f7430e169282e681b17e9ccc8cc34c3fedc9db264fb854deaafcb85aae786da5bb7cbb4effa2d0b0216c7dad2fc9ec1c93c743e28097c02b94788542f0f3e7ac70a3fb6f46cb1f67379d1466660083fac8c6dc495d9c74f215fa3406ed1cb35dc0afcd067aec6db28a8119f1829deb4a63c793c16407b37a01e8",
"997cac36dd1597d3dc92e63dc6ea86a6fd08076ca696b7caa948fed3271c113c"
),
(
// Len = 1680
"80ef04344dc5e31acb5e07381091b92a823bc76d862a3519ec9921a014238995138ec96053ad7a1e0b82571c131146964d0d03d33839ed25d30fc6e7334f7c46dd46a630f3214effa3a51bb7b6614d036f51d7a88bc4cd5ed4934507e2c24dbf08f4f0fc153efbb9e416719b78bf9fe81076919c3b5efa0ff24017d50364950c5885086ec40327a91a98459357e57c685b0d04976cffa75f40be354323ca4f7b5057e9155b11bf76aa050a02ea866a46946fdd006f855faf4494f3675f42e3b09acdc6f6df866c898b778b75fdf6bb916699",
"d32ca9f68543bd1654d5ef67069e8508fd63069c91643b2cb297c1942c581e44"
),
(
// Len = 1688
"92d51ef285638778cbe6bbae97567c5d4c5be3b9e56f3070e42d669fbfcd3951a2574428bbcba086b15c3549b2b2a7fe0d8bb7f3fae863de16ca7ed597b7273a0f6b62ca370351e85f87321139d9104764c83a5fb09e3dc668bc9c0073c43b82309d4d67a19f50002682125f5c22a6c1ebe1209b7f5e62e81affe88ec32411f4c15e5b62fdab63232e75838b982a4c830b6d1f8bcc8273e7815c754580863942e594a4e34008076f7e8afb16b4479ac0b5b94b813bbf68bd1bde029c643bde4ad0832d118b348109be7c2073c4ba34797480fb",
"74249ffcaaabea0b3c1ca02de8defab0dac56b1969eec88c50d70f45eef5ac61"
),
(
// Len = 1696
"b03f636d5b416ff7a6abd5f07c581d8de4510fed108b0e844fc8b8c93d39c4ed79275ad469cacc0f76a200f2fa1d80df6f8fcd801adb046aa4bd33e1f6f7ce701f294488f410986ab2995cadb7dd8d266c5aa78635abf1d96924bb601b8ad03ab314c3a7255c12d8f56f86ac4c13d3b86d7a3fa326307d8f5438ef70c2c0ab76d56e1efacb30d3c0a05a6cec6e3fa5dcb9e47fe015fd6f6a355fdaf81f866ef4f58defc0bec2805e1dec4a8b2cf067e6d4e7c6e9e436541a952f12b4b581a8aa0f986acd5beb2b78d8760304666beb3b52b12536",
"a685e637446eebb111c17664a5c79fd0354801c8a0f9769588f1156550d6b66c"
),
(
// Len = 1704
"e879517da863325ee5db08f47373c1ce5eed4636644a3bcbb6260609d82c40c0a5913e4ef470acda4bb5cebe28908d877dd4bde11ff9add51fb3def8df1eb985aff7d4a467807eb3364d725eddffe65ad3a43cf29de9c8bd9da7b57dc56e037566d71acd5899818ee6f3edc3f2d31ec6775bb9154581d2e3288860eef764645d3b7f2b9318ac21ffa00fc392e2e1595a3c126f82944265bdcac5abc12a101f658f4bf9a8f81aa7982a6a2b0c4c84668997d60b2b1870e8e33694a460a4c4c6340fbfdd08da85a004f0cb113c5077c5e74ed1126642",
"b1e8adc157d42e5e68b6bb88edfc11a0c5f64cdb116bd9cae006701162aadcab"
),
(
// Len = 1712
"fb49798feeda34b3a069c35f46cb3acb6c3ebb384ff888c7bd70168f837dd17ec74b0db5254169c5aa2c25f1f860bc659f789dee7026b62e96cdbd194a8f9711daa4c700e630c5915deb82564b3fbbeab858d9287e9056155d142ea8a4c5b97f6a817f51b145e30f3066667ca521675d7a4186f9d2dd0e30f13dd8950391146d1294bfc4d9a2d409093a86ae5cee0cd72f93d10170e031611d0af7209c0c8eafa04d747af04884f9830aa8e0f8b5b82848892ab8695c1a866612a7021f35b2c083263a736fbe6df2c915d3c2cb8bea131415cc7e71e7",
"20082ae95d2aedcc642a3f3b90d4323bce03a0661d8130606307de595b4f5960"
),
(
// Len = 1720
"04d8faabdb19e18dda64b415d723d344169d5ae95f25744a39895f0507d1ed0caae7b886019913dbfdc8f0d5ebc41a016174ebc19a5f0bd3e96bd9f13cc6fde7aeb56daf4f818b4c497b2234403c36a2b121634b816f1f6adaf85b17bf59fe6d0f6b1c5eeca8aa3624cc6b6409a107bac36b0544da24afb51d0bccdc65cb4a743767d2240f7c5a3349c59852679f0c2a0a126fe5371f9a542a66318f327b0369e2d58df152e7259cadbdef145cfc3f670eae4c45cde69af84dcb877f478be82961751bb45d40510bfe401f5a3c5ec14b0d0d91daf42bd3",
"9595705ff8fea747c13b2fe3cb39cd57b7fede6b22e1c6103bbc56bb2d9425dd"
),
(
// Len = 1728
"41f75bc03ee6a868481e83fd7cc44e87c28fa71dcc06df1713eda9eee1d5c122cc1ce30b038c734caaf74927bc98ae7f27559df35b7c0b6f69b55d4b8a1e6e573b51623eded68a89ced4b08b6c5e0a93b4a8871024937f8e48dcdad2fb482a379a8c767863010132d5b1bd4110c8d5c5705dd595f055233831fd0b2d463565e1c2db5925dc5b58b10d15f31dddc9e34e26b8e3170e064f40045b6d4b90d22c53ae86798ae1d13ceee62f0cc4f9ef121fa8f637b6fd86f601e1644d72377ac5e5003e70e210acd0f6dcddbbd6cdcef676c42d2dc1b324c395",
"a98b681a0f8400593bcd8ae976babf7ea011a029274ca44b7908589e98b521f9"
),
(
// Len = 1736
"881108c08bcea68b0d176e1dc43e14a01ccf77e99e6d5f629a8d244eb1e8e43af9ecfa84bba110c8b97ee57dbdfa1ed9ca95c3680223cb9cb0efeb61d7cf9bd1bc96557738663ff1e5256ea21f8d7ce9223f5224621dc1130dad75e57c11b638a70cb0e073f0d2581541fa35ce761ff0b67115198fd72c9c84a18200b238395a45e93bb8da0e10ef4f0a251d81440e38b6235146fa7ee27e20657fd39db92de3a2699b7c77ab6cc6b692e438d7f2708e15c1d4103fb78f601c0e33b9c7619c6aca38e742e454099ae6edd3bde0434bf5051f0645d695a5f3a3",
"b7a9c78769cf55f678c31fc45e84861976fbb3d5362ab42a22328d9e57c91e3a"
),
(
// Len = 1744
"d8ac6b3949d50482bc4666114f01f73dd4b51d1800131d201963f7ae08ea52e197bd1ae1931f635065ca61b5cb58f39f0d10b70e23d52f3d3827ec40123e22a9fb3d8b8e5cefdec2b9407884986b24a67cdbb5a0b0e5dde90cc92a1e074cc803895492e64371a8fcb121814a8ca5f10881a7a8328c861b994f45b75792805b1cd4ed02175fab1411cc955b593b4d62bcf40bee80910a19e050d138e25193ff2681013de0ad52f27ae74dd4239b36df8f41ce0fd2d829b328fbeb0b4d7f0a73000cb1e1b903d434eb21080ebc3fee4c80bc5c53948506bc80f2c8",
"fe4ba808b85fc3a9ead0abd0875b2169e38f7e3043c67b540b3ce2ceebe8ebd9"
),
(
// Len = 1752
"ce72d24173def25597f629cce24bd4f10713df54949bb0e72f36eeecb7e1b4855387c6c765b91cfdb045c992909e8398b263ec46fe9c2e2ed21d1b89fed00f5257d519bc8f35ba3f7a83d20b2156a3d4b9901ab72c48e6ff66018964d298b7296ed0e6fd06a03d81240f8c4665301a1ec034d6ed7dbcece3be7648900fffb97dd0a07bd640b85765c8e4ab2d14c54cd4fa23c277dfae5b9e25a32e34a3e8b273882d4ac9e6a12eae86dadc9a9f296f994c31112ce06dca0610f83ab4e1ed276a1b7233021362b19a3d8d35dcb6a47603d6882fb7f5f9bd06f2f8ba",
"20863fa5a4b07e69a5f72f7c3cb978a9cdfbabc1b481297c95b7b7c152d30add"
),
(
// Len = 1760
"d3e6e23d0154710368d4b402114237eef9dc64fcb3ec2b6ae12528e71720a2eb06842808d99a0b426ec04480037c6efc59d2f90dbf2577a14aa08962c02b4dc7b076cf8a10dbcc7f9c11ff9f8d6e9be74194f400b96ca1040c2b66cd56b394072a64913a405dbadc6eb97cfc2717e368acd86966440b6b5136d11e8d85b294b01725ea5783a434f25eb0ee86c8d2ef75aa58dcef6447409a195e279f11bc4f28e23a8065dfb5573e6546c42e18b4a4c30c80b271c8f20be151338162f0d18bd20c0c38ebc1902a27d7ee55efa2f9b2af7a652042572c24a960a60b50",
"978c135ddf4ca005f5748e22868926d3e64881ca126d5e0a6c1f120682f9546c"
),
(
// Len = 1768
"77972383a35c6f65ec998cc388e2b32bdc66db56cbfc982328bdcc8963d8d9db6ffd5e1359cd7846670409efe6bd1ac223f519eef1b2121a6fdea3d3b77dae277a0c3ad4dab21a42b724319ee14b6105417af4332c064d9ce5f16f9c6e1dc3e929febd04b1d84668fc7807dec468e305e2d7380fde86abc3771a60e53724cf61228c66d364ad3c6125433fe9ab23ee8efb279dd9ad499d2563fd0b9b22dafd44676318cc10552d35986d1f44910ed38c357065e3ba03091d0014b922eeb667551a80212ad54f606ebc80b34d8e86dac4f740a8b143b1cf44c58867b33f",
"480699bbf1b92ad388c8469aa1257ace5bb62e88ea769f01dcaa03ee75c743b3"
),
(
// Len = 1776
"ce09594f2b84257ae59437654785f3cd5fb7c49f5f76e3104527d6cd8e8a0d5d9366adbeead239d0667035adf6287b55e040f540b6d851fb0027c98eb2d7eb453d9804286b3df8d1ae2d7fa456fbfa373bf077f2c9c9edc9f1b757a38e43e9ccdcedf4482bed19da1b997f729479a9d06a21c233eab0fcdc68547ff69768c37456b8bc81a5d65cc070db330455dcd5bffe97f2e947efc5af4344a6dbac695002220c84c7e3e08853bcbb5811982dd096c5c37f0cb244bcf68863d135cc2138ef2ebcb6129d3f6559fbbe6a93ec3b29b1ffa9bdb1ed7aa876dd7aacaa9ce4",
"5626973c769dc0eddc016809083f800a7e9ca45500623be37626d783a6e2a763"
),
(
// Len = 1784
"99caa150dd3e8f42988a01021eed3e479e3df15cefded69855b312015eaee5f779874856c5d7995d629a6080879fc825ddb982cd985865ed0c77ef6b25d5629e5caaf522828e80e528e165b0812ed65ee7582b80b1906dbe075d292d328ccc8f36c1b2b950329e79130429943200f31a581e9a0aae08c8b665f1e3987db028b471da6ec10c0c3a201164b54364a85dbdc7f7c87600902c658210feffc026b4320022f40d2f2f2d4094e384f98be2b653da7ec9da0ff64091063e91c76545fa6568ee72981da0d9b1845daa103f61631ae02cf4f0233481297313f1d858eb3e",
"27226a9210114f67a39478bd2f0c48969e978996134b220abeb6f38da91b2841"
),
(
// Len = 1792
"c1dab159f85132aad59055e5cfb749e99776de88991209c3861cb45e75a09c367b4d90739fc21d7552735a222aa40cc21aea4ab3fd547683702be2e6cb7e1d47cbadba6b70d8e0c34b3be676dff238f9dd83acdbd7235f484e412e1abf4c618bfa1bf66af4d62e401214b6f107efebe57297c049bb1f920961c023200d84ac07a0a371957aa0d58cb48c7dbc7b68a1ee006238bb82cac5e38be804986db09f0e5411a3ceb1785a6604d7238040c56e4127a7fdaa71c28dfcab9295184335279746ca65f842bf5f479782c7d74736196fdd161a4fd8a74c833ae19c7d16c3155d",
"85fa67a87c5fd8ac4d0903630a70dcbba24db45c589661a76ba1be0477bacde6"
),
(
// Len = 1800
"8d7a56d03ab618d138e0a98016c2f0f4d80a43b0b29034ed71d16a88957fe623fa3cf334f20c052becaeac03719df849a73cfa5acc2f473d00b2c69532acb92ce9ad60dbb96607a515b4a98651a1cff9ddca53a9f99be7fa4dae907f5a49ab43f60c1faf72275587dbfe0d2ca0dd267da87927a1150f9c62bd2ce217768d5b6c9a7b1c0ca272947e71a2ab117fd18f274bb6c960c565c38392a59a0832f675cd7291d914046e9375103e87901016b75bcc81bc92e77f157924b08157a7f6241988fe2e8c6cc1027cff890c0f9fc46b6c4627ff2da615a6cbc528226d1f4786a745",
"2695ec31c44af3ea16a63669da619a2fae4ca94c3124783c3c095a43d448b616"
),
(
// Len = 1808
"b434b175362e75c03a8560fff1cd4518cd72bfe2198aa841ac1560f49b0839503ceac673183c3453c19452b36297cb2f0a8b112315b964c2cfc5b66bcdefbb0ada827ef3beb24680469933a931ffd83b8ae95e9fa3c362728818de56089a61e31cdfd6db911d5bd8b68f81e78e5923194381b9e6451b59ce3438253dd28620ef65f7caf61426cecbb550b344a9d75eed5817d39e332d6c686591a53817c6277dbdf173d218429ece9352123c29712a8289fd20bc2b8d25911fcac93791f1b44fe32821fb6ac0c9fd12dc3a3c4d64bed662df938e6db81f8c83e9c414da7864bea085",
"ec2119a078bc33eb5053b1e4759188fa4301662a986a74b177acfa1d6fca544c"
),
(
// Len = 1816
"b90b468309595f4495ada954840c34189aa2d0ba2f54a4f3697f6bcd3d0c53f618997a22f3da66898810de0c1d1225b7b5f572e44a16d7b3964380d350d3ca696d448b601ff2e9a702c7b420dad9d78fcf4a7419614bccf78f4dcbe02095498edad4eef9c7d8a0c99f54ea7a2dc20afc0c7e156ecae266592f313950c682dea057cd991ea53ae8458ed2c0bb94cab8a148ce0f12b0756be0a6a5306d280f0e80dda79e82e187c8705a882cee52e4909ab29fad62151943bcbe7329e783376760df06e3c18eab31e8345dd787426722f406cf571ce89ad8a70e028e9239f6f219fcd5da",
"238a61234aaf8f5bb9a4225e188f2ac04568be568ad171659a8360e7791a616a"
),
(
// Len = 1824
"8a810c73b66a4a3dacb15fa1b82ef9d41794acbea2ae4c34e84327013ffddbca7fe83d35528773ff39d2a0f1019ac5182e72d7d121240609672d0ba72be771aacfafe0223753217026c162285c27418a9a185bbb3c62c5a48fd14bbbb8bc65876c46a9a49acb14c18d77eae99e2b733944cff58131ba25c18b707c442de2cc9a29763ec3415284cec96eb7689a2aa2defa97602b5286ecdef66922244beebe7464fc38a64fbd74192b2b82c65624a550bc057c0e8b69ed82d20fa71efe66926362cb09b2887eccb3aa4f7a00731f513025ce3eb1372c340a3bdb283a41bb9ea486a8570e",
"76ddf9084e677e9df9d295d8c60d8ec185eb24132ad2f6cf5248a924b8f5756c"
),
(
// Len = 1832
"2623c2d0723cd1e65c231681f2553329816734bd425cf8841796289e3f7fad65a36f3615ac08fc092c128a1e68bd48e9257ca767d89fecf036148e75943bdb37ab114d581a4961465cec65c4aaadaecf29553702f423f22a3881a0ccbd7b04698d52c1a89c22eef80e54bcb8016b882ac0bf2cb5e21fe01aa180e75efbecc7893e8831daab20d2ba748f7375fafba0babacd709ded50b78ed09feccc8bb455c93c87a4e8a776a21b061591011031bccbff2c68ec7c207a4dbf67194a1b6f1458f6b8419d2fe3b935f94a36097cf2d57b1e3d689b5de3e81d4a016866717cbf6735000564e3",
"5b285ca881d36c468bee9991b3cf46997a4e69b94d303b412f26b8d8132197a1"
),
(
// Len = 1840
"be9adc08d0e684c3bb00e2f9687d574b66749667dcfdd959bc408ebc46f2a0048c7d0d5d6491201f920319fa817046e7e5dd4fc1da281b9669a953af9bf3b32870c085d452a6f4e4aa0edf2b7f261264046126de894175f2eac8a286bc55af2d16350168dbf64d86042cb18353c3e857240e36ae4faba13a7443c13198705eafa55f17815665075b92b8dfe57bc73da0d5734f251ff060933321c4cc91227b368293b7d9f8be348a761370f2daad93b020e2d63fd236d3065798d3e8bb4e1e3de2d617da944b650b5fd5fe3a8291eaa274c0e247f7b54d4e4e2036096f5546512c5e2cc1a991",
"3bc8d8c13dff8df1581d8e07216b04d312b45bafff86bc7d727b16925f53b690"
),
(
// Len = 1848
"cc0967cb43e95d2e8cd1ee6f18e625663473866b7cf6c1c348ed2175aecb077bd46e471758a445e57534548d1a7af44fed7aba69717b2db9694e2e17193593eea4da05fc7e4be1f48036829ab076e99ef1a408621f351c89844ba19e81348c250f92228edd04825d3a04f8eb7be2896c8691cfa6c7eb2f4b37d0e9b80575de140800a3e50525433f2a3b2ba61db412a446e24a0dce7a58054b42be50b89c65c09d08a5a22ee9e259240eff42c212e709f43116c2ac6fc8f7b186476923ad29c1b6cf64e4b8463edd543d201750072044383707e5a6cfdc585524c279d1ec3a87bb9e6c74e5aa51",
"9ce480a2c873434fade1109332138667c887d25f597e3bd630191a1fff76d501"
),
(
// Len = 1856
"3ae871513878727db1a98497505473a9aa976b2369575df113fc5d87e108d91bf04b6d29c4dfa676892b0dda8080832a18ef4e8246ab735aa8d1e189d9bba5ca0612f3caf299407cc54d5745cedb70e7cabe69116add6b12ae4d9c880841520e5445d947df1ac3a5681beb36f65b1ec01988d183653d95148a329d9273f0a1c8357a0f1594d3bbfdeea634e40152a51bda779e40b434553e66f3d1dae372a319edb22f8286ea7f7490b3599205feade0754c2129817768e76a39c24eac65679918961b9e819a12124d6ca4536a5234e09e550a1fcc730737acca85582fecf247830de604a8f916f5",
"bd16fbd6bd7d3c88fd5fb00b2e42e978778ca285928dc86476918b87f94135bd"
),
(
// Len = 1864
"65bb49d00d7db0acd3bbcb9f2ed3d7db9d5c33cc492614cc33fad1dbf4e7d159a31b29b098da5c6b96280bc4fbe39f983fd36589f979562d742709690fdac2b2f5ec628ec7bffa5de70621e2e9c17a2995e0b28f5a08bcce2fc5383fa0faf196e75425ae131f0bfb252ddd0fef58388438ea1492f3d06122969962379453cd7ba8f32abc1236b73864944853ed80d8256becb85ebd1a8154b4e38c48375ac4df4dee9b6025529889e7e0ddd461b5facca2b32b60cdacb5819041cac79b8ea7e97d4349a296e12b7dc2095224be4df161001cc2cdc9774f5ab9192255a7c93e250d87c7a369f3212cfc",
"f312e99e30d769df8575da6ebc3456600b6451c96341eff620b7b64b17a7fb67"
),
(
// Len = 1872
"7450bbc1411dc15edf8f2857de8210f7a4669f6ea4c47c2b8b1f947f41c07cb5113777535438b134c8da8ba65c9c9d01023d70a701ecd28c0c670c4d2888033ac07a8d14b33f497b19d4227671bf7774fde71bfed3ee8bdf55972d7e1f30b8e0ab45f55e843eda9e13fc1484bc8bf9b97314b74702422758da54d6fa858fda30d5cf8f5a0d69f820650ca521989eda0bb29152b5d47a0daecee4a854748284495114a35f7d9b7fe2a8250440c4de4c76709f2c451939f3e81e9c3c921fc1dc71d57fd0531b5035c4753a04391850b089efddcf0917c3f1355f2dc87eefa4efc524c01840104e05868809",
"9adc0e16ca3729e7e9f90c89d5855e9ba0a643feb043c8c61a1e1aa3d4873e68"
),
(
// Len = 1880
"c0a15a702b4a4efa5365bd449a1d72639b62088b272d4b406d5c8e72e2177ca2b8d713e32161de75c69bba61b82dc4548fcce0b7f92cf7678886da6b9d570d562e213a4f8218c549b47faa6dac6fc23b3ca3f336cfeb9e587178c30fcfd165fef29f4d75b812be6d9269da3ed99c7a153f6d4c0f58ea67ca632bd933fc3e31efde7f6597912304238ddf62667cdc7cbb49c8cba2b3336c165e45495b847a4b63f9b0fa8bd4ffaf61de11c75aee4416380ce2dabf1547d6748c1fcf119a1a7594cb70209f6fd0004ee2c8a8d00cbf0819a1e2d9b62aaf2ab7cffac86a153efee0ae1f7f1eef806cd14815a2",
"746aa4668a3804020ccda51f73c8a1768e6bf4343e8f8a9484235b706d56c7d6"
),
(
// Len = 1888
"55d5aa6f768d482db7f8586ec7523732677531482450c8434048b01291c5b4e69b5f5511ed9e3fa49697135ee94b9051c1c19ae612622952aad9643b9f19223a78784c65178b0aad221e0c0c699c5d2b5ef711705a3ac204142740b44063eeb8db3b1ef2c628a0e946acf5b04953dba84bed18a528dbaa3c02ebf0434edffc2a1a1a1ce143bdca8a6ac03ab414165c5f0474052c50af68539a5996e938921353ad3034f0eeff7a58bfb50cd3cc6933d0de38fc2ee8658183be186cf7ab804a58b07f499e7ec4f73e7a0411466d45174b7d137a6679fce93714562fc0d6791987f8622577271db5a121c7e78e",
"287c99a0a667971179f37f19cf481519580c622052246f9f80af4cd28cad8f23"
),
(
// Len = 1896
"0cffda8a1355f08c51dac46630f326076c3f8e65a1b4dcc8d1916af258528165515cef64b1e0f002bbb468eca78ef314ce82797036553908e7a3fb40f57ca546d895ab8a759b8c3050f51cf784100c529285c2c9dbfcd1c29fcc039449a8db223d86acb22239e3722e0069b3107606a2fbc96bd7c53d9a64099df95245d474835b21367d5a19ef8919593c29cf42cccb0c38a2d1753c367fd92fd11f0446a25f67d8dcc1f2cc4b0c268736f5ca02c1d63b63a8b09fde2f790d019911473b71af144d71061abc12404348360e4bf7e5865a8d37fa6c677479680d8bb048fc5f5d4ad063658c76a5d0bfdbde0ad2",
"c0f321740a997d98898db09755e616580fd9b514d207dadc13a95ed25b3c61c6"
),
(
// Len = 1904
"c4912d52c828be309c3898a9c448f2c1a7500b77b370042a16d4e9f1b3f4c47886f2ca4f1a897fb7c217618660534707a4537f57c48482da586ccc0c609184e7834e369ed8b5559acdb6202d0a6835aebbb5067f39885a92f5269e55b8223d3b7173da49292fe3f6e60424f06c5a9f280fa5a8482e02db23297979e19bb61d0d2af75653273a4a0d3e6efeabc89dd4d8437c21717ffc95a8750f8a11c5a81eefa07543c7af8dd5eefbd39ac4716e9cb4eabd2669babc122fcb9d4191455f80e6d5c3ad845183734d570d11c87bae7d666ca4d02660e2552c8096bdc5f63eaccb01595053ddc3a034d1b1fd4d5f7b",
"f9bac46cb7760337ca1cb8ce5a2959166ee3544b72351c22234aa4a90aba8725"
),
(
// Len = 1912
"b4cc1f84f2806747ace7de69add5a759a1a9b3f1fc91b59cc5874ec3d4ae3e887a5e0d6cde74b48a5c93f40a699b640a4517fc41a8b2de6e392d320edb709756cea4c3ad197838760b2c8075c8e47f0dfc7b4fa52e2e13675c457538b60c8e85b15232cbca6b41d697c14b60a6cb6ea247bd4775ec5bdc48a15280575f0fdc10610fdb2b7a1d0212de4d728418e1275f9f6fd48bcab1d46b0355c362649f73c6af4ff22a6cf43d4a42b0cf5b91f7ba30668fbc3140909c44e55fa64aff1a11af6903d9d5f816203ac6f09657e850884ee0447f21d41c65ba7c0c057c27162b901a0466131b864de177e4395f34c1ae",
"1be36a4eef74bfedfc1ca8d44733048f033f2c62a8fd820d33f273e6c276209b"
),
(
// Len = 1920
"15052e37da4b9d95c7a99a43d1b16e61cb73c8de8e4f2c70c610aa26456cd45b7103924c4e2fe115d97c59aa2dc70cf93bd4d8c923053aea16e4105b50e5b7c2e9490e3779f04d526da6fd9b6e0995a9de6d730273adec8991fde5e2e39ca4cce5b3035fa451b111f7aead66b8420f96af8299222f85acc18291a3662d483213fc3672a08724b27fd25fe58ba1f4225177bb74a7412068c4b10c2adf545cf2519365f11b89a49a5c037fe7a5740af7ecc66c93078cfccb3e08f61e5d5311aee676a001ff449c5c471c44ed914ee47d1451101cdd0ce81c15de3a72314b2118c2c11ac105b61e4dd3623a64b01fe1c570",
"1e27fb87309561ed1a933efcd8edd897bd044e7cab9dd1d3e40e03e4ff0688af"
),
(
// Len = 1928
"f2e24efeca6b14a9a686dbf2a8f3b4690e766fc494bc97f6f7fca717dd6d88cf4fd7ce1a42e3c3e9699edb1292907ba006ea659ba7fd929ef93ab5d7a73ea7f71576125759d640c3751cd507ac51a8b33b0e4ee20ce181051b37ddc37584ba8afacde254a32317183fed20eb3ec89f79d7ed5ce3cfdee8ea15c6ad8a4b68154635f79ad91ab1f15a9e1146dddae557b1d3b395a2927d8ca7443a328fa348d5d83f6fb25a21a3b5c0b5fb9d90e0f442b4a8d7563a55e3e2991d1529c05dfe999d6e4bf78fefac50a5a8ed3688e2783d8b5093c6a577a83f94bd68551b66efb8d43baf642b5cb4d004a2078d8480ca10d05e",
"aebca726e68e830b02d78cebfb10a2994720c4d2a00cff447569fcc2de685247"
),
(
// Len = 1936
"d675d57eb56a3c1dc05784af0f59eabfbd161b72e72014eead996e78aa3ed680b4abfe69163b87d6920c85a265706123867c966e9dab5c4a45cbc2ef09986fbe446e285aa9b0303cbcb6de22273f46aebcdc1c598779a4cd4466bc4eff2b0d4499359f43e6cf7fa2865dc5ad9c0b5c59e778b36ff1573c36bdf884bd249101bec7a001ad708050f7de15a57b2001d4087a87776cdfb4a29dad275ad2b95c9080fd912e6e127e65f0930b6cb40c40bc87c834f3a7e9964496bd9f6877fcf9f7f98b26689da4cd8e38d8faede53baa6c04de60acc8f6f15eb490c72b8cc023864b4aeee9efbc78279573147aaebee7b39d485f",
"76d3a6bbebf063beb6ee7243b8096f98f74b1d7fcff7b9ace0947c0e1252bd1a"
),
(
// Len = 1944
"653e50c4f3e18c1f6d4c43f4988de2817c9ffaa4346db9af1c7896cf16de2f7b1d7f401160cc31ce1974c2b102a5337e442e23799bdc28b855bf876b9eb6e7bb3627cd97f4fe650d7328bf75cdf3f41221178cbdf4b4754973fdb411b49ccdeac39a81b899e7c60c0f8681dd7976f09b8e7c588230cecca4cb81b5801d836be11ded9ab7d460c3e3e645c160bbb1fc4a2e55cd5e239903ef1bb870383bdb1a59c8b4109c15d480fb19415cd5f3592022aeed81d28684c1a13d31da790cf5d2d5a9e371beb7f2bad13417a72770c7491eb4caf03b4fb2dd8ce4b805f1add7c657bb3815732ad0455ee8ed8658b4d077699b68a5",
"dab3bda82d6a26fbeee8c1298ebc99ea99067ac0f1d56709aaed8b7606e19664"
),
(
// Len = 1952
"ea1b8276ff3b7bf1e853b73f0ff055821a25c8780db5ff666acfddd36a45785460fbcb603646511f9a095ea9fab32c14d9f48de7a98c4d135b2be7c670601ad15ce532922c84b1c78e107088c39c9d9d912b843bb7d14e13fc36da6d96f53ff2db728507f637ce85473f0e0bdcaba86dd62ca98efef7a2fb2e7c69c471a8b74c1a3c5411742297bb62a5c73e506fac279c55b59b4d57967bd3ff4045a8f891c335e5d4a9086b656a112ca9619b568838ac3ed3fa9569766969b7ae11af40d4e425a98d2e15f399261f4288ba9910f3464fc640e530b74e9a6efdab1e3e8002632990923f832b65a26eed5d07fe504e4d178f3248",
"9ba92f9b15328c03d574840a752cb7c7409ca8d936d317145f01f7481e9b2967"
),
(
// Len = 1960
"4681e2b57e8dd3bd0dd5203766b376eadedc8d4cc9ea53c73ba2155331479b77c97d2c480bff0519d526513cd9c726b7a4b4036d9e5735daf94a2e2a92c9a25b47cea353cea96ca4cfbee0a885075f2abb62975abacd35b31863deaa2d8006754faac81e5335c222f3a3cb79ab2aa3678d3bc24708f7fb205bdacb895ad2feaa7cc6c8d0fc8bf3ef2fbe69dae90c41764703be4ffbb96f57943be0ef0dde998aa5625aa1ed4e911d0cfaf7f507396c4e3d2a9e39e40e9078497067564f00e0f5633b965189286e9523668b2a9ff778dd2216160624a77e6e18e6c467e7a55c4ae0f39b691c0aff3f708b691083e2eea5f905ab1dac",
"793df19351b3777c174046e3848b139bbc4b923cf516f8a55bd85828a3fbfd24"
),
(
// Len = 1968
"2a8cc410502cf8f68842d67cde4098e83fd759ca416a4e2358f31c5e9f3a0acac6cfdb17fbd30d8416e401f42499dd6371372eb3a17cd6fa70f3580f2e63daf533b50c2f891ab49ffeb593224f7186c1a9b4744a314a45a13e9db16c018b6134406e63c988176987cdfda91c6e2fdd17e45162159ca7b6da45684747f3a97b3418dffea0f76728c464d1e0d301beeae60f4dfbacf5b2873a1ace820e78fe4290dd4031d4a859990c2b79df2d37ca1347170ef30cc17a47dc49c9eac1c72d51a56e837a16dc1322078d0234c5cc480ce45600f0187b38f4c402df86ca0cd86f7a5bea9037feb33f8bb5745182bc5e66135e572bd98f20",
"14fda6107dc01ae38e3e8990e0e1fbb9a3e28f447b4d138162df683373d422a9"
),
(
// Len = 1976
"9e92ff245c0cfccc8657b7178fb5cacf4080439202fff068134ebf3e284f5fc6e25eeb3e6ae70bf13fc208ce77d39eb854e14a56e13abff4897f33b1ce9278b1f163ef5c4bfb4d8abd5659352af7ed7ed938d4ba7394affc13e3aee2762693678a82c3d57e11603b68b97192b15e118a97e6450a7af5078dd9b56f4fdc02b667857a3c038c9d3ff457b087080f9893a67ed9b1f8cfb986a86ef5f74bf8aeb37d28f081b58dc1a9e47131ed81c98028485ad9412992c7d201bdc94db5770033a0f0b5557d76ff62e8304f69fad091422a6b8454fe4b260008f04dbd684ef1093ea65fbc1c5f1f048f6e6e8a3fffcd6a6b51be699ce569a5",
"9be0270a2d1e6e24c712705079413ef7747cd1b4baa10ff6b73ad3b67d262aba"
),
(
// Len = 1984
"d6b7633e05544844fba7011706201c968f8a21ce8aee39f53ff85fdcddc982b480e5f3863a3bcb35e3cc4deaed69817df4a24c7e908574d07dd3ac5b9c2f0f1d1402a44f3e6f84213cd20b2a3b8ca72f2ef3aebf78228ff6f63c51936c60b0806355d0a1c455c30127cf2b635bd3938ac7414a4064da365a1787ed83e89e044bf3d4edb829b0b9517fe5b4dbb947668089b1c0ed8bf647a27e352566d329b2c6fd9f7e27503879cf1d2dabd7751257ffc317ec4f0d34f18c6916f23c40a4033e43816694badf64d80d0faf83220682e51d6e352ba326b70c3daa497e4e4cbc92ce222688018b600e9a1091bd1614a33483d86026fe18333c",
"94abab95a476afc6cc9455b2519f5e047be4b20b5879b4012fba113b1ffc28f1"
),
(
// Len = 1992
"c27dba11c976a39898ca209a5581a9f0913bada84f50dcd2283cf927542c6317a91d287394cc0b2d962cc7ecae71dd40ad8be8fddbc5cf0402c92c56f68f6ea0ad96144162206ef94c36e6fba7c33b544f24522ae9212febeb5b42e1ebb082984796d9a9b647a3037e89fe264d3a7a9c5eccc748eef733da5376bc3e263ed66dd5b0178bf8ba8f76448e9c92c8172f27e4f76fd3eea3ad41196a8040a956ad7e07c40aff7f9975c4271256f02986180e7d87e16b2b8fad44f92d84a28432218bf72b8a76c5003bed1291de3c17f64a947e2b00a9bbaeedb5dc715861a379ec9aa577116b784c588bde36c7f62d128bab3d8b54f93a41ae16b3",
"a772f5ad324b35b71a3dc54e7c68221e35f1640b905dfb61a5f27daec99034bc"
),
(
// Len = 2000
"0678577f65f225dc03905550e9e02f20a8254dbab0f8f83c4df1768ea08d42a6059a266a8c4b4790dc9ce1c57d10e5263532e0e52bd82178ca98076a254a112be437957083dc015f79e224f7f20a1d273dfd0d68d62ee1a1c6e90cec341d171855ac89d8898b38036d5dfa5f671887a416940dedc3ef8e8ad89b760cb88d250e3aafe7c43a1fc8a77cc307e3db8f88f12395dee7846d715d09e76ac2758fd0b03fb77579d63d2152002936dbb8becddc53acc3d81a3535231d9fe5922fb5436f6db8e943f50a96f533cdd1ec8c9fc9e04b8db865c2ee89df8e6e72be24b52d916e16d564206c5a54392b41c5cb0aa516985e7c5a4c053ada73ac",
"76e0209c65dbae5c49007bb51cc4a8b1b9fead4231fdfc1b5fc58329a7caf748"
),
(
// Len = 2008
"989862c529d1dcfe35fd6b8f51a4bb936a869e109c366f1991bb1ecb9692782e2adaf454abd053e1cdbe701f632cb3ceb251de4f884e68190987e49f1a5cce4537c299e393ecc460aa35800d6133db1385ba630d08cc2612530ab16d6780b29e424c81d5384636e37bb7f0dceaccf06f87537c901fa3a373ae55e115d594b318e035ed197b24fcf6dbedd3c6bac3354117b2d2375675ab04ca8d19a021cdb80202a61b7eca1875a605486cbf0ca2012455d45cab4a07b01594c9b5b6976db89a13d418deed8d84f2d6f1b2e293b407e8886394d26a44e8ff0e9db5a60b6e401e4359fd30e78123bd72d5a00689a7ef120a83e575c8cd75d76a2b7d",
"c27f13e6cf56f66bd27afd9d49385b24de501f07da268241c6ffc15065eef3f6"
),
(
// Len = 2016
"7599bd94dd16910dfd1331bb85065b8c90037ba20dff8883c755f89ec0231c36bdd9cb9af05ca8ee70d9a9f5e005827008fd1316fd9c99c4f29163b2b57fe97259b40d4a11b538818fe27770e7f9e1eff7f505f4919fb983311d36e69d1f58f6d46640e51c7967ab5bde1c42d8fd32cff238c483d77d07089a3def375d472e31ae6f17cae87e76445d92863590b90582f1c906c9460ed2e14bc119a90948dbb7b7f382a072f8e4cf8b6b051b240a9e16d3a4e01ab2b3fbfe7415a87e5d83361577b8b5e9b19ab93c05be582ac9f6419d9a21b74dd4b34c49c8f4c82678fe3befb6f0d9688b92a49051fdba1af3fcb78e1d6edbf222283cea1c041095",
"2559b895e9eede1edb3ec443c738e482abbdfbd3c054415e4021c34f7dc576c8"
),
(
// Len = 2024
"024c85b93c5e21c8f0c65841c3135cb60f13442d82201fa4485c8f6560a0fa62ec7f1c29dd3df1ce044a10c75d6d7e6d80c39a03e3baa82c16389176d88bd9c50bf5efe933e1b8382bc8ff89357ef6b64191ba254b6251619be2d8746eb23979a82962dc0a1a1436e314bf1992b6d0d3478af992ed4af4882ccdfc9a7f3614275f77046992189f752c5f8fbf155f935cea8cefd7d6e36002b15d9d3093b258f3295c5dbb75fd31a15cc0607120f3ce0a7fbde255a1435853a0f68434a8dc27d239848eae81bf50de80b050a0a41eab24dc8e7a7ed1d3d172c955a67232cd446c51d21ad3926bb1121c01b3c0205ee5fced5f7bbe324c30fba2d66ed4a4",
"c79f684ac65a8fb31701978080dd3fa3e6e4c725e13cb04dc828614af6046e33"
),
(
// Len = 2032
"b340f6865bc918c77b2ae37cdea49d3d89992ae814e81b61191603f085d89438198bbe7554d73cd0021f4de0c4ea1d4d844736993051fa4968fe39edd7ce26f059e565aebca27fbec2cc9f86b7bcd43b040ad4345ccf7ec4cdb8b2a486d895e0befb8f7a9d0f3960dbd9e69295bbce9ac5a2ce21714ce63f0598e48b71796c2f75fcaa120be472e7bd5979531448eddaeabcfc5c09e29c0e7b809aedfa071c6f03c7820fabf5f6684e70bc63b8a93ea3663bff6f1e9c7e991c18861720a386246a083316fd2a7f4c9a3bb053e5eef64b29f6bb47933ae1af5368c6730b4d977656cb8c53f50ba08f4750e32c3fda7869d134b1646e9313c1fbda350728cd",
"f22c39466bbbb627a17792705476cc3fb217f05913b0f16492c6bdf185f0427e"
),
];
impl_short_msg_kat!(blake2, Blake2b, SHORT_MSG_KAT, Blake2b::new(32));
| 69.98675 | 513 | 0.922778 |
cf18ec1ce9656a548893f349a5c28a5ddca5c5ee | 2,410 | swift | Swift | LocationTracker/ViewController.swift | kenwilcox/LocationTracker | 62cb92a8d0341437681ceb9c19aa87bf1b1370f4 | [
"MIT"
] | 1 | 2016-01-31T13:56:37.000Z | 2016-01-31T13:56:37.000Z | LocationTracker/ViewController.swift | kenwilcox/LocationTracker | 62cb92a8d0341437681ceb9c19aa87bf1b1370f4 | [
"MIT"
] | null | null | null | LocationTracker/ViewController.swift | kenwilcox/LocationTracker | 62cb92a8d0341437681ceb9c19aa87bf1b1370f4 | [
"MIT"
] | null | null | null | //
// ViewController.swift
// LocationTracker
//
// Created by Kenneth Wilcox on 1/18/15.
// Copyright (c) 2015 Kenneth Wilcox. All rights reserved.
//
import UIKit
import MapKit
import CoreLocation
class ViewController: UIViewController, CLLocationManagerDelegate, MKMapViewDelegate {
@IBOutlet weak var theMap: MKMapView!
@IBOutlet weak var theLabel: UILabel!
var manager: CLLocationManager!
var locations: [CLLocation] = []
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
// Setup Location Manager
manager = CLLocationManager()
manager.delegate = self
manager.desiredAccuracy = kCLLocationAccuracyBest
manager.requestWhenInUseAuthorization()
manager.startUpdatingLocation()
manager.pausesLocationUpdatesAutomatically = true
manager.activityType = CLActivityType.Fitness
// Setup Map View
theMap.delegate = self
theMap.mapType = .Standard
theMap.showsUserLocation = true
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) {
theLabel.text = "\(locations[0])"
self.locations.append(locations[0] as CLLocation)
let spanX = 0.007
let spanY = 0.007
var newRegion = MKCoordinateRegion(center: theMap.userLocation.coordinate, span: MKCoordinateSpanMake(spanX, spanY))
theMap.setRegion(newRegion, animated: true)
if (self.locations.count > 1) {
var sourceIndex = self.locations.count - 1
var destinationIndex = self.locations.count - 2
let c1 = self.locations[sourceIndex].coordinate
let c2 = self.locations[destinationIndex].coordinate
var a = [c1, c2]
var polyline = MKPolyline(coordinates: &a, count: a.count)
theMap.addOverlay(polyline)
}
}
func mapView(mapView: MKMapView!, rendererForOverlay overlay: MKOverlay!) -> MKOverlayRenderer! {
if overlay is MKPolyline {
var renderer = MKPolylineRenderer(overlay: overlay)
renderer.strokeColor = .blueColor()
renderer.lineWidth = 4
return renderer
}
return nil
}
func startSignificantChangeUpdates() {
self.manager.startMonitoringSignificantLocationChanges()
}
}
| 29.036145 | 120 | 0.710788 |
b9ca0c6bde27013d46e0e140c98cf24773090244 | 233 | sql | SQL | db/0.0.1/tables/instruments.upgrade.sql | eib/jam-sessions | 40217434db2a18d7ae52542f619f3c8c7841144c | [
"MIT"
] | 1 | 2018-05-27T14:17:12.000Z | 2018-05-27T14:17:12.000Z | db/0.0.1/tables/instruments.upgrade.sql | eib/jam-sessions | 40217434db2a18d7ae52542f619f3c8c7841144c | [
"MIT"
] | null | null | null | db/0.0.1/tables/instruments.upgrade.sql | eib/jam-sessions | 40217434db2a18d7ae52542f619f3c8c7841144c | [
"MIT"
] | null | null | null | CREATE TABLE IF NOT EXISTS instruments (
instrument_id bigserial PRIMARY KEY,
description text UNIQUE NOT NULL,
created_dt timestamp with time zone DEFAULT now(),
modified_dt timestamp with time zone DEFAULT now()
);
| 33.285714 | 54 | 0.755365 |
5ce2cbb55c4e7a6f9d4c2f8a8b07516a2bad1774 | 324 | lua | Lua | example/Client.client.lua | vocksel/action-network | 5386e37faf0de035af5d43d45b8d61accda820d0 | [
"MIT"
] | 1 | 2020-10-05T22:55:33.000Z | 2020-10-05T22:55:33.000Z | example/Client.client.lua | vocksel/action-network | 5386e37faf0de035af5d43d45b8d61accda820d0 | [
"MIT"
] | 2 | 2018-10-17T02:19:39.000Z | 2021-10-09T21:40:32.000Z | example/Client.client.lua | vocksel/action-network | 5386e37faf0de035af5d43d45b8d61accda820d0 | [
"MIT"
] | null | null | null | local repStorage = game:GetService("ReplicatedStorage")
local network = require(repStorage.Network)
local sample = network:event("sample")
sample:connect(function(response)
print("server responded with:", response)
end)
sample:fire("ping")
network:event("message"):connect(function(message)
print(message)
end)
| 20.25 | 55 | 0.756173 |
7c1957234573f20b243b9cd95e61b0ddccde76da | 9,159 | rs | Rust | app/src/abi.rs | bdbai/firstuwp-rs | c433119e57d38a1df8f8b66aee03a7b8ecb055e5 | [
"MIT"
] | 71 | 2020-07-26T06:30:13.000Z | 2022-03-20T00:44:03.000Z | app/src/abi.rs | bdbai/firstuwp-rs | c433119e57d38a1df8f8b66aee03a7b8ecb055e5 | [
"MIT"
] | 1 | 2022-01-15T00:32:29.000Z | 2022-01-16T04:45:08.000Z | app/src/abi.rs | bdbai/firstuwp-rs | c433119e57d38a1df8f8b66aee03a7b8ecb055e5 | [
"MIT"
] | 4 | 2020-08-17T18:13:09.000Z | 2021-08-02T13:39:55.000Z | use bindings::windows::application_model::activation::*;
use bindings::windows::ui::xaml::controls::*;
use bindings::windows::ui::xaml::data::*;
use bindings::windows::ui::xaml::interop::*;
use bindings::windows::ui::xaml::markup::*;
use bindings::windows::ui::xaml::navigation::*;
use bindings::windows::ui::xaml::*;
use std::ffi::c_void;
use winrt::*;
#[repr(C)]
pub struct abi_IInspectable {
pub iunknown: abi_IUnknown,
pub inspectable_iids:
extern "system" fn(NonNullRawComPtr<Object>, *mut u32, *mut *mut Guid) -> ErrorCode,
pub inspectable_type_name: extern "system" fn(
NonNullRawComPtr<Object>,
*mut <HString as AbiTransferable>::Abi,
) -> ErrorCode,
pub inspectable_trust_level:
extern "system" fn(NonNullRawComPtr<Object>, *mut i32) -> ErrorCode,
}
#[repr(C)]
pub struct abi_IApplicationOverride {
pub iinspectable: abi_IInspectable,
pub on_activated:
extern "system" fn(NonNullRawComPtr<IUnknown>, RawComPtr<IActivatedEventArgs>) -> ErrorCode,
pub on_launched: extern "system" fn(
NonNullRawComPtr<IUnknown>,
RawComPtr<LaunchActivatedEventArgs>,
) -> ErrorCode,
pub on_file_activated: extern "system" fn(
NonNullRawComPtr<IUnknown>,
RawComPtr<FileActivatedEventArgs>,
) -> ErrorCode,
pub on_search_activated: extern "system" fn(
NonNullRawComPtr<IUnknown>,
RawComPtr<SearchActivatedEventArgs>,
) -> ErrorCode,
pub on_share_target_activated: extern "system" fn(
NonNullRawComPtr<IUnknown>,
RawComPtr<ShareTargetActivatedEventArgs>,
) -> ErrorCode,
pub on_file_open_picker_activated: extern "system" fn(
NonNullRawComPtr<IUnknown>,
RawComPtr<FileOpenPickerActivatedEventArgs>,
) -> ErrorCode,
pub on_file_save_picker_activated: extern "system" fn(
NonNullRawComPtr<IUnknown>,
RawComPtr<FileSavePickerActivatedEventArgs>,
) -> ErrorCode,
pub on_cached_file_updater_activated: extern "system" fn(
NonNullRawComPtr<IUnknown>,
RawComPtr<CachedFileUpdaterActivatedEventArgs>,
) -> ErrorCode,
pub on_window_created: extern "system" fn(
NonNullRawComPtr<IUnknown>,
RawComPtr<IWindowCreatedEventArgs>,
) -> ErrorCode,
}
#[repr(C)]
pub struct abi_IPageOverrides {
pub iinspectable: abi_IInspectable,
pub on_navigated_from: extern "system" fn(
NonNullRawComPtr<IPageOverrides>,
<NavigationEventArgs as AbiTransferable>::Abi,
) -> ErrorCode,
pub on_navigated_to: extern "system" fn(
NonNullRawComPtr<IPageOverrides>,
<NavigationEventArgs as AbiTransferable>::Abi,
) -> ErrorCode,
pub on_navigating_from: extern "system" fn(
NonNullRawComPtr<IPageOverrides>,
<NavigatingCancelEventArgs as AbiTransferable>::Abi,
) -> ErrorCode,
}
#[repr(C)]
pub struct abi_IXamlMetadataProvider {
pub iinspectable: abi_IInspectable,
pub get_xaml_type: extern "system" fn(
NonNullRawComPtr<IXamlMetadataProvider>,
<TypeName as AbiTransferable>::Abi,
*mut <IXamlType as AbiTransferable>::Abi,
) -> ErrorCode,
pub get_xaml_type_by_full_name: extern "system" fn(
NonNullRawComPtr<IXamlMetadataProvider>,
<HString as AbiTransferable>::Abi,
*mut <IXamlType as AbiTransferable>::Abi,
) -> ErrorCode,
pub get_xmlns_definitions: extern "system" fn(
NonNullRawComPtr<IXamlMetadataProvider>,
*mut u32,
*mut *mut <XmlnsDefinition as AbiTransferable>::Abi,
) -> ErrorCode,
}
#[repr(C)]
pub struct abi_IXamlType {
pub iinspectable: abi_IInspectable,
pub base_type: extern "system" fn(
NonNullRawComPtr<IXamlType>,
*mut <IXamlType as AbiTransferable>::Abi,
) -> ErrorCode,
pub content_property: extern "system" fn(
NonNullRawComPtr<IXamlType>,
*mut <IXamlMember as AbiTransferable>::Abi,
) -> ErrorCode,
pub full_name: extern "system" fn(
NonNullRawComPtr<IXamlType>,
*mut <HString as AbiTransferable>::Abi,
) -> ErrorCode,
pub is_array: extern "system" fn(NonNullRawComPtr<IXamlType>, *mut bool) -> ErrorCode,
pub is_collection: extern "system" fn(NonNullRawComPtr<IXamlType>, *mut bool) -> ErrorCode,
pub is_constructible: extern "system" fn(NonNullRawComPtr<IXamlType>, *mut bool) -> ErrorCode,
pub is_dictionary: extern "system" fn(NonNullRawComPtr<IXamlType>, *mut bool) -> ErrorCode,
pub is_markup_extension:
extern "system" fn(NonNullRawComPtr<IXamlType>, *mut bool) -> ErrorCode,
pub is_bindable: extern "system" fn(NonNullRawComPtr<IXamlType>, *mut bool) -> ErrorCode,
pub item_type: extern "system" fn(
NonNullRawComPtr<IXamlType>,
*mut <IXamlType as AbiTransferable>::Abi,
) -> ErrorCode,
pub key_type: extern "system" fn(
NonNullRawComPtr<IXamlType>,
*mut <IXamlType as AbiTransferable>::Abi,
) -> ErrorCode,
pub underlying_type: extern "system" fn(
NonNullRawComPtr<IXamlType>,
*mut <TypeName as AbiTransferable>::Abi,
) -> ErrorCode,
pub activate_instance:
extern "system" fn(NonNullRawComPtr<IXamlType>, *mut RawComPtr<Object>) -> ErrorCode,
pub create_from_string: extern "system" fn(
NonNullRawComPtr<IXamlType>,
value: <HString as AbiTransferable>::Abi,
*mut RawComPtr<Object>,
) -> ErrorCode,
pub get_member: extern "system" fn(
NonNullRawComPtr<IXamlType>,
name: <HString as AbiTransferable>::Abi,
*mut <IXamlMember as AbiTransferable>::Abi,
) -> ErrorCode,
pub add_to_vector: extern "system" fn(
NonNullRawComPtr<IXamlType>,
instance: RawComPtr<Object>,
value: RawComPtr<Object>,
) -> ErrorCode,
pub add_to_map: extern "system" fn(
NonNullRawComPtr<IXamlType>,
instance: RawComPtr<Object>,
key: RawComPtr<Object>,
value: RawComPtr<Object>,
) -> ErrorCode,
pub run_initializer: extern "system" fn(NonNullRawComPtr<IXamlType>) -> ErrorCode,
}
#[repr(C)]
pub struct abi_IComponentConnector {
pub iinspectable: abi_IInspectable,
pub connect: extern "system" fn(
NonNullRawComPtr<IComponentConnector>,
i32,
object: RawComPtr<Object>,
) -> ErrorCode,
}
#[repr(C)]
pub struct abi_IWeakReference {
pub iunknown: abi_IUnknown,
pub resolve: extern "system" fn(
this: NonNullRawComPtr<IUnknown>,
*const Guid,
*mut *mut IUnknown,
) -> i32,
}
#[repr(C)]
pub struct abi_IWeakReferenceSource {
pub iunknown: abi_IUnknown,
pub get_weak_reference:
extern "system" fn(this: NonNullRawComPtr<IUnknown>, result: *mut *mut c_void) -> i32,
}
#[repr(C)]
pub struct abi_ICustomPropertyProvider {
pub iinspectable: abi_IInspectable,
pub get_custom_property: extern "system" fn(
NonNullRawComPtr<ICustomPropertyProvider>,
name: <HString as AbiTransferable>::Abi,
result: *mut <ICustomProperty as AbiTransferable>::Abi,
) -> ErrorCode,
pub get_indexed_custom_property: extern "system" fn(
NonNullRawComPtr<ICustomPropertyProvider>,
name: <HString as AbiTransferable>::Abi,
typename: <TypeName as AbiTransferable>::Abi,
result: *mut <ICustomProperty as AbiTransferable>::Abi,
) -> ErrorCode,
pub get_string_representation: extern "system" fn(
NonNullRawComPtr<ICustomPropertyProvider>,
result: *mut <HString as AbiTransferable>::Abi,
) -> ErrorCode,
pub get_type: extern "system" fn(
NonNullRawComPtr<ICustomPropertyProvider>,
result: *mut <TypeName as AbiTransferable>::Abi,
) -> ErrorCode,
}
#[repr(C)]
pub struct abi_ICustomProperty {
pub iinspectable: abi_IInspectable,
pub get_type: extern "system" fn(
NonNullRawComPtr<ICustomProperty>,
result: *mut <TypeName as AbiTransferable>::Abi,
) -> ErrorCode,
pub get_name: extern "system" fn(
NonNullRawComPtr<ICustomProperty>,
result: *mut <HString as AbiTransferable>::Abi,
) -> ErrorCode,
pub get_value: extern "system" fn(
NonNullRawComPtr<ICustomProperty>,
target: RawComPtr<Object>,
result: *mut RawComPtr<Object>,
) -> ErrorCode,
pub set_value: extern "system" fn(
NonNullRawComPtr<ICustomProperty>,
target: RawComPtr<Object>,
value: RawComPtr<Object>,
) -> ErrorCode,
pub get_indexed_value: extern "system" fn(
NonNullRawComPtr<ICustomProperty>,
target: RawComPtr<Object>,
index: RawComPtr<Object>,
result: *mut RawComPtr<Object>,
) -> ErrorCode,
pub set_indexed_value: extern "system" fn(
NonNullRawComPtr<ICustomProperty>,
target: RawComPtr<Object>,
value: RawComPtr<Object>,
index: RawComPtr<Object>,
) -> ErrorCode,
pub get_can_write:
extern "system" fn(NonNullRawComPtr<ICustomProperty>, result: *mut bool) -> ErrorCode,
pub get_can_read:
extern "system" fn(NonNullRawComPtr<ICustomProperty>, result: *mut bool) -> ErrorCode,
}
| 36.636 | 100 | 0.675074 |
5f4fde882c19ac2cc6bc390cc41cb03660a77ab0 | 819 | ts | TypeScript | src/app/player-page/player-page.component.ts | Noswad123/breaking-chains | 147764511ee08b84d04c3260d68fc24a39fa01c6 | [
"MIT"
] | 1 | 2018-05-16T16:28:38.000Z | 2018-05-16T16:28:38.000Z | src/app/player-page/player-page.component.ts | Noswad123/breaking-chains | 147764511ee08b84d04c3260d68fc24a39fa01c6 | [
"MIT"
] | null | null | null | src/app/player-page/player-page.component.ts | Noswad123/breaking-chains | 147764511ee08b84d04c3260d68fc24a39fa01c6 | [
"MIT"
] | null | null | null | import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import {User} from '../models/user';
import {UserService } from '../services/index';
@Component({
selector: 'player-page',
templateUrl: './player-page.component.html',
styleUrls: ['./player-page.component.scss']
})
export class PlayerPageComponent implements OnInit {
user:User;
constructor(
private router: Router,
private userService: UserService) {
}
ngOnInit() {
console.log("You are logged in");
this.getUser();
}
getUser(){
this.user=this.userService.getUser();
}
goToMyBag(){
this.router.navigate(["myDiscs"]);
}
logout(){
console.log("you are logged off");
this.userService.isloggedin=false;
this.router.navigate(["login"])
}
}
| 19.97561 | 57 | 0.660562 |
709bddbffae043056480c6a72ff06e06383b5294 | 1,671 | go | Go | src/snippetgen/common/metadata/metadata_test.go | cclauss/discovery-artifact-manager | 9eb6bcef290ef87006758349c725d440fbfc85d6 | [
"Apache-2.0"
] | 38 | 2017-07-20T17:54:08.000Z | 2022-02-20T02:16:31.000Z | src/snippetgen/common/metadata/metadata_test.go | cclauss/discovery-artifact-manager | 9eb6bcef290ef87006758349c725d440fbfc85d6 | [
"Apache-2.0"
] | 183 | 2017-03-23T17:17:24.000Z | 2022-02-09T00:07:17.000Z | src/snippetgen/common/metadata/metadata_test.go | cclauss/discovery-artifact-manager | 9eb6bcef290ef87006758349c725d440fbfc85d6 | [
"Apache-2.0"
] | 42 | 2017-03-23T19:20:20.000Z | 2022-02-20T02:17:09.000Z | package metadata
import "testing"
func TestGetLanguage(t *testing.T) {
for _, l := range AllowedLanguages {
if g, ok := GetLanguage(l.Name); !ok {
t.Errorf("language defined but not found: %s", l.Name)
} else if g != l {
t.Errorf("found wrong language, expected %v, found %v", l, g)
}
}
}
func TestNoLanguage(t *testing.T) {
langs := [...]string{"foobar language"}
for _, l := range langs {
if _, exist := GetLanguage(l); exist {
t.Errorf("language found but should not exist: %s", l)
}
}
}
func TestRequiredLanguages(t *testing.T) {
for _, l := range RequiredLanguages {
if !l.Required {
t.Errorf("language is required but not marked required: %s", l.Name)
}
if g, ok := GetLanguage(l.Name); !ok {
t.Errorf("language required but not defined: %s", l.Name)
} else if l != g {
t.Errorf("required language different from the definition: %s", l.Name)
}
}
for _, l := range AllowedLanguages {
found := false
for _, r := range RequiredLanguages {
if l.Name == r.Name {
found = true
break
}
}
if l.Required && !found {
t.Errorf("language marked required but not in RequiredLanguages: %s", l.Name)
}
}
}
func TestGetLanguageFromExt(t *testing.T) {
for _, l := range AllowedLanguages {
if g, ok := GetLanguageFromExt(l.Ext); !ok {
t.Errorf("cannot look up extension: %s", l.Ext)
} else if l != g {
t.Errorf("language different from definition: %s", l.Name)
}
}
}
func TestNoLanguageFromExt(t *testing.T) {
langs := [...]string{"foo", "bar"}
for _, l := range langs {
if _, exist := GetLanguageFromExt(l); exist {
t.Errorf("language found but should not exist: %s", l)
}
}
}
| 24.573529 | 80 | 0.630162 |
994706dc3f1e9ee372efc9f315d65f6df400f54c | 391 | h | C | 02 Stukturerad programmering C, C plusplus/07_Le_Frog_jumping_to_Rome/07_Le_Frog_jumping_to_Rome_in_Cpp.h | alexanderjxnsson/MMMMUH21 | becb785d01017de3cc41a91be22b7c00fc559f85 | [
"MIT"
] | 4 | 2021-09-30T09:57:01.000Z | 2022-01-07T09:37:35.000Z | 02 Stukturerad programmering C, C plusplus/07_Le_Frog_jumping_to_Rome/07_Le_Frog_jumping_to_Rome_in_Cpp.h | alexanderjxnsson/MMMMUH21 | becb785d01017de3cc41a91be22b7c00fc559f85 | [
"MIT"
] | 2 | 2021-09-30T12:44:44.000Z | 2021-10-06T15:45:12.000Z | 02 Stukturerad programmering C, C plusplus/07_Le_Frog_jumping_to_Rome/07_Le_Frog_jumping_to_Rome_in_Cpp.h | alexanderjxnsson/MMMMUH21 | becb785d01017de3cc41a91be22b7c00fc559f85 | [
"MIT"
] | 11 | 2021-09-15T07:43:01.000Z | 2021-10-06T14:16:45.000Z | //
// 07_Le_Frog_jumping_to_Rome_in_Cpp.h
// 07_Le_Frog_jumping_to_Rome_in_Cpp
//
// Created by Daniel Eftodi on 2021-10-05.
//
#ifndef Le_Frog_jumping_to_Rome_in_Cpp_h
#define Le_Frog_jumping_to_Rome_in_Cpp_h
#include <stdio.h>
#include <iostream>
#endif /* Le_Frog_jumping_to_Rome_in_Cpp_h */
void Le_Frog_jumping_to_Rome (int iNumRequireSteps);
int main (int argc, char ** argv);
| 20.578947 | 52 | 0.785166 |
54f1d6c206491ebdce4be8bead5ac6e3f74c7a69 | 376 | swift | Swift | apps/ios/Shared/Views/NewChat/CreateGroupView.swift | graph-chat/protocol | b3f4645011cd0dd97970ad612a0fda3812129d16 | [
"MIT"
] | 2 | 2020-01-23T06:03:47.000Z | 2020-01-23T12:03:27.000Z | apps/ios/Shared/Views/NewChat/CreateGroupView.swift | graph-chat/protocol | b3f4645011cd0dd97970ad612a0fda3812129d16 | [
"MIT"
] | 5 | 2020-01-22T14:03:51.000Z | 2020-01-24T10:48:38.000Z | apps/ios/Shared/Views/NewChat/CreateGroupView.swift | graph-chat/protocol | b3f4645011cd0dd97970ad612a0fda3812129d16 | [
"MIT"
] | 1 | 2020-01-22T10:05:03.000Z | 2020-01-22T10:05:03.000Z | //
// CreateGroupView.swift
// SimpleX
//
// Created by Evgeny Poberezkin on 29/01/2022.
// Copyright © 2022 SimpleX Chat. All rights reserved.
//
import SwiftUI
struct CreateGroupView: View {
var body: some View {
EmptyView()
}
}
struct CreateGroupView_Previews: PreviewProvider {
static var previews: some View {
CreateGroupView()
}
}
| 17.090909 | 55 | 0.664894 |
a16097ae40d34fe1e6000e4d3e46862218e86dca | 1,405 | go | Go | 2020/6/main.go | bobcatfish/adventofcode2016 | 20f781f256f4d649544c1f6e28da0d73e3bbc9e3 | [
"Apache-2.0"
] | null | null | null | 2020/6/main.go | bobcatfish/adventofcode2016 | 20f781f256f4d649544c1f6e28da0d73e3bbc9e3 | [
"Apache-2.0"
] | 3 | 2017-12-02T17:58:41.000Z | 2020-12-11T04:33:02.000Z | 2020/6/main.go | bobcatfish/adventofcode2016 | 20f781f256f4d649544c1f6e28da0d73e3bbc9e3 | [
"Apache-2.0"
] | null | null | null | package main
import (
"fmt"
"io/ioutil"
"log"
"strings"
)
func load() ([][]string, error) {
data, err := ioutil.ReadFile("input.txt")
if err != nil {
return nil, fmt.Errorf("couldn't read file: %v", err)
}
pp := [][]string{}
for _, v := range strings.Split(string(data), "\n\n") {
pp = append(pp, strings.Fields(v))
}
return pp, nil
}
func getCounts1(a [][]string) []map[rune]struct{} {
mm := []map[rune]struct{}{}
for _, ss := range a {
m := map[rune]struct{}{}
for _, s := range ss {
for _, r := range s {
m[r] = struct{}{}
}
}
mm = append(mm, m)
}
return mm
}
func getCounts2(a [][]string) []map[rune]struct{} {
mm := []map[rune]struct{}{}
for _, ss := range a {
m := map[rune]struct{}{}
for i, s := range ss {
if i == 0 {
for _, r := range s {
m[r] = struct{}{}
}
} else {
for r, _ := range m {
found := false
for _, rr := range s {
if r == rr {
found = true
break
}
}
if !found {
delete(m, r)
}
}
}
}
mm = append(mm, m)
}
return mm
}
func sum(counts []map[rune]struct{}) int {
c := 0
for _, m := range counts {
c += len(m)
}
return c
}
func main() {
a, err := load()
if err != nil {
log.Fatalf("Couldn't load nums from file: %v", err)
}
counts1 := getCounts1(a)
fmt.Println(sum(counts1))
counts2 := getCounts2(a)
fmt.Println(sum(counts2))
}
| 16.529412 | 56 | 0.518149 |
7491af7f55936ca2fcdce7cf5588f5ec61c27cac | 2,150 | h | C | source/mixer/factory.h | mexus/medici2 | 8ffadc0f72459e5b59f12460575925e5a578a389 | [
"MIT"
] | null | null | null | source/mixer/factory.h | mexus/medici2 | 8ffadc0f72459e5b59f12460575925e5a578a389 | [
"MIT"
] | null | null | null | source/mixer/factory.h | mexus/medici2 | 8ffadc0f72459e5b59f12460575925e5a578a389 | [
"MIT"
] | null | null | null | #pragma once
#include <memory>
#include "full-capacity-mixer.h"
#include "one-swap-mixer.h"
class MixersFactory {
public:
MixersFactory(size_t deck_size);
MixersFactory(const MixersFactory& other) = delete;
enum MixerType { ONE_SWAP, FULL_CAPACITY };
enum EngineName { RANLUX24_BASE, MINSTD_RAND };
template <class DataType, class SwapFunctor = DefaultSwap<DataType>>
std::shared_ptr<MixerInterface<DataType, SwapFunctor>> CreateMixer(
uint_fast32_t seed, SwapFunctor swap_functor = {}) const {
switch (engine_) {
case RANLUX24_BASE:
return CreateMixer<DataType, std::ranlux24_base, SwapFunctor>(
seed, swap_functor);
case MINSTD_RAND:
return CreateMixer<DataType, std::minstd_rand, SwapFunctor>(seed,
swap_functor);
default:
throw std::logic_error("Unimplemented engine " + std::to_string(engine_));
}
}
void SetRandomEngine(EngineName engine);
void SetMixer(MixerType type);
private:
const std::size_t deck_size_;
EngineName engine_ = RANLUX24_BASE;
MixerType mixer_type_ = FULL_CAPACITY;
template <class DataType, class RandomEngine, class SwapFunctor>
std::shared_ptr<MixerInterface<DataType, SwapFunctor>> CreateMixer(
uint_fast32_t seed, SwapFunctor swap_functor) const {
switch (mixer_type_) {
case ONE_SWAP:
return std::shared_ptr<MixerInterface<DataType, SwapFunctor>>(
new OneSwapMixer<DataType, RandomEngine, SwapFunctor>(
deck_size_, seed, swap_functor));
case FULL_CAPACITY:
return std::shared_ptr<MixerInterface<DataType, SwapFunctor>>(
new FullCapacityMixer<DataType, RandomEngine, SwapFunctor>(
deck_size_, seed, swap_functor));
default:
throw std::logic_error("Unimplemented mixer type " +
std::to_string(mixer_type_));
}
}
};
| 38.392857 | 90 | 0.611628 |
9afe62d3e510972997562b90e28c8163cd433297 | 6,441 | css | CSS | auth/style.css | valuestests/valuestests.github.io | b2735c5a2f02d084577656407bc185655fcf627c | [
"MIT"
] | 5 | 2021-07-12T05:31:24.000Z | 2021-12-19T17:29:38.000Z | auth/style.css | valuestests/valuestests.github.io | b2735c5a2f02d084577656407bc185655fcf627c | [
"MIT"
] | 3 | 2021-09-03T05:24:29.000Z | 2021-12-16T07:33:25.000Z | auth/style.css | valuestests/valuestests.github.io | b2735c5a2f02d084577656407bc185655fcf627c | [
"MIT"
] | 2 | 2021-08-17T11:15:29.000Z | 2022-03-09T12:28:33.000Z | html {
background: linear-gradient(180deg, rgba(14,130,168,1) 0%, rgba(206,125,125,1) 100%);
padding: 0px;
}
body {
width: 80%;
min-height: calc(100vh - 4em);
margin: 0 auto;
padding: 2em;
background-color: rgba(229, 229, 229, 1);
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
p {
color: #444444;
font-family: 'Roboto', sans-serif;
font-size: 16pt;
line-height: 1;
margin: 4pt;
}
div.element {
width: 85%;
padding: 16pt;
background-color: #EEEEEE;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 16px;
margin: auto;
}
a{
color: #2222DD;
}
a:hover{
color: #5b5b5b;
}
p.value-description {
text-indent: -16pt;
margin-left: 20pt;
}
p.question {
margin: 16pt auto;
color: #333333;
font-family: 'Montserrat', sans-serif;
font-weight: normal;
width: 70%;
min-width: 500pt;
min-height: 144pt;
background-color: #eeeeee;
padding: 16pt;
border-radius: 16pt;
font-size: 36pt;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
h1 {
color: #222222;
font-family: 'Montserrat', sans-serif;
font-size: 72pt;
text-align: center;
line-height: 72pt;
margin-top: 0pt;
margin-bottom: 0pt;
}
h2 {
color: #333333;
font-family: 'Montserrat', sans-serif;
font-size: 36pt;
line-height: 36pt;
margin-top: 12pt;
margin-bottom: 0pt;
}
h3 {
color: #333333;
font-family: 'Montserrat', sans-serif;
}
li {
font-size: 16pt;
text-indent: 16pt;
}
a {
font-family: inherit;
}
img.center {
display: block;
margin: 1em auto;
width: 50%;
min-width: 500pt;
}
.button {
background-color: #2196f3;
font-family: 'Montserrat', sans-serif;
border: none;
border-radius: 8pt;
color: white;
padding: 8pt;
width: 50%;
min-width: 500pt;
text-align: center;
text-decoration: none;
display: block;
font-size: 24pt;
margin: -2px auto;
cursor: pointer;
}
button:hover {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.small_button, .small_button_off {
background-color: #333;
font-family: 'Montserrat', sans-serif;
border: none;
border-radius: 8pt;
color: white;
padding: 8pt;
width: 10%;
min-width: 100pt;
text-align: center;
text-decoration: none;
display: block;
font-size: 18pt;
margin: -2px auto;
cursor: pointer;
}
.small_button_off {
background-color: #ddd;
color: #888;
border: 2px solid #888;
cursor: not-allowed;
margin: -4px auto;
}
div.axis {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
div.bar {
height: 36pt;
line-height: 36pt;
padding: 8pt;
margin-top: 4pt;
margin-bottom: 4pt;
border-width: 4px;
border-right-width: 1px;
border-top-style: solid;
border-bottom-style: solid;
border-color: #222222;
background-color: #eeeeee;
display: block;
width: 50%;
}
div.text-wrapper {
font-family: 'Montserrat', sans-serif;
font-size: 36pt;
line-height: 36pt;
color: #222222;
display: inline-block;
}
span.weight-300 {
font-weight: 300;
}
canvas {
border-color: #444444;
border-style: solid;
border-width: 2px;
border-radius: 8pt;
display: block;
margin: 8pt;
margin-left: auto;
margin-right: auto;
}
/* AUTH */
div.autocracy {
background-color: #0C5393;
text-align: right;
border-left-style: solid;
}
div.oligarchy {
background-color: #807A91;
text-align: left;
border-right-style: solid;
}
div.economic {
background-color: #DD7E6B;
text-align: right;
border-left-style: solid;
}
div.civilvalue {
background-color: #45818D;
text-align: left;
border-right-style: solid;
}
div.populism {
background-color: #F6B26A;
text-align: right;
border-left-style: solid;
}
div.elitism {
background-color: #FFD866;
text-align: left;
border-right-style: solid;
}
div.deterrence {
background-color: #6AA74F;
text-align: right;
border-left-style: solid;
}
div.prevention {
background-color: #E06666;
text-align: left;
border-right-style: solid;
}
div.uniform {
background-color: #A64D78;
text-align: right;
border-left-style: solid;
}
div.diverse {
background-color: #C1D7A8;
text-align: left;
border-right-style: solid;
}
div.diversity {
background-color: #C1D7A8;
text-align: left;
border-right-style: solid;
}
div.ruleover {
background-color: #B45E06;
text-align: right;
border-left-style: solid;
}
div.ruleunder {
background-color: #E6B8AF;
text-align: left;
border-right-style: solid;
}
div.hereditary {
background-color: #BF9001;
text-align: right;
border-left-style: solid;
}
div.bestsuited {
background-color: #76A5AE;
text-align: left;
border-right-style: solid;
}
div.authunity {
background-color: #E99999;
text-align: right;
border-left-style: solid;
}
div.disunity {
background-color: #A4C2F4;
text-align: left;
border-right-style: solid;
}
span.weight-300 {
font-weight: 300;
}
#banner {
border-color: #444444;
border-style: solid;
border-width: 2px;
border-radius: 8pt;
display: block;
margin: 8pt;
margin-left: auto;
margin-right: auto;
}
/* TOOLTIP */
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 300px;
background-color: #555;
color: #fff;
font-family: 'Montserrat', sans-serif;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -150px;
opacity: 0;
transition: opacity 0.3s;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
margin: 0 auto;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
p.tool {
color: #333333;
font-family: 'Montserrat', sans-serif;
display: flex;
text-align: center;
}
| 20.065421 | 89 | 0.622264 |
b1706ce1c8e0e568eaf3c88c679854c7a08e3612 | 364 | h | C | usr/libexec/corespeechd/BKDeviceDelegate-Protocol.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | 2 | 2021-11-02T09:23:27.000Z | 2022-03-28T08:21:57.000Z | usr/libexec/corespeechd/BKDeviceDelegate-Protocol.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | null | null | null | usr/libexec/corespeechd/BKDeviceDelegate-Protocol.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | 1 | 2022-03-28T08:21:59.000Z | 2022-03-28T08:21:59.000Z | //
// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).
//
// Copyright (C) 1997-2019 Steve Nygard.
//
#import "NSObject-Protocol.h"
@class BKDevice, BKMatchEvent;
@protocol BKDeviceDelegate <NSObject>
@optional
- (void)device:(BKDevice *)arg1 matchEventOccurred:(BKMatchEvent *)arg2;
@end
| 21.411765 | 120 | 0.722527 |
2fa2e5951a2dab8d546d7c97c603464c49968e01 | 1,877 | asm | Assembly | src/upcore/src/cfenv/msvc/i686/fegetenv.x86.asm | upcaste/upcaste | 8174a2f40e7fde022806f8d1565bb4a415ecb210 | [
"MIT"
] | 1 | 2018-09-17T20:50:14.000Z | 2018-09-17T20:50:14.000Z | src/upcore/src/cfenv/msvc/i686/fegetenv.x86.asm | jwtowner/upcaste | 8174a2f40e7fde022806f8d1565bb4a415ecb210 | [
"MIT"
] | null | null | null | src/upcore/src/cfenv/msvc/i686/fegetenv.x86.asm | jwtowner/upcaste | 8174a2f40e7fde022806f8d1565bb4a415ecb210 | [
"MIT"
] | null | null | null | ;;
;; Upcaste Performance Libraries
;; Copyright (C) 2012-2013 Jesse W. Towner
;;
;; Permission is hereby granted, free of charge, to any person obtaining
;; a copy of this software and associated documentation files (the
;; "Software"), to deal in the Software without restriction, including
;; without limitation the rights to use, copy, modify, merge, publish,
;; distribute, sublicense, and/or sell copies of the Software, and to
;; permit persons to whom the Software is furnished to do so, subject to
;; the following conditions:
;;
;; The above copyright notice and this permission notice shall be
;; included in all copies or substantial portions of the Software.
;;
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;;
.686P
.XMM
.MODEL FLAT
INCLUDE fenv.inc
;;
;; int fegetenv(fenv_t* envp);
;;
;; Use the fnstenv and stmxcsr instruction pairs to capture the
;; current floating-point environment. Note that we have to reload
;; the environment after capturing it because the x87 FPU masks
;; the exceptions in the control word on executing fnstenv.
;;
.CODE
ALIGN 4
PUBLIC _fegetenv
_fegetenv PROC
mov ecx, DWORD PTR [esp+4]
test ecx, ecx
jz _invalid_envp
fnstenv [ecx]
stmxcsr [ecx].fenv.mxcsr
xor eax, eax
fldenv [ecx]
ret
_invalid_envp:
mov eax, -1
ret
_fegetenv ENDP
END
| 31.283333 | 74 | 0.695791 |
70adac2679061c3253e42a94836a83bce765d64c | 1,486 | go | Go | pkg/storage/marker.go | asecurityteam/vpcflow-digesterd | 7143c659e26b26e88fd04b04e03250b783d5c9ef | [
"Apache-2.0"
] | null | null | null | pkg/storage/marker.go | asecurityteam/vpcflow-digesterd | 7143c659e26b26e88fd04b04e03250b783d5c9ef | [
"Apache-2.0"
] | 6 | 2019-05-17T20:31:27.000Z | 2021-02-01T22:21:42.000Z | pkg/storage/marker.go | asecurityteam/vpcflow-digesterd | 7143c659e26b26e88fd04b04e03250b783d5c9ef | [
"Apache-2.0"
] | null | null | null | package storage
import (
"bytes"
"context"
"sync"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3iface"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/aws/aws-sdk-go/service/s3/s3manager/s3manageriface"
)
// ProgressMarker is an implementation of Marker which allows for marking/unmarking of digests in progress
type ProgressMarker struct {
Bucket string
Client s3iface.S3API
uploader s3manageriface.UploaderAPI
lock sync.Mutex
now func() time.Time
}
// Mark flags the digest identified by key as being "in progress"
func (m *ProgressMarker) Mark(ctx context.Context, key string) error {
m.initUploader()
now := m.now
if now == nil {
now = time.Now
}
_, err := m.uploader.UploadWithContext(ctx, &s3manager.UploadInput{
Bucket: aws.String(m.Bucket),
Key: aws.String(key + inProgressSuffix),
Body: bytes.NewReader([]byte(now().Format(time.RFC3339Nano))),
})
return err
}
// Unmark flags the digest identified by key as not being "in progress"
func (m *ProgressMarker) Unmark(ctx context.Context, key string) error {
_, err := m.Client.DeleteObjectWithContext(ctx, &s3.DeleteObjectInput{
Bucket: aws.String(m.Bucket),
Key: aws.String(key + inProgressSuffix),
})
return err
}
func (m *ProgressMarker) initUploader() {
m.lock.Lock()
defer m.lock.Unlock()
if m.uploader == nil {
m.uploader = s3manager.NewUploaderWithClient(m.Client)
}
}
| 26.535714 | 106 | 0.720054 |
b2ffff75cff848e9cc4d8a6143bf4d9bf43e64d3 | 5,702 | py | Python | sapy_script/SAP.py | fkfouri/sapy_script | 476041288367e2098b955bc2377f442ce503e822 | [
"MIT"
] | 3 | 2018-12-03T15:51:54.000Z | 2020-11-20T01:05:39.000Z | sapy_script/SAP.py | whrocha/sapy_script | 476041288367e2098b955bc2377f442ce503e822 | [
"MIT"
] | null | null | null | sapy_script/SAP.py | whrocha/sapy_script | 476041288367e2098b955bc2377f442ce503e822 | [
"MIT"
] | 3 | 2018-07-28T21:53:32.000Z | 2018-08-22T13:51:17.000Z | from multiprocessing import Pool, Manager
from time import sleep
from wmi import WMI
from win32com.client import GetObject
from subprocess import Popen
from collections import Iterable
from tqdm import tqdm
from os import getpid
from sapy_script.Session import Session
session_process = None
all_processes_id = []
def _on_init(sid, p_ids):
p_ids.append(getpid())
global session_process
app = SAP.app()
i = 0
while True:
con = app.Children(i)
if con.Children(0).Info.systemsessionid == sid:
session = con.Children(p_ids.index(getpid()))
session_process = Session(session)
break
i = i + 1
def _task_executor(task):
task['func'](task['data'])
class SAP:
def __init__(self, max_sessions=16):
self._con = None
self._tasks = []
self.max_sessions = max_sessions
self.session = lambda i=0: Session(self._con.Children(i))
@staticmethod
def app():
"""Open SAPGui"""
wmi_obj = WMI()
sap_exists = len(wmi_obj.Win32_Process(name='saplgpad.exe')) > 0
if not sap_exists:
Popen(['C:\Program Files (x86)\SAP\FrontEnd\SAPgui\saplgpad.exe'])
while True:
try:
#temp = GetObject("SAPGUI").GetScriptingEngine
#temp.Change("teste 456", "", "", "", "", ".\LocalSystem", "")
#objService.Change(,, , , , , ".\LocalSystem", "")
return GetObject("SAPGUI").GetScriptingEngine
except:
sleep(1)
pass
def connect(self, environment, client=None, user=None, password=None, lang=None, force=False):
con = SAP.app().OpenConnection(environment, True)
session = Session(con.Children(0))
if client is not None:
session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = client
if user is not None:
session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = user
if password is not None:
session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = password
if lang is not None:
session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = lang
session.findById("wnd[0]").sendVKey(0)
# Eventual tela de mudanca de senha
change_pwd = False
try:
session.findById("wnd[1]/usr/pwdRSYST-NCODE").text = ''
session.findById("wnd[1]/usr/pwdRSYST-NCOD2").text = ''
change_pwd = True
except:
pass
if change_pwd:
raise ValueError('Please, set a new Password')
# Derruba conexão SAP
if force:
try:
session.findById("wnd[1]/usr/radMULTI_LOGON_OPT1").select()
session.findById("wnd[1]/tbar[0]/btn[0]").press()
except:
pass
else:
try:
session.findById("wnd[1]/usr/radMULTI_LOGON_OPT1").select()
session.findById("wnd[1]").sendVKey(12)
return False
except:
pass
# Teste da Conexao
if session.is_connected():
self._con = con
return True
self._con = None
return False
@property
def connected(self):
return self.session().is_connected()
@staticmethod
def session():
global session_process
return session_process
def sid(self):
return self.session().Info.systemsessionid
def logout(self):
session = self.session()
session.findById("wnd[0]/tbar[0]/okcd").text = "/nex"
session.findById("wnd[0]").sendVKey(0)
del session
self._con = None
@property
def number_of_sessions(self):
return 0 if self._con is None else len(self._con.Children)
@number_of_sessions.setter
def number_of_sessions(self, value):
size = self.number_of_sessions
if size == 0:
return
value = min(max(int(value), 1), self.max_sessions)
minus = value < size
arr = list(range(size, value))
arr.extend(reversed(range(value, size)))
for i in arr:
if minus:
session = self.session(i)
session.findById("wnd[0]/tbar[0]/okcd").text = "/i"
session.findById("wnd[0]").sendVKey(0)
else:
self.session().createSession()
sleep(0.5)
def clear_tasks(self):
self._tasks = []
def add_task(self, func, data):
for dt in data:
self._tasks.append({'func': func, 'data': dt})
def execute_tasks(self, resize_sessions=False):
total = len(self._tasks)
if total == 0:
return
if resize_sessions:
self.number_of_sessions = total
size = self.number_of_sessions
if size == 0:
return
sess_manager = Manager().list([])
pool = Pool(processes=self.number_of_sessions, initializer=_on_init, initargs=(self.sid(), sess_manager))
response = list(tqdm(pool.imap_unordered(_task_executor, self._tasks)))
pool.close()
pool.join()
return list(response)
def execute_function(self, func, data, resize_sessions=False):
if not isinstance(data, Iterable):
data = [data]
self.clear_tasks()
self.add_task(func=func, data=data)
response = self.execute_tasks(resize_sessions=resize_sessions)
self.clear_tasks()
return response
@staticmethod
def multi_arguments(func):
def convert_args(pr):
return func(**pr)
return convert_args
| 28.368159 | 113 | 0.573834 |
2a3f30092477313e60d2e749e3ee19fe03ff5b0d | 939 | java | Java | src/main/java/com/lufax/jijin/fundation/schedular/HandleDividendSwitchDispatchJob.java | yuexinok/lufax-jijin | e07aeb3188a2c09e22307670ba86887c9c07a7e2 | [
"Apache-2.0"
] | 1 | 2017-09-18T06:28:23.000Z | 2017-09-18T06:28:23.000Z | src/main/java/com/lufax/jijin/fundation/schedular/HandleDividendSwitchDispatchJob.java | yuexinok/lufax-jijin | e07aeb3188a2c09e22307670ba86887c9c07a7e2 | [
"Apache-2.0"
] | null | null | null | src/main/java/com/lufax/jijin/fundation/schedular/HandleDividendSwitchDispatchJob.java | yuexinok/lufax-jijin | e07aeb3188a2c09e22307670ba86887c9c07a7e2 | [
"Apache-2.0"
] | 12 | 2016-05-04T08:12:26.000Z | 2021-08-03T15:59:57.000Z | /**
*
*/
package com.lufax.jijin.fundation.schedular;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lufax.jijin.fundation.service.DividendService;
import com.lufax.jijin.fundation.service.domain.Dividend;
/**
* 份额分红
* @author chenguang E-mail:chenguang451@pingan.com.cn
* @version create time:May 15, 2015 9:48:41 AM
*
*/
@Service
public class HandleDividendSwitchDispatchJob extends BaseBatchWithLimitJob<Dividend, Long> {
@Autowired
private DividendService dividendService;
@Override
protected Long getKey(Dividend item) {
return item.getId();
}
@Override
protected List<Dividend> fetchList(int batchAmount) {
return dividendService.getNewDividendsByType(Dividend.Type.SWITCH_DIVIDEND, batchAmount);
}
@Override
protected void process(Dividend item) {
dividendService.increaseDividend(item);
}
}
| 22.357143 | 92 | 0.774228 |
fb49b944a926d1fbdefdcad3d6ac9a662e304dd1 | 4,372 | kt | Kotlin | src/main/kotlin/gay/floof/hana/core/s3/S3Service.kt | auguwu/API | 3d8aedfa7c39b416036b35e153f2fd75ee2c9736 | [
"MIT"
] | 5 | 2020-08-16T16:59:05.000Z | 2020-12-12T19:33:24.000Z | src/main/kotlin/gay/floof/hana/core/s3/S3Service.kt | auguwu/API | 3d8aedfa7c39b416036b35e153f2fd75ee2c9736 | [
"MIT"
] | null | null | null | src/main/kotlin/gay/floof/hana/core/s3/S3Service.kt | auguwu/API | 3d8aedfa7c39b416036b35e153f2fd75ee2c9736 | [
"MIT"
] | 1 | 2020-11-22T22:15:16.000Z | 2020-11-22T22:15:16.000Z | /*
* 🥀 hana: API to proxy different APIs like GitHub Sponsors, source code for api.floofy.dev
* Copyright (c) 2020-2022 Noel <cutie@floofy.dev>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package gay.floof.hana.core.s3
import gay.floof.hana.data.HanaConfig
import gay.floof.utils.slf4j.logging
import software.amazon.awssdk.auth.credentials.AwsCredentials
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.services.s3.S3Client
import software.amazon.awssdk.services.s3.model.ListObjectsV2Request
import java.net.URI
class S3Service(config: HanaConfig) {
private val images = mutableMapOf<String, MutableList<String>>()
private val log by logging<S3Service>()
private val client: S3Client
init {
log.info("Configuring S3 client...")
val builder = S3Client.builder()
.region(Region.of(config.s3.region))
if (config.s3.enforceNewPathStyle)
builder.serviceConfiguration {
it.pathStyleAccessEnabled(true)
}
if (config.s3.secretKey != null || config.s3.accessKey != null) {
builder.credentialsProvider(
StaticCredentialsProvider.create(object: AwsCredentials {
override fun accessKeyId(): String = config.s3.accessKey!!
override fun secretAccessKey(): String = config.s3.secretKey!!
})
)
}
if (config.s3.endpoint != null) {
builder.endpointOverride(URI.create(config.s3.endpoint))
}
client = builder.build()
log.info("Constructed S3 client, now initializing image cache...")
var request = ListObjectsV2Request.builder()
.bucket(config.s3.bucket)
.build()
while (true) {
val objects = client.listObjectsV2(request)
for (content in objects.contents()) {
val isDir = content.key().split("").last() == "/"
if (isDir) continue
val key = content.key()
when (key.split("/").first()) {
"yiff" -> {
if (!images.containsKey("yiff"))
images["yiff"] = mutableListOf()
images["yiff"]!!.add("https://cdn.floofy.dev/$key")
}
"polarbois" -> {
if (!images.containsKey("polarbois"))
images["polarbois"] = mutableListOf()
images["polarbois"]!!.add("https://cdn.floofy.dev/$key")
}
"wahs" -> {
if (!images.containsKey("wahs"))
images["wahs"] = mutableListOf()
images["wahs"]!!.add("https://cdn.floofy.dev/$key")
}
}
}
if (objects.nextContinuationToken() == null) {
break
}
request = request.toBuilder()
.continuationToken(objects.nextContinuationToken())
.build()
}
log.info("Finished image cache. :D")
}
fun getObjects(parent: String): List<String> = images[parent] ?: listOf()
}
| 37.367521 | 91 | 0.600869 |
997d0edeaa4e7eb60aab63ab083a1872c1952d73 | 7,366 | c | C | molten_util.c | php-cpm/Molten | 40a6565e8ddfdd03b0991dcb3f890f1155b638af | [
"Apache-2.0"
] | 1 | 2019-04-14T15:57:38.000Z | 2019-04-14T15:57:38.000Z | molten_util.c | php-cpm/Molten | 40a6565e8ddfdd03b0991dcb3f890f1155b638af | [
"Apache-2.0"
] | null | null | null | molten_util.c | php-cpm/Molten | 40a6565e8ddfdd03b0991dcb3f890f1155b638af | [
"Apache-2.0"
] | null | null | null | /**
* Copyright 2017 chuan-yun silkcutKs <silkcutbeta@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "molten_util.h"
#if RAND_MAX/256 >= 0xFFFFFFFFFFFFFF
#define LOOP_COUNT 1
#elif RAND_MAX/256 >= 0xFFFFFF
#define LOOP_COUNT 2
#elif RAND_MAX/256 >= 0x3FFFF
#define LOOP_COUNT 3
#elif RAND_MAX/256 >= 0x1FF
#define LOOP_COUNT 4
#else
#define LOOP_COUNT 5
#endif
#define MAX_SPANS 65534
#define MAX_SPANS_LEN 5
#define MAX_HOST_NAME 10
/*
* crc32 code from http://www.hackersdelight.org/hdcodetxt/crc.c.txt
*/
unsigned int crc32(char *message) {
int i, crc;
unsigned int byte, c;
const unsigned int g0 = 0xEDB88320, g1 = g0>>1,
g2 = g0>>2, g3 = g0>>3, g4 = g0>>4, g5 = g0>>5,
g6 = (g0>>6)^g0, g7 = ((g0>>6)^g0)>>1;
i = 0;
crc = 0xFFFFFFFF;
while ((byte = message[i]) != 0) { // Get next byte.
crc = crc ^ byte;
c = ((crc<<31>>31) & g7) ^ ((crc<<30>>31) & g6) ^
((crc<<29>>31) & g5) ^ ((crc<<28>>31) & g4) ^
((crc<<27>>31) & g3) ^ ((crc<<26>>31) & g2) ^
((crc<<25>>31) & g1) ^ ((crc<<24>>31) & g0);
crc = ((unsigned)crc >> 8) ^ c;
i = i + 1;
}
return ~crc;
}
/* rand uini64 */
uint64_t rand_uint64(void)
{
uint64_t r = 0;
int i = 0;
struct timeval tv;
char hostname;
gethostname(&hostname, MAX_HOST_NAME);
int seed = crc32(&hostname) * (gettimeofday(&tv, NULL) == 0 ? tv.tv_usec * getpid() : getpid());
srandom(seed);
for (i = LOOP_COUNT; i > 0; i--) {
r = r*(RAND_MAX + (uint64_t)1) + random();
}
return r;
}
/* check is hit or not */
int check_hit_ratio(long base)
{
struct timeval tv;
int seed = gettimeofday(&tv, NULL) == 0 ? tv.tv_usec * getpid() : getpid();
srandom(seed);
int num = random();
/* the remainder 0 is choose by self */
if (num % base == 0) {
return 1;
} else {
return 0;
}
}
/* bin to hex */
void b2hex(char **output, const unsigned char *input, int input_len)
{
static const char hexits[17] = "0123456789abcdef";
int i;
*output = (char *)emalloc(input_len * 2 + 1);
for (i = 0; i < input_len; i++) {
*(*output + i*2) = hexits[*(input+i) >> 4];
*(*output + i*2 + 1) = hexits[*(input+i) & 0x0F];
}
*(*output + input_len *2) = '\0';
}
/* bin2hex64 */
void bin2hex64(char **output, const uint64_t *input)
{
b2hex(output, (const unsigned char *)input, 8);
}
/* random 64 and change to hex */
void rand64hex(char **output)
{
uint64_t num = rand_uint64();
return bin2hex64(output, &num);
}
/* build span id random */
void build_span_id_random(char **span_id, char *parent_span_id, int span_count)
{
rand64hex(span_id);
}
/* span id change to 1.1.x.x
* if the parent span id 1.1.1, the span id is 1.1.1.1, the next span id is 1.1.1.2
* */
/* so we will build our span id contact the parent_span_id */
void build_span_id_level(char **span_id, char *parent_span_id, int span_count)
{
if (parent_span_id != NULL) {
/* len = . + \0 + max_spans_len + parent_len */
int len = 2 + MAX_SPANS_LEN + strlen(parent_span_id);
*span_id = emalloc(len);
memset(*span_id, 0x00, len);
sprintf(*span_id, "%s.%d", parent_span_id, span_count);
(*span_id)[len-1] = '\0';
} else {
*span_id = estrdup("1");
}
}
/* {{{ retrive zval */
smart_string repr_zval(zval *zv, int limit TSRMLS_DC)
{
int tlen = 0;
char buf[256] = {0}, *tstr = NULL;
smart_string result = {0};
#if PHP_VERSION_ID >= 70000
zend_string *class_name;
#endif
/* php_var_export_ex is a good example */
switch (Z_TYPE_P(zv)) {
#if PHP_VERSION_ID < 70000
case IS_BOOL:
if (Z_LVAL_P(zv)) {
smart_string_appends(&result, "true");
return result;
} else {
smart_string_appends(&result, "false");
return result;
}
#else
case IS_TRUE:
smart_string_appends(&result, "true");
return result;
case IS_FALSE:
smart_string_appends(&result, "false");
return result;
#endif
case IS_NULL:
smart_string_appends(&result, "NULL");
return result;
case IS_LONG:
snprintf(buf, sizeof(buf), "%ld", Z_LVAL_P(zv));
smart_string_appends(&result, buf);
return result;
case IS_DOUBLE:
snprintf(buf, sizeof(buf), "%.*G", (int) EG(precision), Z_DVAL_P(zv));
smart_string_appends(&result, buf);
return result;
case IS_STRING:
tlen = (limit <= 0 || Z_STRLEN_P(zv) < limit) ? Z_STRLEN_P(zv) : limit;
smart_string_appendl(&result, Z_STRVAL_P(zv), tlen);
if (limit > 0 && Z_STRLEN_P(zv) > limit) {
smart_string_appends(&result, "...");
}
return result;
case IS_ARRAY:
/* TODO more info */
snprintf(buf, sizeof(buf), "array(%d)", zend_hash_num_elements(Z_ARRVAL_P(zv)));
smart_string_appends(&result, buf);
return result;
case IS_OBJECT:
#if PHP_VERSION_ID < 70000
if (Z_OBJ_HANDLER(*zv, get_class_name)) {
Z_OBJ_HANDLER(*zv, get_class_name)(zv, (const char **) &tstr, (zend_uint *) &tlen, 0 TSRMLS_CC);
snprintf(buf, sizeof(buf), "object(%s)#%d", tstr, Z_OBJ_HANDLE_P(zv));
smart_string_appends(&result, buf);
efree(tstr);
} else {
snprintf(buf, sizeof(buf), "object(unkown)#%d", Z_OBJ_HANDLE_P(zv));
smart_string_appends(&result, buf);
}
#else
class_name = Z_OBJ_HANDLER_P(zv, get_class_name)(Z_OBJ_P(zv));
snprintf(buf, sizeof(buf), "object(%s)#%d", MO_STR(class_name), Z_OBJ_HANDLE_P(zv));
smart_string_appends(&result, buf);
zend_string_release(class_name);
#endif
return result;
case IS_RESOURCE:
#if PHP_VERSION_ID < 70000
tstr = (char *) zend_rsrc_list_get_rsrc_type(Z_LVAL_P(zv) TSRMLS_CC);
snprintf(buf, sizeof(buf), "resource(%s)#%d", tstr ? tstr : "Unknown", Z_LVAL_P(zv));
smart_string_appends(&result, buf);
return result;
#else
tstr = (char *) zend_rsrc_list_get_rsrc_type(Z_RES_P(zv) TSRMLS_CC);
snprintf(buf, sizeof(buf), "resource(%s)#%d", tstr ? tstr : "Unknown", Z_RES_P(zv)->handle);
smart_string_appends(&result, buf);
return result;
case IS_UNDEF:
smart_string_appends(&result, "{undef}");
return result;
#endif
default:
smart_string_appends(&result, "{unknown}");
return result;
}
}
/* }}} */
| 31.344681 | 112 | 0.576296 |
6050943983bdc90447cf34b5fc593dcdd13492b5 | 14,290 | html | HTML | src/index.html | proustibat/bowboosh | d1c79f9d94034e2bde14d073a324fbd9ee96afa6 | [
"MIT"
] | null | null | null | src/index.html | proustibat/bowboosh | d1c79f9d94034e2bde14d073a324fbd9ee96afa6 | [
"MIT"
] | null | null | null | src/index.html | proustibat/bowboosh | d1c79f9d94034e2bde14d073a324fbd9ee96afa6 | [
"MIT"
] | null | null | null | <!doctype html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang=""> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Hello Bowboosh - 1.0.0</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="stylesheet" href="outdatedbrowser/outdatedbrowser.min.css">
<link rel="stylesheet" href="css/main.css">
<!--<script src="outdatedbrowser/outdatedbrowser.min.js"></script>-->
<script src="js/vendor/custom-modernizr.js"></script>
</head>
<body>
<!--[if lt IE 8]><p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a
href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p><![endif]-->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span
class="icon-bar"></span> <span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">bowboosh</a>
</div>
<div id="navbar-main" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="download">Documentations <span
class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="download">
<li><a href="docs/javascript/requirejs" target="_blank">JSDoc for this example</a></li>
<li class="divider"></li>
<li><a href="docs/sass" target="_blank">SassDoc</a></li>
<li class="divider"></li>
<li><a href="docs/plato-report" target="_blank">Plato report</a></li>
</ul>
</li>
<li>
<a href="https://github.com/proustibat/bowboosh">Github</a>
</li>
</ul>
</div><!--/.navbar-collapse -->
</div>
</nav>
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container js-jumbotron-container">
<h1>Bowboosh</h1>
<div class="tagcloud">
<p>
<ul>
<li><a><span>Bower</span></a></li>
<li><a><span>Bootstrap</span></a></li>
<li><a><span>Sass</span></a></li>
<li><a><span>Html5 Boilerplate</span></a></li>
<li><a><span>Modernizr</span></a></li>
<li><a><span>Gulp</span></a></li>
<li><a><span>Images optimization</span></a></li>
<li><a><span>Font-awesome</span></a></li>
<li><a><span>JSHint</span></a></li>
<li><a><span>JSDoc</span></a></li>
<li><a><span>SassDoc</span></a></li>
<li><a><span>Plato</span></a></li>
<li><a><span>Bootswatch</span></a></li>
<li><a><span>Require JS</span></a></li>
</ul>
</p>
</div>
</div>
</div>
<div class="container js-requirejs" id="anchor-requirejs">
<h2>Hello, world!</h2>
<p>Simple Require JS App</p>
<div class="row js-modules">
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
<div class="col-md-4 js-module module-require">
<div class="mod-rjs-box">
<h3 class="js-module-title">Title</h3>
<button class="js-button btn btn-default btn-lg" data-toggle="button" data-unclick-text="Unclick Me" data-click-text="Click Me">Click Me</button>
</div>
</div>
</div>
<hr>
<h2>Bootstrap Carousel</h2>
<div class="row">
<div id="carousel-example-generic" class="carousel slide col-md-5 col-centered" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<a href="https://www.instagram.com/p/BIxeFjtDbaj/?taken-by=kalel.cat" target="_blank"> <img
class="center-block"
src="https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/13696792_625720020922731_1134095003_n.jpg"
alt="...">
<div class="carousel-caption">
<h3>Title1</h3>
<p>Coucou</p>
</div>
</a>
</div>
<div class="item">
<a href="https://www.instagram.com/p/BGnAR5WORQo/?taken-by=kalel.cat" target="_blank"> <img
class="center-block"
src="https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/13391209_297716443897362_18795439_n.jpg"
alt="...">
<div class="carousel-caption">
<h3>Title 2</h3>
<p>Coucou</p>
</div>
</a>
</div>
<div class="item">
<a href="https://www.instagram.com/p/BIAHgcLjYFd/?taken-by=kalel.cat" target="_blank"> <img
class="center-block"
src="https://scontent-cdg2-1.cdninstagram.com/t51.2885-15/e35/13732150_1767092343509406_1286453022_n.jpg"
alt="...">
<div class="carousel-caption">
<h3>Title 3</h3>
<p>Coucou</p>
</div>
</a>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span
class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span
class="sr-only">Previous</span> </a> <a class="right carousel-control"
href="#carousel-example-generic" role="button"
data-slide="next"> <span
class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span>
</a>
</div>
</div>
<hr>
<h2>Bootstrap Modal</h2>
<div class="row">
<div class="col-xs-12">
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
Launch demo modal
</button>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
<p>Haec subinde Constantius audiens et quaedam referente Thalassio doctus, quem eum odisse iam conpererat lege communi, scribens ad Caesarem blandius adiumenta paulatim illi subtraxit, sollicitari se simulans ne, uti est militare otium fere tumultuosum, in eius perniciem conspiraret, solisque scholis iussit esse contentum palatinis et protectorum cum Scutariis et Gentilibus, et mandabat Domitiano, ex comite largitionum, praefecto ut cum in Syriam venerit, Gallum, quem crebro acciverat, ad Italiam properare blande hortaretur et verecunde.</p>
<p>In his tractibus navigerum nusquam visitur flumen sed in locis plurimis aquae suapte natura calentes emergunt ad usus aptae multiplicium medelarum. verum has quoque regiones pari sorte Pompeius Iudaeis domitis et Hierosolymis captis in provinciae speciem delata iuris dictione formavit.</p>
<p>Haec ubi latius fama vulgasset missaeque relationes adsiduae Gallum Caesarem permovissent, quoniam magister equitum longius ea tempestate distinebatur, iussus comes orientis Nebridius contractis undique militaribus copiis ad eximendam periculo civitatem amplam et oportunam studio properabat ingenti, quo cognito abscessere latrones nulla re amplius memorabili gesta, dispersique ut solent avia montium petiere celsorum.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<hr>
<h2>Asynchronous module</h2>
<div class="row">
<div class="col-xs-12">
<p><button class="btn btn-default btn-lg js-create-button" data-toggle="button" data-done-text="Done!" data-undone-text="Undone!">Create</button></p>
<p><img src="img/require-dynamically-module.jpg" alt="" class="img-rounded img-responsive"/><p>
<p><img src="img/load-dynamically-modules.gif" alt="" class="img-rounded img-responsive"/><p>
</div>
</div>
<footer>
<p>© <a href="https://github.com/proustibat" target="_blank">Proustibat</a> 2016</p>
</footer>
</div> <!-- /container -->
<div id="outdated"></div>
<!-- Sync custom modules -->
<!--<script data-main="js/requirejs/main.min.js" src="js/vendor/requirejs/require.js"></script>-->
<!-- Async custom modules -->
<script data-main="js/requirejs/config.js" src="js/vendor/requirejs/require.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function ( b, o, i, l, e, r ) {
b.GoogleAnalyticsObject = l;
b[ l ] || (b[ l ] =
function () {
(b[ l ].q = b[ l ].q || []).push( arguments )
});
b[ l ].l = +new Date;
e = o.createElement( i );
r = o.getElementsByTagName( i )[ 0 ];
e.src = '//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore( e, r )
}( window, document, 'script', 'ga' ));
ga( 'create', 'UA-XXXXX-X', 'auto' );
ga( 'send', 'pageview' );
</script>
</body>
</html>
| 49.618056 | 571 | 0.538978 |
39cadc9f869d393f9f7c02566a5d9a8dcd31bb44 | 3,848 | js | JavaScript | JavaScript/7. inherit/inherit.js | tc9011/Front-end-basics | 58ba9e299416a443b32dddc85e018b434f887894 | [
"MIT"
] | null | null | null | JavaScript/7. inherit/inherit.js | tc9011/Front-end-basics | 58ba9e299416a443b32dddc85e018b434f887894 | [
"MIT"
] | null | null | null | JavaScript/7. inherit/inherit.js | tc9011/Front-end-basics | 58ba9e299416a443b32dddc85e018b434f887894 | [
"MIT"
] | null | null | null | // prototype chain inheritance
function Father() {
this.lastName = 't';
this.isHuman = true;
this.card = {
bank: '',
ID: ''
};
}
var father = new Father();
console.log(father.isHuman); // t
console.log(father.lastName); // true
function Son() {
this.firstName = 'c';
}
Son.prototype = new Father();
var son = new Son();
console.log(son.lastName); // t
console.log(son.isHuman); // true
console.log(son.firstName); // c
son.card.bank = 'BOC';
var son2 = new Son();
console.log(son2.card.bank); // BOC
// constructor inheritance
function Father(name) {
this.lastName = name;
this.isHuman = true;
this.card = {
bank: 'ICBC',
};
}
function Son() {
this.firstName = 'c';
Father.call(this, 't');
}
var son = new Son();
console.log(son.card.bank); // 'ICBC'
console.log(son.lastName); // t
son.card.bank = 'BOC';
console.log(son.card.bank); // 'BOC'
var son2 = new Son();
console.log(son2.card.bank); // 'ICBC'
// classic inheritance
function Father(name) {
this.name = name;
this.isHuman = true;
this.card = {
bank: 'ICBC',
};
}
Father.prototype.getName = function () {
console.log(this.name);
};
function Son(name) {
Father.call(this, name);
}
Son.prototype = new Father();
var son = new Son('tc');
console.log(son.isHuman); // true
console.log(son.name); // tc
son.getName(); // tc
console.log(son.card.bank); // ICBC
son.card.bank = 'BOC';
console.log(son.card.bank); // BOC
var son2 = new Son('zj');
console.log(son2.isHuman); // true
console.log(son2.name); // zj
son2.getName(); // zj
console.log(son2.card.bank); // ICBC
// inherit with `Object.create()`
var person = {
name: 'tc',
friend: ['a', 'b', 'c']
};
var anotherPerson = Object.create(person);
anotherPerson.name = 'zz';
anotherPerson.friend.push('d');
console.log(anotherPerson.friend); // [ 'a', 'b', 'c', 'd' ]
var yetAnotherPerson = Object.create(person);
yetAnotherPerson.name = 'jj';
yetAnotherPerson.friend.push('e');
console.log(yetAnotherPerson.friend); // [ 'a', 'b', 'c', 'd', 'e' ]
console.log(person.friend); // [ "a", "b", "c", "d", "e" ]
// parasitic inheritance
var person = {
name: 'tc',
friend: ['a', 'b', 'c']
};
function createAnother(original) {
var clone = Object.create(original);
clone.sayHi = function () {
console.log('hi')
};
return clone;
}
var anotherPerson = createAnother(person);
anotherPerson.sayHi(); // hi
// combined parasitic inheritance
function inheritPrototype(Son, Father) {
var prototype = Object.create(Father.prototype); // create object
prototype.constructor = Son;
Son.prototype = prototype;
}
function Father(name) {
this.name = name;
this.colors = ['red','blue','green'];
}
Father.prototype.sayName = function () {
console.log(this.name);
};
function Son(name, age) {
Father.call(this,name);
this.age = age;
}
inheritPrototype(Son, Father);
Son.prototype.sayAge = function () {
console.log(this.age);
};
var son = new Son('a', 11);
console.log(son.name); // a
console.log(son.colors); // [ 'red', 'blue', 'green' ]
son.sayAge(); // 11
son.sayName(); // a | 21.988571 | 88 | 0.510655 |
404dae929001036bd6fb7eaafdbc8bd64f86a444 | 5,213 | py | Python | pysoftNLP/kashgari/embeddings/word_embedding.py | xiaokai01/pysoftNLP | b1d7dc50a2c5a9d1efbc9ce6f497a768ae173a7f | [
"MIT"
] | 1 | 2021-05-02T10:32:35.000Z | 2021-05-02T10:32:35.000Z | pysoftNLP/kashgari/embeddings/word_embedding.py | xiaokai01/pysoftNLP | b1d7dc50a2c5a9d1efbc9ce6f497a768ae173a7f | [
"MIT"
] | null | null | null | pysoftNLP/kashgari/embeddings/word_embedding.py | xiaokai01/pysoftNLP | b1d7dc50a2c5a9d1efbc9ce6f497a768ae173a7f | [
"MIT"
] | null | null | null | # encoding: utf-8
# author: BrikerMan
# contact: eliyar917@gmail.com
# blog: https://eliyar.biz
# file: w2v_embedding.py
# time: 2019-05-20 17:32
import logging
from typing import Union, Optional, Dict, Any, List, Tuple
import numpy as np
from gensim.models import KeyedVectors
from tensorflow import keras
from pysoftNLP.kashgari.embeddings.base_embedding import Embedding
from pysoftNLP.kashgari.processors.base_processor import BaseProcessor
L = keras.layers
class WordEmbedding(Embedding):
"""Pre-trained word2vec embedding"""
def info(self):
info = super(WordEmbedding, self).info()
info['config'] = {
'w2v_path': self.w2v_path,
'w2v_kwargs': self.w2v_kwargs,
'sequence_length': self.sequence_length
}
return info
def __init__(self,
w2v_path: str,
task: str = None,
w2v_kwargs: Dict[str, Any] = None,
sequence_length: Union[Tuple[int, ...], str, int] = 'auto',
processor: Optional[BaseProcessor] = None,
from_saved_model: bool = False):
"""
Args:
task:
w2v_path: word2vec file path
w2v_kwargs: params pass to the ``load_word2vec_format()`` function of ``gensim.models.KeyedVectors`` -
https://radimrehurek.com/gensim/models/keyedvectors.html#module-gensim.models.keyedvectors
sequence_length: ``'auto'``, ``'variable'`` or integer. When using ``'auto'``, use the 95% of corpus length
as sequence length. When using ``'variable'``, model input shape will set to None, which can handle
various length of input, it will use the length of max sequence in every batch for sequence length.
If using an integer, let's say ``50``, the input output sequence length will set to 50.
processor:
"""
if w2v_kwargs is None:
w2v_kwargs = {}
self.w2v_path = w2v_path
self.w2v_kwargs = w2v_kwargs
self.w2v_model_loaded = False
super(WordEmbedding, self).__init__(task=task,
sequence_length=sequence_length,
embedding_size=0,
processor=processor,
from_saved_model=from_saved_model)
if not from_saved_model:
self._build_token2idx_from_w2v()
if self.sequence_length != 'auto':
self._build_model()
def _build_token2idx_from_w2v(self):
w2v = KeyedVectors.load_word2vec_format(self.w2v_path, **self.w2v_kwargs)
token2idx = {
self.processor.token_pad: 0,
self.processor.token_unk: 1,
self.processor.token_bos: 2,
self.processor.token_eos: 3
}
for token in w2v.index2word:
token2idx[token] = len(token2idx)
vector_matrix = np.zeros((len(token2idx), w2v.vector_size))
vector_matrix[1] = np.random.rand(w2v.vector_size)
vector_matrix[4:] = w2v.vectors
self.embedding_size = w2v.vector_size
self.w2v_vector_matrix = vector_matrix
self.w2v_token2idx = token2idx
self.w2v_top_words = w2v.index2entity[:50]
self.w2v_model_loaded = True
self.processor.token2idx = self.w2v_token2idx
self.processor.idx2token = dict([(value, key) for key, value in self.w2v_token2idx.items()])
logging.debug('------------------------------------------------')
logging.debug('Loaded gensim word2vec model')
logging.debug('model : {}'.format(self.w2v_path))
logging.debug('word count : {}'.format(len(self.w2v_vector_matrix)))
logging.debug('Top 50 word : {}'.format(self.w2v_top_words))
logging.debug('------------------------------------------------')
def _build_model(self, **kwargs):
if self.token_count == 0:
logging.debug('need to build after build_word2idx')
else:
input_tensor = L.Input(shape=(self.sequence_length,),
name=f'input')
layer_embedding = L.Embedding(self.token_count,
self.embedding_size,
weights=[self.w2v_vector_matrix],
trainable=False,
name=f'layer_embedding')
embedded_tensor = layer_embedding(input_tensor)
self.embed_model = keras.Model(input_tensor, embedded_tensor)
def analyze_corpus(self,
x: Union[Tuple[List[List[str]], ...], List[List[str]]],
y: Union[List[List[Any]], List[Any]]):
"""
Prepare embedding layer and pre-processor for labeling task
Args:
x:
y:
Returns:
"""
if not self.w2v_model_loaded:
self._build_token2idx_from_w2v()
super(WordEmbedding, self).analyze_corpus(x, y)
if __name__ == "__main__":
print('hello world')
| 37.503597 | 119 | 0.567044 |
bcbdeed076feb6d35baafa8510638704f681698f | 1,748 | js | JavaScript | lib/stateTransition/StateTransitionFactory.js | jawid-h/js-dpp | 47ae40331054a80569a4fe50ce7821f9636c2377 | [
"MIT"
] | null | null | null | lib/stateTransition/StateTransitionFactory.js | jawid-h/js-dpp | 47ae40331054a80569a4fe50ce7821f9636c2377 | [
"MIT"
] | null | null | null | lib/stateTransition/StateTransitionFactory.js | jawid-h/js-dpp | 47ae40331054a80569a4fe50ce7821f9636c2377 | [
"MIT"
] | null | null | null | const { decode } = require('../util/serializer');
const InvalidStateTransitionError = require('./errors/InvalidStateTransitionError');
class StateTransitionFactory {
/**
* @param {validateStateTransitionStructure} validateStateTransitionStructure
* @param {createStateTransition} createStateTransition
*/
constructor(validateStateTransitionStructure, createStateTransition) {
this.validateStateTransitionStructure = validateStateTransitionStructure;
this.createStateTransition = createStateTransition;
}
/**
* Create State Transition from plain object
*
* @param {RawDataContractStateTransition|RawDocumentsStateTransition} rawStateTransition
* @param {Object} options
* @param {boolean} [options.skipValidation=false]
* @return {DataContractStateTransition|DocumentsStateTransition}
*/
async createFromObject(rawStateTransition, options = {}) {
const opts = Object.assign({ skipValidation: false }, options);
if (!opts.skipValidation) {
const result = await this.validateStateTransitionStructure(rawStateTransition);
if (!result.isValid()) {
throw new InvalidStateTransitionError(result.getErrors(), rawStateTransition);
}
}
return this.createStateTransition(rawStateTransition);
}
/**
* Create State Transition from string/buffer
*
* @param {Buffer|string} payload
* @param {Object} options
* @param {boolean} [options.skipValidation=false]
* @return {DataContractStateTransition|DocumentsStateTransition}
*/
async createFromSerialized(payload, options = { }) {
const rawStateTransition = decode(payload);
return this.createFromObject(rawStateTransition, options);
}
}
module.exports = StateTransitionFactory;
| 32.981132 | 91 | 0.745995 |
7004367efc4680d71a5e643113e455031c7f9fbc | 2,753 | kt | Kotlin | katexview/src/main/java/com/judemanutd/katexview/KatexView.kt | kalpgurutech/KaTeXView | a9c13dd52fa18e68efe892f8f9ac46e013963428 | [
"MIT"
] | 39 | 2019-08-27T14:10:19.000Z | 2021-12-19T05:34:55.000Z | katexview/src/main/java/com/judemanutd/katexview/KatexView.kt | kalpgurutech/KaTeXView | a9c13dd52fa18e68efe892f8f9ac46e013963428 | [
"MIT"
] | 7 | 2019-06-05T07:14:55.000Z | 2021-03-13T10:12:51.000Z | katexview/src/main/java/com/judemanutd/katexview/KatexView.kt | kalpgurutech/KaTeXView | a9c13dd52fa18e68efe892f8f9ac46e013963428 | [
"MIT"
] | 9 | 2019-09-06T22:03:05.000Z | 2022-02-28T11:40:33.000Z | package com.judemanutd.katexview
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Color
import android.util.AttributeSet
import android.webkit.WebSettings
import android.webkit.WebView
import com.x5.template.Chunk
import com.x5.template.Theme
import com.x5.template.providers.AndroidTemplates
import androidx.core.content.ContextCompat
@SuppressLint("SetJavaScriptEnabled")
class KatexView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) :
WebView(context, attrs, defStyleAttr) {
private val TAG_FORMULA: String = "formula"
private val TAG_TEXT_COLOR: String = "textColor"
private var mText: String? = null
//TODO: pick theme set text color
private var mTextColor: Int = android.R.color.holo_purple
init {
settings.allowFileAccess = true
settings.javaScriptEnabled = true
settings.cacheMode = WebSettings.LOAD_NO_CACHE
settings.displayZoomControls = false
settings.builtInZoomControls = false
settings.setSupportZoom(false)
settings.useWideViewPort = false
setBackgroundColor(Color.TRANSPARENT);
val mTypeArray = context.obtainStyledAttributes(attrs, R.styleable.KatexView, 0, 0)
try {
setTextColor(
mTypeArray.getColor(
R.styleable.KatexView_textColor,
ContextCompat.getColor(getContext(), android.R.color.black)
)
)
val text: String? = mTypeArray.getString(R.styleable.KatexView_text)
if (text != null)
setText(text)
} finally {
mTypeArray.recycle()
}
}
fun setText(text: String) {
mText = text
loadData()
}
fun setTextColor(color: Int) {
this.mTextColor = color
loadData()
}
fun getText(): String? {
return mText
}
private fun loadData() {
if (mText != null) {
val chunk: Chunk = getChunk()
chunk.set(TAG_FORMULA, mText)
chunk.set(TAG_TEXT_COLOR, getHexColor(mTextColor))
this.loadDataWithBaseURL(null, chunk.toString(), "text/html", "utf-8", "about:blank")
}
}
private fun getChunk(): Chunk {
val loader = AndroidTemplates(context)
return Theme(loader).makeChunk("katex")
}
private fun getHexColor(intColor: Int): String {
//Android and javascript color format differ javascript support Hex color,
// so the android color which user sets is converted to hexcolor to replicate the same in javascript.
return String.format("#%06X", 0xFFFFFF and intColor)
}
} | 29.287234 | 109 | 0.64911 |
71bbc6b8880adbe8de9bc0d28c8699814a8e2206 | 171 | ts | TypeScript | ts/appConfig.ts | isabellabeltran/webpack | d38801341643fb489c631538107a615531a3af67 | [
"MIT"
] | null | null | null | ts/appConfig.ts | isabellabeltran/webpack | d38801341643fb489c631538107a615531a3af67 | [
"MIT"
] | null | null | null | ts/appConfig.ts | isabellabeltran/webpack | d38801341643fb489c631538107a615531a3af67 | [
"MIT"
] | null | null | null | const appConfig = require('appConfig');
function print(prop: string) {
console.log(prop);
};
print(appConfig.app.owner);
print(appConfig.app.leadDev.name);
//print(2); | 19 | 39 | 0.719298 |
7b6f5344ad3a8bf06f6a385670c0b017bf2d6f3b | 111,906 | rb | Ruby | lib/intersight_client/api/chassis_api.rb | xlab-si/intersight-sdk-ruby | 45ec426b9d061502166499a755ac119058002972 | [
"Apache-2.0"
] | 3 | 2022-01-06T12:47:34.000Z | 2022-02-09T12:43:42.000Z | lib/intersight_client/api/chassis_api.rb | xlab-si/intersight-sdk-ruby | 45ec426b9d061502166499a755ac119058002972 | [
"Apache-2.0"
] | null | null | null | lib/intersight_client/api/chassis_api.rb | xlab-si/intersight-sdk-ruby | 45ec426b9d061502166499a755ac119058002972 | [
"Apache-2.0"
] | null | null | null | =begin
#Cisco Intersight
#Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advanced ways than the prior generations of tools. Cisco Intersight provides an integrated and intuitive management experience for resources in the traditional data center as well as at the edge. With flexible deployment options to address complex security needs, getting started with Intersight is quick and easy. Cisco Intersight has deep integration with Cisco UCS and HyperFlex systems allowing for remote deployment, configuration, and ongoing maintenance. The model-based deployment works for a single system in a remote location or hundreds of systems in a data center and enables rapid, standardized configuration and deployment. It also streamlines maintaining those systems whether you are working with small or very large configurations. The Intersight OpenAPI document defines the complete set of properties that are returned in the HTTP response. From that perspective, a client can expect that no additional properties are returned, unless these properties are explicitly defined in the OpenAPI document. However, when a client uses an older version of the Intersight OpenAPI document, the server may send additional properties because the software is more recent than the client. In that case, the client may receive properties that it does not know about. Some generated SDKs perform a strict validation of the HTTP response body against the OpenAPI document. This document was created on 2021-10-20T11:22:53Z.
The version of the OpenAPI document: 1.0.9-4870
Contact: intersight@cisco.com
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 5.3.1
=end
require 'cgi'
module IntersightClient
class ChassisApi
attr_accessor :api_client
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
# Create a 'chassis.ConfigImport' resource.
# @param chassis_config_import [ChassisConfigImport] The 'chassis.ConfigImport' resource to create.
# @param [Hash] opts the optional parameters
# @option opts [String] :if_match For methods that apply server-side changes, and in particular for PUT, If-Match can be used to prevent the lost update problem. It can check if the modification of a resource that the user wants to upload will not override another change that has been done since the original resource was fetched. If the request cannot be fulfilled, the 412 (Precondition Failed) response is returned. When modifying a resource using POST or PUT, the If-Match header must be set to the value of the resource ModTime property after which no lost update problem should occur. For example, a client send a GET request to obtain a resource, which includes the ModTime property. The ModTime indicates the last time the resource was created or modified. The client then sends a POST or PUT request with the If-Match header set to the ModTime property of the resource as obtained in the GET request.
# @option opts [String] :if_none_match For methods that apply server-side changes, If-None-Match used with the * value can be used to create a resource not known to exist, guaranteeing that another resource creation didn't happen before, losing the data of the previous put. The request will be processed only if the eventually existing resource's ETag doesn't match any of the values listed. Otherwise, the status code 412 (Precondition Failed) is used. The asterisk is a special value representing any resource. It is only useful when creating a resource, usually with PUT, to check if another resource with the identity has already been created before. The comparison with the stored ETag uses the weak comparison algorithm, meaning two resources are considered identical if the content is equivalent - they don't have to be identical byte for byte.
# @return [ChassisConfigImport]
def create_chassis_config_import(chassis_config_import, opts = {})
data, _status_code, _headers = create_chassis_config_import_with_http_info(chassis_config_import, opts)
data
end
# Create a 'chassis.ConfigImport' resource.
# @param chassis_config_import [ChassisConfigImport] The 'chassis.ConfigImport' resource to create.
# @param [Hash] opts the optional parameters
# @option opts [String] :if_match For methods that apply server-side changes, and in particular for PUT, If-Match can be used to prevent the lost update problem. It can check if the modification of a resource that the user wants to upload will not override another change that has been done since the original resource was fetched. If the request cannot be fulfilled, the 412 (Precondition Failed) response is returned. When modifying a resource using POST or PUT, the If-Match header must be set to the value of the resource ModTime property after which no lost update problem should occur. For example, a client send a GET request to obtain a resource, which includes the ModTime property. The ModTime indicates the last time the resource was created or modified. The client then sends a POST or PUT request with the If-Match header set to the ModTime property of the resource as obtained in the GET request.
# @option opts [String] :if_none_match For methods that apply server-side changes, If-None-Match used with the * value can be used to create a resource not known to exist, guaranteeing that another resource creation didn't happen before, losing the data of the previous put. The request will be processed only if the eventually existing resource's ETag doesn't match any of the values listed. Otherwise, the status code 412 (Precondition Failed) is used. The asterisk is a special value representing any resource. It is only useful when creating a resource, usually with PUT, to check if another resource with the identity has already been created before. The comparison with the stored ETag uses the weak comparison algorithm, meaning two resources are considered identical if the content is equivalent - they don't have to be identical byte for byte.
# @return [Array<(ChassisConfigImport, Integer, Hash)>] ChassisConfigImport data, response status code and response headers
def create_chassis_config_import_with_http_info(chassis_config_import, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.create_chassis_config_import ...'
end
# verify the required parameter 'chassis_config_import' is set
if @api_client.config.client_side_validation && chassis_config_import.nil?
fail ArgumentError, "Missing the required parameter 'chassis_config_import' when calling ChassisApi.create_chassis_config_import"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigImports'
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(chassis_config_import)
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigImport'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.create_chassis_config_import",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#create_chassis_config_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Create a 'chassis.Profile' resource.
# @param chassis_profile [ChassisProfile] The 'chassis.Profile' resource to create.
# @param [Hash] opts the optional parameters
# @option opts [String] :if_match For methods that apply server-side changes, and in particular for PUT, If-Match can be used to prevent the lost update problem. It can check if the modification of a resource that the user wants to upload will not override another change that has been done since the original resource was fetched. If the request cannot be fulfilled, the 412 (Precondition Failed) response is returned. When modifying a resource using POST or PUT, the If-Match header must be set to the value of the resource ModTime property after which no lost update problem should occur. For example, a client send a GET request to obtain a resource, which includes the ModTime property. The ModTime indicates the last time the resource was created or modified. The client then sends a POST or PUT request with the If-Match header set to the ModTime property of the resource as obtained in the GET request.
# @option opts [String] :if_none_match For methods that apply server-side changes, If-None-Match used with the * value can be used to create a resource not known to exist, guaranteeing that another resource creation didn't happen before, losing the data of the previous put. The request will be processed only if the eventually existing resource's ETag doesn't match any of the values listed. Otherwise, the status code 412 (Precondition Failed) is used. The asterisk is a special value representing any resource. It is only useful when creating a resource, usually with PUT, to check if another resource with the identity has already been created before. The comparison with the stored ETag uses the weak comparison algorithm, meaning two resources are considered identical if the content is equivalent - they don't have to be identical byte for byte.
# @return [ChassisProfile]
def create_chassis_profile(chassis_profile, opts = {})
data, _status_code, _headers = create_chassis_profile_with_http_info(chassis_profile, opts)
data
end
# Create a 'chassis.Profile' resource.
# @param chassis_profile [ChassisProfile] The 'chassis.Profile' resource to create.
# @param [Hash] opts the optional parameters
# @option opts [String] :if_match For methods that apply server-side changes, and in particular for PUT, If-Match can be used to prevent the lost update problem. It can check if the modification of a resource that the user wants to upload will not override another change that has been done since the original resource was fetched. If the request cannot be fulfilled, the 412 (Precondition Failed) response is returned. When modifying a resource using POST or PUT, the If-Match header must be set to the value of the resource ModTime property after which no lost update problem should occur. For example, a client send a GET request to obtain a resource, which includes the ModTime property. The ModTime indicates the last time the resource was created or modified. The client then sends a POST or PUT request with the If-Match header set to the ModTime property of the resource as obtained in the GET request.
# @option opts [String] :if_none_match For methods that apply server-side changes, If-None-Match used with the * value can be used to create a resource not known to exist, guaranteeing that another resource creation didn't happen before, losing the data of the previous put. The request will be processed only if the eventually existing resource's ETag doesn't match any of the values listed. Otherwise, the status code 412 (Precondition Failed) is used. The asterisk is a special value representing any resource. It is only useful when creating a resource, usually with PUT, to check if another resource with the identity has already been created before. The comparison with the stored ETag uses the weak comparison algorithm, meaning two resources are considered identical if the content is equivalent - they don't have to be identical byte for byte.
# @return [Array<(ChassisProfile, Integer, Hash)>] ChassisProfile data, response status code and response headers
def create_chassis_profile_with_http_info(chassis_profile, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.create_chassis_profile ...'
end
# verify the required parameter 'chassis_profile' is set
if @api_client.config.client_side_validation && chassis_profile.nil?
fail ArgumentError, "Missing the required parameter 'chassis_profile' when calling ChassisApi.create_chassis_profile"
end
# resource path
local_var_path = '/api/v1/chassis/Profiles'
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(chassis_profile)
# return_type
return_type = opts[:debug_return_type] || 'ChassisProfile'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.create_chassis_profile",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#create_chassis_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Delete a 'chassis.Profile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [nil]
def delete_chassis_profile(moid, opts = {})
delete_chassis_profile_with_http_info(moid, opts)
nil
end
# Delete a 'chassis.Profile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def delete_chassis_profile_with_http_info(moid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.delete_chassis_profile ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.delete_chassis_profile"
end
# resource path
local_var_path = '/api/v1/chassis/Profiles/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type]
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.delete_chassis_profile",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#delete_chassis_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.ConfigChangeDetail' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [ChassisConfigChangeDetail]
def get_chassis_config_change_detail_by_moid(moid, opts = {})
data, _status_code, _headers = get_chassis_config_change_detail_by_moid_with_http_info(moid, opts)
data
end
# Read a 'chassis.ConfigChangeDetail' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [Array<(ChassisConfigChangeDetail, Integer, Hash)>] ChassisConfigChangeDetail data, response status code and response headers
def get_chassis_config_change_detail_by_moid_with_http_info(moid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_config_change_detail_by_moid ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.get_chassis_config_change_detail_by_moid"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigChangeDetails/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigChangeDetail'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_config_change_detail_by_moid",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_config_change_detail_by_moid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.ConfigChangeDetail' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false). (default to '')
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response. (default to 100)
# @option opts [Integer] :skip Specifies the number of resources to skip in the response. (default to 0)
# @option opts [String] :select Specifies a subset of properties to return. (default to '')
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response. (default to 'allpages')
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [ChassisConfigChangeDetailResponse]
def get_chassis_config_change_detail_list(opts = {})
data, _status_code, _headers = get_chassis_config_change_detail_list_with_http_info(opts)
data
end
# Read a 'chassis.ConfigChangeDetail' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false).
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response.
# @option opts [Integer] :skip Specifies the number of resources to skip in the response.
# @option opts [String] :select Specifies a subset of properties to return.
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response.
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [Array<(ChassisConfigChangeDetailResponse, Integer, Hash)>] ChassisConfigChangeDetailResponse data, response status code and response headers
def get_chassis_config_change_detail_list_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_config_change_detail_list ...'
end
allowable_values = ["allpages", "none"]
if @api_client.config.client_side_validation && opts[:'inlinecount'] && !allowable_values.include?(opts[:'inlinecount'])
fail ArgumentError, "invalid value for \"inlinecount\", must be one of #{allowable_values}"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigChangeDetails'
# query parameters
query_params = opts[:query_params] || {}
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
query_params[:'$inlinecount'] = opts[:'inlinecount'] if !opts[:'inlinecount'].nil?
query_params[:'at'] = opts[:'at'] if !opts[:'at'].nil?
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigChangeDetailResponse'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_config_change_detail_list",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_config_change_detail_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.ConfigImport' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [ChassisConfigImport]
def get_chassis_config_import_by_moid(moid, opts = {})
data, _status_code, _headers = get_chassis_config_import_by_moid_with_http_info(moid, opts)
data
end
# Read a 'chassis.ConfigImport' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [Array<(ChassisConfigImport, Integer, Hash)>] ChassisConfigImport data, response status code and response headers
def get_chassis_config_import_by_moid_with_http_info(moid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_config_import_by_moid ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.get_chassis_config_import_by_moid"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigImports/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigImport'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_config_import_by_moid",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_config_import_by_moid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.ConfigImport' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false). (default to '')
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response. (default to 100)
# @option opts [Integer] :skip Specifies the number of resources to skip in the response. (default to 0)
# @option opts [String] :select Specifies a subset of properties to return. (default to '')
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response. (default to 'allpages')
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [ChassisConfigImportResponse]
def get_chassis_config_import_list(opts = {})
data, _status_code, _headers = get_chassis_config_import_list_with_http_info(opts)
data
end
# Read a 'chassis.ConfigImport' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false).
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response.
# @option opts [Integer] :skip Specifies the number of resources to skip in the response.
# @option opts [String] :select Specifies a subset of properties to return.
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response.
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [Array<(ChassisConfigImportResponse, Integer, Hash)>] ChassisConfigImportResponse data, response status code and response headers
def get_chassis_config_import_list_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_config_import_list ...'
end
allowable_values = ["allpages", "none"]
if @api_client.config.client_side_validation && opts[:'inlinecount'] && !allowable_values.include?(opts[:'inlinecount'])
fail ArgumentError, "invalid value for \"inlinecount\", must be one of #{allowable_values}"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigImports'
# query parameters
query_params = opts[:query_params] || {}
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
query_params[:'$inlinecount'] = opts[:'inlinecount'] if !opts[:'inlinecount'].nil?
query_params[:'at'] = opts[:'at'] if !opts[:'at'].nil?
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigImportResponse'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_config_import_list",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_config_import_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.ConfigResult' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [ChassisConfigResult]
def get_chassis_config_result_by_moid(moid, opts = {})
data, _status_code, _headers = get_chassis_config_result_by_moid_with_http_info(moid, opts)
data
end
# Read a 'chassis.ConfigResult' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [Array<(ChassisConfigResult, Integer, Hash)>] ChassisConfigResult data, response status code and response headers
def get_chassis_config_result_by_moid_with_http_info(moid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_config_result_by_moid ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.get_chassis_config_result_by_moid"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigResults/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigResult'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_config_result_by_moid",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_config_result_by_moid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.ConfigResultEntry' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [ChassisConfigResultEntry]
def get_chassis_config_result_entry_by_moid(moid, opts = {})
data, _status_code, _headers = get_chassis_config_result_entry_by_moid_with_http_info(moid, opts)
data
end
# Read a 'chassis.ConfigResultEntry' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [Array<(ChassisConfigResultEntry, Integer, Hash)>] ChassisConfigResultEntry data, response status code and response headers
def get_chassis_config_result_entry_by_moid_with_http_info(moid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_config_result_entry_by_moid ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.get_chassis_config_result_entry_by_moid"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigResultEntries/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigResultEntry'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_config_result_entry_by_moid",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_config_result_entry_by_moid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.ConfigResultEntry' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false). (default to '')
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response. (default to 100)
# @option opts [Integer] :skip Specifies the number of resources to skip in the response. (default to 0)
# @option opts [String] :select Specifies a subset of properties to return. (default to '')
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response. (default to 'allpages')
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [ChassisConfigResultEntryResponse]
def get_chassis_config_result_entry_list(opts = {})
data, _status_code, _headers = get_chassis_config_result_entry_list_with_http_info(opts)
data
end
# Read a 'chassis.ConfigResultEntry' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false).
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response.
# @option opts [Integer] :skip Specifies the number of resources to skip in the response.
# @option opts [String] :select Specifies a subset of properties to return.
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response.
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [Array<(ChassisConfigResultEntryResponse, Integer, Hash)>] ChassisConfigResultEntryResponse data, response status code and response headers
def get_chassis_config_result_entry_list_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_config_result_entry_list ...'
end
allowable_values = ["allpages", "none"]
if @api_client.config.client_side_validation && opts[:'inlinecount'] && !allowable_values.include?(opts[:'inlinecount'])
fail ArgumentError, "invalid value for \"inlinecount\", must be one of #{allowable_values}"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigResultEntries'
# query parameters
query_params = opts[:query_params] || {}
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
query_params[:'$inlinecount'] = opts[:'inlinecount'] if !opts[:'inlinecount'].nil?
query_params[:'at'] = opts[:'at'] if !opts[:'at'].nil?
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigResultEntryResponse'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_config_result_entry_list",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_config_result_entry_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.ConfigResult' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false). (default to '')
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response. (default to 100)
# @option opts [Integer] :skip Specifies the number of resources to skip in the response. (default to 0)
# @option opts [String] :select Specifies a subset of properties to return. (default to '')
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response. (default to 'allpages')
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [ChassisConfigResultResponse]
def get_chassis_config_result_list(opts = {})
data, _status_code, _headers = get_chassis_config_result_list_with_http_info(opts)
data
end
# Read a 'chassis.ConfigResult' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false).
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response.
# @option opts [Integer] :skip Specifies the number of resources to skip in the response.
# @option opts [String] :select Specifies a subset of properties to return.
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response.
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [Array<(ChassisConfigResultResponse, Integer, Hash)>] ChassisConfigResultResponse data, response status code and response headers
def get_chassis_config_result_list_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_config_result_list ...'
end
allowable_values = ["allpages", "none"]
if @api_client.config.client_side_validation && opts[:'inlinecount'] && !allowable_values.include?(opts[:'inlinecount'])
fail ArgumentError, "invalid value for \"inlinecount\", must be one of #{allowable_values}"
end
# resource path
local_var_path = '/api/v1/chassis/ConfigResults'
# query parameters
query_params = opts[:query_params] || {}
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
query_params[:'$inlinecount'] = opts[:'inlinecount'] if !opts[:'inlinecount'].nil?
query_params[:'at'] = opts[:'at'] if !opts[:'at'].nil?
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisConfigResultResponse'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_config_result_list",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_config_result_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.IomProfile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [ChassisIomProfile]
def get_chassis_iom_profile_by_moid(moid, opts = {})
data, _status_code, _headers = get_chassis_iom_profile_by_moid_with_http_info(moid, opts)
data
end
# Read a 'chassis.IomProfile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [Array<(ChassisIomProfile, Integer, Hash)>] ChassisIomProfile data, response status code and response headers
def get_chassis_iom_profile_by_moid_with_http_info(moid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_iom_profile_by_moid ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.get_chassis_iom_profile_by_moid"
end
# resource path
local_var_path = '/api/v1/chassis/IomProfiles/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisIomProfile'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_iom_profile_by_moid",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_iom_profile_by_moid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.IomProfile' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false). (default to '')
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response. (default to 100)
# @option opts [Integer] :skip Specifies the number of resources to skip in the response. (default to 0)
# @option opts [String] :select Specifies a subset of properties to return. (default to '')
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response. (default to 'allpages')
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [ChassisIomProfileResponse]
def get_chassis_iom_profile_list(opts = {})
data, _status_code, _headers = get_chassis_iom_profile_list_with_http_info(opts)
data
end
# Read a 'chassis.IomProfile' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false).
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response.
# @option opts [Integer] :skip Specifies the number of resources to skip in the response.
# @option opts [String] :select Specifies a subset of properties to return.
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response.
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [Array<(ChassisIomProfileResponse, Integer, Hash)>] ChassisIomProfileResponse data, response status code and response headers
def get_chassis_iom_profile_list_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_iom_profile_list ...'
end
allowable_values = ["allpages", "none"]
if @api_client.config.client_side_validation && opts[:'inlinecount'] && !allowable_values.include?(opts[:'inlinecount'])
fail ArgumentError, "invalid value for \"inlinecount\", must be one of #{allowable_values}"
end
# resource path
local_var_path = '/api/v1/chassis/IomProfiles'
# query parameters
query_params = opts[:query_params] || {}
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
query_params[:'$inlinecount'] = opts[:'inlinecount'] if !opts[:'inlinecount'].nil?
query_params[:'at'] = opts[:'at'] if !opts[:'at'].nil?
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisIomProfileResponse'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_iom_profile_list",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_iom_profile_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.Profile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [ChassisProfile]
def get_chassis_profile_by_moid(moid, opts = {})
data, _status_code, _headers = get_chassis_profile_by_moid_with_http_info(moid, opts)
data
end
# Read a 'chassis.Profile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param [Hash] opts the optional parameters
# @return [Array<(ChassisProfile, Integer, Hash)>] ChassisProfile data, response status code and response headers
def get_chassis_profile_by_moid_with_http_info(moid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_profile_by_moid ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.get_chassis_profile_by_moid"
end
# resource path
local_var_path = '/api/v1/chassis/Profiles/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisProfile'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_profile_by_moid",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_profile_by_moid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Read a 'chassis.Profile' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false). (default to '')
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response. (default to 100)
# @option opts [Integer] :skip Specifies the number of resources to skip in the response. (default to 0)
# @option opts [String] :select Specifies a subset of properties to return. (default to '')
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response. (default to 'allpages')
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [ChassisProfileResponse]
def get_chassis_profile_list(opts = {})
data, _status_code, _headers = get_chassis_profile_list_with_http_info(opts)
data
end
# Read a 'chassis.Profile' resource.
# @param [Hash] opts the optional parameters
# @option opts [String] :filter Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false).
# @option opts [String] :orderby Determines what properties are used to sort the collection of resources.
# @option opts [Integer] :top Specifies the maximum number of resources to return in the response.
# @option opts [Integer] :skip Specifies the number of resources to skip in the response.
# @option opts [String] :select Specifies a subset of properties to return.
# @option opts [String] :expand Specify additional attributes or related resources to return in addition to the primary resources.
# @option opts [String] :apply Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set.
# @option opts [Boolean] :count The $count query specifies the service should return the count of the matching resources, instead of returning the resources.
# @option opts [String] :inlinecount The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response.
# @option opts [String] :at Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section.
# @option opts [String] :tags The 'tags' parameter is used to request a summary of the Tag utilization for this resource. When the 'tags' parameter is specified, the response provides a list of tag keys, the number of times the key has been used across all documents, and the tag values that have been assigned to the tag key.
# @return [Array<(ChassisProfileResponse, Integer, Hash)>] ChassisProfileResponse data, response status code and response headers
def get_chassis_profile_list_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.get_chassis_profile_list ...'
end
allowable_values = ["allpages", "none"]
if @api_client.config.client_side_validation && opts[:'inlinecount'] && !allowable_values.include?(opts[:'inlinecount'])
fail ArgumentError, "invalid value for \"inlinecount\", must be one of #{allowable_values}"
end
# resource path
local_var_path = '/api/v1/chassis/Profiles'
# query parameters
query_params = opts[:query_params] || {}
query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
query_params[:'$apply'] = opts[:'apply'] if !opts[:'apply'].nil?
query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
query_params[:'$inlinecount'] = opts[:'inlinecount'] if !opts[:'inlinecount'].nil?
query_params[:'at'] = opts[:'at'] if !opts[:'at'].nil?
query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body]
# return_type
return_type = opts[:debug_return_type] || 'ChassisProfileResponse'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.get_chassis_profile_list",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#get_chassis_profile_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Update a 'chassis.Profile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param chassis_profile [ChassisProfile] The 'chassis.Profile' resource to update.
# @param [Hash] opts the optional parameters
# @option opts [String] :if_match For methods that apply server-side changes, and in particular for PUT, If-Match can be used to prevent the lost update problem. It can check if the modification of a resource that the user wants to upload will not override another change that has been done since the original resource was fetched. If the request cannot be fulfilled, the 412 (Precondition Failed) response is returned. When modifying a resource using POST or PUT, the If-Match header must be set to the value of the resource ModTime property after which no lost update problem should occur. For example, a client send a GET request to obtain a resource, which includes the ModTime property. The ModTime indicates the last time the resource was created or modified. The client then sends a POST or PUT request with the If-Match header set to the ModTime property of the resource as obtained in the GET request.
# @return [ChassisProfile]
def patch_chassis_profile(moid, chassis_profile, opts = {})
data, _status_code, _headers = patch_chassis_profile_with_http_info(moid, chassis_profile, opts)
data
end
# Update a 'chassis.Profile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param chassis_profile [ChassisProfile] The 'chassis.Profile' resource to update.
# @param [Hash] opts the optional parameters
# @option opts [String] :if_match For methods that apply server-side changes, and in particular for PUT, If-Match can be used to prevent the lost update problem. It can check if the modification of a resource that the user wants to upload will not override another change that has been done since the original resource was fetched. If the request cannot be fulfilled, the 412 (Precondition Failed) response is returned. When modifying a resource using POST or PUT, the If-Match header must be set to the value of the resource ModTime property after which no lost update problem should occur. For example, a client send a GET request to obtain a resource, which includes the ModTime property. The ModTime indicates the last time the resource was created or modified. The client then sends a POST or PUT request with the If-Match header set to the ModTime property of the resource as obtained in the GET request.
# @return [Array<(ChassisProfile, Integer, Hash)>] ChassisProfile data, response status code and response headers
def patch_chassis_profile_with_http_info(moid, chassis_profile, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.patch_chassis_profile ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.patch_chassis_profile"
end
# verify the required parameter 'chassis_profile' is set
if @api_client.config.client_side_validation && chassis_profile.nil?
fail ArgumentError, "Missing the required parameter 'chassis_profile' when calling ChassisApi.patch_chassis_profile"
end
# resource path
local_var_path = '/api/v1/chassis/Profiles/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json', 'application/json-patch+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(chassis_profile)
# return_type
return_type = opts[:debug_return_type] || 'ChassisProfile'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.patch_chassis_profile",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#patch_chassis_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Update a 'chassis.Profile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param chassis_profile [ChassisProfile] The 'chassis.Profile' resource to update.
# @param [Hash] opts the optional parameters
# @option opts [String] :if_match For methods that apply server-side changes, and in particular for PUT, If-Match can be used to prevent the lost update problem. It can check if the modification of a resource that the user wants to upload will not override another change that has been done since the original resource was fetched. If the request cannot be fulfilled, the 412 (Precondition Failed) response is returned. When modifying a resource using POST or PUT, the If-Match header must be set to the value of the resource ModTime property after which no lost update problem should occur. For example, a client send a GET request to obtain a resource, which includes the ModTime property. The ModTime indicates the last time the resource was created or modified. The client then sends a POST or PUT request with the If-Match header set to the ModTime property of the resource as obtained in the GET request.
# @return [ChassisProfile]
def update_chassis_profile(moid, chassis_profile, opts = {})
data, _status_code, _headers = update_chassis_profile_with_http_info(moid, chassis_profile, opts)
data
end
# Update a 'chassis.Profile' resource.
# @param moid [String] The unique Moid identifier of a resource instance.
# @param chassis_profile [ChassisProfile] The 'chassis.Profile' resource to update.
# @param [Hash] opts the optional parameters
# @option opts [String] :if_match For methods that apply server-side changes, and in particular for PUT, If-Match can be used to prevent the lost update problem. It can check if the modification of a resource that the user wants to upload will not override another change that has been done since the original resource was fetched. If the request cannot be fulfilled, the 412 (Precondition Failed) response is returned. When modifying a resource using POST or PUT, the If-Match header must be set to the value of the resource ModTime property after which no lost update problem should occur. For example, a client send a GET request to obtain a resource, which includes the ModTime property. The ModTime indicates the last time the resource was created or modified. The client then sends a POST or PUT request with the If-Match header set to the ModTime property of the resource as obtained in the GET request.
# @return [Array<(ChassisProfile, Integer, Hash)>] ChassisProfile data, response status code and response headers
def update_chassis_profile_with_http_info(moid, chassis_profile, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: ChassisApi.update_chassis_profile ...'
end
# verify the required parameter 'moid' is set
if @api_client.config.client_side_validation && moid.nil?
fail ArgumentError, "Missing the required parameter 'moid' when calling ChassisApi.update_chassis_profile"
end
# verify the required parameter 'chassis_profile' is set
if @api_client.config.client_side_validation && chassis_profile.nil?
fail ArgumentError, "Missing the required parameter 'chassis_profile' when calling ChassisApi.update_chassis_profile"
end
# resource path
local_var_path = '/api/v1/chassis/Profiles/{Moid}'.sub('{' + 'Moid' + '}', CGI.escape(moid.to_s))
# query parameters
query_params = opts[:query_params] || {}
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json', 'application/json-patch+json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
end
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(chassis_profile)
# return_type
return_type = opts[:debug_return_type] || 'ChassisProfile'
# auth_names
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'http_signature', 'oAuth2', 'oAuth2']
new_options = opts.merge(
:operation => :"ChassisApi.update_chassis_profile",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: ChassisApi#update_chassis_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end
| 86.347222 | 1,712 | 0.741095 |
37fc6856bfcabca29c5192ab7cc313e4a14ce07e | 5,872 | swift | Swift | VGLabel/Classes/VGLabelComponent.swift | JJson/VGLabel | 4511f8f01189c4ad96f0b9423a15845f49e849d0 | [
"MIT"
] | 1 | 2017-11-15T07:04:54.000Z | 2017-11-15T07:04:54.000Z | VGLabel/Classes/VGLabelComponent.swift | JJson/VGLabel | 4511f8f01189c4ad96f0b9423a15845f49e849d0 | [
"MIT"
] | null | null | null | VGLabel/Classes/VGLabelComponent.swift | JJson/VGLabel | 4511f8f01189c4ad96f0b9423a15845f49e849d0 | [
"MIT"
] | 1 | 2022-03-24T08:38:55.000Z | 2022-03-24T08:38:55.000Z | //
// VGLabelComponent.swift
// VGLabel
//
// Created by Vein on 2017/11/7.
// Copyright © 2017年 Vein. All rights reserved.
//
import Foundation
public class VGLabelComponent: NSObject {
internal var componentIndex: Int = 0
internal var text: String = ""
internal var tagLabel: String?
internal var attributes: [String: String]?
internal var position: Int = 0
class func compomemt(_ text: String, tag: String, attributes: [String: String]) -> VGLabelComponent {
return VGLabelComponent(text, tag: tag, attributes: attributes)
}
init(_ text: String, tag: String, attributes: [String: String]) {
self.text = text
self.attributes = attributes
tagLabel = tag
}
class func compomemt(_ tag: String, position: Int, attributes: [String: String]) -> VGLabelComponent {
return VGLabelComponent(tag, position: position, attributes: attributes)
}
init(_ tag: String, position: Int, attributes: [String: String]) {
self.attributes = attributes
self.position = position
tagLabel = tag
}
override public var description : String {
var desc = "text: \(text), position: \(position)"
if let tag = tagLabel {
desc += ", tag: \(tag)"
}
if let att = attributes {
desc += ", attributes: \(att)"
}
return desc
}
}
public class VGLabelExtractedComponent: NSObject {
internal var textComponents: [VGLabelComponent]?
internal var plainText: String?
class func labelExtractedComponent(_ textComponents: [VGLabelComponent], plainText: String) -> VGLabelExtractedComponent {
let extractedComponent = VGLabelExtractedComponent()
extractedComponent.textComponents = textComponents
extractedComponent.plainText = plainText
return extractedComponent
}
class func extractTextStyle(_ data: String, paragraphReplacement: String) -> VGLabelExtractedComponent {
var text: NSString? = nil
var tag: String? = nil
var styleData = data
var components = [VGLabelComponent]()
var lastPosition = 0
let scanner = Scanner(string: data)
while !scanner.isAtEnd {
scanner.scanUpTo("<", into: nil)
scanner.scanUpTo(">", into: &text)
let delimiter = String(format: "%@>", text!)
let position = (styleData as NSString).range(of: delimiter).location
if position != NSNotFound {
if delimiter.range(of: "<p")?.lowerBound.encodedOffset == 0 {
let nsRange = NSRange(location: lastPosition, length: position + delimiter.count - lastPosition)
styleData = (styleData as NSString).replacingOccurrences(of: delimiter, with: paragraphReplacement, options: .caseInsensitive, range: nsRange)
} else {
let nsRange = NSRange(location: lastPosition, length: position + delimiter.count - lastPosition)
styleData = (styleData as NSString).replacingOccurrences(of: delimiter, with: "", options: .caseInsensitive, range: nsRange)
}
styleData = styleData.replacingOccurrences(of: "<", with: "<")
styleData = styleData.replacingOccurrences(of: ">", with: ">")
}
if text?.range(of: "</").location == 0 {
// end of tag
tag = text?.substring(from: 2)
if position != NSNotFound {
for component in components.reversed() {
if component.text.count == 0, component.tagLabel == tag {
let text = (styleData as NSString).substring(with: NSRange(location: component.position, length: position - component.position))
component.text = text
break
}
}
}
} else {
// start of tag
if let textComponents = text?.substring(from: 1).components(separatedBy: " ") {
tag = textComponents[0]
var attributes = [String: String]()
for (index, textComponent) in textComponents.enumerated() {
if index == 0 { continue }
let pair = textComponent.components(separatedBy: "=")
if pair.count > 0 {
let key = pair[0].lowercased()
if pair.count >= 2 {
// Trim " charactere
var value = (pair[1...pair.count - 1]).joined(separator: "=")
value = (value as NSString).replacingOccurrences(of: "\"", with: "", options: .literal, range: NSRange(location: 0, length: 1))
value = (value as NSString).replacingOccurrences(of: "\"", with: "", options: .literal, range: NSRange(location: value.count-1, length: 1))
attributes[key] = value
} else if pair.count == 1 {
attributes[key] = key
}
}
}
let component = VGLabelComponent.compomemt("", tag: tag!, attributes: attributes)
component.position = position
components.append(component)
}
lastPosition = position
}
}
return VGLabelExtractedComponent.labelExtractedComponent(components, plainText: styleData)
}
}
| 42.861314 | 171 | 0.535763 |
2a43133622835098f6a187cf395311ebfee6af7d | 9,688 | java | Java | api/src/main/java/com/dedicatedcode/paperspace/feeder/MergingFileEventHandler.java | artri/paperspace | 431913c17cad7610ee5c4803511f2072efd1f147 | [
"MIT"
] | null | null | null | api/src/main/java/com/dedicatedcode/paperspace/feeder/MergingFileEventHandler.java | artri/paperspace | 431913c17cad7610ee5c4803511f2072efd1f147 | [
"MIT"
] | null | null | null | api/src/main/java/com/dedicatedcode/paperspace/feeder/MergingFileEventHandler.java | artri/paperspace | 431913c17cad7610ee5c4803511f2072efd1f147 | [
"MIT"
] | null | null | null | package com.dedicatedcode.paperspace.feeder;
import com.dedicatedcode.paperspace.BinaryService;
import com.dedicatedcode.paperspace.model.Binary;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import static com.dedicatedcode.paperspace.feeder.EventType.*;
@Service
public class MergingFileEventHandler {
private static final Logger log = LoggerFactory.getLogger(MergingFileEventHandler.class);
private final BinaryService binaryService;
private final List<FileEventListener> listeners;
private final Map<FileEvent, Long> recheckList = new HashMap<>();
private final long recheckInterval;
private final long notifyInterval;
private final List<FileEvent> queuedFileEvents = Collections.synchronizedList(new LinkedList<>());
private final ScheduledExecutorService executor = Executors.newScheduledThreadPool(2);
private final ExecutorService ocrExecutor = Executors.newFixedThreadPool(8);
private final AtomicInteger executingCount =new AtomicInteger();
@Autowired
public MergingFileEventHandler(BinaryService binaryService, List<FileEventListener> listeners,
@Value("${storage.recheck.interval}") long recheckInterval,
@Value("${storage.notify.interval}") long notifyInterval) {
this.binaryService = binaryService;
this.listeners = listeners;
this.recheckInterval = recheckInterval;
this.notifyInterval = notifyInterval;
initThreads();
}
private void initThreads() {
executor.scheduleWithFixedDelay(() -> {
LocalDateTime minAgeOfEvent = LocalDateTime.now().minus(recheckInterval, ChronoUnit.MILLIS);
List<FileEvent> toHandle = new ArrayList<>();
HashMap<FileEvent, Long> map;
synchronized (recheckList) {
map = new HashMap<>(recheckList);
recheckList.clear();
}
map.forEach((event, value) -> {
if (event.getOccurredAt().isBefore(minAgeOfEvent)) {
log.debug("checking file size of [{}]", event.getFile());
if (event.getFile().length() == value) {
register(event.getEventType(), event.getFile(), event.getInputType());
} else {
toHandle.add(event);
}
}
});
synchronized (recheckList) {
toHandle.forEach(fileEvent -> recheckList.put(fileEvent, fileEvent.getFile().length()));
}
}, 0, recheckInterval, TimeUnit.MILLISECONDS);
executor.scheduleWithFixedDelay(() -> {
LocalDateTime minAgeOfEvent = LocalDateTime.now().minus(notifyInterval, ChronoUnit.MILLIS);
synchronized (this.queuedFileEvents) {
long countBefore = this.queuedFileEvents.size();
Iterator<FileEvent> iterator = this.queuedFileEvents.listIterator();
int notifiedCount = 0;
while (iterator.hasNext()) {
FileEvent fileEvent = iterator.next();
if (fileEvent.getOccurredAt().isBefore(minAgeOfEvent)) {
notifiedCount++;
iterator.remove();
executingCount.incrementAndGet();
this.ocrExecutor.submit(() -> {
try {
notifyListeners(fileEvent);
} catch (Exception e) {
log.error("error occurred while handling [{}] will put it back to retry.", fileEvent, e);
this.recheckList.put(fileEvent, fileEvent.getFile().length());
}
executingCount.decrementAndGet();
});
}
}
log.debug("notified about changes on [{}] files out of [{}] events, pending changes [{}]", notifiedCount, countBefore, this.queuedFileEvents.size());
}
}, 0, notifyInterval, TimeUnit.MILLISECONDS);
}
private void notifyListeners(FileEvent fileEvent) {
for (FileEventListener listener : listeners) {
log.debug("notifying [{}] with file [{}] and event [{}]", listener.getClass(), fileEvent.getFile(), fileEvent.getEventType());
listener.handle(fileEvent.getEventType(), fileEvent.getFile(), fileEvent.getInputType());
}
}
public void register(EventType eventType, File file, InputType inputType) {
String hash = null;
switch (eventType) {
case DELETE:
hash = getKnownHashFor(file);
break;
case CREATE:
case EXISTING:
case CHANGE:
String fileHash = getHashFrom(file);
if (fileHash == null) {
synchronized (recheckList) {
recheckList.put(new FileEvent(inputType, eventType, file, LocalDateTime.now(), null), file.length());
}
} else {
hash = fileHash;
}
break;
default:
throw new IllegalArgumentException("Unable to handle event type [" + eventType + "]");
}
if (hash != null) {
log.info("registered event for file [{}] with hash [{}]", file, hash);
String finalHash = hash;
synchronized (queuedFileEvents) {
FileEvent storedEventByHash = this.queuedFileEvents.stream().filter(event -> event.getHash().equals(finalHash)).filter(event -> event.getFile().getName().equals(file.getName())).findFirst().orElse(null);
FileEvent storedEventByFileName = this.queuedFileEvents.stream().filter(event -> event.getFile().equals(file)).filter(event -> event.getFile().getName().equals(file.getName())).findFirst().orElse(null);
List<FileEvent> updatedList = this.queuedFileEvents.stream().filter(event -> !event.equals(storedEventByHash) && !event.equals(storedEventByFileName)).collect(Collectors.toList());
log.debug("Found existing event by hash [{}] or fileName [{}] for file[{}]", storedEventByHash, storedEventByFileName, file);
FileEvent storedEvent = storedEventByHash != null ? storedEventByHash : storedEventByFileName;
if (storedEvent != null) {
EventType storedType = storedEvent.getEventType();
if (storedType == DELETE && eventType == CREATE) {
log.info("DELETE event stored for [{}] and CREATE event retrieved for [{}]. Merge to MOVE type", storedEvent.getFile(), file);
updatedList.add(new FileEvent(inputType, MOVE, file, LocalDateTime.now(), hash));
} else if ((storedType == CREATE || storedType == EXISTING) && eventType == DELETE) {
log.info("CREATE event stored for [{}] and DELETE event retrieved for [{}]. Merge to MOVE type", storedEvent.getFile(), file);
updatedList.add(new FileEvent(inputType, MOVE, storedEvent.getFile(), LocalDateTime.now(), hash));
} else if (eventType == CHANGE) {
log.info("CHANGED event received for [{}] and [{}] event retrieved for [{}]. Will update time", file, storedEvent.getEventType(), storedEvent.getFile());
updatedList.add(new FileEvent(inputType, storedEvent.getEventType(), file, LocalDateTime.now(), hash));
} else if (storedType == EXISTING) {
FileEvent fileEvent = new FileEvent(inputType, eventType, file, LocalDateTime.now(), hash);
log.info("Event [{}] received and stored event was [{}]", fileEvent, storedEvent);
updatedList.add(fileEvent);
}
} else {
FileEvent fileEvent = new FileEvent(inputType, eventType, file, LocalDateTime.now(), hash);
updatedList.add(fileEvent);
log.info("Event [{}] received", fileEvent);
}
this.queuedFileEvents.clear();
this.queuedFileEvents.addAll(updatedList);
}
}
}
private String getHashFrom(File file) {
try (InputStream is = new FileInputStream(file)) {
return DigestUtils.md5DigestAsHex(is);
} catch (IOException e) {
log.error("could not calculate md5 sum of [{}]", file);
return null;
}
}
private String getKnownHashFor(File file) {
Binary byPath = this.binaryService.getByPath(file.getAbsolutePath());
return byPath != null ? byPath.getHash() : null;
}
public int getPendingChanges() {
return this.queuedFileEvents.size() + this.executingCount.get();
}
}
| 49.682051 | 219 | 0.598988 |
1f895b3af6e03799be96d2fa2a91d395ec3f5e45 | 2,264 | html | HTML | Website/index.html | TheGreymanShow/House.Viz | 86773ebd8ed1802c7f38ace647ca28679b00f8fb | [
"MIT"
] | null | null | null | Website/index.html | TheGreymanShow/House.Viz | 86773ebd8ed1802c7f38ace647ca28679b00f8fb | [
"MIT"
] | null | null | null | Website/index.html | TheGreymanShow/House.Viz | 86773ebd8ed1802c7f38ace647ca28679b00f8fb | [
"MIT"
] | null | null | null |
<html>
<head>
<title>House.Viz</title>
<meta charset="utf-8">
<link type="text/css" href="master.css" rel="stylesheet">
</head>
<body>
<div class="main">
<div class="form">
<form method="POST" action="input.php" id="contact-form" class="form">
<div class="form-group">
<button type="submit" class="btn btn-success" value="login">Find Now</button>
</div>
</form>
</div>
</div>
<!-- Bootstrap core JavaScript -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/jquery.js"></script>
<script src="js/jquery-scrolltofixed-min.js"></script>
<script src="js/jquery.vegas.js"></script>
<script src="js/jquery.mixitup.min.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/script.js"></script>
<script src="js/bootstrap.js"></script>
<!-- Slideshow Background -->
<script>
$.vegas('slideshow', {
delay:2000,
backgrounds:[
{ src:'./images/h1.jpg', fade:1200 },
{ src:'./images/h2.jpg', fade:1200 },
{ src:'./images/h3.jpg', fade:1200 },
{ src:'./images/h4.jpg', fade:1200 },
{ src:'./images/h5.jpg', fade:1200 },
{ src:'./images/h6.jpg', fade:1200 },
]
});
('overlay', {
src:'./img/overlay.png'
});
</script>
<!-- /Slideshow Background -->
<!-- Mixitup : Grid -->
<script>
$(function(){
$('#Grid').mixitup();
});
</script>
<!-- /Mixitup : Grid -->
<!-- Custom JavaScript for Smooth Scrolling - Put in a custom JavaScript file to clean this up -->
<script>
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|| location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
</script>
</body>
</html>
| 26.022989 | 104 | 0.511484 |
18355f95486bbdc741c0b3ce8bc96f896926878f | 1,755 | kt | Kotlin | sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/ImageViewerDialog.kt | TheJuki/ImagePicker | ce77785b1c0638b51c288e38fb71af0a810ba984 | [
"Apache-2.0"
] | 1 | 2020-05-29T10:29:11.000Z | 2020-05-29T10:29:11.000Z | sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/ImageViewerDialog.kt | TheJuki/ImagePicker | ce77785b1c0638b51c288e38fb71af0a810ba984 | [
"Apache-2.0"
] | null | null | null | sample/src/main/kotlin/com.github.dhaval2404.imagepicker/sample/ImageViewerDialog.kt | TheJuki/ImagePicker | ce77785b1c0638b51c288e38fb71af0a810ba984 | [
"Apache-2.0"
] | null | null | null | package com.github.dhaval2404.imagepicker.sample
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import com.github.dhaval2404.imagepicker.sample.databinding.DialogImageviewerBinding
/**
* Dialog to View Image
*
* @author Dhaval Patel
* @version 1.6
* @since 05 January 2019
*/
class ImageViewerDialog : DialogFragment() {
companion object {
private const val EXTRA_IMAGE_RESOURCE = "extra.image_resource"
fun newInstance(resource: Int) = ImageViewerDialog().apply {
arguments = Bundle().apply {
putInt(EXTRA_IMAGE_RESOURCE, resource)
}
}
}
private var _binding: DialogImageviewerBinding? = null
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
_binding = DialogImageviewerBinding.inflate(inflater, container, false)
return binding.root
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
binding.codeImg.setImageResource(arguments?.getInt(EXTRA_IMAGE_RESOURCE, 0) ?: 0)
}
override fun onStart() {
super.onStart()
dialog?.window?.setBackgroundDrawableResource(android.R.color.transparent)
dialog?.let {
val width = ViewGroup.LayoutParams.MATCH_PARENT
val height = ViewGroup.LayoutParams.WRAP_CONTENT
it.window?.setLayout(width, height)
}
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
}
| 28.306452 | 89 | 0.681481 |
9c72ba81c1d244be548d28b969d8151925b5d376 | 671 | js | JavaScript | src/pages/index.js | djahng/gatsby-grove | 1f25c0d261852d501b29ee92def08c8720123e72 | [
"MIT"
] | null | null | null | src/pages/index.js | djahng/gatsby-grove | 1f25c0d261852d501b29ee92def08c8720123e72 | [
"MIT"
] | null | null | null | src/pages/index.js | djahng/gatsby-grove | 1f25c0d261852d501b29ee92def08c8720123e72 | [
"MIT"
] | null | null | null | import React from 'react';
import NavBar from '../components/NavBar';
import Showcase from '../components/Showcase';
import About from '../components/About';
import Explore from '../components/Explore';
import Quotes from '../components/Quotes';
import ImageCarousel from '../components/ImageCarousel';
import SocialMedia from '../components/SocialMedia';
import Newsletter from '../components/Newsletter';
import Footer from '../components/Footer';
import '../scss/main.scss';
export default () => (
<>
<NavBar />
<Showcase />
<About />
<Explore />
<Quotes />
<ImageCarousel />
<SocialMedia />
<Newsletter />
<Footer />
</>
);
| 23.964286 | 56 | 0.66617 |
f2cbc37b94c15a4b34d5f11c14e4a7235926cef3 | 2,355 | lua | Lua | src/cards/theft.lua | Barocena/unotfm | cf0e59eb08a04818a8bd3d838b04b06378aa6fb6 | [
"MIT"
] | 4 | 2020-07-08T20:04:29.000Z | 2022-02-13T14:19:14.000Z | src/cards/theft.lua | Barocena/unotfm | cf0e59eb08a04818a8bd3d838b04b06378aa6fb6 | [
"MIT"
] | null | null | null | src/cards/theft.lua | Barocena/unotfm | cf0e59eb08a04818a8bd3d838b04b06378aa6fb6 | [
"MIT"
] | 4 | 2021-07-22T05:04:43.000Z | 2022-01-21T20:13:16.000Z | function theft(n)
if ROUND.gameMode.hell and ROUND.accumulated then
ROUND.accumulated = nil
addBlockPoint(ROUND.chair[n].owner)
end
local image = {tfm.exec.addImage(IMG.misc.genericLayer, "!1000", 0, 0, ROUND.chair[n].owner)}
local option = {}
for i, v in pairs(ROUND.chair) do
if (v.mode ~= "DELETED") and i ~= n then
table.insert(image, tfm.exec.addImage(IMG.misc.target, "!1000", v.x-50, 30))
option[i] = true
end
end
ROUND.chair[n].action = {
name = "THEFT",
img = image,
op = option,
func = makeTheft
}
resetTimer()
updateTurnTimer()
end
function makeTheft(n, target)
if target then
local temp = {}
if n ~= target and ROUND.chair[target].mode ~= "DELETED" then
if ROUND.chair[n].action then
for i, v in pairs(ROUND.chair[n].action.img) do
tfm.exec.removeImage(v)
end
end
ROUND.chair[n].action = false
--
local found = {}
for i, v in pairs(ROUND.chair[target].hand) do
if v[1] == "black" then
table.insert(found, i)
end
end
if #found > 0 then
local rand = found[math.random(#found)]
temp = table.remove(ROUND.chair[target].hand, rand)
discardEffect(target, rand)
table.insert(ROUND.chair[n].hand, temp)
missCard(n, temp, 2000)
explosion(5, ROUND.chair[n].x, 100, 5, 10)
sortHand(ROUND.chair[n].hand)
ROUND.chair[n].uno = nil
updateHand(n)
updateHand(target)
if #ROUND.chair[target].hand == 1 then
ROUND.chair[target].uno = "uno"
end
if isIlluminati(n) then
unlockChair(ROUND.chair[n].owner, "illuminati")
end
if temp[2] == "draw4" then
if ROUND.chair[n].theft then
unlockChair(ROUND.chair[n].owner, "gaga")
else
ROUND.chair[n].theft = true
end
end
updateScore(n)
updateScore(target)
showCardsGainned(n, 1)
showCardsGainned(target, -1)
end
--
if #ROUND.chair[target].hand == 0 then
local name = ROUND.chair[target].owner
endGame(ROUND.chair[target].owner)
unlockChair(target, "gift")
else
passTurn()
ROUND.chair[n].confuse = false
batataTimer(n)
updateShadow(n)
end
end
else
if ROUND.chair[n].action then
for i, v in pairs(ROUND.chair[n].action.img) do
tfm.exec.removeImage(v)
end
ROUND.chair[n].action = false
end
passTurn()
batataTimer(n)
updateShadow(n)
end
end | 24.53125 | 94 | 0.638641 |
d692aa522d1060a9e6853168ded8544ca8b7c3ce | 1,852 | swift | Swift | EssentialFeed/EssentialFeediOS/Image Comments UI/Controllers/ImageCommentsViewController.swift | Cronay/ios-lead-essentials-image-comments-challenge | aa6de55854f6b30a0b2c7e4cde423125bf06c5c7 | [
"MIT"
] | null | null | null | EssentialFeed/EssentialFeediOS/Image Comments UI/Controllers/ImageCommentsViewController.swift | Cronay/ios-lead-essentials-image-comments-challenge | aa6de55854f6b30a0b2c7e4cde423125bf06c5c7 | [
"MIT"
] | null | null | null | EssentialFeed/EssentialFeediOS/Image Comments UI/Controllers/ImageCommentsViewController.swift | Cronay/ios-lead-essentials-image-comments-challenge | aa6de55854f6b30a0b2c7e4cde423125bf06c5c7 | [
"MIT"
] | null | null | null | //
// ImageCommentsViewController.swift
// EssentialFeediOS
//
// Created by Cronay on 23.12.20.
// Copyright © 2020 Essential Developer. All rights reserved.
//
import UIKit
import EssentialFeed
public protocol ImageCommentsViewControllerDelegate {
func didRequestCommentsRefresh()
}
public class ImageCommentsViewController: UITableViewController, ImageCommentsView, ImageCommentsErrorView, ImageCommentsLoadingView {
@IBOutlet private(set) public var errorView: ErrorView?
public var delegate: ImageCommentsViewControllerDelegate?
var tableModel = [PresentableImageComment]() {
didSet {
tableView.reloadData()
}
}
public override func viewDidLoad() {
super.viewDidLoad()
refresh()
}
public override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
tableView.sizeTableHeaderToFit()
}
@IBAction private func refresh() {
delegate?.didRequestCommentsRefresh()
}
public func display(_ viewModel: ImageCommentsViewModel) {
tableModel = viewModel.presentables
}
public func display(_ viewModel: ImageCommentsErrorViewModel) {
errorView?.message = viewModel.message
}
public func display(_ viewModel: ImageCommentsLoadingViewModel) {
if viewModel.isLoading {
refreshControl?.beginRefreshing()
} else {
refreshControl?.endRefreshing()
}
}
public override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return tableModel.count
}
public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let model = tableModel[indexPath.row]
let cell = tableView.dequeueReusableCell(withIdentifier: "ImageCommentCell", for: indexPath) as! ImageCommentCell
cell.dateLabel.text = model.date
cell.usernameLabel.text = model.username
cell.messageLabel.text = model.message
return cell
}
}
| 26.457143 | 134 | 0.775918 |
af1f67a32b2743c9829df0bdf04b067e67f42817 | 9,733 | kt | Kotlin | camera/src/main/java/com/atom/camera/core/gl/yuv/ExportSource.kt | yongzheng7/android-camera | 47993799238f2254668f71190d85263be0fdc980 | [
"Apache-2.0"
] | null | null | null | camera/src/main/java/com/atom/camera/core/gl/yuv/ExportSource.kt | yongzheng7/android-camera | 47993799238f2254668f71190d85263be0fdc980 | [
"Apache-2.0"
] | null | null | null | camera/src/main/java/com/atom/camera/core/gl/yuv/ExportSource.kt | yongzheng7/android-camera | 47993799238f2254668f71190d85263be0fdc980 | [
"Apache-2.0"
] | null | null | null | package com.atom.camera.core.gl.yuv
class ExportSource {
companion object{
private val HEAD = """precision highp float;
precision highp int;
varying vec2 vTextureCo;
uniform sampler2D uTexture;
uniform float uWidth;
uniform float uHeight;
float cY(float x,float y){
vec4 c=texture2D(uTexture,vec2(x,y));
return c.r*0.257+c.g*0.504+c.b*0.098+0.0625;
}
vec4 cC(float x,float y,float dx,float dy){
vec4 c0=texture2D(uTexture,vec2(x,y));
vec4 c1=texture2D(uTexture,vec2(x+dx,y));
vec4 c2=texture2D(uTexture,vec2(x,y+dy));
vec4 c3=texture2D(uTexture,vec2(x+dx,y+dy));
return (c0+c1+c2+c3)/4.;
}
float cU(float x,float y,float dx,float dy){
vec4 c=cC(x,y,dx,dy);
return -0.148*c.r - 0.291*c.g + 0.439*c.b+0.5000;
}
float cV(float x,float y,float dx,float dy){
vec4 c=cC(x,y,dx,dy);
return 0.439*c.r - 0.368*c.g - 0.071*c.b+0.5000;
}
vec2 cPos(float t,float shiftx,float gy){
vec2 pos=vec2(floor(uWidth*vTextureCo.x),floor(uHeight*gy));
return vec2(mod(pos.x*shiftx,uWidth),(pos.y*shiftx+floor(pos.x*shiftx/uWidth))*t);
}
vec4 calculateY(){
vec2 pos=cPos(1.,4.,vTextureCo.y);
vec4 oColor=vec4(0);
float textureYPos=pos.y/uHeight;
oColor[0]=cY(pos.x/uWidth,textureYPos);
oColor[1]=cY((pos.x+1.)/uWidth,textureYPos);
oColor[2]=cY((pos.x+2.)/uWidth,textureYPos);
oColor[3]=cY((pos.x+3.)/uWidth,textureYPos);
return oColor;
}
vec4 calculateU(float gy,float dx,float dy){
vec2 pos=cPos(2.,8.,vTextureCo.y-gy);
vec4 oColor=vec4(0);
float textureYPos=pos.y/uHeight;
oColor[0]= cU(pos.x/uWidth,textureYPos,dx,dy);
oColor[1]= cU((pos.x+2.)/uWidth,textureYPos,dx,dy);
oColor[2]= cU((pos.x+4.)/uWidth,textureYPos,dx,dy);
oColor[3]= cU((pos.x+6.)/uWidth,textureYPos,dx,dy);
return oColor;
}
vec4 calculateV(float gy,float dx,float dy){
vec2 pos=cPos(2.,8.,vTextureCo.y-gy);
vec4 oColor=vec4(0);
float textureYPos=pos.y/uHeight;
oColor[0]=cV(pos.x/uWidth,textureYPos,dx,dy);
oColor[1]=cV((pos.x+2.)/uWidth,textureYPos,dx,dy);
oColor[2]=cV((pos.x+4.)/uWidth,textureYPos,dx,dy);
oColor[3]=cV((pos.x+6.)/uWidth,textureYPos,dx,dy);
return oColor;
}
vec4 calculateUV(float dx,float dy){
vec2 pos=cPos(2.,4.,vTextureCo.y-0.2500);
vec4 oColor=vec4(0);
float textureYPos=pos.y/uHeight;
oColor[0]= cU(pos.x/uWidth,textureYPos,dx,dy);
oColor[1]= cV(pos.x/uWidth,textureYPos,dx,dy);
oColor[2]= cU((pos.x+2.)/uWidth,textureYPos,dx,dy);
oColor[3]= cV((pos.x+2.)/uWidth,textureYPos,dx,dy);
return oColor;
}
vec4 calculateVU(float dx,float dy){
vec2 pos=cPos(2.,4.,vTextureCo.y-0.2500);
vec4 oColor=vec4(0);
float textureYPos=pos.y/uHeight;
oColor[0]= cV(pos.x/uWidth,textureYPos,dx,dy);
oColor[1]= cU(pos.x/uWidth,textureYPos,dx,dy);
oColor[2]= cV((pos.x+2.)/uWidth,textureYPos,dx,dy);
oColor[3]= cU((pos.x+2.)/uWidth,textureYPos,dx,dy);
return oColor;
}
"""
fun getFrag(type: Int): String? {
val sb = StringBuilder()
sb.append(HEAD)
when (type) {
YuvOutputShader.EXPORT_TYPE_I420 -> sb.append("""void main() {
if(vTextureCo.y<0.2500){
gl_FragColor=calculateY();
}else if(vTextureCo.y<0.3125){
gl_FragColor=calculateU(0.2500,1./uWidth,1./uHeight);
}else if(vTextureCo.y<0.3750){
gl_FragColor=calculateV(0.3125,1./uWidth,1./uHeight);
}else{
gl_FragColor=vec4(0,0,0,0);
}
}""")
YuvOutputShader.EXPORT_TYPE_YV12 -> sb.append("""void main() {
if(vTextureCo.y<0.2500){
gl_FragColor=calculateY();
}else if(vTextureCo.y<0.3125){
gl_FragColor=calculateV(0.2500,1./uWidth,1./uHeight);
}else if(vTextureCo.y<0.3750){
gl_FragColor=calculateU(0.3125,1./uWidth,1./uHeight);
}else{
gl_FragColor=vec4(0,0,0,0);
}
}""")
YuvOutputShader.EXPORT_TYPE_NV12 -> sb.append("""void main() {
if(vTextureCo.y<0.2500){
gl_FragColor=calculateY();
}else if(vTextureCo.y<0.3750){
gl_FragColor=calculateUV(1./uWidth,1./uHeight);
}else{
gl_FragColor=vec4(0,0,0,0);
}
}""")
YuvOutputShader.EXPORT_TYPE_NV21 -> sb.append("""void main() {
if(vTextureCo.y<0.2500){
gl_FragColor=calculateY();
}else if(vTextureCo.y<0.3750){
gl_FragColor=calculateVU(1./uWidth,1./uHeight);
}else{
gl_FragColor=vec4(0,0,0,0);
}
}""")
else -> sb.append("""void main() {
if(vTextureCo.y<0.2500){
gl_FragColor=calculateY();
}else if(vTextureCo.y<0.3750){
gl_FragColor=calculateVU(1./uWidth,1./uHeight);
}else{
gl_FragColor=vec4(0,0,0,0);
}
}""")
}
return sb.toString()
}
}
} | 63.614379 | 125 | 0.307613 |
b88ef74cdbe35a770a4e388c2838c6f702198116 | 6,303 | html | HTML | examples/index.html | wraplr/jquery-textchange | f5d1746e9be20833ac91978164d421c158457388 | [
"MIT"
] | null | null | null | examples/index.html | wraplr/jquery-textchange | f5d1746e9be20833ac91978164d421c158457388 | [
"MIT"
] | null | null | null | examples/index.html | wraplr/jquery-textchange | f5d1746e9be20833ac91978164d421c158457388 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.min.js" integrity="sha384-cn7l7gDp0eyniUwwAZgrzD06kc/tftFf19TOAs2zVinnD/C7E91j9yyk5//jjpt/" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?autorun=false"></script>
<script src="../src/jquery.textchange.js"></script>
<meta charset="utf-8" />
<title>jQuery TextChange Examples</title>
</head>
<body style="padding-bottom: 100px;">
<div class="container">
<h2>jQuery TextChange plugin with timeout.</h2>
<hr />
<h3>Example</h3>
<pre class="prettyprint lang-javascript run">
$('input#example-input').on('textchange.namespace1', 300, function(e) {
$('span#example-result').html($(this).val());
});
</pre>
<div class="form-group">
<input type="text" class="form-control" id="example-input" placeholder="Type something" autofocus>
</div>
<div class="form-group mt-2">
<strong class="me-2">Result:</strong><span id="example-result"></span>
</div>
<!-- Available options -->
<h2 class="mt-5">Available options</h2>
<hr />
<table class="table table-bordered">
<thead>
<tr>
<th>
Option
</th>
<th>
Type
</th>
<th>
Default value
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>event.namespace</td>
<td>
String
</td>
<td>
</td>
<td>
You can define a jQuery event namespace, see <a href="https://api.jquery.com/event.namespace/" target="_blank">https://api.jquery.com/event.namespace/</a> for more information.
</td>
</tr>
<tr>
<td>timeout</td>
<td>
Integer (milliseconds)
</td>
<td>
0
</td>
<td>
You can define a timeout which means the textchange event will be triggered if the user stops typing and timeout passed.
</td>
</tr>
<tr>
<td>callback</td>
<td>
Function
</td>
<td>
undefined
</td>
<td>
This callback function will be triggered when a textchange occurs.
</td>
</tr>
</tbody>
</table>
<!-- Available methods -->
<h2 class="mt-5">Available methods</h2>
<hr />
<table class="table table-bordered">
<thead>
<tr>
<th>
Method
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>on('textchange.namespace', timeout, callback)</td>
<td>
You can subscribe to textchange event with a namespace. Note that the namespace is optional. Example:
<pre class="prettyprint lang-javascript runnable mt-3">
<!--
$('input#onoff-input').val('').focus();
$('span#onoff-status').html('Subscribed');
$('span#onoff-result').html('');
-->
$('input#onoff-input').on('textchange.namespace1', function(e) {
$('span#onoff-result').html($(this).val());
});
</pre>
</td>
</tr>
<tr>
<td>off('textchange.namespace')</td>
<td>
You can unsubscribe from textchange event with a namespace. Note that the namespace is optional. Example:
<pre class="prettyprint lang-javascript runnable mt-3">
<!--
$('input#onoff-input').val('').focus();
$('span#onoff-status').html('Not subscribed');
$('span#onoff-result').html('');
-->
$('input#onoff-input').off('textchange.namespace1');
</pre>
</td>
</tr>
</tbody>
</table>
<div class="form-group">
<input type="text" class="form-control" id="onoff-input" placeholder="Subscribe and type something" autofocus>
</div>
<div class="form-group mt-2">
<strong class="me-2">Status:</strong><span id="onoff-status">Not subscribed</span>
</div>
<div class="form-group mt-2">
<strong class="me-2">Result:</strong><span id="onoff-result"></span>
</div>
<hr />
<footer class="text-center"><a href="https://github.com/wraplr/jquery-textchange" target="_blank">Go to the project.</a></footer>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('pre.prettyprint.runnable, pre.prettyprint.run').each(function(index) {
// get section
var $section = $(this);
// get js code
var code = $(this).html().replace(/</g, '<').replace(/>/g, '>');
// remove commented code
$(this).html($(this).html().replace(/(<([^>]+)>)/gi, ''));
// runnable
if ($section.hasClass('runnable')) {
var $button = $('<button class="btn btn-primary">Run the code</button>');
$button.on('click', {code: code}, function(event) {
eval(event.data.code);
});
$button.insertAfter($section);
}
// run
if ($section.hasClass('run')) {
eval(code);
}
});
// pretty print
PR.prettyPrint();
});
</script>
</body>
</html> | 33 | 210 | 0.486118 |
08089872e926eda7365d8e38503410339162f173 | 18,636 | html | HTML | flask_server/src/templates/step2.html | dnazila/user_study | c4518608384f3cb19f2988d363fff25b62109010 | [
"MIT"
] | null | null | null | flask_server/src/templates/step2.html | dnazila/user_study | c4518608384f3cb19f2988d363fff25b62109010 | [
"MIT"
] | null | null | null | flask_server/src/templates/step2.html | dnazila/user_study | c4518608384f3cb19f2988d363fff25b62109010 | [
"MIT"
] | 1 | 2021-06-09T05:33:03.000Z | 2021-06-09T05:33:03.000Z | {% extends "base_template_steps.html" %}
{% block title %}
Step 2 - Create Maliciously Looking Domains Guided
{% endblock %}
{% block page_specific_stylesheet %}
<link rel="stylesheet" href="{{ url_for('static', filename='/css/step2.css') }}">
{% endblock %}
{% block step_specific_scripts %}
<script src="{{ url_for('static', filename='/scripts/step2.js') }}"></script>
{% endblock %}
{% block progress_step2 %}<i class="fas fa-arrow-circle-right"></i>{% endblock %}
{% block headline %}
Step 2 - Create Maliciously Looking Domains Guided
{% endblock %}
{% block instructions %}
<p>
Similarly to the previous step, we ask you again to create convincing fake domains for ten given well-known domains.
In contrast to the previous step, we provide common techniques used by cyber criminals you can use to create your domains.
</p>
{% endblock %}
{% block counter_label %}10 domains created{% endblock %}
{% block experiment %}
Click on one of the following techniques to get started - <b>you can change at any time!</b>:
<div id="graphical_illustration" class="flex_center">
<img class="illustration" id="homograph_desc" src="{{ url_for('static', filename='/external/media/with_heading/homographic.svg') }}"></img>
<img class="illustration" id="combosquatting_desc" src="{{ url_for('static', filename='/external/media/with_heading/combosquatting.svg') }}"></img>
<img class="illustration" id="subdomain_usage_desc" src="{{ url_for('static', filename='/external/media/with_heading/subdomain.svg') }}"></img>
<img class="illustration" id="wrong_tld_desc" src="{{ url_for('static', filename='/external/media/with_heading/wrongtopleveldomain.svg') }}"></img>
<img class="illustration" id="typosquatting_desc" src="{{ url_for('static', filename='/external/media/with_heading/typosquatting.svg') }}"></img>
</div>
<div class="hidden" id="domain_selection">
Please imitate the following domain: <span id="selected_domain"></span>
</div>
<div id="squatting_techniques_wrapper">
<div class="hidden small_margin_top" id="typosquatting">
<h2>Typosquatting</h2>
<div class="description">
The domain has a typing error, e.g., e<span class="red">x</span>xample.com instead of example.com.
</div>
<div class="flex_center instructions_contrainer">
<div>
<div class="tiny_margin_top" id="typosquatting_technique_selection">
<p>Select a typosquatting technique you would like to use:</p>
<div class="div_inside_hover_highlight_color " id="typosquatting_techniques">
<div class="unselected label" href="#/">Prepend www</div>
<div class="unselected label" href="#/">Omit character</div>
<div class="unselected label" href="#/">Swap characters</div>
<div class="unselected label" href="#/">Replace qwerty</div>
<div class="unselected label" href="#/">Duplicate character</div>
</div>
</div>
<div id="typosquatting_techniques_wrapper">
<div class="hidden tiny_margin_top" id="prepend_www">
<div class="description">
Prepend www: missing dot between www and domain, e.g., <span class="red">www</span>example.com.
</div>
<p>You will create: <span id="prepend_www_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_prepend_www" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
<div class="hidden tiny_margin_top" id="omit_character">
<div class="description">
Omit character: omit a character, e.g., eample.com.
</div>
<p>Select a character to remove:</p>
<div class="tiny_margin_top div_inside_hover_highlight_color small_method_button_inside" id="omit_character_domain_letters"></div>
<div class="hidden tiny_margin_top" id="omit_character_success">
<p>You will create: <span id="omit_character_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_omit_character" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
</div>
<div class="hidden tiny_margin_top" id="swap_characters">
<div class="description">
Swap characters: swap two neighboring characters, e.g., e<span class="red">ax</span>mple.com.
</div>
<p>Select a character to swap with its right neighbor (swapping the last character is equal to swapping the second to last character):</p>
<div class="tiny_margin_top div_inside_hover_highlight_color small_method_button_inside" id="swap_characters_domain_letters"></div>
<div class="hidden tiny_margin_top" id="swap_characters_success">
<p>You will create: <span id="swap_characters_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_swap_characters" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
</div>
<div class="hidden tiny_margin_top" id="replace_qwerty">
<div class="description">
Replace qwerty: replace a character with a neighboring character on a qwerty keyboard, e.g., ex<span class="red">s</span>mple.com.
</div>
<p>Select a character to replace:</p>
<div class="tiny_margin_top div_inside_hover_highlight_color small_method_button_inside" id="replace_qwerty_domain_letters"></div>
<div class="div_inside_hover_highlight_color small_method_button_inside" id="qwerty_replacements"></div>
<div class="hidden tiny_margin_top" id="replace_qwerty_success">
<p>You will create: <span id="replace_qwerty_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_replace_qwerty" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
</div>
<div class="hidden tiny_margin_top" id="duplicate_character">
<div class="description">
Duplicate character: duplicate a character, e.g., e<span class="red">x</span>xample.com.
</div>
<p>Select a character to duplicate:</p>
<div class="tiny_margin_top div_inside_hover_highlight_color small_method_button_inside" id="duplicate_character_domain_letters"></div>
<div class="hidden tiny_margin_top" id="duplicate_character_success">
<p>You will create: <span id="duplicate_character_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_duplicate_character" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
</div>
</div>
</div>
<div>
<img src="{{ url_for('static', filename='/external/media/without_heading/typosquatting.svg') }}"></img>
</div>
</div>
</div>
<div class="hidden small_margin_top" id="combosquatting">
<h2>Combosquatting</h2>
<div class="description">
The domain has random characters or suitable words in front of and/or behind the domain, e.g., <span class="red">login-</span>example.com.
</div>
<div class="flex_center instructions_contrainer">
<div>
<ul class="instructions">
<li> <i class="fas fa-random"></i> adds random characters before/behind the domain.</li>
<li> <i class="fas fa-book"></i> adds a suitable word before/behind the domain.</li>
<li> <i class="fas fa-ban"></i> does not add characters/words before/behind the domain.</li>
</ul>
<div id="create_combosquatting_domain_before">
<b>Before the domain</b>
<br>
<div class="method_button hover_highlight_color" id="chars_before">
<i class="fas fa-random"></i><br>Characters
</div>
<div class="method_button hover_highlight_color" id="terms_before">
<i class="fas fa-book"></i><br>Words
</div>
<div class="method_button hover_highlight_color" id="none_before">
<i class="fas fa-ban"></i><br>None
</div>
</div>
<div class="hidden" id="create_combosquatting_domain_behind">
<b>Behind the domain</b>
<br>
<div class="method_button hover_highlight_color" id="chars_behind">
<i class="fas fa-random"></i><br>Characters
</div>
<div class="method_button hover_highlight_color" id="terms_behind">
<i class="fas fa-book"></i><br>Words
</div>
<div class="method_button hover_highlight_color" id="none_behind">
<i class="fas fa-ban"></i><br>None
</div>
</div>
<div class="hidden tiny_margin_top" id="combosquatting_error">
<p><i class="fas fa-exclamation-circle"></i> You cannot select none for both before and behind the domain <i class="fas fa-exclamation-circle"></i></p>
</div>
<div class="hidden tiny_margin_top" id="combosquatting_success">
<p>You will create: <span id="combosquatting_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_combosquatting" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
</div>
<div>
<img src="{{ url_for('static', filename='/external/media/without_heading/combosquatting.svg') }}"></img>
</div>
</div>
</div>
<div class="hidden small_margin_top" id="subdomain_usage">
<h2>Subdomain</h2>
<div class="description">
The domain is a subdomain of another, unsuspiciously looking, domain, e.g., example.com<span class="red">.another-domain.com</span>.
</div>
<div class="flex_center instructions_contrainer">
<div>
We automatically add test-domain.com as a subdomain.
You may additonally add: </br>
<ul>
<li><i class="fas fa-random"></i> adds random characters before/behind the domain.</li>
<li><i class="fas fa-book"></i> adds a suitable word before/behind the domain.</li>
<li><i class="fas fa-ban"></i> does not add characters/words before/behind the domain.</li>
</ul>
<div id="create_subdomain_before">
<b>Before the domain</b>
<br>
<div class="hover_highlight_color method_button" id="subdomain_chars_before">
<i class="fas fa-random"></i><br>Characters
</div>
<div class="hover_highlight_color method_button" id="subdomain_terms_before">
<i class="fas fa-book"></i><br>Words
</div>
<div class="hover_highlight_color method_button" id="subdomain_none_before">
<i class="fas fa-ban"></i><br>None
</div>
</div>
<div class="hidden" id="create_subdomain_behind">
<b>Behind the domain</b>
<br>
<div class="hover_highlight_color method_button" id="subdomain_chars_behind">
<i class="fas fa-random"></i><br>Characters
</div>
<div class="hover_highlight_color method_button" id="subdomain_terms_behind">
<i class="fas fa-book"></i><br>Words
</div>
<div class="hover_highlight_color method_button" id="subdomain_none_behind">
<i class="fas fa-ban"></i><br>None
</div>
</div>
<div class="hidden tiny_margin_top" id="subdomain_success">
<p>You will create: <span id="subdomain_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_subdomain" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
</div>
<div>
<img src="{{ url_for('static', filename='/external/media/without_heading/subdomain.svg') }}"></img>
</div>
</div>
</div>
<div class="hidden small_margin_top" id="wrong_tld">
<h2>Wrong top-level domain</h2>
<div class="description">
The domain has a different top-level domain compared to the original domain, e.g., example.<span class="red">top</span>.
</div>
<div class="flex_center instructions_contrainer">
<div>
<p>Choose a top-level domain from the list below:</p>
<div id="create_wrong_tld">
<div id="dropdown_wrapper_wrong_tld">
<button id="wrong_tld_selection_button">
Click to select top-level domain
<div id="requirements_arrow_left" class="arrow-left inline-block"> </div>
<div id="requirements_arrow_down" class="arrow-down hidden"> </div>
</button>
<div class="hidden" id="dropdown_content_wrong_tld">
<a href="#/">top</a>
<a href="#/">md</a>
<a href="#/">net</a>
<a href="#/">de</a>
</div>
</div>
</div>
<div class="hidden tiny_margin_top" id="wrong_tld_success">
<p>You will create: <span id="wrong_tld_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_wrong_tld" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
</div>
<div>
<img src="{{ url_for('static', filename='/external/media/without_heading/wrongtopleveldomain.svg') }}"></img>
</div>
</div>
</div>
<div class="hidden small_margin_top" id="homograph">
<h2>Homograph</h2>
<div class="description">
The domain has a character replaced with a similar symbol, e.g., <span class="red">ẹ</span>xample.com.
</div>
<div class="flex_center instructions_contrainer">
<div>
<p>Select a character to replace:</p>
<div class="tiny_margin_top div_inside_hover_highlight_color small_method_button_inside" id="replace_homograph_domain_letters"></div>
<div class="div_inside_hover_highlight_color small_method_button_inside" id="homograph_replacements"></div>
<div class="hidden tiny_margin_top" id="replace_homograph_success">
<p>You will create: <span id="replace_homograph_created_domain"></span></p>
<a class="hover_highlight_color button" id="next_domain_replace_homograph" href="#/"><i class="fas fa-forward" aria-hidden="true"></i> Click to create this domain</a>
</div>
</div>
<div>
<img src="{{ url_for('static', filename='/external/media/without_heading/homographic.svg') }}"></img>
</div>
</div>
</div>
</div>
{% endblock %}
| 57.875776 | 200 | 0.5044 |
58d46fd63dbea4697f718082144c5a52b5782250 | 1,109 | rs | Rust | examples/std/vec/vec.rs | barabadzhi/rust-by-example-ru | b4bd09a49c70ed4b9a3ec881a6a5672ea80444dc | [
"Apache-2.0",
"MIT"
] | 1 | 2020-09-30T04:52:28.000Z | 2020-09-30T04:52:28.000Z | examples/std/vec/vec.rs | barabadzhi/rust-by-example-ru | b4bd09a49c70ed4b9a3ec881a6a5672ea80444dc | [
"Apache-2.0",
"MIT"
] | null | null | null | examples/std/vec/vec.rs | barabadzhi/rust-by-example-ru | b4bd09a49c70ed4b9a3ec881a6a5672ea80444dc | [
"Apache-2.0",
"MIT"
] | null | null | null | fn main() {
// Итераторы можно собрать в вектора
let collected_iterator: Vec<i32> = (0..10).collect();
println!("Собираем (0..10) в: {:?}", collected_iterator);
// Для инициализации вектора можно использовать макрос `vec!`
let mut xs = vec![1i32, 2, 3];
println!("Начальный вектор: {:?}", xs);
// Вставляет новый элемент в конце вектора
println!("Добавляем 4 элементы в вектор");
xs.push(4);
println!("Вектор: {:?}", xs);
// Ошибка! Неизменяемые вектора не могут увеличиваться
collected_iterator.push(0);
// ИСПРАВЬТЕ ^ Закомментируйте эту строку
// Метод `len` возвращает текущий размер вектора
println!("Размер вектора: {}", xs.len());
// Обращение к элементам вектора записывается с помощью квадратных скобок
// (нумерация элементов начинается с 0)
println!("Второй элемент: {}", xs[1]);
// `pop` удаляет последний элемент из вектора и возвращает его
println!("Удаляем последний элемент: {:?}", xs.pop());
// Обращение к элементу за пределами вектора вызывает ошибку
println!("Четвёртый элемент: {}", xs[3]);
}
| 34.65625 | 77 | 0.654644 |