code
stringlengths 5
1.01M
| repo_name
stringlengths 5
84
| path
stringlengths 4
311
| language
stringclasses 30
values | license
stringclasses 15
values | size
int64 5
1.01M
| input_ids
listlengths 502
502
| token_type_ids
listlengths 502
502
| attention_mask
listlengths 502
502
| labels
listlengths 502
502
|
|---|---|---|---|---|---|---|---|---|---|
<div class="col-md-12">
<div id="news">
<?php
if ( $loopSmall->have_posts() ) : while ( $loopSmall->have_posts() ) : $loopSmall->the_post();
$linkNews = get_field('linkNews');
?>
<div class="news-item">
<a href="<?php echo $linkNews; ?>">
<div class="image">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail();
}?>
</div>
<div class="title"><?php the_title(); ?> </div>
</a>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
|
VicoSneepPP/infoscreen-wp-theme
|
partials/loop-klein.php
|
PHP
|
mit
| 472
|
[
30522,
1026,
4487,
2615,
2465,
1027,
1000,
8902,
1011,
9108,
1011,
2260,
1000,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
2739,
1000,
1028,
1026,
1029,
25718,
2065,
1006,
1002,
15932,
9067,
2140,
1011,
1028,
2031,
1035,
8466,
1006,
1007,
1007,
1024,
2096,
1006,
1002,
15932,
9067,
2140,
1011,
1028,
2031,
1035,
8466,
1006,
1007,
1007,
1024,
1002,
15932,
9067,
2140,
1011,
1028,
1996,
1035,
2695,
1006,
1007,
1025,
1002,
4957,
2638,
9333,
1027,
2131,
1035,
2492,
1006,
1005,
4957,
2638,
9333,
1005,
1007,
1025,
1029,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2739,
1011,
8875,
1000,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
1026,
1029,
25718,
9052,
1002,
4957,
2638,
9333,
1025,
1029,
1028,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
3746,
1000,
1028,
1026,
1029,
25718,
2065,
1006,
2038,
1035,
2695,
1035,
7639,
25464,
1006,
1007,
1007,
1063,
1996,
1035,
2695,
1035,
7639,
25464,
1006,
1007,
1025,
1065,
1029,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2516,
1000,
1028,
1026,
1029,
25718,
1996,
1035,
2516,
1006,
1007,
1025,
1029,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
1037,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1029,
25718,
2203,
19927,
1025,
1029,
1028,
1026,
1029,
25718,
2203,
10128,
1025,
1029,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
async function arraySort() {
"use speedyjs";
const array = [1, 2];
const ascending = array.sort();
const descending = array.sort(descendingComparator);
}
function descendingComparator(a: int, b: int) {
"use speedyjs";
return b - a as number;
}
|
MichaReiser/speedy.js
|
packages/compiler/__tests__/code-generation/cases/array/sort.ts
|
TypeScript
|
mit
| 272
|
[
30522,
2004,
6038,
2278,
3853,
27448,
11589,
1006,
1007,
1063,
1000,
2224,
26203,
22578,
1000,
1025,
9530,
3367,
9140,
1027,
1031,
1015,
1010,
1016,
1033,
1025,
9530,
3367,
22316,
1027,
9140,
1012,
4066,
1006,
1007,
1025,
9530,
3367,
15127,
1027,
9140,
1012,
4066,
1006,
15127,
9006,
28689,
4263,
1007,
1025,
1065,
3853,
15127,
9006,
28689,
4263,
1006,
1037,
1024,
20014,
1010,
1038,
1024,
20014,
1007,
1063,
1000,
2224,
26203,
22578,
1000,
1025,
2709,
1038,
1011,
1037,
2004,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2193,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
---
layout: page
title: "Paul Miller"
comments: true
description: "blanks"
keywords: "Paul Miller,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
font-family: "Bebas Neue";
src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
}
h1.Bebas {
font-family: "Bebas Neue", Verdana, Tahoma;
}
</style>
</head>
#### TEACHING INFORMATION
**College**: College of Music
**Classes taught**: MUSC 1101, MUSC 1111, MUSC 1121, MUSC 1131, MUSC 2101, MUSC 2111, MUSC 2121, MUSC 2131, MUSC 5061, MUSC 5071, MUSC 6801
#### MUSC 1101: Semester 1 Theory
**Terms taught**: Fall 2009, Fall 2011, Fall 2012
**Instructor rating**: 5.64
**Standard deviation in instructor rating**: 0.14
**Average grade** (4.0 scale): 3.13
**Standard deviation in grades** (4.0 scale): 0.18
**Average workload** (raw): 2.04
**Standard deviation in workload** (raw): 0.03
#### MUSC 1111: Semester 2 Theory
**Terms taught**: Spring 2010, Spring 2012, Spring 2013
**Instructor rating**: 5.44
**Standard deviation in instructor rating**: 0.34
**Average grade** (4.0 scale): 3.3
**Standard deviation in grades** (4.0 scale): 0.14
**Average workload** (raw): 1.96
**Standard deviation in workload** (raw): 0.09
#### MUSC 1121: Aural Skills Lab, Semester 1
**Terms taught**: Fall 2009, Fall 2011, Fall 2011, Fall 2012
**Instructor rating**: 5.68
**Standard deviation in instructor rating**: 0.2
**Average grade** (4.0 scale): 3.27
**Standard deviation in grades** (4.0 scale): 0.12
**Average workload** (raw): 1.89
**Standard deviation in workload** (raw): 0.08
#### MUSC 1131: Aural Skills Lab, Semester 2
**Terms taught**: Spring 2010, Spring 2012, Spring 2013
**Instructor rating**: 5.62
**Standard deviation in instructor rating**: 0.25
**Average grade** (4.0 scale): 3.32
**Standard deviation in grades** (4.0 scale): 0.3
**Average workload** (raw): 1.69
**Standard deviation in workload** (raw): 0.29
#### MUSC 2101: Semester 3 Theory
**Terms taught**: Fall 2010
**Instructor rating**: 5.54
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 3.05
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 1.76
**Standard deviation in workload** (raw): 0.0
#### MUSC 2111: Semester 4 Theory
**Terms taught**: Spring 2011
**Instructor rating**: 5.03
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 3.82
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 1.69
**Standard deviation in workload** (raw): 0.0
#### MUSC 2121: Aural Skills Lab, Semester 3
**Terms taught**: Fall 2010
**Instructor rating**: 4.86
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 3.17
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 1.46
**Standard deviation in workload** (raw): 0.0
#### MUSC 2131: Aural Skills Lab, Semester 4
**Terms taught**: Spring 2011
**Instructor rating**: 5.17
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 3.55
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 1.36
**Standard deviation in workload** (raw): 0.0
#### MUSC 5061: Advanced Tonal Analysis
**Terms taught**: Spring 2011, Spring 2013
**Instructor rating**: 4.64
**Standard deviation in instructor rating**: 0.64
**Average grade** (4.0 scale): 3.89
**Standard deviation in grades** (4.0 scale): 0.08
**Average workload** (raw): 2.54
**Standard deviation in workload** (raw): 0.62
#### MUSC 5071: Post-tonal Theory and Analysis I
**Terms taught**: Spring 2011
**Instructor rating**: 5.13
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 3.82
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 2.25
**Standard deviation in workload** (raw): 0.0
#### MUSC 6801: Advanced Topics in Music Theory
**Terms taught**: Fall 2009, Fall 2012
**Instructor rating**: 4.9
**Standard deviation in instructor rating**: 0.46
**Average grade** (4.0 scale): 3.69
**Standard deviation in grades** (4.0 scale): 0.11
**Average workload** (raw): 3.52
**Standard deviation in workload** (raw): 0.88
|
nikhilrajaram/nikhilrajaram.github.io
|
instructors/Paul_Miller.md
|
Markdown
|
mit
| 4,485
|
[
30522,
1011,
1011,
1011,
9621,
1024,
3931,
2516,
1024,
1000,
2703,
4679,
1000,
7928,
1024,
2995,
6412,
1024,
1000,
8744,
2015,
1000,
3145,
22104,
1024,
1000,
2703,
4679,
1010,
12731,
1010,
13264,
1000,
1011,
1011,
1011,
1026,
2132,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
16770,
1024,
1013,
1013,
18176,
1012,
8224,
9331,
2483,
1012,
4012,
1013,
18176,
1013,
5622,
5910,
1013,
1046,
4226,
2854,
1013,
1016,
1012,
1015,
1012,
1017,
1013,
1046,
4226,
2854,
1012,
8117,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
16770,
1024,
1013,
1013,
21469,
1012,
4530,
8758,
20330,
8663,
6528,
2102,
1012,
4012,
1013,
1055,
1013,
7473,
20958,
26807,
4502,
2860,
2487,
5243,
2549,
2080,
2683,
1013,
2152,
7507,
21217,
1012,
1046,
2015,
1029,
21469,
1027,
1014,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
999,
1011,
1011,
1026,
5896,
5034,
2278,
1027,
1000,
1012,
1012,
1013,
7045,
1013,
1046,
2015,
1013,
2152,
7507,
21217,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1011,
1011,
1028,
1026,
2806,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1028,
1030,
15489,
1011,
2227,
1063,
15489,
1011,
2155,
1024,
1000,
2022,
22083,
27713,
1000,
1025,
5034,
2278,
1024,
24471,
2140,
1006,
16770,
1024,
1013,
1013,
7479,
1012,
5371,
15006,
3436,
1012,
8917,
1013,
5371,
1013,
4751,
1013,
5139,
23777,
26224,
1013,
2022,
22083,
2638,
5657,
3180,
1012,
27178,
2546,
1007,
4289,
1006,
1000,
2330,
13874,
1000,
1007,
1025,
1065,
1044,
2487,
1012,
2022,
22083,
1063,
15489,
1011,
2155,
1024,
1000,
2022,
22083,
27713,
1000,
1010,
2310,
26992,
2050,
1010,
11937,
23393,
2050,
1025,
1065,
1026,
1013,
2806,
1028,
1026,
1013,
2132,
1028,
1001,
1001,
1001,
1001,
4252,
2592,
1008,
1008,
2267,
1008,
1008,
1024,
2267,
1997,
2189,
1008,
1008,
4280,
4036,
1008,
1008,
1024,
14163,
11020,
7287,
2487,
1010,
14163,
11020,
11118,
2487,
1010,
14163,
11020,
11176,
2487,
1010,
14163,
11020,
12104,
2487,
1010,
14163,
11020,
12875,
30524,
11020,
2753,
2575,
2487,
1010,
14163,
11020,
2753,
2581,
2487,
1010,
14163,
11020,
23944,
2487,
1001,
1001,
1001,
1001,
14163,
11020,
7287,
2487,
1024,
13609,
1015,
3399,
1008,
1008,
3408,
4036,
1008,
1008,
1024,
2991,
2268,
1010,
2991,
2249,
1010,
2991,
2262,
1008,
1008,
9450,
5790,
1008,
1008,
1024,
1019,
1012,
4185,
1008,
1008,
3115,
24353,
1999,
9450,
5790,
1008,
1008,
1024,
1014,
1012,
2403,
1008,
1008,
2779,
3694,
1008,
1008,
1006,
1018,
1012,
1014,
4094,
1007,
1024,
1017,
1012,
2410,
1008,
1008,
3115,
24353,
1999,
7022,
1008,
1008,
1006,
1018,
1012,
1014,
4094,
1007,
1024,
1014,
1012,
2324,
1008,
1008,
2779,
2147,
11066,
1008,
1008,
1006,
6315,
1007,
1024,
1016,
1012,
5840,
1008,
1008,
3115,
24353,
1999,
2147,
11066,
1008,
1008,
1006,
6315,
1007,
1024,
1014,
1012,
6021,
1001,
1001,
1001,
1001,
14163,
11020,
11118,
2487,
1024,
13609,
1016,
3399,
1008,
1008,
3408,
4036,
1008,
1008,
1024,
3500,
2230,
1010,
3500,
2262,
1010,
3500,
2286,
1008,
1008,
9450,
5790,
1008,
1008,
1024,
1019,
30523,
2487,
1010,
14163,
11020,
19235,
2487,
1010,
14163,
11020,
18164,
2487,
1010,
14163,
11020,
19883,
2487,
1010,
14163,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2487,
1010,
14163,
11020,
19235,
2487,
1010,
14163,
11020,
18164,
2487,
1010,
14163,
11020,
19883,
2487,
1010,
14163,
30526
] |
/* Copyright (C) 2018 Magnus Lång and Tuan Phong Ngo
* This benchmark is part of SWSC */
#include <assert.h>
#include <stdint.h>
#include <stdatomic.h>
#include <pthread.h>
atomic_int vars[3];
atomic_int atom_0_r3_2;
atomic_int atom_1_r1_1;
void *t0(void *arg){
label_1:;
atomic_store_explicit(&vars[0], 2, memory_order_seq_cst);
int v2_r3 = atomic_load_explicit(&vars[0], memory_order_seq_cst);
int v3_r4 = v2_r3 ^ v2_r3;
atomic_store_explicit(&vars[1+v3_r4], 1, memory_order_seq_cst);
atomic_store_explicit(&vars[2], 1, memory_order_seq_cst);
int v14 = (v2_r3 == 2);
atomic_store_explicit(&atom_0_r3_2, v14, memory_order_seq_cst);
return NULL;
}
void *t1(void *arg){
label_2:;
int v5_r1 = atomic_load_explicit(&vars[2], memory_order_seq_cst);
int v6_r3 = v5_r1 ^ v5_r1;
int v7_r3 = v6_r3 + 1;
atomic_store_explicit(&vars[0], v7_r3, memory_order_seq_cst);
int v15 = (v5_r1 == 1);
atomic_store_explicit(&atom_1_r1_1, v15, memory_order_seq_cst);
return NULL;
}
int main(int argc, char *argv[]){
pthread_t thr0;
pthread_t thr1;
atomic_init(&vars[0], 0);
atomic_init(&vars[2], 0);
atomic_init(&vars[1], 0);
atomic_init(&atom_0_r3_2, 0);
atomic_init(&atom_1_r1_1, 0);
pthread_create(&thr0, NULL, t0, NULL);
pthread_create(&thr1, NULL, t1, NULL);
pthread_join(thr0, NULL);
pthread_join(thr1, NULL);
int v8 = atomic_load_explicit(&atom_0_r3_2, memory_order_seq_cst);
int v9 = atomic_load_explicit(&vars[0], memory_order_seq_cst);
int v10 = (v9 == 2);
int v11 = atomic_load_explicit(&atom_1_r1_1, memory_order_seq_cst);
int v12_conj = v10 & v11;
int v13_conj = v8 & v12_conj;
if (v13_conj == 1) assert(0);
return 0;
}
|
nidhugg/nidhugg
|
tests/litmus/C-tests/DETOUR0477.c
|
C
|
gpl-3.0
| 1,695
|
[
30522,
1013,
1008,
9385,
1006,
1039,
1007,
2760,
10045,
11374,
1998,
10722,
2319,
6887,
5063,
17895,
1008,
2023,
6847,
10665,
2003,
2112,
1997,
25430,
11020,
1008,
1013,
1001,
2421,
1026,
20865,
1012,
1044,
1028,
1001,
2421,
1026,
2358,
8718,
2102,
1012,
1044,
1028,
1001,
2421,
1026,
2358,
2850,
20389,
2594,
1012,
1044,
1028,
1001,
2421,
1026,
13866,
28362,
4215,
1012,
1044,
1028,
9593,
1035,
20014,
13075,
2015,
1031,
1017,
1033,
1025,
9593,
1035,
20014,
13787,
1035,
1014,
1035,
1054,
2509,
1035,
1016,
1025,
9593,
1035,
20014,
13787,
1035,
1015,
1035,
1054,
2487,
1035,
1015,
1025,
11675,
1008,
1056,
2692,
1006,
11675,
1008,
12098,
2290,
1007,
1063,
3830,
1035,
1015,
1024,
1025,
9593,
1035,
3573,
1035,
13216,
1006,
1004,
13075,
2015,
1031,
1014,
1033,
1010,
1016,
1010,
3638,
1035,
2344,
1035,
7367,
4160,
1035,
20116,
2102,
1007,
1025,
20014,
1058,
2475,
1035,
1054,
2509,
1027,
9593,
1035,
7170,
1035,
13216,
1006,
1004,
13075,
2015,
1031,
1014,
1033,
1010,
3638,
1035,
2344,
1035,
7367,
4160,
1035,
20116,
2102,
1007,
1025,
20014,
1058,
2509,
1035,
1054,
2549,
1027,
1058,
2475,
1035,
1054,
2509,
1034,
1058,
2475,
1035,
1054,
2509,
1025,
9593,
1035,
3573,
1035,
13216,
1006,
1004,
13075,
2015,
1031,
1015,
1009,
1058,
2509,
1035,
1054,
2549,
1033,
1010,
1015,
1010,
3638,
1035,
2344,
1035,
7367,
4160,
1035,
20116,
2102,
1007,
1025,
9593,
1035,
3573,
1035,
13216,
1006,
1004,
13075,
2015,
1031,
1016,
1033,
1010,
1015,
1010,
3638,
1035,
2344,
1035,
7367,
4160,
30524,
2509,
1035,
1016,
1010,
1058,
16932,
1010,
3638,
1035,
2344,
1035,
7367,
4160,
1035,
20116,
2102,
1007,
1025,
2709,
19701,
1025,
1065,
11675,
1008,
1056,
2487,
1006,
11675,
1008,
12098,
2290,
1007,
1063,
3830,
1035,
1016,
1024,
1025,
20014,
1058,
2629,
1035,
1054,
2487,
1027,
9593,
1035,
7170,
1035,
13216,
1006,
1004,
13075,
2015,
1031,
1016,
1033,
1010,
3638,
1035,
2344,
1035,
7367,
4160,
1035,
20116,
2102,
1007,
1025,
20014,
25275,
1035,
1054,
2509,
1027,
1058,
2629,
1035,
1054,
2487,
1034,
1058,
2629,
1035,
1054,
2487,
1025,
20014,
1058,
2581,
1035,
1054,
2509,
1027,
25275,
1035,
1054,
2509,
1009,
1015,
1025,
9593,
1035,
3573,
1035,
13216,
1006,
1004,
13075,
2015,
1031,
1014,
1033,
1010,
1058,
2581,
1035,
1054,
2509,
1010,
3638,
1035,
2344,
1035,
7367,
4160,
1035,
20116,
2102,
1007,
1025,
20014,
1058,
16068,
1027,
1006,
1058,
2629,
1035,
1054,
2487,
1027,
1027,
1015,
1007,
1025,
9593,
1035,
3573,
1035,
13216,
1006,
1004,
13787,
1035,
1015,
1035,
1054,
2487,
1035,
1015,
1010,
1058,
16068,
1010,
3638,
1035,
2344,
1035,
7367,
4160,
1035,
20116,
2102,
1007,
1025,
2709,
19701,
1025,
1065,
20014,
2364,
1006,
20014,
12098,
18195,
1010,
25869,
1008,
12098,
2290,
2615,
1031,
1033,
1007,
1063,
13866,
28362,
4215,
1035,
1056,
16215,
2099,
2692,
1025,
13866,
28362,
4215,
1035,
1056,
16215,
2099,
2487,
1025,
9593,
1035,
1999,
4183,
1006,
1004,
13075,
2015,
1031,
1014,
1033,
1010,
1014,
30523,
1035,
20116,
2102,
1007,
1025,
20014,
1058,
16932,
1027,
1006,
1058,
2475,
1035,
1054,
2509,
1027,
1027,
1016,
1007,
1025,
9593,
1035,
3573,
1035,
13216,
1006,
1004,
13787,
1035,
1014,
1035,
1054,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1035,
20116,
2102,
1007,
1025,
20014,
1058,
16932,
1027,
1006,
1058,
2475,
1035,
1054,
2509,
1027,
1027,
1016,
1007,
1025,
9593,
1035,
3573,
1035,
13216,
1006,
1004,
13787,
1035,
1014,
1035,
1054,
30526
] |
/****************************************************************************
Copyright (c) 2013-2015 scutgame.com
http://www.scutgame.com
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.
****************************************************************************/
using ZyGames.Framework.Game.Service;
using ZyGames.Tianjiexing.BLL.Base;
using ZyGames.Tianjiexing.Lang;
using ZyGames.Tianjiexing.Model;
using ZyGames.Tianjiexing.BLL.Combat;
namespace ZyGames.Tianjiexing.BLL.Action
{
/// <summary>
/// 4206_加入队伍接口
/// </summary>
public class Action4206 : BaseAction
{
private int teamID = 0;
private int ops = 0;
private FunctionEnum funEnum;
public Action4206(ZyGames.Framework.Game.Contract.HttpGet httpGet)
: base(ActionIDDefine.Cst_Action4206, httpGet)
{
}
public override void BuildPacket()
{
PushIntoStack(teamID);
}
public override bool GetUrlElement()
{
if (httpGet.GetInt("Ops", ref ops) && httpGet.GetEnum("FunEnum", ref funEnum))
{
httpGet.GetInt("TeamID", ref teamID);
return true;
}
return false;
}
public override bool TakeAction()
{
if (!PlotTeamCombat.IsMorePlotDate(ContextUser.UserID, funEnum))
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St4202_OutMorePlotDate;
return false;
}
if (UserHelper.IsBeiBaoFull(ContextUser))
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St1107_GridNumFull;
return false;
}
var plotTeam = new PlotTeamCombat(ContextUser);
var team = plotTeam.GetTeam(teamID);
if (team != null)
{
if (team.Status == 2)
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St4206_TeamPlotStart;
return false;
}
if (team.Status == 3)
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St4206_TeamPlotLead;
return false;
}
}
if (ops == 1)
{
plotTeam.AddTeam(teamID);
}
else if (ops == 2)
{
if (funEnum == FunctionEnum.Multiplot)
{
plotTeam.AddTeam(out teamID);
}
else
{
plotTeam.AddMoreTeam(out teamID);
}
if (teamID == -1)
{
ErrorCode = LanguageManager.GetLang().ErrorCode;
ErrorInfo = LanguageManager.GetLang().St4206_NoTeam;
return false;
}
}
return true;
}
}
}
|
wenhulove333/ScutServer
|
Sample/Koudai/Server/src/ZyGames.Tianjiexing.BLL/Action/Action4206.cs
|
C#
|
mit
| 4,309
|
[
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
9385,
1006,
1039,
1007,
2286,
1011,
2325,
8040,
4904,
16650,
1012,
4012,
8299,
1024,
1013,
1013,
7479,
1012,
8040,
4904,
16650,
1012,
4012,
6656,
2003,
2182,
3762,
4379,
1010,
2489,
1997,
3715,
1010,
2000,
2151,
2711,
11381,
1037,
6100,
1997,
2023,
4007,
1998,
3378,
12653,
6764,
1006,
1996,
1000,
4007,
1000,
1007,
1010,
2000,
3066,
1999,
1996,
4007,
2302,
16840,
1010,
2164,
2302,
22718,
1996,
2916,
2000,
2224,
1010,
6100,
1010,
19933,
1010,
13590,
1010,
10172,
1010,
16062,
1010,
4942,
13231,
12325,
1010,
1998,
1013,
2030,
5271,
4809,
1997,
1996,
4007,
1010,
1998,
2000,
9146,
5381,
2000,
3183,
1996,
4007,
2003,
19851,
2000,
2079,
2061,
1010,
3395,
2000,
1996,
2206,
3785,
1024,
1996,
2682,
9385,
5060,
1998,
2023,
6656,
5060,
4618,
2022,
2443,
1999,
2035,
4809,
2030,
6937,
8810,
1997,
30524,
23496,
3672,
1012,
1999,
2053,
2724,
4618,
1996,
6048,
2030,
9385,
13304,
2022,
20090,
2005,
2151,
4366,
1010,
12394,
2030,
2060,
14000,
1010,
3251,
1999,
2019,
2895,
1997,
3206,
1010,
17153,
2102,
2030,
4728,
1010,
17707,
2013,
1010,
2041,
1997,
2030,
1999,
4434,
2007,
1996,
4007,
2030,
1996,
2224,
2030,
2060,
24069,
1999,
1996,
4007,
1012,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1013,
2478,
1062,
2100,
26393,
1012,
7705,
1012,
2208,
1012,
2326,
1025,
2478,
1062,
2100,
26393,
1012,
23401,
4478,
10288,
2075,
1012,
1038,
3363,
1012,
2918,
1025,
2478,
1062,
2100,
26393,
1012,
23401,
4478,
10288,
2075,
1012,
11374,
1025,
2478,
1062,
2100,
26393,
1012,
23401,
4478,
10288,
2075,
1012,
2944,
1025,
2478,
1062,
2100,
26393,
1012,
23401,
4478,
10288,
2075,
1012,
1038,
3363,
1012,
4337,
1025,
3415,
15327,
1062,
2100,
26393,
1012,
23401,
4478,
10288,
2075,
1012,
1038,
3363,
1012,
2895,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
17442,
2575,
1035,
1779,
100,
100,
100,
100,
1788,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
2465,
2895,
20958,
2692,
2575,
1024,
2918,
30523,
1996,
4007,
1012,
1996,
4007,
2003,
3024,
1000,
2004,
2003,
1000,
1010,
2302,
10943,
2100,
1997,
2151,
2785,
1010,
4671,
2030,
13339,
1010,
2164,
2021,
2025,
3132,
2000,
1996,
10943,
3111,
1997,
6432,
8010,
1010,
10516,
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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1996,
4007,
1012,
1996,
4007,
2003,
3024,
1000,
2004,
2003,
1000,
1010,
2302,
10943,
2100,
1997,
2151,
2785,
1010,
4671,
2030,
13339,
1010,
2164,
2021,
2025,
3132,
2000,
1996,
10943,
3111,
1997,
6432,
8010,
1010,
10516,
2005,
1037,
3327,
3800,
1998,
2512,
2378,
19699,
30526
] |
package com.springinaction.springidol;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.beans.factory.annotation.Qualifier;
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Qualifier
public @interface StringedInstrument {
}
|
alien6u/spring-in-action-learning
|
src/com/springinaction/springidol/StringedInstrument.java
|
Java
|
apache-2.0
| 462
|
[
30522,
7427,
4012,
1012,
3500,
3981,
7542,
1012,
3500,
13820,
2140,
1025,
12324,
9262,
1012,
11374,
1012,
5754,
17287,
3508,
1012,
5783,
13874,
1025,
12324,
9262,
1012,
11374,
1012,
5754,
17287,
3508,
1012,
20125,
1025,
12324,
9262,
1012,
11374,
1012,
30524,
2492,
1010,
5783,
13874,
1012,
16381,
1010,
5783,
13874,
1012,
4118,
1010,
5783,
13874,
1012,
2828,
1065,
1007,
1030,
20125,
1006,
20125,
18155,
2594,
2100,
1012,
2448,
7292,
1007,
1030,
10981,
2270,
1030,
8278,
5164,
2098,
7076,
24456,
4765,
1063,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
5754,
17287,
3508,
1012,
20125,
18155,
2594,
2100,
1025,
12324,
9262,
1012,
11374,
1012,
5754,
17287,
3508,
1012,
4539,
1025,
12324,
8917,
1012,
3500,
15643,
6198,
1012,
13435,
1012,
4713,
1012,
5754,
17287,
3508,
1012,
10981,
1025,
1030,
4539,
1006,
1063,
5783,
13874,
1012,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
5754,
17287,
3508,
1012,
20125,
18155,
2594,
2100,
1025,
12324,
9262,
1012,
11374,
1012,
5754,
17287,
3508,
1012,
4539,
1025,
12324,
8917,
1012,
3500,
15643,
6198,
1012,
13435,
1012,
4713,
1012,
5754,
17287,
3508,
1012,
10981,
1025,
1030,
4539,
1006,
1063,
5783,
13874,
1012,
30526
] |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package models
import play.api.libs.json._
case class PSODetailsModel (psoDay: Int, psoMonth: Int, psoYear: Int, psoAmt: BigDecimal)
object PSODetailsModel {
implicit val format = Json.format[PSODetailsModel]
}
|
hmrc/pensions-lifetime-allowance-frontend
|
app/models/PSODetailsModel.scala
|
Scala
|
apache-2.0
| 821
|
[
30522,
1013,
1008,
1008,
9385,
25682,
20287,
6599,
1004,
8205,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
7427,
4275,
12324,
2377,
1012,
17928,
1012,
5622,
5910,
1012,
1046,
3385,
1012,
1035,
2553,
2465,
8827,
10244,
22081,
5302,
9247,
1006,
8827,
13390,
2100,
1024,
20014,
1010,
8827,
19506,
3372,
2232,
1024,
20014,
1010,
8827,
6977,
14644,
1024,
20014,
1010,
8827,
10441,
20492,
1024,
2502,
3207,
6895,
9067,
1007,
4874,
8827,
10244,
22081,
5302,
9247,
1063,
24655,
11748,
4289,
1027,
1046,
3385,
1012,
4289,
1031,
8827,
10244,
22081,
5302,
9247,
1033,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
//
// AppDelegate.h
// GliderSample
//
// Created by Guillermo Delgado on 03/04/2017.
// Copyright © 2017. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
gelemias/RDGliderViewController
|
Example/GliderSample/AppDelegate.h
|
C
|
mit
| 280
|
[
30522,
1013,
1013,
1013,
1013,
10439,
9247,
29107,
2618,
1012,
1044,
1013,
1013,
18788,
21559,
10814,
1013,
1013,
1013,
1013,
2580,
2011,
21070,
26532,
2006,
6021,
1013,
5840,
1013,
2418,
1012,
1013,
1013,
9385,
1075,
2418,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
1001,
12324,
1026,
21318,
23615,
1013,
21318,
23615,
1012,
1044,
1028,
1030,
8278,
10439,
9247,
29107,
2618,
1024,
21318,
6072,
26029,
4063,
1026,
21318,
29098,
19341,
3508,
9247,
29107,
2618,
1028,
1030,
3200,
1006,
2844,
1010,
2512,
10610,
7712,
1007,
21318,
11101,
5004,
1008,
3332,
1025,
1030,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
/**
* Librerías Javascript
*
* @package Roraima
* @author $Author$ <desarrollo@cidesa.com.ve>
* @version SVN: $Id$
*
* @copyright Copyright 2007, Cide S.A.
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
*/
function codigopadre(){
var codigo=$('cideftit_codpre').value;
if (codigo.length==2){
codigo=codigo+"-";
}
new Ajax.Request(getUrlModuloAjax(),{asynchronous:true, evalScripts:false, onComplete:function(request, json){AjaxJSON(request, json)}, parameters:'ajax=1&codigo='+codigo});
}
|
cidesa/siga-universitario
|
web/js/ingresos/ingtitpre.js
|
JavaScript
|
gpl-2.0
| 537
|
[
30522,
1013,
1008,
1008,
1008,
21091,
4360,
2015,
9262,
22483,
1008,
1008,
1030,
7427,
20996,
14995,
2863,
1008,
1030,
3166,
1002,
3166,
1002,
1026,
4078,
2906,
28402,
2080,
1030,
28744,
22447,
1012,
4012,
1012,
2310,
1028,
30524,
8909,
1002,
1008,
1008,
1030,
9385,
9385,
2289,
1010,
28744,
2063,
1055,
1012,
1037,
1012,
1008,
1030,
6105,
8299,
1024,
1013,
1013,
7480,
8162,
3401,
1012,
8917,
1013,
15943,
1013,
14246,
2140,
1011,
1016,
1012,
1014,
1012,
25718,
14246,
2140,
2615,
2475,
1008,
1013,
3853,
19429,
14031,
15455,
2890,
1006,
1007,
1063,
13075,
19429,
14031,
1027,
1002,
1006,
1005,
28744,
29218,
4183,
1035,
19429,
28139,
1005,
1007,
1012,
3643,
1025,
2065,
1006,
19429,
14031,
1012,
3091,
1027,
1027,
1016,
1007,
1063,
19429,
14031,
1027,
19429,
14031,
1009,
1000,
1011,
1000,
1025,
1065,
2047,
18176,
1012,
5227,
1006,
2131,
3126,
13728,
7716,
18845,
22734,
2595,
1006,
1007,
1010,
1063,
2004,
6038,
2818,
4948,
3560,
1024,
2995,
1010,
9345,
4877,
23235,
2015,
1024,
6270,
1010,
2006,
9006,
10814,
2618,
1024,
3853,
1006,
5227,
1010,
1046,
3385,
1007,
1063,
18176,
22578,
2239,
1006,
5227,
1010,
1046,
3385,
1007,
1065,
1010,
11709,
1024,
1005,
18176,
1027,
1015,
1004,
19429,
14031,
1027,
1005,
1009,
19429,
14031,
1065,
1007,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1008,
1030,
2544,
17917,
2078,
1024,
1002,
30526
] |
import React, {Component} from 'react';
import {connect} from 'react-redux';
class MapFull extends Component {
constructor() {
super();
this.state = {
htmlContent: null
};
}
componentDidMount() {
this.getMapHtml();
}
componentDidUpdate(prevProps, prevState) {
if (!this.props.map || this.props.map.filehash !== prevProps.map.filehash) {
this.getMapHtml();
}
}
getMapHtml() {
const path = this.props.settings.html_url + this.props.map.filehash;
fetch(path).then(response => {
return response.text();
}).then(response => {
this.setState({
htmlContent: response
});
});
}
getMarkup() {
return {__html: this.state.htmlContent}
}
render() {
return (
<div className="MapFull layoutbox">
<h3>{this.props.map.titlecache}</h3>
<div id="overDiv" style={{position: 'fixed', visibility: 'hide', zIndex: 1}}></div>
<div>
{this.state.htmlContent ? <div>
<div dangerouslySetInnerHTML={this.getMarkup()}></div>
</div> : null}
</div>
</div>
)
}
}
function mapStateToProps(state) {
return {settings: state.settings}
}
export default connect(mapStateToProps)(MapFull);
|
howardjones/network-weathermap
|
websrc/cacti-user/src/components/MapFull.js
|
JavaScript
|
mit
| 1,270
|
[
30522,
12324,
10509,
1010,
1063,
6922,
1065,
2013,
1005,
10509,
1005,
1025,
12324,
1063,
7532,
1065,
2013,
1005,
10509,
1011,
2417,
5602,
1005,
1025,
2465,
4949,
3993,
2140,
8908,
6922,
1063,
9570,
2953,
1006,
1007,
1063,
3565,
1006,
1007,
1025,
2023,
1012,
2110,
1027,
1063,
16129,
8663,
6528,
2102,
1024,
19701,
1065,
1025,
1065,
6922,
4305,
22117,
21723,
1006,
1007,
1063,
2023,
1012,
2131,
2863,
8458,
21246,
2140,
1006,
1007,
1025,
1065,
6922,
4305,
8566,
17299,
3686,
1006,
3653,
2615,
21572,
4523,
1010,
3653,
15088,
12259,
1007,
1063,
2065,
1006,
999,
2023,
1012,
24387,
1012,
4949,
1064,
1064,
2023,
1012,
24387,
1012,
4949,
1012,
5371,
14949,
2232,
999,
1027,
1027,
3653,
2615,
21572,
4523,
1012,
4949,
1012,
5371,
14949,
2232,
1007,
1063,
2023,
1012,
2131,
2863,
8458,
21246,
2140,
1006,
1007,
1025,
1065,
1065,
2131,
2863,
8458,
21246,
2140,
1006,
1007,
1063,
9530,
3367,
4130,
1027,
2023,
1012,
24387,
1012,
10906,
1012,
16129,
1035,
24471,
2140,
1009,
2023,
1012,
24387,
1012,
4949,
1012,
5371,
14949,
2232,
1025,
18584,
1006,
4130,
1007,
1012,
2059,
1006,
3433,
1027,
1028,
1063,
2709,
3433,
1012,
3793,
1006,
1007,
1025,
1065,
1007,
1012,
2059,
1006,
3433,
1027,
1028,
1063,
2023,
1012,
4520,
12259,
1006,
1063,
16129,
8663,
6528,
2102,
1024,
3433,
1065,
1007,
1025,
1065,
1007,
1025,
1065,
2131,
10665,
6279,
1006,
1007,
1063,
2709,
1063,
1035,
1035,
16129,
1024,
2023,
1012,
2110,
1012,
16129,
8663,
6528,
2102,
1065,
1065,
17552,
1006,
1007,
1063,
2709,
1006,
30524,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
2058,
4305,
2615,
1000,
2806,
1027,
1063,
1063,
2597,
1024,
1005,
4964,
1005,
1010,
16476,
1024,
1005,
5342,
1005,
1010,
1062,
22254,
10288,
1024,
1015,
1065,
1065,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
1028,
1063,
2023,
1012,
2110,
1012,
16129,
8663,
6528,
2102,
1029,
1026,
4487,
2615,
1028,
1026,
4487,
2615,
20754,
13462,
23111,
2121,
11039,
19968,
1027,
1063,
2023,
1012,
2131,
10665,
6279,
1006,
1007,
1065,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1024,
19701,
1065,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1007,
1065,
1065,
3853,
7341,
12259,
14399,
18981,
2015,
1006,
2110,
1007,
1063,
2709,
1063,
10906,
1024,
2110,
1012,
10906,
1065,
1065,
9167,
12398,
7532,
1006,
7341,
12259,
14399,
18981,
2015,
1007,
1006,
4949,
3993,
2140,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
1026,
4487,
2615,
2465,
18442,
1027,
1000,
4949,
3993,
2140,
9621,
8758,
1000,
1028,
1026,
1044,
2509,
1028,
1063,
2023,
1012,
24387,
1012,
4949,
1012,
2516,
3540,
5403,
1065,
1026,
1013,
1044,
2509,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1026,
4487,
2615,
2465,
18442,
1027,
1000,
4949,
3993,
2140,
9621,
8758,
1000,
1028,
1026,
1044,
2509,
1028,
1063,
2023,
1012,
24387,
1012,
4949,
1012,
2516,
3540,
5403,
1065,
1026,
1013,
1044,
2509,
30526
] |
/**
* Global Sensor Networks (GSN) Source Code
* Copyright (c) 2006-2014, Ecole Polytechnique Federale de Lausanne (EPFL)
*
* This file is part of GSN.
*
* GSN is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GSN 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 GSN. If not, see <http://www.gnu.org/licenses/>.
*
* File: src/gsn/vsensor/GridRenderer.java
*
* @author Sofiane Sarni
* @author Julien Eberle
*
*/
package gsn.vsensor;
import gsn.beans.DataTypes;
import gsn.beans.StreamElement;
import gsn.beans.VSensorConfig;
import gsn.utils.geo.GridTools;
import org.apache.log4j.Logger;
import javax.imageio.ImageIO;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Hashtable;
import java.util.TreeMap;
public class GridRenderer extends AbstractVirtualSensor {
private static final transient Logger logger = Logger.getLogger(GridRenderer.class);
private static final String CELL_PIXELS = "cellpixels";
private static final String MAP_OVERLAY = "mapoverlay";
private static final String MAX_V = "max_value";
private static final String MIN_V = "min_value";
private int map[];
private double min_v;
private double max_v;
private double minvalue;
private double maxvalue;
private double cellsize;
private double yllcorner;
private double xllcorner;
private int ncols;
private int nrows;
//to avoid querying all the time the same image from osm, we cache it.
private Hashtable<Double,BufferedImage> cache = new Hashtable<Double,BufferedImage>();
int cell_pixels = 20;
boolean map_overlay = false;
@Override
public boolean initialize() {
VSensorConfig vsensor = getVirtualSensorConfiguration();
TreeMap<String, String> params = vsensor.getMainClassInitialParams();
// Approximative number of pixels for one cell of the array
String cell_pixels_str = params.get(CELL_PIXELS);
if (cell_pixels_str != null) {
cell_pixels_str = cell_pixels_str.trim().toLowerCase();
try {
cell_pixels = Integer.parseInt(cell_pixels_str.trim());
} catch (NumberFormatException e) {
logger.warn("Parameter \"" + CELL_PIXELS + "\" has incorrect value in Virtual Sensor file. Assuming default value.");
}
}
//value to be assigned to the min of the color scale
String min_str = params.get(MIN_V);
if (min_str != null) {
min_str = min_str.trim().toLowerCase();
try {
min_v = Double.parseDouble(min_str.trim());
} catch (NumberFormatException e) {
logger.warn("Parameter \"" + MIN_V + "\" has incorrect value in Virtual Sensor file.");
}
}
//value to be assigned to the max of the color scale
String max_str = params.get(MAX_V);
if (max_str != null) {
max_str = max_str.trim().toLowerCase();
try {
max_v = Double.parseDouble(max_str.trim());
} catch (NumberFormatException e) {
logger.warn("Parameter \"" + MAX_V + "\" has incorrect value in Virtual Sensor file.");
}
}
//using or not the osm overlay
String map_overlay_str = params.get(MAP_OVERLAY);
if (map_overlay_str != null) {
map_overlay_str = map_overlay_str.trim().toLowerCase();
if(map_overlay_str.equals("no") || map_overlay_str.equals("false")){
map_overlay = false;
}else if(map_overlay_str.equals("yes") || map_overlay_str.equals("true")){
map_overlay = true;
} else {
logger.warn("Parameter \"" + MAP_OVERLAY + "\" has incorrect value in Virtual Sensor file. Assuming default value.");
}
}
initColorMap();
return true;
}
@Override
public void dispose() {
}
@Override
public void dataAvailable(String inputStreamName, StreamElement streamElement) {
ncols = (Integer) streamElement.getData("ncols");
nrows = (Integer) streamElement.getData("nrows");
xllcorner = (Double) streamElement.getData("xllcorner");
yllcorner = (Double) streamElement.getData("yllcorner");
cellsize = (Double) streamElement.getData("cellsize"); // must be in meters
long timestamp = streamElement.getTimeStamp();
Double values[][] = GridTools.deSerialize((byte[]) streamElement.getData("grid"));
byte b[] = createImageFromArray(values);
StreamElement se = new StreamElement(new String[]{"grid"},
new Byte[]{DataTypes.BINARY},
new Serializable[]{b},
timestamp);
dataProduced(se);
}
/**
* earth radius taken from
* http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.htm
* grayscale conversion from
* http://en.wikipedia.org/wiki/Grayscale
* openstreetmap zoom conversion taken from
* http://wiki.openstreetmap.org/wiki/Zoom_levels
* @param a
* @return
*/
private byte[] createImageFromArray(Double[][] a) {
BufferedImage back;
// if the min and max values are not given, we search for them in the array of data
if ((min_v == 0 && max_v == 0) || min_v >= max_v){
minvalue = a[0][0];
maxvalue = a[0][0];
for (int i = 0; i < a.length; i++)
for (int j = 0; j < a[0].length; j++) {
if (minvalue > a[i][j]) minvalue = a[i][j];
if (maxvalue < a[i][j]) maxvalue = a[i][j];
}
}else{
minvalue = min_v;
maxvalue = max_v;
}
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
if (map_overlay){
//openstreetmap needs the center of the tile (lat/lon) for querying the map...
double centerY = yllcorner + (360/(6356752.0*2*Math.PI) * cellsize * nrows)/2;
double centerX = xllcorner + (360/(6378137*2*Math.PI*Math.cos(Math.toRadians(centerY)))*cellsize * ncols)/2;
//... and the zoom level
int zoom = (int) Math.ceil(Math.log(cell_pixels*6378137*2*Math.PI*Math.cos(Math.toRadians(centerY))/cellsize)/Math.log(2)-8);
//then we adjust the number of pixel per cell to match the zoom level's pixel/meter and compute the whole image size
int width = (int) (cellsize * ncols / (6378137*2*Math.PI*Math.cos(Math.toRadians(centerY))/Math.pow(2, zoom+8)));
int height = (int) (cellsize * nrows / (6378137*2*Math.PI*Math.cos(Math.toRadians(centerY))/Math.pow(2, zoom+8)));
//the two images that will be blent later
BufferedImage osmap = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
back = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
//getting map from the cache or directly from osm staticmap
try {//the key should guarantee some kind of uniqueness to the map tile
if (cache.containsKey(centerX+centerY*180+zoom*180*360+width*180*360*20+height*180*360*20*1000)){
osmap = cache.get(centerX+centerY*180+zoom*180*360+width*180*360*20+height*180*360*20*1000);
}else{
//You need to use a Tile Map Service for generating the map images.
//you can get a list here: http://wiki.openstreetmap.org/wiki/TMS
//Please read their policy and consider setting up you own service if you use it a lot
//The grid renderer is caching the tiles and only makes a new request when one of the 5 parameters changes or the server restarts
osmap = ImageIO.read(new URL("please insert the url here?center="+centerY+","+centerX+"&zoom="+zoom+"&size="+width+"x"+height));
cache.put(centerX+centerY*180+zoom*180*360+width*180*360*20+height*180*360*20*1000, osmap);
}
} catch (MalformedURLException e1) {
e1.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}
//go through the picture pixel by pixel
for (int x=0;x<width;x++)
for (int y=0;y<height;y++){
//the indices in the grid corresponding to this pixel
int i = (int) (x/(width * 1.0 / ncols));
int j = (int) (y/(height * 1.0 / ncols));
// convert map to black/white
int val = osmap.getRGB(x, y);
int r = (val & 0x00ff0000) >> 16;
int g = (val & 0x0000ff00) >> 8;
int b = (val & 0x000000ff);
int bw = (int)(0.2126*r+0.7152*g+0.0722*b);
//and blend it with the color from the grid of values
int color = mapValue(a[j][i]);
int r2 = (color & 0x00ff0000) >> 16;
int g2 = (color & 0x0000ff00) >> 8;
int b2 = (color & 0x000000ff);
int rgb = (bw+r2)/2 * 256 * 256 + (bw+g2)/2 * 256 + (bw+b2)/2;
back.setRGB(x, y, rgb);
}
} else {
int Y = a.length;
int X = a[0].length;
back = new BufferedImage(X * cell_pixels, Y * cell_pixels, BufferedImage.TYPE_INT_RGB);
int bigPixel[] = new int[cell_pixels * cell_pixels];
for (int i = 0; i < X; ++i)
for (int j = 0; j < Y; ++j) {
int color = mapValue(a[j][i]);
for (int k = 0; k < cell_pixels * cell_pixels; k++)
bigPixel[k] = color;
back.setRGB(i * cell_pixels, j * cell_pixels, cell_pixels, cell_pixels, bigPixel, 0, cell_pixels);
}
}
// draw the gradient of the scale
int bigPixel[] = new int[15];
for (int x=0;x<back.getHeight();x++){
int color = map[255-(int)(x*255.0/back.getHeight())];
for (int k = 0; k < 15; k++)
bigPixel[k] = color;
back.setRGB(0, x, 15, 1, bigPixel, 0,15);
}
// draw the min and max of the scale
Graphics2D gp = back.createGraphics();
gp.setColor(Color.black);
gp.drawString(""+maxvalue, 3, 12);
gp.drawString(""+minvalue, 3, back.getHeight()-3);
try {
ImageIO.write(back, "png", outputStream);
} catch (IOException e) {
logger.warn(e.getMessage(), e);
}
return outputStream.toByteArray();
}
// green-yellow-red color map
public void initColorMap() {
map = new int[256];
int r, g, b;
for (int i = 0; i <= 255; i++) {
if (i < 128)
r = 255;
else
r = 255 - i * 2;
if (i < 128)
g = i * 2;//i;
else
g = 255;
b = 0;//255;
map[255-i] = r * 256 * 256 + g * 256 + b;
}
}
/**
* Get the value of the color from the map and returns black if the value is greater than the max or white if the value is smaller than the min
* @param value: rgb color
* @return
*/
public int mapValue(double value) {
if (value > maxvalue)
return 0; //black
if (value < minvalue)
return 255 * 256 * 256 + 255 * 256 + 255; //white
return map[(int) Math.round((value - minvalue) * 255 / (maxvalue - minvalue))];
}
}
|
EliasFarhan/gsn
|
src/main/java/gsn/vsensor/GridRenderer.java
|
Java
|
gpl-3.0
| 12,336
|
[
30522,
1013,
1008,
1008,
1008,
3795,
13617,
6125,
1006,
28177,
2078,
1007,
3120,
3642,
1008,
9385,
1006,
1039,
1007,
2294,
1011,
2297,
1010,
12431,
26572,
15007,
3490,
4226,
2976,
2063,
2139,
22256,
1006,
4958,
10258,
1007,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
28177,
2078,
1012,
1008,
1008,
28177,
2078,
2003,
2489,
4007,
1024,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
1008,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
2236,
2270,
6105,
2004,
2405,
2011,
1008,
1996,
2489,
4007,
3192,
1010,
2593,
2544,
1017,
1997,
1996,
6105,
1010,
2030,
1008,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
1008,
1008,
28177,
2078,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
1008,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
1008,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
1008,
27004,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
1008,
1008,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
2236,
2270,
6105,
1008,
2247,
2007,
28177,
2078,
1012,
2065,
2025,
1010,
2156,
1026,
8299,
1024,
1013,
1013,
7479,
1012,
27004,
1012,
8917,
1013,
15943,
1013,
1028,
1012,
1008,
1008,
5371,
1024,
5034,
2278,
1013,
28177,
2078,
1013,
5443,
6132,
2953,
1013,
8370,
7389,
4063,
2121,
1012,
9262,
1008,
1008,
1030,
3166,
8755,
2638,
18906,
3490,
1008,
1030,
3166,
19290,
1041,
5677,
2571,
1008,
1008,
1013,
7427,
28177,
2078,
1012,
5443,
6132,
2953,
1025,
12324,
28177,
2078,
1012,
13435,
1012,
2951,
13874,
2015,
1025,
12324,
28177,
2078,
1012,
13435,
1012,
5460,
12260,
3672,
1025,
12324,
28177,
2078,
1012,
13435,
1012,
5443,
6132,
2953,
8663,
8873,
2290,
1025,
12324,
28177,
2078,
1012,
21183,
12146,
1012,
20248,
1012,
8370,
3406,
27896,
1025,
12324,
8917,
1012,
15895,
1012,
8833,
2549,
3501,
1012,
8833,
4590,
1025,
12324,
9262,
2595,
1012,
3746,
3695,
1012,
3746,
3695,
1025,
12324,
9262,
1012,
22091,
2102,
1012,
3609,
1025,
12324,
9262,
1012,
22091,
2102,
1012,
8389,
2475,
2094,
1025,
12324,
9262,
1012,
22091,
2102,
1012,
3746,
1012,
17698,
2098,
9581,
3351,
1025,
12324,
9262,
1012,
22834,
1012,
24880,
2906,
9447,
5833,
18780,
21422,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
17048,
14876,
8630,
10288,
24422,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
5833,
18780,
21422,
1025,
12324,
9262,
1012,
22834,
1012,
22834,
10288,
24422,
1025,
12324,
9262,
1012,
22834,
1012,
7642,
21335,
3468,
1025,
12324,
9262,
1012,
5658,
1012,
15451,
29021,
3126,
2571,
2595,
24422,
1025,
12324,
30524,
21183,
4014,
1012,
23325,
10880,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3392,
2863,
2361,
1025,
2270,
2465,
8370,
7389,
4063,
2121,
8908,
10061,
21663,
26302,
4877,
6132,
2953,
1063,
2797,
10763,
2345,
25354,
8833,
4590,
8833,
4590,
1027,
8833,
4590,
1012,
2131,
21197,
4590,
1006,
8370,
7389,
4063,
2121,
1012,
2465,
1007,
1025,
2797,
10763,
2345,
5164,
3526,
1035,
27725,
1027,
1000,
3526,
8197,
2595,
9050,
1000,
1025,
2797,
10763,
2345,
5164,
4949,
1035,
2058,
8485,
1027,
1000,
4949,
7840,
8485,
1000,
1025,
2797,
10763,
30523,
9262,
1012,
5658,
1012,
24471,
2140,
1025,
12324,
9262,
1012,
30526
] |
[
0,
0,
0,
0,
0,
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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
9262,
1012,
5658,
1012,
24471,
2140,
1025,
12324,
9262,
1012,
30526
] |
module.exports = {
project: {
server: {
basePath: '',
ip: '0.0.0.0',
request: {
sesskey: 'sid',
limit: 5000,
parameters: 60
},
render: 'swig',
path: {
routes: 'app/routes',
views: 'app/views',
public: 'public/',
docs: false
},
views: {
extension: 'swig',
errors: 'errors/'
}
}
},
environment: {
server: {
debug: true,
host: 'localhost',
port: 3000,
request: {
secret: new Date().getTime() + '' + Math.random(),
cors: true,
geolocation: false
},
views: {
cache: false
}
}
}
};
|
PearlVentures/Crux
|
boilerplate/server/config.js
|
JavaScript
|
mit
| 699
|
[
30522,
11336,
1012,
14338,
1027,
1063,
2622,
1024,
1063,
8241,
1024,
1063,
2918,
15069,
1024,
1005,
1005,
1010,
12997,
1024,
1005,
1014,
1012,
1014,
1012,
1014,
1012,
1014,
1005,
1010,
5227,
1024,
1063,
7367,
4757,
14839,
1024,
1005,
15765,
1005,
1010,
5787,
1024,
13509,
1010,
11709,
1024,
3438,
1065,
1010,
17552,
1024,
1005,
25430,
8004,
1005,
1010,
4130,
1024,
1063,
5847,
1024,
1005,
10439,
1013,
5847,
1005,
1010,
5328,
1024,
1005,
10439,
1013,
5328,
1005,
1010,
2270,
1024,
1005,
2270,
1013,
1005,
1010,
9986,
2015,
1024,
6270,
1065,
1010,
5328,
1024,
1063,
5331,
1024,
1005,
25430,
8004,
1005,
1010,
10697,
1024,
1005,
10697,
1013,
1005,
1065,
1065,
1065,
1010,
4044,
1024,
1063,
8241,
1024,
1063,
2139,
8569,
2290,
1024,
2995,
1010,
3677,
1024,
1005,
2334,
15006,
2102,
1005,
1010,
3417,
1024,
11910,
1010,
5227,
1024,
1063,
3595,
1024,
2047,
3058,
1006,
1007,
1012,
2131,
7292,
1006,
1007,
1009,
1005,
1005,
1009,
8785,
1012,
6721,
1006,
1007,
1010,
2522,
2869,
1024,
2995,
1010,
20248,
4135,
10719,
1024,
6270,
1065,
1010,
5328,
1024,
1063,
17053,
1024,
6270,
1065,
1065,
1065,
1065,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jetbrains.python.console;
import com.google.common.collect.Maps;
import com.intellij.execution.console.LanguageConsoleView;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.Consumer;
import com.intellij.util.PathMapper;
import com.jetbrains.python.buildout.BuildoutFacet;
import com.jetbrains.python.run.PythonCommandLineState;
import com.jetbrains.python.run.PythonRunConfiguration;
import com.jetbrains.python.sdk.PythonEnvUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
* @author traff
*/
public class PydevConsoleRunnerFactory extends PythonConsoleRunnerFactory {
protected static class ConsoleParameters {
@NotNull Project project;
@NotNull Sdk sdk;
@Nullable String workingDir;
@NotNull Map<String, String> envs;
@NotNull PyConsoleType consoleType;
@NotNull PyConsoleOptions.PyConsoleSettings settingsProvider;
@NotNull Consumer<String> rerunAction;
@NotNull String[] setupFragment;
public ConsoleParameters(@NotNull Project project,
@NotNull Sdk sdk,
@Nullable String workingDir,
@NotNull Map<String, String> envs,
@NotNull PyConsoleType consoleType,
@NotNull PyConsoleOptions.PyConsoleSettings settingsProvider,
@NotNull Consumer<String> rerunAction,
@NotNull String[] setupFragment) {
this.project = project;
this.sdk = sdk;
this.workingDir = workingDir;
this.envs = envs;
this.consoleType = consoleType;
this.settingsProvider = settingsProvider;
this.rerunAction = rerunAction;
this.setupFragment = setupFragment;
}
}
protected ConsoleParameters createConsoleParameters(@NotNull Project project,
@Nullable Module contextModule) {
Pair<Sdk, Module> sdkAndModule = PydevConsoleRunner.findPythonSdkAndModule(project, contextModule);
@Nullable Module module = sdkAndModule.second;
Sdk sdk = sdkAndModule.first;
assert sdk != null;
PyConsoleOptions.PyConsoleSettings settingsProvider = PyConsoleOptions.getInstance(project).getPythonConsoleSettings();
PathMapper pathMapper = PydevConsoleRunner.getPathMapper(project, sdk, settingsProvider);
String workingDir = getWorkingDir(project, module, pathMapper, settingsProvider);
String[] setupFragment = createSetupFragment(module, workingDir, pathMapper, settingsProvider);
Map<String, String> envs = Maps.newHashMap(settingsProvider.getEnvs());
putIPythonEnvFlag(project, envs);
Consumer<String> rerunAction = title -> {
PydevConsoleRunner runner = createConsoleRunner(project, module);
if (runner instanceof PydevConsoleRunnerImpl) {
((PydevConsoleRunnerImpl)runner).setConsoleTitle(title);
}
runner.run(true);
};
return new ConsoleParameters(project, sdk, workingDir, envs, PyConsoleType.PYTHON, settingsProvider, rerunAction, setupFragment);
}
@Override
@NotNull
public PydevConsoleRunner createConsoleRunner(@NotNull Project project,
@Nullable Module contextModule) {
final ConsoleParameters consoleParameters = createConsoleParameters(project, contextModule);
return createConsoleRunner(project, consoleParameters.sdk, consoleParameters.workingDir, consoleParameters.envs,
consoleParameters.consoleType,
consoleParameters.settingsProvider, consoleParameters.rerunAction, consoleParameters.setupFragment);
}
public static void putIPythonEnvFlag(@NotNull Project project, Map<String, String> envs) {
String ipythonEnabled = PyConsoleOptions.getInstance(project).isIpythonEnabled() ? "True" : "False";
envs.put(PythonEnvUtil.IPYTHONENABLE, ipythonEnabled);
}
@Nullable
public static String getWorkingDir(@NotNull Project project,
@Nullable Module module,
@Nullable PathMapper pathMapper,
PyConsoleOptions.PyConsoleSettings settingsProvider) {
String workingDir = settingsProvider.getWorkingDirectory();
if (StringUtil.isEmpty(workingDir)) {
if (module != null && ModuleRootManager.getInstance(module).getContentRoots().length > 0) {
workingDir = ModuleRootManager.getInstance(module).getContentRoots()[0].getPath();
}
else {
if (ModuleManager.getInstance(project).getModules().length > 0) {
VirtualFile[] roots = ModuleRootManager.getInstance(ModuleManager.getInstance(project).getModules()[0]).getContentRoots();
if (roots.length > 0) {
workingDir = roots[0].getPath();
}
}
}
}
if (pathMapper != null && workingDir != null) {
workingDir = pathMapper.convertToRemote(workingDir);
}
return workingDir;
}
public static String[] createSetupFragment(@Nullable Module module,
@Nullable String workingDir,
@Nullable PathMapper pathMapper,
PyConsoleOptions.PyConsoleSettings settingsProvider) {
String customStartScript = settingsProvider.getCustomStartScript();
if (customStartScript.trim().length() > 0) {
customStartScript = "\n" + customStartScript;
}
Collection<String> pythonPath = PythonCommandLineState.collectPythonPath(module, settingsProvider.shouldAddContentRoots(),
settingsProvider.shouldAddSourceRoots());
if (pathMapper != null) {
pythonPath = pathMapper.convertToRemote(pythonPath);
}
String selfPathAppend = PydevConsoleRunner.constructPyPathAndWorkingDirCommand(pythonPath, workingDir, customStartScript);
BuildoutFacet facet = null;
if (module != null) {
facet = BuildoutFacet.getInstance(module);
}
String[] setupFragment;
if (facet != null) {
List<String> path = facet.getAdditionalPythonPath();
if (pathMapper != null) {
path = pathMapper.convertToRemote(path);
}
String prependStatement = facet.getPathPrependStatement(path);
setupFragment = new String[]{prependStatement, selfPathAppend};
}
else {
setupFragment = new String[]{selfPathAppend};
}
return setupFragment;
}
@NotNull
protected PydevConsoleRunner createConsoleRunner(@NotNull Project project,
@NotNull Sdk sdk,
@Nullable String workingDir,
@NotNull Map<String, String> envs,
@NotNull PyConsoleType consoleType,
@NotNull PyConsoleOptions.PyConsoleSettings settingsProvider,
@NotNull Consumer<String> rerunAction,
@NotNull String... setupFragment) {
return new PydevConsoleRunnerImpl(project, sdk, consoleType, workingDir, envs, settingsProvider, rerunAction, setupFragment);
}
@NotNull
public PydevConsoleRunner createConsoleRunnerWithFile(@NotNull Project project,
@Nullable Module contextModule,
@Nullable String runFileText,
@NotNull PythonRunConfiguration config) {
final ConsoleParameters consoleParameters = createConsoleParameters(project, contextModule);
Consumer<String> rerunAction = title -> {
PydevConsoleRunner runner = createConsoleRunnerWithFile(project, contextModule, runFileText, config);
if (runner instanceof PydevConsoleRunnerImpl) {
((PydevConsoleRunnerImpl)runner).setConsoleTitle(title);
}
final PythonConsoleToolWindow toolWindow = PythonConsoleToolWindow.getInstance(project);
runner.addConsoleListener(new PydevConsoleRunner.ConsoleListener() {
@Override
public void handleConsoleInitialized(LanguageConsoleView consoleView) {
if (consoleView instanceof PyCodeExecutor) {
((PyCodeExecutor)consoleView).executeCode(runFileText, null);
if (toolWindow != null) {
toolWindow.getToolWindow().show(null);
}
}
}
});
runner.run(true);
};
Sdk sdk = config.getSdk() != null ? config.getSdk() : consoleParameters.sdk;
String workingDir = config.getWorkingDirectory() != null ? config.getWorkingDirectory() : consoleParameters.workingDir;
return new PydevConsoleWithFileRunnerImpl(project, sdk, consoleParameters.consoleType, workingDir,
consoleParameters.envs, consoleParameters.settingsProvider, rerunAction, config,
consoleParameters.setupFragment);
}
}
|
jk1/intellij-community
|
python/src/com/jetbrains/python/console/PydevConsoleRunnerFactory.java
|
Java
|
apache-2.0
| 10,269
|
[
30522,
1013,
1008,
1008,
9385,
2456,
1011,
2297,
6892,
10024,
7076,
1055,
1012,
1054,
1012,
1051,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
30524,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
7427,
4012,
1012,
6892,
10024,
7076,
1012,
18750,
1012,
10122,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
8145,
1012,
7341,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
7781,
1012,
10122,
1012,
2653,
8663,
19454,
6777,
2666,
2860,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
2330,
9331,
2072,
1012,
11336,
1012,
11336,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
2330,
9331,
2072,
1012,
11336,
1012,
11336,
24805,
4590,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
2330,
9331,
2072,
1012,
2622,
1012,
2622,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
2330,
9331,
2072,
1012,
2622,
3217,
12868,
1012,
17371,
2243,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
2330,
9331,
2072,
1012,
6147,
1012,
11336,
3217,
4140,
24805,
4590,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
2330,
9331,
2072,
1012,
21183,
4014,
1012,
3940,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
2330,
9331,
2072,
1012,
21183,
4014,
1012,
3793,
1012,
5164,
21823,
2140,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
2330,
9331,
2072,
1012,
1058,
10343,
1012,
7484,
8873,
2571,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
21183,
4014,
1012,
7325,
1025,
12324,
4012,
1012,
13420,
3669,
3501,
1012,
21183,
4014,
1012,
4130,
2863,
18620,
1025,
12324,
4012,
1012,
6892,
10024,
7076,
1012,
18750,
1012,
3857,
5833,
1012,
3857,
5833,
12172,
2102,
1025,
12324,
4012,
1012,
6892,
10024,
7076,
1012,
18750,
1012,
2448,
1012,
18750,
9006,
2386,
19422,
10586,
12259,
1025,
12324,
4012,
1012,
6892,
10024,
7076,
1012,
18750,
1012,
2448,
1012,
18750,
15532,
8663,
8873,
27390,
3370,
1025,
12324,
4012,
1012,
6892,
10024,
7076,
1012,
18750,
1012,
17371,
2243,
1012,
18750,
2368,
19722,
3775,
2140,
1025,
12324,
8917,
1012,
6892,
10024,
7076,
1012,
5754,
17287,
9285,
1012,
2025,
11231,
3363,
1025,
12324,
8917,
1012,
6892,
10024,
7076,
1012,
5754,
17287,
9285,
1012,
19701,
3085,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3074,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
4949,
1025,
1013,
1008,
1008,
1008,
1030,
3166,
19817,
10354,
2546,
1008,
1013,
2270,
2465,
1052,
18124,
25465,
5644,
9890,
23195,
21450,
8908,
18750,
8663,
19454,
2121,
4609,
3678,
21450,
30523,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
30526
] |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>SB Admin 2 - Bootstrap Admin Theme</title>
<!-- Bootstrap Core CSS -->
<link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- MetisMenu CSS -->
<link href="../vendor/metisMenu/metisMenu.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="../dist/css/sb-admin-2.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="../vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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="index.html">Compilador</a>
</div>
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li>
<a href="index.html"><i class="fa fa-dashboard fa-fw"></i> Inicio</a>
</li>
<li>
<a href="basico.html"><i class="fa fa-bicycle fa-fw"></i> Basico</a>
</li>
<li>
<a href="medio.html"><i class="fa fa-car fa-fw"></i> Intermedio</a>
</li>
<li>
<a href="avanzado.html"><i class="fa fa-bus fa-fw"></i> Avanzado</a>
</li>
<li>
<a href="codigointermedio.html"><i class="fa fa-code-fork fa-fw"></i> Generacion Codigo Intermedio</a>
</li>
<li>
<a href="debug.html"><i class="fa fa-bug fa-fw"></i> Debug</a>
</li>
<li>
<a href="generador.html"><i class="fa fa-code fa-fw"></i> Generador</a>
</li>
<li>
<a href="optimizador.html"><i class="fa fa-cogs fa-fw"></i> Optimizador</a>
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- /.navbar-static-side -->
</nav>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Avanzado</h1>
</div>
<div class="row">
<!-- /.col-lg-12 -->
<div class="col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">Programa Basic 3D
<span class="fa-stack fa-lg pull-right" style="margin-top: -9px;">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-play fa-stack-1x fa-inverse"></i>
</span>
<span class="fa-stack fa-lg pull-right" style="margin-top: -9px;">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-bug fa-stack-1x fa-inverse"></i>
</span>
<span class="fa-stack fa-lg pull-right" style="margin-top: -9px;">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-level-up fa-stack-1x fa-inverse"></i>
</span>
<span class="fa-stack fa-lg pull-right" style="margin-top: -9px;">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-level-down fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<textarea style="width: 100%;"></textarea>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">Estructuras
<span class="fa-stack fa-lg pull-right" style="margin-top: -9px;">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-play fa-stack-1x fa-inverse"></i>
</span>
<span class="fa-stack fa-lg pull-right" style="margin-top: -9px;">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-bug fa-stack-1x fa-inverse"></i>
</span>
</div>
<div class="panel-body">
<textarea style="width: 100%;"></textarea>
</div>
</div>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="../vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="../vendor/metisMenu/metisMenu.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="../dist/js/sb-admin-2.js"></script>
</body>
</html>
|
renatosierra/rainman
|
pages/avanzado.html
|
HTML
|
mit
| 6,929
|
[
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
11374,
1027,
1000,
4372,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
1060,
1011,
25423,
1011,
11892,
1000,
4180,
1027,
1000,
29464,
1027,
3341,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
3193,
6442,
1000,
4180,
1027,
1000,
9381,
1027,
5080,
1011,
9381,
1010,
3988,
1011,
4094,
30524,
2516,
1028,
1026,
999,
1011,
1011,
6879,
6494,
2361,
4563,
20116,
2015,
1011,
1011,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
21431,
1013,
6879,
6494,
2361,
1013,
20116,
2015,
1013,
6879,
6494,
2361,
1012,
8117,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
1028,
1026,
999,
1011,
1011,
26057,
3549,
2226,
20116,
2015,
1011,
1011,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
21431,
1013,
26057,
3549,
2226,
1013,
26057,
3549,
2226,
1012,
8117,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
1028,
1026,
999,
1011,
1011,
7661,
20116,
2015,
1011,
1011,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
4487,
3367,
1013,
20116,
2015,
1013,
24829,
1011,
4748,
10020,
1011,
1016,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
1028,
1026,
999,
1011,
1011,
7661,
15489,
2015,
1011,
1011,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
21431,
1013,
15489,
1011,
12476,
1013,
20116,
2015,
1013,
15489,
1011,
12476,
1012,
8117,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1028,
1026,
999,
1011,
1011,
16129,
2629,
11895,
2213,
1998,
6869,
1012,
1046,
2015,
29464,
2620,
2490,
1997,
16129,
2629,
3787,
1998,
2865,
10861,
5134,
1011,
1011,
1028,
1026,
999,
1011,
1011,
5432,
1024,
6869,
1012,
1046,
2015,
2987,
1005,
1056,
2147,
2065,
2017,
3193,
1996,
3931,
3081,
5371,
1024,
1013,
1013,
1011,
1011,
1028,
1026,
999,
1011,
1011,
1031,
2065,
8318,
29464,
1023,
1033,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
16770,
1024,
1013,
1013,
9808,
2015,
1012,
4098,
19797,
2078,
1012,
4012,
1013,
5622,
5910,
1013,
16129,
2629,
6182,
2615,
1013,
1017,
1012,
1021,
1012,
1014,
1013,
16129,
2629,
6182,
2615,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
16770,
1024,
1013,
1013,
9808,
2015,
1012,
4098,
19797,
2078,
1012,
4012,
1013,
5622,
5910,
1013,
6869,
1012,
1046,
2015,
1013,
1015,
1012,
1018,
1012,
1016,
1013,
6869,
1012,
8117,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
999,
1031,
2203,
10128,
1033,
1011,
1011,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
10236,
4842,
1000,
1028,
1026,
999,
1011,
1011,
9163,
1011,
30523,
1027,
1015,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
6412,
1000,
4180,
1027,
1000,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
3166,
1000,
4180,
1027,
1000,
1000,
1028,
1026,
2516,
1028,
24829,
4748,
10020,
1016,
1011,
6879,
6494,
2361,
4748,
10020,
4323,
1026,
1013,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1027,
1015,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
6412,
1000,
4180,
1027,
1000,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
3166,
1000,
4180,
1027,
1000,
1000,
1028,
1026,
2516,
1028,
24829,
4748,
10020,
1016,
1011,
6879,
6494,
2361,
4748,
10020,
4323,
1026,
1013,
30526
] |
function Load(logic)
logic.name = "Path2"
logic.s_0 = 0
logic.s_1 = 14
x = 0
y = 0
--classic 3x3 design
logic:addSameType(0, x + 0, y + 0)
logic:addSameType(0, x + 1, y + 0)
logic:addSameType(0, x + 2, y + 0)
logic:addSameType(0, x + 0, y + 1)
logic:addSameType(0, x + 1, y + 1)
logic:addSameType(0, x + 2, y + 1)
logic:addSameType(0, x + 0, y + 2)
logic:addSameType(0, x + 1, y + 2)
logic:addSameType(0, x + 2, y + 2)
--inner corners design
logic:addSameType(0, x + 3, y + 0)
logic:addSameType(0, x + 4, y + 0)
logic:addSameType(0, x + 3, y + 1)
logic:addSameType(0, x + 4, y + 1)
end
function Eval(logic, info, u, d, l, r, ul, ur, dl, dr)
iu = u and 1 or 0
id = d and 1 or 0
il = l and 1 or 0
ir = r and 1 or 0
iul = ul and 1 or 0
iur = ur and 1 or 0
idl = dl and 1 or 0
idr = dr and 1 or 0
--println("u: " .. iu .. ", d: " .. id .. ", l: " .. il .. ", r: " .. ir .. ", ul: " .. iul .. ", ur: " .. iur .. ", dl: " .. idl .. ", dr: " .. idr);
x = 0
y = 0
info:Adjust(0, x + 1, y + 1)
if not u then
if not l then info:Adjust(0, x, y)
elseif not r then info:Adjust(0, x + 2, y)
else info:Adjust(0, x + 1, y + (dl and 0 or ul and 2 or 0))
end
elseif not d then
if not l then info:Adjust(0, x, y + 2)
elseif not r then info:Adjust(0, x + 2, y + 2)
else info:Adjust(0, x + 1, y + 2)
end
elseif u then
if not l then info:Adjust(0, x, y + 1)
elseif not r then info:Adjust(0, x + 2, y + 1)
end
end
if u and d and l and r then
if not ul then info:Adjust(0, x + 3, y)
elseif not ur then info:Adjust(0, x + 4, y)
elseif not dl then info:Adjust(0, x + 3, y + 1)
elseif not dr then info:Adjust(0, x + 4, y + 1)
end
end
if u and d and l and r and ul and ur and dl and dr then
info:Adjust(0, x + 1, y + 1)
end
end
|
oxysoft/PokeSharp
|
src/MapEditor/bin/Debug/Scripts/Logic/old/Path2.lua
|
Lua
|
mit
| 1,783
|
[
30522,
3853,
7170,
1006,
7961,
1007,
7961,
1012,
2171,
1027,
1000,
4130,
2475,
1000,
7961,
1012,
1055,
1035,
1014,
1027,
1014,
7961,
1012,
1055,
1035,
1015,
30524,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1014,
1010,
1061,
1009,
1014,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1015,
1010,
1061,
1009,
1014,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1016,
1010,
1061,
1009,
1014,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1014,
1010,
1061,
1009,
1015,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1015,
1010,
1061,
1009,
1015,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1016,
1010,
1061,
1009,
1015,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1014,
1010,
1061,
1009,
1016,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1015,
1010,
1061,
1009,
1016,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1016,
1010,
1061,
1009,
1016,
1007,
1011,
1011,
5110,
8413,
2640,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1017,
1010,
1061,
1009,
1014,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1018,
1010,
1061,
1009,
1014,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1017,
1010,
1061,
1009,
1015,
1007,
7961,
1024,
9909,
14074,
13874,
1006,
1014,
1010,
1060,
1009,
1018,
1010,
1061,
1009,
1015,
1007,
2203,
3853,
9345,
2140,
1006,
7961,
1010,
18558,
1010,
1057,
1010,
1040,
1010,
1048,
1010,
1054,
1010,
17359,
1010,
24471,
1010,
21469,
1010,
2852,
1007,
1045,
2226,
1027,
1057,
1998,
1015,
2030,
1014,
8909,
1027,
1040,
1998,
1015,
2030,
1014,
6335,
1027,
1048,
1998,
1015,
2030,
1014,
20868,
1027,
1054,
1998,
1015,
2030,
1014,
1045,
5313,
1027,
17359,
1998,
1015,
2030,
1014,
1045,
3126,
1027,
24471,
1998,
1015,
2030,
1014,
8909,
2140,
1027,
21469,
1998,
1015,
2030,
1014,
8909,
2099,
1027,
2852,
1998,
1015,
2030,
1014,
1011,
1011,
6140,
19666,
1006,
1000,
1057,
1024,
1000,
1012,
1012,
1045,
2226,
1012,
1012,
1000,
1010,
1040,
1024,
1000,
1012,
1012,
8909,
1012,
1012,
1000,
1010,
1048,
1024,
1000,
1012,
1012,
6335,
1012,
1012,
1000,
1010,
1054,
1024,
1000,
1012,
1012,
20868,
1012,
1012,
1000,
1010,
17359,
1024,
1000,
1012,
1012,
1045,
5313,
1012,
1012,
1000,
1010,
24471,
1024,
1000,
1012,
1012,
1045,
3126,
1012,
1012,
1000,
1010,
21469,
1024,
1000,
1012,
1012,
8909,
2140,
1012,
1012,
1000,
1010,
2852,
1024,
1000,
1012,
1012,
8909,
2099,
1007,
1025,
1060,
1027,
1014,
1061,
1027,
1014,
18558,
1024,
14171,
1006,
1014,
1010,
1060,
1009,
1015,
1010,
1061,
1009,
1015,
1007,
2065,
2025,
1057,
2059,
2065,
2025,
1048,
2059,
18558,
1024,
14171,
1006,
1014,
1010,
1060,
1010,
1061,
1007,
2842,
10128,
2025,
1054,
2059,
18558,
1024,
14171,
1006,
1014,
1010,
1060,
1009,
1016,
1010,
1061,
1007,
2842,
18558,
1024,
14171,
1006,
1014,
1010,
1060,
1009,
1015,
1010,
1061,
1009,
1006,
21469,
30523,
1027,
2403,
1060,
1027,
1014,
1061,
1027,
1014,
1011,
1011,
4438,
1017,
2595,
2509,
2640,
7961,
1024,
9909,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1027,
2403,
1060,
1027,
1014,
1061,
1027,
1014,
1011,
1011,
4438,
1017,
2595,
2509,
2640,
7961,
1024,
9909,
30526
] |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
namespace NetCoreXunitTestLibrary
{
public class UnitTest1
{
[Fact]
public void Test1()
{
Assert.Equal("Hello", NetCoreLibrary.Class1.SayHello());
}
}
}
|
Vedin/corefxlab
|
samples/NetCoreSample/NetCoreXunitTestLibrary/UnitTest1.cs
|
C#
|
mit
| 513
|
[
30522,
1013,
1013,
7000,
2000,
1996,
1012,
5658,
3192,
2104,
2028,
2030,
2062,
10540,
1012,
1013,
1013,
1996,
1012,
5658,
3192,
15943,
2023,
5371,
2000,
2017,
2104,
1996,
10210,
6105,
1012,
1013,
1013,
2156,
1996,
6105,
5371,
1999,
1996,
2622,
7117,
2005,
2062,
2592,
1012,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
11409,
4160,
1025,
2478,
2291,
1012,
3793,
1025,
2478,
15990,
3490,
2102,
1025,
3415,
15327,
5658,
17345,
2595,
19496,
14581,
19646,
12322,
19848,
2100,
1063,
2270,
2465,
3131,
22199,
2487,
1063,
1031,
2755,
1033,
2270,
11675,
3231,
2487,
1006,
1007,
1063,
20865,
1012,
5020,
1006,
1000,
7592,
1000,
1010,
5658,
17345,
29521,
19848,
2100,
1012,
2465,
2487,
1012,
2360,
18223,
2080,
1006,
1007,
1007,
1025,
1065,
1065,
1065,
102,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
import _ from 'lodash'
import Vue from 'vue'
import test from 'ava'
import FlexTableColumn from '../../src/components/FlexTableColumn.vue'
Vue.config.productionTip = false
test('has a mounted hook', (t) => {
t.true(_.isFunction(FlexTableColumn.mounted))
})
test('has data as function', (t) => {
t.true(_.isFunction(FlexTableColumn.data))
})
|
nrobates/vue-flex-datatable
|
test/components/FlexTableColumn.spec.js
|
JavaScript
|
mit
| 348
|
[
30522,
12324,
1035,
2013,
1005,
8840,
8883,
2232,
1005,
12324,
24728,
2063,
2013,
1005,
24728,
2063,
1005,
12324,
3231,
2013,
1005,
10927,
1005,
12324,
23951,
10880,
25778,
2819,
2078,
2013,
1005,
1012,
1012,
1013,
1012,
1012,
1013,
5034,
2278,
1013,
6177,
1013,
23951,
10880,
25778,
2819,
2078,
1012,
24728,
2063,
1005,
24728,
2063,
1012,
9530,
8873,
2290,
1012,
2537,
25101,
1027,
6270,
3231,
1006,
1005,
2038,
1037,
5614,
8103,
1005,
1010,
1006,
1056,
1007,
1027,
1028,
1063,
1056,
1012,
2995,
1006,
1035,
1012,
2003,
11263,
27989,
1006,
23951,
10880,
25778,
2819,
2078,
1012,
5614,
1007,
1007,
1065,
1007,
3231,
1006,
1005,
2038,
2951,
2004,
3853,
1005,
1010,
1006,
1056,
1007,
1027,
1028,
1063,
1056,
1012,
2995,
1006,
1035,
1012,
2003,
11263,
27989,
1006,
23951,
10880,
25778,
2819,
2078,
1012,
2951,
1007,
1007,
1065,
1007,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
# Linux Eclipse Dev
Eclipse can be used on Linux (and probably Windows and Mac) as an IDE for
developing Chromium. It's unpolished, but here's what works:
* Editing code works well (especially if you're used to it or Visual Studio).
* Navigating around the code works well. There are multiple ways to do this
(F3, control-click, outlines).
* Building works fairly well and it does a decent job of parsing errors so
that you can click and jump to the problem spot.
* Debugging is hit & miss. You can set breakpoints and view variables. STL
containers give it (and gdb) a bit of trouble. Also, the debugger can get
into a bad state occasionally and eclipse will need to be restarted.
* Refactoring seems to work in some instances, but be afraid of refactors that
touch a lot of files.
[TOC]
## Setup
### Get & Configure Eclipse
Eclipse 4.3 (Kepler) is known to work with Chromium for Linux.
* [Download](http://www.eclipse.org/downloads/) the distribution appropriate
for your OS. For example, for Linux 64-bit/Java 64-bit, use the Linux 64 bit
package (Eclipse Packages Tab -> Linux 64 bit (link in bottom right)).
* Tip: The packaged version of eclipse in distros may not work correctly
with the latest CDT plugin (installed below). Best to get them all from
the same source.
* Googlers: The version installed on Goobuntu works fine. The UI will be
much more responsive if you do not install the google3 plug-ins. Just
uncheck all the boxes at first launch.
* Unpack the distribution and edit the eclipse/eclipse.ini to increase the
heap available to java. For instance:
* Change `-Xms40m` to `-Xms1024m` (minimum heap) and `-Xmx256m` to
`-Xmx3072m` (maximum heap).
* Googlers: Edit `~/.eclipse/init.sh` to add this:
```
export ECLIPSE_MEM_START="1024M"
export ECLIPSE_MEM_MAX="3072M"
```
The large heap size prevents out of memory errors if you include many Chrome
subprojects that Eclipse is maintaining code indices for.
* Turn off Hyperlink detection in the Eclipse preferences. (Window ->
Preferences, search for "Hyperlinking, and uncheck "Enable on demand
hyperlink style navigation").
Pressing the control key on (for keyboard shortcuts such as copy/paste) can
trigger the hyperlink detector. This occurs on the UI thread and can result in
the reading of jar files on the Eclipse classpath, which can tie up the editor
due to the size of the classpath in Chromium.
### A short word about paths
Before you start setting up your work space - here are a few hints:
* Don't put your checkout on a remote file system (e.g. NFS filer). It's too
slow both for building and for Eclipse.
* Make sure there is no file system link in your source path because Ninja
will resolve it for a faster build and Eclipse / GDB will get confused.
(Note: This means that the source will possibly not reside in your user
directory since it would require a link from filer to your local
repository.)
* You may want to start Eclipse from the source root. To do this you can add
an icon to your task bar as launcher. It should point to a shell script
which will set the current path to your source base, and then start Eclipse.
The result would probably look like this:
```shell
~/.bashrc
cd /usr/local/google/chromium/src
export PATH=/home/skuhne/depot_tools:/usr/local/google/goma/goma:/opt/eclipse:/usr/local/symlinks:/usr/local/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/opt/eclipse/eclipse -vm /usr/bin/java
```
(Note: Things work fine for me without launching Eclipse from a special
directory. jamescook@chromium.org 2012-06-1)
### Run Eclipse & Set your workspace
Run eclipse/eclipse in a way that your regular build environment (export CC,
CXX, etc...) will be visible to the eclipse process.
Set the Workspace to be a directory on a local disk (e.g.
`/work/workspaces/chrome`). Placing it on an NFS share is not recommended --
it's too slow and Eclipse will block on access. Don't put the workspace in the
same directory as your checkout.
### Install the C Development Tools ("CDT")
1. From the Help menu, select Install New Software...
1. Select the 'Workd with' URL for the CDT
If it's not there you can click Add... and add it.
See https://eclipse.org/cdt/downloads.php for up to date versions,
e.g. with CDT 8.7.0 for Eclipse Mars, use
http://download.eclipse.org/tools/cdt/releases/8.7
1. Googlers: We have a local mirror, but be sure you run prodaccess before
trying to use it.
1. Select & install the Main and Optional features.
1. Restart Eclipse
1. Go to Window > Open Perspective > Other... > C/C++ to switch to the C++
perspective (window layout).
1. Right-click on the "Java" perspective in the top-right corner and select
"Close" to remove it.
### Create your project(s)
First, turn off automatic workspace refresh and automatic building, as Eclipse
tries to do these too often and gets confused:
1. Open Window > Preferences
1. Search for "workspace"
1. Turn off "Build automatically"
1. Turn off "Refresh using native hooks or polling"
1. Click "Apply"
Chromium uses C++11, so tell the indexer about it. Otherwise it will get
confused about things like std::unique_ptr.
1. Open Window > Preferences > C/C++ > Build > Settings > Discovery >
CDT GCC Build-in Compiler Settings
1. In the text box entitled Command to get compiler specs append "-std=c++11"
Create a single Eclipse project for everything:
1. From the File menu, select New > Project...
1. Select C/C++ Project > Makefile Project with Existing Code
1. Name the project the exact name of the directory: "src"
1. Provide a path to the code, like /work/chromium/src
1. Select toolchain: Linux GCC
1. Click Finish.
Chromium has a huge amount of code, enough that Eclipse can take a very long
time to perform operations like "go to definition" and "open resource". You need
to set it up to operate on a subset of the code.
In the Project Explorer on the left side:
1. Right-click on "src" and select "Properties..."
1. Open Resource > Resource Filters
1. Click "Add..."
1. Add the following filter:
* Include only
* Files, all children (recursive)
* Name matches
`.*\.(c|cc|cpp|h|mm|inl|idl|js|json|css|html|gyp|gypi|grd|grdp|gn)`
regular expression
1. Add another filter:
* Exclude all
* Folders
* Name matches `out_.*|\.git|\.svn|LayoutTests` regular expression
* If you aren't working on WebKit, adding `|WebKit` will remove more
files
1. Click "OK"
Don't exclude the primary "out" directory, as it contains generated header files
for things like string resources and Eclipse will miss a lot of symbols if you
do.
Eclipse will refresh the workspace and start indexing your code. It won't find
most header files, however. Give it more help finding them:
1. Open Window > Preferences
1. Search for "Indexer"
1. Turn on "Allow heuristic resolution of includes"
1. Select "Use active build configuration"
1. Set Cache limits > Index database > Limit relative... to 20%
1. Set Cache limits > Index database > Absolute limit to 256 MB
1. Click "OK"
Now the indexer will find many more include files, regardless of which approach
you take below.
#### Optional: Manual header paths and symbols
You can manually tell Eclipse where to find header files, which will allow it to
create the source code index before you do a real build.
1. Right-click on "src" and select "Properties..."
* Open C++ General > Paths and Symbols > Includes
* Click "GNU C++"
* Click "Add..."
* Add `/path/to/chromium/src`
* Check "Add to all configurations" and "Add to all languages"
1. Repeat the above for:
* `/path/to/chromium/src/testing/gtest/include`
You may also find it helpful to define some symbols.
1. Add `OS_LINUX`:
* Select the "Symbols" tab
* Click "GNU C++"
* Click "Add..."
* Add name `OS_LINUX` with value 1
* Click "Add to all configurations" and "Add to all languages"
1. Repeat for `ENABLE_EXTENSIONS 1`
1. Repeat for `HAS_OUT_OF_PROC_TEST_RUNNER 1`
1. Click "OK".
1. Eclipse will ask if you want to rebuild the index. Click "Yes".
Let the C++ indexer run. It will take a while (10s of minutes).
### Optional: Building inside Eclipse
This allows Eclipse to automatically discover include directories and symbols.
If you use gold or ninja (both recommended) you'll need to tell Eclipse about
your path.
1. echo $PATH from a shell and copy it to the clipboard
1. Open Window > Preferences > C/C++ > Build > Environment
1. Select "Replace native environment with specified one" (since gold and ninja
must be at the start of your path)
1. Click "Add..."
1. For name, enter `PATH`
1. For value, paste in your path with the ninja and gold directories.
1. Click "OK"
To create a Make target:
1. From the Window menu, select Show View > Make Target
1. In the Make Target view, right-click on the project and select New...
1. name the target (e.g. base\_unittests)
1. Unclick the Build Command: Use builder Settings and type whatever build
command you would use to build this target (e.g.
`ninja -C out/Debug base_unittests`).
1. Return to the project properties page a under the C/C++ Build, change the
Build Location/Build Directory to be /path/to/chromium/src
1. In theory `${workspace_loc}` should work, but it doesn't for me.
1. If you put your workspace in `/path/to/chromium`, then
`${workspace_loc:/src}` will work too.
1. Now in the Make Targets view, select the target and click the hammer icon
(Build Make Target).
You should see the build proceeding in the Console View and errors will be
parsed and appear in the Problems View. (Note that sometimes multi-line compiler
errors only show up partially in the Problems view and you'll want to look at
the full error in the Console).
(Eclipse 3.8 has a bug where the console scrolls too slowly if you're doing a
fast build, e.g. with goma. To work around, go to Window > Preferences and
search for "console". Under C/C++ console, set "Limit console output" to
2147483647, the maximum value.)
### Optional: Multiple build targets
If you want to build multiple different targets in Eclipse (`chrome`,
`unit_tests`, etc.):
1. Window > Show Toolbar (if you had it off)
1. Turn on special toolbar menu item (hammer) or menu bar item (Project > Build
configurations > Set Active > ...)
1. Window > Customize Perspective... > "Command Groups Availability"
1. Check "Build configuration"
1. Add more Build targets
1. Project > Properties > C/C++ Build > Manage Configurations
1. Select "New..."
1. Duplicate from current and give it a name like "Unit tests".
1. Change under “Behavior” > Build > the target to e.g. `unit_tests`.
You can also drag the toolbar to the bottom of your window to save vertical
space.
### Optional: Debugging
1. From the toolbar at the top, click the arrow next to the debug icon and
select Debug Configurations...
1. Select C/C++ Application and click the New Launch Configuration icon. This
will create a new run/debug con figuration under the C/C++ Application header.
1. Name it something useful (e.g. `base_unittests`).
1. Under the Main Tab, enter the path to the executable (e.g.
`.../out/Debug/base_unittests`)
1. Select the Debugger Tab, select Debugger: gdb and unclick "Stop on startup
in (main)" unless you want this.
1. Set a breakpoint somewhere in your code and click the debug icon to start
debugging.
### Optional: Accurate symbol information
If setup properly, Eclipse can do a great job of semantic navigation of C++ code
(showing type hierarchies, finding all references to a particular method even
when other classes have methods of the same name, etc.). But doing this well
requires the Eclipse knows correct include paths and pre-processor definitions.
After fighting with with a number of approaches, I've found the below to work
best for me.
*The instrcutions below are out-of-date since it references GYP. Please see
`gn help gen` for how to generate an Eclipse CDT file in GN. If you use
Eclipse and make it work, please update this documentation.*
1. From a shell in your src directory, run
`GYP_GENERATORS=ninja,eclipse build/gyp_chromium`
1. This generates <project root>/out/Debug/eclipse-cdt-settings.xml which
is used below.
1. This creates a single list of include directories and preprocessor
definitions to be used for all source files, and so is a little
inaccurate. Here are some tips for compensating for the limitations:
1. Use `-R <target>` to restrict the output to considering only certain
targets (avoiding unnecessary includes that are likely to cause
trouble). Eg. for a blink project, use `-R blink`.
1. If you care about blink, move 'third\_party/Webkit/Source' to the
top of the list to better resolve ambiguous include paths (eg.
`config.h`).
1. Import paths and symbols
1. Right click on the project and select Properties > C/C++ General > Paths
and Symbols
1. Click Restore Defaults to clear any old settings
1. Click Import Settings... > Browse... and select
`<project root>/out/Debug/eclipse-cdt-settings.xml`
1. Click the Finish button. The entire preferences dialog should go away.
1. Right click on the project and select Index > Rebuild
### Alternative: Per-file accurate include/pre-processor information
Instead of generating a fixed list of include paths and pre-processor
definitions for a project (above), it is also possible to have Eclipse determine
the correct setting on a file-by-file basis using a built output parser. I
(rbyers) used this successfully for a long time, but it doesn't seem much better
in practice than the simpler (and less bug-prone) approach above.
1. Install the latest version of Eclipse IDE for C/C++ developers
([Juno SR1](http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/junosr1)
at the time of this writing)
1. Setup build to generate a build log that includes the g++ command lines for
the files you want to index:
1. Project Properties -> C/C++ Build
1. Uncheck "Use default build command"
1. Enter your build command, eg: `ninja -v`
1. Note that for better performance, you can use a command that
doesn't actually builds, just prints the commands that would be
run. For ninja/make this means adding -n. This only prints the
compile commands for changed files (so be sure to move your
existing out directory out of the way temporarily to force a
full "build"). ninja also supports "-t commands" which will
print all build commands for the specified target and runs even
faster as it doesn't have to check file timestamps.
1. Build directory: your build path including out/Debug
1. Note that for the relative paths to be parsed correctly you
can't use ninja's `-C <dir>` to change directories as you might
from the command line.
1. Build: potentially change `all` to the target you want to analyze,
eg. `chrome`
1. Deselect 'clean'
1. If you're using Ninja, you need to teach eclipse to ignore the prefix it
adds (eg. `[10/1234]` to each line in build output):
1. Project properties -> C/C++ General -> Preprocessor includes
1. Providers -> CDT GCC Build Output Parser -> Compiler command pattern
1. `(\[.*\] )?((gcc)|([gc]\+\+)|(clang(\+\+)?))`
1. Note that there appears to be a bug with "Share setting entries
between projects" - it will keep resetting to off. I suggest using
per-project settings and using the "folder" as the container to keep
discovered entries ("file" may work as well).
1. Eclipse / GTK has bugs where lots of output to the build console can
slow down the UI dramatically and cause it to hang (basically spends all
it's time trying to position the cursor correctly in the build console
window). To avoid this, close the console window and disable
automatically opening it on build:
1. Preferences->C/C++->Build->Console -> Uncheck "Open console when
building"
1. note you can still see the build log in
`<workspace>/.metadata/.plugins/org.eclipse.cdt.ui`
1. Now build the project (select project, click on hammer). If all went well:
1. Right click on a cpp file -> properties -> C/C++ general -> Preprocessor
includes -> GNU C++ -> CDT GCC Build output Parser
1. You will be able to expand and see all the include paths and
pre-processor definitions used for this file
1. Rebuild index (right-click on project, index, rebuild). If all went well:
1. Open a CPP file and look at problems windows
1. Should be no (or very few) errors
1. Should be able to hit F3 on most symbols and jump to their definitioin
1. CDT has some issues with complex C++ syntax like templates (eg.
`PassOwnPtr` functions)
1. See
[this page](http://wiki.eclipse.org/CDT/User/FAQ#Why_does_Open_Declaration_.28F3.29_not_work.3F_.28also_applies_to_other_functions_using_the_indexer.29)
for more information.
### Optional: static code and style guide analysis using cpplint.py
1. From the toolbar at the top, click the Project -> Properties and go to
C/C++Build.
1. Click on the right side of the pop up windows, "Manage
Configurations...", then on New, and give it a name, f.i. "Lint current
file", and close the small window, then select it in the Configuration
drop down list.
1. Under Builder settings tab, unclick "Use default build command" and type
as build command the full path to your `depot_tools/cpplint.py`
1. Under behaviour tab, unselect Clean, select Build(incremental build) and
in Make build target, add `--verbose=0 ${selected_resource_loc}`
1. Go back to the left side of the current window, and to C/C++Build ->
Settings, and click on error parsers tab, make sure CDT GNU C/C++ Error
Parser, CDT pushd/popd CWD Locator are set, then click Apply and OK.
1. Select a file and click on the hammer icon drop down triangle next to it,
and make sure the build configuration is selected "Lint current file", then
click on the hammer.
1. Note: If you get the `cpplint.py help` output, make sure you have selected a
file, by clicking inside the editor window or on its tab header, and make
sure the editor is not maximized inside Eclipse, i.e. you should see more
subwindows around.
### Additional tips
1. Mozilla's
[Eclipse CDT guide](https://developer.mozilla.org/en-US/docs/Eclipse_CDT)
is helpful:
1. For improved performance, I use medium-granularity projects (eg. one for
WebKit/Source) instead of putting all of 'src/' in one project.
1. For working in Blink (which uses WebKit code style), feel free to use
[this](https://drive.google.com/file/d/0B2LVVIKSxUVYM3R6U0tUa1dmY0U/view?usp=sharing)
code-style formatter XML profile
|
axinging/chromium-crosswalk
|
docs/linux_eclipse_dev.md
|
Markdown
|
bsd-3-clause
| 19,553
|
[
30522,
1001,
11603,
13232,
16475,
13232,
2064,
2022,
2109,
2006,
11603,
1006,
1998,
2763,
3645,
1998,
6097,
1007,
2004,
2019,
8909,
2063,
2005,
4975,
10381,
21716,
5007,
1012,
2009,
1005,
1055,
4895,
17699,
9072,
1010,
2021,
2182,
1005,
1055,
2054,
2573,
1024,
1008,
9260,
3642,
2573,
2092,
1006,
2926,
2065,
2017,
1005,
2128,
2109,
2000,
2009,
2030,
5107,
2996,
1007,
1012,
1008,
6583,
5737,
16961,
2105,
1996,
3642,
2573,
2092,
1012,
2045,
2024,
3674,
3971,
2000,
2079,
2023,
1006,
1042,
2509,
1010,
2491,
1011,
11562,
1010,
22106,
1007,
1012,
1008,
2311,
2573,
7199,
2092,
1998,
2009,
2515,
1037,
11519,
3105,
1997,
11968,
7741,
10697,
2061,
2008,
2017,
2064,
11562,
1998,
5376,
2000,
1996,
3291,
3962,
1012,
1008,
2139,
8569,
12588,
2003,
2718,
1004,
3335,
1012,
2017,
2064,
2275,
3338,
26521,
1998,
3193,
10857,
1012,
2358,
2140,
16143,
2507,
2009,
1006,
1998,
1043,
18939,
1007,
1037,
2978,
1997,
4390,
1012,
2036,
1010,
1996,
2139,
8569,
13327,
2064,
2131,
2046,
1037,
2919,
2110,
5681,
1998,
13232,
2097,
2342,
2000,
2022,
25606,
1012,
1008,
25416,
18908,
28741,
2290,
3849,
2000,
2147,
1999,
2070,
12107,
1010,
2021,
2022,
4452,
1997,
25416,
18908,
5668,
2008,
3543,
1037,
2843,
1997,
6764,
1012,
1031,
2000,
2278,
1033,
1001,
1001,
16437,
1001,
1001,
1001,
2131,
1004,
9530,
8873,
27390,
2063,
13232,
13232,
1018,
1012,
1017,
1006,
28219,
1007,
2003,
2124,
2000,
2147,
2007,
10381,
21716,
5007,
2005,
11603,
1012,
1008,
1031,
8816,
1033,
1006,
8299,
1024,
1013,
1013,
7479,
1012,
13232,
1012,
8917,
1013,
22956,
1013,
1007,
1996,
4353,
6413,
2005,
2115,
9808,
1012,
2005,
2742,
1010,
2005,
11603,
4185,
1011,
2978,
1013,
9262,
4185,
1011,
2978,
1010,
2224,
1996,
11603,
4185,
2978,
7427,
1006,
13232,
14555,
21628,
1011,
1028,
11603,
4185,
2978,
1006,
4957,
1999,
3953,
2157,
1007,
1007,
1012,
1008,
5955,
1024,
1996,
21972,
2544,
1997,
13232,
1999,
4487,
3367,
7352,
2089,
2025,
2147,
11178,
2007,
1996,
6745,
3729,
2102,
13354,
2378,
1006,
5361,
2917,
1007,
1012,
2190,
2000,
2131,
2068,
2035,
2013,
1996,
2168,
3120,
1012,
1008,
8224,
2869,
1024,
1996,
2544,
5361,
2006,
27571,
8569,
3372,
2226,
2573,
2986,
1012,
1996,
21318,
2097,
2022,
2172,
2062,
26651,
2065,
2017,
2079,
2025,
16500,
1996,
8224,
2509,
13354,
1011,
16021,
1012,
2074,
4895,
5403,
3600,
2035,
1996,
8378,
2012,
2034,
4888,
1012,
1008,
4895,
23947,
1996,
4353,
1998,
10086,
1996,
13232,
1013,
13232,
1012,
1999,
2072,
2000,
3623,
1996,
16721,
2800,
2000,
9262,
1012,
2005,
6013,
1024,
1008,
2689,
1036,
1011,
1060,
5244,
12740,
2213,
1036,
2000,
1036,
1011,
1060,
5244,
10790,
18827,
2213,
1036,
1006,
6263,
16721,
1007,
1998,
1036,
1011,
1060,
22984,
17788,
2575,
2213,
30524,
2869,
1024,
10086,
1036,
1066,
1013,
1012,
13232,
1013,
1999,
4183,
1012,
14021,
1036,
2000,
5587,
2023,
1024,
1036,
1036,
1036,
9167,
13232,
1035,
2033,
2213,
1035,
2707,
1027,
1000,
9402,
2549,
2213,
1000,
9167,
13232,
1035,
2033,
2213,
1035,
4098,
1027,
1000,
24559,
2475,
2213,
1000,
1036,
1036,
1036,
30523,
1036,
2000,
1036,
1011,
1060,
22984,
14142,
2581,
2475,
2213,
1036,
1006,
4555,
16721,
1007,
1012,
1008,
8224,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1036,
2000,
1036,
1011,
1060,
22984,
14142,
2581,
2475,
2213,
1036,
1006,
4555,
16721,
1007,
1012,
1008,
8224,
30526
] |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>V8 API Reference Guide for node.js v0.8.4: Class Members - Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v0.8.4
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="functions.html"><span>All</span></a></li>
<li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
<li><a href="functions_type.html"><span>Typedefs</span></a></li>
<li><a href="functions_enum.html"><span>Enumerations</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="functions_func.html#index_a"><span>a</span></a></li>
<li><a href="functions_func_b.html#index_b"><span>b</span></a></li>
<li><a href="functions_func_c.html#index_c"><span>c</span></a></li>
<li><a href="functions_func_d.html#index_d"><span>d</span></a></li>
<li><a href="functions_func_e.html#index_e"><span>e</span></a></li>
<li><a href="functions_func_f.html#index_f"><span>f</span></a></li>
<li><a href="functions_func_g.html#index_g"><span>g</span></a></li>
<li><a href="functions_func_h.html#index_h"><span>h</span></a></li>
<li><a href="functions_func_i.html#index_i"><span>i</span></a></li>
<li><a href="functions_func_l.html#index_l"><span>l</span></a></li>
<li><a href="functions_func_m.html#index_m"><span>m</span></a></li>
<li><a href="functions_func_n.html#index_n"><span>n</span></a></li>
<li><a href="functions_func_o.html#index_o"><span>o</span></a></li>
<li><a href="functions_func_p.html#index_p"><span>p</span></a></li>
<li><a href="functions_func_r.html#index_r"><span>r</span></a></li>
<li class="current"><a href="functions_func_s.html#index_s"><span>s</span></a></li>
<li><a href="functions_func_t.html#index_t"><span>t</span></a></li>
<li><a href="functions_func_u.html#index_u"><span>u</span></a></li>
<li><a href="functions_func_v.html#index_v"><span>v</span></a></li>
<li><a href="functions_func_w.html#index_w"><span>w</span></a></li>
<li><a href="functions_func_~.html#index_~"><span>~</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="contents">
 
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<li>Serialize()
: <a class="el" href="classv8_1_1_heap_snapshot.html#acf7383deaa06fab1d948fd7e737ac7d3">v8::HeapSnapshot</a>
</li>
<li>Set()
: <a class="el" href="classv8_1_1_template.html#a8a29557db5d0bc980752084b925a9b01">v8::Template</a>
</li>
<li>SetAccessCheckCallbacks()
: <a class="el" href="classv8_1_1_object_template.html#acd0c47ecc715fa1256dc95524a4e8608">v8::ObjectTemplate</a>
</li>
<li>SetAccessor()
: <a class="el" href="classv8_1_1_object_template.html#a912ade2f7db7c7e30b606d10012c2bac">v8::ObjectTemplate</a>
</li>
<li>SetAllowCodeGenerationFromStringsCallback()
: <a class="el" href="classv8_1_1_v8.html#ad4abec314050af6e68df3a339634293e">v8::V8</a>
</li>
<li>SetCallAsFunctionHandler()
: <a class="el" href="classv8_1_1_object_template.html#a0132c34bbb52a69d13c54bf325effe6e">v8::ObjectTemplate</a>
</li>
<li>SetCallHandler()
: <a class="el" href="classv8_1_1_function_template.html#a9eb1c827b17faf398a81068721bf40ab">v8::FunctionTemplate</a>
</li>
<li>SetCaptureMessage()
: <a class="el" href="classv8_1_1_try_catch.html#a541b8fa6951bd5a439692c22d5c7b73c">v8::TryCatch</a>
</li>
<li>SetCaptureStackTraceForUncaughtExceptions()
: <a class="el" href="classv8_1_1_v8.html#a9998ccddad62571d73039ea12f598236">v8::V8</a>
</li>
<li>SetClassName()
: <a class="el" href="classv8_1_1_function_template.html#a10ad6f0d3d1f67823e08fbca7c5dde41">v8::FunctionTemplate</a>
</li>
<li>SetCounterFunction()
: <a class="el" href="classv8_1_1_v8.html#a830d3ba2704b6e7c361188b22318c0be">v8::V8</a>
</li>
<li>SetCreateHistogramFunction()
: <a class="el" href="classv8_1_1_v8.html#ac4db0dff0f29c750d30fcac65c4d1968">v8::V8</a>
</li>
<li>SetData()
: <a class="el" href="classv8_1_1_context.html#aaf39e5adc0ef4081d591952d17c6ada5">v8::Context</a>
, <a class="el" href="classv8_1_1_isolate.html#a57e22868fac4e090f05d23e432e2c771">v8::Isolate</a>
, <a class="el" href="classv8_1_1_script.html#a048fa4168b809ca73cc435e341e41b0b">v8::Script</a>
</li>
<li>SetDebugMessageDispatchHandler()
: <a class="el" href="classv8_1_1_debug.html#a5147f6cfeb9b87a67630b8c959996e9c">v8::Debug</a>
</li>
<li>SetEntropySource()
: <a class="el" href="classv8_1_1_v8.html#a5331ce9c858af264f30de667c74c5a76">v8::V8</a>
</li>
<li>SetFailedAccessCheckCallbackFunction()
: <a class="el" href="classv8_1_1_v8.html#aa6ed646d43360c209881871b3ac747aa">v8::V8</a>
</li>
<li>SetFatalErrorHandler()
: <a class="el" href="classv8_1_1_v8.html#ab386f81a6d58dcf481d00446e8d15c9e">v8::V8</a>
</li>
<li>SetFlagsFromCommandLine()
: <a class="el" href="classv8_1_1_v8.html#a63157ad9284ffad1c0ab62b21aadd08c">v8::V8</a>
</li>
<li>SetFlagsFromString()
: <a class="el" href="classv8_1_1_v8.html#ab263a85e6f97ea79d944bd20bb09a95f">v8::V8</a>
</li>
<li>SetGlobalGCEpilogueCallback()
: <a class="el" href="classv8_1_1_v8.html#a94bac5e06a99141c5629842e18558cfe">v8::V8</a>
</li>
<li>SetGlobalGCPrologueCallback()
: <a class="el" href="classv8_1_1_v8.html#a503e14a77e922775bd88bc2e19e19886">v8::V8</a>
</li>
<li>SetHiddenPrototype()
: <a class="el" href="classv8_1_1_function_template.html#ade426e8a21d777ae6100e6c1aa7bfaee">v8::FunctionTemplate</a>
</li>
<li>SetHiddenValue()
: <a class="el" href="classv8_1_1_object.html#a0040e3012d621b25f580407bacebf95f">v8::Object</a>
</li>
<li>SetIndexedPropertiesToExternalArrayData()
: <a class="el" href="classv8_1_1_object.html#a53be627cd653a5591038a4d81a908f64">v8::Object</a>
</li>
<li>SetIndexedPropertiesToPixelData()
: <a class="el" href="classv8_1_1_object.html#a3f08aee708af5e2856e65e81b22edc61">v8::Object</a>
</li>
<li>SetIndexedPropertyHandler()
: <a class="el" href="classv8_1_1_object_template.html#af436aeb8132068d3678246f31515ff5a">v8::ObjectTemplate</a>
</li>
<li>SetInternalField()
: <a class="el" href="classv8_1_1_object.html#a94e24494687ea499471d41e914eeb90d">v8::Object</a>
</li>
<li>SetInternalFieldCount()
: <a class="el" href="classv8_1_1_object_template.html#ab63916ac584a76bca8ba541f86ce9fce">v8::ObjectTemplate</a>
</li>
<li>SetNamedPropertyHandler()
: <a class="el" href="classv8_1_1_object_template.html#aa80e9db593d8b954c4153082dc7a439d">v8::ObjectTemplate</a>
</li>
<li>SetPointerInInternalField()
: <a class="el" href="classv8_1_1_object.html#a5e79966b79d69ef3a7b3b0d91414ec2c">v8::Object</a>
</li>
<li>SetPrototype()
: <a class="el" href="classv8_1_1_object.html#a2a1ab58bf92984255f767946eeff1199">v8::Object</a>
</li>
<li>SetReturnAddressLocationResolver()
: <a class="el" href="classv8_1_1_v8.html#a7a9e8a96dcb3c3d306c0061b0a8e39c8">v8::V8</a>
</li>
<li>SetSecurityToken()
: <a class="el" href="classv8_1_1_context.html#a288d8549547f6bdf4312f5333f60f24d">v8::Context</a>
</li>
<li>SetStressRunType()
: <a class="el" href="classv8_1_1_testing.html#aafa5a4917998aa64134aa750ce5c4b2e">v8::Testing</a>
</li>
<li>SetVerbose()
: <a class="el" href="classv8_1_1_try_catch.html#a032cd889d76bd596e2616df11ced8682">v8::TryCatch</a>
</li>
<li>SetWrapperClassId()
: <a class="el" href="classv8_1_1_persistent.html#a41c933abe7726d4c314804859ef3acae">v8::Persistent< T ></a>
</li>
<li>StackTrace()
: <a class="el" href="classv8_1_1_try_catch.html#a1ee3e6ee74a4fc50185443ccdc4d3ae7">v8::TryCatch</a>
</li>
<li>StartHeapObjectsTracking()
: <a class="el" href="classv8_1_1_heap_profiler.html#a9f3073cb75f69c54b313ee5adfd1cbdc">v8::HeapProfiler</a>
</li>
<li>StartPreemption()
: <a class="el" href="classv8_1_1_locker.html#a272bf054bb4d8bb51b0101ba7bf3456f">v8::Locker</a>
</li>
<li>StartProfiling()
: <a class="el" href="classv8_1_1_cpu_profiler.html#a04c07069ea985ee67a9bcd7a97ab17fc">v8::CpuProfiler</a>
</li>
<li>StopHeapObjectsTracking()
: <a class="el" href="classv8_1_1_heap_profiler.html#a94d2c61cd403ca7caf1c366418db5776">v8::HeapProfiler</a>
</li>
<li>StopPreemption()
: <a class="el" href="classv8_1_1_locker.html#ab79915454872612692808fea64f539ec">v8::Locker</a>
</li>
<li>StopProfiling()
: <a class="el" href="classv8_1_1_cpu_profiler.html#ac2702be592e9218e6584f562a9ad7dd8">v8::CpuProfiler</a>
</li>
<li>StringValue()
: <a class="el" href="classv8_1_1_string_object.html#abc51573fc5d4c01266a1ba8c522c6eab">v8::StringObject</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 11 2015 23:48:37 for V8 API Reference Guide for node.js v0.8.4 by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
|
v8-dox/v8-dox.github.io
|
2c48766/html/functions_func_s.html
|
HTML
|
mit
| 12,168
|
[
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
1060,
11039,
19968,
1015,
1012,
1014,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
1060,
11039,
19968,
2487,
1013,
26718,
2094,
1013,
1060,
11039,
19968,
2487,
1011,
17459,
1012,
26718,
2094,
1000,
1028,
1026,
16129,
20950,
3619,
1027,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
2639,
1013,
1060,
11039,
19968,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
4180,
1011,
2828,
1000,
4180,
1027,
1000,
3793,
1013,
1060,
11039,
19968,
1025,
25869,
13462,
1027,
21183,
2546,
1011,
1022,
1000,
1013,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
1060,
1011,
25423,
1011,
11892,
1000,
4180,
1027,
1000,
29464,
1027,
1023,
1000,
1013,
1028,
1026,
18804,
2171,
1027,
1000,
13103,
1000,
4180,
1027,
1000,
2079,
18037,
6914,
1015,
1012,
1022,
1012,
1023,
1012,
1015,
1000,
1013,
1028,
1026,
2516,
1028,
15754,
17928,
4431,
5009,
2005,
13045,
1012,
1046,
2015,
1058,
2692,
1012,
1022,
1012,
1018,
1024,
2465,
2372,
1011,
4972,
1026,
1013,
2516,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
21628,
2015,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
1046,
4226,
2854,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
1040,
6038,
29015,
2015,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
3945,
1013,
3945,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
3945,
1013,
3945,
2850,
2696,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
3945,
1013,
3945,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
1028,
1002,
1006,
6254,
1007,
1012,
3201,
1006,
3853,
1006,
1007,
1063,
1999,
4183,
1035,
3945,
1006,
1007,
1025,
1065,
1007,
1025,
1026,
1013,
5896,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
2079,
18037,
6914,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
30524,
2025,
6366,
2023,
4487,
2615,
1010,
2009,
2003,
2701,
2011,
2079,
18037,
6914,
999,
1011,
1011,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
2516,
12069,
2050,
1000,
1028,
1026,
2795,
4442,
19498,
2075,
1027,
1000,
1014,
1000,
3526,
15455,
4667,
1027,
1000,
1014,
1000,
1028,
1026,
26419,
7716,
30523,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
2327,
1000,
1028,
1026,
999,
1011,
1011,
2079,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
2327,
1000,
1028,
1026,
999,
1011,
1011,
2079,
30526
] |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styles from '../../build/styles';
export default class Subtitle extends Component {
static propTypes = {
children: PropTypes.any,
className: PropTypes.string,
size: PropTypes.oneOf([
'is1',
'is2',
'is3',
'is4',
'is5',
'is6',
]),
};
static defaultProps = {
className: '',
};
createClassName() {
return [
styles.subtitle,
styles[this.props.size],
this.props.className,
].join(' ').trim();
}
render() {
return (
<p {...this.props} className={this.createClassName()}>
{this.props.children}
</p>
);
}
}
|
bokuweb/re-bulma
|
src/elements/subtitle.js
|
JavaScript
|
mit
| 713
|
[
30522,
12324,
10509,
1010,
1063,
6922,
1065,
2013,
1005,
10509,
1005,
1025,
12324,
17678,
13874,
2015,
2013,
1005,
17678,
1011,
4127,
1005,
1025,
12324,
6782,
2013,
1005,
1012,
1012,
1013,
1012,
1012,
1013,
3857,
1013,
6782,
1005,
1025,
9167,
12398,
2465,
4942,
3775,
9286,
8908,
6922,
1063,
10763,
17678,
13874,
2015,
1027,
1063,
2336,
1024,
17678,
13874,
2015,
1012,
2151,
1010,
2465,
18442,
1024,
17678,
13874,
2015,
1012,
5164,
1010,
2946,
1024,
17678,
13874,
2015,
1012,
2028,
11253,
1006,
1031,
1005,
2003,
2487,
1005,
1010,
1005,
2003,
2475,
1005,
1010,
1005,
2003,
2509,
1005,
1010,
1005,
2003,
2549,
1005,
1010,
1005,
2003,
2629,
1005,
1010,
1005,
2003,
2575,
1005,
1010,
1033,
1007,
1010,
1065,
1025,
10763,
12398,
21572,
4523,
1027,
1063,
2465,
18442,
1024,
1005,
1005,
1010,
1065,
1025,
3443,
26266,
18442,
1006,
1007,
1063,
2709,
1031,
6782,
1012,
4942,
3775,
9286,
1010,
6782,
1031,
2023,
1012,
24387,
1012,
2946,
1033,
1010,
2023,
1012,
24387,
1012,
2465,
18442,
1010,
1033,
1012,
3693,
1006,
1005,
1005,
1007,
1012,
12241,
1006,
1007,
1025,
1065,
17552,
1006,
1007,
1063,
2709,
1006,
1026,
1052,
1063,
1012,
1012,
1012,
2023,
1012,
24387,
1065,
2465,
18442,
1027,
1063,
2023,
1012,
3443,
26266,
18442,
1006,
1007,
1065,
1028,
1063,
2023,
1012,
24387,
1012,
2336,
1065,
1026,
1013,
1052,
1028,
1007,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<?php
namespace StoreIntegrator\tests\Amazon;
use Sabre\Xml\Writer;
use StoreIntegrator\Amazon\AmazonProduct;
use StoreIntegrator\Amazon\ProductFeed;
use StoreIntegrator\tests\TestCase;
class AmazonProductFeedTest extends TestCase
{
public function testTestXMLAgainstXSD()
{
$schema = __DIR__ . '/../xmlStubs/xsd/amzn-envelope.xsd';
$xml = __DIR__ . '/../xmlStubs/amazon-product.xml';
$this->assertValidXML($schema, $xml, 'The generated feed does not validate against Amazon definition.');
}
public function testFeedGenerationForComputerCategory()
{
$product = new AmazonProduct([
'name' => 'Dell Vostro',
'description' => 'Somee cool seo description',
'category' => 'Computers',
'productType' => 'NotebookComputer',
'price' => 2000,
'currency' => 'USD',
'brand' => 'Dell',
'sku' => 'd1234',
'weight' => 7000,
'quantity' => 100
]);
$feedGenerator = new ProductFeed(new Writer());
// $this->assertValidXML(__DIR__ . '/../xmlStubs/xsd/amzn-envelope.xsd', $feedGenerator->create($product));
$this->assertXmlStringEqualsXmlFile(__DIR__ . '/../xmlStubs/amzn-computer-product.xml', $feedGenerator->create($product));
}
}
|
netoholic/store-integrator
|
tests/Amazon/AmazonProductFeedTest.php
|
PHP
|
mit
| 1,328
|
[
30522,
1026,
1029,
25718,
3415,
15327,
3573,
18447,
13910,
16259,
1032,
5852,
1032,
9733,
1025,
2224,
22002,
1032,
20950,
1032,
3213,
1025,
2224,
3573,
18447,
13910,
16259,
1032,
9733,
1032,
9733,
21572,
8566,
6593,
1025,
2224,
3573,
18447,
13910,
16259,
1032,
9733,
1032,
4031,
7959,
2098,
1025,
2224,
3573,
18447,
13910,
16259,
1032,
5852,
1032,
3231,
18382,
1025,
2465,
9733,
21572,
8566,
6593,
7959,
2098,
22199,
8908,
3231,
18382,
1063,
2270,
3853,
3231,
22199,
2595,
19968,
16098,
7076,
2102,
2595,
16150,
1006,
1007,
1063,
1002,
8040,
28433,
1027,
1035,
1035,
16101,
1035,
1035,
1012,
1005,
1013,
1012,
1012,
1013,
20950,
3367,
12083,
2015,
1013,
1060,
16150,
1013,
2572,
2480,
2078,
1011,
11255,
1012,
1060,
16150,
1005,
1025,
1002,
20950,
1027,
1035,
1035,
16101,
1035,
1035,
1012,
1005,
1013,
1012,
1012,
1013,
20950,
3367,
12083,
2015,
1013,
9733,
1011,
4031,
1012,
20950,
1005,
1025,
1002,
2023,
1011,
1028,
20865,
10175,
3593,
2595,
19968,
1006,
1002,
8040,
28433,
1010,
1002,
20950,
1010,
1005,
1996,
7013,
5438,
2515,
2025,
9398,
3686,
2114,
9733,
6210,
1012,
1005,
1007,
1025,
1065,
2270,
3853,
3231,
7959,
24225,
3678,
3370,
29278,
9006,
18780,
2121,
16280,
20255,
2100,
1006,
1007,
1063,
1002,
4031,
1027,
2047,
9733,
21572,
8566,
6593,
1006,
1031,
1005,
2171,
1005,
1027,
1028,
1005,
12418,
29536,
3367,
3217,
1005,
1010,
1005,
6412,
1005,
1027,
1028,
1005,
2070,
2063,
4658,
27457,
6412,
1005,
1010,
1005,
4696,
1005,
1027,
1028,
1005,
7588,
1005,
1010,
1005,
4031,
13874,
1005,
1027,
1028,
1005,
14960,
9006,
30524,
1005,
15315,
2226,
1005,
1027,
1028,
1005,
1040,
12521,
22022,
1005,
1010,
1005,
3635,
1005,
1027,
1028,
6352,
2692,
1010,
1005,
11712,
1005,
1027,
1028,
2531,
1033,
1007,
1025,
1002,
5438,
6914,
6906,
4263,
1027,
2047,
4031,
7959,
2098,
1006,
2047,
3213,
1006,
1007,
1007,
1025,
1013,
1013,
1002,
2023,
1011,
1028,
20865,
10175,
3593,
2595,
19968,
1006,
1035,
1035,
16101,
1035,
1035,
1012,
1005,
1013,
1012,
1012,
1013,
20950,
3367,
12083,
2015,
1013,
1060,
16150,
1013,
2572,
2480,
2078,
1011,
11255,
1012,
1060,
16150,
1005,
1010,
1002,
5438,
6914,
6906,
4263,
1011,
1028,
3443,
1006,
1002,
4031,
1007,
1007,
1025,
1002,
2023,
1011,
1028,
20865,
2595,
19968,
3367,
4892,
2063,
26426,
2015,
2595,
19968,
8873,
2571,
1006,
1035,
1035,
16101,
1035,
1035,
1012,
1005,
1013,
1012,
1012,
1013,
20950,
3367,
12083,
2015,
1013,
2572,
2480,
2078,
1011,
3274,
1011,
4031,
1012,
20950,
1005,
1010,
1002,
5438,
6914,
6906,
4263,
1011,
1028,
3443,
1006,
1002,
4031,
1007,
1007,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
18780,
2121,
1005,
1010,
1005,
3976,
1005,
1027,
1028,
2456,
1010,
1005,
9598,
1005,
1027,
1028,
1005,
13751,
1005,
1010,
1005,
4435,
1005,
1027,
1028,
1005,
12418,
1005,
1010,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
18780,
2121,
1005,
1010,
1005,
3976,
1005,
1027,
1028,
2456,
1010,
1005,
9598,
1005,
1027,
1028,
1005,
13751,
1005,
1010,
1005,
4435,
1005,
1027,
1028,
1005,
12418,
1005,
1010,
30526
] |
#Welcome to H2O 3.0
Welcome to the H2O documentation site! Depending on your area of interest, select a learning path from the links above.
We're glad you're interested in learning more about H2O - if you have any questions, please email them to our Google Group, [h2ostream](mailto:h2ostream@googlegroups.com) or post them on our Google groups forum, <a href="https://groups.google.com/forum/#!forum/h2ostream" target="_blank">h2ostream</a>. This is a public forum, so your question will be visible to other users.
**Note**: To join our Google group on <a href="https://groups.google.com/forum/#!forum/h2ostream" target="_blank">h2ostream</a>, you need a Google account (such as Gmail or Google+). On the <a href="https://groups.google.com/forum/#!forum/h2ostream" target="_blank">h2ostream</a> page, click the **Join group** button, then click the **New Topic** button to post a new message. You don't need to request or leave a message to join - you should be added to the group automatically.
We welcome your feedback! Please let us know if you have any questions or comments about H2O by clicking the chat balloon button in the lower-right corner in Flow (H2O's web UI).

Type your question in the entry field that appears at the bottom of the sidebar and you will be connected with an H2O expert who will respond to your query in real time.

---
<a name="New"></a>
##New Users
If you're just getting started with H2O, here are some links to help you learn more:
- <a href="http://h2o.ai/product/recommended-systems-for-h2o/" target="_blank">Recommended Systems</a>: This one-page PDF provides a basic overview of the operating systems, languages and APIs, Hadoop resource manager versions, cloud computing environments, browsers, and other resources recommended to run H2O.
At a minimum, we recommend the following for compatibility with H2O:
- **Operating Systems**: Windows 7 or later; OS X 10.9 or later, Ubuntu 12.04, or RHEL/CentOS 6 or later
- **Languages**: Java 7 or later; Scala v 2.10 or later; R v.3 or later; Python 2.7.x or later (Scala, R, and Python are not required to use H2O unless you want to use H2O in those environments, but Java is always required)
- **Browsers**: Latest version of Chrome, Firefox, Safari, or Internet Explorer (An internet browser is required to use H2O's web UI, Flow)
- **Hadoop**: Cloudera CDH 4 or later (5.3 is recommended); MapR v.3.0 or later; Hortonworks HDP 2.1 or later (Hadoop is not required to run H2O unless you want to deploy H2O on a Hadoop cluster)
- **Spark**: v 1.3 or later (Spark is only required if you want to run [Sparkling Water](https://github.com/h2oai/sparkling-water))
- <a href="http://h2o.ai/download/" target="_blank">Downloads page</a>: First things first - download a copy of H2O <a href="http://h2o.ai/download/" target="_blank">here</a> by selecting a build under "Download H2O" (the "Bleeding Edge" build contains the latest changes, while the latest alpha release is a more stable build), then use the installation instruction tabs to install H2O on your client of choice ([standalone](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html), [R](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#R), [Python](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Python), [Hadoop](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Hadoop), or [Maven](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Maven)) .
For first-time users, we recommend downloading the latest alpha release and the default standalone option (the first tab) as the installation method. Make sure to install Java if it is not already installed.
The following video provides step-by-step instructions on how to install and run H2O:
<iframe width="560" height="315" src="https://www.youtube.com/embed/_HVx9Jqr34Q?list=PLNtMya54qvOHbBdA1x8FNRSpMBEHmhxr0" frameborder="0" allowfullscreen></iframe>
- **Tutorials**: To see a step-by-step example of our algorithms in action, select a model type from the following list:
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/tutorials/dl/dl.md" target="_blank">Deep Learning</a>
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/tutorials/gbm/gbm.md" target="_blank">Gradient Boosting Machine (GBM)</a>
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/tutorials/glm/glm.md" target="_blank">Generalized Linear Model (GLM)</a>
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/tutorials/kmeans/kmeans.md" target="_blank">K-means</a>
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/tutorials/rf/rf.md" target="_blank">Distributed Random Forest (DRF)</a>
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/flow/README.md" target="_blank">Getting Started with Flow</a>: This document describes our new intuitive web interface, Flow. This interface is similar to IPython notebooks, and allows you to create a visual workflow to share with others.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/howto/H2O-DevCmdLine.md" target="_blank">Launch from the command line</a>: This document describes some of the additional options that you can configure when launching H2O (for example, to specify a different directory for saved Flow data, allocate more memory, or use a flatfile for quick configuration of a cluster).
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/tutorials/datascience/DataScienceH2O-Dev.md" target="_blank">Algorithms</a>: This document describes the science behind our algorithms and provides a detailed, per-algo view of each model type.
---
<a name="Exp"></a>
##Experienced Users
If you've used previous versions of H2O, the following links will help guide you through the process of upgrading to H2O 3.0.
- <a href="http://h2o.ai/product/recommended-systems-for-h2o/" target="_blank">Recommended Systems</a>: This one-page PDF provides a basic overview of the operating systems, languages and APIs, Hadoop resource manager versions, cloud computing environments, browsers, and other resources recommended to run H2O.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/upgrade/Migration.md" target="_blank">Migration Guide</a>: This document provides a comprehensive guide to assist users in upgrading to H2O 3.0. It gives an overview of the changes to the algorithms and the web UI introduced in this version and describes the benefits of upgrading for users of R, APIs, and Java.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/upgrade/H2ODevPortingRScripts.md" target="_blank">Porting R Scripts</a>: This document is designed to assist users who have created R scripts using previous versions of H2O. Due to the many improvements in R, scripts created using previous versions of H2O need some revision to work with H2O 3.0. This document provides a side-by-side comparison of the changes in R for each algorithm, as well as overall structural enhancements R users should be aware of, and provides a link to a tool that assists users in upgrading their scripts.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/flow/RecentChanges.md" target="_blank">Recent Changes</a>: This document describes the most recent changes in the latest build of H2O. It lists new features, enhancements (including changed parameter default values), and bug fixes for each release, organized by sub-categories such as Python, R, and Web UI.
- <a href="https://github.com/h2oai/h2o-3/blob/jessica-dev-docs/h2o-docs/src/product/upgrade/H2OvsH2O-Dev.md" target="_blank">H2O Classic vs H2O 3.0</a>: This document presents a side-by-side comparison of H2O 3.0 and the previous version of H2O. It compares and contrasts the features, capabilities, and supported algorithms between the versions. If you'd like to learn more about the benefits of upgrading, this is a great source of information.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/flow/images/H2O-Algorithms-Road-Map.pdf" target="_blank">Algorithms Roadmap</a>: This document outlines our currently implemented features and describes which features are planned for future software versions. If you'd like to know what's up next for H2O, this is the place to go.
- <a href="https://github.com/h2oai/h2o-3/blob/master/CONTRIBUTING.md" target="_blank">Contributing code</a>: If you're interested in contributing code to H2O, we appreciate your assistance! This document describes how to access our list of Jiras that are suggested tasks for contributors and how to contact us.
---
<a name="OS"></a>
##Enterprise Users
If you're considering using H2O in an enterprise environment, you'll be happy to know that H2O supports many popular scalable computing solutions, such as Hadoop and EC2 (AWS). For more information, refer to the following links.
- <a href="http://h2o.ai/product/recommended-systems-for-h2o/" target="_blank">Recommended Systems</a>: This one-page PDF provides a basic overview of the operating systems, languages and APIs, Hadoop resource manager versions, cloud computing environments, browsers, and other resources recommended to run H2O.
- The following video provides step-by-step instructions on how to start H2O on Hadoop:
<iframe width="560" height="315" src="https://www.youtube.com/embed/B1ax_k_sSoY?list=PLNtMya54qvOHbBdA1x8FNRSpMBEHmhxr0" frameborder="0" allowfullscreen></iframe>
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/howto/H2O-DevS3Creds.md" target="_blank">How to Pass S3 Credentials to H2O</a>: This document describes the necessary step of passing your S3 credentials to H2O so that H2O can be used with AWS, as well as how to run H2O on an EC2 cluster.
- Click [here](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Hadoop) to view instructions on how to set up H2O using Hadoop.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/howto/H2O-DevHadoop.md" target="_blank">Running H2O on Hadoop</a>: This document describes how to run H2O on Hadoop.
---
<a name="SW"></a>
##Sparkling Water Users
Sparkling Water is a gradle project with the following submodules:
- Core: Implementation of H2OContext, H2ORDD, and all technical integration code
- Examples: Application, demos, examples
- ML: Implementation of MLLib pipelines for H2O algorithms
- Assembly: Creates "fatJar" composed of all other modules
The best way to get started is to modify the core module or create a new module, which extends a project.
Users of our Spark-compatible solution, Sparkling Water, should be aware that Sparkling Water is only supported with the latest version of H2O. For more information about Sparkling Water, refer to the following links.
Sparkling Water is versioned according to the Spark versioning:
- Use [Sparkling Water 1.2](http://h2o-release.s3.amazonaws.com/sparkling-water/rel-1.2/6/index.html) for Spark 1.2
- Use [Sparkling Water 1.3](http://h2o-release.s3.amazonaws.com/sparkling-water/rel-1.3/7/index.html) for Spark 1.3+
- Use [Sparkling Water 1.4](http://h2o-release.s3.amazonaws.com/sparkling-water/rel-1.4/3/index.html) for Spark 1.4
###Getting Started with Sparkling Water
The following video provides step-by-step instructions on how to start H2O using Sparkling Water:
<iframe width="560" height="315" src="https://www.youtube.com/embed/ypka6eX1G14?list=PLNtMya54qvOHbBdA1x8FNRSpMBEHmhxr0" frameborder="0" allowfullscreen></iframe>
- <a href="http://h2o.ai/download/" target="_blank">Download Sparkling Water</a>: Go here to download Sparkling Water.
- <a href="https://github.com/h2oai/sparkling-water/blob/master/DEVEL.md" target="_blank">Sparkling Water Development Documentation</a>: Read this document first to get started with Sparkling Water.
- <a href="https://github.com/h2oai/sparkling-water/tree/master/examples#sparkling-water-on-hadoop" target="_blank">Launch on Hadoop and Import from HDFS</a>: Go here to learn how to start Sparkling Water on Hadoop.
- <a href="https://github.com/h2oai/sparkling-water/tree/master/examples" target="_blank">Sparkling Water Tutorials</a>: Go here for demos and examples.
- <a href="https://github.com/h2oai/sparkling-water/blob/master/examples/src/main/scala/org/apache/spark/examples/h2o/ProstateDemo.scala" target="_blank">Sparkling Water K-means Tutorial</a>: Go here to view a demo that uses Scala to create a K-means model.
- <a href="https://github.com/h2oai/sparkling-water/blob/master/examples/src/main/scala/org/apache/spark/examples/h2o/CitiBikeSharingDemo.scala" target="_blank">Sparkling Water GBM Tutorial</a>: Go here to view a demo that uses Scala to create a GBM model.
- <a href="http://h2o.ai/blog/2014/11-sparkling-water-on-yarn-example/" target="_blank">Sparkling Water on YARN</a>: Follow these instructions to run Sparkling Water on a YARN cluster.
- <a href="http://learn.h2o.ai/content/hackers_station/start_with_sparkling_water.html" target="_blank">Building Applications on top of H2O</a>: This short tutorial describes project building and demonstrates the capabilities of Sparkling Water using Spark Shell to build a Deep Learning model.
- <a href="http://h2o.ai/product/faq/#SparklingH2O" target="_blank">Sparkling Water FAQ</a>: This FAQ provides answers to many common questions about Sparkling Water.
###Sparkling Water Blog Posts
- <a href="http://h2o.ai/blog/2014/09/how-sparkling-water-brings-h2o-to-spark" target="_blank">How Sparkling Water Brings H2O to Spark</a>
- <a href="http://h2o.ai/blog/2014/06/h2o-killer-application-spark" target="_blank">H2O - The Killer App on Spark</a>
- <a href="http://h2o.ai/blog/2014/03/spark-h2o/" target="_blank">In-memory Big Data: Spark + H2O</a>
###Sparkling Water Meetup Slide Decks
- <a href="https://github.com/h2oai/sparkling-water/tree/master/examples/scripts" target="_blank">Sparkling Water Meetup 02/03/2015
- <a href="http://www.slideshare.net/0xdata/spa-43755759" target="_blank">Sparkling Water Meetup</a>
- <a href="http://www.slideshare.net/0xdata/2014-12-17meetup" target="_blank">Interactive Session on Sparkling Water</a>
- <a href="http://www.slideshare.net/0xdata/2014-09-30sparklingwaterhandson" target="_blank">Sparkling Water Hands-On</a>
---
<a name="Py"></a>
##Python Users
Pythonistas will be glad to know that H2O now provides support for this popular programming language. Python users can also use H2O with IPython notebooks. For more information, refer to the following links.
- Click [here](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Python) to view instructions on how to use H2O with Python.
- The following video provides step-by-step instructions on how to start H2O using Python:
<iframe width="560" height="315" src="https://www.youtube.com/embed/K8J3dPBEz1s?list=PLNtMya54qvOHbBdA1x8FNRSpMBEHmhxr0" frameborder="0" allowfullscreen></iframe>
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-py/README.rst" target="_blank">Python readme</a>: This document describes how to setup and install the prerequisites for using Python with H2O.
- <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/docs-website/h2o-py/docs/index.html" target="_blank">Python docs</a>: This document represents the definitive guide to using Python with H2O.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/upgrade/PythonParity.md" target="_blank">Python Parity</a>: This document is is a list of Python capabilities that were previously available only through the H2O R interface but are now available in H2O using the Python interface.
---
<a name="R"></a>
##R Users
Don't worry, R users - we still provide R support in the latest version of H2O, just as before. The R components of H2O have been cleaned up, simplified, and standardized, so the command format is easier and more intuitive. Due to these improvements, be aware that any scripts created with previous versions of H2O will need some revision to be compatible with the latest version.
We have provided the following helpful resources to assist R users in upgrading to the latest version, including a document that outlines the differences between versions and a tool that reviews scripts for deprecated or renamed parameters.
Currently, the only version of R that is known to be incompatible with H2O is R version 3.1.0 (codename "Spring Dance"). If you are using that version, we recommend upgrading the R version before using H2O.
- Click [here](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#R) to view instructions for using H2O with R.
- The following video provides step-by-step instructions on how to start H2O in R:
<iframe width="560" height="315" src="https://www.youtube.com/embed/zzV1kTCnmR0?list=PLNtMya54qvOHbBdA1x8FNRSpMBEHmhxr0" frameborder="0" allowfullscreen></iframe>
- <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/docs-website/h2o-r/h2o_package.pdf" target="_blank">R User Documentation</a>: This document contains all commands in the H2O package for R, including examples and arguments. It represents the definitive guide to using H2O in R.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/product/upgrade/H2ODevPortingRScripts.md" target="_blank">Porting R Scripts</a>: This document is designed to assist users who have created R scripts using previous versions of H2O. Due to the many improvements in R, scripts created using previous versions of H2O will not work. This document provides a side-by-side comparison of the changes in R for each algorithm, as well as overall structural enhancements R users should be aware of, and provides a link to a tool that assists users in upgrading their scripts.
---
<a name="API"></a>
##API Users
API users will be happy to know that the APIs have been more thoroughly documented in the latest release of H2O and additional capabilities (such as exporting weights and biases for Deep Learning models) have been added.
REST APIs are generated immediately out of the code, allowing users to implement machine learning in many ways. For example, REST APIs could be used to call a model created by sensor data and to set up auto-alerts if the sensor data falls below a specified threshold.
- <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/docs-website/h2o-docs/index.html#route-reference" target="_blank">REST API Reference</a>: This document represents the definitive guide to the H2O REST API.
- <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/docs-website/h2o-docs/index.html#schema-reference" target="_blank">REST API Schema Reference</a>: This document represents the definitive guide to the H2O REST API schemas.
- <a href="https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/api/REST/h2o_3_rest_api_overview.md" target="_blank">H2O 3 REST API Overview</a>: This document provides an overview of how APIs are used in H2O, including versioning, URLs, HTTP verbs, status codes, formats, schemas, and examples.
---
<a name="Java"></a>
##Java Users
For Java developers, the following resources will help you create your own custom app that uses H2O.
- <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/docs-website/h2o-core/javadoc/index.html" target="_blank">H2O Core Java Developer Documentation</a>: The definitive Java API guide for the core components of H2O.
- <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/docs-website/h2o-algos/javadoc/index.html" target="_blank">H2O Algos Java Developer Documentation</a>: The definitive Java API guide for the algorithms used by H2O.
- <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/docs-website/h2o-genmodel/javadoc/index.html" target="_blank">h2o-genmodel (POJO) Javadoc</a>: Provides a step-by-step guide to creating and implementing POJOs in a Java application.
###SDK Information
The Java API is generated and accessible from the [download page](http://h2o.ai/download).
- [Central repository](http://search.maven.org/#search%7Cga%7C1%7Cai.h2o)
- [View code on Github](https://github.com/h2oai/h2o-3/tree/{{last_commit_hash}})
- [Apache License](https://github.com/h2oai/h2o-3/blob/master/LICENSE)
---
<a name="Dev"></a>
##Developers
If you're looking to use H2O to help you develop your own apps, the following links will provide helpful references.
For the latest version of IDEA IntelliJ, run `./gradlew idea`, then click **File > Open** within IDEA. Select the `.ipr` file in the repository and click the **Choose** button.
For older versions of IDEA IntelliJ, run `./gradlew idea`, then **Import Project** within IDEA and point it to the <a href="https://github.com/h2oai/h2o-3.git" target="_blank">h2o-3 directory</a>.
>**Note**: This process will take longer, so we recommend using the first method if possible.
For JUnit tests to pass, you may need multiple H2O nodes. Create a "Run/Debug" configuration with the following parameters:
```
Type: Application
Main class: H2OApp
Use class path of module: h2o-app
```
After starting multiple "worker" node processes in addition to the JUnit test process, they will cloud up and run the multi-node JUnit tests.
- <a href="http://h2o.ai/product/recommended-systems-for-h2o/" target="_blank">Recommended Systems</a>: This one-page PDF provides a basic overview of the operating systems, languages and APIs, Hadoop resource manager versions, cloud computing environments, browsers, and other resources recommended to run H2O.
- <a href="https://github.com/h2oai/h2o-3#41-building-from-the-command-line-quick-start" target="_blank">Developer Documentation</a>: Detailed instructions on how to build and launch H2O, including how to clone the repository, how to pull from the repository, and how to install required dependencies.
- Click [here](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Maven) to view instructions on how to use H2O with Maven.
- <a href="https://github.com/h2oai/h2o-3/blob/master/build.gradle" target="_blank">Maven install</a>: This page provides information on how to build a version of H2O that generates the correct IDE files.
- <a href="http://apps.h2o.ai" target="_blank">apps.h2o.ai</a>: Apps.h2o.ai is designed to support application developers via events, networking opportunities, and a new, dedicated website comprising developer kits and technical specs, news, and product spotlights.
- <a href="https://github.com/h2oai/h2o-droplets" target="_blank">H2O Project Templates</a>: This page provides template info for projects created in Java, Scala, or Sparkling Water.
- <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/docs-website/h2o-scala/scaladoc/index.html" target="_blank">H2O Scala API Developer Documentation</a>: The definitive Scala API guide for H2O.
- <a href="http://h2o.ai/blog/2014/16/Hacking/Algos/" target="_blank">Hacking Algos</a>: This blog post by Cliff walks you through building a new algorithm, using K-Means, Quantiles, and Grep as examples.
- <a href="http://0xdata.com/blog/2014/05/kv-store-memory-analytics-part-2-2/" target="_blank">KV Store Guide</a>: Learn more about performance characteristics when implementing new algorithms.
- <a href="https://github.com/h2oai/h2o-3/blob/master/CONTRIBUTING.md" target="_blank">Contributing code</a>: If you're interested in contributing code to H2O, we appreciate your assistance! This document describes how to access our list of Jiras that contributors can work on and how to contact us. **Note**: To access this link, you must have an [Atlassian account](https://id.atlassian.com/signup?application=mac&tenant=&continue=https%3A%2F%2Fmy.atlassian.com).
---
#Downloading H2O
* [Download page for this build](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html)
* [h2o.ai main download page](http://www.h2o.ai/download)
To download H2O, go to our [downloads page](http://www.h2o.ai/download). Select a build type (bleeding edge or latest alpha), then select an installation method ([standalone](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html), [R](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#R), [Python](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Python), [Hadoop](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Hadoop), or [Maven](http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Maven)) by clicking the tabs at the top of the page. Follow the instructions in the tab to install H2O.
# Starting H2O ...
There are a variety of ways to start H2O, depending on which client you would like to use.
# ... From R
To use H2O in R, follow the instructions on the <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#R" target="_blank">download page</a>.
# ... From Python
To use H2O in Python, follow the instructions on the <a href="http://h2o-release.s3.amazonaws.com/h2o/{{branch_name}}/{{build_number}}/index.html#Python" target="_blank">download page</a>.
# ... On Spark
To use H2O on Spark, follow the instructions on the Sparkling Water [download page](http://h2o-release.s3.amazonaws.com/sparkling-water/master/latest.html).
|
pchmieli/h2o-3
|
h2o-docs/src/product/flow/SiteIntro.md
|
Markdown
|
apache-2.0
| 26,004
|
[
30522,
1001,
6160,
2000,
1044,
2475,
2080,
1017,
1012,
1014,
6160,
2000,
1996,
1044,
2475,
2080,
12653,
2609,
999,
5834,
2006,
2115,
2181,
1997,
3037,
1010,
7276,
1037,
4083,
4130,
2013,
1996,
6971,
2682,
1012,
2057,
1005,
2128,
5580,
2017,
1005,
2128,
4699,
1999,
4083,
2062,
2055,
1044,
2475,
2080,
1011,
2065,
2017,
2031,
2151,
3980,
1010,
3531,
10373,
2068,
2000,
2256,
8224,
2177,
1010,
1031,
1044,
2475,
14122,
16416,
2213,
1033,
1006,
5653,
3406,
1024,
1044,
2475,
14122,
16416,
2213,
1030,
8224,
17058,
2015,
1012,
4012,
1007,
2030,
2695,
2068,
2006,
2256,
8224,
2967,
7057,
1010,
1026,
1037,
17850,
12879,
1027,
1000,
16770,
1024,
1013,
1013,
2967,
1012,
8224,
1012,
4012,
1013,
7057,
1013,
1001,
999,
7057,
1013,
1044,
2475,
14122,
16416,
2213,
1000,
4539,
1027,
1000,
1035,
8744,
1000,
1028,
1044,
2475,
14122,
16416,
2213,
1026,
1013,
1037,
1028,
1012,
2023,
2003,
1037,
2270,
7057,
1010,
2061,
2115,
3160,
2097,
2022,
5710,
2000,
2060,
5198,
1012,
1008,
1008,
3602,
1008,
1008,
1024,
2000,
3693,
2256,
8224,
2177,
2006,
1026,
1037,
17850,
12879,
1027,
1000,
16770,
1024,
1013,
1013,
2967,
1012,
8224,
1012,
4012,
1013,
7057,
1013,
1001,
999,
7057,
1013,
1044,
2475,
14122,
16416,
2213,
1000,
4539,
1027,
1000,
1035,
8744,
1000,
1028,
1044,
2475,
14122,
16416,
2213,
1026,
1013,
1037,
1028,
1010,
2017,
2342,
1037,
8224,
4070,
1006,
2107,
2004,
20917,
4014,
2030,
8224,
1009,
1007,
1012,
2006,
1996,
1026,
1037,
17850,
12879,
1027,
1000,
16770,
1024,
1013,
1013,
2967,
1012,
8224,
1012,
4012,
1013,
7057,
1013,
1001,
999,
7057,
1013,
1044,
2475,
14122,
16416,
2213,
1000,
4539,
1027,
1000,
1035,
8744,
1000,
1028,
1044,
2475,
14122,
16416,
2213,
1026,
1013,
1037,
1028,
3931,
1010,
11562,
1996,
1008,
1008,
3693,
2177,
1008,
1008,
6462,
1010,
2059,
11562,
1996,
1008,
1008,
2047,
8476,
1008,
1008,
6462,
2000,
2695,
1037,
2047,
4471,
1012,
2017,
2123,
1005,
1056,
2342,
2000,
5227,
2030,
2681,
1037,
4471,
2000,
3693,
1011,
2017,
2323,
2022,
2794,
2000,
1996,
2177,
8073,
1012,
2057,
6160,
2115,
12247,
999,
3531,
2292,
2149,
30524,
1044,
2475,
2080,
1005,
1055,
4773,
21318,
1007,
1012,
999,
1031,
11834,
6462,
1033,
1006,
4871,
1013,
11834,
8569,
15474,
1012,
1052,
3070,
1007,
2828,
2115,
3160,
1999,
1996,
4443,
2492,
2008,
3544,
2012,
1996,
3953,
1997,
1996,
2217,
8237,
1998,
2017,
2097,
2022,
4198,
2007,
2019,
1044,
2475,
2080,
6739,
2040,
2097,
6869,
2000,
2115,
23032,
1999,
2613,
2051,
1012,
999,
1031,
11834,
2217,
8237,
1033,
1006,
4871,
1013,
11834,
7363,
8237,
1012,
1052,
3070,
1007,
1011,
1011,
1011,
1026,
1037,
2171,
1027,
1000,
2047,
1000,
1028,
1026,
1013,
1037,
1028,
1001,
1001,
2047,
5198,
2065,
2017,
1005,
2128,
2074,
2893,
2318,
2007,
1044,
2475,
2080,
1010,
2182,
2024,
2070,
6971,
2000,
2393,
2017,
4553,
2062,
1024,
1011,
1026,
1037,
17850,
12879,
1027,
1000,
8299,
1024,
1013,
1013,
1044,
2475,
2080,
1012,
9932,
1013,
4031,
1013,
30523,
2113,
2065,
2017,
2031,
2151,
3980,
2030,
7928,
2055,
1044,
2475,
2080,
2011,
22042,
1996,
11834,
13212,
6462,
1999,
1996,
2896,
1011,
2157,
3420,
1999,
4834,
1006,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2113,
2065,
2017,
2031,
2151,
3980,
2030,
7928,
2055,
1044,
2475,
2080,
2011,
22042,
1996,
11834,
13212,
6462,
1999,
1996,
2896,
1011,
2157,
3420,
1999,
4834,
1006,
30526
] |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title>Apache License, Version 2.0</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/style.css">
<link rel="stylesheet" type="text/css" media="screen" href="/css/code.css">
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/apache_boot.js"></script>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
</head>
<body>
<div id="page" class="container_16">
<div id="header" class="grid_8">
<img src="/images/feather-small.gif" alt="The Apache Software Foundation">
<h1>The Apache Software Foundation</h1>
<h2>Apache License, Version 2.0</h2>
</div>
<div id="nav" class="grid_8">
<ul>
<!-- <li><a href="/" title="Welcome!">Home</a></li> -->
<li><a href="/foundation/" title="The Foundation">Foundation</a></li>
<li><a href="http://projects.apache.org" title="The Projects">Projects</a></li>
<li><a href="http://people.apache.org" title="The People">People</a></li>
<li><a href="/foundation/getinvolved.html" title="Get Involved">Get Involved</a></li>
<li><a href="/dyn/closer.cgi" title="Download">Download</a></li>
<li><a href="/foundation/sponsorship.html" title="Support Apache">Support Apache</a></li>
</ul>
<p><a href="/">Home</a> » <a href="/licenses/">Licenses</a></p>
<form name="search" id="search" action="http://www.google.com/search" method="get">
<input value="apache.org" name="sitesearch" type="hidden"/>
<input type="text" name="q" id="query">
<input type="submit" id="submit" value="Search">
</form>
</div>
<div class="clear"></div>
<div id="content" class="grid_16"><div class="section-content"><p>Apache License<br></br>Version 2.0, January 2004<br></br>
<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
<p>"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.</p>
<p>"Licensor" shall mean the copyright owner or entity authorized by the
copyright owner that is granting the License.</p>
<p>"Legal Entity" shall mean the union of the acting entity and all other
entities that control, are controlled by, or are under common control with
that entity. For the purposes of this definition, "control" means (i) the
power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty
percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.</p>
<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.</p>
<p>"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source,
and configuration files.</p>
<p>"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled
object code, generated documentation, and conversions to other media types.</p>
<p>"Work" shall mean the work of authorship, whether in Source or Object form,
made available under the License, as indicated by a copyright notice that
is included in or attached to the work (an example is provided in the
Appendix below).</p>
<p>"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial
revisions, annotations, elaborations, or other modifications represent, as
a whole, an original work of authorship. For the purposes of this License,
Derivative Works shall not include works that remain separable from, or
merely link (or bind by name) to the interfaces of, the Work and Derivative
Works thereof.</p>
<p>"Contribution" shall mean any work of authorship, including the original
version of the Work and any modifications or additions to that Work or
Derivative Works thereof, that is intentionally submitted to Licensor for
inclusion in the Work by the copyright owner or by an individual or Legal
Entity authorized to submit on behalf of the copyright owner. For the
purposes of this definition, "submitted" means any form of electronic,
verbal, or written communication sent to the Licensor or its
representatives, including but not limited to communication on electronic
mailing lists, source code control systems, and issue tracking systems that
are managed by, or on behalf of, the Licensor for the purpose of discussing
and improving the Work, but excluding communication that is conspicuously
marked or otherwise designated in writing by the copyright owner as "Not a
Contribution."</p>
<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.</p>
<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
terms and conditions of this License, each Contributor hereby grants to You
a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of, publicly
display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.</p>
<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
and conditions of this License, each Contributor hereby grants to You a
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made, use,
offer to sell, sell, import, and otherwise transfer the Work, where such
license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by
combination of their Contribution(s) with the Work to which such
Contribution(s) was submitted. If You institute patent litigation against
any entity (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes
direct or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate as of the
date such litigation is filed.</p>
<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
distribute copies of the Work or Derivative Works thereof in any medium,
with or without modifications, and in Source or Object form, provided that
You meet the following conditions:</p>
<ol style="list-style: lower-latin;">
<li>You must give any other recipients of the Work or Derivative Works a
copy of this License; and</li>
<li>You must cause any modified files to carry prominent notices stating
that You changed the files; and</li>
<li>You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices from
the Source form of the Work, excluding those notices that do not pertain to
any part of the Derivative Works; and</li>
<li>If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding
those notices that do not pertain to any part of the Derivative Works, in
at least one of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or documentation,
if provided along with the Derivative Works; or, within a display generated
by the Derivative Works, if and wherever such third-party notices normally
appear. The contents of the NOTICE file are for informational purposes only
and do not modify the License. You may add Your own attribution notices
within Derivative Works that You distribute, alongside or as an addendum to
the NOTICE text from the Work, provided that such additional attribution
notices cannot be construed as modifying the License.
<br/>
<br/>
You may add Your own copyright statement to Your modifications and may
provide additional or different license terms and conditions for use,
reproduction, or distribution of Your modifications, or for any such
Derivative Works as a whole, provided Your use, reproduction, and
distribution of the Work otherwise complies with the conditions stated in
this License.
</li>
</ol>
<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
explicitly state otherwise, any Contribution intentionally submitted for
inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the
terms of any separate license agreement you may have executed with Licensor
regarding such Contributions.</p>
<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
permission to use the trade names, trademarks, service marks, or product
names of the Licensor, except as required for reasonable and customary use
in describing the origin of the Work and reproducing the content of the
NOTICE file.</p>
<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
applicable law or agreed to in writing, Licensor provides the Work (and
each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
are solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise
of permissions under this License.</p>
<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
under no legal theory, whether in tort (including negligence), contract, or
otherwise, unless required by applicable law (such as deliberate and
grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a result
of this License or out of the use or inability to use the Work (including
but not limited to damages for loss of goodwill, work stoppage, computer
failure or malfunction, or any and all other commercial damages or losses),
even if such Contributor has been advised of the possibility of such
damages.</p>
<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
While redistributing the Work or Derivative Works thereof, You may choose
to offer, and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this License.
However, in accepting such obligations, You may act only on Your own behalf
and on Your sole responsibility, not on behalf of any other Contributor,
and only if You agree to indemnify, defend, and hold each Contributor
harmless for any liability incurred by, or claims asserted against, such
Contributor by reason of your accepting any such warranty or additional
liability.</p>
<p>END OF TERMS AND CONDITIONS</p>
<h1 id="apply">APPENDIX: How to apply the Apache License to your work</h1>
<p>To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included
on the same "printed page" as the copyright notice for easier
identification within third-party archives.</p>
<div class="codehilite"><pre>Copyright [yyyy] [name of copyright owner]
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.
</pre></div></div></div>
<div class="clear"></div>
</div>
<div id="footer" class="container_16">
<div class="links grid_16">
<div class="grid_3">
<h4>Projects</h4>
<ul>
<li><a href="http://httpd.apache.org/" title="Apache Web Server (httpd)">HTTP Server</a></li>
<li><a href="http://abdera.apache.org/" title="Atom Publishing Protocol Implementation">Abdera</a></li>
<li><a href="http://accumulo.apache.org/" title="Sorted, distributed key/value store">Accumulo</a></li>
<li><a href="http://ace.apache.org/" title="Centralized life cycle management and deployment of OSGi based and related modular software artifacts for distribution.">ACE</a></li>
<li><a href="http://activemq.apache.org/" title="Distributed Messaging System">ActiveMQ</a></li>
<li><a href="http://airavata.apache.org/" title="Workflow and Computational Job Management Middleware">Airavata</a></li>
<li><a href="http://allura.apache.org/" title="Forge software for hosting software projects">Allura</a></li>
<li><a href="http://ambari.apache.org/" title="Hadoop cluster management">Ambari</a></li>
<li><a href="http://ant.apache.org/" title="Java-based build tool">Ant</a></li>
<li><a href="http://any23.apache.org/" title="Anything to Triples">Any23</a></li>
<li><a href="http://apr.apache.org/" title="Apache Portable Runtime libraries">APR</a></li>
<li><a href="http://archiva.apache.org/" title="Build Artifact Repository Manager">Archiva</a></li>
<li><a href="http://aries.apache.org/" title="Enterprise OSGi application programming model">Aries</a></li>
<li><a href="http://avro.apache.org/" title="A Serialization System">Avro</a></li>
<li><a href="http://axis.apache.org/" title="Java SOAP Engine">Axis</a></li>
<li><a href="http://bigtop.apache.org/" title="Apache Hadoop ecosystem integration and distribution project">Bigtop</a></li>
<li><a href="http://bloodhound.apache.org/" title="Issue tracking, wiki and repository browser">Bloodhound</a></li>
<li><a href="http://buildr.apache.org/" title="Simple and intuitive build system for Java applications">Buildr</a></li>
<li><a href="http://bval.apache.org/" title="Apache BVal: JSR-303 Bean Validation Implementation and Extensions">BVal</a></li>
<li><a href="http://camel.apache.org/" title="Spring based Integration Framework which implements the Enterprise Integration Patterns">Camel</a></li>
<li><a href="http://cassandra.apache.org/" title="Highly scalable second-generation distributed database">Cassandra</a></li>
<li><a href="http://cayenne.apache.org/" title="User-friendly Java ORM with Tools">Cayenne</a></li>
<li><a href="http://chemistry.apache.org/" title="CMIS (Content Managment Interoperability Services) Clients and Servers">Chemistry</a></li>
<li><a href="http://chukwa.apache.org/" title="Open source data collection system for monitoring large distributed systems.">Chukwa</a></li>
<li><a href="http://clerezza.apache.org/" title="Semantically linked data for OSGi">Clerezza</a></li>
<li><a href="http://cloudstack.apache.org/" title="Infrastructure as a Service solution">CloudStack</a></li>
<li><a href="http://cocoon.apache.org/" title="Web development framework: separation of concerns, component-based">Cocoon</a></li>
<li><a href="http://commons.apache.org/" title="Reusable Java components">Commons</a></li>
<li><a href="http://continuum.apache.org/" title="Continuous Integration and Build Server">Continuum</a></li>
<li><a href="http://cordova.apache.org/" title="Platform for building native mobile applications using HTML, CSS and JavaScript">Cordova</a></li>
<li><a href="http://couchdb.apache.org/" title="RESTful document database">CouchDB</a></li>
<li><a href="http://creadur.apache.org/" title="Comprehension and auditing of software distributions">Creadur</a></li>
<li><a href="http://crunch.apache.org/" title="Simple and Efficient MapReduce Pipelines">Crunch</a></li>
<li><a href="http://ctakes.apache.org/" title="Natural language processing (NLP) tool for information extraction from electronic medical record clinical free-text">cTAKES</a></li>
<li><a href="http://curator.apache.org/" title="Java libraries that make using Apache ZooKeeper easier">Curator</a></li>
<li><a href="http://cxf.apache.org/" title="Service Framework">CXF</a></li>
<li><a href="http://db.apache.org/" title="Database access">DB</a></li>
<li><a href="http://deltacloud.apache.org/" title="RESTful cloud management interface">Deltacloud</a></li>
<li><a href="http://deltaspike.apache.org/" title="Portable CDI extensions that provide useful features for Java application developers">DeltaSpike</a></li>
<li><a href="http://directmemory.apache.org/" title="An off-heap cache for the Java Virtual Machine">DirectMemory</a></li>
<li><a href="http://directory.apache.org/" title="Apache Directory Server">Directory</a></li>
<li><a href="http://empire-db.apache.org/" title="Relational Data Persistence">Empire-db</a></li>
<li><a href="http://etch.apache.org/" title="Cross-platform, language- and transport-independent RPC-like messaging framework">Etch</a></li>
<li><a href="http://felix.apache.org/" title="OSGi Framework and components.">Felix</a></li>
<li><a href="http://flex.apache.org/" title="Application framework for expressive web applications that deploy to all major browsers, desktops and devices.">Flex</a></li>
<li><a href="http://flume.apache.org/" title="A reliable service for efficiently collecting, aggregating, and moving large amounts of log data">Flume</a></li>
<li><a href="http://forrest.apache.org/" title="Aggregated multi-channel documentation, separation of concerns">Forrest</a></li>
<li><a href="http://geronimo.apache.org/" title="Java2, Enterprise Edition (J2EE) container">Geronimo</a></li>
<li><a href="http://giraph.apache.org/" title="Iterative graph processing system built for high scalability">Giraph</a></li>
<li><a href="http://gora.apache.org/" title="ORM framework for column stores such as Apache HBase and Apache Cassandra with a specific focus on Hadoop">Gora</a></li>
<li><a href="http://gump.apache.org/" title="Continuous integration of open source projects">Gump</a></li>
<li><a href="http://hadoop.apache.org/" title="Distributed computing platform">Hadoop</a></li>
<li><a href="http://hama.apache.org/" title="a Bulk Synchronous Parallel computing framework on top of Hadoop">Hama</a></li>
<li><a href="http://hbase.apache.org/" title="Hadoop Database">HBase</a></li>
<li><a href="http://helix.apache.org/" title="A cluster management framework for partitioned and replicated distributed resources">Helix</a></li>
<li><a href="http://hive.apache.org/" title="Data warehouse infrastructure using the Hadoop Database">Hive</a></li>
<li><a href="http://hc.apache.org/" title="Java toolset of low level HTTP components">HttpComponents</a></li>
<li><a href="http://isis.apache.org/" title="Framework for rapidly developing domain-driven apps in Java">Isis</a></li>
<li><a href="http://jackrabbit.apache.org/" title="Content Repository for Java">Jackrabbit</a></li>
<li><a href="http://james.apache.org/" title="Java Apache Mail Enterprise Server">James</a></li>
<li><a href="http://jclouds.apache.org/" title="Java cloud APIs and abstractions">jclouds</a></li>
<li><a href="http://jena.apache.org/" title="Java framework for building Semantic Web applications">Jena</a></li>
<li><a href="http://jmeter.apache.org/" title="Java performance and functional testing">JMeter</a></li>
<li><a href="http://jspwiki.apache.org/" title="Leading open source WikiWiki engine, feature-rich and built around standard J2EE components (Java, servlets, JSP). ">JSPWiki</a></li>
<li><a href="http://juddi.apache.org/" title="Java implementation of the Universal Description, Discovery, and Integration specification">jUDDI</a></li>
<li><a href="http://kafka.apache.org/" title="Distributed publish-subscribe messaging system">Kafka</a></li>
<li><a href="http://karaf.apache.org/" title="Server-side OSGi distribution">Karaf</a></li>
<li><a href="http://knox.apache.org/" title="Simplify and normalize the deployment and implementation of secure Hadoop clusters">Knox</a></li>
<li><a href="http://lenya.apache.org/" title="Content Management System">Lenya</a></li>
<li><a href="http://libcloud.apache.org/" title="Unified interface to the cloud">Libcloud</a></li>
<li><a href="http://logging.apache.org/" title="Cross-language logging services">Logging</a></li>
<li><a href="http://lucene.apache.org/" title="Search engine library">Lucene</a></li>
<li><a href="http://lucenenet.apache.org/" title="Search engine library targeted at .NET runtime users.">Lucene.Net</a></li>
<li><a href="http://lucy.apache.org/" title="Search engine library for dynamic languages">Lucy</a></li>
<li><a href="http://mahout.apache.org/" title="Scalable machine learning library">Mahout</a></li>
<li><a href="http://manifoldcf.apache.org/" title="Framework for connecting source content repositories to target repositories or indexes.">ManifoldCF</a></li>
<li><a href="http://marmotta.apache.org/" title="An Open Platform for Linked Data">Marmotta</a></li>
<li><a href="http://maven.apache.org/" title="Java project management and comprehension tools">Maven</a></li>
<li><a href="http://mesos.apache.org/" title="a cluster manager that provides efficient resource isolation and sharing across distributed applications">Mesos</a></li>
<li><a href="http://mina.apache.org/" title="Multipurpose Infrastructure for Network Application">MINA</a></li>
<li><a href="http://mrunit.apache.org/" title="Java library that helps developers unit test Apache Hadoop map reduce jobs">MRUnit</a></li>
<li><a href="http://myfaces.apache.org/" title="JavaServer(tm) Faces implementation and components">MyFaces</a></li>
<li><a href="http://nutch.apache.org/" title="Open Source Web Search Software">Nutch</a></li>
<li><a href="http://ode.apache.org/" title="Orchestration Director Engine: Business Process Management (BPM), Process Orchestration and Workflow through service composition.">ODE</a></li>
<li><a href="http://ofbiz.apache.org/" title="Open for Business: enterprise automation software">OFBiz</a></li>
<li><a href="http://olingo.apache.org/" title="OASIS OData protocol libraries">Olingo</a></li>
<li><a href="http://oltu.apache.org/" title="OAuth protocol implementation in Java">Oltu</a></li>
<li><a href="http://onami.apache.org/" title="Development and maintenance of a set of Google Guice extensions">Onami</a></li>
<li><a href="http://oodt.apache.org/" title="Object Oriented Data Technology (middleware metadata)">OODT</a></li>
<li><a href="http://oozie.apache.org/" title="A workflow scheduler system to manage Apache Hadoop jobs.">Oozie</a></li>
<li><a href="http://climate.apache.org/" title="Climate model evaluation">Open Climate Workbench</a></li>
<li><a href="http://openjpa.apache.org/" title="OpenJPA: Object Relational Mapping for Java">OpenJPA</a></li>
<li><a href="http://openmeetings.apache.org/" title="OpenMeetings: Web-Conferencing and real-time collaboration">OpenMeetings</a></li>
<li><a href="http://opennlp.apache.org/" title="Machine learning based toolkit for the processing of natural language text">OpenNLP</a></li>
<li><a href="http://openoffice.apache.org/" title="An open-source, office-document productivity suite">OpenOffice</a></li>
<li><a href="http://openwebbeans.apache.org/" title="OpenWebBeans: JSR-299 Context and Dependency Injection for Java EE Platform Implementation">OpenWebBeans</a></li>
<li><a href="http://pdfbox.apache.org/" title="Java library for working with PDF documents">PDFBox</a></li>
<li><a href="http://perl.apache.org/" title="Dynamic websites using Perl">Perl</a></li>
<li><a href="http://pig.apache.org/" title="Platform for analyzing large data sets">Pig</a></li>
<li><a href="http://pivot.apache.org/" title="Rich Internet applications in Java">Pivot</a></li>
<li><a href="http://poi.apache.org/" title="Java API for OLE 2 Compound and OOXML Documents">POI</a></li>
<li><a href="http://portals.apache.org/" title="Portal technology">Portals</a></li>
<li><a href="http://qpid.apache.org/" title="Multiple language implementation of the latest Advanced Message Queuing Protocol (AMQP)">Qpid</a></li>
<li><a href="http://rave.apache.org/" title="Web and social mashup engine">Rave</a></li>
<li><a href="http://river.apache.org/" title="Jini service oriented architecture">River</a></li>
<li><a href="http://roller.apache.org/" title="Java blog server">Roller</a></li>
<li><a href="http://santuario.apache.org/" title="XML Security in Java and C++">Santuario</a></li>
<li><a href="http://servicemix.apache.org/" title="Enterprise Service Bus">ServiceMix</a></li>
<li><a href="http://shindig.apache.org/" title="Opensocial Reference Implementation">Shindig</a></li>
<li><a href="http://shiro.apache.org/" title="Powerful and easy-to-use application security framework">Shiro</a></li>
<li><a href="http://sis.apache.org/" title="Spatial Information System">SIS</a></li>
<li><a href="http://sling.apache.org/" title="Web Framework for JCR Content Repositories">Sling</a></li>
<li><a href="http://spamassassin.apache.org/" title="Mail filter to identify spam">SpamAssassin</a></li>
<li><a href="http://spark.apache.org/" title="Fast and general engine for large-scale data processing">Spark</a></li>
<li><a href="http://sqoop.apache.org/" title="Bulk Data Transfer for Hadoop and Structured Datastores">Sqoop</a></li>
<li><a href="http://stanbol.apache.org/" title="Reusable components for semantic content management">Stanbol</a></li>
<li><a href="http://steve.apache.org/" title="Apache's Python based single transferable vote software system">STeVe</a></li>
<li><a href="http://struts.apache.org/" title="Model 2 framework for building Java web applications">Struts</a></li>
<li><a href="http://subversion.apache.org/" title="Version Control">Subversion</a></li>
<li><a href="http://synapse.apache.org/" title="Enterprise Service Bus and Mediation Framework">Synapse</a></li>
<li><a href="http://syncope.apache.org/" title="Managing digital identities in enterprise environments">Syncope</a></li>
<li><a href="http://tapestry.apache.org/" title="Component-based Java Web Application Framework">Tapestry</a></li>
<li><a href="http://tcl.apache.org/" title="Dynamic websites using TCL">Tcl</a></li>
<li><a href="http://thrift.apache.org/" title="Framework for scalable cross-language services development">Thrift</a></li>
<li><a href="http://tika.apache.org" title="Content Analysis and Detection Toolkit">Tika</a></li>
<li><a href="http://tiles.apache.org/" title="A templating framework for web application user interfaces">Tiles</a></li>
<li><a href="http://tomcat.apache.org/" title="A Java Servlet and JSP Container">Tomcat</a></li>
<li><a href="http://tomee.apache.org/" title="Java EE Web Profile built on Tomcat">TomEE</a></li>
<li><a href="http://trafficserver.apache.org/" title="A fast, scalable and extensible HTTP/1.1 compliant caching proxy server">Traffic Server</a></li>
<li><a href="http://turbine.apache.org/" title="A Java Servlet Web Application Framework and associated component library">Turbine</a></li>
<li><a href="http://tuscany.apache.org/" title="An SCA based Service Composition Framework">Tuscany</a></li>
<li><a href="http://uima.apache.org/" title="Framework and annotators for unstructured information analysis">UIMA</a></li>
<li><a href="http://vcl.apache.org/" title="Virtual Computing Lab">VCL</a></li>
<li><a href="http://velocity.apache.org/" title="A Java Templating Engine">Velocity</a></li>
<li><a href="http://ws.apache.org/" title="Projects related to Web Services">Web Services</a></li>
<li><a href="http://whirr.apache.org/" title="Libraries for running Cloud Services">Whirr</a></li>
<li><a href="http://wicket.apache.org/" title="Component-based Java Web Application Framework.">Wicket</a></li>
<li><a href="http://wink.apache.org/" title="RESTful Web services Framework">Wink</a></li>
<li><a href="http://wookie.apache.org/" title="Widgets for Applications">Wookie</a></li>
<li><a href="http://xalan.apache.org/" title="XSLT processors in Java and C++">Xalan</a></li>
<li><a href="http://xerces.apache.org/" title="XML parsers in Java, C++ and Perl">Xerces</a></li>
<li><a href="http://xmlbeans.apache.org/" title="XML-Java binding tool">XMLBeans</a></li>
<li><a href="http://xmlgraphics.apache.org/" title="Conversion from XML to graphical output">XML Graphics</a></li>
<li><a href="http://zookeeper.apache.org/" title="Centralized service for maintaining configuration information">ZooKeeper</a></li>
</ul>
</div>
<div class="grid_3">
<h4>Foundation</h4>
<ul>
<li><a href="/foundation/faq.html">FAQ</a></li>
<li><a href="/foundation/glossary.html">Glossary</a></li>
<li><a href="/licenses/" title="Overview of the Apache Licenese">Licenses</a></li>
<li><a href="/foundation/marks/" title="Apache marks policies and listing">Trademarks</a></li>
<li><a href="/foundation/news.html" title="Official news feed of Foundation announcements">News</a></li>
<li><a href="/press/" title="Press, Media, and Analyst contact">Press Inquiries</a></li>
<li><a href="/foundation/records/" title="Formal corporate records and board meeting minutes">Public Records</a></li>
<li><a href="/foundation/mailinglists.html" title="Mailing lists and Apache">Mailing Lists</a></li>
<li><a href="/foundation/sponsorship.html" title="Sponsor the Foundation">Sponsorship</a></li>
<li><a href="/foundation/contributing.html" title="Donate to the Foundation">Donations</a></li>
<li><a href="/foundation/buy_stuff.html" title="Buy Apache branded merchandise">Buy Stuff</a></li>
<li><a href="/foundation/thanks.html" title="Thank you to our Sponsors">Thanks</a></li>
<li><a href="/foundation/contact.html" title="Contact Us">Contact</a></li>
</ul>
</div>
<div class="grid_3 suffix_1">
<h4>Foundation Projects</h4>
<ul>
<li><a href="http://attic.apache.org/" title="Inactive projects repository">Attic</a></li>
<li><a href="/foundation/conferences.html" title="Meetings of developers and users">Conferences</a></li>
<li><a href="http://community.apache.org/" title="Helping newcomers to the ASF">Community Development</a></li>
<li><a href="http://incubator.apache.org/" title="Shepherd for new projects">Incubator</a></li>
<li><a href="/dev/" title="ASF Infrastructure: Operations and howto documents for PMCs and contributors">Infrastructure</a></li>
<li><a href="http://labs.apache.org/" title="The Innovation Laboratories of the Apache Software Foundation">Labs</a></li>
<li><a href="/legal/" title="Legal Affairs">Legal Affairs</a></li>
<li><a href="/press/" title="Public Relations">Public Relations</a></li>
<li><a href="/security/" title="Security">Security</a></li>
<li><a href="/travel/" title="Travel Assistance">Travel Assistance</a></li>
</ul>
</div>
<div class="grid_3">
<h4>Community</h4>
<ul>
<li><a href="http://people.apache.org/" title="Apache committer homepages">People</a></li>
<li><a href="/memorials/" title="In memoriam of past committers">Memorials</a></li>
<li><a href="http://feathercast.apache.org/" title="Apache Podcasts">Feathercast</a></li>
<li><a href="http://blogs.apache.org/" title="Apache Project Blogs">Project Blogs</a></li>
<li><a href="http://planet.apache.org/committers/" title="Apache Committers' Blogs">PlanetApache</a></li>
</ul>
</div>
<div class="grid_3">
<h4>How It Works</h4>
<ul>
<li><a href="/foundation/how-it-works.html">Introduction</a></li>
<li><a href="/foundation/how-it-works.html#meritocracy">Meritocracy</a></li>
<li><a href="/foundation/how-it-works.html#structure">Structure</a></li>
<li><a href="/foundation/how-it-works.html#roles">Roles</a></li>
<li><a href="/foundation/how-it-works.html#management">Collaboration</a></li>
<li><a href="/foundation/how-it-works.html#incubator">Incubator</a></li>
<li><a href="/foundation/how-it-works.html#other">Other entities</a></li>
<li><a href="/foundation/glossary.html">Glossary</a></li>
<li><a href="/foundation/voting.html">Voting</a></li>
</ul>
</div>
</div>
<div class="clear"></div>
</div>
<div id="copyright" class="container_16">
<p>Copyright © 2012 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
</div>
</body>
</html>
|
zangsir/ANNIS
|
annis-widgets/THIRD-PARTY/licenses/apache license, version 2.0 - license-2.0.html
|
HTML
|
apache-2.0
| 34,696
|
[
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1028,
1026,
16129,
11374,
1027,
1000,
4372,
1000,
1028,
1026,
2132,
1028,
1026,
2516,
1028,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1026,
1013,
2516,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
4180,
1011,
2828,
1000,
4180,
1027,
1000,
3793,
1013,
16129,
1025,
25869,
13462,
1027,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
18804,
3200,
1027,
1000,
13958,
1024,
3746,
1000,
4180,
1027,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
4871,
1013,
2004,
2546,
1035,
8154,
1012,
21025,
2546,
1000,
1013,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
2865,
1027,
1000,
3898,
1000,
17850,
12879,
1027,
1000,
1013,
20116,
2015,
1013,
2806,
1012,
20116,
2015,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
2865,
1027,
1000,
3898,
1000,
17850,
12879,
1027,
1000,
1013,
20116,
2015,
1013,
3642,
1012,
20116,
2015,
1000,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
1013,
1046,
2015,
1013,
1046,
4226,
2854,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
1013,
1046,
2015,
1013,
15895,
1035,
9573,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
999,
1011,
1011,
7000,
2000,
1996,
15895,
4007,
3192,
1006,
2004,
2546,
1007,
2104,
2028,
2030,
2062,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
5500,
2007,
2023,
2147,
2005,
3176,
2592,
4953,
9385,
6095,
1012,
1996,
2004,
2546,
15943,
2023,
5371,
2000,
2017,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1004,
22035,
2102,
1025,
6105,
1004,
22035,
2102,
1025,
1007,
1025,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1012,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1012,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1004,
22035,
2102,
1025,
2004,
2003,
1004,
22035,
2102,
1025,
3978,
1010,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
12546,
2104,
1996,
6105,
1012,
1011,
1011,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
3931,
1000,
2465,
1027,
1000,
11661,
1035,
2385,
1000,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
20346,
1000,
2465,
1027,
1000,
8370,
30524,
12456,
1027,
1000,
1996,
15895,
4007,
3192,
1000,
1028,
1026,
1044,
2487,
1028,
1996,
15895,
4007,
3192,
1026,
1013,
1044,
30523,
1035,
1022,
1000,
1028,
1026,
10047,
2290,
5034,
2278,
1027,
1000,
1013,
4871,
1013,
15550,
1011,
2235,
1012,
21025,
2546,
1000,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1035,
1022,
1000,
1028,
1026,
10047,
2290,
5034,
2278,
1027,
1000,
1013,
4871,
1013,
15550,
1011,
2235,
1012,
21025,
2546,
1000,
30526
] |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 選舉資料查詢 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>中選會選舉資料庫網站</title>
<link rel="stylesheet" type="text/css" href="http://db.cec.gov.tw/votehist.css">
<script type="text/javascript">
function AddToFaves_hp() {
var is_4up = parseInt(navigator.appVersion);
var is_mac = navigator.userAgent.toLowerCase().indexOf("mac")!=-1;
var is_ie = navigator.userAgent.toLowerCase().indexOf("msie")!=-1;
var thePage = location.href;
if (thePage.lastIndexOf('#')!=-1)
thePage = thePage.substring(0,thePage.lastIndexOf('#'));
if (is_ie && is_4up && !is_mac)
window.external.AddFavorite(thePage,document.title);
else if (is_ie || document.images)
booker_hp = window.open(thePage,'booker_','menubar,width=325,height=100,left=140,top=60');
//booker_hp.focus();
}
</script>
</head>
<body class="frame">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 標題:選舉資料庫網站 -->
<div style="width: 100%; height: 56px; margin: 0px 0px 0px 0px; border-style: solid; border-width: 0px 0px 1px 0px; border-color: black;">
<div style="float: left;">
<img src="http://db.cec.gov.tw/images/main_title.gif" />
</div>
<div style="width: 100%; height: 48px;">
<div style="text-align: center;">
<img src="http://db.cec.gov.tw/images/small_ghost.gif" /> <span
style="height: 30px; font-size: 20px;"> <a href="http://www.cec.gov.tw"
style="text-decoration: none;">回中選會網站</a>
</span>
</div>
</div>
<div style="width: 100%; height: 8px; background-color: #fde501;">
</div>
</div>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 頁籤 -->
<div
style="width: 100%; height: 29px; background-image: url('http://db.cec.gov.tw/images/tab_background.gif'); background-repeat: repeat-x;">
<div style="text-align: center;">
<a href="histMain.jsp"><img border="0" src="http://db.cec.gov.tw/images/tab_01.gif" /></a>
<a href="histCand.jsp"><img border="0" src="http://db.cec.gov.tw/images/tab_02.gif" /></a>
<!-- <a href=""><img border="0" src="images/tab_03.gif" /></a> -->
<!-- <a href=""><img border="0" src="images/tab_04.gif" /></a> -->
<a href="histQuery.jsp?voteCode=20120101T1A2&qryType=ctks&prvCode=06&cityCode=005&areaCode=02&deptCode=007&liCode=0152#"><img border="0" src="http://db.cec.gov.tw/images/tab_05.gif" onClick="AddToFaves_hp()" /></a>
<a href="mailto:info@cec.gov.tw;ytlin@cec.gov.tw"><img border="0" src="http://db.cec.gov.tw/images/tab_06.gif" /></a>
</div>
</div>
<div
style="width: 100%; height: 22px; background-image: url('http://db.cec.gov.tw/images/tab_separator.gif'); background-repeat: repeat-x;">
</div>
<div class="query">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 子頁面:查詢候選人得票數 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 標題 -->
<div class="titlebox">
<div class="title">
<div class="head">第 08 屆 立法委員選舉(區域) 候選人得票數</div>
<div class="date">投票日期:中華民國101年01月14日</div>
<div class="separator"></div>
</div>
</div>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 查詢:候選人得票數,縣市多選區,如區域立委 -->
<link rel="stylesheet" type="text/css" href="http://db.cec.gov.tw/qryCtks.css" />
<!-- 投開票所表頭 -->
<table class="ctks" width="950" height="22" border=1 cellpadding="0" cellspacing="0" >
<tr class="title">
<td nowrap align="center">地區</td>
<td nowrap align="center">姓名</td>
<td nowrap align="center">號次</td>
<td nowrap align="center">得票數</td>
<td nowrap align="center">得票率</td>
</tr>
<!-- 投開票所內容 -->
<tr class="data">
<td nowrap rowspan=2 align=center>彰化縣第02選區彰化市南安里第0255投開票所</td>
<td nowrap align="center">黃秀芳</td>
<td nowrap align="center">1</td>
<td nowrap align="right">383</td>
<td nowrap align="right"> 44.12%</td>
</tr>
<!-- 投開票所內容 -->
<tr class="data">
<td nowrap align="center">林滄敏</td>
<td nowrap align="center">2</td>
<td nowrap align="right">485</td>
<td nowrap align="right"> 55.87%</td>
</tr>
<!-- 投開票所內容 -->
<tr class="data">
<td nowrap rowspan=2 align=center>彰化縣第02選區彰化市南安里第0256投開票所</td>
<td nowrap align="center">黃秀芳</td>
<td nowrap align="center">1</td>
<td nowrap align="right">283</td>
<td nowrap align="right"> 45.64%</td>
</tr>
<!-- 投開票所內容 -->
<tr class="data">
<td nowrap align="center">林滄敏</td>
<td nowrap align="center">2</td>
<td nowrap align="right">337</td>
<td nowrap align="right"> 54.35%</td>
</tr>
</table>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<div style="width: 100%; height: 20px; margin: 30px 0px 0px 0px; text-align: center; ">
<span>
<img src="http://db.cec.gov.tw/images/leave_arrow_left.gif" />
</span>
<span style="margin: 0px 10px 0px 10px; ">
<a style="text-decoration: none; font-size: 15px; " href="histPrint">下載</a>
</span>
<span>
<img src="http://db.cec.gov.tw/images/leave_arrow_right.gif" />
</span>
<span style="margin-right: 100px;"> </span>
<span>
<img src="http://db.cec.gov.tw/images/leave_arrow_left.gif" />
</span>
<span style="margin: 0px 10px 0px 10px; ">
<a style="text-decoration: none; font-size: 15px; " href="histMain.jsp">離開</a>
</span>
<span>
<img src="http://db.cec.gov.tw/images/leave_arrow_right.gif" />
</span>
</div>
</div>
</body>
</html>
|
g0v/projectV
|
mirror/prvCode_07/cityCode_005-areaCode_02-deptCode_007/voteCode_20120101T1A2-qryType_ctks-prvCode_06-cityCode_005-areaCode_02-deptCode_007-liCode_0152.html
|
HTML
|
mit
| 6,086
|
[
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
16129,
2549,
1013,
30524,
1013,
16129,
1025,
25869,
13462,
1027,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
2516,
1028,
1746,
100,
100,
100,
100,
100,
100,
100,
100,
100,
1026,
1013,
2516,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
17850,
12879,
1027,
1000,
8299,
1024,
1013,
1013,
16962,
1012,
8292,
2278,
1012,
18079,
1012,
1056,
2860,
1013,
3789,
24158,
2102,
1012,
20116,
2015,
1000,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
1028,
3853,
5587,
3406,
7011,
6961,
1035,
6522,
1006,
1007,
1063,
13075,
2003,
1035,
1018,
6279,
1027,
11968,
20240,
3372,
1006,
20532,
1012,
10439,
27774,
1007,
1025,
13075,
2003,
1035,
6097,
1027,
20532,
1012,
5310,
4270,
3372,
1012,
2000,
27663,
18992,
3366,
1006,
1007,
1012,
5950,
11253,
1006,
1000,
6097,
1000,
1007,
999,
1027,
1011,
1015,
1025,
13075,
2003,
1035,
29464,
1027,
20532,
1012,
5310,
4270,
3372,
1012,
2000,
27663,
18992,
3366,
1006,
1007,
1012,
5950,
11253,
1006,
1000,
5796,
2666,
1000,
1007,
999,
1027,
1011,
1015,
1025,
13075,
1996,
13704,
1027,
3295,
1012,
17850,
12879,
1025,
2065,
1006,
1996,
13704,
1012,
2197,
22254,
10288,
11253,
1006,
1005,
1001,
1005,
1007,
999,
1027,
1011,
1015,
1007,
1996,
13704,
1027,
1996,
13704,
1012,
4942,
3367,
4892,
1006,
1014,
1010,
1996,
13704,
1012,
2197,
22254,
10288,
11253,
1006,
1005,
1001,
1005,
1007,
1007,
1025,
2065,
1006,
2003,
1035,
29464,
1004,
1004,
2003,
1035,
1018,
6279,
1004,
1004,
999,
2003,
1035,
6097,
1007,
3332,
1012,
6327,
1012,
5587,
7011,
14550,
4221,
1006,
1996,
13704,
1010,
6254,
1012,
2516,
1007,
1025,
2842,
2065,
1006,
2003,
1035,
29464,
1064,
1064,
6254,
1012,
4871,
1007,
16674,
1035,
6522,
1027,
3332,
1012,
2330,
1006,
1996,
13704,
1010,
1005,
16674,
1035,
1005,
1010,
1005,
12183,
8237,
1010,
9381,
1027,
19652,
1010,
4578,
1027,
2531,
1010,
2187,
1027,
8574,
1010,
2327,
1027,
3438,
1005,
1007,
1025,
1013,
1013,
16674,
1035,
6522,
1012,
3579,
1006,
1007,
1025,
1065,
1026,
1013,
5896,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
2465,
1027,
1000,
4853,
1000,
1028,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
16129,
2549,
1013,
6065,
1012,
26718,
2094,
1000,
1028,
1026,
999,
1011,
1011,
100,
100,
1993,
100,
100,
100,
100,
100,
100,
100,
1011,
1011,
1028,
1026,
4487,
2615,
2806,
1027,
1000,
9381,
1024,
2531,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
6065,
1012,
26718,
2094,
1000,
1028,
1026,
999,
1011,
1011,
100,
100,
100,
100,
100,
100,
1011,
1011,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
4180,
1011,
2828,
1000,
4180,
1027,
1000,
3793,
30526
] |
<?php
namespace Lib\Router\Exception;
class NotFoundException extends \Exception{}
|
nirnanaaa/ofwn
|
libs/Lib/Router/Exception/NotFoundException.php
|
PHP
|
mit
| 85
|
[
30522,
1026,
1029,
25718,
3415,
15327,
5622,
2497,
1032,
2799,
2099,
1032,
6453,
1025,
2465,
2025,
14876,
8630,
10288,
24422,
8908,
1032,
6453,
1063,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
---
layout: post
title: 英语论文写作素材
date: 2020-06-01 9:10:20
tags: [Writing]
---
# 词汇
1. 递进关系词汇(表示"还, 进而, 此外"): Furthermore, Moreover, Besides
* 首先, 在句子或段落之间递进时, 注意要用furthermore, 而不是further.
* 递进关系: 先是Furthermore, 再是Moreover, 最后是Besides.
2. 同级关系(表示"同样","一样地") Also, And, and Too.
And connects directly, also slightly less directly, and too tends to have more commas.
* I like green and blue.
* I like green. I also like blue.
* I like green. I like blue, too.
# Sentences
## 原则-精简
1. 例如, we need to adopt XX method to improve XXX. need to do 就是典型的中式英语, 精简掉不影响语义
## 论证
1. Furthermore, evidence suggests that implicit and explicit processing may have distinct neural
substrates, with amygdala and subcortical limbic activity important for
the implicit process and the response of the prefrontal cortex for the
explicit process (Critchley et al., 2000; Xiao et al., 2016)
2. Binge drinking is associated with poor academic behaviors and performance.
3. Positive impressions of potential dating partners were strongly associated with greater romantic interest
4. We review evidence from five methodological domains in cognitive neuroscience: neuropsychological lesion evidence, univariate activation studies, multivoxel pattern analyses, functional connectivity studies, and brain stimulation experiments.
5. Personality is hierarchical in structure (McAdams & Pals, 2006; McCrae & Costa, 2008; Rushton, Bons, & Hur, 2008). Higher order domains are composed of lower order traits
6. Heterogeneity within the frontoparietal control network. The present study aimed to dissociate the role of the superior parietal lobule (SPL) from the other PPC regions using functional magnetic resonance imaging (fMRI) and functional connectivity
6. It must be emphasized that although the nucleus has two parts these are not necessarily
homologous . All these receptors have a homologous structure and are put together to form a super-family
7. The strong association between early fusiform activity and RT in the explicit task
provides additional evidence for the involvement of the fusiform gyrus in processing emotional information.
8. Noteworthy, the regression analysis revealed that the more efficient participants in the visual search showed stronger FC between the SPL and areas of primary visual cortex (V1) related to the search task.
9. Neuropsychology is one field that holds promise in the construction of comprehensive, developmental models for the promotion of social competence (促进好的) and prevention of problem behavior (避免坏的).
### Question
1. Here, we used a hypothesis-driven approach together with graph theoretical analyses to examine the possibility that the fine-grained
internal organization of the FPCN may be driven by specific connectional patterns as part of a “distance from sensorimotor
processing” principle that defines global brain organization (14–17).
## 方法
1. Participants completed eight practice trials using
images not shown in the actual task to confirm understanding of task instructions.
## 结果
1. 弱结果. We also
found weaker evidence for some activation of right auditory
cortex in both studies, congruent with results from previous
simpler music imagery tasks.
# 参考资料
1. https://wp.nyu.edu/sciwriabudhabi/2018/07/31/also-furthermore-moreover-besides/
|
ChenSD/ChenSD.github.io
|
_posts/2020-06-01-英语论文写作素材.md
|
Markdown
|
gpl-3.0
| 3,545
|
[
30522,
1011,
1011,
1011,
9621,
1024,
2695,
2516,
1024,
1941,
100,
100,
1861,
100,
100,
100,
100,
3058,
1024,
12609,
1011,
5757,
1011,
5890,
1023,
1024,
2184,
1024,
2322,
22073,
1024,
1031,
3015,
1033,
1011,
1011,
1011,
1001,
100,
100,
1015,
1012,
100,
100,
100,
100,
100,
100,
1006,
100,
1923,
1000,
100,
1010,
100,
100,
1010,
100,
1809,
1000,
1007,
1024,
7297,
1010,
9308,
1010,
4661,
1008,
100,
100,
1010,
100,
100,
1816,
100,
100,
100,
1749,
100,
100,
100,
100,
1010,
100,
100,
100,
100,
7297,
1010,
100,
1744,
100,
2582,
1012,
1008,
100,
100,
100,
100,
1024,
100,
100,
7297,
1010,
100,
100,
9308,
1010,
100,
100,
100,
4661,
1012,
1016,
1012,
1794,
100,
100,
100,
1006,
100,
1923,
1000,
1794,
100,
1000,
1010,
1000,
1740,
100,
1802,
1000,
1007,
2036,
1010,
1998,
1010,
1998,
2205,
1012,
1998,
8539,
3495,
1010,
2036,
3621,
2625,
3495,
1010,
1998,
2205,
12102,
2000,
2031,
2062,
4012,
9335,
1012,
1008,
1045,
2066,
2665,
1998,
2630,
1012,
1008,
1045,
2066,
2665,
1012,
1045,
2036,
2066,
2630,
1012,
1008,
1045,
2066,
2665,
1012,
1045,
2066,
2630,
1010,
2205,
1012,
1001,
11746,
1001,
1001,
1787,
100,
1011,
100,
100,
1015,
1012,
100,
100,
1010,
2057,
2342,
2000,
11092,
22038,
4118,
2000,
5335,
22038,
2595,
1012,
2342,
2000,
2079,
100,
100,
100,
100,
1916,
1746,
100,
1941,
100,
1010,
100,
100,
100,
1744,
100,
100,
100,
100,
1001,
1001,
100,
100,
1015,
1012,
7297,
1010,
3350,
6083,
2008,
24655,
1998,
13216,
6364,
2089,
2031,
5664,
15756,
23725,
1010,
2007,
6864,
2290,
9305,
2050,
1998,
4942,
27108,
14656,
15291,
2594,
4023,
2590,
2005,
1996,
24655,
2832,
1998,
1996,
3433,
1997,
1996,
3653,
12792,
2389,
17132,
2005,
1996,
13216,
2832,
1006,
13675,
20189,
3051,
3802,
2632,
1012,
1010,
2456,
1025,
19523,
3802,
2632,
1012,
1010,
2355,
1007,
1016,
1012,
17620,
2063,
5948,
2003,
3378,
2007,
3532,
3834,
15592,
1998,
2836,
1012,
1017,
1012,
3893,
19221,
1997,
4022,
5306,
5826,
2020,
6118,
3378,
2007,
3618,
6298,
3037,
1018,
1012,
2057,
3319,
3350,
2013,
2274,
4118,
10091,
13100,
1999,
10699,
23700,
1024,
11265,
10976,
18075,
9905,
9966,
4649,
3258,
3350,
1010,
4895,
28739,
13143,
13791,
2913,
1010,
4800,
6767,
2595,
2884,
5418,
16478,
1010,
8360,
20831,
2913,
1010,
1998,
4167,
20858,
7885,
1012,
1019,
1012,
6180,
2003,
25835,
1999,
3252,
1006,
22432,
17130,
2015,
1004,
14412,
2015,
1010,
2294,
1025,
23680,
16652,
1004,
6849,
1010,
2263,
1025,
5481,
2669,
1010,
14753,
2015,
1010,
1004,
15876,
2099,
1010,
2263,
1007,
1012,
3020,
2344,
13100,
2024,
3605,
1997,
2896,
2344,
12955,
1020,
1012,
21770,
10624,
30524,
1997,
1996,
6020,
11968,
2666,
9080,
8840,
8569,
2571,
1006,
11867,
2140,
1007,
2013,
1996,
2060,
4903,
2278,
4655,
2478,
8360,
8060,
17011,
12126,
1006,
4718,
3089,
1007,
1998,
8360,
20831,
1020,
1012,
2009,
2442,
2022,
13155,
2008,
2348,
1996,
13502,
2038,
2048,
3033,
2122,
2024,
2025,
9352,
24004,
21197,
3560,
1012,
30523,
6914,
20175,
2100,
2306,
1996,
2392,
29477,
7373,
9080,
2491,
2897,
1012,
1996,
2556,
2817,
6461,
2000,
4487,
24137,
7405,
2618,
1996,
2535,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
6914,
20175,
2100,
2306,
1996,
2392,
29477,
7373,
9080,
2491,
2897,
1012,
1996,
2556,
2817,
6461,
2000,
4487,
24137,
7405,
2618,
1996,
2535,
30526
] |
import 'mad/model/model';
import 'mad/model/serializer/cake_serializer';
/**
* @inherits {mad.Model}
* @parent index
*
* The GroupUser model
*
* @constructor
* Creates a groupUser
* @param {array} options
* @return {passbolt.model.GroupUser}
*/
var GroupUser = passbolt.model.GroupUser = mad.Model.extend('passbolt.model.GroupUser', /** @static */ {
/* ************************************************************** */
/* MODEL DEFINITION */
/* ************************************************************** */
validateRules: { },
attributes: {
id: 'string',
group_id: 'string',
user_id: 'string',
User: 'passbolt.model.User.model',
Group: 'passbolt.model.Group.model'
},
membershipType: {
0 : __('Member'),
1 : __('Group manager')
},
/* ************************************************************** */
/* CRUD FUNCTION */
/* ************************************************************** */
/**
* Create a new groupUser
* @param {array} attrs Attributes of the new groupUser
* @return {jQuery.Deferred)
*/
create : function (attrs, success, error) {
var self = this;
var params = mad.model.serializer.CakeSerializer.to(attrs, this);
return mad.net.Ajax.request({
url: APP_URL + 'groupsUsers',
type: 'POST',
params: params,
success: success,
error: error
}).pipe(function (data, textStatus, jqXHR) {
// pipe the result to convert cakephp response format into can format
// else the new attribute are not well placed
var def = $.Deferred();
def.resolveWith(this, [mad.model.serializer.CakeSerializer.from(data, self)]);
return def;
});
},
/**
* Destroy a groupUser following the given parameter
* @params {string} id the id of the instance to remove
* @return {jQuery.Deferred)
*/
destroy : function (id, success, error) {
var params = {id:id};
return mad.net.Ajax.request({
url: APP_URL + 'groupsUsers/{id}',
type: 'DELETE',
params: params,
success: success,
error: error
});
},
/**
* Find a groupUser following the given parameter
* @param {array} params Optional parameters
* @return {jQuery.Deferred)
*/
findOne: function (params, success, error) {
params.children = params.children || false;
return mad.net.Ajax.request({
url: APP_URL + 'groupsUsers/{id}.json',
type: 'GET',
params: params,
success: success,
error: error
});
},
/**
* Find a bunch of groupsUsers following the given parameters
* @param {array} params Optional parameters
* @return {jQuery.Deferred)
*/
findAll: function (params, success, error) {
return mad.net.Ajax.request({
url: APP_URL + 'groupsUsers.json',
type: 'GET',
params: params,
success: success,
error: error
});
},
update : function(id, attrs, success, error) {
var self = this;
// remove not desired attributes
delete attrs.created;
delete attrs.modified;
// format data as expected by cakePHP
var params = mad.model.serializer.CakeSerializer.to(attrs, this);
// add the root of the params, it will be used in the url template
params.id = id;
return mad.net.Ajax.request({
url: APP_URL + 'groupsUsers/{id}',
type: 'PUT',
params: params,
success: success,
error: error
}).pipe(function (data, textStatus, jqXHR) {
// pipe the result to convert cakephp response format into can format
var def = $.Deferred();
def.resolveWith(this, [mad.model.serializer.CakeSerializer.from(data, self)]);
return def;
});
}
}, /** @prototype */ {
});
export default GroupUser;
|
et304383/passbolt_api
|
app/webroot/js/app/model/group_user.js
|
JavaScript
|
agpl-3.0
| 3,555
|
[
30522,
12324,
1005,
5506,
1013,
2944,
1013,
2944,
1005,
1025,
12324,
1005,
5506,
1013,
2944,
1013,
7642,
17629,
1013,
9850,
1035,
7642,
17629,
1005,
1025,
1013,
1008,
1008,
1008,
1030,
22490,
2015,
1063,
5506,
1012,
2944,
1065,
1008,
1030,
6687,
5950,
1008,
1008,
1996,
2177,
20330,
2944,
1008,
1008,
1030,
9570,
2953,
1008,
9005,
1037,
2177,
20330,
1008,
1030,
11498,
2213,
1063,
9140,
1065,
7047,
1008,
1030,
2709,
1063,
3413,
22803,
1012,
2944,
1012,
2177,
20330,
1065,
1008,
1013,
13075,
2177,
20330,
1027,
3413,
22803,
1012,
2944,
1012,
2177,
20330,
1027,
5506,
1012,
2944,
1012,
7949,
1006,
1005,
3413,
22803,
1012,
2944,
1012,
2177,
20330,
1005,
1010,
1013,
1008,
1008,
1030,
10763,
1008,
1013,
1063,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1013,
1013,
1008,
2944,
6210,
1008,
1013,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1013,
9398,
24932,
16308,
1024,
1063,
1065,
1010,
12332,
1024,
1063,
8909,
1024,
1005,
5164,
1005,
1010,
2177,
1035,
8909,
1024,
1005,
5164,
1005,
1010,
5310,
1035,
8909,
1024,
1005,
5164,
1005,
1010,
5310,
1024,
1005,
3413,
22803,
1012,
2944,
1012,
5310,
1012,
2944,
1005,
1010,
2177,
1024,
1005,
3413,
22803,
1012,
2944,
1012,
2177,
1012,
2944,
1005,
1065,
1010,
5779,
13874,
1024,
1063,
1014,
1024,
1035,
1035,
1006,
1005,
2266,
1005,
1007,
1010,
1015,
1024,
1035,
1035,
1006,
1005,
2177,
3208,
1005,
1007,
1065,
1010,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1013,
1013,
1008,
13675,
6784,
3853,
1008,
1013,
1013,
30524,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1013,
1013,
1008,
1008,
1008,
3443,
1037,
2047,
2177,
20330,
1008,
1030,
11498,
2213,
1063,
9140,
1065,
2012,
16344,
2015,
12332,
1997,
1996,
30523,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
30526
] |
#ifndef _RAM_H
#define _RAM_H
#include <stdio.h>
#include <stdlib.h>
#define BYTES_OF_MEMORY 4096
typedef struct
{
unsigned char data; // The data of the memory unit
unsigned char deletedFlag; // If 1 is deleted. If 0 not deleted
}MemUnit;
typedef struct
{
MemUnit RAMArray[BYTES_OF_MEMORY];
}RAM;
/**
* Inserts a byte of data into memory at a specific address
* @param ram A pointer to RAM
* @param address The address to store the data
* @param data The data to store in RAM
* @return Returns 1 if successful and 0 otherwise
*/
int insertIntoRAMAtAddress(RAM* ram, int address, char data);
/**
* Retrieves a byte out of RAM (This copies the value)
* @param ram A pointer to RAM
* @param address The address to get the value from
* @return Returns the value at the specified address
*/
char retrieveFromIntoRAMAddress(RAM* ram, int address);
/**
* Inserts a word of data into memory (Note stores in some endian depending on machine)
* @param ram A pointer to ram
* @param address The address to start writing at
* @param data The data to write to memory
* @return Returns 1 if successful and 0 otherwise
*/
int insertWordAtAddress(RAM* ram, int address, int data);
/**
* Retrieves a word from memory (This copies the value)
* @param ram A pointer to RAM
* @param address The address to get the value from
* @return Returns the word at the specified address
*/
int retrieveWordFromAddress(RAM* ram, int address);
#endif
|
Craigspaz/CPUSimulator
|
include/RAM.h
|
C
|
bsd-3-clause
| 1,431
|
[
30522,
1001,
2065,
13629,
2546,
1035,
8223,
1035,
1044,
1001,
9375,
1035,
8223,
1035,
1044,
1001,
2421,
1026,
2358,
20617,
1012,
1044,
1028,
1001,
2421,
1026,
2358,
19422,
12322,
1012,
1044,
1028,
1001,
9375,
27507,
1035,
1997,
1035,
3638,
2871,
2683,
2575,
21189,
12879,
2358,
6820,
6593,
1063,
27121,
25869,
2951,
1025,
1013,
1013,
1996,
2951,
1997,
1996,
3638,
3131,
27121,
25869,
17159,
10258,
8490,
1025,
1013,
1013,
2065,
1015,
2003,
17159,
1012,
2065,
1014,
2025,
17159,
1065,
2033,
23041,
4183,
1025,
21189,
12879,
2358,
6820,
6593,
1063,
2033,
23041,
4183,
14115,
11335,
2100,
1031,
27507,
1035,
1997,
1035,
3638,
1033,
1025,
1065,
8223,
1025,
1013,
1008,
1008,
1008,
19274,
2015,
1037,
24880,
1997,
2951,
2046,
3638,
2012,
1037,
3563,
4769,
1008,
1030,
11498,
2213,
8223,
1037,
20884,
2000,
8223,
1008,
1030,
11498,
2213,
4769,
1996,
4769,
2000,
3573,
1996,
2951,
1008,
1030,
11498,
2213,
2951,
1996,
2951,
2000,
3573,
1999,
8223,
1008,
1030,
2709,
5651,
1015,
2065,
3144,
1998,
1014,
4728,
1008,
1013,
20014,
19274,
18447,
6525,
21022,
14141,
8303,
1006,
8223,
1008,
8223,
1010,
20014,
4769,
1010,
25869,
2951,
1007,
1025,
1013,
1008,
1008,
1008,
12850,
2015,
1037,
24880,
2041,
1997,
8223,
1006,
2023,
4809,
1996,
3643,
1007,
1008,
1030,
11498,
2213,
8223,
1037,
20884,
2000,
8223,
1008,
1030,
11498,
2213,
4769,
1996,
4769,
2000,
2131,
1996,
3643,
2013,
1008,
1030,
2709,
5651,
1996,
3643,
2012,
1996,
9675,
4769,
1008,
1013,
25869,
12850,
19699,
20936,
13663,
14672,
14141,
8303,
1006,
8223,
1008,
8223,
1010,
20014,
4769,
1007,
1025,
1013,
1008,
1008,
1008,
19274,
30524,
3602,
5324,
1999,
2070,
2203,
2937,
5834,
2006,
3698,
1007,
1008,
1030,
11498,
2213,
8223,
1037,
20884,
2000,
8223,
1008,
1030,
11498,
2213,
4769,
1996,
4769,
2000,
2707,
3015,
2012,
1008,
1030,
11498,
2213,
2951,
1996,
2951,
2000,
4339,
2000,
3638,
1008,
1030,
2709,
5651,
1015,
2065,
3144,
1998,
1014,
4728,
1008,
1013,
20014,
19274,
18351,
6790,
14141,
8303,
1006,
8223,
1008,
8223,
1010,
20014,
4769,
1010,
20014,
2951,
1007,
1025,
1013,
1008,
1008,
1008,
12850,
2015,
1037,
2773,
2013,
3638,
1006,
2023,
4809,
1996,
3643,
1007,
1008,
1030,
11498,
2213,
8223,
1037,
20884,
2000,
8223,
1008,
1030,
11498,
2213,
4769,
1996,
4769,
2000,
2131,
1996,
3643,
2013,
1008,
1030,
2709,
5651,
1996,
2773,
2012,
1996,
9675,
4769,
1008,
1013,
20014,
12850,
18351,
19699,
9626,
14141,
8303,
1006,
8223,
1008,
8223,
1010,
20014,
4769,
1007,
1025,
1001,
2203,
10128,
102,
0,
0,
0,
0,
0,
0,
0,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2015,
1037,
2773,
1997,
2951,
2046,
3638,
1006,
30526
] |
from setuptools import setup, find_packages
import sys, os
version = '1.3'
long_description = """The raisin.restyler package is a part of Raisin, the web application
used for publishing the summary statistics of Grape, a pipeline used for processing and
analyzing RNA-Seq data."""
setup(name='raisin.restyler',
version=version,
description="A package used in the Raisin web application",
long_description=long_description,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: POSIX :: Linux'],
keywords='RNA-Seq pipeline ngs transcriptome bioinformatics ETL',
author='Maik Roder',
author_email='maikroeder@gmail.com',
url='http://big.crg.cat/services/grape',
license='GPL',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
namespace_packages = ['raisin'],
package_data = {'raisin.restyler':['templates/*.pt']},
include_package_data=True,
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
'configobj',
'zope.pagetemplate'
],
entry_points="""
# -*- Entry points: -*-
""",
)
|
rna-seq/raisin.restyler
|
setup.py
|
Python
|
gpl-3.0
| 1,531
|
[
30522,
2013,
16437,
3406,
27896,
12324,
16437,
1010,
2424,
1035,
14555,
12324,
25353,
2015,
1010,
9808,
2544,
1027,
1005,
1015,
1012,
1017,
1005,
2146,
1035,
6412,
1027,
1000,
1000,
1000,
1996,
15547,
11493,
1012,
2717,
20853,
7427,
2003,
1037,
2112,
1997,
15547,
11493,
1010,
1996,
4773,
4646,
2109,
2005,
4640,
1996,
12654,
6747,
1997,
14722,
1010,
1037,
13117,
2109,
2005,
6364,
1998,
20253,
12987,
1011,
7367,
4160,
2951,
1012,
1000,
1000,
1000,
16437,
1006,
2171,
1027,
1005,
15547,
11493,
1012,
2717,
20853,
1005,
1010,
2544,
1027,
2544,
1010,
6412,
1027,
1000,
1037,
7427,
2109,
1999,
1996,
15547,
11493,
4773,
4646,
1000,
1010,
2146,
1035,
6412,
1027,
2146,
1035,
6412,
1010,
2465,
28295,
1027,
1031,
1005,
2458,
3570,
1024,
1024,
1019,
1011,
2537,
1013,
6540,
1005,
1010,
1005,
4730,
2653,
1024,
1024,
18750,
1005,
1010,
1005,
3832,
4378,
1024,
1024,
9797,
1005,
1010,
1005,
4082,
2291,
1024,
1024,
9808,
2981,
1005,
1010,
1005,
6105,
1024,
1024,
9808,
2072,
4844,
1024,
1024,
27004,
2236,
2270,
6105,
1006,
14246,
2140,
1007,
1005,
1010,
1005,
3019,
2653,
1024,
1024,
2394,
1005,
1010,
1005,
8476,
1024,
1024,
4007,
2458,
1024,
1024,
8860,
1024,
1024,
18750,
14184,
1005,
1010,
1005,
4082,
2291,
1024,
1024,
13433,
5332,
2595,
1024,
1024,
11603,
1005,
1033,
1010,
3145,
22104,
1027,
1005,
12987,
1011,
7367,
4160,
13117,
12835,
2015,
24051,
8462,
16012,
2378,
14192,
17592,
3802,
2140,
1005,
1010,
3166,
1027,
1005,
14736,
2243,
8469,
2099,
1005,
1010,
3166,
1035,
10373,
1027,
1005,
14736,
21638,
29099,
2121,
1030,
20917,
4014,
1012,
4012,
1005,
1010,
24471,
2140,
1027,
1005,
8299,
1024,
30524,
1010,
1005,
4973,
1005,
1010,
1005,
5852,
1005,
1033,
1007,
1010,
3415,
15327,
1035,
14555,
1027,
1031,
1005,
15547,
11493,
1005,
1033,
1010,
7427,
1035,
2951,
1027,
1063,
1005,
15547,
11493,
1012,
2717,
20853,
1005,
1024,
1031,
1005,
23561,
2015,
1013,
1008,
1012,
13866,
1005,
1033,
1065,
1010,
2421,
1035,
7427,
1035,
2951,
1027,
2995,
1010,
14101,
1035,
3647,
1027,
6270,
1010,
16500,
1035,
5942,
1027,
1031,
1001,
1011,
1008,
1011,
4469,
5918,
1024,
1011,
1008,
1011,
1005,
9530,
8873,
3995,
2497,
3501,
1005,
1010,
1005,
1062,
17635,
1012,
3931,
18532,
15725,
1005,
1033,
1010,
4443,
1035,
2685,
1027,
1000,
1000,
1000,
1001,
1011,
1008,
1011,
4443,
2685,
1024,
1011,
1008,
1011,
1000,
1000,
1000,
1010,
1007,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
1013,
1013,
2502,
1012,
13675,
2290,
1012,
4937,
1013,
2578,
1013,
14722,
1005,
1010,
6105,
1027,
1005,
14246,
2140,
1005,
1010,
14555,
1027,
2424,
1035,
14555,
1006,
23329,
1027,
1031,
1005,
1041,
2480,
1035,
16437,
1005,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1013,
1013,
2502,
1012,
13675,
2290,
1012,
4937,
1013,
2578,
1013,
14722,
1005,
1010,
6105,
1027,
1005,
14246,
2140,
1005,
1010,
14555,
1027,
2424,
1035,
14555,
1006,
23329,
1027,
1031,
1005,
1041,
2480,
1035,
16437,
1005,
30526
] |
#include "export_node.hpp"
#include <sstream>
#include "constant_mappings.hpp"
namespace opossum {
ExportNode::ExportNode(const std::string& init_table_name, const std::string& init_file_name,
const FileType init_file_type)
: AbstractNonQueryNode(LQPNodeType::Export),
table_name(init_table_name),
file_name(init_file_name),
file_type(init_file_type) {}
std::string ExportNode::description(const DescriptionMode mode) const {
std::ostringstream stream;
stream << "[Export] Name: '" << table_name << "'";
return stream.str();
}
size_t ExportNode::_on_shallow_hash() const {
auto hash = boost::hash_value(table_name);
boost::hash_combine(hash, file_name);
boost::hash_combine(hash, file_type);
return hash;
}
std::shared_ptr<AbstractLQPNode> ExportNode::_on_shallow_copy(LQPNodeMapping& node_mapping) const {
return ExportNode::make(table_name, file_name, file_type);
}
bool ExportNode::_on_shallow_equals(const AbstractLQPNode& rhs, const LQPNodeMapping& node_mapping) const {
const auto& export_node = static_cast<const ExportNode&>(rhs);
return table_name == export_node.table_name && file_name == export_node.file_name &&
file_type == export_node.file_type;
}
} // namespace opossum
|
hyrise/hyrise
|
src/lib/logical_query_plan/export_node.cpp
|
C++
|
mit
| 1,269
|
[
30522,
1001,
2421,
1000,
9167,
1035,
13045,
1012,
6522,
2361,
1000,
1001,
2421,
1026,
7020,
25379,
1028,
1001,
2421,
1000,
5377,
1035,
12375,
2015,
1012,
6522,
2361,
1000,
3415,
15327,
6728,
15094,
2819,
1063,
9167,
3630,
3207,
1024,
1024,
9167,
3630,
3207,
1006,
9530,
3367,
2358,
2094,
1024,
1024,
5164,
1004,
1999,
4183,
1035,
2795,
1035,
2171,
1010,
9530,
3367,
2358,
2094,
1024,
1024,
5164,
1004,
1999,
4183,
1035,
5371,
1035,
2171,
1010,
9530,
3367,
5371,
13874,
1999,
4183,
1035,
5371,
1035,
2828,
1007,
1024,
10061,
8540,
4226,
18143,
10244,
1006,
1048,
4160,
2361,
3630,
3207,
13874,
1024,
1024,
9167,
1007,
1010,
2795,
1035,
2171,
1006,
1999,
4183,
1035,
2795,
1035,
2171,
1007,
1010,
5371,
1035,
2171,
1006,
1999,
4183,
1035,
5371,
1035,
2171,
1007,
1010,
5371,
1035,
2828,
1006,
1999,
4183,
1035,
5371,
1035,
2828,
1007,
1063,
1065,
2358,
2094,
1024,
1024,
5164,
9167,
3630,
3207,
1024,
1024,
6412,
1006,
9530,
3367,
6412,
5302,
3207,
5549,
1007,
9530,
3367,
1063,
2358,
2094,
1024,
1024,
9808,
18886,
3070,
21422,
5460,
1025,
5460,
1026,
1026,
1000,
1031,
9167,
1033,
2171,
1024,
1005,
1000,
1026,
1026,
2795,
1035,
2171,
1026,
1026,
1000,
1005,
1000,
1025,
2709,
5460,
1012,
2358,
2099,
1006,
1007,
1025,
1065,
2946,
1035,
1056,
9167,
3630,
3207,
1024,
1024,
1035,
2006,
1035,
8467,
1035,
23325,
1006,
1007,
9530,
3367,
1063,
8285,
23325,
1027,
12992,
1024,
1024,
23325,
1035,
3643,
1006,
2795,
1035,
2171,
1007,
1025,
12992,
1024,
1024,
23325,
1035,
11506,
1006,
23325,
1010,
30524,
1035,
8467,
1035,
6100,
1006,
1048,
4160,
2361,
3630,
3207,
2863,
14853,
1004,
13045,
1035,
12375,
1007,
9530,
3367,
1063,
2709,
9167,
3630,
3207,
1024,
1024,
2191,
1006,
2795,
1035,
2171,
1010,
5371,
1035,
2171,
1010,
5371,
1035,
2828,
1007,
1025,
1065,
22017,
2140,
9167,
3630,
3207,
1024,
1024,
1035,
2006,
1035,
8467,
1035,
19635,
1006,
9530,
3367,
10061,
2140,
4160,
2361,
3630,
3207,
1004,
1054,
7898,
1010,
9530,
3367,
1048,
4160,
2361,
3630,
3207,
2863,
14853,
1004,
13045,
1035,
12375,
1007,
9530,
3367,
1063,
9530,
3367,
8285,
1004,
9167,
1035,
13045,
1027,
10763,
1035,
3459,
1026,
9530,
3367,
9167,
3630,
3207,
1004,
1028,
1006,
1054,
7898,
1007,
1025,
2709,
2795,
1035,
2171,
1027,
1027,
9167,
1035,
13045,
1012,
2795,
1035,
2171,
1004,
1004,
5371,
1035,
2171,
1027,
1027,
9167,
1035,
13045,
1012,
5371,
1035,
2171,
1004,
1004,
5371,
1035,
2828,
1027,
1027,
9167,
1035,
13045,
1012,
5371,
1035,
2828,
1025,
1065,
1065,
1013,
1013,
3415,
15327,
6728,
15094,
2819,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
5371,
1035,
2171,
1007,
1025,
12992,
1024,
1024,
23325,
1035,
11506,
1006,
23325,
1010,
5371,
1035,
2828,
1007,
1025,
2709,
23325,
1025,
1065,
2358,
2094,
1024,
1024,
4207,
1035,
13866,
2099,
1026,
10061,
2140,
4160,
2361,
3630,
3207,
1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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
5371,
1035,
2171,
1007,
1025,
12992,
1024,
1024,
23325,
1035,
11506,
1006,
23325,
1010,
5371,
1035,
2828,
1007,
1025,
2709,
23325,
1025,
1065,
2358,
2094,
1024,
1024,
4207,
1035,
13866,
2099,
1026,
10061,
2140,
4160,
2361,
3630,
3207,
1028,
9167,
3630,
3207,
1024,
1024,
1035,
2006,
30526
] |
function $(id) { return document.getElementById(id); }
function retrieve_mbts() {
g.network.simple_request('FM_MBTS_RETRIEVE.authoritative',[ses(),g.mbts_id],
function(req) {
try {
g.mbts = req.getResultObject();
$('mbts_id').value = g.mbts.id();
$('mbts_xact_type').value = g.mbts.xact_type();
$('mbts_xact_start').value = util.date.formatted_date( g.mbts.xact_start(), '%{localized}' );
$('mbts_xact_finish').value = g.mbts.xact_finish() ? util.date.formatted_date( g.mbts.xact_finish(), '%{localized}' ) : '';
$('mbts_total_owed').value = g.mbts.total_owed() ? util.money.sanitize( g.mbts.total_owed() ) : '';
$('mbts_total_paid').value = g.mbts.total_paid() ? util.money.sanitize( g.mbts.total_paid() ) : '';
$('mbts_balance_owed').value = g.mbts.balance_owed() ? util.money.sanitize( g.mbts.balance_owed() ) : '';
$('xact_type').value = g.mbts.xact_type(); $('xact_type').disabled = true;
} catch(E) {
g.error.sdump('D_ERROR',E);
}
}
);
}
function retrieve_circ() {
JSAN.use('util.widgets');
function render_circ(r_circ) {
$('title_label').hidden = false;
$('checked_out_label').hidden = false;
$('due_label').hidden = false;
$('checked_in_label').hidden = false;
$('checked_out').value = r_circ.xact_start() ? util.date.formatted_date( r_circ.xact_start(), '%{localized}' ) : '';
$('checked_in').value = r_circ.checkin_time() ? util.date.formatted_date( r_circ.checkin_time(), '%{localized}' ) : '';
$('due').value = r_circ.due_date() ? util.date.formatted_date( r_circ.due_date(), '%{localized}' ) : '';
g.network.simple_request(
'MODS_SLIM_RECORD_RETRIEVE_VIA_COPY.authoritative',
[ typeof r_circ.target_copy() == 'object' ? r_circ.target_copy().id() : r_circ.target_copy() ],
function (rreq) {
var r_mvr = rreq.getResultObject();
if (instanceOf(r_mvr,mvr)) {
util.widgets.remove_children('title');
$('title').appendChild( document.createTextNode( r_mvr.title() ) );
} else {
g.network.simple_request(
'FM_ACP_RETRIEVE',
[ typeof r_circ.target_copy() == 'object' ? r_circ.target_copy().id() : r_circ.target_copy() ],
function (rrreq) {
var r_acp = rrreq.getResultObject();
if (instanceOf(r_acp,acp)) {
util.widgets.remove_children('title');
$('title').appendChild( document.createTextNode( r_acp.dummy_title() ) );
}
}
);
}
}
);
}
if (g.circ) {
render_circ(g.circ);
} else {
g.network.simple_request('FM_CIRC_RETRIEVE_VIA_ID', [ ses(), g.mbts_id ],
function (req) {
var r_circ = req.getResultObject();
if (instanceOf(r_circ,circ)) {
render_circ(r_circ);
}
}
);
}
}
function retrieve_patron() {
JSAN.use('patron.util');
g.patron_id = xul_param('patron_id');
g.au_obj = xul_param('patron');
if (! g.au_obj) {
g.au_obj = patron.util.retrieve_fleshed_au_via_id( ses(), g.patron_id );
}
if (g.au_obj) {
$('patron_name').setAttribute('value',
patron.util.format_name( g.au_obj ) + ' : ' + g.au_obj.card().barcode()
);
}
}
function patron_bill_init() {
try {
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
JSAN.use('util.error'); g.error = new util.error();
g.error.sdump('D_TRACE','my_init() for patron_display.xul');
g.OpenILS = {}; JSAN.use('OpenILS.data'); g.OpenILS.data = new OpenILS.data();
g.OpenILS.data.init({'via':'stash'});
JSAN.use('util.network'); g.network = new util.network();
JSAN.use('util.date');
JSAN.use('util.money');
JSAN.use('util.widgets');
JSAN.use('util.functional');
var override_default_billing_type = xul_param('override_default_billing_type');
var billing_list = util.functional.filter_list( g.OpenILS.data.list.cbt, function (x) { return x.id() >= 100 || x.id() == override_default_billing_type } );
var ml = util.widgets.make_menulist(
util.functional.map_list(
billing_list.sort( function(a,b) { if (a.name()>b.name()) return 1; if (a.name()<b.name()) return -1; return 0; } ), //g.OpenILS.data.list.billing_type.sort(),
function(obj) { return [ obj.name(), obj.id() ]; } //function(obj) { return [ obj, obj ]; }
),
override_default_billing_type || billing_list.sort( function(a,b) { if (a.name()>b.name()) return 1; if (a.name()<b.name()) return -1; return 0; } )[0].id()
);
ml.setAttribute('id','billing_type');
document.getElementById('menu_placeholder').appendChild(ml);
window.bill_wizard_event_listeners = new EventListenerList();
window.bill_wizard_event_listeners.add(ml,
'command',
function() {
if ( g.OpenILS.data.hash.cbt[ ml.value ] ) {
$('bill_amount').value = g.OpenILS.data.hash.cbt[ ml.value ].default_price();
}
},
false
);
retrieve_patron();
$('wizard_billing_location').setAttribute('value', g.OpenILS.data.hash.aou[ g.OpenILS.data.list.au[0].ws_ou() ].name() );
if ( g.OpenILS.data.hash.cbt[ ml.value ] ) {
$('bill_amount').value = g.OpenILS.data.hash.cbt[ ml.value ].default_price();
}
var override_default_price = xul_param('override_default_price');
if (override_default_price) {
$('bill_amount').value = override_default_price;
}
$('bill_amount').select(); $('bill_amount').focus();
g.circ = xul_param('circ');
if (xul_param('xact_id')) {
g.mbts_id = xul_param('xact_id');
$('summary').hidden = false;
retrieve_mbts();
retrieve_circ();
}
} catch(E) {
var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/bill_wizard.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
}
function patron_bill_cleanup() {
try {
window.bill_wizard_event_listeners.removeAll();
} catch(E) {
var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/bill_wizard.xul', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
alert(err_msg);
}
}
function patron_bill_finish() {
try {
var do_not_process_bill = xul_param('do_not_process_bill');
var xact_id = xul_param('xact_id');
if (do_not_process_bill) {
xulG.proceed = true;
xulG.cbt_id = $('billing_type').value;
xulG.amount = $('bill_amount').value;
xulG.note = $('bill_note').value;
} else {
if (!xact_id) {
var grocery = new mg();
grocery.isnew('1');
grocery.billing_location( g.OpenILS.data.list.au[0].ws_ou() );
grocery.usr( g.au_obj.id() );
grocery.note( $('bill_note').value );
xact_id = g.network.request(
api.FM_MG_CREATE.app,
api.FM_MG_CREATE.method,
[ ses(), grocery ]
);
}
if (typeof xact_id.ilsevent == 'undefined') {
JSAN.use('util.money');
var billing = new mb();
billing.isnew('1');
billing.note( $('bill_note').value );
billing.xact( xact_id );
billing.amount( util.money.sanitize( $('bill_amount').value ) );
billing.btype( $('billing_type').value );
billing.billing_type( g.OpenILS.data.hash.cbt[$('billing_type').value].name() );
var mb_id = g.network.request(
api.FM_MB_CREATE.app,
api.FM_MB_CREATE.method,
[ ses(), billing ]
);
if (typeof mb_id.ilsevent != 'undefined') throw(mb_id);
//alert($('patronStrings').getString('staff.patron.bill_wizard.patron_bill_finish.billing_added'));
xulG.mb_id = mb_id;
xulG.xact_id = xact_id;
} else {
throw(xact_id);
}
}
} catch(E) {
g.error.standard_unexpected_error_alert('bill_wizard',E);
}
}
|
kidaa/Evergreen
|
Open-ILS/xul/staff_client/server/patron/bill_wizard.js
|
JavaScript
|
gpl-2.0
| 9,261
|
[
30522,
3853,
1002,
1006,
8909,
1007,
1063,
2709,
6254,
1012,
2131,
12260,
3672,
3762,
3593,
1006,
8909,
1007,
1025,
1065,
3853,
12850,
1035,
16914,
3215,
1006,
1007,
1063,
1043,
1012,
2897,
1012,
3722,
1035,
5227,
1006,
1005,
4718,
1035,
16914,
3215,
1035,
12850,
1012,
23949,
1005,
1010,
1031,
7367,
2015,
1006,
1007,
1010,
1043,
1012,
16914,
3215,
1035,
8909,
1033,
1010,
3853,
1006,
2128,
4160,
1007,
1063,
3046,
1063,
1043,
1012,
16914,
3215,
1027,
2128,
4160,
1012,
2131,
6072,
11314,
16429,
20614,
1006,
1007,
1025,
1002,
1006,
1005,
16914,
3215,
1035,
8909,
1005,
1007,
1012,
3643,
1027,
1043,
1012,
16914,
3215,
1012,
8909,
1006,
1007,
1025,
1002,
1006,
1005,
16914,
3215,
1035,
1060,
18908,
1035,
2828,
1005,
1007,
1012,
3643,
1027,
1043,
1012,
16914,
3215,
1012,
1060,
18908,
1035,
2828,
1006,
1007,
1025,
1002,
1006,
1005,
16914,
3215,
1035,
1060,
18908,
1035,
2707,
1005,
1007,
1012,
3643,
1027,
21183,
4014,
1012,
3058,
1012,
4289,
3064,
1035,
3058,
1006,
1043,
1012,
16914,
3215,
1012,
1060,
18908,
1035,
2707,
1006,
1007,
1010,
1005,
1003,
1063,
22574,
1065,
1005,
1007,
1025,
1002,
1006,
1005,
16914,
3215,
1035,
1060,
18908,
1035,
3926,
1005,
1007,
1012,
3643,
1027,
1043,
1012,
16914,
3215,
1012,
1060,
18908,
1035,
3926,
1006,
1007,
1029,
21183,
4014,
1012,
3058,
1012,
4289,
3064,
1035,
3058,
1006,
1043,
1012,
16914,
3215,
1012,
1060,
18908,
1035,
3926,
1006,
1007,
1010,
1005,
1003,
1063,
22574,
1065,
1005,
1007,
1024,
1005,
1005,
1025,
1002,
1006,
1005,
16914,
3215,
1035,
2561,
1035,
12232,
1005,
1007,
1012,
3643,
1027,
1043,
1012,
16914,
3215,
1012,
2561,
1035,
12232,
1006,
1007,
1029,
21183,
4014,
1012,
2769,
1012,
2624,
25090,
4371,
1006,
1043,
1012,
16914,
3215,
1012,
2561,
1035,
12232,
1006,
1007,
1007,
1024,
1005,
1005,
1025,
1002,
1006,
1005,
16914,
3215,
1035,
2561,
1035,
3825,
1005,
1007,
1012,
3643,
1027,
1043,
1012,
16914,
3215,
1012,
2561,
1035,
3825,
1006,
1007,
1029,
21183,
4014,
1012,
2769,
1012,
2624,
25090,
4371,
1006,
1043,
1012,
16914,
3215,
1012,
2561,
1035,
3825,
1006,
1007,
1007,
1024,
1005,
1005,
1025,
1002,
1006,
1005,
16914,
3215,
1035,
5703,
1035,
12232,
1005,
1007,
1012,
3643,
1027,
1043,
1012,
16914,
3215,
1012,
5703,
1035,
12232,
1006,
1007,
1029,
21183,
4014,
1012,
2769,
1012,
2624,
25090,
4371,
1006,
1043,
1012,
16914,
3215,
1012,
5703,
1035,
12232,
1006,
1007,
1007,
1024,
1005,
1005,
1025,
1002,
1006,
1005,
1060,
18908,
1035,
2828,
1005,
1007,
1012,
3643,
1027,
1043,
1012,
16914,
3215,
1012,
1060,
18908,
1035,
2828,
1006,
1007,
1025,
1002,
1006,
1005,
1060,
18908,
1035,
2828,
1005,
1007,
1012,
9776,
1027,
2995,
1025,
1065,
4608,
1006,
1041,
1007,
1063,
1043,
1012,
7561,
1012,
17371,
24237,
1006,
1005,
1040,
1035,
7561,
1005,
1010,
1041,
1007,
1025,
1065,
1065,
1007,
1025,
1065,
3853,
12850,
1035,
25022,
11890,
1006,
1007,
1063,
1046,
8791,
1012,
2224,
1006,
1005,
21183,
4014,
1012,
15536,
28682,
1005,
1007,
30524,
2516,
1035,
3830,
1005,
1007,
1012,
5023,
1027,
6270,
1025,
1002,
1006,
30523,
1025,
3853,
17552,
1035,
25022,
11890,
1006,
1054,
1035,
25022,
11890,
1007,
1063,
1002,
1006,
1005,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1025,
3853,
17552,
1035,
25022,
11890,
1006,
1054,
1035,
25022,
11890,
1007,
1063,
1002,
1006,
1005,
30526
] |
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2016 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#import <UIKit/UIKit.h>
/**
The utility class for web colors.
*/
@interface Webcolor : NSObject
{
}
+(UIColor*)checkmarkColor;
/**
Returns web color by name.
@param colorName The color name.
@return The color object.
*/
+(UIColor*)webColorNamed:(NSString*)colorName;
/**
Returns the color for RGB function.
@param functionString The RGB function string.
@return The color object.
*/
+(UIColor*)colorForRGBFunction:(NSString*)functionString;
/**
Returns the color for hex string.
@param hexCode The hex string.
@return The color object.
*/
+(UIColor*)colorForHex:(NSString*)hexCode;
+(void)flushCache;
+(BOOL)isDarkColor:(UIColor*)color;
//constants for iOS background texture colors.
extern NSString * const IOS_COLOR_SCROLLVIEW_TEXTURED_BACKGROUND;
extern NSString * const IOS_COLOR_VIEW_FLIPSIDE_BACKGROUND;
extern NSString * const IOS_COLOR_GROUP_TABLEVIEW_BACKGROUND;
extern NSString * const IOS_COLOR_UNDER_PAGE_BACKGROUND;
@end
#define RGBCOLOR(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
|
SorenThorup/DailyJoke
|
build/iphone/Classes/Webcolor.h
|
C
|
apache-2.0
| 1,468
|
[
30522,
1013,
1008,
1008,
1008,
10439,
29109,
6906,
4263,
23431,
4684,
1008,
9385,
1006,
1039,
1007,
2268,
1011,
2355,
2011,
10439,
29109,
6906,
4263,
1010,
4297,
1012,
2035,
2916,
9235,
1012,
1008,
7000,
2104,
1996,
3408,
1997,
1996,
15895,
2270,
6105,
1008,
3531,
2156,
1996,
6105,
2443,
2007,
2023,
4353,
2005,
4751,
1012,
1008,
1008,
5432,
1024,
2023,
2003,
7013,
3642,
1012,
19933,
2012,
2115,
2219,
30524,
1008,
1996,
9710,
2465,
2005,
4773,
6087,
1012,
1008,
1013,
1030,
8278,
4773,
18717,
1024,
24978,
16429,
20614,
1063,
1065,
1009,
1006,
21318,
18717,
1008,
1007,
4638,
10665,
18717,
1025,
1013,
1008,
1008,
5651,
4773,
3609,
2011,
2171,
1012,
1030,
11498,
2213,
3609,
18442,
1996,
3609,
2171,
1012,
1030,
2709,
1996,
3609,
4874,
1012,
1008,
1013,
1009,
1006,
21318,
18717,
1008,
1007,
4773,
18717,
18442,
2094,
1024,
1006,
24978,
3367,
4892,
1008,
1007,
3609,
18442,
1025,
1013,
1008,
1008,
5651,
1996,
3609,
2005,
1054,
18259,
3853,
1012,
1030,
11498,
2213,
4972,
18886,
3070,
1996,
1054,
18259,
3853,
5164,
1012,
1030,
2709,
1996,
3609,
4874,
1012,
1008,
1013,
1009,
1006,
21318,
18717,
1008,
1007,
3609,
29278,
10623,
29292,
4609,
7542,
1024,
1006,
24978,
3367,
4892,
1008,
1007,
4972,
18886,
3070,
1025,
1013,
1008,
1008,
5651,
1996,
3609,
2005,
2002,
2595,
5164,
1012,
1030,
11498,
2213,
2002,
2595,
16044,
1996,
2002,
2595,
5164,
1012,
1030,
2709,
1996,
3609,
4874,
1012,
1008,
1013,
1009,
1006,
21318,
18717,
1008,
1007,
3609,
29278,
5369,
2595,
1024,
1006,
24978,
3367,
4892,
1008,
1007,
2002,
2595,
16044,
1025,
1009,
1006,
11675,
1007,
13862,
3540,
5403,
1025,
1009,
1006,
22017,
2140,
1007,
2003,
7662,
2243,
18717,
1024,
1006,
21318,
18717,
1008,
1007,
3609,
1025,
1013,
1013,
5377,
2015,
2005,
16380,
4281,
14902,
6087,
1012,
4654,
16451,
24978,
3367,
4892,
1008,
9530,
3367,
16380,
1035,
3609,
1035,
17186,
8584,
1035,
14902,
2094,
1035,
4281,
1025,
4654,
16451,
24978,
3367,
4892,
1008,
9530,
3367,
16380,
1035,
3609,
1035,
3193,
1035,
11238,
7363,
1035,
4281,
1025,
4654,
16451,
24978,
3367,
4892,
1008,
9530,
3367,
16380,
1035,
3609,
1035,
2177,
1035,
2795,
8584,
1035,
4281,
1025,
4654,
16451,
24978,
3367,
4892,
1008,
9530,
3367,
16380,
1035,
3609,
1035,
2104,
1035,
3931,
1035,
4281,
1025,
1030,
2203,
1001,
9375,
1054,
18259,
18717,
1006,
1054,
1010,
1043,
1010,
1038,
1007,
1031,
21318,
18717,
3609,
24415,
5596,
1024,
1054,
1013,
20637,
1012,
1014,
2665,
1024,
1043,
1013,
20637,
1012,
1014,
2630,
1024,
1038,
1013,
20637,
1012,
1014,
6541,
1024,
1015,
1033,
1001,
9375,
1054,
18259,
22684,
10626,
1006,
1054,
1010,
1043,
1010,
1038,
1010,
1037,
1007,
1031,
21318,
18717,
3609,
24415,
5596,
1024,
1054,
1013,
20637,
1012,
1014,
2665,
1024,
1043,
1013,
20637,
1012,
1014,
2630,
1024,
1038,
1013,
20637,
1012,
1014,
6541,
1024,
1037,
1033,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
3891,
1998,
2302,
2490,
1012,
1008,
1013,
1001,
12324,
1026,
21318,
23615,
1013,
21318,
23615,
1012,
1044,
1028,
1013,
1008,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
3891,
1998,
2302,
2490,
1012,
1008,
1013,
1001,
12324,
1026,
21318,
23615,
1013,
21318,
23615,
1012,
1044,
1028,
1013,
1008,
30526
] |
//
// UIColor+hexColor.h
// RecordDemo
//
// Created by reylen on 16/8/10.
// Copyright © 2016年 reylen. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (hexColor)
+ (UIColor*) r_colorWithHex:(NSInteger) hexValue;
+ (UIColor*) r_colorWithHex:(NSInteger)hexValue alpha:(CGFloat)alphaValue;
@end
|
reylen/YXPressRecord
|
Source/AudioViews/UIColor+hexColor.h
|
C
|
mit
| 323
|
[
30522,
1013,
1013,
1013,
1013,
21318,
18717,
1009,
2002,
2595,
18717,
1012,
1044,
1013,
1013,
2501,
3207,
5302,
1013,
1013,
1013,
1013,
2580,
2011,
12569,
7770,
2006,
2385,
1013,
1022,
1013,
2184,
1012,
1013,
1013,
9385,
1075,
2355,
1840,
12569,
7770,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
1001,
12324,
1026,
21318,
23615,
1013,
21318,
23615,
1012,
1044,
1028,
1030,
8278,
21318,
18717,
1006,
2002,
2595,
18717,
1007,
1009,
1006,
21318,
18717,
1008,
1007,
1054,
1035,
3609,
24415,
5369,
2595,
1024,
1006,
24978,
18447,
26320,
1007,
2002,
2595,
10175,
5657,
1025,
1009,
1006,
21318,
18717,
1008,
1007,
1054,
1035,
3609,
24415,
5369,
2595,
1024,
1006,
24978,
18447,
26320,
1007,
2002,
2595,
10175,
5657,
6541,
1024,
1006,
1039,
25708,
4135,
4017,
1007,
6541,
10175,
5657,
1025,
1030,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
using System;
using AoM;
using Newtonsoft.Json;
using Units;
namespace Maps
{
/// <summary>
/// Represents a single population rule
/// </summary>
public class PopulationRule
{
/// <summary>
/// This is requiered to have access to other rules, so these rules are not forceful independent
/// </summary>
[JsonIgnore]
public Populator Populator { get; private set; }
/// <summary>
/// Gets the chance of run this population rule
/// </summary>
/// <value>The chance.</value>
public float Chance { get; set; }
/// <summary>
/// The stacks created by this rule
/// </summary>
public DistributedStack [] Stacks;
/// <summary>
/// Links this rule to a <see cref="Populator"/>
/// </summary>
public void LinkWith (Populator populator)
{
if (populator == null)
throw new ArgumentNullException ("populator");
if (Populator != null)
throw new InvalidOperationException ("This rule already has a populator");
Populator = populator;
}
}
/// <summary>
/// Represents a pain Race-distribution
/// </summary>
public class DistributedStack
{
/// <summary>
/// The name of the race
/// </summary>
public string RaceName;
/// <summary>
/// Gets the race using <see cref="Juego.ClassRaceManager"/>
/// </summary>
[JsonIgnore]
public UnitRace Race
{
get
{
return Program.MyGame.ClassRaceManager.GetRace (RaceName);
}
}
/// <summary>
/// The distribution on the unit's quantity
/// </summary>
public float SpawnProbPerCell;
}
}
|
karv/Art-of-Meow
|
Maps/PopulationRule.cs
|
C#
|
gpl-3.0
| 1,529
|
[
30522,
2478,
2291,
1025,
2478,
20118,
2213,
1025,
2478,
8446,
6499,
6199,
1012,
1046,
3385,
1025,
2478,
3197,
1025,
3415,
15327,
7341,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
5836,
1037,
2309,
2313,
3627,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
2465,
2313,
6820,
2571,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
2023,
2003,
2128,
15549,
6850,
2000,
2031,
3229,
2000,
2060,
3513,
1010,
2061,
2122,
3513,
2024,
2025,
28552,
2981,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
1031,
1046,
3385,
23773,
5686,
1033,
2270,
3769,
20350,
3769,
20350,
1063,
2131,
1025,
2797,
2275,
1025,
1065,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
4152,
1996,
3382,
1997,
2448,
2023,
2313,
3627,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
1013,
1013,
1013,
1026,
3643,
1028,
1996,
3382,
1012,
1026,
1013,
3643,
1028,
2270,
14257,
3382,
1063,
2131,
1025,
2275,
1025,
1065,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
1996,
20829,
2580,
2011,
2023,
3627,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
5500,
9153,
3600,
1031,
1033,
20829,
1025,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
6971,
2023,
3627,
2000,
1037,
1026,
2156,
13675,
12879,
1027,
1000,
3769,
20350,
1000,
1013,
1028,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
11675,
4957,
24415,
1006,
3769,
20350,
3769,
20350,
1007,
1063,
2065,
1006,
3769,
20350,
1027,
1027,
19701,
1007,
5466,
2047,
6685,
11231,
6216,
2595,
24422,
1006,
1000,
3769,
20350,
1000,
1007,
1025,
2065,
1006,
3769,
20350,
999,
1027,
19701,
1007,
5466,
2047,
19528,
25918,
3370,
10288,
24422,
1006,
1000,
2023,
3627,
2525,
2038,
1037,
3769,
20350,
1000,
1007,
1025,
3769,
20350,
1027,
3769,
20350,
1025,
1065,
1065,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
5836,
1037,
3255,
2679,
1011,
4353,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
2465,
5500,
30524,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
4152,
1996,
2679,
2478,
1026,
2156,
13675,
12879,
1027,
1000,
18414,
20265,
1012,
2465,
22903,
24805,
4590,
1000,
1013,
1028,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
1031,
1046,
3385,
23773,
5686,
1033,
2270,
3131,
22903,
2679,
1063,
2131,
1063,
2709,
2565,
1012,
2026,
16650,
1012,
2465,
22903,
24805,
4590,
1012,
2131,
22903,
1006,
2679,
18442,
1007,
1025,
1065,
1065,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
1996,
4353,
2006,
1996,
3131,
1005,
1055,
11712,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
14257,
25645,
21572,
2497,
4842,
29109,
2140,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
9153,
3600,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
1996,
2171,
1997,
1996,
2679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
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
9153,
3600,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
1996,
2171,
1997,
1996,
2679,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
5164,
2679,
18442,
1025,
1013,
1013,
30526
] |
// acquisition.hpp
#ifndef ACQUISITION_HPP
#define ACQUISITION_HPP
#include <QAbstractVideoBuffer>
#include <QAbstractVideoSurface>
#include <QList>
#include <QVideoFrame>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(visionAcquisitionLog)
class Acquisition : public QAbstractVideoSurface {
Q_OBJECT
public:
Acquisition ();
QList<QVideoFrame::PixelFormat> supportedPixelFormats (
QAbstractVideoBuffer::HandleType handleType) const;
bool present (const QVideoFrame& frame);
signals:
void FrameAvailable (const QVideoFrame& frame);
};
#endif // ACQUISITION_HPP
|
derpicated/articated
|
source/vision/acquisition.hpp
|
C++
|
mit
| 608
|
[
30522,
1013,
1013,
7654,
1012,
6522,
2361,
1001,
2065,
13629,
2546,
7654,
1035,
6522,
2361,
1001,
9375,
7654,
1035,
6522,
2361,
1001,
2421,
1026,
1053,
7875,
20528,
6593,
17258,
8780,
8569,
12494,
1028,
1001,
2421,
1026,
1053,
7875,
20528,
6593,
17258,
8780,
26210,
12172,
1028,
1001,
2421,
1026,
1053,
9863,
1028,
1001,
2421,
1026,
1053,
17258,
8780,
15643,
1028,
1001,
2421,
1026,
1053,
21197,
4726,
16280,
20255,
2100,
1028,
1053,
1035,
13520,
1035,
15899,
1035,
4696,
1006,
4432,
6305,
15549,
28032,
3258,
21197,
1007,
2465,
7654,
1024,
2270,
1053,
7875,
20528,
6593,
17258,
8780,
26210,
12172,
1063,
1053,
1035,
4874,
2270,
1024,
7654,
1006,
1007,
1025,
1053,
9863,
1026,
1053,
17258,
8780,
15643,
1024,
1024,
22138,
14192,
4017,
1028,
3569,
8197,
2595,
2884,
14192,
11149,
1006,
1053,
7875,
20528,
6593,
17258,
8780,
8569,
12494,
1024,
1024,
5047,
13874,
5047,
13874,
1007,
9530,
3367,
1025,
22017,
2140,
2556,
1006,
9530,
3367,
1053,
17258,
8780,
15643,
1004,
4853,
1007,
1025,
7755,
1024,
11675,
4853,
12462,
11733,
3468,
1006,
9530,
3367,
1053,
17258,
8780,
15643,
1004,
4853,
1007,
1025,
1065,
1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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
class Solution:
def dailyTemperatures(self, T):
ans = []
m = [None]*101
for i in range(len(T)-1, -1, -1):
x = T[i]
m[x] = i
ans.append(min([x for x in m[x+1:] if x is not None], default=i)-i)
ans.reverse()
return ans
print(Solution().dailyTemperatures([73, 74, 75, 71, 69, 72, 76, 73]))
|
zuun77/givemegoogletshirts
|
leetcode/python/739_daily-temperatures.py
|
Python
|
apache-2.0
| 367
|
[
30522,
2465,
5576,
1024,
13366,
3679,
18532,
4842,
4017,
14900,
1006,
2969,
1010,
1056,
1007,
1024,
2019,
2015,
1027,
1031,
1033,
1049,
1027,
1031,
3904,
1033,
1008,
7886,
2005,
1045,
1999,
2846,
1006,
18798,
1006,
1056,
1007,
1011,
1015,
1010,
1011,
1015,
1010,
1011,
1015,
1007,
1024,
1060,
1027,
1056,
1031,
1045,
1033,
1049,
1031,
1060,
1033,
1027,
1045,
2019,
2015,
1012,
10439,
10497,
1006,
8117,
1006,
1031,
1060,
2005,
1060,
1999,
1049,
1031,
1060,
1009,
1015,
1024,
1033,
2065,
1060,
2003,
2025,
3904,
1033,
1010,
12398,
1027,
1045,
1007,
1011,
1045,
1007,
2019,
2015,
1012,
7901,
1006,
1007,
2709,
2019,
2015,
6140,
1006,
5576,
1006,
1007,
1012,
3679,
18532,
4842,
4017,
14900,
1006,
1031,
6421,
1010,
6356,
1010,
4293,
1010,
6390,
1010,
6353,
1010,
5824,
1010,
6146,
1010,
6421,
1033,
1007,
1007,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<?php
/**
* @file
* Contains \Drupal\views\Plugin\views\wizard\WizardPluginBase.
*/
namespace Drupal\views\Plugin\views\wizard;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Entity\View;
use Drupal\views\Views;
use Drupal\views_ui\ViewUI;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\PluginBase;
use Drupal\views\Plugin\views\wizard\WizardInterface;
/**
* @defgroup views_wizard_plugins Views wizard plugins
* @{
* Plugins for Views wizards.
*
* Wizard handlers implement \Drupal\views\Plugin\views\wizard\WizardInterface,
* and usually extend \Drupal\views\Plugin\views\wizard\WizardPluginBase. They
* must be annotated with \Drupal\views\Annotation\ViewsWizard annotation,
* and they must be in namespace directory Plugin\views\wizard.
*
* @ingroup views_plugins
* @see plugin_api
*/
/**
* Base class for Views wizard plugins.
*
* This is a very generic Views Wizard class that can be constructed for any
* base table.
*/
abstract class WizardPluginBase extends PluginBase implements WizardInterface {
/**
* The base table connected with the wizard.
*
* @var string
*/
protected $base_table;
/**
* The entity type connected with the wizard.
*
* There might be base tables connected with entity types, if not this would
* be empty.
*
* @var string
*/
protected $entityTypeId;
/**
* Contains the information from entity_get_info of the $entity_type.
*
* @var \Drupal\Core\Entity\EntityTypeInterface
*/
protected $entityType;
/**
* An array of validated view objects, keyed by a hash.
*
* @var array
*/
protected $validated_views = array();
/**
* The table column used for sorting by create date of this wizard.
*
* @var string
*/
protected $createdColumn;
/**
* A views item configuration array used for a jump-menu field.
*
* @var array
*/
protected $pathField = array();
/**
* Additional fields required to generate the pathField.
*
* @var array
*/
protected $pathFieldsSupplemental = array();
/**
* Views items configuration arrays for filters added by the wizard.
*
* @var array
*/
protected $filters = array();
/**
* Views items configuration arrays for sorts added by the wizard.
*
* @var array
*/
protected $sorts = array();
/**
* The available store criteria.
*
* @var array
*/
protected $availableSorts = array();
/**
* Default values for filters.
*
* By default, filters are not exposed and added to the first non-reserved
* filter group.
*
* @var array()
*/
protected $filter_defaults = array(
'id' => NULL,
'expose' => array('operator' => FALSE),
'group' => 1,
);
/**
* Constructs a WizardPluginBase object.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->base_table = $this->definition['base_table'];
$entity_types = \Drupal::entityManager()->getDefinitions();
foreach ($entity_types as $entity_type_id => $entity_type) {
if ($this->base_table == $entity_type->getBaseTable()) {
$this->entityType = $entity_type;
$this->entityTypeId = $entity_type_id;
}
}
}
/**
* Gets the createdColumn property.
*
* @return string
* The name of the column containing the created date.
*/
public function getCreatedColumn() {
return $this->createdColumn;
}
/**
* Gets the pathField property.
*
* @return array
* The pathField array.
*
* @todo Rename this to be something about jump menus, and/or resolve this
* dependency.
*/
public function getPathField() {
return $this->pathField;
}
/**
* Gets the pathFieldsSupplemental property.
*
* @return array()
*
* @todo Rename this to be something about jump menus, and/or remove this.
*/
public function getPathFieldsSupplemental() {
return $this->pathFieldsSupplemental;
}
/**
* Gets the filters property.
*
* @return array
*/
public function getFilters() {
$filters = array();
$default = $this->filter_defaults;
foreach ($this->filters as $name => $info) {
$default['id'] = $name;
$filters[$name] = $info + $default;
}
return $filters;
}
/**
* Gets the availableSorts property.
*
* @return array
*/
public function getAvailableSorts() {
return $this->availableSorts;
}
/**
* Gets the sorts property.
*
* @return array
*/
public function getSorts() {
return $this->sorts;
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$style_options = Views::fetchPluginNames('style', 'normal', array($this->base_table));
$feed_row_options = Views::fetchPluginNames('row', 'feed', array($this->base_table));
$path_prefix = _url(NULL, array('absolute' => TRUE));
// Add filters and sorts which apply to the view as a whole.
$this->buildFilters($form, $form_state);
$this->buildSorts($form, $form_state);
$form['displays']['page'] = array(
'#type' => 'fieldset',
'#title' => $this->t('Page settings'),
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
'#tree' => TRUE,
);
$form['displays']['page']['create'] = array(
'#title' => $this->t('Create a page'),
'#type' => 'checkbox',
'#attributes' => array('class' => array('strong')),
'#default_value' => FALSE,
'#id' => 'edit-page-create',
);
// All options for the page display are included in this container so they
// can be hidden as a group when the "Create a page" checkbox is unchecked.
$form['displays']['page']['options'] = array(
'#type' => 'container',
'#attributes' => array('class' => array('options-set')),
'#states' => array(
'visible' => array(
':input[name="page[create]"]' => array('checked' => TRUE),
),
),
'#prefix' => '<div><div id="edit-page-wrapper">',
'#suffix' => '</div></div>',
'#parents' => array('page'),
);
$form['displays']['page']['options']['title'] = array(
'#title' => $this->t('Page title'),
'#type' => 'textfield',
'#maxlength' => 255,
);
$form['displays']['page']['options']['path'] = array(
'#title' => $this->t('Path'),
'#type' => 'textfield',
'#field_prefix' => $path_prefix,
// Account for the leading backslash.
'#maxlength' => 254,
);
$form['displays']['page']['options']['style'] = array(
'#type' => 'fieldset',
'#title' => $this->t('Page display settings'),
'#attributes' => array('class' => array('container-inline', 'fieldset-no-legend')),
);
// Create the dropdown for choosing the display format.
$form['displays']['page']['options']['style']['style_plugin'] = array(
'#title' => $this->t('Display format'),
'#type' => 'select',
'#options' => $style_options,
);
$style_form = &$form['displays']['page']['options']['style'];
$style_form['style_plugin']['#default_value'] = static::getSelected($form_state, array('page', 'style', 'style_plugin'), 'default', $style_form['style_plugin']);
// Changing this dropdown updates $form['displays']['page']['options'] via
// AJAX.
views_ui_add_ajax_trigger($style_form, 'style_plugin', array('displays', 'page', 'options'));
$this->buildFormStyle($form, $form_state, 'page');
$form['displays']['page']['options']['items_per_page'] = array(
'#title' => $this->t('Items to display'),
'#type' => 'number',
'#default_value' => 10,
'#min' => 0,
);
$form['displays']['page']['options']['pager'] = array(
'#title' => $this->t('Use a pager'),
'#type' => 'checkbox',
'#default_value' => TRUE,
);
$form['displays']['page']['options']['link'] = array(
'#title' => $this->t('Create a menu link'),
'#type' => 'checkbox',
'#id' => 'edit-page-link',
);
$form['displays']['page']['options']['link_properties'] = array(
'#type' => 'container',
'#states' => array(
'visible' => array(
':input[name="page[link]"]' => array('checked' => TRUE),
),
),
'#prefix' => '<div id="edit-page-link-properties-wrapper">',
'#suffix' => '</div>',
);
if (\Drupal::moduleHandler()->moduleExists('menu_ui')) {
$menu_options = menu_ui_get_menus();
}
else {
// These are not yet translated.
$menu_options = menu_list_system_menus();
foreach ($menu_options as $name => $title) {
$menu_options[$name] = $this->t($title);
}
}
$form['displays']['page']['options']['link_properties']['menu_name'] = array(
'#title' => $this->t('Menu'),
'#type' => 'select',
'#options' => $menu_options,
);
$form['displays']['page']['options']['link_properties']['title'] = array(
'#title' => $this->t('Link text'),
'#type' => 'textfield',
);
// Only offer a feed if we have at least one available feed row style.
if ($feed_row_options) {
$form['displays']['page']['options']['feed'] = array(
'#title' => $this->t('Include an RSS feed'),
'#type' => 'checkbox',
'#id' => 'edit-page-feed',
);
$form['displays']['page']['options']['feed_properties'] = array(
'#type' => 'container',
'#states' => array(
'visible' => array(
':input[name="page[feed]"]' => array('checked' => TRUE),
),
),
'#prefix' => '<div id="edit-page-feed-properties-wrapper">',
'#suffix' => '</div>',
);
$form['displays']['page']['options']['feed_properties']['path'] = array(
'#title' => $this->t('Feed path'),
'#type' => 'textfield',
'#field_prefix' => $path_prefix,
// Account for the leading backslash.
'#maxlength' => 254,
);
// This will almost never be visible.
$form['displays']['page']['options']['feed_properties']['row_plugin'] = array(
'#title' => $this->t('Feed row style'),
'#type' => 'select',
'#options' => $feed_row_options,
'#default_value' => key($feed_row_options),
'#access' => (count($feed_row_options) > 1),
'#states' => array(
'visible' => array(
':input[name="page[feed]"]' => array('checked' => TRUE),
),
),
'#prefix' => '<div id="edit-page-feed-properties-row-plugin-wrapper">',
'#suffix' => '</div>',
);
}
// Only offer the block settings if the module is enabled.
if (\Drupal::moduleHandler()->moduleExists('block')) {
$form['displays']['block'] = array(
'#type' => 'fieldset',
'#title' => $this->t('Block settings'),
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
'#tree' => TRUE,
);
$form['displays']['block']['create'] = array(
'#title' => $this->t('Create a block'),
'#type' => 'checkbox',
'#attributes' => array('class' => array('strong')),
'#id' => 'edit-block-create',
);
// All options for the block display are included in this container so
// they can be hidden as a group when the "Create a block" checkbox is
// unchecked.
$form['displays']['block']['options'] = array(
'#type' => 'container',
'#attributes' => array('class' => array('options-set')),
'#states' => array(
'visible' => array(
':input[name="block[create]"]' => array('checked' => TRUE),
),
),
'#prefix' => '<div id="edit-block-wrapper">',
'#suffix' => '</div>',
'#parents' => array('block'),
);
$form['displays']['block']['options']['title'] = array(
'#title' => $this->t('Block title'),
'#type' => 'textfield',
'#maxlength' => 255,
);
$form['displays']['block']['options']['style'] = array(
'#type' => 'fieldset',
'#title' => $this->t('Block display settings'),
'#attributes' => array('class' => array('container-inline', 'fieldset-no-legend')),
);
// Create the dropdown for choosing the display format.
$form['displays']['block']['options']['style']['style_plugin'] = array(
'#title' => $this->t('Display format'),
'#type' => 'select',
'#options' => $style_options,
);
$style_form = &$form['displays']['block']['options']['style'];
$style_form['style_plugin']['#default_value'] = static::getSelected($form_state, array('block', 'style', 'style_plugin'), 'default', $style_form['style_plugin']);
// Changing this dropdown updates $form['displays']['block']['options']
// via AJAX.
views_ui_add_ajax_trigger($style_form, 'style_plugin', array('displays', 'block', 'options'));
$this->buildFormStyle($form, $form_state, 'block');
$form['displays']['block']['options']['items_per_page'] = array(
'#title' => $this->t('Items per block'),
'#type' => 'number',
'#default_value' => 5,
'#min' => 0,
);
$form['displays']['block']['options']['pager'] = array(
'#title' => $this->t('Use a pager'),
'#type' => 'checkbox',
'#default_value' => FALSE,
);
}
// Only offer the REST export settings if the module is enabled.
if (\Drupal::moduleHandler()->moduleExists('rest')) {
$form['displays']['rest_export'] = array(
'#type' => 'fieldset',
'#title' => $this->t('REST export settings'),
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
'#tree' => TRUE,
);
$form['displays']['rest_export']['create'] = array(
'#title' => $this->t('Provide a REST export'),
'#type' => 'checkbox',
'#attributes' => array('class' => array('strong')),
'#id' => 'edit-rest-export-create',
);
// All options for the REST export display are included in this container
// so they can be hidden as a group when the "Provide a REST export"
// checkbox is unchecked.
$form['displays']['rest_export']['options'] = array(
'#type' => 'container',
'#attributes' => array('class' => array('options-set')),
'#states' => array(
'visible' => array(
':input[name="rest_export[create]"]' => array('checked' => TRUE),
),
),
'#prefix' => '<div id="edit-rest-export-wrapper">',
'#suffix' => '</div>',
'#parents' => array('rest_export'),
);
$form['displays']['rest_export']['options']['path'] = array(
'#title' => $this->t('REST export path'),
'#type' => 'textfield',
'#field_prefix' => $path_prefix,
// Account for the leading backslash.
'#maxlength' => 254,
);
}
return $form;
}
/**
* Gets the current value of a #select element, from within a form constructor function.
*
* This function is intended for use in highly dynamic forms (in particular the
* add view wizard) which are rebuilt in different ways depending on which
* triggering element (AJAX or otherwise) was most recently fired. For example,
* sometimes it is necessary to decide how to build one dynamic form element
* based on the value of a different dynamic form element that may not have
* even been present on the form the last time it was submitted. This function
* takes care of resolving those conflicts and gives you the proper current
* value of the requested #select element.
*
* By necessity, this function sometimes uses non-validated user input from
* FormState::$input in making its determination. Although it performs some
* minor validation of its own, it is not complete. The intention is that the
* return value of this function should only be used to help decide how to
* build the current form the next time it is reloaded, not to be saved as if
* it had gone through the normal, final form validation process. Do NOT use
* the results of this function for any other purpose besides deciding how to
* build the next version of the form.
*
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param $parents
* An array of parent keys that point to the part of the submitted form
* values that are expected to contain the element's value (in the case where
* this form element was actually submitted). In a simple case (assuming
* #tree is TRUE throughout the form), if the select element is located in
* $form['wrapper']['select'], so that the submitted form values would
* normally be found in $form_state->getValue(array('wrapper', 'select')),
* you would pass array('wrapper', 'select') for this parameter.
* @param $default_value
* The default value to return if the #select element does not currently have
* a proper value set based on the submitted input.
* @param $element
* An array representing the current version of the #select element within
* the form.
*
* @return
* The current value of the #select element. A common use for this is to feed
* it back into $element['#default_value'] so that the form will be rendered
* with the correct value selected.
*/
public static function getSelected(FormStateInterface $form_state, $parents, $default_value, $element) {
// For now, don't trust this to work on anything but a #select element.
if (!isset($element['#type']) || $element['#type'] != 'select' || !isset($element['#options'])) {
return $default_value;
}
// If there is a user-submitted value for this element that matches one of
// the currently available options attached to it, use that. We need to check
// FormState::$input rather than $form_state->getValues() here because the
// triggering element often has the #limit_validation_errors property set to
// prevent unwanted errors elsewhere on the form. This means that the
// $form_state->getValues() array won't be complete. We could make it complete
// by adding each required part of the form to the #limit_validation_errors
// property individually as the form is being built, but this is difficult to
// do for a highly dynamic and extensible form. This method is much simpler.
$user_input = &$form_state->getUserInput();
if (!empty($user_input)) {
$key_exists = NULL;
$submitted = NestedArray::getValue($user_input, $parents, $key_exists);
// Check that the user-submitted value is one of the allowed options before
// returning it. This is not a substitute for actual form validation;
// rather it is necessary because, for example, the same select element
// might have #options A, B, and C under one set of conditions but #options
// D, E, F under a different set of conditions. So the form submission
// might have occurred with option A selected, but when the form is rebuilt
// option A is no longer one of the choices. In that case, we don't want to
// use the value that was submitted anymore but rather fall back to the
// default value.
if ($key_exists && in_array($submitted, array_keys($element['#options']))) {
return $submitted;
}
}
// Fall back on returning the default value if nothing was returned above.
return $default_value;
}
/**
* Adds the style options to the wizard form.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
* @param string $type
* The display ID (e.g. 'page' or 'block').
*/
protected function buildFormStyle(array &$form, FormStateInterface $form_state, $type) {
$style_form = &$form['displays'][$type]['options']['style'];
$style = $style_form['style_plugin']['#default_value'];
$style_plugin = Views::pluginManager('style')->createInstance($style);
if (isset($style_plugin) && $style_plugin->usesRowPlugin()) {
$options = $this->rowStyleOptions();
$style_form['row_plugin'] = array(
'#type' => 'select',
'#title' => $this->t('of'),
'#options' => $options,
'#access' => count($options) > 1,
);
// For the block display, the default value should be "titles (linked)",
// if it's available (since that's the most common use case).
$block_with_linked_titles_available = ($type == 'block' && isset($options['titles_linked']));
$default_value = $block_with_linked_titles_available ? 'titles_linked' : key($options);
$style_form['row_plugin']['#default_value'] = static::getSelected($form_state, array($type, 'style', 'row_plugin'), $default_value, $style_form['row_plugin']);
// Changing this dropdown updates the individual row options via AJAX.
views_ui_add_ajax_trigger($style_form, 'row_plugin', array('displays', $type, 'options', 'style', 'row_options'));
// This is the region that can be updated by AJAX. The base class doesn't
// add anything here, but child classes can.
$style_form['row_options'] = array(
'#theme_wrappers' => array('container'),
);
}
elseif ($style_plugin->usesFields()) {
$style_form['row_plugin'] = array('#markup' => '<span>' . $this->t('of fields') . '</span>');
}
}
/**
* Retrieves row style plugin names.
*
* @return array
* Returns the plugin names available for the base table of the wizard.
*/
protected function rowStyleOptions() {
// Get all available row plugins by default.
$options = Views::fetchPluginNames('row', 'normal', array($this->base_table));
return $options;
}
/**
* Builds the form structure for selecting the view's filters.
*
* By default, this adds "of type" and "tagged with" filters (when they are
* available).
*/
protected function buildFilters(&$form, FormStateInterface $form_state) {
module_load_include('inc', 'views_ui', 'admin');
$bundles = entity_get_bundles($this->entityTypeId);
// If the current base table support bundles and has more than one (like user).
if (!empty($bundles) && $this->entityType && $this->entityType->hasKey('bundle')) {
// Get all bundles and their human readable names.
$options = array('all' => $this->t('All'));
foreach ($bundles as $type => $bundle) {
$options[$type] = $bundle['label'];
}
$form['displays']['show']['type'] = array(
'#type' => 'select',
'#title' => $this->t('of type'),
'#options' => $options,
);
$selected_bundle = static::getSelected($form_state, array('show', 'type'), 'all', $form['displays']['show']['type']);
$form['displays']['show']['type']['#default_value'] = $selected_bundle;
// Changing this dropdown updates the entire content of $form['displays']
// via AJAX, since each bundle might have entirely different fields
// attached to it, etc.
views_ui_add_ajax_trigger($form['displays']['show'], 'type', array('displays'));
}
}
/**
* Builds the form structure for selecting the view's sort order.
*
* By default, this adds a "sorted by [date]" filter (when it is available).
*/
protected function buildSorts(&$form, FormStateInterface $form_state) {
$sorts = array(
'none' => $this->t('Unsorted'),
);
// Check if we are allowed to sort by creation date.
$created_column = $this->getCreatedColumn();
if ($created_column) {
$sorts += array(
$created_column . ':DESC' => $this->t('Newest first'),
$created_column . ':ASC' => $this->t('Oldest first'),
);
}
if ($available_sorts = $this->getAvailableSorts()) {
$sorts += $available_sorts;
}
// If there is no sorts option available continue.
if (!empty($sorts)) {
$form['displays']['show']['sort'] = array(
'#type' => 'select',
'#title' => $this->t('sorted by'),
'#options' => $sorts,
'#default_value' => isset($created_column) ? $created_column . ':DESC' : 'none',
);
}
}
/**
* Instantiates a view object from form values.
*
* @return \Drupal\views_ui\ViewUI
* The instantiated view UI object.
*/
protected function instantiateView($form, FormStateInterface $form_state) {
// Build the basic view properties and create the view.
$values = array(
'id' => $form_state->getValue('id'),
'label' => $form_state->getValue('label'),
'description' => $form_state->getValue('description'),
'base_table' => $this->base_table,
'langcode' => language_default()->id,
);
$view = entity_create('view', $values);
// Build all display options for this view.
$display_options = $this->buildDisplayOptions($form, $form_state);
// Allow the fully built options to be altered. This happens before adding
// the options to the view, so that once they are eventually added we will
// be able to get all the overrides correct.
$this->alterDisplayOptions($display_options, $form, $form_state);
$this->addDisplays($view, $display_options, $form, $form_state);
return new ViewUI($view);
}
/**
* Builds an array of display options for the view.
*
* @return array
* An array whose keys are the names of each display and whose values are
* arrays of options for that display.
*/
protected function buildDisplayOptions($form, FormStateInterface $form_state) {
// Display: Master
$display_options['default'] = $this->defaultDisplayOptions();
$display_options['default'] += array(
'filters' => array(),
'sorts' => array(),
);
$display_options['default']['filters'] += $this->defaultDisplayFilters($form, $form_state);
$display_options['default']['sorts'] += $this->defaultDisplaySorts($form, $form_state);
// Display: Page
if (!$form_state->isValueEmpty(array('page', 'create'))) {
$display_options['page'] = $this->pageDisplayOptions($form, $form_state);
// Display: Feed (attached to the page)
if (!$form_state->isValueEmpty(array('page', 'feed'))) {
$display_options['feed'] = $this->pageFeedDisplayOptions($form, $form_state);
}
}
// Display: Block
if (!$form_state->isValueEmpty(array('block', 'create'))) {
$display_options['block'] = $this->blockDisplayOptions($form, $form_state);
}
// Display: REST export.
if (!$form_state->isValueEmpty(['rest_export', 'create'])) {
$display_options['rest_export'] = $this->restExportDisplayOptions($form, $form_state);
}
return $display_options;
}
/**
* Alters the full array of display options before they are added to the view.
*/
protected function alterDisplayOptions(&$display_options, $form, FormStateInterface $form_state) {
foreach ($display_options as $display_type => $options) {
// Allow style plugins to hook in and provide some settings.
$style_plugin = Views::pluginManager('style')->createInstance($options['style']['type']);
$style_plugin->wizardSubmit($form, $form_state, $this, $display_options, $display_type);
}
}
/**
* Adds the array of display options to the view, with appropriate overrides.
*/
protected function addDisplays(View $view, $display_options, $form, FormStateInterface $form_state) {
// Initialize and store the view executable to get the display plugin
// instances.
$executable = $view->getExecutable();
// Display: Master
$default_display = $executable->newDisplay('default', 'Master', 'default');
foreach ($display_options['default'] as $option => $value) {
$default_display->setOption($option, $value);
}
// Display: Page
if (isset($display_options['page'])) {
$display = $executable->newDisplay('page', 'Page', 'page_1');
// The page display is usually the main one (from the user's point of
// view). Its options should therefore become the overall view defaults,
// so that new displays which are added later automatically inherit them.
$this->setDefaultOptions($display_options['page'], $display, $default_display);
// Display: Feed (attached to the page).
if (isset($display_options['feed'])) {
$display = $executable->newDisplay('feed', 'Feed', 'feed_1');
$this->setOverrideOptions($display_options['feed'], $display, $default_display);
}
}
// Display: Block.
if (isset($display_options['block'])) {
$display = $executable->newDisplay('block', 'Block', 'block_1');
// When there is no page, the block display options should become the
// overall view defaults.
if (!isset($display_options['page'])) {
$this->setDefaultOptions($display_options['block'], $display, $default_display);
}
else {
$this->setOverrideOptions($display_options['block'], $display, $default_display);
}
}
// Display: REST export.
if (isset($display_options['rest_export'])) {
$display = $executable->newDisplay('rest_export', 'REST export', 'rest_export_1');
// If there is no page or block, the REST export display options should
// become the overall view defaults.
if (!isset($display_options['page']) && !isset($display_options['block'])) {
$this->setDefaultOptions($display_options['rest_export'], $display, $default_display);
}
else {
$this->setOverrideOptions($display_options['rest_export'], $display, $default_display);
}
}
// Initialize displays and merge all plugin default values.
$executable->mergeDefaults();
}
/**
* Assembles the default display options for the view.
*
* Most wizards will need to override this method to provide some fields
* or a different row plugin.
*
* @return array
* Returns an array of display options.
*/
protected function defaultDisplayOptions() {
$display_options = array();
$display_options['access']['type'] = 'none';
$display_options['cache']['type'] = 'none';
$display_options['query']['type'] = 'views_query';
$display_options['exposed_form']['type'] = 'basic';
$display_options['pager']['type'] = 'full';
$display_options['style']['type'] = 'default';
$display_options['row']['type'] = 'fields';
// Add default options array to each plugin type.
foreach ($display_options as &$options) {
$options['options'] = array();
$options['provider'] = 'views';
$options['dependencies'] = array();
}
// Add a least one field so the view validates and the user has a preview.
// The base field can provide a default in its base settings; otherwise,
// choose the first field with a field handler.
$data = Views::viewsData()->get($this->base_table);
if (isset($data['table']['base']['defaults']['field'])) {
$default_field = $data['table']['base']['defaults']['field'];
}
else {
foreach ($data as $default_field => $field_data) {
if (isset($field_data['field']['id'])) {
break;
}
}
}
$display_options['fields'][$default_field] = array(
'table' => $this->base_table,
'field' => $default_field,
'id' => $default_field,
);
// Load the plugin ID and module.
$base_field = $data['table']['base']['field'];
$display_options['fields'][$base_field]['plugin_id'] = $data[$base_field]['field']['id'];
if ($definition = Views::pluginManager('field')->getDefinition($display_options['fields'][$base_field]['plugin_id'], FALSE)) {
$display_options['fields'][$base_field]['provider'] = isset($definition['provider']) ? $definition['provider'] : 'views';
}
return $display_options;
}
/**
* Retrieves all filter information used by the default display.
*
* Additional to the one provided by the plugin this method takes care about
* adding additional filters based on user input.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
*
* @return array
* An array of filter arrays keyed by ID. A sort array contains the options
* accepted by a filter handler.
*/
protected function defaultDisplayFilters($form, FormStateInterface $form_state) {
$filters = array();
// Add any filters provided by the plugin.
foreach ($this->getFilters() as $name => $info) {
$filters[$name] = $info;
}
// Add any filters specified by the user when filling out the wizard.
$filters = array_merge($filters, $this->defaultDisplayFiltersUser($form, $form_state));
return $filters;
}
/**
* Retrieves filter information based on user input for the default display.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
*
* @return array
* An array of filter arrays keyed by ID. A sort array contains the options
* accepted by a filter handler.
*/
protected function defaultDisplayFiltersUser(array $form, FormStateInterface $form_state) {
$filters = array();
if (($type = $form_state->getValue(array('show', 'type'))) && $type != 'all') {
$bundle_key = $this->entityType->getKey('bundle');
// Figure out the table where $bundle_key lives. It may not be the same as
// the base table for the view; the taxonomy vocabulary machine_name, for
// example, is stored in taxonomy_vocabulary, not taxonomy_term_data.
module_load_include('inc', 'views_ui', 'admin');
$fields = Views::viewsDataHelper()->fetchFields($this->base_table, 'filter');
if (isset($fields[$this->base_table . '.' . $bundle_key])) {
$table = $this->base_table;
}
else {
foreach ($fields as $field_name => $value) {
if ($pos = strpos($field_name, '.' . $bundle_key)) {
$table = substr($field_name, 0, $pos);
break;
}
}
}
$table_data = Views::viewsData()->get($table);
// If the 'in' operator is being used, map the values to an array.
$handler = $table_data[$bundle_key]['filter']['id'];
$handler_definition = Views::pluginManager('filter')->getDefinition($handler);
if ($handler == 'in_operator' || is_subclass_of($handler_definition['class'], 'Drupal\\views\\Plugin\\views\\filter\\InOperator')) {
$value = array($type => $type);
}
// Otherwise, use just a single value.
else {
$value = $type;
}
$filters[$bundle_key] = array(
'id' => $bundle_key,
'table' => $table,
'field' => $bundle_key,
'value' => $value,
);
}
return $filters;
}
/**
* Retrieves all sort information used by the default display.
*
* Additional to the one provided by the plugin this method takes care about
* adding additional sorts based on user input.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
*
* @return array
* An array of sort arrays keyed by ID. A sort array contains the options
* accepted by a sort handler.
*/
protected function defaultDisplaySorts($form, FormStateInterface $form_state) {
$sorts = array();
// Add any sorts provided by the plugin.
foreach ($this->getSorts() as $name => $info) {
$sorts[$name] = $info;
}
// Add any sorts specified by the user when filling out the wizard.
$sorts = array_merge($sorts, $this->defaultDisplaySortsUser($form, $form_state));
return $sorts;
}
/**
* Retrieves sort information based on user input for the default display.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
*
* @return array
* An array of sort arrays keyed by ID. A sort array contains the options
* accepted by a sort handler.
*/
protected function defaultDisplaySortsUser($form, FormStateInterface $form_state) {
$sorts = array();
// Don't add a sort if there is no form value or the user set the sort to
// 'none'.
if (($sort_type = $form_state->getValue(array('show', 'sort'))) && $sort_type != 'none') {
list($column, $sort) = explode(':', $sort_type);
// Column either be a column-name or the table-columnn-ame.
$column = explode('-', $column);
if (count($column) > 1) {
$table = $column[0];
$column = $column[1];
}
else {
$table = $this->base_table;
$column = $column[0];
}
// If the input is invalid, for example when the #default_value contains
// created from node, but the wizard type is another base table, make
// sure it is not added. This usually don't happen if you have js
// enabled.
$data = Views::viewsData()->get($table);
if (isset($data[$column]['sort'])) {
$sorts[$column] = array(
'id' => $column,
'table' => $table,
'field' => $column,
'order' => $sort,
);
}
}
return $sorts;
}
/**
* Retrieves the page display options.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
*
* @return array
* Returns an array of display options.
*/
protected function pageDisplayOptions(array $form, FormStateInterface $form_state) {
$display_options = array();
$page = $form_state->getValue('page');
$display_options['title'] = $page['title'];
$display_options['path'] = $page['path'];
$display_options['style'] = array('type' => $page['style']['style_plugin']);
// Not every style plugin supports row style plugins.
// Make sure that the selected row plugin is a valid one.
$options = $this->rowStyleOptions();
$display_options['row'] = array('type' => (isset($page['style']['row_plugin']) && isset($options[$page['style']['row_plugin']])) ? $page['style']['row_plugin'] : 'fields');
// If the specific 0 items per page, use no pager.
if (empty($page['items_per_page'])) {
$display_options['pager']['type'] = 'none';
}
// If the user checked the pager checkbox use a full pager.
elseif (isset($page['pager'])) {
$display_options['pager']['type'] = 'full';
}
// If the user doesn't have checked the checkbox use the pager which just
// displays a certain amount of items.
else {
$display_options['pager']['type'] = 'some';
}
$display_options['pager']['options']['items_per_page'] = $page['items_per_page'];
// Generate the menu links settings if the user checked the link checkbox.
if (!empty($page['link'])) {
$display_options['menu']['type'] = 'normal';
$display_options['menu']['title'] = $page['link_properties']['title'];
$display_options['menu']['menu_name'] = $page['link_properties']['menu_name'];
}
return $display_options;
}
/**
* Retrieves the block display options.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
*
* @return array
* Returns an array of display options.
*/
protected function blockDisplayOptions(array $form, FormStateInterface $form_state) {
$display_options = array();
$block = $form_state->getValue('block');
$display_options['title'] = $block['title'];
$display_options['style'] = array('type' => $block['style']['style_plugin']);
$display_options['row'] = array('type' => isset($block['style']['row_plugin']) ? $block['style']['row_plugin'] : 'fields');
$display_options['pager']['type'] = $block['pager'] ? 'full' : (empty($block['items_per_page']) ? 'none' : 'some');
$display_options['pager']['options']['items_per_page'] = $block['items_per_page'];
return $display_options;
}
/**
* Retrieves the REST export display options from the submitted form values.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
*
* @return array
* Returns an array of display options.
*/
protected function restExportDisplayOptions(array $form, FormStateInterface $form_state) {
$display_options = array();
$display_options['path'] = $form_state->getValue(['rest_export', 'path']);
$display_options['style'] = array('type' => 'serializer');
return $display_options;
}
/**
* Retrieves the feed display options.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
*
* @return array
* Returns an array of display options.
*/
protected function pageFeedDisplayOptions($form, FormStateInterface $form_state) {
$display_options = array();
$display_options['pager']['type'] = 'some';
$display_options['style'] = array('type' => 'rss');
$display_options['row'] = array('type' => $form_state->getValue(array('page', 'feed_properties', 'row_plugin')));
$display_options['path'] = $form_state->getValue(array('page', 'feed_properties', 'path'));
$display_options['title'] = $form_state->getValue(array('page', 'title'));
$display_options['displays'] = array(
'default' => 'default',
'page_1' => 'page_1',
);
return $display_options;
}
/**
* Sets options for a display and makes them the default options if possible.
*
* This function can be used to set options for a display when it is desired
* that the options also become the defaults for the view whenever possible.
* This should be done for the "primary" display created in the view wizard,
* so that new displays which the user adds later will be similar to this
* one.
*
* @param array $options
* An array whose keys are the name of each option and whose values are the
* desired values to set.
* @param \Drupal\views\View\plugin\display\DisplayPluginBase $display
* The display handler which the options will be applied to. The default
* display will actually be assigned the options (and this display will
* inherit them) when possible.
* @param \Drupal\views\View\plugin\display\DisplayPluginBase $default_display
* The default display handler, which will store the options when possible.
*/
protected function setDefaultOptions($options, DisplayPluginBase $display, DisplayPluginBase $default_display) {
foreach ($options as $option => $value) {
// If the default display supports this option, set the value there.
// Otherwise, set it on the provided display.
$default_value = $default_display->getOption($option);
if (isset($default_value)) {
$default_display->setOption($option, $value);
}
else {
$display->setOption($option, $value);
}
}
}
/**
* Sets options for a display, inheriting from the defaults when possible.
*
* This function can be used to set options for a display when it is desired
* that the options inherit from the default display whenever possible. This
* avoids setting too many options as overrides, which will be harder for the
* user to modify later. For example, if $this->setDefaultOptions() was
* previously called on a page display and then this function is called on a
* block display, and if the user entered the same title for both displays in
* the views wizard, then the view will wind up with the title stored as the
* default (with the page and block both inheriting from it).
*
* @param array $options
* An array whose keys are the name of each option and whose values are the
* desired values to set.
* @param \Drupal\views\View\plugin\display\DisplayPluginBase $display
* The display handler which the options will be applied to. The default
* display will actually be assigned the options (and this display will
* inherit them) when possible.
* @param \Drupal\views\View\plugin\display\DisplayPluginBase $default_display
* The default display handler, which will store the options when possible.
*/
protected function setOverrideOptions(array $options, DisplayPluginBase $display, DisplayPluginBase $default_display) {
foreach ($options as $option => $value) {
// Only override the default value if it is different from the value that
// was provided.
$default_value = $default_display->getOption($option);
if (!isset($default_value)) {
$display->setOption($option, $value);
}
elseif ($default_value !== $value) {
$display->overrideOption($option, $value);
}
}
}
/**
* Retrieves a validated view for a form submission.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
* @param bool $unset
* Should the view be removed from the list of validated views.
*
* @return \Drupal\views_ui\ViewUI $view
* The validated view object.
*/
protected function retrieveValidatedView(array $form, FormStateInterface $form_state, $unset = TRUE) {
// @todo Figure out why all this hashing is done. Wouldn't it be easier to
// store a single entry and that's it?
$key = hash('sha256', serialize($form_state->getValues()));
$view = (isset($this->validated_views[$key]) ? $this->validated_views[$key] : NULL);
if ($unset) {
unset($this->validated_views[$key]);
}
return $view;
}
/**
* Stores a validated view from a form submission.
*
* @param array $form
* The full wizard form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the wizard form.
* @param \Drupal\views_ui\ViewUI $view
* The validated view object.
*/
protected function setValidatedView(array $form, FormStateInterface $form_state, ViewUI $view) {
$key = hash('sha256', serialize($form_state->getValues()));
$this->validated_views[$key] = $view;
}
/**
* Implements Drupal\views\Plugin\views\wizard\WizardInterface::validate().
*
* Instantiates the view from the form submission and validates its values.
*/
public function validateView(array $form, FormStateInterface $form_state) {
$view = $this->instantiateView($form, $form_state);
$errors = $view->getExecutable()->validate();
if (empty($errors)) {
$this->setValidatedView($form, $form_state, $view);
}
return $errors;
}
/**
* {@inheritDoc}
*/
public function createView(array $form, FormStateInterface $form_state) {
$view = $this->retrieveValidatedView($form, $form_state);
if (empty($view)) {
throw new WizardException('Attempted to create a view with values that have not been validated.');
}
return $view;
}
}
/**
* @}
*/
|
binhdigipro/drupal8
|
core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
|
PHP
|
gpl-2.0
| 47,811
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
1030,
5371,
1008,
3397,
1032,
2852,
6279,
2389,
1032,
5328,
1032,
13354,
2378,
1032,
5328,
1032,
10276,
1032,
10276,
24759,
15916,
2378,
15058,
1012,
1008,
1013,
3415,
15327,
2852,
6279,
2389,
1032,
5328,
1032,
13354,
2378,
1032,
5328,
1032,
10276,
1025,
2224,
2852,
30524,
1025,
2224,
2852,
6279,
2389,
1032,
5328,
1032,
5328,
1025,
2224,
2852,
6279,
2389,
1032,
5328,
1035,
21318,
1032,
3193,
10179,
1025,
2224,
2852,
6279,
2389,
1032,
5328,
1032,
13354,
2378,
1032,
5328,
1032,
4653,
1032,
4653,
24759,
15916,
2378,
15058,
1025,
2224,
2852,
6279,
2389,
1032,
5328,
1032,
13354,
2378,
1032,
5328,
1032,
13354,
2378,
15058,
1025,
2224,
2852,
6279,
2389,
1032,
5328,
1032,
13354,
2378,
1032,
5328,
1032,
10276,
1032,
10276,
18447,
2121,
12172,
1025,
1013,
1008,
1008,
1008,
1030,
13366,
17058,
5328,
1035,
10276,
1035,
13354,
7076,
5328,
10276,
13354,
7076,
1008,
1030,
1063,
1008,
13354,
7076,
2005,
5328,
16657,
1012,
1008,
1008,
10276,
28213,
2015,
10408,
1032,
2852,
6279,
2389,
1032,
5328,
1032,
13354,
2378,
1032,
5328,
1032,
10276,
1032,
10276,
18447,
2121,
12172,
1010,
1008,
1998,
2788,
7949,
1032,
2852,
6279,
2389,
1032,
5328,
1032,
13354,
2378,
1032,
5328,
1032,
10276,
1032,
10276,
24759,
15916,
2378,
15058,
1012,
2027,
1008,
2442,
2022,
5754,
17287,
3064,
2007,
1032,
2852,
6279,
2389,
1032,
5328,
1032,
5754,
17287,
3508,
1032,
5328,
9148,
26154,
5754,
17287,
3508,
1010,
1008,
1998,
2027,
2442,
2022,
1999,
3415,
15327,
14176,
13354,
2378,
1032,
5328,
1032,
10276,
1012,
1008,
1008,
1030,
13749,
22107,
5328,
1035,
13354,
7076,
1008,
1030,
2156,
13354,
2378,
1035,
17928,
1008,
1013,
1013,
1008,
1008,
1008,
2918,
2465,
2005,
5328,
10276,
13354,
7076,
1012,
1008,
1008,
2023,
2003,
1037,
2200,
12391,
5328,
10276,
2465,
2008,
2064,
2022,
3833,
2005,
2151,
1008,
2918,
2795,
1012,
1008,
1013,
10061,
2465,
10276,
24759,
15916,
2378,
15058,
8908,
13354,
2378,
15058,
22164,
10276,
18447,
2121,
12172,
1063,
1013,
1008,
1008,
1008,
1996,
2918,
2795,
4198,
2007,
1996,
10276,
1012,
1008,
1008,
1030,
13075,
5164,
1008,
1013,
5123,
1002,
2918,
1035,
2795,
1025,
1013,
1008,
1008,
1008,
1996,
9178,
2828,
4198,
2007,
1996,
10276,
1012,
1008,
1008,
2045,
2453,
2022,
2918,
7251,
4198,
2007,
9178,
4127,
1010,
2065,
2025,
2023,
2052,
1008,
2022,
4064,
1012,
1008,
1008,
1030,
13075,
5164,
1008,
1013,
5123,
1002,
9178,
13874,
3593,
1025,
1013,
1008,
1008,
1008,
3397,
1996,
2592,
2013,
9178,
1035,
2131,
1035,
18558,
1997,
1996,
1002,
9178,
1035,
2828,
1012,
1008,
1008,
1030,
13075,
1032,
2852,
6279,
2389,
1032,
4563,
1032,
9178,
1032,
9178,
13874,
18447,
2121,
12172,
1008,
1013,
5123,
1002,
9178,
13874,
1025,
1013,
1008,
1008,
1008,
2019,
9140,
1997,
9398,
4383,
3193,
5200,
1010,
3145,
2098,
2011,
1037,
23325,
1012,
1008,
1008,
1030,
13075,
9140,
1008,
1013,
5123,
1002,
9398,
4383,
1035,
5328,
1027,
30523,
6279,
2389,
1032,
6922,
1032,
9710,
1032,
9089,
11960,
11335,
2100,
1025,
2224,
2852,
6279,
2389,
1032,
4563,
1032,
2433,
1032,
3596,
12259,
18447,
2121,
12172,
1025,
2224,
2852,
6279,
2389,
1032,
5328,
1032,
9178,
1032,
3193,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
6279,
2389,
1032,
6922,
1032,
9710,
1032,
9089,
11960,
11335,
2100,
1025,
2224,
2852,
6279,
2389,
1032,
4563,
1032,
2433,
1032,
3596,
12259,
18447,
2121,
12172,
1025,
2224,
2852,
6279,
2389,
1032,
5328,
1032,
9178,
1032,
3193,
30526
] |
---
layout : blocks/working-session
title : SAMM Metrics for Enterprise
type : workshop
track : CISO
technology :
related-to : OwaspSAMM,Appsec Metrics
status : done
organizers : Yan Kravchenko
participants :
---
## Why
OwaspSAMM is not geared for this out of the box, but can be leveraged very effectively to help large organizations manage application portfolios.
## What
- Evaluating hundreds (or thousands) apps through openSAMM
- Correlating Risks for complete picture
- Decisions to help drive AppSec forward, fueled by metrics
- Getting AppSec initiatives funded
## Who
- CISO
- Future CISOs
- Metrics Analysts
- AppSec Analysts
|
talargoni/owasp-summit-2017
|
Working-Sessions/CISO/SAMM-Metrics-for-Enterprise.md
|
Markdown
|
apache-2.0
| 691
|
[
30522,
1011,
1011,
1011,
9621,
1024,
5991,
1013,
2551,
1011,
5219,
2516,
1024,
3520,
2213,
12046,
2015,
2005,
6960,
2828,
1024,
8395,
2650,
1024,
20199,
2080,
2974,
1024,
3141,
1011,
2000,
1024,
27593,
3022,
4523,
3286,
2213,
1010,
18726,
8586,
12046,
2015,
3570,
1024,
2589,
18829,
1024,
13619,
1047,
2527,
25465,
19767,
6818,
1024,
1011,
1011,
1011,
1001,
1001,
2339,
27593,
3022,
4523,
3286,
2213,
2003,
2025,
23636,
2005,
2023,
2041,
1997,
1996,
3482,
1010,
2021,
2064,
2022,
21155,
2094,
2200,
6464,
2000,
2393,
2312,
4411,
6133,
4646,
11103,
2015,
1012,
1001,
1001,
2054,
1011,
23208,
5606,
1006,
2030,
5190,
1007,
18726,
2083,
7480,
3286,
2213,
1011,
2522,
14343,
22248,
10831,
2005,
3143,
3861,
1011,
6567,
2000,
2393,
3298,
18726,
8586,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
package org.wikipedia.search;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.support.annotation.ColorInt;
import android.support.annotation.ColorRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.Gravity;
import android.view.View;
import org.wikipedia.R;
import org.wikipedia.ViewAnimations;
import org.wikipedia.util.DimenUtil;
import org.wikipedia.util.GradientUtil;
import org.wikipedia.views.ObservableWebView;
public class SearchBarHideHandler implements ObservableWebView.OnScrollChangeListener,
ObservableWebView.OnUpOrCancelMotionEventListener,
ObservableWebView.OnDownMotionEventListener {
private static final int FULL_OPACITY = 255;
@NonNull private final View quickReturnView;
@NonNull private final Context context;
@Nullable private ObservableWebView webview;
private boolean fadeEnabled;
private boolean forceNoFade;
@NonNull private final Drawable toolbarBackground;
private Drawable toolbarGradient;
@NonNull private final Drawable toolbarShadow;
@NonNull private final Drawable statusBar;
public SearchBarHideHandler(@NonNull Activity activity, @NonNull View quickReturnView) {
context = activity;
this.quickReturnView = quickReturnView;
LayerDrawable toolbarBackgroundLayers = (LayerDrawable) quickReturnView
.findViewById(R.id.main_toolbar_background_container).getBackground();
toolbarBackground = toolbarBackgroundLayers.findDrawableByLayerId(R.id.toolbar_background_solid).mutate();
toolbarShadow = quickReturnView.findViewById(R.id.main_toolbar_shadow).getBackground().mutate();
initToolbarGradient(toolbarBackgroundLayers);
statusBar = quickReturnView.findViewById(R.id.empty_status_bar).getBackground().mutate();
}
/**
* Update the WebView based on whose scroll position the search bar will hide itself.
* @param webView The WebView against which scrolling will be tracked.
*/
public void setScrollView(@Nullable ObservableWebView webView) {
webview = webView;
if (webview != null) {
webview.addOnScrollChangeListener(this);
webview.addOnDownMotionEventListener(this);
webview.addOnUpOrCancelMotionEventListener(this);
}
}
/**
* Whether to enable fading in/out of the search bar when near the top of the article.
* @param enabled True to enable fading, false otherwise.
*/
public void setFadeEnabled(boolean enabled) {
fadeEnabled = enabled;
update();
}
/**
* Whether to temporarily disable fading of the search bar, even if fading is enabled otherwise.
* May be used when displaying a temporary UI element that requires the search bar to be shown
* fully, e.g. when the ToC is pulled out.
* @param force True to temporarily disable fading, false otherwise.
*/
public void setForceNoFade(boolean force) {
forceNoFade = force;
update();
}
/**
* Force an update of the appearance of the search bar. Usually it is updated automatically
* when the associated WebView is scrolled, but this function may be used to manually refresh
* the appearance of the search bar, e.g. when the WebView is first shown.
*/
public void update() {
if (webview == null) {
return;
}
onScrollChanged(webview.getScrollY(), webview.getScrollY(), false);
}
@Override
public void onScrollChanged(int oldScrollY, int scrollY, boolean isHumanScroll) {
if (webview == null) {
return;
}
int opacity = calculateScrollOpacity(scrollY);
toolbarBackground.setAlpha(opacity);
toolbarShadow.setAlpha(opacity);
toolbarGradient.setAlpha(FULL_OPACITY - opacity);
statusBar.setAlpha(opacity);
if (scrollY <= webview.getHeight()) {
// For the first screenful, ensure it always exists.
ViewAnimations.ensureTranslationY(quickReturnView, 0);
return;
}
int animMargin;
if (oldScrollY > scrollY) {
int minMargin = 0;
int scrollDelta = oldScrollY - scrollY;
int newMargin = (int) quickReturnView.getTranslationY() + scrollDelta;
animMargin = Math.min(minMargin, newMargin);
} else {
// scroll down!
int scrollDelta = scrollY - oldScrollY;
if (!isHumanScroll) {
// we've been scrolled programmatically, probably to go to
// a specific section, so keep the toolbar shown.
animMargin = 0;
} else {
int minMargin = -quickReturnView.getHeight();
int newMargin = (int) quickReturnView.getTranslationY() - scrollDelta;
animMargin = Math.max(minMargin, newMargin);
}
}
quickReturnView.setTranslationY(animMargin);
}
@Override
public void onUpOrCancelMotionEvent() {
int transY = (int) quickReturnView.getTranslationY();
int height = quickReturnView.getHeight();
if (transY != 0 && transY > -height) {
if (transY > -height / 2) {
// Fully display it
ViewAnimations.ensureTranslationY(quickReturnView, 0);
} else {
// Fully hide it
ViewAnimations.ensureTranslationY(quickReturnView, -height);
}
}
}
@Override
public void onDownMotionEvent() {
// Don't do anything for now
}
private void initToolbarGradient(LayerDrawable toolbarBackgroundLayers) {
@ColorInt int baseColor = getColor(R.color.lead_gradient_start);
toolbarGradient = GradientUtil.getCubicGradient(baseColor, Gravity.TOP);
toolbarBackgroundLayers.setDrawableByLayerId(R.id.toolbar_background_gradient, toolbarGradient);
}
/** @return Alpha value between 0 and 0xff. */
private int calculateScrollOpacity(int scrollY) {
final int fadeHeight = 256;
int opacity = FULL_OPACITY;
if (fadeEnabled && !forceNoFade) {
opacity = scrollY * FULL_OPACITY / (int) (fadeHeight * DimenUtil.getDensityScalar());
}
opacity = Math.max(0, opacity);
opacity = Math.min(FULL_OPACITY, opacity);
return opacity;
}
@ColorInt private int getColor(@ColorRes int id) {
return getResources().getColor(id);
}
@NonNull private Resources getResources() {
return context.getResources();
}
}
|
carloshwa/apps-android-wikipedia
|
app/src/main/java/org/wikipedia/search/SearchBarHideHandler.java
|
Java
|
apache-2.0
| 6,798
|
[
30522,
7427,
8917,
1012,
16948,
1012,
3945,
1025,
12324,
11924,
1012,
10439,
1012,
4023,
1025,
12324,
11924,
1012,
4180,
1012,
6123,
1025,
12324,
11924,
1012,
4180,
1012,
24501,
1012,
4219,
1025,
12324,
11924,
1012,
8389,
1012,
4009,
3085,
1012,
4009,
3085,
1025,
12324,
11924,
1012,
8389,
1012,
4009,
3085,
1012,
6741,
7265,
4213,
3468,
1025,
12324,
11924,
1012,
2490,
1012,
5754,
17287,
3508,
1012,
3609,
18447,
1025,
12324,
11924,
1012,
2490,
1012,
5754,
30524,
3085,
1025,
12324,
11924,
1012,
3193,
1012,
8992,
1025,
12324,
11924,
1012,
3193,
1012,
3193,
1025,
12324,
8917,
1012,
16948,
1012,
1054,
1025,
12324,
8917,
1012,
16948,
1012,
3193,
7088,
28649,
2015,
1025,
12324,
8917,
1012,
16948,
1012,
21183,
4014,
1012,
27211,
24072,
4014,
1025,
12324,
8917,
1012,
16948,
1012,
21183,
4014,
1012,
17978,
21823,
2140,
1025,
12324,
8917,
1012,
16948,
1012,
5328,
1012,
27885,
8043,
12423,
8545,
2497,
8584,
1025,
2270,
2465,
3945,
8237,
26100,
11774,
3917,
22164,
27885,
8043,
12423,
8545,
2497,
8584,
1012,
2006,
11020,
28402,
22305,
29282,
6528,
2121,
1010,
27885,
8043,
12423,
8545,
2497,
8584,
1012,
2006,
6279,
2953,
9336,
29109,
18938,
3258,
18697,
3372,
9863,
24454,
1010,
27885,
8043,
12423,
8545,
2497,
8584,
1012,
2006,
7698,
18938,
3258,
18697,
3372,
9863,
24454,
1063,
2797,
10763,
2345,
20014,
2440,
1035,
6728,
6305,
3012,
1027,
20637,
1025,
1030,
2512,
11231,
3363,
2797,
2345,
3193,
4248,
13465,
14287,
8584,
1025,
1030,
2512,
11231,
3363,
2797,
2345,
6123,
6123,
1025,
1030,
19701,
3085,
2797,
27885,
8043,
12423,
8545,
2497,
8584,
4773,
8584,
1025,
2797,
22017,
20898,
12985,
8189,
23242,
1025,
2797,
22017,
20898,
2486,
3630,
7011,
3207,
1025,
1030,
2512,
11231,
3363,
2797,
2345,
4009,
3085,
6994,
8237,
5963,
16365,
1025,
2797,
4009,
3085,
6994,
8237,
16307,
11638,
1025,
1030,
2512,
11231,
3363,
2797,
2345,
4009,
3085,
6994,
8237,
7377,
3527,
2860,
1025,
1030,
2512,
11231,
3363,
2797,
2345,
4009,
3085,
3570,
8237,
1025,
2270,
3945,
8237,
26100,
11774,
3917,
1006,
1030,
2512,
11231,
3363,
4023,
4023,
1010,
1030,
2512,
11231,
3363,
3193,
4248,
13465,
14287,
8584,
1007,
1063,
6123,
1027,
4023,
1025,
2023,
1012,
4248,
13465,
14287,
8584,
1027,
4248,
13465,
14287,
8584,
1025,
6741,
7265,
4213,
3468,
6994,
8237,
5963,
16365,
24314,
2015,
1027,
1006,
6741,
7265,
4213,
3468,
1007,
4248,
13465,
14287,
8584,
1012,
2424,
8584,
3762,
3593,
1006,
1054,
1012,
8909,
1012,
2364,
1035,
6994,
8237,
1035,
4281,
1035,
11661,
1007,
1012,
2131,
5963,
16365,
1006,
1007,
1025,
6994,
8237,
5963,
16365,
1027,
6994,
8237,
5963,
16365,
24314,
2015,
1012,
2424,
7265,
4213,
3468,
3762,
24314,
3593,
1006,
1054,
1012,
8909,
1012,
6994,
8237,
1035,
4281,
1035,
5024,
1007,
1012,
14163,
12259,
1006,
1007,
1025,
6994,
8237,
7377,
3527,
2860,
1027,
4248,
13465,
14287,
8584,
1012,
2424,
8584,
3762,
3593,
1006,
1054,
1012,
8909,
1012,
2364,
1035,
6994,
8237,
1035,
5192,
1007,
1012,
2131,
5963,
16365,
1006,
1007,
1012,
14163,
12259,
30523,
17287,
3508,
1012,
3609,
6072,
1025,
12324,
11924,
1012,
2490,
1012,
5754,
17287,
3508,
1012,
2512,
11231,
3363,
1025,
12324,
11924,
1012,
2490,
1012,
5754,
17287,
3508,
1012,
19701,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
17287,
3508,
1012,
3609,
6072,
1025,
12324,
11924,
1012,
2490,
1012,
5754,
17287,
3508,
1012,
2512,
11231,
3363,
1025,
12324,
11924,
1012,
2490,
1012,
5754,
17287,
3508,
1012,
19701,
30526
] |
<?php
namespace krFrame\Src\initTemplate;
use \krFrame\Src\Error\Error;
class SetCustomTaxonomies
{
private $taxonomies;
private $taxonomy;
private $name;
public function __construct($array)
{
if (!is_array($array)) {
return false;
}
$this->taxonomies = $array;
$this->init();
}
private function init()
{
foreach ($this->taxonomies as $this->name => $this->taxonomy) {
if ($this->validate()) {
register_taxonomy($this->name, $this->taxonomy['post_type'], array(
'hierarchical' => $this->taxonomy['hierarchical'],
'label' => __($this->taxonomy['label'], 'krframe'),
'query_var' => $this->taxonomy['query_var'],
'rewrite' => array(
'slug' => __($this->taxonomy['rewrite']['slug'], 'krframe'),
'with_front' => $this->taxonomy['rewrite']['with_front']
)
)
);
}
}
}
private function validate()
{
if (!isset($this->taxonomy['post_type']) ||
!isset($this->taxonomy['hierarchical']) ||
!isset($this->taxonomy['label']) ||
!isset($this->taxonomy['hierarchical']) ||
!isset($this->taxonomy['query_var']) ||
!isset($this->taxonomy['rewrite']) ||
!isset($this->taxonomy['rewrite']['slug']) ||
!isset($this->taxonomy['rewrite']['with_front'])
) {
$error = new Error();
$error->render(16);
return false;
}
return true;
}
}
|
dawidryba/krframe_theme
|
krFrame/src/initTemplate/SetCustomTax.php
|
PHP
|
gpl-3.0
| 1,683
|
[
30522,
1026,
1029,
25718,
3415,
15327,
1047,
12881,
6444,
2063,
1032,
5034,
2278,
1032,
1999,
27100,
8737,
13806,
1025,
2224,
1032,
1047,
12881,
6444,
2063,
1032,
5034,
2278,
1032,
7561,
1032,
7561,
1025,
2465,
2275,
7874,
20389,
2696,
22500,
20936,
2229,
1063,
2797,
1002,
28521,
20936,
2229,
1025,
2797,
1002,
25274,
1025,
2797,
1002,
2171,
1025,
2270,
3853,
1035,
1035,
9570,
1006,
1002,
9140,
1007,
1063,
2065,
1006,
999,
2003,
1035,
9140,
1006,
1002,
9140,
1007,
1007,
1063,
2709,
6270,
1025,
1065,
1002,
2023,
1011,
1028,
28521,
20936,
2229,
1027,
1002,
9140,
1025,
1002,
2023,
1011,
1028,
1999,
4183,
1006,
1007,
1025,
1065,
2797,
3853,
1999,
4183,
1006,
1007,
1063,
18921,
6776,
1006,
1002,
2023,
1011,
1028,
28521,
20936,
2229,
2004,
1002,
2023,
1011,
1028,
2171,
1027,
1028,
1002,
2023,
1011,
1028,
25274,
1007,
1063,
2065,
1006,
1002,
2023,
1011,
1028,
9398,
3686,
1006,
1007,
1007,
1063,
4236,
1035,
25274,
1006,
1002,
2023,
1011,
1028,
2171,
1010,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
30524,
1010,
1005,
3830,
1005,
1027,
1028,
1035,
1035,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
3830,
1005,
1033,
1010,
1005,
1047,
12881,
6444,
2063,
1005,
1007,
1010,
1005,
23032,
1035,
13075,
1005,
1027,
1028,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
23032,
1035,
13075,
1005,
1033,
1010,
1005,
2128,
26373,
1005,
1027,
1028,
9140,
1006,
1005,
23667,
1005,
1027,
1028,
1035,
1035,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
2128,
26373,
1005,
1033,
1031,
1005,
23667,
1005,
1033,
1010,
1005,
1047,
12881,
6444,
2063,
1005,
1007,
1010,
1005,
2007,
1035,
2392,
1005,
1027,
1028,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
2128,
26373,
1005,
1033,
1031,
1005,
2007,
1035,
2392,
1005,
1033,
1007,
1007,
1007,
1025,
1065,
1065,
1065,
2797,
3853,
9398,
3686,
1006,
1007,
1063,
2065,
1006,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
2695,
1035,
2828,
1005,
1033,
1007,
1064,
1064,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
25835,
1005,
1033,
1007,
1064,
1064,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
3830,
1005,
1033,
1007,
1064,
1064,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
25835,
1005,
1033,
1007,
1064,
1064,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
23032,
1035,
13075,
1005,
1033,
1007,
1064,
1064,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
2128,
26373,
1005,
1033,
1007,
1064,
1064,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
2128,
26373,
1005,
1033,
1031,
1005,
23667,
1005,
1033,
1007,
1064,
1064,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
2128,
26373,
1005,
1033,
1031,
1005,
2007,
1035,
2392,
1005,
1033,
1007,
1007,
1063,
1002,
7561,
1027,
2047,
7561,
1006,
1007,
1025,
1002,
7561,
1011,
1028,
17552,
1006,
2385,
1007,
1025,
2709,
6270,
1025,
1065,
2709,
2995,
1025,
1065,
1065,
102,
30523,
2695,
1035,
2828,
1005,
1033,
1010,
9140,
1006,
1005,
25835,
1005,
1027,
1028,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
25835,
1005,
1033,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2695,
1035,
2828,
1005,
1033,
1010,
9140,
1006,
1005,
25835,
1005,
1027,
1028,
1002,
2023,
1011,
1028,
25274,
1031,
1005,
25835,
1005,
1033,
30526
] |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34003
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace XmlFileExplorer.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool DisplayHiddenFolders {
get {
return ((bool)(this["DisplayHiddenFolders"]));
}
set {
this["DisplayHiddenFolders"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string LastViewedDirectory {
get {
return ((string)(this["LastViewedDirectory"]));
}
set {
this["LastViewedDirectory"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Black")]
public global::System.Drawing.Color ValidXmlForegroundColor {
get {
return ((global::System.Drawing.Color)(this["ValidXmlForegroundColor"]));
}
set {
this["ValidXmlForegroundColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Black")]
public global::System.Drawing.Color InvalidXmlForegroundColor {
get {
return ((global::System.Drawing.Color)(this["InvalidXmlForegroundColor"]));
}
set {
this["InvalidXmlForegroundColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("PaleGreen")]
public global::System.Drawing.Color ValidXmlBackgroundColor {
get {
return ((global::System.Drawing.Color)(this["ValidXmlBackgroundColor"]));
}
set {
this["ValidXmlBackgroundColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("LightPink")]
public global::System.Drawing.Color InvalidXmlBackgroundColor {
get {
return ((global::System.Drawing.Color)(this["InvalidXmlBackgroundColor"]));
}
set {
this["InvalidXmlBackgroundColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10")]
public int ErrorsPanelPercentage {
get {
return ((int)(this["ErrorsPanelPercentage"]));
}
set {
this["ErrorsPanelPercentage"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool IsMaximised {
get {
return ((bool)(this["IsMaximised"]));
}
set {
this["IsMaximised"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ShowFileExtension {
get {
return ((bool)(this["ShowFileExtension"]));
}
set {
this["ShowFileExtension"] = value;
}
}
}
}
|
Satal/XmlFileExplorer
|
trunk/XmlFileExplorer.App/Properties/Settings.Designer.cs
|
C#
|
mit
| 5,380
|
[
30522,
1013,
1013,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1013,
1013,
1026,
8285,
1011,
7013,
1028,
1013,
1013,
2023,
3642,
2001,
7013,
2011,
1037,
6994,
1012,
1013,
1013,
2448,
7292,
2544,
1024,
1018,
1012,
1014,
1012,
19988,
16147,
1012,
16029,
2692,
2509,
1013,
1013,
1013,
1013,
3431,
2000,
2023,
5371,
2089,
3426,
16542,
5248,
1998,
2097,
2022,
2439,
2065,
1013,
1013,
1996,
3642,
2003,
19723,
24454,
4383,
1012,
1013,
1013,
1026,
1013,
8285,
1011,
7013,
1028,
1013,
1013,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
3415,
15327,
20950,
8873,
10559,
2595,
24759,
5686,
2099,
1012,
5144,
1063,
1031,
3795,
1024,
1024,
2291,
1012,
2448,
7292,
1012,
21624,
8043,
7903,
2229,
1012,
21624,
6914,
16848,
19321,
3089,
8569,
2618,
1006,
1007,
1033,
1031,
3795,
1024,
1024,
2291,
1012,
22402,
5358,
1012,
21624,
1012,
7013,
16044,
19321,
3089,
8569,
2618,
1006,
1000,
7513,
1012,
26749,
8525,
20617,
1012,
10195,
1012,
10906,
6155,
23773,
2121,
1012,
10906,
7741,
2571,
8873,
23115,
24454,
8844,
1000,
1010,
1000,
2340,
1012,
1014,
1012,
1014,
1012,
1014,
1000,
1007,
1033,
4722,
10203,
7704,
2465,
10906,
1024,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
5097,
18319,
3070,
19022,
11022,
1063,
2797,
10763,
10906,
12398,
7076,
26897,
1027,
1006,
1006,
10906,
1007,
1006,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
5097,
18319,
3070,
19022,
11022,
1012,
25549,
1006,
2047,
10906,
1006,
1007,
1007,
1007,
1007,
1025,
2270,
10763,
10906,
12398,
1063,
2131,
1063,
2709,
12398,
7076,
26897,
1025,
1065,
1065,
1031,
3795,
1024,
1024,
30524,
12398,
21678,
2075,
10175,
5657,
19321,
3089,
8569,
2618,
1006,
1000,
6270,
1000,
1007,
1033,
2270,
22017,
2140,
4653,
27511,
4181,
10371,
2545,
1063,
2131,
1063,
2709,
1006,
1006,
22017,
2140,
1007,
1006,
2023,
1031,
1000,
4653,
27511,
4181,
10371,
2545,
1000,
1033,
1007,
1007,
1025,
1065,
2275,
1063,
2023,
1031,
1000,
4653,
27511,
4181,
10371,
2545,
1000,
1033,
1027,
3643,
1025,
1065,
1065,
1031,
30523,
2291,
1012,
9563,
1012,
5198,
16186,
5104,
18319,
13807,
4779,
3089,
8569,
2618,
1006,
1007,
1033,
1031,
3795,
1024,
1024,
2291,
1012,
16474,
2015,
1012,
2139,
8569,
13327,
8540,
20330,
16044,
19321,
3089,
8569,
2618,
1006,
1007,
1033,
1031,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2291,
1012,
9563,
1012,
5198,
16186,
5104,
18319,
13807,
4779,
3089,
8569,
2618,
1006,
1007,
1033,
1031,
3795,
1024,
1024,
2291,
1012,
16474,
2015,
1012,
2139,
8569,
13327,
8540,
20330,
16044,
19321,
3089,
8569,
2618,
1006,
1007,
1033,
1031,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
30526
] |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Modules.InstantAction.Views
{
/// <summary>
/// InstantActionPage.xaml の相互作用ロジック
/// </summary>
public partial class InstantActionPage : UserControl
{
public InstantActionPage()
{
InitializeComponent();
}
}
public class InstantActionStepDataTemplateSelecter : DataTemplateSelector
{
public DataTemplate EmptyTemplate { get; set; }
public DataTemplate FileSelectTemplate { get; set; }
public DataTemplate ActionSelectTemplate { get; set; }
public DataTemplate FinishingTemplate { get; set; }
public override DataTemplate SelectTemplate(object item, DependencyObject container)
{
if (item == null)
{
return EmptyTemplate;
}
else if (item is ViewModels.FileSelectInstantActionStepViewModel)
{
return FileSelectTemplate;
}
else if (item is ViewModels.ActionsSelectInstantActionStepViewModel)
{
return ActionSelectTemplate;
}
else if (item is ViewModels.FinishingInstantActionStepViewModel)
{
return FinishingTemplate;
}
return base.SelectTemplate(item, container);
}
}
}
|
tor4kichi/ReactiveFolder
|
Module/InstantAction/Views/InstantActionPage.xaml.cs
|
C#
|
gpl-3.0
| 1,475
|
[
30522,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
11409,
4160,
1025,
2478,
2291,
1012,
3793,
1025,
2478,
2291,
1012,
11689,
2075,
1012,
8518,
1025,
2478,
2291,
1012,
3645,
1025,
2478,
2291,
1012,
3645,
1012,
7711,
1025,
2478,
2291,
1012,
3645,
1012,
2951,
1025,
2478,
2291,
1012,
3645,
1012,
5491,
1025,
2478,
2291,
1012,
3645,
1012,
7953,
1025,
2478,
2291,
1012,
3645,
1012,
2865,
1025,
2478,
2291,
1012,
3645,
1012,
2865,
1012,
12126,
1025,
2478,
2291,
1012,
3645,
1012,
9163,
1025,
2478,
2291,
1012,
3645,
1012,
10466,
1025,
3415,
15327,
14184,
1012,
7107,
18908,
3258,
1012,
5328,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
7107,
18908,
3258,
13704,
1012,
1060,
3286,
2140,
1671,
1919,
100,
100,
100,
1735,
30232,
30237,
30228,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
7704,
2465,
7107,
18908,
3258,
13704,
1024,
5310,
8663,
13181,
2140,
1063,
2270,
7107,
18908,
3258,
13704,
1006,
1007,
1063,
3988,
4697,
9006,
29513,
3372,
1006,
1007,
1025,
1065,
1065,
2270,
2465,
7107,
18908,
8496,
2618,
17299,
6790,
18532,
15725,
11246,
22471,
2121,
1024,
2951,
18532,
15725,
11246,
22471,
2953,
1063,
2270,
2951,
18532,
15725,
4064,
18532,
15725,
1063,
2131,
1025,
2275,
1025,
1065,
2270,
30524,
15725,
7276,
18532,
15725,
1006,
4874,
8875,
1010,
24394,
16429,
20614,
11661,
1007,
1063,
2065,
1006,
8875,
1027,
1027,
19701,
1007,
1063,
2709,
4064,
18532,
15725,
1025,
1065,
2842,
2065,
1006,
8875,
2003,
3193,
5302,
9247,
2015,
1012,
6764,
12260,
6593,
7076,
5794,
2696,
22014,
2618,
2361,
8584,
5302,
9247,
1007,
1063,
2709,
6764,
12260,
6593,
18532,
15725,
1025,
1065,
2842,
2065,
1006,
8875,
2003,
3193,
5302,
9247,
2015,
1012,
4506,
11246,
22471,
7076,
5794,
2696,
22014,
2618,
2361,
8584,
5302,
9247,
1007,
1063,
2709,
4506,
12260,
6593,
18532,
15725,
1025,
1065,
2842,
2065,
1006,
8875,
2003,
3193,
5302,
9247,
2015,
1012,
5131,
7076,
5794,
2696,
22014,
2618,
2361,
8584,
5302,
9247,
1007,
1063,
2709,
5131,
18532,
15725,
1025,
1065,
2709,
2918,
1012,
7276,
18532,
15725,
1006,
8875,
1010,
11661,
1007,
1025,
1065,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
2951,
18532,
15725,
6764,
12260,
6593,
18532,
15725,
1063,
2131,
1025,
2275,
1025,
1065,
2270,
2951,
18532,
15725,
4506,
12260,
6593,
18532,
15725,
1063,
2131,
1025,
2275,
1025,
1065,
2270,
2951,
18532,
15725,
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,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2951,
18532,
15725,
6764,
12260,
6593,
18532,
15725,
1063,
2131,
1025,
2275,
1025,
1065,
2270,
2951,
18532,
15725,
4506,
12260,
6593,
18532,
15725,
1063,
2131,
1025,
2275,
1025,
1065,
2270,
2951,
18532,
15725,
5131,
18532,
15725,
1063,
2131,
1025,
2275,
1025,
1065,
2270,
2058,
15637,
2951,
18532,
30526
] |
#include <rx/iterate.hpp>
#include <rx/sum.hpp>
#include <rx/take.hpp>
#include <rx/select.hpp>
#include <rx/where.hpp>
#include <rx/concurrency.hpp>
#include <boost/lexical_cast.hpp>
#include <iostream>
template<class T>
class ConsoleWriter
{
public:
typedef T value_type;
void onnext(T const& value)
{
std::cout << value << std::endl;
}
void onerror(rx::error_type const& error)
{
std::cerr << error << std::endl;
}
void oncompleted()
{
std::cout << "completed" << std::endl;
}
};
class write_to_console
{
public:
template<class Observable>
struct observable_type
{
typedef typename Observable::disposable_type type;
};
template<class Observable>
typename Observable::disposable_type operator()(Observable observable) const
{
return observable.subscribe(ConsoleWriter<typename Observable::value_type>());
}
};
void run()
{
// auto cancel = rx::Disposable();
// cancel.dispose();
// cancel.dispose();
// cancel.dispose();
rx::EventLoopScheduler scheduler;
// auto numbers
// = rx::iterate(0, 15, scheduler)
// | rx::take(5)
// | rx::sum()
// ;
// std::cout << sizeof(rx::iterate(0, 15, scheduler)) << std::endl;
// std::cout << sizeof(numbers) << std::endl;
// auto c1 = numbers | write_to_console();
// auto c2 = numbers | write_to_console();
// auto c3 = numbers | write_to_console();
// auto c4 = numbers | write_to_console();
// auto c5 = numbers | write_to_console();
// auto cn = c1;
// cn.dispose();
// c1.dispose();
// c1.dispose();
// c1.dispose();
// c2.dispose();
// c3.dispose();
// c4.dispose();
struct ToString
{
typedef std::string result_type;
template<class T>
result_type operator()(T value) const
{
return boost::lexical_cast<std::string>(value) + " **";
}
};
struct Odd
{
template<class T>
bool operator()(T const& value) const
{
throw std::runtime_error("custom error");
return 0 == (value % 2);
}
};
auto numbers2
= rx::iterate(0, 15, scheduler)
| rx::where(Odd())
| rx::take(10)
| rx::select(ToString());
numbers2 | write_to_console();
auto x = numbers2;
x | rx::take(3) | write_to_console();
scheduler.pumpLoop();
}
int main()
{
try
{
run();
}
catch(std::exception const& error)
{
std::cerr << error.what() << std::endl;
}
return 0;
}
|
andreo/rxcpp
|
main.cpp
|
C++
|
lgpl-3.0
| 2,430
|
[
30522,
1001,
2421,
1026,
1054,
2595,
1013,
2009,
22139,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
1054,
2595,
1013,
7680,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
1054,
2595,
1013,
2202,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
1054,
2595,
1013,
7276,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
1054,
2595,
1013,
2073,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
1054,
2595,
1013,
24154,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
12992,
1013,
16105,
9289,
1035,
3459,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
16380,
25379,
1028,
23561,
1026,
2465,
1056,
1028,
2465,
10122,
15994,
1063,
2270,
1024,
21189,
12879,
1056,
3643,
1035,
2828,
1025,
11675,
2006,
2638,
18413,
1006,
1056,
9530,
3367,
1004,
3643,
1007,
1063,
2358,
2094,
1024,
1024,
2522,
4904,
1026,
1026,
3643,
1026,
1026,
2358,
2094,
1024,
1024,
2203,
2140,
1025,
1065,
11675,
2028,
18933,
2099,
1006,
1054,
2595,
1024,
1024,
7561,
1035,
2828,
9530,
3367,
1004,
7561,
1007,
1063,
2358,
2094,
1024,
1024,
8292,
12171,
1026,
1026,
7561,
1026,
1026,
2358,
2094,
1024,
1024,
2203,
2140,
1025,
1065,
11675,
2006,
9006,
10814,
3064,
1006,
1007,
1063,
2358,
2094,
1024,
1024,
2522,
4904,
1026,
1026,
1000,
2949,
1000,
1026,
1026,
2358,
2094,
1024,
1024,
2203,
2140,
1025,
1065,
1065,
1025,
2465,
4339,
1035,
2000,
1035,
10122,
1063,
2270,
1024,
23561,
1026,
2465,
27885,
8043,
12423,
1028,
2358,
6820,
6593,
27885,
8043,
12423,
1035,
2828,
1063,
21189,
12879,
2828,
18442,
27885,
8043,
12423,
1024,
1024,
4487,
13102,
8820,
3468,
1035,
2828,
2828,
1025,
1065,
1025,
23561,
1026,
2465,
27885,
8043,
12423,
1028,
2828,
18442,
27885,
8043,
12423,
1024,
1024,
4487,
13102,
8820,
3468,
1035,
2828,
6872,
1006,
1007,
1006,
27885,
8043,
12423,
27885,
8043,
12423,
1007,
9530,
3367,
1063,
2709,
27885,
8043,
12423,
1012,
4942,
29234,
1006,
10122,
15994,
1026,
2828,
18442,
27885,
8043,
12423,
1024,
1024,
3643,
1035,
2828,
1028,
1006,
1007,
1007,
1025,
1065,
1065,
1025,
11675,
2448,
1006,
1007,
1063,
1013,
1013,
8285,
17542,
1027,
1054,
2595,
1024,
1024,
4487,
13102,
8820,
3468,
1006,
1007,
1025,
1013,
1013,
17542,
1012,
27764,
1006,
1007,
1025,
1013,
1013,
17542,
1012,
27764,
1006,
1007,
1025,
1013,
1013,
17542,
1012,
27764,
1006,
1007,
1025,
1054,
2595,
1024,
1024,
2724,
4135,
11923,
7690,
9307,
2099,
6134,
2099,
1025,
1013,
30524,
2595,
1024,
1024,
7680,
1006,
1007,
1013,
1013,
1025,
1013,
1013,
2358,
2094,
1024,
1024,
2522,
4904,
1026,
1026,
2946,
11253,
1006,
1054,
2595,
1024,
1024,
2009,
22139,
1006,
1014,
1010,
2321,
1010,
6134,
2099,
1007,
1007,
1026,
1026,
2358,
2094,
1024,
1024,
2203,
2140,
1025,
1013,
1013,
2358,
2094,
1024,
1024,
2522,
4904,
1026,
1026,
2946,
11253,
1006,
3616,
1007,
1026,
1026,
2358,
2094,
1024,
1024,
2203,
2140,
1025,
1013,
1013,
8285,
27723,
1027,
3616,
1064,
4339,
1035,
2000,
1035,
10122,
1006,
1007,
1025,
1013,
1013,
8285,
29248,
1027,
3616,
1064,
4339,
1035,
30523,
1013,
8285,
3616,
1013,
1013,
1027,
1054,
2595,
1024,
1024,
2009,
22139,
1006,
1014,
1010,
2321,
1010,
6134,
2099,
1007,
1013,
1013,
1064,
1054,
2595,
1024,
1024,
2202,
1006,
1019,
1007,
1013,
1013,
1064,
1054,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1013,
8285,
3616,
1013,
1013,
1027,
1054,
2595,
1024,
1024,
2009,
22139,
1006,
1014,
1010,
2321,
1010,
6134,
2099,
1007,
1013,
1013,
1064,
1054,
2595,
1024,
1024,
2202,
1006,
1019,
1007,
1013,
1013,
1064,
1054,
30526
] |
description("This tests from-by-animations adding to previous underlying values");
embedSVGTestCase("resources/svglength-additive-from-by-1.svg");
// Setup animation test
function sample1() {
shouldBeCloseEnough("rect.width.animVal.value", "10");
shouldBe("rect.width.baseVal.value", "10");
}
function sample2() {
shouldBeCloseEnough("rect.width.animVal.value", "30");
shouldBe("rect.width.baseVal.value", "10");
}
function sample3() {
shouldBeCloseEnough("rect.width.animVal.value", "50");
shouldBe("rect.width.baseVal.value", "10");
}
function sample4() {
shouldBeCloseEnough("rect.width.animVal.value", "75");
shouldBe("rect.width.baseVal.value", "10");
}
function sample5() {
shouldBeCloseEnough("rect.width.animVal.value", "100");
shouldBe("rect.width.baseVal.value", "10");
}
function executeTest() {
rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0];
const expectedValues = [
// [animationId, time, sampleCallback]
["an1", 0.0, sample1],
["an1", 2.0, sample2],
["an1", 4.0, sample3],
["an1", 7.0, sample4],
["an1", 9.0, sample5],
["an1", 60.0, sample5]
];
runAnimationTest(expectedValues);
}
window.animationStartsImmediately = true;
var successfullyParsed = true;
|
js0701/chromium-crosswalk
|
third_party/WebKit/LayoutTests/svg/animations/script-tests/svglength-additive-from-by-1.js
|
JavaScript
|
bsd-3-clause
| 1,316
|
[
30522,
6412,
1006,
1000,
2023,
5852,
2013,
1011,
2011,
1011,
7284,
2015,
5815,
2000,
3025,
10318,
5300,
1000,
1007,
1025,
7861,
8270,
2015,
2615,
13512,
4355,
18382,
1006,
1000,
4219,
1013,
17917,
9354,
3070,
2705,
1011,
29167,
1011,
2013,
1011,
2011,
1011,
1015,
1012,
17917,
2290,
1000,
1007,
1025,
1013,
1013,
16437,
7284,
3231,
3853,
7099,
2487,
1006,
1007,
1063,
2323,
4783,
20464,
9232,
16515,
8953,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2019,
5714,
10175,
1012,
3643,
1000,
1010,
1000,
2184,
1000,
1007,
1025,
2323,
4783,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2918,
10175,
1012,
3643,
1000,
1010,
1000,
2184,
1000,
1007,
1025,
1065,
3853,
7099,
30524,
1000,
28667,
2102,
1012,
9381,
1012,
2019,
5714,
10175,
1012,
3643,
1000,
1010,
1000,
2382,
1000,
1007,
1025,
2323,
4783,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2918,
10175,
1012,
3643,
1000,
1010,
1000,
2184,
1000,
1007,
1025,
1065,
3853,
7099,
2509,
1006,
1007,
1063,
2323,
4783,
20464,
9232,
16515,
8953,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2019,
5714,
10175,
1012,
3643,
1000,
1010,
1000,
2753,
1000,
1007,
1025,
2323,
4783,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2918,
10175,
1012,
3643,
1000,
1010,
1000,
2184,
1000,
1007,
1025,
1065,
3853,
7099,
2549,
1006,
1007,
1063,
2323,
4783,
20464,
9232,
16515,
8953,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2019,
5714,
10175,
1012,
3643,
1000,
1010,
1000,
4293,
1000,
1007,
1025,
2323,
4783,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2918,
10175,
1012,
3643,
1000,
1010,
1000,
2184,
1000,
1007,
1025,
1065,
3853,
7099,
2629,
1006,
1007,
1063,
2323,
4783,
20464,
9232,
16515,
8953,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2019,
5714,
10175,
1012,
3643,
1000,
1010,
1000,
2531,
1000,
1007,
1025,
2323,
4783,
1006,
1000,
28667,
2102,
1012,
9381,
1012,
2918,
10175,
1012,
3643,
1000,
1010,
1000,
2184,
1000,
1007,
1025,
1065,
3853,
15389,
22199,
1006,
1007,
1063,
28667,
2102,
1027,
6147,
2615,
12439,
13665,
1012,
3954,
3527,
24894,
4765,
1012,
2131,
12260,
8163,
3762,
15900,
18442,
1006,
1000,
28667,
2102,
1000,
1007,
1031,
1014,
1033,
1025,
9530,
3367,
3517,
10175,
15808,
1027,
1031,
1013,
1013,
1031,
7284,
3593,
1010,
2051,
1010,
7099,
9289,
20850,
8684,
1033,
1031,
1000,
2019,
2487,
1000,
1010,
1014,
1012,
1014,
1010,
7099,
2487,
1033,
1010,
1031,
1000,
2019,
2487,
1000,
1010,
1016,
1012,
1014,
1010,
7099,
2475,
1033,
1010,
1031,
1000,
2019,
2487,
1000,
1010,
1018,
1012,
1014,
1010,
7099,
2509,
1033,
1010,
1031,
1000,
2019,
2487,
1000,
1010,
1021,
1012,
1014,
1010,
7099,
2549,
1033,
1010,
1031,
1000,
2019,
2487,
1000,
1010,
1023,
1012,
1014,
1010,
7099,
2629,
1033,
1010,
1031,
1000,
2019,
2487,
1000,
1010,
3438,
1012,
1014,
1010,
7099,
2629,
1033,
1033,
1025,
2448,
7088,
28649,
22199,
1006,
3517,
10175,
15808,
1007,
1025,
1065,
3332,
1012,
7284,
14117,
3215,
5714,
16969,
9834,
2100,
1027,
2995,
1025,
13075,
5147,
19362,
6924,
1027,
2995,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
2475,
1006,
1007,
1063,
2323,
4783,
20464,
9232,
16515,
8953,
1006,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2475,
1006,
1007,
1063,
2323,
4783,
20464,
9232,
16515,
8953,
1006,
30526
] |
<div class="cbp-loadMore-block1">
<li class="web-design cbp-item">
<a href="assets/ajax/project10.html" class="cbp-caption cbp-singlePageInline" data-title="Flat Roman Typeface Ui<br>by Cosmin Capitanu">
<div class="cbp-caption-defaultWrap">
<img src="assets/img/portfolio/9.jpg" alt="" width="100%">
</div>
<div class="cbp-caption-activeWrap">
<div class="cbp-l-caption-alignLeft">
<div class="cbp-l-caption-body">
<div class="cbp-l-caption-title">Flat Roman Typeface Ui</div>
<div class="cbp-l-caption-desc">by Cosmin Capitanu</div>
</div>
</div>
</div>
</a>
</li>
<li class="motion web-design cbp-item">
<a href="assets/ajax/project11.html" class="cbp-caption cbp-singlePageInline" data-title="Music Player<br>by Cosmin Capitanu">
<div class="cbp-caption-defaultWrap">
<img src="assets/img/portfolio/10.jpg" alt="" width="100%">
</div>
<div class="cbp-caption-activeWrap">
<div class="cbp-l-caption-alignLeft">
<div class="cbp-l-caption-body">
<div class="cbp-l-caption-title">Music Player</div>
<div class="cbp-l-caption-desc">by Cosmin Capitanu</div>
</div>
</div>
</div>
</a>
</li>
</div>
<div class="cbp-loadMore-block2">
<li class="print cbp-item">
<a href="assets/ajax/project12.html" class="cbp-caption cbp-singlePageInline" data-title="Speed Detector<br>by Cosmin Capitanu">
<div class="cbp-caption-defaultWrap">
<img src="assets/img/portfolio/13.jpg" alt="" width="100%">
</div>
<div class="cbp-caption-activeWrap">
<div class="cbp-l-caption-alignLeft">
<div class="cbp-l-caption-body">
<div class="cbp-l-caption-title">Speed Detector</div>
<div class="cbp-l-caption-desc">by Cosmin Capitanu</div>
</div>
</div>
</div>
</a>
</li>
<li class="motion web-design cbp-item">
<a href="assets/ajax/project13.html" class="cbp-caption cbp-singlePageInline" data-title="Sonor Website<br>by Cosmin Capitanu">
<div class="cbp-caption-defaultWrap">
<img src="assets/img/portfolio/12.jpg" alt="" width="100%">
</div>
<div class="cbp-caption-activeWrap">
<div class="cbp-l-caption-alignLeft">
<div class="cbp-l-caption-body">
<div class="cbp-l-caption-title">Sonor Website</div>
<div class="cbp-l-caption-desc">by Cosmin Capitanu</div>
</div>
</div>
</div>
</a>
</li>
</div>
|
goujonpa/chateaumagondeau
|
website/static/One-Page/assets/ajax/loadMore.html
|
HTML
|
mit
| 3,319
|
[
30522,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
7170,
5974,
1011,
3796,
2487,
1000,
1028,
1026,
5622,
2465,
1027,
1000,
4773,
1011,
2640,
17324,
2361,
1011,
8875,
1000,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
7045,
1013,
18176,
1013,
2622,
10790,
1012,
16129,
1000,
2465,
1027,
1000,
17324,
2361,
1011,
14408,
3258,
17324,
2361,
1011,
2309,
13704,
2378,
4179,
1000,
2951,
1011,
2516,
1027,
1000,
4257,
3142,
2828,
12172,
21318,
1026,
7987,
1028,
2011,
2522,
6491,
2378,
8353,
11231,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
14408,
3258,
1011,
12398,
13088,
9331,
1000,
1028,
1026,
10047,
2290,
5034,
2278,
1027,
1000,
7045,
1013,
10047,
2290,
1013,
11103,
1013,
1023,
1012,
16545,
2290,
1000,
12456,
1027,
1000,
1000,
9381,
1027,
1000,
2531,
1003,
1000,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
14408,
3258,
1011,
3161,
13088,
9331,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
30524,
12172,
21318,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
4078,
2278,
1000,
1028,
2011,
2522,
6491,
2378,
8353,
11231,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
1037,
1028,
1026,
1013,
5622,
1028,
1026,
5622,
2465,
1027,
1000,
4367,
4773,
1011,
2640,
17324,
2361,
1011,
8875,
1000,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
7045,
1013,
18176,
1013,
2622,
14526,
1012,
16129,
1000,
2465,
1027,
1000,
17324,
2361,
1011,
14408,
3258,
17324,
2361,
1011,
2309,
13704,
2378,
4179,
1000,
2951,
1011,
2516,
1027,
1000,
2189,
2447,
1026,
7987,
1028,
2011,
2522,
6491,
2378,
8353,
11231,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
14408,
3258,
1011,
12398,
13088,
9331,
1000,
1028,
1026,
10047,
2290,
5034,
2278,
1027,
1000,
7045,
1013,
10047,
2290,
1013,
11103,
1013,
2184,
1012,
16545,
2290,
1000,
12456,
1027,
1000,
1000,
9381,
1027,
1000,
2531,
1003,
1000,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
14408,
3258,
1011,
3161,
13088,
9331,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
25705,
2571,
6199,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
2303,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
2516,
1000,
1028,
2189,
2447,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
4078,
2278,
1000,
1028,
2011,
2522,
6491,
2378,
8353,
11231,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
30523,
3258,
1011,
25705,
2571,
6199,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
2303,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
2516,
1000,
1028,
4257,
3142,
2828,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
3258,
1011,
25705,
2571,
6199,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
2303,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
17324,
2361,
1011,
1048,
1011,
14408,
3258,
1011,
2516,
1000,
1028,
4257,
3142,
2828,
30526
] |
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(SpriteRenderer))]
public class SpriteRandomiser : MonoBehaviour {
[System.Serializable]
public class PossibleState
{
public Sprite texture = null;
public Color color = Color.white;
};
public PossibleState[] possibleStates = new PossibleState[0];
public void RandomiseSprite()
{
Random.seed = (int)Time.time;
if(possibleStates.Length > 0)
{
PossibleState state = possibleStates[Random.Range(0,possibleStates.Length)];
SpriteRenderer spriteRenderer = GetComponent<Renderer>() as SpriteRenderer;
spriteRenderer.sprite = state.texture;
spriteRenderer.color = state.color;
}
}
// Use this for initialization
void Start ()
{
RandomiseSprite();
}
}
|
Almax27/LD31
|
Assets/Scripts/Utility/SpriteRandomiser.cs
|
C#
|
gpl-2.0
| 759
|
[
30522,
2478,
8499,
13159,
3170,
1025,
2478,
2291,
1012,
6407,
1025,
1031,
5478,
9006,
29513,
3372,
1006,
2828,
11253,
1006,
11867,
17625,
7389,
4063,
2121,
1007,
1007,
1033,
2270,
2465,
11867,
17625,
13033,
20936,
8043,
1024,
18847,
4783,
3270,
25500,
3126,
1063,
1031,
2291,
1012,
7642,
21335,
3468,
1033,
2270,
2465,
2825,
9153,
2618,
1063,
2270,
11867,
17625,
14902,
1027,
19701,
1025,
2270,
3609,
3609,
1027,
3609,
1012,
2317,
1025,
1065,
1025,
2270,
2825,
9153,
2618,
1031,
1033,
2825,
9153,
4570,
1027,
2047,
2825,
9153,
2618,
1031,
1014,
1033,
1025,
2270,
11675,
6721,
13087,
18098,
4221,
1006,
1007,
1063,
6721,
1012,
6534,
1027,
1006,
20014,
1007,
2051,
1012,
2051,
1025,
2065,
1006,
2825,
9153,
4570,
1012,
3091,
1028,
1014,
1007,
1063,
2825,
9153,
2618,
2110,
1027,
2825,
9153,
4570,
1031,
6721,
1012,
2846,
1006,
1014,
1010,
2825,
9153,
4570,
1012,
3091,
1007,
1033,
1025,
11867,
17625,
7389,
4063,
2121,
11867,
17625,
7389,
4063,
2121,
1027,
2131,
9006,
29513,
3372,
1026,
17552,
2121,
1028,
1006,
1007,
2004,
11867,
17625,
7389,
4063,
2121,
1025,
11867,
17625,
7389,
4063,
2121,
1012,
11867,
17625,
1027,
2110,
1012,
14902,
1025,
11867,
17625,
7389,
4063,
2121,
1012,
3609,
1027,
2110,
1012,
3609,
1025,
1065,
1065,
1013,
1013,
2224,
2023,
2005,
3988,
3989,
11675,
2707,
1006,
1007,
1063,
6721,
13087,
18098,
4221,
1006,
1007,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
# Crinitaria corymbulosa (Bornm.) Grierson SPECIES
#### Status
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null
|
mdoering/backbone
|
life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Varthemia corymbulosa/ Syn. Crinitaria corymbulosa/README.md
|
Markdown
|
apache-2.0
| 197
|
[
30522,
1001,
13675,
5498,
7559,
2401,
18342,
14905,
18845,
3736,
1006,
2141,
2213,
1012,
1007,
24665,
10136,
2239,
2427,
1001,
1001,
1001,
1001,
3570,
10675,
1001,
1001,
1001,
1001,
2429,
2000,
1996,
10161,
1997,
2166,
1010,
3822,
2254,
2249,
1001,
1001,
1001,
1001,
2405,
1999,
19701,
1001,
1001,
1001,
1001,
2434,
2171,
19701,
1001,
1001,
1001,
12629,
19701,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
package dk.dmaa0214.controllerLayer;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.xml.bind.DatatypeConverter;
import com.gargoylesoftware.htmlunit.DefaultCredentialsProvider;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.StringWebResponse;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.DomNode;
import com.gargoylesoftware.htmlunit.html.DomNodeList;
import com.gargoylesoftware.htmlunit.html.HTMLParser;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlImage;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import dk.dmaa0214.modelLayer.SPNews;
public class SPNewsScraper {
//public static void main(String [] args) {
// new SPNewsScraper();
//}
private WebClient webClient;
public SPNewsScraper(String user, String pass) {
webClient = new WebClient();
webClient.getOptions().setJavaScriptEnabled(false);
webClient.getOptions().setCssEnabled(false);
DefaultCredentialsProvider credentialProvider = (DefaultCredentialsProvider) webClient.getCredentialsProvider();
credentialProvider.addNTLMCredentials(user, pass, null, -1, "localhost", "UCN");
}
public void getSingleNews(SPNews spNews) throws FailingHttpStatusCodeException, NullPointerException, IOException {
int id = spNews.getId();
String siteDialogURL = "http://ecampus.ucn.dk/Noticeboard/Lists/NoticeBoard/DispForm.aspx?"
+ "NoticeBoardItem=" + id + "&WebID=87441127-db6f-4499-8c99-3dea925e04a8&IsDlg=1";
HtmlPage page = webClient.getPage(siteDialogURL);
DomNode div = page.getFirstByXPath("//td[@class='wt-2column-t1-td1']/div/div");
if(div == null) {
throw new NullPointerException("Nyhedstekst kunne ikke hentes. Internkode: #3");
}
DomNodeList<DomNode> list = div.getChildNodes();
String fullText = "";
for (int i = 5; i < list.size()-3; i++) {
DomNode dn = list.get(i);
fullText += dn.asXml();
}
StringWebResponse response = new StringWebResponse(fullText, page.getUrl());
HtmlPage newPage = HTMLParser.parseHtml(response, webClient.getCurrentWindow());
makeImgToBase64(newPage);
HtmlElement body = newPage.getBody();
spNews.setFullText(body.asXml());
}
private void makeImgToBase64(HtmlPage page) throws FailingHttpStatusCodeException, MalformedURLException, IOException {
@SuppressWarnings("unchecked")
List<HtmlImage> imageList = (List<HtmlImage>) page.getByXPath("//img");
for (HtmlImage image : imageList) {
InputStream ins = webClient.getPage("http://ecampus.ucn.dk" + image.getSrcAttribute()).getWebResponse().getContentAsStream();
byte[] imageBytes = new byte[0];
for(byte[] ba = new byte[ins.available()]; ins.read(ba) != -1;) {
byte[] baTmp = new byte[imageBytes.length + ba.length];
System.arraycopy(imageBytes, 0, baTmp, 0, imageBytes.length);
System.arraycopy(ba, 0, baTmp, imageBytes.length, ba.length);
imageBytes = baTmp;
}
image.setAttribute("src", "data:image/gif;base64," + DatatypeConverter.printBase64Binary(imageBytes));
}
}
public ArrayList<SPNews> getNewsList() throws NullPointerException, FailingHttpStatusCodeException, MalformedURLException, IOException {
String siteURL = "http://ecampus.ucn.dk/Noticeboard/_Layouts/NoticeBoard/Ajax.aspx?Action="
+ "GetNewsList&ShowBodyContent=SHORT100&WebId=87441127-db6f-4499-8c99-3dea925e04a8"
+ "&ChannelList=11776,4096,3811,3817,4311,4312,4313,4768,4314,4315,4316,4317,4310,"
+ "&DateFormat=dd/MM/yyyy HH:mm&List=Current,Archived&IncludeRead=true&MaxToShow=10"
+ "&Page=1&frontpageonly=false";
HtmlPage page = webClient.getPage(siteURL);
return ScrapeNewsList(page.asText());
}
private ArrayList<SPNews> ScrapeNewsList(String input) throws NullPointerException {
ArrayList<SPNews> newslist = new ArrayList<SPNews>();
int iStart = getNextIndex(input, 0);
if(!input.substring(0, iStart).equals("OK")) {
throw new NullPointerException("Nyhederne kan ikke læses. Internkode: #1. Status: " + input.substring(0, iStart));
}
String[] allNews = input.split("\\|\\$\\$\\|");
//System.out.println("count: " + (allNews.length-1));
for (int i = 1; i < allNews.length; i++) {
String[] singleNews = allNews[i].split("\\|\\$\\|");
if(singleNews.length != 11) {
throw new NullPointerException("Nyhederne kan ikke læses. Internkode: #2. Rapport: " + singleNews.length);
}
int id = getIntFromString(singleNews[0]);
String title = singleNews[1].trim();
String date = singleNews[2].trim();
boolean read = (getIntFromString(singleNews[3]) == 1);
String[] channelArray = singleNews[4].trim().split("\\|");
ArrayList<String> channels = new ArrayList<String>(Arrays.asList(channelArray));
String addedBy = singleNews[6].trim();
String text = singleNews[7].trim(); //7 and 8 is equal.
SPNews newsObj = new SPNews(id, title, date, channels, text, addedBy, read);
newslist.add(newsObj);
}
return newslist;
}
private int getIntFromString(String str) {
int ret = -1;
try {
ret = Integer.parseInt(str);
} catch (NumberFormatException e) {
ret = -1;
}
return ret;
}
private int getNextIndex(String text, int fromIndex){
int i = text.indexOf("|$|", fromIndex);
if (i == -1) {
throw new NullPointerException("Nyhederne kan ikke læses");
}
return i;
}
}
|
CodingDK/eCampus-Dmaa0214
|
eCampus-Dmaa0214/src/dk/dmaa0214/controllerLayer/SPNewsScraper.java
|
Java
|
gpl-2.0
| 5,592
|
[
30522,
7427,
1040,
2243,
1012,
1040,
2863,
2050,
2692,
17465,
2549,
1012,
11486,
24314,
1025,
12324,
9262,
1012,
22834,
1012,
22834,
10288,
24422,
1025,
12324,
9262,
1012,
22834,
1012,
20407,
25379,
1025,
12324,
9262,
1012,
5658,
1012,
15451,
29021,
3126,
2571,
2595,
24422,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
9140,
9863,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
27448,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025,
12324,
9262,
2595,
1012,
20950,
1012,
14187,
1012,
2951,
13874,
8663,
16874,
2121,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
12398,
16748,
16454,
26340,
21572,
17258,
2121,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
7989,
11039,
25856,
9153,
5809,
16044,
10288,
24422,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
5164,
8545,
13578,
13102,
5644,
2063,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
4773,
20464,
11638,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
16129,
1012,
14383,
3630,
3207,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
16129,
1012,
14383,
3630,
9247,
2923,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
16129,
1012,
16129,
19362,
8043,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
16129,
1012,
16129,
12260,
3672,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
16129,
1012,
16129,
9581,
3351,
1025,
12324,
4012,
1012,
11721,
18581,
26274,
15794,
8059,
1012,
16129,
19496,
2102,
1012,
16129,
1012,
16129,
13704,
1025,
12324,
1040,
2243,
1012,
1040,
2863,
2050,
2692,
17465,
2549,
1012,
2944,
24314,
1012,
11867,
2638,
9333,
1025,
2270,
2465,
11867,
2638,
9333,
11020,
2527,
4842,
1063,
1013,
1013,
2270,
10763,
11675,
2364,
1006,
5164,
1031,
1033,
12098,
5620,
1007,
1063,
1013,
1013,
2047,
11867,
2638,
9333,
11020,
2527,
4842,
1006,
1007,
1025,
1013,
1013,
1065,
2797,
4773,
20464,
11638,
4773,
20464,
11638,
1025,
2270,
11867,
2638,
9333,
11020,
2527,
4842,
1006,
5164,
5310,
1010,
5164,
3413,
1007,
1063,
4773,
20464,
11638,
1027,
2047,
4773,
20464,
11638,
1006,
1007,
1025,
4773,
20464,
11638,
1012,
2131,
7361,
9285,
1006,
1007,
1012,
2275,
3900,
12044,
23235,
8189,
23242,
1006,
6270,
1007,
1025,
4773,
20464,
11638,
1012,
2131,
7361,
9285,
1006,
1007,
1012,
2275,
30524,
16748,
16454,
26340,
21572,
17258,
2121,
1007,
4773,
20464,
11638,
1012,
2131,
16748,
16454,
26340,
21572,
17258,
2121,
1006,
1007,
1025,
13675,
14728,
19909,
21572,
17258,
2121,
1012,
5587,
3372,
13728,
16748,
16454,
26340,
1006,
5310,
1010,
3413,
1010,
19701,
1010,
1011,
1015,
1010,
1000,
2334,
15006,
2102,
1000,
1010,
1000,
15384,
2078,
1000,
1007,
1025,
1065,
2270,
11675,
4152,
2075,
11474,
9333,
1006,
11867,
2638,
9333,
11867,
2638,
9333,
1007,
11618,
7989,
11039,
25856,
9153,
5809,
30523,
6169,
5054,
3085,
2094,
1006,
6270,
1007,
1025,
12398,
16748,
16454,
26340,
21572,
17258,
2121,
13675,
14728,
19909,
21572,
17258,
2121,
1027,
1006,
12398,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
6169,
5054,
3085,
2094,
1006,
6270,
1007,
1025,
12398,
16748,
16454,
26340,
21572,
17258,
2121,
13675,
14728,
19909,
21572,
17258,
2121,
1027,
1006,
12398,
30526
] |
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script src="./socket.io-client.js"></script>
</body>
</html>
|
xzzw9987/Memos
|
project/LearnSIO/index.html
|
HTML
|
mit
| 170
|
[
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
2516,
1028,
6254,
1026,
1013,
2516,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
1012,
1013,
22278,
1012,
22834,
1011,
7396,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
1013,
2303,
1028,
1026,
1013,
16129,
1028,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
import * as express from "express";
import { GameDashboardController } from "../controllers/GameDashboardController";
import { GameLobbyController } from "../controllers/GameLobbyController";
var router = express.Router();
export class GameRoutes {
private gameDashboardController: GameDashboardController;
private gameLobbyController: GameLobbyController;
constructor() {
this.gameDashboardController = new GameDashboardController();
this.gameLobbyController = new GameLobbyController();
}
get routes() {
router.get("/games", this.gameDashboardController.retrieve);
router.post("/games", this.gameDashboardController.create);
router.get("/games/:id", this.gameDashboardController.findById);
router.put("/games/:id/join", this.gameLobbyController.joinGameLobby);
router.put("/games/:id/leave", this.gameLobbyController.leaveGameLobby);
router.get('/games/:id/start', this.gameLobbyController.startGame);
return router;
}
}
Object.seal(GameRoutes);
|
atomicham/defiance
|
src/server/web/routes/GameRoutes.ts
|
TypeScript
|
mit
| 1,049
|
[
30522,
12324,
1008,
2004,
4671,
2013,
1000,
4671,
1000,
1025,
12324,
1063,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1065,
2013,
1000,
1012,
1012,
1013,
21257,
1013,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1000,
1025,
12324,
1063,
2208,
4135,
14075,
8663,
13181,
10820,
1065,
2013,
1000,
1012,
1012,
1013,
21257,
1013,
2208,
4135,
14075,
8663,
13181,
10820,
1000,
1025,
13075,
2799,
2099,
1027,
4671,
1012,
2799,
2099,
1006,
1007,
1025,
9167,
2465,
27911,
5833,
2229,
1063,
2797,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1024,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1025,
2797,
2208,
4135,
14075,
8663,
13181,
10820,
1024,
2208,
4135,
14075,
8663,
13181,
10820,
1025,
9570,
2953,
1006,
1007,
1063,
2023,
1012,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1027,
2047,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1006,
1007,
1025,
2023,
1012,
2208,
4135,
14075,
8663,
13181,
10820,
1027,
2047,
2208,
4135,
14075,
8663,
13181,
10820,
1006,
1007,
1025,
1065,
2131,
5847,
1006,
1007,
1063,
2799,
2099,
1012,
2131,
1006,
1000,
1013,
2399,
1000,
1010,
2023,
1012,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1012,
12850,
1007,
1025,
2799,
2099,
1012,
2695,
1006,
1000,
1013,
2399,
1000,
1010,
2023,
1012,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1012,
3443,
1007,
1025,
2799,
2099,
1012,
2131,
1006,
1000,
1013,
2399,
1013,
1024,
8909,
1000,
1010,
2023,
1012,
2208,
8883,
2232,
6277,
8663,
13181,
10820,
1012,
2424,
3762,
3593,
1007,
1025,
2799,
2099,
1012,
2404,
1006,
1000,
1013,
2399,
1013,
1024,
8909,
1013,
3693,
1000,
1010,
2023,
1012,
2208,
4135,
14075,
8663,
13181,
10820,
1012,
3693,
16650,
4135,
14075,
1007,
1025,
2799,
2099,
1012,
2404,
1006,
1000,
1013,
2399,
1013,
1024,
8909,
1013,
2681,
1000,
1010,
2023,
1012,
2208,
4135,
14075,
8663,
13181,
10820,
1012,
2681,
16650,
4135,
14075,
1007,
1025,
2799,
2099,
1012,
2131,
1006,
1005,
1013,
2399,
1013,
1024,
8909,
1013,
2707,
1005,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
1010,
2023,
1012,
2208,
4135,
14075,
8663,
13181,
10820,
1012,
2707,
16650,
1007,
1025,
2709,
2799,
2099,
1025,
1065,
1065,
4874,
1012,
7744,
1006,
27911,
5833,
2229,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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1010,
2023,
1012,
2208,
4135,
14075,
8663,
13181,
10820,
1012,
2707,
16650,
1007,
1025,
2709,
2799,
2099,
1025,
1065,
1065,
4874,
1012,
7744,
1006,
27911,
5833,
2229,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
/**
* Dependencies
* @type {exports}
*/
var fs = require('fs')
, q = require('q')
, _ = require('underscore')
, path = require('path')
, natural = require('natural')
, nounInflector = new natural.NounInflector()
, argv = require('optimist').argv
, path = require('path')
, generator = require('./model.generator');
/**
* Arguments
*/
var directory = path.resolve(process.argv[2])
, dest = path.resolve(process.argv[3]);
var host = ""
, version = "1.0"
, rel = "";
/**
* Functions
*/
var resourceName = function(model) {
return nounInflector.pluralize(model.modelName).toLowerCase();
};
/**
* load a model
* @param modelPath
* @returns {*}
*/
var loadModel = function(modelPath) {
return require(directory + '/' + modelPath);
};
/**
* Write the schema file
* @param modelPath
*/
var profileModel = function(modelPath) {
var model = loadModel(modelPath);
var schema = generator(host, version, model, rel);
mkdir(dest)
fs.writeFile(dest + '/' + resourceName(model) + '.json', JSON.stringify(schema, false, 2), function(err) {
});
};
/**
* Read models from directory
*/
fs.readdir(directory, function(err, files) {
_.each(files, profileModel);
});
/**
* Make a directory
* @param path
* @param root
* @returns {boolean|*}
*/
function mkdir(path, root) {
var dirs = path.split('/')
, dir = dirs.shift()
, root = (root || '') + dir + '/';
try {
fs.mkdirSync(root);
}
catch(e) {
if (!fs.statSync(root).isDirectory()) {
throw new Error(e);
}
}
return !dirs.length || mkdir(dirs.join('/'), root);
}
|
bpanahij/restgoose
|
tools/json-schema-generator/index.js
|
JavaScript
|
mit
| 1,586
|
[
30522,
1013,
1008,
1008,
1008,
12530,
15266,
1008,
1030,
2828,
1063,
14338,
1065,
1008,
1013,
13075,
1042,
2015,
1027,
5478,
1006,
1005,
30524,
1010,
15156,
2378,
21031,
16761,
1027,
2047,
3019,
1012,
15156,
2378,
21031,
16761,
1006,
1007,
1010,
12098,
2290,
2615,
1027,
5478,
1006,
1005,
23569,
27605,
3367,
1005,
1007,
1012,
12098,
2290,
2615,
1010,
4130,
1027,
5478,
1006,
1005,
4130,
1005,
1007,
1010,
13103,
1027,
5478,
1006,
1005,
1012,
1013,
2944,
1012,
13103,
1005,
1007,
1025,
1013,
1008,
1008,
1008,
9918,
1008,
1013,
13075,
14176,
1027,
4130,
1012,
10663,
1006,
2832,
1012,
12098,
2290,
2615,
1031,
1016,
1033,
1007,
1010,
4078,
2102,
1027,
4130,
1012,
10663,
1006,
2832,
1012,
12098,
2290,
2615,
1031,
1017,
1033,
1007,
1025,
13075,
3677,
1027,
1000,
1000,
1010,
2544,
1027,
1000,
1015,
1012,
1014,
1000,
1010,
2128,
2140,
1027,
1000,
1000,
1025,
1013,
1008,
1008,
1008,
4972,
1008,
1013,
13075,
7692,
18442,
1027,
3853,
1006,
2944,
1007,
1063,
2709,
15156,
2378,
21031,
16761,
1012,
13994,
4697,
1006,
2944,
1012,
2944,
18442,
1007,
1012,
2000,
27663,
18992,
3366,
1006,
1007,
1025,
1065,
1025,
1013,
1008,
1008,
1008,
7170,
1037,
2944,
1008,
1030,
11498,
2213,
2944,
15069,
1008,
1030,
5651,
1063,
1008,
1065,
1008,
1013,
13075,
7170,
5302,
9247,
1027,
3853,
1006,
2944,
15069,
1007,
1063,
2709,
5478,
1006,
14176,
1009,
1005,
1013,
1005,
1009,
2944,
15069,
1007,
1025,
1065,
1025,
1013,
1008,
1008,
1008,
4339,
1996,
8040,
28433,
5371,
1008,
1030,
11498,
2213,
2944,
15069,
1008,
1013,
13075,
6337,
5302,
9247,
1027,
3853,
1006,
2944,
15069,
1007,
1063,
13075,
2944,
1027,
7170,
5302,
9247,
1006,
2944,
15069,
1007,
1025,
13075,
8040,
28433,
1027,
13103,
1006,
3677,
1010,
2544,
1010,
2944,
1010,
2128,
2140,
1007,
1025,
12395,
4305,
2099,
1006,
4078,
2102,
1007,
1042,
2015,
1012,
4339,
8873,
2571,
1006,
4078,
2102,
1009,
1005,
1013,
1005,
1009,
7692,
18442,
1006,
2944,
1007,
1009,
1005,
1012,
1046,
3385,
1005,
1010,
1046,
3385,
1012,
5164,
8757,
1006,
8040,
28433,
1010,
6270,
1010,
1016,
1007,
1010,
3853,
1006,
9413,
2099,
1007,
1063,
1065,
1007,
1025,
1065,
1025,
1013,
1008,
1008,
1008,
3191,
4275,
2013,
14176,
1008,
1013,
1042,
2015,
1012,
3191,
4305,
2099,
1006,
14176,
1010,
3853,
1006,
9413,
2099,
1010,
6764,
1007,
1063,
1035,
1012,
2169,
1006,
6764,
1010,
6337,
5302,
9247,
1007,
1025,
1065,
1007,
1025,
1013,
1008,
1008,
1008,
2191,
1037,
14176,
1008,
1030,
11498,
2213,
4130,
1008,
1030,
11498,
2213,
7117,
1008,
1030,
5651,
1063,
22017,
20898,
1064,
1008,
1065,
1008,
1013,
3853,
12395,
4305,
2099,
1006,
4130,
1010,
7117,
1007,
1063,
13075,
16101,
2015,
1027,
4130,
1012,
3975,
1006,
1005,
1013,
1005,
1007,
1010,
16101,
1027,
16101,
2015,
1012,
5670,
1006,
1007,
1010,
7117,
1027,
1006,
7117,
1064,
1064,
1005,
1005,
1007,
1009,
16101,
1009,
1005,
1013,
1005,
1025,
3046,
1063,
30523,
1042,
2015,
1005,
1007,
1010,
1053,
1027,
5478,
1006,
1005,
1053,
1005,
1007,
1010,
1035,
1027,
5478,
1006,
1005,
2104,
9363,
2890,
1005,
1007,
1010,
4130,
1027,
5478,
1006,
1005,
4130,
1005,
1007,
1010,
3019,
1027,
5478,
1006,
1005,
3019,
1005,
1007,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1042,
2015,
1005,
1007,
1010,
1053,
1027,
5478,
1006,
1005,
1053,
1005,
1007,
1010,
1035,
1027,
5478,
1006,
1005,
2104,
9363,
2890,
1005,
1007,
1010,
4130,
1027,
5478,
1006,
1005,
4130,
1005,
1007,
1010,
3019,
1027,
5478,
1006,
1005,
3019,
1005,
1007,
30526
] |
<?php
defined('_JEXEC') or die;
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
?>
<form
action="<?php echo JRoute::_('index.php?option=com_bookpro&id=' . (int) $this->item->id); ?>"
method="post" id="adminForm" name="adminForm" class="form-validate">
<div class="row-fluid">
<div class="span10 form-horizontal">
<fieldset>
<div class="control-group">
<!--
<label class="control-label" for="title"><?php echo JText::_('COM_BOOKPRO_TOURS'); ?>
</label>
<div class="controls">
<?php echo $this->form->getInput('tour_id'); ?>
</div>
</div>
-->
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('title'); ?></div>
<div class="controls"><?php echo $this->form->getInput('title'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('type'); ?></div>
<div class="controls"><?php echo $this->form->getInput('type'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('obj_id'); ?></div>
<div class="controls"><?php echo $this->form->getInput('obj_id'); ?></div>
</div>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('desc'); ?></div>
<div class="controls"><?php echo $this->form->getInput('desc'); ?></div>
</div>
</fieldset>
</div>
<?php echo JLayoutHelper::render('joomla.edit.details', $this); ?>
</div>
<div>
<?php echo $this->form->getInput('tour_id',null,$this->tour_id); ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="return" value="<?php echo JRequest::getCmd('return');?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
|
cuongnd/test_pro
|
administrator/components/com_bookpro/views/faq/tmpl/edit.php
|
PHP
|
gpl-2.0
| 1,925
|
[
30522,
1026,
1029,
25718,
4225,
1006,
1005,
1035,
15333,
2595,
8586,
1005,
1007,
2030,
3280,
1025,
1046,
11039,
19968,
1024,
1024,
1035,
1006,
1005,
5248,
1012,
2433,
10175,
8524,
3508,
1005,
1007,
1025,
1046,
11039,
19968,
1024,
1024,
1035,
1006,
1005,
2433,
4783,
3270,
25500,
2099,
1012,
4217,
1005,
1010,
1005,
7276,
1005,
1007,
1025,
1029,
1028,
1026,
2433,
2895,
1027,
1000,
1026,
1029,
25718,
9052,
3781,
5833,
2063,
1024,
1024,
1035,
1006,
1005,
5950,
1012,
25718,
1029,
5724,
1027,
4012,
1035,
2338,
21572,
1004,
8909,
1027,
1005,
1012,
1006,
20014,
1007,
1002,
2023,
1011,
1028,
8875,
1011,
1028,
8909,
1007,
1025,
1029,
1028,
1000,
4118,
1027,
1000,
2695,
1000,
8909,
1027,
1000,
4748,
10020,
14192,
1000,
2171,
1027,
1000,
4748,
10020,
14192,
1000,
2465,
1027,
1000,
2433,
1011,
9398,
3686,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
5216,
1011,
8331,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
8487,
10790,
2433,
1011,
9876,
1000,
1028,
1026,
4249,
3388,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2491,
1011,
2177,
1000,
1028,
1026,
999,
1011,
1011,
1026,
3830,
2465,
1027,
1000,
2491,
1011,
3830,
1000,
2005,
1027,
1000,
2516,
1000,
1028,
1026,
1029,
25718,
9052,
1046,
18209,
1024,
1024,
1035,
1006,
1005,
4012,
1035,
2338,
21572,
1035,
7562,
1005,
1007,
1025,
1029,
1028,
1026,
1013,
3830,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
7711,
1000,
1028,
1026,
1029,
25718,
9052,
1002,
2023,
1011,
1028,
2433,
1011,
1028,
2131,
2378,
18780,
1006,
1005,
2778,
1035,
8909,
1005,
1007,
1025,
1029,
1028,
1026,
1013,
4487,
30524,
1027,
1000,
2491,
1011,
2177,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2491,
1011,
3830,
1000,
1028,
1026,
1029,
25718,
9052,
1002,
2023,
1011,
1028,
2433,
1011,
1028,
2131,
20470,
2884,
1006,
1005,
2516,
1005,
1007,
1025,
1029,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
7711,
1000,
1028,
1026,
1029,
25718,
9052,
1002,
2023,
1011,
1028,
2433,
1011,
1028,
2131,
2378,
18780,
1006,
1005,
2516,
1005,
1007,
1025,
1029,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2491,
1011,
2177,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2491,
1011,
3830,
1000,
1028,
1026,
1029,
25718,
9052,
1002,
2023,
1011,
1028,
2433,
1011,
1028,
2131,
20470,
2884,
1006,
1005,
2828,
1005,
1007,
1025,
1029,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
7711,
1000,
1028,
1026,
1029,
25718,
9052,
1002,
2023,
1011,
1028,
2433,
1011,
1028,
2131,
2378,
18780,
1006,
1005,
2828,
1005,
1007,
1025,
1029,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2491,
1011,
2177,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2491,
1011,
3830,
1000,
1028,
1026,
1029,
25718,
9052,
1002,
2023,
1011,
1028,
2433,
1011,
1028,
2131,
20470,
2884,
1006,
1005,
27885,
3501,
1035,
8909,
1005,
1007,
1025,
1029,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
30523,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1011,
1011,
1028,
1026,
4487,
2615,
2465,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1011,
1011,
1028,
1026,
4487,
2615,
2465,
30526
] |
// checking initialization of static template data memebers
template <class T>
struct S
{
static T a;
static T b;
};
template <class T>
T S<T>::a; // <-- NOT initialized
template <class T>
T S<T>::b = 0; // <-- explicitly initialized
int main ()
{
// g++ on DEC OSF and IBM AIX fails to link
return S<char>::a + S<char>::b;
}
|
apache/stdcxx
|
etc/config/src/STATIC_TEMPLATE_MEMBER_INIT.cpp
|
C++
|
apache-2.0
| 356
|
[
30522,
1013,
1013,
9361,
3988,
3989,
1997,
10763,
23561,
2951,
2033,
4168,
17198,
23561,
1026,
2465,
1056,
1028,
2358,
6820,
6593,
1055,
1063,
10763,
1056,
1037,
1025,
10763,
1056,
1038,
1025,
1065,
1025,
23561,
1026,
2465,
1056,
1028,
1056,
1055,
1026,
1056,
1028,
1024,
1024,
1037,
1025,
1013,
1013,
1026,
1011,
1011,
2025,
3988,
3550,
23561,
1026,
2465,
1056,
1028,
1056,
1055,
1026,
1056,
1028,
1024,
1024,
1038,
1027,
1014,
1025,
1013,
1013,
1026,
1011,
1011,
12045,
3988,
3550,
20014,
2364,
1006,
1007,
1063,
1013,
1013,
1043,
1009,
1009,
2006,
11703,
9808,
2546,
1998,
9980,
28443,
11896,
2000,
4957,
2709,
1055,
1026,
25869,
1028,
1024,
1024,
1037,
1009,
1055,
1026,
25869,
1028,
1024,
1024,
1038,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About GoldDiggerCoin</source>
<translation>Acerca de GoldDiggerCoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>GoldDiggerCoin</b> version</source>
<translation>Versión de <b>GoldDiggerCoin</b></translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation>
Este es un software experimental.
Distribuido bajo la licencia MIT/X11, vea el archivo adjunto
COPYING o http://www.opensource.org/licenses/mit-license.php.
Este producto incluye software desarrollado por OpenSSL Project para su uso en
el OpenSSL Toolkit (http://www.openssl.org/) y software criptográfico escrito por
Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation>Copyright</translation>
</message>
<message>
<location line="+0"/>
<source>The GoldDiggerCoin developers</source>
<translation>Los programadores GoldDiggerCoin</translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Libreta de direcciones</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Haga doble clic para editar una dirección o etiqueta</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Crear una nueva dirección</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Copiar la dirección seleccionada al portapapeles del sistema</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>&Añadir dirección</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your GoldDiggerCoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Estas son sus direcciones GoldDiggerCoin para recibir pagos. Puede utilizar una diferente por cada persona emisora para saber quién le está pagando.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation>&Copiar dirección</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>Mostrar código &QR </translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a GoldDiggerCoin address</source>
<translation>Firmar un mensaje para demostrar que se posee una dirección GoldDiggerCoin</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>&Firmar mensaje</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation>Borrar de la lista la dirección seleccionada</translation>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation>Exportar a un archivo los datos de esta pestaña</translation>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation>&Exportar</translation>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified GoldDiggerCoin address</source>
<translation>Verificar un mensaje para comprobar que fue firmado con la dirección GoldDiggerCoin indicada</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>&Verificar mensaje</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Eliminar</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your GoldDiggerCoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>Estas son sus direcciones GoldDiggerCoin para enviar pagos. Compruebe siempre la cantidad y la dirección receptora antes de transferir monedas.</translation>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>Copiar &etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>&Editar</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation>Enviar &monedas</translation>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Exportar datos de la libreta de direcciones</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Archivos de columnas separadas por coma (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Error al exportar</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>No se pudo escribir en el archivo %1.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Dirección</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(sin etiqueta)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Diálogo de contraseña</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Introducir contraseña</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Nueva contraseña</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Repita la nueva contraseña</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Introduzca la nueva contraseña del monedero.<br/>Por favor elija una con <b>10 o más caracteres aleatorios</b> u <b>ocho o más palabras</b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Cifrar el monedero</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Esta operación requiere su contraseña para desbloquear el monedero.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Desbloquear monedero</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Esta operación requiere su contraseña para descifrar el monedero.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Descifrar el monedero</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Cambiar contraseña</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Introduzca la contraseña anterior del monedero y la nueva. </translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Confirmar cifrado del monedero</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR GOLDDIGGERCOINS</b>!</source>
<translation>Atencion: ¡Si cifra su monedero y pierde la contraseña perderá <b>TODOS SUS GOLDDIGGERCOINS</b>!"</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>¿Seguro que desea cifrar su monedero?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>IMPORTANTE: Cualquier copia de seguridad que haya realizado previamente de su archivo de monedero debe reemplazarse con el nuevo archivo de monedero cifrado. Por razones de seguridad, las copias de seguridad previas del archivo de monedero no cifradas serán inservibles en cuanto comience a usar el nuevo monedero cifrado.</translation>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Aviso: ¡La tecla de bloqueo de mayúsculas está activada!</translation>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Monedero cifrado</translation>
</message>
<message>
<location line="-56"/>
<source>GoldDiggerCoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your golddiggercoins from being stolen by malware infecting your computer.</source>
<translation>GoldDiggerCoin se cerrará para finalizar el proceso de cifrado. Recuerde que el cifrado de su monedero no puede proteger totalmente sus golddiggercoins de robo por malware que infecte su sistema.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Ha fallado el cifrado del monedero</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Ha fallado el cifrado del monedero debido a un error interno. El monedero no ha sido cifrado.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Las contraseñas no coinciden.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Ha fallado el desbloqueo del monedero</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>La contraseña introducida para descifrar el monedero es incorrecta.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Ha fallado el descifrado del monedero</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Se ha cambiado correctamente la contraseña del monedero.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation>Firmar &mensaje...</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Sincronizando con la red…</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Vista general</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Mostrar vista general del monedero</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Transacciones</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Examinar el historial de transacciones</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels for sending</source>
<translation>Editar la lista de las direcciones y etiquetas almacenadas</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Mostrar la lista de direcciones utilizadas para recibir pagos</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>&Salir</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Salir de la aplicación</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about GoldDiggerCoin</source>
<translation>Mostrar información acerca de GoldDiggerCoin</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>Acerca de &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Mostrar información acerca de Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opciones...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>&Cifrar monedero…</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>Copia de &respaldo del monedero...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>&Cambiar la contraseña…</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation>Importando bloques de disco...</translation>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation>Reindexando bloques en disco...</translation>
</message>
<message>
<location line="-347"/>
<source>Send coins to a GoldDiggerCoin address</source>
<translation>Enviar monedas a una dirección GoldDiggerCoin</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for GoldDiggerCoin</source>
<translation>Modificar las opciones de configuración de GoldDiggerCoin</translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation>Copia de seguridad del monedero en otra ubicación</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Cambiar la contraseña utilizada para el cifrado del monedero</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation>Ventana de &depuración</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Abrir la consola de depuración y diagnóstico</translation>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation>&Verificar mensaje...</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>GoldDiggerCoin</source>
<translation>GoldDiggerCoin</translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Monedero</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation>&Enviar</translation>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation>&Recibir</translation>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation>&Direcciones</translation>
</message>
<message>
<location line="+22"/>
<source>&About GoldDiggerCoin</source>
<translation>&Acerca de GoldDiggerCoin</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>Mo&strar/ocultar</translation>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation>Mostrar u ocultar la ventana principal</translation>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation>Cifrar las claves privadas de su monedero</translation>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your GoldDiggerCoin addresses to prove you own them</source>
<translation>Firmar mensajes con sus direcciones GoldDiggerCoin para demostrar la propiedad</translation>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified GoldDiggerCoin addresses</source>
<translation>Verificar mensajes comprobando que están firmados con direcciones GoldDiggerCoin concretas</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Archivo</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Configuración</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>A&yuda</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Barra de pestañas</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+47"/>
<source>GoldDiggerCoin client</source>
<translation>Cliente GoldDiggerCoin</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to GoldDiggerCoin network</source>
<translation><numerusform>%n conexión activa hacia la red GoldDiggerCoin</numerusform><numerusform>%n conexiones activas hacia la red GoldDiggerCoin</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation>Ninguna fuente de bloques disponible ...</translation>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation>Se han procesado %1 de %2 bloques (estimados) del historial de transacciones.</translation>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation>Procesados %1 bloques del historial de transacciones.</translation>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation><numerusform>%n día</numerusform><numerusform>%n días</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation>%1 atrás</translation>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation>El último bloque recibido fue generado hace %1.</translation>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation>Las transacciones posteriores a esta aún no están visibles.</translation>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation>Aviso</translation>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation>Información</translation>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation>Esta transacción supera el límite de tamaño. Puede enviarla con una comisión de %1, destinada a los nodos que procesen su transacción para contribuir al mantenimiento de la red. ¿Desea pagar esta comisión?</translation>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Actualizado</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Actualizando...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>Confirme la tarifa de la transacción</translation>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Transacción enviada</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Transacción entrante</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Fecha: %1
Cantidad: %2
Tipo: %3
Dirección: %4
</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation>Gestión de URI</translation>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid GoldDiggerCoin address or malformed URI parameters.</source>
<translation>¡No se puede interpretar la URI! Esto puede deberse a una dirección GoldDiggerCoin inválida o a parámetros de URI mal formados.</translation>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>El monedero está <b>cifrado</b> y actualmente <b>desbloqueado</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>El monedero está <b>cifrado</b> y actualmente <b>bloqueado</b></translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. GoldDiggerCoin can no longer continue safely and will quit.</source>
<translation>Ha ocurrido un error crítico. GoldDiggerCoin ya no puede continuar con seguridad y se cerrará.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation>Alerta de red</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Editar Dirección</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Etiqueta</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>La etiqueta asociada con esta entrada en la libreta</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Dirección</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>La dirección asociada con esta entrada en la guía. Solo puede ser modificada para direcciones de envío.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Nueva dirección para recibir</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Nueva dirección para enviar</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Editar dirección de recepción</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Editar dirección de envío</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>La dirección introducida "%1" ya está presente en la libreta de direcciones.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid GoldDiggerCoin address.</source>
<translation>La dirección introducida "%1" no es una dirección GoldDiggerCoin válida.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>No se pudo desbloquear el monedero.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Ha fallado la generación de la nueva clave.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>GoldDiggerCoin-Qt</source>
<translation>GoldDiggerCoin-Qt</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>versión</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Uso:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>opciones de la línea de órdenes</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>Opciones GUI</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Establecer el idioma, por ejemplo, "es_ES" (predeterminado: configuración regional del sistema)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Arrancar minimizado</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>Mostrar pantalla de bienvenida en el inicio (predeterminado: 1)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Opciones</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Principal</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation>Tarifa de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB.</translation>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Comisión de &transacciones</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start GoldDiggerCoin after logging in to the system.</source>
<translation>Iniciar GoldDiggerCoin automáticamente al encender el sistema.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start GoldDiggerCoin on system login</source>
<translation>&Iniciar GoldDiggerCoin al iniciar el sistema</translation>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation>Restablecer todas las opciones del cliente a las predeterminadas.</translation>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation>&Restablecer opciones</translation>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation>&Red</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the GoldDiggerCoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Abrir automáticamente el puerto del cliente GoldDiggerCoin en el router. Esta opción solo funciona si el router admite UPnP y está activado.</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Mapear el puerto usando &UPnP</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the GoldDiggerCoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>Conectar a la red GoldDiggerCoin a través de un proxy SOCKS (ej. para conectar con la red Tor)</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>&Conectar a través de un proxy SOCKS:</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>Dirección &IP del proxy:</translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>Dirección IP del proxy (ej. 127.0.0.1)</translation>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>&Puerto:</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Puerto del servidor proxy (ej. 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>&Versión SOCKS:</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>Versión del proxy SOCKS (ej. 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>&Ventana</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Minimizar la ventana a la bandeja de iconos del sistema.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&Minimizar a la bandeja en vez de a la barra de tareas</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>Minimizar en lugar de salir de la aplicación al cerrar la ventana.Cuando esta opción está activa, la aplicación solo se puede cerrar seleccionando Salir desde el menú.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>M&inimizar al cerrar</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Interfaz</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>I&dioma de la interfaz de usuario</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting GoldDiggerCoin.</source>
<translation>El idioma de la interfaz de usuario puede establecerse aquí. Este ajuste se aplicará cuando se reinicie GoldDiggerCoin.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>Mostrar las cantidades en la &unidad:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían monedas.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show GoldDiggerCoin addresses in the transaction list or not.</source>
<translation>Mostrar o no las direcciones GoldDiggerCoin en la lista de transacciones.</translation>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>&Mostrar las direcciones en la lista de transacciones</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&Aceptar</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Cancelar</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>&Aplicar</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>predeterminado</translation>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation>Confirme el restablecimiento de las opciones</translation>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation>Algunas configuraciones pueden requerir un reinicio del cliente para que sean efectivas.</translation>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation>¿Quiere proceder?</translation>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation>Aviso</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting GoldDiggerCoin.</source>
<translation>Esta configuración tendrá efecto tras reiniciar GoldDiggerCoin.</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>La dirección proxy indicada es inválida.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Desde</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the GoldDiggerCoin network after a connection is established, but this process has not completed yet.</source>
<translation>La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red GoldDiggerCoin después de que se haya establecido una conexión , pero este proceso aún no se ha completado.</translation>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>No confirmado(s):</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>Monedero</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation>No disponible:</translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Saldo recién minado que aún no está disponible.</translation>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Movimientos recientes</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Su saldo actual</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Total de las transacciones que faltan por confirmar y que no contribuyen al saldo actual</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>desincronizado</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start golddiggercoin: click-to-pay handler</source>
<translation>No se pudo iniciar golddiggercoin: manejador de pago-al-clic</translation>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>Diálogo de códigos QR</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Solicitud de pago</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Cuantía:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Etiqueta:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Mensaje:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&Guardar como...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>Error al codificar la URI en el código QR.</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>La cantidad introducida es inválida. Compruébela, por favor.</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>URI esultante demasiado larga. Intente reducir el texto de la etiqueta / mensaje.</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>Guardar código QR</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>Imágenes PNG (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Nombre del cliente</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation>N/D</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>Versión del cliente</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Información</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Utilizando la versión OpenSSL</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Hora de inicio</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Red</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Número de conexiones</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>En la red de pruebas</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Cadena de bloques</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Número actual de bloques</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Bloques totales estimados</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Hora del último bloque</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Abrir</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>Opciones de la línea de órdenes</translation>
</message>
<message>
<location line="+7"/>
<source>Show the GoldDiggerCoin-Qt help message to get a list with possible GoldDiggerCoin command-line options.</source>
<translation>Mostrar el mensaje de ayuda de GoldDiggerCoin-Qt que enumera las opciones disponibles de línea de órdenes para GoldDiggerCoin.</translation>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Mostrar</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Consola</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Fecha de compilación</translation>
</message>
<message>
<location line="-104"/>
<source>GoldDiggerCoin - Debug window</source>
<translation>GoldDiggerCoin - Ventana de depuración</translation>
</message>
<message>
<location line="+25"/>
<source>GoldDiggerCoin Core</source>
<translation>Núcleo de GoldDiggerCoin</translation>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation>Archivo de registro de depuración</translation>
</message>
<message>
<location line="+7"/>
<source>Open the GoldDiggerCoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>Abrir el archivo de registro de depuración en el directorio actual de datos. Esto puede llevar varios segundos para archivos de registro grandes.</translation>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Borrar consola</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the GoldDiggerCoin RPC console.</source>
<translation>Bienvenido a la consola RPC de GoldDiggerCoin</translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Use las flechas arriba y abajo para navegar por el historial y <b>Control+L</b> para limpiar la pantalla.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Escriba <b>help</b> para ver un resumen de los comandos disponibles.</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Enviar monedas</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>Enviar a multiples destinatarios de una vez</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>Añadir &destinatario</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>Eliminar todos los campos de las transacciones</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Limpiar &todo</translation>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation>123.456 BTC</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Confirmar el envío</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>&Enviar</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> a %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Confirmar el envío de monedas</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>¿Está seguro de que desea enviar %1?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation>y</translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>La dirección de recepción no es válida, compruébela de nuevo.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>La cantidad por pagar tiene que ser mayor de 0.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>La cantidad sobrepasa su saldo.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>El total sobrepasa su saldo cuando se incluye la tasa de envío de %1</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Se ha encontrado una dirección duplicada. Solo se puede enviar a cada dirección una vez por operación de envío.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation>Error: ¡Ha fallado la creación de la transacción!</translation>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Error: transacción rechazada. Puede haber ocurrido si alguna de las monedas ya estaba gastada o si ha usado una copia de wallet.dat y las monedas se gastaron en la copia pero no se han marcado así aquí.</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Envío</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>Ca&ntidad:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>&Pagar a:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>La dirección a la que enviar el pago (p. ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Etiquete esta dirección para añadirla a la libreta</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Etiqueta:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Elija una dirección de la libreta de direcciones</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Pegar dirección desde portapapeles</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Eliminar destinatario</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a GoldDiggerCoin address (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>Introduzca una dirección GoldDiggerCoin (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>Firmas - Firmar / verificar un mensaje</translation>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>&Firmar mensaje</translation>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>Puede firmar mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa vaga, ya que los ataques de phishing pueden tratar de engañarle para suplantar su identidad. Firme solo declaraciones totalmente detalladas con las que usted esté de acuerdo.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>La dirección con la que firmar el mensaje (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation>Elija una dirección de la libreta de direcciones</translation>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>Pegar dirección desde portapapeles</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Introduzca el mensaje que desea firmar aquí</translation>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation>Firma</translation>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Copiar la firma actual al portapapeles del sistema</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this GoldDiggerCoin address</source>
<translation>Firmar el mensaje para demostrar que se posee esta dirección GoldDiggerCoin</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Firmar &mensaje</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation>Limpiar todos los campos de la firma de mensaje</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Limpiar &todo</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>&Verificar mensaje</translation>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation>Introduzca la dirección para la firma, el mensaje (asegurándose de copiar tal cual los saltos de línea, espacios, tabulaciones, etc.) y la firma a continuación para verificar el mensaje. Tenga cuidado de no asumir más información de lo que dice el propio mensaje firmado para evitar fraudes basados en ataques de tipo man-in-the-middle.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>La dirección con la que se firmó el mensaje (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified GoldDiggerCoin address</source>
<translation>Verificar el mensaje para comprobar que fue firmado con la dirección GoldDiggerCoin indicada</translation>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation>Verificar &mensaje</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation>Limpiar todos los campos de la verificación de mensaje</translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a GoldDiggerCoin address (e.g. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</source>
<translation>Introduzca una dirección GoldDiggerCoin (ej. DJ7zB7c5BsB9UJLy1rKQtY7c6CQfGiaRLM)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>Haga clic en "Firmar mensaje" para generar la firma</translation>
</message>
<message>
<location line="+3"/>
<source>Enter GoldDiggerCoin signature</source>
<translation>Introduzca una firma GoldDiggerCoin</translation>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>La dirección introducida es inválida.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Verifique la dirección e inténtelo de nuevo.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>La dirección introducida no corresponde a una clave.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Se ha cancelado el desbloqueo del monedero. </translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>No se dispone de la clave privada para la dirección introducida.</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Ha fallado la firma del mensaje.</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Mensaje firmado.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>No se puede decodificar la firma.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>Compruebe la firma e inténtelo de nuevo.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>La firma no coincide con el resumen del mensaje.</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>La verificación del mensaje ha fallado.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Mensaje verificado.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The GoldDiggerCoin developers</source>
<translation>Los programadores GoldDiggerCoin</translation>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Abierto hasta %1</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation>%1/fuera de línea</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/no confirmado</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 confirmaciones</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Estado</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, transmitir a través de %n nodo</numerusform><numerusform>, transmitir a través de %n nodos</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Fuente</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Generado</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>De</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Para</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>dirección propia</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>etiqueta</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Crédito</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>disponible en %n bloque más</numerusform><numerusform>disponible en %n bloques más</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>no aceptada</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Débito</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Comisión de transacción</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Cantidad neta</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Mensaje</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Comentario</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>Identificador de transacción</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>Las monedas generadas deben esperar 120 bloques antes de que se puedan gastar. Cuando se generó este bloque, se emitió a la red para ser agregado a la cadena de bloques. Si no consigue incorporarse a la cadena, su estado cambiará a "no aceptado" y las monedas no se podrán gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque casi al mismo tiempo que el suyo.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Información de depuración</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transacción</translation>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation>entradas</translation>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Cantidad</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>verdadero</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>falso</translation>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, todavía no se ha sido difundido satisfactoriamente</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>desconocido</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Detalles de transacción</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Esta ventana muestra información detallada sobre la transacción</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Tipo</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Dirección</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Cantidad</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>Abierto hasta %1</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Fuera de línea (%1 confirmaciones)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>No confirmado (%1 de %2 confirmaciones)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Confirmado (%1 confirmaciones)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation><numerusform>El saldo recién minado estará disponible cuando venza el plazo en %n bloque más</numerusform><numerusform>El saldo recién minado estará disponible cuando venza el plazo en %n bloques más</numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Generado pero no aceptado</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Recibido con</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Recibidos de</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Enviado a</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Pago propio</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Minado</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(nd)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Fecha y hora en que se recibió la transacción.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Tipo de transacción.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Dirección de destino de la transacción.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Cantidad retirada o añadida al saldo.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Todo</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Hoy</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Esta semana</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Este mes</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Mes pasado</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Este año</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Rango...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Recibido con</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Enviado a</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>A usted mismo</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Minado</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Otra</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Introduzca una dirección o etiqueta que buscar</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Cantidad mínima</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Copiar dirección</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Copiar etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Copiar cuantía</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Copiar identificador de transacción</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Editar etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Mostrar detalles de la transacción</translation>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Exportar datos de la transacción</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Archivos de columnas separadas por coma (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Confirmado</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Fecha</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Tipo</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Dirección</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Cantidad</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Error exportando</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>No se pudo escribir en el archivo %1.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Rango:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>para</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>Enviar monedas</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation>&Exportar</translation>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation>Exportar a un archivo los datos de esta pestaña</translation>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation>Respaldo de monedero</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Datos de monedero (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Ha fallado el respaldo</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation>Se ha producido un error al intentar guardar los datos del monedero en la nueva ubicación.</translation>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation>Se ha completado con éxito la copia de respaldo</translation>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation>Los datos del monedero se han guardado con éxito en la nueva ubicación.</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>GoldDiggerCoin version</source>
<translation>Versión de GoldDiggerCoin</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Uso:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or golddiggercoind</source>
<translation>Envíar comando a -server o golddiggercoind</translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Muestra comandos
</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Recibir ayuda para un comando
</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Opciones:
</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: golddiggercoin.conf)</source>
<translation>Especificar archivo de configuración (predeterminado: golddiggercoin.conf)
</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: golddiggercoind.pid)</source>
<translation>Especificar archivo pid (predeterminado: golddiggercoin.pid)
</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Especificar directorio para los datos</translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Establecer el tamaño de caché de la base de datos en megabytes (predeterminado: 25)</translation>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 22556 or testnet: 44556)</source>
<translation>Escuchar conexiones en <puerto> (predeterminado: 22556 o testnet: 44556)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Mantener como máximo <n> conexiones a pares (predeterminado: 125)</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Conectar a un nodo para obtener direcciones de pares y desconectar</translation>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation>Especifique su propia dirección pública</translation>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: 100)</translation>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 86400)</translation>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>Ha ocurrido un error al configurar el puerto RPC %u para escucha en IPv4: %s</translation>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 22555 or testnet: 44555)</source>
<translation>Escuchar conexiones JSON-RPC en <puerto> (predeterminado: 22555 o testnet:44555)</translation>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Aceptar comandos consola y JSON-RPC
</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Correr como demonio y aceptar comandos
</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>Usar la red de pruebas
</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect)</translation>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=golddiggercoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "GoldDiggerCoin Alert" admin@foo.com
</source>
<translation>%s, debe establecer un valor rpcpassword en el archivo de configuración:
%s
Se recomienda utilizar la siguiente contraseña aleatoria:
rpcuser=golddiggercoinrpc
rpcpassword=%s
(no es necesario recordar esta contraseña)
El nombre de usuario y la contraseña DEBEN NO ser iguales.
Si el archivo no existe, créelo con permisos de archivo de solo lectura.
Se recomienda también establecer alertnotify para recibir notificaciones de problemas.
Por ejemplo: alertnotify=echo %%s | mail -s "GoldDiggerCoin Alert" admin@foo.com
</translation>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>Ha ocurrido un error al configurar el puerto RPC %u para escuchar mediante IPv6. Recurriendo a IPv4: %s</translation>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. GoldDiggerCoin is probably already running.</source>
<translation>No se puede bloquear el directorio de datos %s. Probablemente GoldDiggerCoin ya se está ejecutando.</translation>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>¡Error: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunas de las monedas del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado monedas a partir de la copia, con lo que no se habrían marcado aquí como gastadas.</translation>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation>¡Error: Esta transacción requiere una comisión de al menos %s debido a su monto, complejidad, o al uso de fondos recién recibidos!</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation>Ejecutar orden cuando se reciba un aviso relevante (%s en cmd se reemplazará por el mensaje)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation>Establecer el tamaño máximo de las transacciones de alta prioridad/comisión baja en bytes (predeterminado:27000)</translation>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>Aviso: ¡Las transacciones mostradas pueden no ser correctas! Puede necesitar una actualización o bien otros nodos necesitan actualizarse.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong GoldDiggerCoin will not work properly.</source>
<translation>Precaución: Por favor, ¡revise que la fecha y hora de su ordenador son correctas! Si su reloj está mal, GoldDiggerCoin no funcionará correctamente.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Aviso: ¡Error al leer wallet.dat! Todas las claves se han leído correctamente, pero podrían faltar o ser incorrectos los datos de transacciones o las entradas de la libreta de direcciones.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation>Aviso: ¡Recuperados datos de wallet.dat corrupto! El wallet.dat original se ha guardado como wallet.{timestamp}.bak en %s; si hubiera errores en su saldo o transacciones, deberá restaurar una copia de seguridad.</translation>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Intento de recuperar claves privadas de un wallet.dat corrupto</translation>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation>Opciones de creación de bloques:</translation>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation>Conectar sólo a los nodos (o nodo) especificados</translation>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation>Corrupción de base de datos de bloques detectada.</translation>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Descubrir dirección IP propia (predeterminado: 1 al escuchar sin -externalip)</translation>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation>¿Quieres reconstruir la base de datos de bloques ahora?</translation>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation>Error al inicializar la base de datos de bloques</translation>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation>Error al inicializar el entorno de la base de datos del monedero %s</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation>Error cargando base de datos de bloques</translation>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation>Error al abrir base de datos de bloques.</translation>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation>Error: ¡Espacio en disco bajo!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation>Error: ¡El monedero está bloqueado; no se puede crear la transacción!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation>Error: error de sistema: </translation>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation>No se ha podido leer la información de bloque</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation>No se ha podido leer el bloque</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation>No se ha podido sincronizar el índice de bloques</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation>No se ha podido escribir en el índice de bloques</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation>No se ha podido escribir la información de bloques</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation>No se ha podido escribir el bloque</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation>No se ha podido escribir la información de archivo</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation>No se ha podido escribir en la base de datos de monedas</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation>No se ha podido escribir en el índice de transacciones</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation>No se han podido escribir los datos de deshacer</translation>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation>Encontrar pares mediante búsqueda de DNS (predeterminado: 1 salvo con -connect)</translation>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation>Generar monedas (por defecto: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation>Cuántos bloques comprobar al iniciar (predeterminado: 288, 0 = todos)</translation>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation>Como es de exhaustiva la verificación de bloques (0-4, por defecto 3)</translation>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation>No hay suficientes descriptores de archivo disponibles. </translation>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation>Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales</translation>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation>Establecer el número de hilos para atender las llamadas RPC (predeterminado: 4)</translation>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation>Verificando bloques...</translation>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation>Verificando monedero...</translation>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation>Importa los bloques desde un archivo blk000??.dat externo</translation>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation>Configura el número de hilos para el script de verificación (hasta 16, 0 = auto, <0 = leave that many cores free, por fecto: 0)</translation>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation>Información</translation>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation>Dirección -tor inválida: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation>Inválido por el monto -minrelaytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation>Inválido por el monto -mintxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation>Mantener índice de transacciones completo (predeterminado: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Búfer de recepción máximo por conexión, <n>*1000 bytes (predeterminado: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Búfer de recepción máximo por conexión, , <n>*1000 bytes (predeterminado: 1000)</translation>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation>Aceptar solamente cadena de bloques que concuerde con los puntos de control internos (predeterminado: 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Conectarse solo a nodos de la red <net> (IPv4, IPv6 o Tor)</translation>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation>Mostrar información de depuración adicional. Implica todos los demás opciones -debug*</translation>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation>Mostrar información de depuración adicional</translation>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp (default: 1)</source>
<translation>Anteponer marca temporal a la información de depuración</translation>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the GoldDiggerCoin Wiki for SSL setup instructions)</source>
<translation>Opciones SSL: (ver la GoldDiggerCoin Wiki para instrucciones de configuración SSL)</translation>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation>Elija la versión del proxy socks a usar (4-5, predeterminado: 5)</translation>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>Enviar información de trazas/depuración al depurador</translation>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>Establecer tamaño máximo de bloque en bytes (predeterminado: 250000)</translation>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Establecer tamaño mínimo de bloque en bytes (predeterminado: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation>Transacción falló</translation>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Especificar el tiempo máximo de conexión en milisegundos (predeterminado: 5000)</translation>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation>Error de sistema: </translation>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation>Monto de la transacción muy pequeño</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation>Montos de transacciones deben ser positivos</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation>Transacción demasiado grande</translation>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 1 al escuchar)</translation>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation>Utilizar proxy para conectar a Tor servicios ocultos (predeterminado: igual que -proxy)</translation>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>Nombre de usuario para las conexiones JSON-RPC
</translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation>Aviso</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Aviso: Esta versión es obsoleta, actualización necesaria!</translation>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation>Necesita reconstruir las bases de datos con la opción -reindex para modificar -txindex</translation>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corrupto. Ha fallado la recuperación.</translation>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>Contraseña para las conexiones JSON-RPC
</translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Permitir conexiones JSON-RPC desde la dirección IP especificada
</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Enviar comando al nodo situado en <ip> (predeterminado: 127.0.0.1)
</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque)</translation>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation>Actualizar el monedero al último formato</translation>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Ajustar el número de claves en reserva <n> (predeterminado: 100)
</translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Volver a examinar la cadena de bloques en busca de transacciones del monedero perdidas</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>Usar OpenSSL (https) para las conexiones JSON-RPC
</translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Certificado del servidor (predeterminado: server.cert)
</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Clave privada del servidor (predeterminado: server.pem)
</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Cifrados aceptados (predeterminado: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Este mensaje de ayuda
</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>No es posible conectar con %s en este sistema (bind ha dado el error %d, %s)</translation>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation>Conectar mediante proxy socks</translation>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Permitir búsquedas DNS para -addnode, -seednode y -connect</translation>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>Cargando direcciones...</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Error al cargar wallet.dat: el monedero está dañado</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of GoldDiggerCoin</source>
<translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de GoldDiggerCoin</translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart GoldDiggerCoin to complete</source>
<translation>El monedero ha necesitado ser reescrito. Reinicie GoldDiggerCoin para completar el proceso</translation>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation>Error al cargar wallet.dat</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Dirección -proxy inválida: '%s'</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>La red especificada en -onlynet '%s' es desconocida</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Solicitada versión de proxy -socks desconocida: %i</translation>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>No se puede resolver la dirección de -bind: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>No se puede resolver la dirección de -externalip: '%s'</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Cantidad inválida para -paytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation>Cuantía no válida</translation>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation>Fondos insuficientes</translation>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Cargando el índice de bloques...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Añadir un nodo al que conectarse y tratar de mantener la conexión abierta</translation>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. GoldDiggerCoin is probably already running.</source>
<translation>No es posible conectar con %s en este sistema. Probablemente GoldDiggerCoin ya está ejecutándose.</translation>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation>Tarifa por KB que añadir a las transacciones que envíe</translation>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Cargando monedero...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation>No se puede rebajar el monedero</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation>No se puede escribir la dirección predeterminada</translation>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Reexplorando...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Generado pero no aceptado</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation>Para utilizar la opción %s</translation>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Tiene que establecer rpcpassword=<contraseña> en el fichero de configuración: ⏎
%s ⏎
Si el archivo no existe, créelo con permiso de lectura solamente del propietario.</translation>
</message>
</context>
</TS>
|
golddiggercoin/golddiggercoin
|
src/qt/locale/bitcoin_es.ts
|
TypeScript
|
mit
| 120,085
|
[
30522,
1026,
1029,
20950,
2544,
1027,
1000,
1015,
1012,
1014,
1000,
1029,
1028,
1026,
999,
9986,
13874,
24529,
1028,
1026,
24529,
2653,
1027,
1000,
9686,
1000,
2544,
1027,
1000,
1016,
1012,
1014,
1000,
1028,
1026,
12398,
16044,
2278,
1028,
21183,
2546,
1011,
1022,
1026,
1013,
12398,
16044,
2278,
1028,
1026,
6123,
1028,
1026,
2171,
1028,
2055,
27184,
8649,
1026,
1013,
2171,
1028,
1026,
4471,
1028,
1026,
3295,
5371,
18442,
1027,
1000,
1012,
1012,
1013,
3596,
1013,
2055,
27184,
8649,
1012,
21318,
1000,
2240,
1027,
1000,
1009,
2403,
1000,
1013,
1028,
1026,
3120,
1028,
2055,
2751,
4305,
13327,
3597,
2378,
1026,
1013,
3120,
1028,
1026,
5449,
1028,
9078,
18992,
2139,
2751,
4305,
13327,
3597,
2378,
1026,
1013,
5449,
1028,
1026,
1013,
4471,
1028,
1026,
4471,
1028,
1026,
3295,
2240,
1027,
1000,
1009,
4464,
1000,
1013,
1028,
1026,
3120,
1028,
1004,
8318,
1025,
1038,
1004,
14181,
1025,
2751,
4305,
13327,
3597,
2378,
1004,
8318,
1025,
1013,
1038,
1004,
14181,
1025,
2544,
1026,
1013,
3120,
1028,
1026,
5449,
1028,
2544,
2139,
1004,
8318,
1025,
1038,
1004,
14181,
1025,
2751,
4305,
13327,
3597,
2378,
1004,
8318,
1025,
1013,
1038,
1004,
14181,
1025,
1026,
1013,
5449,
1028,
1026,
1013,
4471,
1028,
1026,
4471,
1028,
1026,
3295,
2240,
1027,
1000,
1009,
5401,
1000,
1013,
1028,
1026,
3120,
1028,
2023,
2003,
6388,
4007,
1012,
5500,
2104,
1996,
10210,
1013,
1060,
14526,
4007,
6105,
1010,
2156,
1996,
10860,
5371,
24731,
2030,
8299,
1024,
1013,
1013,
7479,
1012,
7480,
8162,
30524,
8917,
1013,
1007,
1998,
19888,
13705,
4007,
2517,
2011,
4388,
2402,
1006,
19413,
2100,
1030,
19888,
6499,
6199,
1012,
4012,
1007,
1998,
2039,
16275,
4007,
2517,
2011,
2726,
6795,
1012,
1026,
1013,
3120,
1028,
1026,
5449,
1028,
28517,
9686,
4895,
4007,
6388,
1012,
4487,
3367,
3089,
8569,
13820,
8670,
5558,
2474,
5622,
27524,
7405,
10210,
1013,
1060,
14526,
1010,
2310,
2050,
3449,
7905,
20984,
4748,
19792,
3406,
24731,
1051,
8299,
1024,
1013,
1013,
7479,
1012,
7480,
8162,
3401,
1012,
8917,
1013,
15943,
1013,
10210,
1011,
6105,
1012,
25718,
1012,
28517,
4031,
2080,
4297,
7630,
6672,
4007,
4078,
2906,
28402,
9365,
18499,
7480,
14540,
2622,
11498,
10514,
2149,
2080,
4372,
3449,
7480,
14540,
6994,
23615,
1006,
8299,
1024,
1013,
1013,
7479,
1012,
7480,
14540,
1012,
8917,
1013,
1007,
1061,
4007,
13675,
11514,
3406,
17643,
8873,
3597,
9686,
26775,
9956,
18499,
4388,
2402,
1006,
19413,
2100,
1030,
19888,
6499,
6199,
1012,
4012,
1007,
1061,
3449,
4007,
2039,
16275,
9686,
26775,
9956,
18499,
2726,
6795,
1012,
1026,
1013,
5449,
1028,
1026,
1013,
4471,
1028,
1026,
4471,
1028,
1026,
3295,
5371,
18442,
1027,
1000,
1012,
1012,
1013,
2055,
27184,
8649,
1012,
18133,
2361,
1000,
2240,
1027,
1000,
1009,
2403,
1000,
1013,
1028,
1026,
3120,
1028,
9385,
1026,
1013,
3120,
1028,
1026,
5449,
1028,
9385,
1026,
1013,
5449,
1028,
1026,
1013,
4471,
1028,
30523,
3401,
1012,
8917,
1013,
15943,
1013,
10210,
1011,
6105,
1012,
25718,
1012,
2023,
4031,
2950,
4007,
2764,
2011,
1996,
7480,
14540,
2622,
2005,
2224,
1999,
1996,
7480,
14540,
6994,
23615,
1006,
8299,
1024,
1013,
1013,
7479,
1012,
7480,
14540,
1012,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
3401,
1012,
8917,
1013,
15943,
1013,
10210,
1011,
6105,
1012,
25718,
1012,
2023,
4031,
2950,
4007,
2764,
2011,
1996,
7480,
14540,
2622,
2005,
2224,
1999,
1996,
7480,
14540,
6994,
23615,
1006,
8299,
1024,
1013,
1013,
7479,
1012,
7480,
14540,
1012,
30526
] |
package edu.ncsu.csc.itrust.validate;
import edu.ncsu.csc.itrust.action.SetSecurityQuestionAction;
import edu.ncsu.csc.itrust.beans.SecurityQA;
import edu.ncsu.csc.itrust.exception.ErrorList;
import edu.ncsu.csc.itrust.exception.FormValidationException;
/**
* Validates the security question and answer. This doesn't follow the same format as the others because this
* validator is used for the various states of reset password, {@link SetSecurityQuestionAction}
*
* @author Andy
*
*/
public class SecurityQAValidator extends BeanValidator<SecurityQA> {
/**
* Performs the act of validating the bean in question, which varies depending on the
* type of validator. If the validation does not succeed, a {@link FormValidationException} is thrown.
*
* @param p A bean of the type to be validated.
*/
@Override
public void validate(SecurityQA bean) throws FormValidationException {
ErrorList errorList = new ErrorList();
if (null == bean)
throw new FormValidationException("Null form");
if (null == bean.getConfirmAnswer())
throw new FormValidationException("Confirm answer cannot be empty");
if (!bean.getAnswer().equals(bean.getConfirmAnswer()))
throw new FormValidationException("Security answers do not match");
errorList.addIfNotNull(checkFormat("Security Question", bean.getQuestion(),
ValidationFormat.QUESTION, false));
errorList.addIfNotNull(checkFormat("Security Answer", bean.getAnswer(), ValidationFormat.ANSWER,
false));
if (errorList.hasErrors())
throw new FormValidationException(errorList);
}
}
|
qynnine/JDiffOriginDemo
|
examples/iTrust_v11/edu/ncsu/csc/itrust/validate/SecurityQAValidator.java
|
Java
|
lgpl-2.1
| 1,615
|
[
30522,
7427,
3968,
2226,
1012,
13316,
6342,
1012,
20116,
2278,
1012,
2009,
7946,
2102,
1012,
9398,
3686,
1025,
12324,
3968,
2226,
1012,
13316,
6342,
1012,
20116,
2278,
1012,
2009,
7946,
2102,
1012,
2895,
1012,
4520,
8586,
25137,
15500,
3258,
18908,
3258,
1025,
12324,
3968,
2226,
1012,
13316,
6342,
1012,
20116,
2278,
1012,
2009,
7946,
2102,
1012,
13435,
1012,
3036,
19062,
1025,
12324,
3968,
2226,
1012,
13316,
6342,
1012,
20116,
2278,
1012,
2009,
7946,
2102,
1012,
6453,
1012,
7561,
9863,
1025,
12324,
3968,
2226,
1012,
13316,
6342,
1012,
20116,
2278,
1012,
2009,
7946,
2102,
1012,
6453,
1012,
2433,
10175,
8524,
3508,
10288,
24422,
1025,
1013,
1008,
1008,
1008,
9398,
8520,
1996,
3036,
3160,
1998,
3437,
1012,
2023,
2987,
1005,
1056,
3582,
1996,
2168,
4289,
2004,
1996,
2500,
2138,
2023,
1008,
9398,
8844,
2003,
2109,
2005,
1996,
2536,
2163,
1997,
25141,
20786,
1010,
1063,
1030,
4957,
4520,
8586,
25137,
15500,
3258,
18908,
3258,
1065,
1008,
1008,
1030,
3166,
5557,
1008,
1008,
1013,
2270,
2465,
3036,
19062,
10175,
8524,
4263,
8908,
14068,
10175,
8524,
4263,
1026,
3036,
19062,
1028,
1063,
1013,
1008,
1008,
1008,
10438,
1996,
2552,
1997,
9398,
5844,
1996,
14068,
1999,
3160,
1010,
2029,
9783,
5834,
2006,
1996,
1008,
2828,
1997,
9398,
8844,
1012,
2065,
1996,
27354,
2515,
2025,
9510,
1010,
1037,
1063,
1030,
4957,
2433,
10175,
8524,
3508,
10288,
24422,
1065,
2003,
6908,
1012,
1008,
1008,
1030,
11498,
2213,
1052,
1037,
14068,
1997,
1996,
2828,
2000,
2022,
9398,
4383,
1012,
1008,
1013,
1030,
2058,
15637,
2270,
11675,
9398,
3686,
1006,
3036,
19062,
14068,
1007,
11618,
2433,
10175,
8524,
3508,
10288,
24422,
1063,
7561,
30524,
1007,
1025,
2065,
1006,
19701,
1027,
1027,
14068,
1007,
5466,
2047,
2433,
10175,
8524,
3508,
10288,
24422,
1006,
1000,
19701,
2433,
1000,
1007,
1025,
2065,
1006,
19701,
1027,
1027,
14068,
1012,
2131,
8663,
27972,
6962,
13777,
1006,
1007,
1007,
5466,
2047,
2433,
10175,
8524,
3508,
10288,
24422,
1006,
1000,
12210,
3437,
3685,
2022,
4064,
1000,
1007,
1025,
2065,
1006,
999,
14068,
1012,
2131,
6962,
13777,
1006,
1007,
1012,
19635,
1006,
14068,
1012,
2131,
8663,
27972,
6962,
13777,
1006,
1007,
1007,
1007,
5466,
2047,
2433,
10175,
8524,
3508,
10288,
24422,
1006,
1000,
3036,
6998,
2079,
2025,
2674,
1000,
1007,
1025,
7561,
9863,
1012,
5587,
10128,
17048,
11231,
3363,
1006,
4638,
14192,
4017,
1006,
1000,
3036,
3160,
1000,
1010,
14068,
1012,
2131,
15500,
3258,
1006,
1007,
1010,
27354,
14192,
4017,
1012,
3160,
1010,
6270,
1007,
1007,
1025,
7561,
9863,
1012,
5587,
10128,
17048,
11231,
3363,
1006,
4638,
14192,
4017,
1006,
1000,
3036,
3437,
1000,
1010,
14068,
1012,
2131,
6962,
13777,
1006,
1007,
1010,
27354,
14192,
4017,
1012,
3437,
1010,
6270,
1007,
1007,
1025,
2065,
1006,
7561,
9863,
1012,
2038,
2121,
29165,
2015,
1006,
1007,
1007,
5466,
2047,
2433,
10175,
8524,
3508,
10288,
24422,
1006,
7561,
9863,
1007,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
9863,
7561,
9863,
1027,
2047,
7561,
9863,
1006,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
9863,
7561,
9863,
1027,
2047,
7561,
9863,
1006,
30526
] |
module BetterResponder
class Responder
def initialize(context)
@context = context
end
def run(condition, success_render, fail_render = nil)
provide_response condition ? [success_render, :success] : [fail_render || success_render, :fail]
end
private
def provide_response(params)
render_params = params.first
render_type = params[1]
method = render_params.keys.first
@context.send method, render_params[method], :"#{flash_type(render_type)}" => I18n.t(message_builder(render_type))
end
def message_builder(type)
"responder.#{controller_name}.#{action_name}.#{type}"
end
def action_name
@context.params[:action]
end
def controller_name
@context.class.name.underscore.split("_").first
end
def flash_type(render_type)
h = {success: :notice, fail: :alert}
h[render_type.to_sym]
end
end
end
|
sergio1990/better_responder
|
lib/better_responder/responder.rb
|
Ruby
|
mit
| 922
|
[
30522,
11336,
2488,
6072,
26029,
4063,
2465,
6869,
2121,
13366,
3988,
4697,
1006,
6123,
1007,
1030,
6123,
1027,
6123,
2203,
13366,
2448,
1006,
4650,
1010,
3112,
1035,
17552,
1010,
8246,
1035,
17552,
1027,
9152,
2140,
1007,
3073,
1035,
3433,
4650,
1029,
1031,
3112,
1035,
17552,
1010,
1024,
3112,
1033,
1024,
1031,
8246,
1035,
17552,
1064,
1064,
3112,
1035,
17552,
1010,
1024,
8246,
1033,
2203,
2797,
13366,
3073,
1035,
3433,
1006,
11498,
5244,
1007,
17552,
1035,
11498,
5244,
1027,
11498,
5244,
1012,
2034,
17552,
1035,
2828,
1027,
11498,
5244,
1031,
1015,
1033,
4118,
1027,
17552,
1035,
11498,
5244,
1012,
6309,
1012,
2034,
1030,
6123,
1012,
4604,
4118,
1010,
17552,
1035,
11498,
5244,
1031,
4118,
1033,
1010,
1024,
1000,
1001,
1063,
5956,
1035,
2828,
1006,
17552,
1035,
2828,
1007,
1065,
1000,
1027,
1028,
1045,
15136,
2078,
1012,
1056,
1006,
4471,
1035,
12508,
1006,
17552,
1035,
2828,
1007,
1007,
2203,
13366,
4471,
1035,
12508,
30524,
1012,
2171,
1012,
2104,
9363,
2890,
1012,
3975,
1006,
1000,
1035,
1000,
1007,
1012,
2034,
2203,
13366,
5956,
1035,
2828,
1006,
17552,
1035,
2828,
1007,
1044,
1027,
1063,
3112,
1024,
1024,
5060,
1010,
8246,
1024,
1024,
9499,
1065,
1044,
1031,
17552,
1035,
2828,
1012,
2000,
1035,
25353,
2213,
1033,
2203,
2203,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
1006,
2828,
1007,
1000,
6869,
2121,
1012,
1001,
1063,
11486,
1035,
2171,
1065,
1012,
1001,
1063,
2895,
1035,
2171,
1065,
1012,
1001,
1063,
2828,
1065,
1000,
2203,
13366,
2895,
1035,
2171,
1030,
6123,
1012,
11498,
5244,
1031,
1024,
2895,
1033,
2203,
13366,
11486,
1035,
2171,
1030,
6123,
1012,
2465,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1006,
2828,
1007,
1000,
6869,
2121,
1012,
1001,
1063,
11486,
1035,
2171,
1065,
1012,
1001,
1063,
2895,
1035,
2171,
1065,
1012,
1001,
1063,
2828,
1065,
1000,
2203,
13366,
2895,
1035,
2171,
1030,
6123,
1012,
11498,
5244,
1031,
1024,
2895,
1033,
2203,
13366,
11486,
1035,
2171,
1030,
6123,
1012,
2465,
30526
] |
define(
({
map: {
error: "Karte kann nicht erstellt werden",
mouseToolTip: "Klicken Sie auf die Karte, um den Service zu überprüfen"
},
geocoder: {
defaultText: "Geben Sie eine Adresse oder einen Point of Interest ein"
},
error: {
layerNotFound: "Layer ist nicht in der Webkarte enthalten",
fieldNotFound: "Feld nicht gefunden",
popupNotSet: "Pop-up ist für diesen Layer nicht aktiviert",
noLayersSet: "In der Konfiguration wurden keine Layer definiert; das Suchfeld funktioniert nicht"
},
page: {
title: "Informationssuche",
},
splashscreen: {
buttonText: "OK",
},
ui:{
basemapButton: "Grundkarte"
},
popup: {
urlMoreInfo: "Weitere Informationen"
}
})
);
|
MikeMillerGIS/information-lookup
|
js/nls/de/resources.js
|
JavaScript
|
apache-2.0
| 916
|
[
30522,
9375,
1006,
1006,
1063,
4949,
1024,
1063,
7561,
1024,
1000,
10556,
19731,
22827,
2078,
27969,
11039,
9413,
13473,
3363,
2102,
2057,
18246,
1000,
1010,
8000,
3406,
27914,
11514,
1024,
1000,
1047,
25230,
2368,
9033,
2063,
21200,
3280,
10556,
19731,
1010,
8529,
7939,
2326,
16950,
19169,
18098,
16093,
2368,
1000,
1065,
1010,
20248,
16044,
2099,
1024,
1063,
12398,
18209,
1024,
1000,
16216,
10609,
9033,
2063,
27665,
4748,
8303,
2063,
27215,
27665,
2078,
2391,
1997,
3037,
16417,
1000,
1065,
1010,
7561,
1024,
1063,
6741,
17048,
14876,
8630,
1024,
1000,
6741,
21541,
27969,
11039,
1999,
4315,
4773,
6673,
2618,
4372,
24090,
6528,
1000,
1010,
2492,
17048,
14876,
8630,
1024,
1000,
10768,
6392,
27969,
11039,
16216,
11263,
25915,
1000,
1010,
3769,
6279,
17048,
13462,
1024,
1000,
3769,
1011,
2039,
21541,
6519,
8289,
2368,
6741,
27969,
11039,
17712,
29068,
3771,
2102,
1000,
1010,
2053,
24314,
11393,
2102,
1024,
1000,
1999,
4315,
12849,
2078,
8873,
27390,
3370,
8814,
18246,
26679,
2638,
6741,
13366,
5498,
8743,
1025,
8695,
2107,
8151,
11962,
3508,
3771,
2102,
27969,
11039,
1000,
1065,
1010,
3931,
1024,
1063,
2516,
1024,
1000,
2592,
4757,
19140,
1000,
1010,
1065,
30524,
2618,
1000,
1065,
1010,
3769,
6279,
1024,
1063,
24471,
13728,
5686,
2378,
14876,
1024,
1000,
11417,
3334,
2063,
2592,
2368,
1000,
1065,
1065,
1007,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1010,
17624,
18182,
1024,
1063,
6462,
18209,
1024,
1000,
7929,
1000,
1010,
1065,
1010,
21318,
1024,
1063,
2918,
2863,
2361,
8569,
15474,
1024,
1000,
24665,
8630,
6673,
30526
] |
import React, { Component } from 'react';
class Home extends Component {
render () {
return (
<div>
<h1>Home</h1>
<p>Bienvenidos!!!</p>
<pre>{`
{
path: '/',
pathExact: true,
component: Home
},
{
path: '/pageOne',
pathExact: true,
component: PageOne
},
{
path: '/pageTwo',
pathExact: true,
component: PageTwo
},
{
path: '/pageThree',
pathExact: true,
auth: true,
component: PageThree,
routes: [
// PAGE 3/ADD
{
path: '/pageThree/add',
pathExact: true,
auth: true,
component: PageThreeAdd
},
// PAGE 4
{
path: '/pageFour/:id/:action',
auth: true,
component: PageFour
}
]
},
// 404 NOT FOUND
{
component: NotFound
}
`}
</pre>
</div>
);
}
}
export default Home;
|
gabriel-lopez-lopez/dynamic-react-route
|
dynamic-react-router demo/src/Components/Home/index.js
|
JavaScript
|
mit
| 1,789
|
[
30522,
12324,
10509,
1010,
1063,
6922,
1065,
2013,
1005,
10509,
1005,
1025,
2465,
2188,
8908,
6922,
1063,
17552,
1006,
1007,
1063,
2709,
1006,
1026,
4487,
2615,
1028,
1026,
1044,
2487,
1028,
2188,
1026,
1013,
1044,
2487,
1028,
1026,
1052,
1028,
29316,
8159,
13820,
2015,
999,
999,
999,
1026,
1013,
1052,
1028,
1026,
3653,
1028,
1063,
1036,
1063,
4130,
1024,
1005,
1013,
1005,
1010,
4130,
10288,
18908,
1024,
2995,
1010,
6922,
1024,
2188,
1065,
1010,
1063,
4130,
1024,
1005,
1013,
3931,
5643,
1005,
1010,
4130,
10288,
18908,
1024,
2995,
1010,
6922,
1024,
3931,
5643,
1065,
1010,
1063,
4130,
1024,
1005,
1013,
3931,
2102,
12155,
1005,
1010,
4130,
10288,
18908,
1024,
2995,
1010,
6922,
1024,
3931,
2102,
12155,
1065,
1010,
1063,
4130,
1024,
1005,
1013,
3931,
2705,
9910,
1005,
1010,
4130,
10288,
18908,
1024,
2995,
1010,
8740,
2705,
1024,
2995,
1010,
6922,
1024,
3931,
2705,
9910,
1010,
5847,
1024,
1031,
1013,
1013,
3931,
1017,
1013,
5587,
1063,
4130,
1024,
1005,
1013,
3931,
2705,
9910,
1013,
5587,
1005,
1010,
4130,
10288,
18908,
1024,
2995,
1010,
8740,
2705,
1024,
2995,
1010,
6922,
1024,
3931,
2705,
9910,
4215,
2094,
1065,
1010,
1013,
1013,
3931,
1018,
1063,
4130,
1024,
1005,
1013,
3931,
14876,
3126,
1013,
1024,
8909,
1013,
1024,
2895,
1005,
1010,
8740,
2705,
1024,
2995,
1010,
6922,
1024,
3931,
14876,
3126,
1065,
1033,
1065,
1010,
1013,
1013,
24837,
2025,
2179,
1063,
6922,
1024,
2025,
14876,
8630,
1065,
1036,
1065,
1026,
1013,
3653,
1028,
1026,
1013,
4487,
2615,
1028,
1007,
1025,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ngrinder.region.service;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.Maps;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.cluster.Member;
import lombok.RequiredArgsConstructor;
import net.grinder.util.NetworkUtils;
import org.apache.commons.lang.StringUtils;
import org.ngrinder.common.constant.ClusterConstants;
import org.ngrinder.common.exception.NGrinderRuntimeException;
import org.ngrinder.infra.config.Config;
import org.ngrinder.infra.hazelcast.HazelcastService;
import org.ngrinder.infra.hazelcast.task.RegionInfoTask;
import org.ngrinder.region.model.RegionInfo;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import java.util.*;
import java.util.concurrent.TimeUnit;
import static java.util.Collections.emptyList;
import static java.util.Collections.emptySet;
import static java.util.stream.Collectors.toList;
import static org.apache.commons.lang.StringUtils.isEmpty;
import static org.ngrinder.common.constant.CacheConstants.*;
import static org.ngrinder.common.util.ExceptionUtils.processException;
import static org.ngrinder.common.util.RegionUtils.convertSubregionsStringToSet;
/**
* Region service class. This class responsible to keep the status of available regions.
*
* @since 3.1
*/
@Service
@RequiredArgsConstructor
public class RegionService {
private final Config config;
private final HazelcastService hazelcastService;
private final HazelcastInstance hazelcastInstance;
private final Supplier<Map<String, RegionInfo>> allRegions = Suppliers.memoizeWithExpiration(new Supplier<Map<String, RegionInfo>>() {
@Override
public Map<String, RegionInfo> get() {
Map<String, RegionInfo> regions = Maps.newHashMap();
if (config.isClustered()) {
List<RegionInfo> regionInfos = hazelcastService.submitToAllRegion(REGION_EXECUTOR_SERVICE_NAME, new RegionInfoTask());
for (RegionInfo regionInfo : regionInfos) {
regions.put(regionInfo.getRegionName(), regionInfo);
}
} else {
final String regionIP = StringUtils.defaultIfBlank(config.getCurrentIP(), NetworkUtils.DEFAULT_LOCAL_HOST_ADDRESS);
regions.put(config.getRegion(), new RegionInfo(config.getRegion(), emptySet(), regionIP, config.getControllerPort()));
}
return regions;
}
}, REGION_CACHE_TIME_TO_LIVE_SECONDS, TimeUnit.SECONDS);
private final Supplier<List<Map<String, String>>> allRegionNames = Suppliers.memoizeWithExpiration(new Supplier<List<Map<String, String>>>() {
@Override
public List<Map<String, String>> get() {
Set<Member> members = hazelcastInstance.getCluster().getMembers();
List<Map<String, String>> regionNames = new ArrayList<>();
for (Member member : members) {
if (member.getAttributes().containsKey(REGION_ATTR_KEY)) {
Map<String, String> regionMap = new HashMap<>();
regionMap.put(REGION_ATTR_KEY, member.getAttributes().get(REGION_ATTR_KEY));
regionMap.put(SUBREGION_ATTR_KEY, member.getAttributes().get(SUBREGION_ATTR_KEY));
regionNames.add(regionMap);
}
}
return regionNames;
}
}, REGION_CACHE_TIME_TO_LIVE_SECONDS, TimeUnit.SECONDS);
@PostConstruct
public void initRegion() {
if (config.isClustered()) {
verifyDuplicatedRegion();
}
}
/**
* Verify duplicate region when starting with cluster mode.
*
* @since 3.2
*/
private void verifyDuplicatedRegion() {
Map<String, RegionInfo> regions = getAll();
String localRegion = getCurrent();
RegionInfo regionInfo = regions.get(localRegion);
if (regionInfo != null && !StringUtils.equals(regionInfo.getIp(), config.getClusterProperties().getProperty
(ClusterConstants.PROP_CLUSTER_HOST, NetworkUtils.DEFAULT_LOCAL_HOST_ADDRESS))) {
throw processException("The region name, " + localRegion
+ ", is already used by other controller " + regionInfo.getIp()
+ ". Please set the different region name in this controller.");
}
}
/**
* Get current region. This method returns where this service is running.
*
* @return current region.
*/
public String getCurrent() {
return config.getRegion();
}
/**
* Get region by region name
*
* @param regionName region name
* @return region info
*/
public RegionInfo getOne(String regionName) {
RegionInfo regionInfo = getAll().get(regionName);
if (regionInfo != null) {
return regionInfo;
}
throw new NGrinderRuntimeException(regionName + " is not exist");
}
public RegionInfo getOne(String region, String subregion) {
if (isEmpty(subregion)) {
return getOne(region);
}
RegionInfo regionInfo = getAll().get(region);
if (regionInfo != null) {
if (isEmpty(subregion) || regionInfo.getSubregion().contains(subregion)) {
return regionInfo;
}
}
throw new NGrinderRuntimeException(region + "." + subregion + " is not exist");
}
/**
* Get region list of all clustered controller.
*
* @return region list
*/
public Map<String, RegionInfo> getAll() {
return allRegions.get();
}
public List<Map<String, Object>> getAllVisibleRegionNames() {
if (config.isClustered()) {
return allRegionNames.get().stream().map(region -> {
Map<String, Object> regionInfo = new HashMap<>();
String subregionAttributes = region.get(SUBREGION_ATTR_KEY);
regionInfo.put(REGION_ATTR_KEY, region.get(REGION_ATTR_KEY));
regionInfo.put(SUBREGION_ATTR_KEY, convertSubregionsStringToSet(subregionAttributes));
return regionInfo;
}).collect(toList());
} else {
return emptyList();
}
}
public Config getConfig() {
return config;
}
}
|
naver/ngrinder
|
ngrinder-controller/src/main/java/org/ngrinder/region/service/RegionService.java
|
Java
|
apache-2.0
| 6,162
|
[
30522,
1013,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
7427,
8917,
1012,
12835,
6657,
4063,
1012,
2555,
1012,
2326,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
2918,
1012,
17024,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
2918,
1012,
20141,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
8145,
1012,
7341,
1025,
12324,
4012,
1012,
14015,
10526,
1012,
4563,
1012,
14015,
10526,
7076,
26897,
1025,
12324,
4012,
1012,
14015,
10526,
1012,
9324,
1012,
2266,
1025,
12324,
8840,
13344,
2243,
1012,
3223,
2906,
5620,
8663,
3367,
6820,
16761,
1025,
12324,
5658,
1012,
23088,
2121,
1012,
21183,
4014,
1012,
2897,
21823,
4877,
1025,
12324,
8917,
1012,
15895,
1012,
7674,
1012,
11374,
1012,
5164,
21823,
4877,
1025,
12324,
8917,
1012,
12835,
6657,
4063,
1012,
2691,
1012,
5377,
1012,
9324,
8663,
12693,
3215,
1025,
12324,
8917,
1012,
12835,
6657,
4063,
1012,
2691,
1012,
6453,
1012,
12835,
6657,
4063,
15532,
7292,
10288,
24422,
1025,
12324,
8917,
1012,
12835,
6657,
4063,
1012,
1999,
27843,
1012,
9530,
8873,
2290,
1012,
9530,
8873,
2290,
1025,
12324,
8917,
1012,
12835,
6657,
4063,
1012,
1999,
27843,
1012,
14015,
10526,
1012,
14015,
10526,
8043,
7903,
2063,
1025,
12324,
8917,
1012,
12835,
6657,
4063,
1012,
1999,
27843,
1012,
14015,
10526,
1012,
4708,
1012,
2555,
2378,
14876,
10230,
2243,
1025,
12324,
8917,
1012,
12835,
6657,
4063,
1012,
2555,
1012,
2944,
1012,
2555,
2378,
14876,
1025,
12324,
8917,
1012,
3500,
15643,
6198,
1012,
12991,
13874,
1012,
2326,
1025,
12324,
9262,
2595,
1012,
5754,
17287,
3508,
1012,
2695,
8663,
3367,
6820,
6593,
1025,
12324,
30524,
12324,
9262,
1012,
21183,
4014,
1012,
16483,
1012,
2051,
19496,
2102,
1025,
12324,
10763,
9262,
1012,
21183,
4014,
1012,
6407,
1012,
4064,
9863,
1025,
12324,
10763,
9262,
1012,
21183,
4014,
1012,
6407,
1012,
4064,
13462,
1025,
12324,
10763,
9262,
1012,
21183,
4014,
1012,
5460,
1012,
14256,
1012,
2000,
9863,
1025,
12324,
10763,
8917,
1012,
15895,
1012,
7674,
1012,
11374,
1012,
5164,
21823,
4877,
1012,
2003,
6633,
13876,
2100,
1025,
12324,
10763,
8917,
1012,
12835,
6657,
4063,
1012,
2691,
1012,
5377,
1012,
17053,
8663,
12693,
3215,
1012,
1008,
1025,
12324,
10763,
8917,
1012,
12835,
6657,
4063,
1012,
2691,
1012,
21183,
4014,
1012,
6453,
21823,
4877,
1012,
2832,
10288,
24422,
1025,
12324,
10763,
8917,
1012,
12835,
6657,
4063,
1012,
2691,
1012,
21183,
4014,
1012,
2555,
30523,
9262,
1012,
21183,
4014,
1012,
1008,
1025,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
9262,
1012,
21183,
4014,
1012,
1008,
1025,
30526
] |
<?php
/**
* @copyright (C) 2013 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html)
* @author iJoomla.com <webmaster@ijoomla.com>
* @url https://www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at https://www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die('Restricted access');
class CTableActivity extends JTable
{
public $id = null;
public $actor = null;
public $actors = null;
public $target = null;
public $title = null;
public $content = null;
public $app = null;
public $cid = null;
/* Action verbs, http://activitystrea.ms/registry/verbs/ */
public $verb = null;
/* Object, http://activitystrea.ms/registry/object_types/
* for now, must match one of our tablse
*/
public $object = null;
/* Object ids */
public $groupid = null;
public $eventid = null;
public $group_access = null;
public $event_access = null;
public $created = null;
public $access = null;
public $params = null;
public $points = null;
public $archived = null;
public $location = null;
public $latitude = null;
public $longitude = null;
public $comment_id = null;
public $comment_type = null;
public $like_id = null;
public $like_type = null;
/*
* Fields below is bind by /libraries/activities.php during the getActivities
* query. It won't be available if we just call JTable::getInstance();
*/
private $_daydiff = null;
private $_comment_count = null;
private $_comment_date = null;
private $_comment_last = null;
private $_comment_last_by = null;
private $_comment_last_id = null;
private $_likes = null;
/**
* Constructor
*/
public function __construct( &$db )
{
parent::__construct( '#__community_activities', 'id', $db );
}
public function load($id=null, $loadDayDiff = false)
{
if(!$loadDayDiff){
return parent::load($id);
}
// Require day diff
$db = &$this->getDBO();
$date = JFactory::getDate();
$sql = 'SELECT a.*, TO_DAYS('.$db->Quote($date->toSql(true)).') - TO_DAYS( DATE_ADD(a.' . $db->quoteName('created').', INTERVAL '.$date->getOffset()." HOUR ) ) as '_daydiff' "
.' FROM ' . $db->quoteName('#__community_activities') . ' as a '
." WHERE " . $db->quoteName( 'id' ) . '=' . $db->Quote( $id );
$db->setQuery( $sql );
$result = $db->loadObject();
parent::bind($result);
return (!is_null($result));
}
/**
* Bind all private date before we pass it to Joomla
*/
public function bind($data, $ignore = array())
{
foreach($data as $key => $val){
// Only set the property if they are part of this class
// This helps in development where new table column might be
// in the db, but the code might refer to the old table structure
if(property_exists( $this, $key )){
$this->$key = $val;
}
}
return parent::bind($data);
}
/**
* Return public vars
*
* @param [type] $varname [description]
* @return [type] [description]
*/
public function __get($varname)
{
switch($varname)
{
case 'location':
return $this->getLocation();
break;
case 'commentCount':
return $this->getCommentCount();
break;
case 'commentAllowed':
return $this->allowComment();
break;
case 'commentLast':
return $this->getLastComment();
break;
case 'likeCount':
return $this->getLikeCount();
case 'likeAllowed':
return $this->allowLike();
break;
case 'userLiked':
$my = CFactory::getUser();
return $this->userLiked($my->id);
break;
}
}
/**
* Return the difference (in days) from theis activity and today
*/
public function getDayDiff()
{
return $this->_daydiff;
}
/**
* Return CLocation object,
* for now, just return the address
*/
public function getLocation()
{
if(!empty($this->location)){
// If only valid location needed, we should check with CMapping library
return $this->location;
}
return '';
}
// Return true if current user is allowed to delete this activity
public function allowDelete()
{
// Community owner can always delete this
if( COwnerHelper::isCommunityAdmin() ){
return true;
}
$my = CFactory::getUser();
$allowDelete = (($this->actor == $my->id) || COwnerHelper::isCommunityAdmin() || ($this->target == $my->id) );
// Allow system message deletion only for admin
if($this->app == 'users.featured'){
$allowDelete = COwnerHelper::isCommunityAdmin();
}
return $allowDelete;
}
/**
* Return true if 'like' system is allowed in this activity
*/
public function allowLike()
{
// A guest naturally cannot like
$my = CFactory::getUser();
if($my->id == 0){return false;}
return (!empty($this->like_id) && !empty($this->like_type));
}
/**
* Return current like count
*/
public function getLikeCount()
{
// explode on empty string still gives us 1 array item
$likes = trim($this->_likes, ', ');
if(empty($likes)){
return 0;
}
$likes = explode(',', $likes);
return count($likes);
}
/**
* Return true if comment is allowed here
*
* If the comment_id and comment_type is specified, we can assume the caommenting is
* allowed
*/
public function allowComment()
{
// // A guest naturally cannot comment
$my = CFactory::getUser();
if($my->id == 0){return false;}
return (!empty($this->comment_id) && !empty($this->comment_type));
}
/**
* Return number of comments for this stream
*/
public function getCommentCount()
{
return $this->_comment_count;
}
/**
*
*/
public function getLastComment()
{
//return $this->_comment_last;
$wall = new stdClass();
$wall->id = $this->_comment_last_id;
$wall->date = $this->_comment_date;
$wall->post_by = $this->_comment_last_by;
$wall->comment = $this->_comment_last;
$wall->contentid = $this->id;
return CWall::formatComment($wall);
}
/**
* Return the id of the last replier
*/
public function getLastCommentBy($wall)
{
return $this->_comment_last_by;
}
/**
* Store the data
*/
public function store($updateNulls = false)
{
$today = JFactory::getDate();
$this->created = $today->toSql();
// If this is a new stream, we need to trigger an event
if(is_null($this->id))
{
// Trigger for onBeforeStreamCreate event.
$appsLib = CAppPlugins::getInstance();
$appsLib->loadApplications();
$params = array();
$params[] = &$this;
$result = $appsLib->triggerEvent( 'onBeforeStreamCreate' , $params);
if( in_array( true , $result ) || empty($result) )
{
return parent::store();
}
// A plugin disallow stream insert
return false;
}
return parent::store();
}
/**
* Deletes specific activity from the system.
*
* @param string $app Unique application string
*/
public function delete( $app = null )
{
// delete 'attachment'.
// attachment is link to this exact stream and not linked anywhere else
$registry = new JRegistry($this->params);
$attachment = $registry->get('attachment');
if(!empty($attachment)){
JFile::delete($attachment);
}
if($app == null){
return parent::delete();
}
// Trigger for onBeforeStreamDelete event.
//CFactory::load( 'libraries' , 'apps' );
$appsLib = CAppPlugins::getInstance();
$appsLib->loadApplications();
$params = array();
$params[] = &$this;
$result = $appsLib->triggerEvent( 'onBeforeStreamDelete' , $params);
if( in_array( true , $result ) || empty($result) )
{
if( $this->cid!= 0 && strpos($this->title,'{multiple}') ){
// Delete related activities
$db = JFactory::getDBO();
$query = 'DELETE FROM ' . $db->quoteName( '#__community_activities' ) . ' '
. 'WHERE ' . $db->quoteName( 'app' ) . '=' . $db->Quote( $app ) . ' '
. 'AND ' . $db->quoteName( 'cid' ) . '=' . $db->Quote( $this->cid );
$db->setQuery( $query );
$db->Query();
}
// Delete the current activity
parent::delete();
return true;
}
// A plugin disallow stream insert
return false;
}
/**
* Return 1 if user already liked this activity
*
*/
public function userLiked($userId){
// Check if user already like
$likesInArray = explode( ',', trim( $this->_likes, ',' ));
if( in_array( $userId, $likesInArray ) )
{
// Return 1, the user is liked
return COMMUNITY_LIKE;
}
// Return -1 as neutral
return COMMUNITY_UNLIKE;
}
}
|
mere/fracturedplanet
|
components/com_community/tables/activity.php
|
PHP
|
gpl-2.0
| 8,631
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
1030,
9385,
1006,
1039,
1007,
2286,
1045,
5558,
5358,
2721,
1010,
4297,
1012,
30524,
1030,
6105,
27004,
2236,
2270,
6105,
1010,
2544,
1016,
1006,
8299,
1024,
1013,
1013,
7479,
1012,
27004,
1012,
8917,
1013,
15943,
1013,
14246,
2140,
1011,
1016,
1012,
1014,
1012,
16129,
1007,
1008,
1030,
3166,
1045,
5558,
5358,
2721,
1012,
4012,
1026,
4773,
8706,
1030,
1045,
5558,
5358,
2721,
1012,
4012,
1028,
1008,
1030,
24471,
2140,
16770,
1024,
1013,
1013,
7479,
1012,
8183,
5244,
10085,
4818,
1012,
4012,
1013,
6105,
1011,
3820,
1008,
1996,
25718,
3642,
8810,
2024,
5500,
2104,
1996,
14246,
2140,
6105,
1012,
2065,
2025,
4728,
3090,
1010,
2035,
4871,
1010,
6410,
2015,
1010,
25222,
3540,
4667,
2806,
8697,
1010,
1998,
2443,
9262,
22483,
1008,
2024,
2025,
14246,
2140,
1010,
1998,
2024,
2207,
2104,
1996,
1045,
5558,
5358,
2721,
16350,
2224,
6105,
1058,
2487,
1012,
1014,
1008,
2062,
18558,
2012,
16770,
1024,
1013,
1013,
7479,
1012,
8183,
5244,
10085,
4818,
1012,
4012,
1013,
6105,
1011,
3820,
1008,
1013,
4225,
1006,
1005,
1035,
15333,
2595,
8586,
1005,
1007,
2030,
3280,
1006,
1005,
7775,
3229,
1005,
1007,
1025,
2465,
14931,
3085,
18908,
7730,
8908,
1046,
10880,
1063,
2270,
1002,
8909,
1027,
19701,
1025,
2270,
1002,
3364,
1027,
19701,
1025,
2270,
1002,
5889,
1027,
19701,
1025,
2270,
1002,
4539,
1027,
19701,
1025,
2270,
1002,
2516,
1027,
19701,
1025,
2270,
1002,
4180,
1027,
19701,
1025,
2270,
1002,
10439,
1027,
19701,
1025,
2270,
1002,
28744,
1027,
19701,
1025,
1013,
1008,
2895,
16025,
1010,
8299,
1024,
1013,
1013,
4023,
3367,
16416,
1012,
5796,
1013,
15584,
1013,
16025,
1013,
1008,
1013,
2270,
1002,
12034,
1027,
19701,
1025,
1013,
1008,
4874,
1010,
8299,
1024,
1013,
1013,
4023,
3367,
16416,
1012,
5796,
1013,
15584,
1013,
4874,
1035,
4127,
1013,
1008,
2005,
2085,
1010,
2442,
2674,
2028,
1997,
2256,
21628,
4877,
2063,
1008,
1013,
2270,
1002,
4874,
1027,
19701,
1025,
1013,
1008,
4874,
8909,
2015,
1008,
1013,
2270,
1002,
2177,
3593,
1027,
19701,
1025,
2270,
1002,
2724,
3593,
1027,
19701,
1025,
2270,
1002,
2177,
1035,
3229,
1027,
19701,
1025,
2270,
1002,
2724,
1035,
3229,
1027,
19701,
1025,
2270,
1002,
2580,
1027,
19701,
1025,
2270,
1002,
3229,
1027,
19701,
1025,
2270,
1002,
11498,
5244,
1027,
19701,
1025,
2270,
1002,
2685,
1027,
19701,
1025,
2270,
1002,
9749,
1027,
19701,
1025,
2270,
1002,
3295,
1027,
19701,
1025,
2270,
1002,
15250,
1027,
19701,
1025,
2270,
1002,
20413,
1027,
19701,
1025,
2270,
1002,
7615,
1035,
8909,
1027,
19701,
1025,
2270,
1002,
7615,
1035,
2828,
1027,
19701,
1025,
2270,
1002,
2066,
1035,
8909,
1027,
19701,
1025,
2270,
1002,
2066,
1035,
2828,
1027,
19701,
1025,
1013,
1008,
1008,
4249,
2917,
2003,
14187,
2011,
1013,
8860,
1013,
3450,
1012,
25718,
2076,
1996,
2131,
18908,
12848,
6447,
1008,
23032,
1012,
2009,
2180,
1005,
1056,
2022,
2800,
2065,
2057,
2074,
2655,
1046,
10880,
1024,
1024,
2131,
7076,
26897,
1006,
1007,
1025,
1008,
1013,
2797,
1002,
1035,
2154,
4305,
4246,
1027,
19701,
1025,
2797,
1002,
1035,
7615,
1035,
4175,
1027,
19701,
1025,
30523,
1011,
2035,
2916,
9235,
1012,
1008,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1011,
2035,
2916,
9235,
1012,
1008,
30526
] |
<?php
/**
* Reports tab.
*
* @author Iron Bound Designs
* @since 1.0
* @license AGPL
* @copyright Iron Bound Designs, 2015.
*/
namespace ITELIC\Admin\Tab\Controller;
use ITELIC\Admin\Reports\Dispatch;
use ITELIC\Admin\Tab\Controller;
/**
* Class Reports
* @package ITELIC\Admin\Tab\Controller
*/
class Reports extends Controller {
/**
* Render the view for this controller.
*
* @return void
*/
public function render() {
$dispatch = new Dispatch();
$dispatch->dispatch();
}
}
|
iron-bound-designs/exchange-addon-licensing
|
lib/Admin/Tab/Controller/Reports.php
|
PHP
|
agpl-3.0
| 513
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
4311,
21628,
1012,
1008,
1008,
1030,
3166,
3707,
5391,
5617,
1008,
1030,
2144,
1015,
1012,
1014,
1008,
1030,
6105,
12943,
24759,
1008,
1030,
9385,
3707,
5391,
5617,
1010,
2325,
1012,
1008,
1013,
3415,
15327,
2009,
20806,
2278,
1032,
4748,
10020,
1032,
21628,
1032,
11486,
1025,
2224,
2009,
20806,
2278,
1032,
4748,
10020,
1032,
4311,
1032,
18365,
1025,
2224,
2009,
20806,
30524,
1063,
1013,
1008,
1008,
1008,
17552,
1996,
3193,
2005,
2023,
11486,
1012,
1008,
1008,
1030,
2709,
11675,
1008,
1013,
2270,
3853,
17552,
1006,
1007,
1063,
1002,
18365,
1027,
2047,
18365,
1006,
1007,
1025,
1002,
18365,
1011,
1028,
18365,
1006,
1007,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2278,
1032,
4748,
10020,
1032,
21628,
1032,
11486,
1025,
1013,
1008,
1008,
1008,
2465,
4311,
1008,
1030,
7427,
2009,
20806,
2278,
1032,
4748,
10020,
1032,
21628,
1032,
11486,
1008,
1013,
2465,
4311,
8908,
11486,
30526
] |
import React from 'react'
import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
import DockMonitor from 'redux-devtools-dock-monitor'
export default createDevTools(
<DockMonitor
toggleVisibilityKey="H"
changePositionKey="Q"
>
<LogMonitor />
</DockMonitor>
)
|
blockstack/blockstack-browser
|
app/js/components/DevTools.js
|
JavaScript
|
mpl-2.0
| 323
|
[
30522,
12324,
10509,
2013,
1005,
10509,
1005,
12324,
1063,
2580,
6777,
3406,
27896,
1065,
2013,
1005,
2417,
5602,
1011,
16475,
3406,
27896,
1005,
12324,
8833,
8202,
15660,
2013,
1005,
2417,
5602,
1011,
16475,
3406,
27896,
1011,
8833,
1011,
8080,
1005,
12324,
8946,
8202,
15660,
2013,
1005,
2417,
5602,
1011,
16475,
3406,
27896,
1011,
8946,
1011,
8080,
1005,
9167,
12398,
2580,
6777,
3406,
27896,
1006,
1026,
8946,
8202,
15660,
2000,
24679,
11365,
13464,
14839,
1027,
1000,
1044,
1000,
2689,
26994,
14839,
1027,
1000,
1053,
1000,
1028,
1026,
8833,
8202,
15660,
1013,
1028,
1026,
1013,
8946,
8202,
15660,
1028,
1007,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
package elasticsearch
import (
"encoding/json"
"fmt"
"github.com/luopengift/gohttp"
)
const (
enter = '\n'
)
type Meta struct {
Index string `json:"_index"`
Type string `json:"_type"`
Id string `json:"_id,omitempty"`
}
func NewMeta(_index, _type, _id string) *Meta {
return &Meta{_index, _type, _id}
}
type Bulk struct {
Index *Meta `json:"index,omitempty"`
Update *Meta `json:"update,omitempty"`
Source []byte `json:"-"`
}
func NewBulkIndex(_index, _type, _id string, source []byte) *Bulk {
return &Bulk{
Index: NewMeta(_index, _type, _id),
Source: source,
}
}
func NewBulkUpdate(_index, _type, _id string, source []byte) *Bulk {
return &Bulk{
Update: NewMeta(_index, _type, _id),
Source: source,
}
}
//构建/_bulk接口所需的数据格式
func (b *Bulk) Bytes() ([]byte, error) {
p, err := json.Marshal(b)
if err != nil {
return nil, err
}
p = append(p, enter)
p = append(p, b.Source...)
p = append(p, enter)
return p, nil
}
func Send(addr string, p []byte) error {
resp, err := gohttp.NewClient().URLString("http://"+addr).Path("/_bulk").Header("Accept", "application/json").Body(p).Post()
if err != nil {
return err
}
if resp.Code() != 200 {
return fmt.Errorf(resp.String())
}
return nil
}
|
luopengift/transport
|
plugins/output/elasticsearch/bulk.go
|
GO
|
apache-2.0
| 1,257
|
[
30522,
7427,
21274,
17310,
11140,
12324,
1006,
1000,
17181,
1013,
1046,
3385,
1000,
1000,
4718,
2102,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
11320,
26915,
5856,
6199,
1013,
2175,
11039,
25856,
1000,
1007,
9530,
3367,
1006,
4607,
1027,
1005,
1032,
1050,
1005,
1007,
2828,
18804,
2358,
6820,
6593,
1063,
5950,
5164,
1036,
1046,
3385,
1024,
1000,
1035,
5950,
1000,
1036,
2828,
5164,
1036,
1046,
3385,
1024,
1000,
1035,
2828,
1000,
1036,
8909,
5164,
1036,
1046,
3385,
1024,
1000,
1035,
8909,
1010,
18168,
4221,
27718,
2100,
1000,
1036,
1065,
4569,
2278,
2047,
11368,
2050,
1006,
1035,
5950,
1010,
1035,
2828,
1010,
1035,
8909,
5164,
1007,
1008,
18804,
1063,
2709,
1004,
18804,
1063,
1035,
5950,
1010,
1035,
2828,
1010,
1035,
8909,
1065,
1065,
2828,
9625,
2358,
6820,
6593,
1063,
5950,
1008,
30524,
1046,
3385,
1024,
1000,
1011,
1000,
1036,
1065,
4569,
2278,
2047,
8569,
13687,
22254,
10288,
1006,
1035,
5950,
1010,
1035,
2828,
1010,
1035,
8909,
5164,
1010,
3120,
1031,
1033,
24880,
1007,
1008,
9625,
1063,
2709,
1004,
9625,
1063,
5950,
1024,
2047,
11368,
2050,
1006,
1035,
5950,
1010,
1035,
2828,
1010,
1035,
8909,
1007,
1010,
3120,
1024,
3120,
1010,
1065,
1065,
4569,
2278,
2047,
8569,
13687,
6279,
13701,
1006,
1035,
5950,
1010,
1035,
2828,
1010,
1035,
8909,
5164,
1010,
3120,
1031,
1033,
24880,
1007,
1008,
9625,
1063,
2709,
1004,
9625,
1063,
10651,
1024,
2047,
11368,
2050,
1006,
1035,
5950,
1010,
1035,
2828,
1010,
1035,
8909,
1007,
1010,
3120,
1024,
3120,
1010,
1065,
1065,
1013,
1013,
100,
100,
1013,
1035,
9625,
100,
1788,
100,
100,
1916,
100,
100,
100,
100,
4569,
2278,
1006,
1038,
1008,
9625,
1007,
27507,
1006,
1007,
1006,
1031,
1033,
24880,
1010,
7561,
1007,
1063,
1052,
1010,
9413,
2099,
1024,
1027,
1046,
3385,
1012,
8610,
1006,
1038,
1007,
2065,
9413,
2099,
999,
1027,
9152,
2140,
1063,
2709,
9152,
2140,
1010,
9413,
2099,
1065,
1052,
1027,
10439,
10497,
1006,
1052,
1010,
4607,
1007,
1052,
1027,
10439,
10497,
1006,
1052,
1010,
1038,
1012,
3120,
1012,
1012,
1012,
1007,
1052,
1027,
10439,
10497,
1006,
1052,
1010,
4607,
1007,
2709,
1052,
1010,
9152,
2140,
1065,
4569,
2278,
4604,
1006,
5587,
2099,
5164,
1010,
1052,
1031,
1033,
24880,
1007,
7561,
1063,
24501,
2361,
1010,
9413,
2099,
1024,
1027,
2175,
11039,
25856,
1012,
2047,
20464,
11638,
1006,
1007,
1012,
24471,
4877,
18886,
3070,
1006,
1000,
8299,
1024,
1013,
1013,
1000,
1009,
5587,
2099,
1007,
1012,
4130,
1006,
1000,
1013,
1035,
9625,
1000,
1007,
1012,
20346,
1006,
1000,
5138,
1000,
1010,
1000,
4646,
1013,
1046,
3385,
1000,
1007,
1012,
2303,
1006,
1052,
1007,
1012,
2695,
1006,
1007,
2065,
9413,
2099,
999,
1027,
9152,
2140,
1063,
2709,
9413,
2099,
1065,
2065,
24501,
2361,
1012,
3642,
1006,
1007,
999,
1027,
3263,
1063,
2709,
4718,
2102,
1012,
7561,
2546,
1006,
24501,
2361,
1012,
5164,
1006,
1007,
1007,
1065,
2709,
9152,
2140,
1065,
102,
30523,
18804,
1036,
1046,
3385,
1024,
1000,
5950,
1010,
18168,
4221,
27718,
2100,
1000,
1036,
10651,
1008,
18804,
1036,
1046,
3385,
1024,
1000,
10651,
1010,
18168,
4221,
27718,
2100,
1000,
1036,
3120,
1031,
1033,
24880,
1036,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
18804,
1036,
1046,
3385,
1024,
1000,
5950,
1010,
18168,
4221,
27718,
2100,
1000,
1036,
10651,
1008,
18804,
1036,
1046,
3385,
1024,
1000,
10651,
1010,
18168,
4221,
27718,
2100,
1000,
1036,
3120,
1031,
1033,
24880,
1036,
30526
] |
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.management.graphrbac.samples;
import com.google.common.io.ByteStreams;
import com.microsoft.azure.AzureEnvironment;
import com.microsoft.azure.credentials.ApplicationTokenCredentials;
import com.microsoft.azure.management.Azure;
import com.microsoft.azure.management.graphrbac.BuiltInRole;
import com.microsoft.azure.management.graphrbac.RoleAssignment;
import com.microsoft.azure.management.graphrbac.ServicePrincipal;
import com.microsoft.azure.management.resources.fluentcore.utils.SdkContext;
import com.microsoft.azure.management.samples.Utils;
import com.microsoft.rest.LogLevel;
import org.joda.time.Duration;
import java.io.File;
/**
* Azure service principal sample for managing its credentials.
* - Create an application with 2 passwords and 1 certificate credentials
* - Create an associated service principal with contributor role
* - Verify all password credentials and certificate credentials are valid
* - Revoke access of a password credential
* - Verify the password credential is no longer valid
* - Revoke the role assignment
* - Verify the remaining password credential is invalid
*/
public final class ManageServicePrincipalCredentials {
/**
* Main function which runs the actual sample.
*
* @param authenticated instance of Authenticated
* @param defaultSubscription default subscription id
* @param environment the environment the sample is running in
* @return true if sample runs successfully
*/
public static boolean runSample(Azure.Authenticated authenticated, String defaultSubscription, AzureEnvironment environment) {
final String spName = Utils.createRandomName("sp");
final String appName = SdkContext.randomResourceName("app", 20);
final String appUrl = "https://" + appName;
final String passwordName1 = SdkContext.randomResourceName("password", 20);
final String password1 = "P@ssw0rd";
final String passwordName2 = SdkContext.randomResourceName("password", 20);
final String password2 = "StrongP@ss!12";
final String certName1 = SdkContext.randomResourceName("cert", 20);
final String raName = SdkContext.randomUuid();
String servicePrincipalId = "";
try {
// ============================================================
// Create service principal
System.out.println("Creating an Active Directory service principal " + spName + "...");
ServicePrincipal servicePrincipal = authenticated.servicePrincipals()
.define(spName)
.withNewApplication(appUrl)
.definePasswordCredential(passwordName1)
.withPasswordValue(password1)
.attach()
.definePasswordCredential(passwordName2)
.withPasswordValue(password2)
.attach()
.defineCertificateCredential(certName1)
.withAsymmetricX509Certificate()
.withPublicKey(ByteStreams.toByteArray(ManageServicePrincipalCredentials.class.getResourceAsStream("/myTest.cer")))
.withDuration(Duration.standardDays(1))
.attach()
.create();
System.out.println("Created service principal " + spName + ".");
Utils.print(servicePrincipal);
servicePrincipalId = servicePrincipal.id();
// ============================================================
// Create role assignment
System.out.println("Creating a Contributor role assignment " + raName + " for the service principal...");
Thread.sleep(15000);
RoleAssignment roleAssignment = authenticated.roleAssignments()
.define(raName)
.forServicePrincipal(servicePrincipal)
.withBuiltInRole(BuiltInRole.CONTRIBUTOR)
.withSubscriptionScope(defaultSubscription)
.create();
System.out.println("Created role assignment " + raName + ".");
Utils.print(roleAssignment);
// ============================================================
// Verify the credentials are valid
System.out.println("Verifying password credential " + passwordName1 + " is valid...");
ApplicationTokenCredentials testCredential = new ApplicationTokenCredentials(
servicePrincipal.applicationId(), authenticated.tenantId(), password1, environment);
try {
Azure.authenticate(testCredential).withDefaultSubscription();
System.out.println("Verified " + passwordName1 + " is valid.");
} catch (Exception e) {
System.out.println("Failed to verify " + passwordName1 + " is valid.");
}
System.out.println("Verifying password credential " + passwordName2 + " is valid...");
testCredential = new ApplicationTokenCredentials(
servicePrincipal.applicationId(), authenticated.tenantId(), password2, environment);
try {
Azure.authenticate(testCredential).withDefaultSubscription();
System.out.println("Verified " + passwordName2 + " is valid.");
} catch (Exception e) {
System.out.println("Failed to verify " + passwordName2 + " is valid.");
}
System.out.println("Verifying certificate credential " + certName1 + " is valid...");
testCredential = new ApplicationTokenCredentials(
servicePrincipal.applicationId(),
authenticated.tenantId(),
ByteStreams.toByteArray(ManageServicePrincipalCredentials.class.getResourceAsStream("/myTest.pfx")),
"Abc123",
environment);
try {
Azure.authenticate(testCredential).withDefaultSubscription();
System.out.println("Verified " + certName1 + " is valid.");
} catch (Exception e) {
System.out.println("Failed to verify " + certName1 + " is valid.");
}
// ============================================================
// Revoke access of the 1st password credential
System.out.println("Revoking access for password credential " + passwordName1 + "...");
servicePrincipal.update()
.withoutCredential(passwordName1)
.apply();
SdkContext.sleep(15000);
System.out.println("Credential revoked.");
// ============================================================
// Verify the revoked password credential is no longer valid
System.out.println("Verifying password credential " + passwordName1 + " is revoked...");
testCredential = new ApplicationTokenCredentials(
servicePrincipal.applicationId(), authenticated.tenantId(), password1, environment);
try {
Azure.authenticate(testCredential).withDefaultSubscription();
System.out.println("Failed to verify " + passwordName1 + " is revoked.");
} catch (Exception e) {
System.out.println("Verified " + passwordName1 + " is revoked.");
}
// ============================================================
// Revoke the role assignment
System.out.println("Revoking role assignment " + raName + "...");
authenticated.roleAssignments().deleteById(roleAssignment.id());
SdkContext.sleep(5000);
// ============================================================
// Verify the revoked password credential is no longer valid
System.out.println("Verifying password credential " + passwordName2 + " has no access to subscription...");
testCredential = new ApplicationTokenCredentials(
servicePrincipal.applicationId(), authenticated.tenantId(), password2, environment);
try {
Azure.authenticate(testCredential).withDefaultSubscription()
.resourceGroups().list();
System.out.println("Failed to verify " + passwordName2 + " has no access to subscription.");
} catch (Exception e) {
System.out.println("Verified " + passwordName2 + " has no access to subscription.");
}
return true;
} catch (Exception f) {
System.out.println(f.getMessage());
f.printStackTrace();
} finally {
try {
System.out.println("Deleting application: " + appName);
authenticated.servicePrincipals().deleteById(servicePrincipalId);
System.out.println("Deleted application: " + appName);
}
catch (Exception e) {
System.out.println("Did not create applications in Azure. No clean up is necessary");
}
}
return false;
}
/**
* Main entry point.
*
* @param args the parameters
*/
public static void main(String[] args) {
try {
final File credFile = new File(System.getenv("AZURE_AUTH_LOCATION"));
ApplicationTokenCredentials credentials = ApplicationTokenCredentials.fromFile(credFile);
Azure.Authenticated authenticated = Azure.configure()
.withLogLevel(LogLevel.BASIC)
.authenticate(credentials);
runSample(authenticated, credentials.defaultSubscriptionId(), credentials.environment());
} catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
}
private ManageServicePrincipalCredentials() {
}
}
|
martinsawicki/azure-sdk-for-java
|
azure-samples/src/main/java/com/microsoft/azure/management/graphrbac/samples/ManageServicePrincipalCredentials.java
|
Java
|
mit
| 10,249
|
[
30522,
1013,
1008,
1008,
1008,
9385,
1006,
1039,
1007,
7513,
3840,
1012,
2035,
2916,
9235,
1012,
1008,
7000,
2104,
1996,
10210,
6105,
1012,
2156,
6105,
1012,
19067,
2102,
1999,
1996,
2622,
7117,
2005,
1008,
6105,
2592,
1012,
1008,
1013,
7427,
4012,
1012,
7513,
1012,
24296,
1012,
2968,
1012,
10629,
28483,
2278,
1012,
8168,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
22834,
1012,
27507,
25379,
2015,
1025,
12324,
4012,
1012,
7513,
1012,
24296,
1012,
24296,
2368,
21663,
2239,
3672,
1025,
12324,
4012,
1012,
7513,
1012,
24296,
1012,
22496,
1012,
4646,
18715,
2368,
16748,
16454,
26340,
1025,
12324,
4012,
1012,
7513,
1012,
24296,
1012,
2968,
1012,
24296,
1025,
12324,
4012,
1012,
7513,
1012,
24296,
1012,
2968,
1012,
10629,
28483,
2278,
1012,
2328,
2378,
13153,
2063,
1025,
12324,
4012,
1012,
7513,
1012,
24296,
1012,
2968,
1012,
10629,
28483,
2278,
1012,
2535,
12054,
24838,
1025,
12324,
4012,
1012,
7513,
1012,
24296,
1012,
2968,
1012,
10629,
28483,
2278,
1012,
2326,
18098,
2378,
6895,
12952,
1025,
12324,
4012,
1012,
7513,
1012,
24296,
1012,
2968,
1012,
4219,
1012,
19376,
17345,
1012,
21183,
12146,
1012,
17371,
2243,
8663,
18209,
1025,
12324,
4012,
1012,
7513,
1012,
24296,
1012,
2968,
1012,
8168,
1012,
21183,
12146,
1025,
12324,
4012,
1012,
7513,
1012,
2717,
1012,
8833,
20414,
2884,
1025,
12324,
8917,
1012,
8183,
2850,
1012,
2051,
1012,
9367,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
1025,
30524,
3443,
2019,
3378,
2326,
4054,
2007,
12130,
2535,
1008,
1011,
20410,
2035,
20786,
22496,
1998,
8196,
22496,
2024,
9398,
1008,
1011,
7065,
11045,
3229,
1997,
1037,
20786,
13675,
14728,
19909,
1008,
1011,
20410,
1996,
20786,
13675,
14728,
19909,
2003,
2053,
2936,
9398,
1008,
1011,
7065,
11045,
1996,
2535,
8775,
1008,
1011,
20410,
1996,
3588,
20786,
13675,
14728,
19909,
2003,
19528,
1008,
1013,
2270,
2345,
2465,
9020,
2121,
7903,
13699,
6657,
6895,
12952,
16748,
16454,
26340,
1063,
1013,
1008,
1008,
1008,
2364,
3853,
2029,
3216,
1996,
5025,
7099,
1012,
1008,
1008,
1030,
11498,
2213,
14469,
4383,
6013,
1997,
14469,
4383,
1008,
1030,
11498,
2213,
12398,
6342,
5910,
23235,
3258,
12398,
15002,
8909,
1008,
1030,
11498,
2213,
4044,
1996,
4044,
1996,
7099,
2003,
2770,
1999,
1008,
1030,
2709,
2995,
2065,
7099,
3216,
5147,
1008,
1013,
2270,
10763,
22017,
20898,
3216,
16613,
2571,
1006,
24296,
1012,
14469,
4383,
14469,
4383,
1010,
5164,
12398,
6342,
5910,
23235,
3258,
1010,
24296,
2368,
21663,
2239,
3672,
4044,
1007,
1063,
2345,
5164,
11867,
18442,
1027,
21183,
12146,
1012,
3443,
13033,
5358,
18442,
1006,
1000,
11867,
1000,
1007,
1025,
2345,
5164,
10439,
18442,
1027,
17371,
2243,
8663,
18209,
1012,
6721,
6072,
8162,
27524,
14074,
1006,
1000,
10439,
1000,
1010,
2322,
1007,
1025,
2345,
5164,
10439,
3126,
2140,
1027,
1000,
16770,
1024,
1013,
1013,
1000,
1009,
10439,
18442,
1025,
2345,
5164,
20786,
18442,
2487,
1027,
17371,
2243,
8663,
18209,
1012,
6721,
6072,
8162,
27524,
14074,
1006,
1000,
20786,
1000,
1010,
2322,
1007,
1025,
2345,
5164,
30523,
1013,
1008,
1008,
1008,
24296,
2326,
4054,
7099,
2005,
6605,
2049,
22496,
1012,
1008,
1011,
3443,
2019,
4646,
2007,
1016,
20786,
2015,
1998,
1015,
8196,
22496,
1008,
1011,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1013,
1008,
1008,
1008,
24296,
2326,
4054,
7099,
2005,
6605,
2049,
22496,
1012,
1008,
1011,
3443,
2019,
4646,
2007,
1016,
20786,
2015,
1998,
1015,
8196,
22496,
1008,
1011,
30526
] |
// Copyright (c) 2012, Susumu Yata
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
#include <iostream>
#include <madoka/exception.h>
#include <madoka/header.h>
int main() try {
madoka::Header header;
header.set_width(1ULL << 30);
header.set_depth(3);
header.set_max_value((1ULL << 28) - 1);
header.set_value_size(28);
header.set_seed(123456789);
header.set_table_size(1ULL << 32);
header.set_file_size((1ULL << 32) + sizeof(madoka::Header));
MADOKA_THROW_IF(header.width() != (1ULL << 30));
MADOKA_THROW_IF(header.width_mask() != ((1ULL << 30) - 1));
MADOKA_THROW_IF(header.depth() != (3));
MADOKA_THROW_IF(header.max_value() != ((1ULL << 28) - 1));
MADOKA_THROW_IF(header.value_size() != 28);
MADOKA_THROW_IF(header.seed() != 123456789);
MADOKA_THROW_IF(header.table_size() != (1ULL << 32));
MADOKA_THROW_IF(header.file_size() !=
((1ULL << 32) + sizeof(madoka::Header)));
header.set_width(123456789);
MADOKA_THROW_IF(header.width() != 123456789);
MADOKA_THROW_IF(header.width_mask() != 0);
return 0;
} catch (const madoka::Exception &ex) {
std::cerr << "error: " << ex.what() << std::endl;
return 1;
}
|
s-yata/madoka
|
test/header-test.cc
|
C++
|
bsd-2-clause
| 2,453
|
[
30522,
1013,
1013,
9385,
1006,
1039,
1007,
2262,
1010,
10514,
17421,
2226,
8038,
2696,
1013,
1013,
2035,
2916,
9235,
1012,
1013,
1013,
1013,
1013,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
1013,
1013,
14080,
1010,
2024,
7936,
3024,
2008,
1996,
2206,
3785,
2024,
2777,
1024,
1013,
1013,
1013,
1013,
1015,
1012,
25707,
2015,
1997,
3120,
3642,
2442,
9279,
1996,
2682,
9385,
5060,
1010,
1013,
1013,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1012,
1013,
1013,
1016,
1012,
25707,
2015,
1999,
12441,
2433,
2442,
21376,
1996,
2682,
9385,
5060,
1010,
1013,
1013,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1999,
1996,
12653,
1013,
1013,
1998,
1013,
2030,
2060,
4475,
3024,
2007,
1996,
4353,
1012,
1013,
1013,
1013,
1013,
2023,
4007,
2003,
3024,
2011,
1996,
9385,
13304,
1998,
16884,
1000,
2004,
2003,
1000,
1013,
1013,
1998,
2151,
4671,
2030,
13339,
10943,
3111,
1010,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
1996,
1013,
1013,
13339,
10943,
3111,
1997,
6432,
8010,
1998,
10516,
2005,
1037,
3327,
3800,
1013,
1013,
2024,
5860,
19771,
7583,
1012,
1999,
2053,
2724,
4618,
1996,
9385,
9111,
2030,
16884,
2022,
1013,
1013,
20090,
2005,
2151,
3622,
1010,
14958,
1010,
5043,
2389,
1010,
2569,
1010,
27792,
1010,
2030,
1013,
1013,
9530,
3366,
15417,
4818,
12394,
1006,
2164,
30524,
1013,
24191,
1007,
2174,
3303,
1998,
2006,
2151,
3399,
1997,
14000,
1010,
3251,
1999,
1013,
1013,
3206,
1010,
9384,
14000,
1010,
2030,
17153,
2102,
1006,
2164,
27988,
2030,
4728,
1007,
1013,
1013,
17707,
1999,
2151,
2126,
2041,
1997,
1996,
2224,
1997,
2023,
4007,
1010,
2130,
2065,
9449,
1997,
1013,
1013,
1996,
6061,
1997,
2107,
4053,
1012,
1001,
2421,
1026,
16380,
25379,
1028,
1001,
2421,
1026,
5506,
12352,
1013,
6453,
1012,
1044,
1028,
1001,
2421,
1026,
5506,
12352,
1013,
20346,
1012,
1044,
1028,
20014,
2364,
1006,
1007,
3046,
1063,
5506,
12352,
1024,
1024,
20346,
20346,
1025,
20346,
1012,
2275,
1035,
9381,
1006,
1015,
18083,
1026,
1026,
2382,
1007,
1025,
20346,
1012,
2275,
1035,
5995,
1006,
1017,
1007,
1025,
20346,
1012,
2275,
1035,
4098,
1035,
3643,
1006,
1006,
1015,
18083,
1026,
1026,
2654,
1007,
1011,
1015,
1007,
1025,
20346,
1012,
2275,
1035,
3643,
1035,
2946,
1006,
2654,
1007,
1025,
20346,
1012,
2275,
1035,
6534,
1006,
13138,
19961,
2575,
2581,
2620,
2683,
1007,
1025,
20346,
1012,
2275,
1035,
2795,
1035,
2946,
1006,
1015,
18083,
1026,
1026,
3590,
1007,
1025,
20346,
1012,
2275,
1035,
5371,
1035,
2946,
1006,
1006,
1015,
18083,
1026,
1026,
3590,
1007,
1009,
2946,
11253,
1006,
5506,
12352,
1024,
1024,
20346,
1007,
1007,
1025,
5506,
12352,
1035,
5466,
1035,
2065,
1006,
20346,
1012,
9381,
1006,
1007,
999,
1027,
1006,
1015,
18083,
1026,
1026,
2382,
1007,
1007,
1025,
5506,
12352,
1035,
5466,
1035,
2065,
1006,
20346,
1012,
9381,
1035,
7308,
1006,
1007,
999,
1027,
1006,
1006,
1015,
18083,
1026,
1026,
2382,
1007,
1011,
1015,
1007,
1007,
1025,
30523,
1010,
2021,
2025,
3132,
2000,
1010,
21423,
1997,
1013,
1013,
7681,
5350,
2030,
2578,
1025,
3279,
1997,
2224,
1010,
2951,
1010,
2030,
11372,
1025,
2030,
2449,
1013,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1010,
2021,
2025,
3132,
2000,
1010,
21423,
1997,
1013,
1013,
7681,
5350,
2030,
2578,
1025,
3279,
1997,
2224,
1010,
2951,
1010,
2030,
11372,
1025,
2030,
2449,
1013,
30526
] |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Umbraco.Core.Xml.XPath
{
/// <summary>
/// Represents the type of a content that can be navigated via XPath.
/// </summary>
interface INavigableContentType
{
/// <summary>
/// Gets the name of the content type.
/// </summary>
string Name { get; }
/// <summary>
/// Gets the field types of the content type.
/// </summary>
/// <remarks>This includes the attributes and the properties.</remarks>
INavigableFieldType[] FieldTypes { get; }
}
}
|
lars-erik/Umbraco-CMS
|
src/Umbraco.Core/Xml/XPath/INavigableContentType.cs
|
C#
|
mit
| 637
|
[
30522,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
11409,
4160,
1025,
2478,
2291,
1012,
3793,
1025,
3415,
15327,
8529,
10024,
3597,
1012,
4563,
1012,
20950,
1012,
26726,
8988,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
5836,
1996,
2828,
1997,
1037,
4180,
2008,
2064,
2022,
22149,
2094,
3081,
26726,
8988,
1012,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
8278,
27118,
5737,
3654,
3468,
8663,
6528,
15353,
5051,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
4152,
1996,
2171,
1997,
1996,
4180,
2828,
1012,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
5164,
2171,
1063,
2131,
1025,
1065,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
4152,
1996,
2492,
4127,
1997,
1996,
4180,
2828,
1012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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
#!/bin/bash
set -e
cd $(dirname $0)
# dismantle cluster
for i in 2 1 0; do
for n in 1 0; do
docker-machine ssh worker-${i}-${n} docker swarm leave --force
done
docker-machine ssh manager-${i} docker swarm leave --force
done
# init primary manager
docker-machine ssh manager-0 \
docker swarm init \
--advertise-addr="$(docker-machine ip manager-0)" \
--listen-addr=0.0.0.0:2377
# get tokens
MANAGER_TOKEN="$(docker-machine ssh manager-0 docker swarm join-token -q manager)"
WORKER_TOKEN="$(docker-machine ssh manager-0 docker swarm join-token -q worker)"
# join replicas to cluster
for i in 1 2; do
docker-machine ssh manager-${i} \
docker swarm join \
--advertise-addr="$(docker-machine ip manager-${i})" \
--token="${MANAGER_TOKEN}" \
$(docker-machine ip manager-0):2377
done
# join workers to cluster
for i in 0 1 2; do
for n in 0 1; do
docker-machine ssh worker-${i}-${n} \
docker swarm join \
--advertise-addr="$(docker-machine ip worker-${i}-${n})" \
--token="${WORKER_TOKEN}" \
$(docker-machine ip manager-${i}):2377
done
done
|
hidekuro/swarm-cluster-sample
|
cluster-rebuild.sh
|
Shell
|
mit
| 1,120
|
[
30522,
1001,
999,
1013,
8026,
1013,
24234,
2275,
1011,
1041,
3729,
1002,
1006,
16101,
18442,
1002,
1014,
1007,
1001,
4487,
11512,
9286,
9324,
2005,
1045,
1999,
1016,
1015,
1014,
1025,
2079,
2005,
1050,
1999,
1015,
1014,
1025,
2079,
8946,
2121,
1011,
3698,
7020,
2232,
7309,
1011,
1002,
1063,
1045,
1065,
1011,
1002,
1063,
1050,
1065,
8946,
2121,
21708,
2681,
1011,
1011,
2486,
2589,
8946,
2121,
1011,
3698,
7020,
2232,
3208,
1011,
1002,
1063,
1045,
1065,
8946,
2121,
21708,
2681,
1011,
1011,
2486,
2589,
1001,
1999,
4183,
3078,
3208,
8946,
2121,
1011,
3698,
7020,
2232,
3208,
1011,
1014,
1032,
8946,
2121,
21708,
1999,
4183,
1032,
1011,
1011,
4748,
16874,
5562,
1011,
5587,
2099,
1027,
1000,
1002,
1006,
8946,
2121,
1011,
3698,
12997,
3208,
1011,
1014,
1007,
1000,
1032,
1011,
1011,
4952,
1011,
5587,
2099,
1027,
1014,
1012,
1014,
1012,
1014,
1012,
1014,
1024,
23297,
2581,
1001,
2131,
19204,
2015,
3208,
1035,
19204,
1027,
1000,
1002,
1006,
8946,
2121,
1011,
3698,
7020,
2232,
3208,
1011,
1014,
8946,
2121,
21708,
3693,
1011,
19204,
1011,
1053,
3208,
1007,
1000,
7309,
1035,
19204,
1027,
1000,
1002,
1006,
8946,
2121,
1011,
3698,
7020,
2232,
3208,
1011,
1014,
8946,
2121,
21708,
3693,
1011,
19204,
1011,
1053,
7309,
1007,
1000,
1001,
3693,
15059,
2015,
2000,
9324,
2005,
1045,
1999,
1015,
1016,
1025,
2079,
8946,
2121,
1011,
3698,
7020,
2232,
3208,
1011,
1002,
1063,
1045,
1065,
1032,
8946,
2121,
21708,
3693,
1032,
1011,
1011,
4748,
16874,
5562,
1011,
5587,
2099,
1027,
1000,
1002,
1006,
8946,
2121,
1011,
3698,
12997,
3208,
1011,
1002,
1063,
1045,
1065,
1007,
1000,
1032,
1011,
1011,
19204,
1027,
1000,
1002,
1063,
3208,
1035,
19204,
1065,
1000,
1032,
1002,
1006,
8946,
2121,
1011,
3698,
12997,
3208,
1011,
1014,
1007,
1024,
23297,
2581,
2589,
30524,
1015,
1016,
1025,
2079,
2005,
1050,
1999,
1014,
1015,
1025,
2079,
8946,
2121,
1011,
3698,
7020,
2232,
7309,
1011,
1002,
1063,
1045,
1065,
1011,
1002,
1063,
1050,
1065,
1032,
8946,
2121,
21708,
3693,
1032,
1011,
1011,
4748,
16874,
5562,
1011,
5587,
2099,
1027,
1000,
1002,
1006,
8946,
2121,
1011,
3698,
12997,
7309,
1011,
1002,
1063,
1045,
1065,
1011,
1002,
1063,
1050,
1065,
1007,
1000,
1032,
1011,
1011,
19204,
1027,
1000,
1002,
1063,
7309,
1035,
19204,
1065,
1000,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1001,
3693,
3667,
2000,
9324,
2005,
1045,
1999,
1014,
30526
] |
// Copyright 2016 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package retrieval
import (
"fmt"
"io"
"net/http"
"sync"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/expfmt"
"github.com/prometheus/common/log"
"github.com/prometheus/common/model"
"github.com/prometheus/common/version"
"golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
"github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/storage/local"
"github.com/prometheus/prometheus/util/httputil"
)
const (
scrapeHealthMetricName = "up"
scrapeDurationMetricName = "scrape_duration_seconds"
scrapeSamplesMetricName = "scrape_samples_scraped"
samplesPostRelabelMetricName = "scrape_samples_post_metric_relabeling"
)
var (
targetIntervalLength = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
Name: "prometheus_target_interval_length_seconds",
Help: "Actual intervals between scrapes.",
Objectives: map[float64]float64{0.01: 0.001, 0.05: 0.005, 0.5: 0.05, 0.90: 0.01, 0.99: 0.001},
},
[]string{"interval"},
)
targetSkippedScrapes = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "prometheus_target_skipped_scrapes_total",
Help: "Total number of scrapes that were skipped because the metric storage was throttled.",
},
)
targetReloadIntervalLength = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
Name: "prometheus_target_reload_length_seconds",
Help: "Actual interval to reload the scrape pool with a given configuration.",
Objectives: map[float64]float64{0.01: 0.001, 0.05: 0.005, 0.5: 0.05, 0.90: 0.01, 0.99: 0.001},
},
[]string{"interval"},
)
targetSyncIntervalLength = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
Name: "prometheus_target_sync_length_seconds",
Help: "Actual interval to sync the scrape pool.",
Objectives: map[float64]float64{0.01: 0.001, 0.05: 0.005, 0.5: 0.05, 0.90: 0.01, 0.99: 0.001},
},
[]string{"scrape_job"},
)
targetScrapePoolSyncsCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "prometheus_target_scrape_pool_sync_total",
Help: "Total number of syncs that were executed on a scrape pool.",
},
[]string{"scrape_job"},
)
targetScrapeSampleLimit = prometheus.NewCounter(
prometheus.CounterOpts{
Name: "prometheus_target_scrapes_exceeded_sample_limit_total",
Help: "Total number of scrapes that hit the sample limit and were rejected.",
},
)
)
func init() {
prometheus.MustRegister(targetIntervalLength)
prometheus.MustRegister(targetSkippedScrapes)
prometheus.MustRegister(targetReloadIntervalLength)
prometheus.MustRegister(targetSyncIntervalLength)
prometheus.MustRegister(targetScrapePoolSyncsCounter)
prometheus.MustRegister(targetScrapeSampleLimit)
}
// scrapePool manages scrapes for sets of targets.
type scrapePool struct {
appender storage.SampleAppender
ctx context.Context
mtx sync.RWMutex
config *config.ScrapeConfig
client *http.Client
// Targets and loops must always be synchronized to have the same
// set of hashes.
targets map[uint64]*Target
loops map[uint64]loop
// Constructor for new scrape loops. This is settable for testing convenience.
newLoop func(context.Context, scraper, storage.SampleAppender, model.LabelSet, *config.ScrapeConfig) loop
}
func newScrapePool(ctx context.Context, cfg *config.ScrapeConfig, app storage.SampleAppender) *scrapePool {
client, err := httputil.NewClientFromConfig(cfg.HTTPClientConfig)
if err != nil {
// Any errors that could occur here should be caught during config validation.
log.Errorf("Error creating HTTP client for job %q: %s", cfg.JobName, err)
}
return &scrapePool{
appender: app,
config: cfg,
ctx: ctx,
client: client,
targets: map[uint64]*Target{},
loops: map[uint64]loop{},
newLoop: newScrapeLoop,
}
}
// stop terminates all scrape loops and returns after they all terminated.
func (sp *scrapePool) stop() {
var wg sync.WaitGroup
sp.mtx.Lock()
defer sp.mtx.Unlock()
for fp, l := range sp.loops {
wg.Add(1)
go func(l loop) {
l.stop()
wg.Done()
}(l)
delete(sp.loops, fp)
delete(sp.targets, fp)
}
wg.Wait()
}
// reload the scrape pool with the given scrape configuration. The target state is preserved
// but all scrape loops are restarted with the new scrape configuration.
// This method returns after all scrape loops that were stopped have fully terminated.
func (sp *scrapePool) reload(cfg *config.ScrapeConfig) {
start := time.Now()
sp.mtx.Lock()
defer sp.mtx.Unlock()
client, err := httputil.NewClientFromConfig(cfg.HTTPClientConfig)
if err != nil {
// Any errors that could occur here should be caught during config validation.
log.Errorf("Error creating HTTP client for job %q: %s", cfg.JobName, err)
}
sp.config = cfg
sp.client = client
var (
wg sync.WaitGroup
interval = time.Duration(sp.config.ScrapeInterval)
timeout = time.Duration(sp.config.ScrapeTimeout)
)
for fp, oldLoop := range sp.loops {
var (
t = sp.targets[fp]
s = &targetScraper{
Target: t,
client: sp.client,
timeout: timeout,
}
newLoop = sp.newLoop(sp.ctx, s, sp.appender, t.Labels(), sp.config)
)
wg.Add(1)
go func(oldLoop, newLoop loop) {
oldLoop.stop()
wg.Done()
go newLoop.run(interval, timeout, nil)
}(oldLoop, newLoop)
sp.loops[fp] = newLoop
}
wg.Wait()
targetReloadIntervalLength.WithLabelValues(interval.String()).Observe(
time.Since(start).Seconds(),
)
}
// Sync converts target groups into actual scrape targets and synchronizes
// the currently running scraper with the resulting set.
func (sp *scrapePool) Sync(tgs []*config.TargetGroup) {
start := time.Now()
var all []*Target
for _, tg := range tgs {
targets, err := targetsFromGroup(tg, sp.config)
if err != nil {
log.With("err", err).Error("creating targets failed")
continue
}
all = append(all, targets...)
}
sp.sync(all)
targetSyncIntervalLength.WithLabelValues(sp.config.JobName).Observe(
time.Since(start).Seconds(),
)
targetScrapePoolSyncsCounter.WithLabelValues(sp.config.JobName).Inc()
}
// sync takes a list of potentially duplicated targets, deduplicates them, starts
// scrape loops for new targets, and stops scrape loops for disappeared targets.
// It returns after all stopped scrape loops terminated.
func (sp *scrapePool) sync(targets []*Target) {
sp.mtx.Lock()
defer sp.mtx.Unlock()
var (
uniqueTargets = map[uint64]struct{}{}
interval = time.Duration(sp.config.ScrapeInterval)
timeout = time.Duration(sp.config.ScrapeTimeout)
)
for _, t := range targets {
hash := t.hash()
uniqueTargets[hash] = struct{}{}
if _, ok := sp.targets[hash]; !ok {
s := &targetScraper{
Target: t,
client: sp.client,
timeout: timeout,
}
l := sp.newLoop(sp.ctx, s, sp.appender, t.Labels(), sp.config)
sp.targets[hash] = t
sp.loops[hash] = l
go l.run(interval, timeout, nil)
}
}
var wg sync.WaitGroup
// Stop and remove old targets and scraper loops.
for hash := range sp.targets {
if _, ok := uniqueTargets[hash]; !ok {
wg.Add(1)
go func(l loop) {
l.stop()
wg.Done()
}(sp.loops[hash])
delete(sp.loops, hash)
delete(sp.targets, hash)
}
}
// Wait for all potentially stopped scrapers to terminate.
// This covers the case of flapping targets. If the server is under high load, a new scraper
// may be active and tries to insert. The old scraper that didn't terminate yet could still
// be inserting a previous sample set.
wg.Wait()
}
// A scraper retrieves samples and accepts a status report at the end.
type scraper interface {
scrape(ctx context.Context, ts time.Time) (model.Samples, error)
report(start time.Time, dur time.Duration, err error)
offset(interval time.Duration) time.Duration
}
// targetScraper implements the scraper interface for a target.
type targetScraper struct {
*Target
client *http.Client
timeout time.Duration
}
const acceptHeader = `application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.7,text/plain;version=0.0.4;q=0.3,*/*;q=0.1`
var userAgentHeader = fmt.Sprintf("Prometheus/%s", version.Version)
func (s *targetScraper) scrape(ctx context.Context, ts time.Time) (model.Samples, error) {
req, err := http.NewRequest("GET", s.URL().String(), nil)
if err != nil {
return nil, err
}
req.Header.Add("Accept", acceptHeader)
req.Header.Set("User-Agent", userAgentHeader)
req.Header.Set("X-Prometheus-Scrape-Timeout-Seconds", fmt.Sprintf("%f", s.timeout.Seconds()))
resp, err := ctxhttp.Do(ctx, s.client, req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("server returned HTTP status %s", resp.Status)
}
var (
allSamples = make(model.Samples, 0, 200)
decSamples = make(model.Vector, 0, 50)
)
sdec := expfmt.SampleDecoder{
Dec: expfmt.NewDecoder(resp.Body, expfmt.ResponseFormat(resp.Header)),
Opts: &expfmt.DecodeOptions{
Timestamp: model.TimeFromUnixNano(ts.UnixNano()),
},
}
for {
if err = sdec.Decode(&decSamples); err != nil {
break
}
allSamples = append(allSamples, decSamples...)
decSamples = decSamples[:0]
}
if err == io.EOF {
// Set err to nil since it is used in the scrape health recording.
err = nil
}
return allSamples, err
}
// A loop can run and be stopped again. It must not be reused after it was stopped.
type loop interface {
run(interval, timeout time.Duration, errc chan<- error)
stop()
}
type scrapeLoop struct {
scraper scraper
// Where samples are ultimately sent.
appender storage.SampleAppender
targetLabels model.LabelSet
metricRelabelConfigs []*config.RelabelConfig
honorLabels bool
sampleLimit uint
done chan struct{}
ctx context.Context
cancel func()
}
func newScrapeLoop(
ctx context.Context,
sc scraper,
appender storage.SampleAppender,
targetLabels model.LabelSet,
config *config.ScrapeConfig,
) loop {
sl := &scrapeLoop{
scraper: sc,
appender: appender,
targetLabels: targetLabels,
metricRelabelConfigs: config.MetricRelabelConfigs,
honorLabels: config.HonorLabels,
sampleLimit: config.SampleLimit,
done: make(chan struct{}),
}
sl.ctx, sl.cancel = context.WithCancel(ctx)
return sl
}
func (sl *scrapeLoop) run(interval, timeout time.Duration, errc chan<- error) {
defer close(sl.done)
select {
case <-time.After(sl.scraper.offset(interval)):
// Continue after a scraping offset.
case <-sl.ctx.Done():
return
}
var last time.Time
ticker := time.NewTicker(interval)
defer ticker.Stop()
for {
select {
case <-sl.ctx.Done():
return
default:
}
if !sl.appender.NeedsThrottling() {
var (
start = time.Now()
scrapeCtx, _ = context.WithTimeout(sl.ctx, timeout)
numPostRelabelSamples = 0
)
// Only record after the first scrape.
if !last.IsZero() {
targetIntervalLength.WithLabelValues(interval.String()).Observe(
time.Since(last).Seconds(),
)
}
samples, err := sl.scraper.scrape(scrapeCtx, start)
if err == nil {
numPostRelabelSamples, err = sl.append(samples)
}
if err != nil && errc != nil {
errc <- err
}
sl.report(start, time.Since(start), len(samples), numPostRelabelSamples, err)
last = start
} else {
targetSkippedScrapes.Inc()
}
select {
case <-sl.ctx.Done():
return
case <-ticker.C:
}
}
}
func (sl *scrapeLoop) stop() {
sl.cancel()
<-sl.done
}
// wrapAppender wraps a SampleAppender for relabeling. It returns the wrappend
// appender and an innermost countingAppender that counts the samples actually
// appended in the end.
func (sl *scrapeLoop) wrapAppender(app storage.SampleAppender) (storage.SampleAppender, *countingAppender) {
// Innermost appender is a countingAppender to count how many samples
// are left in the end.
countingAppender := &countingAppender{
SampleAppender: app,
}
app = countingAppender
// The relabelAppender has to be inside the label-modifying appenders so
// the relabeling rules are applied to the correct label set.
if len(sl.metricRelabelConfigs) > 0 {
app = relabelAppender{
SampleAppender: app,
relabelings: sl.metricRelabelConfigs,
}
}
if sl.honorLabels {
app = honorLabelsAppender{
SampleAppender: app,
labels: sl.targetLabels,
}
} else {
app = ruleLabelsAppender{
SampleAppender: app,
labels: sl.targetLabels,
}
}
return app, countingAppender
}
func (sl *scrapeLoop) append(samples model.Samples) (int, error) {
var (
numOutOfOrder = 0
numDuplicates = 0
app = sl.appender
countingApp *countingAppender
)
if sl.sampleLimit > 0 {
// We need to check for the sample limit, so append everything
// to a wrapped bufferAppender first. Then point samples to the
// result.
bufApp := &bufferAppender{buffer: make(model.Samples, 0, len(samples))}
var wrappedBufApp storage.SampleAppender
wrappedBufApp, countingApp = sl.wrapAppender(bufApp)
for _, s := range samples {
// Ignore errors as bufferedAppender always succeeds.
wrappedBufApp.Append(s)
}
samples = bufApp.buffer
if uint(countingApp.count) > sl.sampleLimit {
targetScrapeSampleLimit.Inc()
return countingApp.count, fmt.Errorf(
"%d samples exceeded limit of %d", countingApp.count, sl.sampleLimit,
)
}
} else {
// No need to check for sample limit. Wrap sl.appender directly.
app, countingApp = sl.wrapAppender(sl.appender)
}
for _, s := range samples {
if err := app.Append(s); err != nil {
switch err {
case local.ErrOutOfOrderSample:
numOutOfOrder++
log.With("sample", s).With("error", err).Debug("Sample discarded")
case local.ErrDuplicateSampleForTimestamp:
numDuplicates++
log.With("sample", s).With("error", err).Debug("Sample discarded")
default:
log.With("sample", s).With("error", err).Warn("Sample discarded")
}
}
}
if numOutOfOrder > 0 {
log.With("numDropped", numOutOfOrder).Warn("Error on ingesting out-of-order samples")
}
if numDuplicates > 0 {
log.With("numDropped", numDuplicates).Warn("Error on ingesting samples with different value but same timestamp")
}
return countingApp.count, nil
}
func (sl *scrapeLoop) report(start time.Time, duration time.Duration, scrapedSamples, postRelabelSamples int, err error) {
sl.scraper.report(start, duration, err)
ts := model.TimeFromUnixNano(start.UnixNano())
var health model.SampleValue
if err == nil {
health = 1
}
healthSample := &model.Sample{
Metric: model.Metric{
model.MetricNameLabel: scrapeHealthMetricName,
},
Timestamp: ts,
Value: health,
}
durationSample := &model.Sample{
Metric: model.Metric{
model.MetricNameLabel: scrapeDurationMetricName,
},
Timestamp: ts,
Value: model.SampleValue(duration.Seconds()),
}
countSample := &model.Sample{
Metric: model.Metric{
model.MetricNameLabel: scrapeSamplesMetricName,
},
Timestamp: ts,
Value: model.SampleValue(scrapedSamples),
}
postRelabelSample := &model.Sample{
Metric: model.Metric{
model.MetricNameLabel: samplesPostRelabelMetricName,
},
Timestamp: ts,
Value: model.SampleValue(postRelabelSamples),
}
reportAppender := ruleLabelsAppender{
SampleAppender: sl.appender,
labels: sl.targetLabels,
}
if err := reportAppender.Append(healthSample); err != nil {
log.With("sample", healthSample).With("error", err).Warn("Scrape health sample discarded")
}
if err := reportAppender.Append(durationSample); err != nil {
log.With("sample", durationSample).With("error", err).Warn("Scrape duration sample discarded")
}
if err := reportAppender.Append(countSample); err != nil {
log.With("sample", durationSample).With("error", err).Warn("Scrape sample count sample discarded")
}
if err := reportAppender.Append(postRelabelSample); err != nil {
log.With("sample", durationSample).With("error", err).Warn("Scrape sample count post-relabeling sample discarded")
}
}
|
n0rad/housecream
|
vendor/github.com/prometheus/prometheus/retrieval/scrape.go
|
GO
|
agpl-3.0
| 16,742
|
[
30522,
1013,
1013,
9385,
2355,
1996,
20877,
11031,
10600,
6048,
1013,
1013,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1013,
1013,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1013,
1013,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1013,
1013,
1013,
1013,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1013,
1013,
1013,
1013,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1013,
1013,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1013,
1013,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1013,
1013,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1013,
1013,
12546,
2104,
1996,
6105,
1012,
7427,
26384,
12324,
1006,
1000,
4718,
2102,
1000,
1000,
22834,
1000,
1000,
5658,
1013,
8299,
1000,
1000,
26351,
1000,
1000,
30524,
1013,
20877,
11031,
10600,
1013,
7396,
1035,
2175,
25023,
1013,
20877,
11031,
10600,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
20877,
11031,
10600,
1013,
2691,
1013,
4654,
14376,
20492,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
20877,
11031,
10600,
1013,
2691,
1013,
8833,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
20877,
11031,
10600,
1013,
2691,
1013,
2944,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
20877,
11031,
10600,
1013,
2691,
1013,
2544,
1000,
1000,
2175,
25023,
1012,
8917,
1013,
1060,
1013,
5658,
1013,
6123,
1000,
1000,
2175,
25023,
1012,
8917,
1013,
1060,
1013,
5658,
1013,
6123,
1013,
14931,
2595,
11039,
25856,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
20877,
11031,
10600,
1013,
20877,
11031,
10600,
1013,
9530,
8873,
2290,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
20877,
11031,
10600,
1013,
20877,
11031,
10600,
1013,
5527,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
20877,
11031,
10600,
1013,
20877,
11031,
10600,
1013,
5527,
1013,
2334,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
20877,
11031,
10600,
1013,
20877,
11031,
10600,
1013,
21183,
4014,
1013,
8299,
21823,
2140,
1000,
1007,
9530,
3367,
1006,
26988,
20192,
24658,
12589,
18442,
1027,
1000,
2039,
1000,
20378,
18924,
12589,
18442,
1027,
1000,
26988,
1035,
9367,
1035,
3823,
1000,
26988,
21559,
21112,
12589,
18442,
1027,
1000,
26988,
1035,
8168,
1035,
20378,
1000,
8168,
19894,
16570,
16336,
13728,
3388,
7277,
18442,
1027,
1000,
26988,
1035,
8168,
1035,
2695,
1035,
12046,
1035,
2128,
20470,
18809,
2290,
1000,
1007,
13075,
1006,
4539,
18447,
2121,
10175,
7770,
13512,
2232,
1027,
20877,
11031,
10600,
1012,
2739,
2819,
7849,
2100,
3726,
2278,
1006,
20877,
11031,
10600,
1012,
12654,
7361,
3215,
1063,
2171,
1024,
1000,
20877,
11031,
10600,
1035,
4539,
1035,
13483,
1035,
3091,
1035,
3823,
1000,
1010,
2393,
1024,
1000,
5025,
14025,
2090,
26988,
2015,
1012,
1000,
1010,
11100,
1024,
4949,
1031,
14257,
21084,
1033,
14257,
21084,
1063,
1014,
1012,
5890,
1024,
1014,
1012,
25604,
1010,
1014,
1012,
5709,
1024,
1014,
1012,
4002,
2629,
1010,
30523,
2051,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2051,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
30526
] |
//
// MNSWorklog.h
//
// Copyright 2014 MediaNet Software
// This file is part of MNSJiraRESTClient.
//
// MNSJiraRESTClient is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License.
//
// MNSJiraRESTClient is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with MNSJiraRESTClient. If not, see <http://www.gnu.org/licenses/>.
#import "MNSAddressableNamedEntity.h"
#import "MNSBasicUser.h"
#import "MNSVisibility.h"
@interface MNSWorklog : NSObject <MNSAddressable>
@property (copy, nonatomic) NSString *selfUrl;
@property (copy, nonatomic) NSString *issueUri;
@property (strong, nonatomic) MNSBasicUser *author;
@property (strong, nonatomic) MNSBasicUser *updateAuthor;
@property (copy, nonatomic) NSString *comment;
@property (strong, nonatomic) NSDate *creationDate;
@property (strong, nonatomic) NSDate *updateDate;
@property (strong, nonatomic) NSDate *startDate;
@property (assign, nonatomic) NSInteger minutesSpent;
@property (strong, nonatomic) MNSVisibility *visibility;
@end
|
medianetsoftware/MNSJiraRESTClient
|
MNSJiraRESTClient/Source/Model/MNSWorklog.h
|
C
|
lgpl-3.0
| 1,417
|
[
30522,
1013,
1013,
1013,
1013,
24098,
26760,
2953,
2243,
21197,
1012,
1044,
1013,
1013,
1013,
1013,
9385,
2297,
3991,
3388,
4007,
1013,
1013,
2023,
5371,
2003,
2112,
1997,
24098,
2015,
4478,
19848,
4355,
20464,
11638,
1012,
1013,
1013,
1013,
1013,
24098,
2015,
4478,
19848,
4355,
20464,
11638,
2003,
2489,
4007,
1024,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
1013,
1013,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
8276,
2236,
2270,
6105,
2004,
2405,
2011,
1013,
1013,
1996,
2489,
4007,
3192,
1010,
2593,
2544,
1017,
1997,
1996,
6105,
1012,
1013,
1013,
1013,
1013,
24098,
2015,
4478,
19848,
4355,
20464,
11638,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
1013,
1013,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
1013,
1013,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
1013,
1013,
27004,
8276,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
1013,
1013,
1013,
1013,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
8276,
2236,
2270,
6105,
1013,
1013,
2247,
2007,
24098,
2015,
4478,
19848,
4355,
20464,
11638,
1012,
2065,
2025,
1010,
2156,
1026,
8299,
1024,
1013,
1013,
7479,
1012,
27004,
1012,
8917,
1013,
15943,
1013,
1028,
1012,
1001,
12324,
1000,
24098,
3736,
14141,
8303,
3085,
18442,
16454,
3012,
1012,
1044,
1000,
1001,
12324,
1000,
24098,
19022,
21369,
7874,
2121,
1012,
1044,
1000,
1001,
12324,
1000,
24098,
2015,
11365,
13464,
1012,
1044,
1000,
1030,
8278,
24098,
26760,
2953,
2243,
21197,
1024,
24978,
16429,
20614,
1026,
24098,
3736,
14141,
8303,
3085,
1028,
1030,
3200,
1006,
6100,
1010,
2512,
10610,
7712,
1007,
24978,
3367,
30524,
10610,
7712,
1007,
24098,
19022,
21369,
7874,
2121,
1008,
3166,
1025,
1030,
3200,
1006,
2844,
1010,
2512,
10610,
7712,
1007,
24098,
19022,
21369,
7874,
2121,
1008,
10651,
4887,
27844,
1025,
1030,
3200,
1006,
6100,
1010,
2512,
10610,
7712,
1007,
24978,
3367,
4892,
1008,
7615,
1025,
1030,
3200,
1006,
2844,
1010,
2512,
10610,
7712,
1007,
24978,
13701,
1008,
4325,
13701,
1025,
1030,
3200,
1006,
2844,
1010,
2512,
10610,
7712,
1007,
24978,
13701,
1008,
7172,
3686,
1025,
1030,
3200,
1006,
2844,
1010,
2512,
10610,
7712,
1007,
24978,
13701,
1008,
2707,
13701,
1025,
1030,
3200,
1006,
23911,
1010,
2512,
10610,
7712,
1007,
24978,
18447,
26320,
2781,
13102,
4765,
1025,
1030,
3200,
1006,
2844,
1010,
2512,
10610,
7712,
1007,
24098,
2015,
11365,
13464,
1008,
16476,
1025,
1030,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
4892,
1008,
2969,
3126,
2140,
1025,
1030,
3200,
1006,
6100,
1010,
2512,
10610,
7712,
1007,
24978,
3367,
4892,
1008,
3277,
9496,
1025,
1030,
3200,
1006,
2844,
1010,
2512,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
4892,
1008,
2969,
3126,
2140,
1025,
1030,
3200,
1006,
6100,
1010,
2512,
10610,
7712,
1007,
24978,
3367,
4892,
1008,
3277,
9496,
1025,
1030,
3200,
1006,
2844,
1010,
2512,
30526
] |
/**
* The CSS values that are wrapped in '/*variable' comments are intended for use
* by https://www.drupal.org/project/style_settings. Enable that module to
* have those CSS variables exposed in the settings UI.
*/
.flickr-photo-img,
img.flickr-photoset-img,
.flickr-wrap,
span.flickr-credit {
-webkit-border-radius: /*variable:flickrstyle_radius*/1em/*variable*/;
-moz-border-radius: /*variable:flickrstyle_radius*/1em/*variable*/;
border-radius: /*variable:flickrstyle_radius*/1em/*variable*/;
}
|
jamidwyer/flickr
|
style/css/flickrstyle_rounded.css
|
CSS
|
gpl-2.0
| 521
|
[
30522,
1013,
1008,
1008,
1008,
1996,
20116,
2015,
5300,
2008,
2024,
5058,
1999,
1005,
1013,
1008,
8023,
1005,
7928,
2024,
3832,
2005,
2224,
1008,
2011,
16770,
1024,
1013,
1013,
7479,
1012,
2852,
6279,
2389,
1012,
8917,
1013,
2622,
1013,
2806,
1035,
10906,
1012,
9585,
2008,
11336,
2000,
1008,
2031,
2216,
20116,
2015,
10857,
6086,
1999,
1996,
10906,
21318,
1012,
1008,
1013,
1012,
17312,
2099,
1011,
6302,
1011,
10047,
2290,
1010,
10047,
2290,
1012,
17312,
2099,
1011,
7760,
3388,
1011,
10047,
2290,
1010,
1012,
17312,
2099,
1011,
10236,
1010,
8487,
1012,
17312,
2099,
1011,
4923,
1063,
1011,
4773,
23615,
1011,
3675,
1011,
12177,
1024,
1013,
1008,
8023,
1024,
17312,
12096,
12844,
1035,
12177,
1008,
1013,
1015,
6633,
1013,
1008,
8023,
1008,
1013,
1025,
1011,
9587,
2480,
1011,
3675,
1011,
12177,
1024,
1013,
1008,
8023,
1024,
17312,
12096,
12844,
1035,
12177,
1008,
1013,
1015,
6633,
1013,
1008,
8023,
1008,
1013,
1025,
3675,
1011,
12177,
1024,
1013,
1008,
8023,
1024,
17312,
12096,
12844,
1035,
12177,
1008,
1013,
1015,
6633,
1013,
1008,
8023,
1008,
1013,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<?php
namespace de\chilan\WebsiteBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class WebsiteBundle extends Bundle
{
}
|
Mirar85/chilan
|
src/de/chilan/WebsiteBundle/WebsiteBundle.php
|
PHP
|
gpl-3.0
| 131
|
[
30522,
1026,
1029,
25718,
3415,
15327,
2139,
1032,
9610,
5802,
1032,
4037,
27265,
2571,
1025,
2224,
25353,
2213,
14876,
4890,
1032,
6922,
1032,
8299,
5484,
11877,
1032,
14012,
1032,
14012,
1025,
2465,
4037,
27265,
2571,
8908,
14012,
1063,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
/**
******************************************************************************
* @file ADC/ADC_AnalogWatchdog/Inc/main.h
* @author MCD Application Team
* @version V1.3.0
* @date 18-December-2015
* @brief Header for main.c module
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"
#include "stm32f1xx_nucleo.h"
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Trigger for ADC: */
/* - If this literal is defined: ADC is operating in not continuous mode */
/* and conversions are trigger by external trigger: timer. */
/* - If this literal is not defined: ADC is operating in continuous mode */
/* and first conversion is trigger by software trigger. */
#define ADC_TRIGGER_FROM_TIMER
/* User can use this section to tailor ADCx instance under use and associated
resources */
/* ## Definition of ADC related resources ################################### */
/* Definition of ADCx clock resources */
#define ADCx ADC1
#define ADCx_CLK_ENABLE() __HAL_RCC_ADC1_CLK_ENABLE()
#define ADCx_FORCE_RESET() __HAL_RCC_ADC1_FORCE_RESET()
#define ADCx_RELEASE_RESET() __HAL_RCC_ADC1_RELEASE_RESET()
/* Definition of ADCx channels */
#define ADCx_CHANNELa ADC_CHANNEL_4
/* Definition of ADCx channels pins */
#define ADCx_CHANNELa_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
#define ADCx_CHANNELa_GPIO_PORT GPIOA
#define ADCx_CHANNELa_PIN GPIO_PIN_4
/* Definition of ADCx DMA resources */
#define ADCx_DMA_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
#define ADCx_DMA DMA1_Channel1
#define ADCx_DMA_IRQn DMA1_Channel1_IRQn
#define ADCx_DMA_IRQHandler DMA1_Channel1_IRQHandler
/* Definition of ADCx NVIC resources */
#define ADCx_IRQn ADC1_2_IRQn
#define ADCx_IRQHandler ADC1_2_IRQHandler
#if defined(ADC_TRIGGER_FROM_TIMER)
/* ## Definition of TIM related resources ################################### */
/* Definition of TIMx clock resources */
#define TIMx TIM3 /* Caution: Timer instance must be on APB1 (clocked by PCLK1) due to frequency computation in function "TIM_Config()" */
#define TIMx_CLK_ENABLE() __HAL_RCC_TIM3_CLK_ENABLE()
#define TIMx_FORCE_RESET() __HAL_RCC_TIM3_FORCE_RESET()
#define TIMx_RELEASE_RESET() __HAL_RCC_TIM3_RELEASE_RESET()
#define ADC_EXTERNALTRIGCONV_Tx_TRGO ADC_EXTERNALTRIGCONV_T3_TRGO
#endif /* ADC_TRIGGER_FROM_TIMER */
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
#endif /* __MAIN_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
hyller/CodeLibrary
|
stm32cubef1/STM32Cube_FW_F1_V1.3.0/Projects/STM32F103RB-Nucleo/Examples/ADC/ADC_AnalogWatchdog/Inc/main.h
|
C
|
unlicense
| 5,147
|
[
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1030,
30524,
1044,
1008,
1030,
3166,
11338,
2094,
4646,
2136,
1008,
1030,
2544,
1058,
2487,
1012,
1017,
1012,
1014,
1008,
1030,
3058,
2324,
1011,
2285,
1011,
2325,
1008,
1030,
4766,
20346,
2005,
2364,
1012,
1039,
11336,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1030,
3086,
1008,
1008,
1026,
1044,
2475,
1028,
1026,
2415,
1028,
1004,
6100,
1025,
9385,
1006,
1039,
1007,
2325,
2358,
7712,
3217,
12260,
6593,
4948,
6558,
1026,
1013,
2415,
1028,
1026,
1013,
1044,
2475,
1028,
1008,
1008,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
14080,
1010,
1008,
2024,
7936,
3024,
2008,
1996,
2206,
3785,
2024,
2777,
1024,
1008,
1015,
1012,
25707,
2015,
1997,
3120,
3642,
2442,
9279,
1996,
2682,
9385,
5060,
1010,
1008,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1012,
1008,
1016,
1012,
25707,
2015,
1999,
12441,
2433,
2442,
21376,
1996,
2682,
9385,
5060,
1010,
1008,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1999,
1996,
12653,
1008,
1998,
1013,
2030,
2060,
4475,
3024,
2007,
1996,
4353,
1012,
1008,
1017,
1012,
4445,
1996,
2171,
1997,
2358,
7712,
3217,
12260,
6593,
4948,
6558,
4496,
1996,
3415,
1997,
2049,
16884,
1008,
2089,
2022,
2109,
2000,
2203,
5668,
2063,
2030,
5326,
3688,
5173,
2013,
2023,
4007,
1008,
2302,
3563,
3188,
2517,
6656,
1012,
1008,
1008,
2023,
4007,
2003,
3024,
2011,
1996,
9385,
13304,
1998,
16884,
1000,
2004,
2003,
1000,
1008,
1998,
2151,
4671,
2030,
13339,
10943,
3111,
1010,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
1996,
1008,
13339,
10943,
3111,
1997,
6432,
8010,
1998,
10516,
2005,
1037,
3327,
3800,
2024,
1008,
5860,
19771,
7583,
1012,
1999,
2053,
2724,
4618,
1996,
9385,
9111,
2030,
16884,
2022,
20090,
1008,
2005,
2151,
3622,
1010,
14958,
1010,
5043,
2389,
1010,
2569,
1010,
27792,
1010,
2030,
9530,
3366,
15417,
4818,
1008,
12394,
1006,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
21423,
1997,
7681,
5350,
2030,
1008,
2578,
1025,
3279,
1997,
2224,
1010,
2951,
1010,
2030,
11372,
1025,
2030,
2449,
24191,
1007,
2174,
1008,
3303,
30523,
5371,
4748,
2278,
1013,
4748,
2278,
1035,
11698,
18866,
16168,
1013,
4297,
1013,
2364,
1012,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
5371,
4748,
2278,
1013,
4748,
2278,
1035,
11698,
18866,
16168,
1013,
4297,
1013,
2364,
1012,
30526
] |
JabberApp.module('DashboardApp.Show', function(Show, App, Backbone, Marionette, $, _) {
Show.Layout = App.Views.Layout.extend({
template: require('./tpl/layout.hbs')
, regions: {
upcomingRegion: '#upcoming-region'
, theatreRegion: '#theatre-region'
}
});
});
|
amelon/bbrails-express
|
assets/javascripts/backbone/apps/dashboard/show/view.js
|
JavaScript
|
unlicense
| 283
|
[
30522,
14855,
29325,
29098,
1012,
11336,
1006,
1005,
24923,
29098,
1012,
2265,
1005,
1010,
3853,
1006,
2265,
1010,
10439,
1010,
21505,
1010,
10115,
7585,
1010,
1002,
1010,
1035,
1007,
1063,
2265,
1012,
9621,
1027,
10439,
1012,
5328,
1012,
9621,
1012,
7949,
1006,
1063,
23561,
30524,
1005,
1010,
3004,
23784,
1024,
1005,
1001,
3004,
1011,
2555,
1005,
1065,
1065,
1007,
1025,
1065,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1024,
5478,
1006,
1005,
1012,
1013,
1056,
24759,
1013,
9621,
1012,
1044,
5910,
1005,
1007,
1010,
4655,
1024,
1063,
9046,
23784,
1024,
1005,
1001,
9046,
1011,
2555,
30526
] |
/*
* Copyright 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.zxing.oned.rss;
public class DataCharacter {
private final int value;
private final int checksumPortion;
public DataCharacter(int value, int checksumPortion) {
this.value = value;
this.checksumPortion = checksumPortion;
}
public final int getValue() {
return value;
}
public final int getChecksumPortion() {
return checksumPortion;
}
}
|
got5/ngCordova-demo
|
plugins/com.phonegap.plugins.barcodescanner/src/android/LibraryProject/src/com/google/zxing/oned/rss/DataCharacter.java
|
Java
|
apache-2.0
| 1,029
|
[
30522,
1013,
1008,
1008,
9385,
2268,
1062,
19612,
6048,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
7427,
4012,
1012,
8224,
1012,
1062,
19612,
1012,
2028,
2094,
1012,
12667,
2015,
1025,
2270,
2465,
30524,
2797,
2345,
20014,
3643,
1025,
2797,
2345,
20014,
14148,
24237,
11589,
3258,
1025,
2270,
2951,
7507,
22648,
3334,
1006,
20014,
3643,
1010,
20014,
14148,
24237,
11589,
3258,
1007,
1063,
2023,
1012,
3643,
1027,
3643,
1025,
2023,
1012,
14148,
24237,
11589,
3258,
1027,
14148,
24237,
11589,
3258,
1025,
1065,
2270,
2345,
20014,
2131,
10175,
5657,
1006,
1007,
1063,
2709,
3643,
1025,
1065,
2270,
2345,
20014,
2131,
5403,
10603,
24237,
11589,
3258,
1006,
1007,
1063,
2709,
14148,
24237,
11589,
3258,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
2951,
7507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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2951,
7507,
22648,
3334,
1063,
30526
] |
/**
* Copyright 2014 SAP AG
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.lpe.common.jmeter;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import java.util.Properties;
import org.lpe.common.jmeter.IO.DynamicPipedInputStream;
import org.lpe.common.jmeter.IO.FilePoller;
import org.lpe.common.jmeter.config.JMeterWorkloadConfig;
import org.lpe.common.util.system.LpeSystemUtils;
/**
* Wrapper class which handles the connection to JMeter console process.
*
* The JMeterWrapper instance is capable of running several loadtests, the log of all gets combined.
*
* It should be possible to let several JMeter instances run their tests in parallel
*
* @author Jonas Kunz
*/
public final class JMeterWrapper {
/**
* location of the JMeter bin folder
*/
private Process jmeterProcess;
private DynamicPipedInputStream logStream;
/**
* Singleton instance.
*/
private static JMeterWrapper instance;
private JMeterWrapper() {
// create the stream to provide log from JMETER
logStream = new DynamicPipedInputStream();
}
private static int getUniqueLogID() {
return (int) System.currentTimeMillis();
}
/**
* @return singleton instance.
*/
public static synchronized JMeterWrapper getInstance() {
if (instance == null) {
instance = new JMeterWrapper();
}
return instance;
}
/**
* Starts a load test and then returns immediately. To wait for the test to finish use {@link waitForLoadTestFinish}
* or poll {@link isLoadTestRunning}
*
* @param config The test configuration
* @throws IOException if starting load fails
*/
public synchronized void startLoadTest(final JMeterWorkloadConfig config) throws IOException {
// check whether a loadTest is already running
if (jmeterProcess != null) {
throw new RuntimeException("An Jmeter Process is already running, can only run one process per wrapperinstance");
}
// create log file
File logFile = createLogFile(config);
List<String> cmd = buildCmdLine(config,
logFile);
ProcessBuilder pb = new ProcessBuilder(cmd);
pb.directory(new File(config.getPathToJMeterRootFolder()));
// output needs to be redirected
pb.redirectOutput(new File(config.getPathToJMeterRootFolder().concat("\\" + config.getDefaultOutputFile())));
// the error stream must be piped, otherwise noone takes the messages and JMeter waits to infinity
// till someone receives the messages!
pb.redirectErrorStream(true);
jmeterProcess = pb.start();
// poll the log file
final FilePoller poll = new FilePoller(logFile, logStream, true);
if (config.getCreateLogFlag()) {
poll.startPolling();
}
final JMeterWrapper thisWrapper = this;
// add a Thread that waits for the Process to terminate who then
// notifies all other waiting Threads
LpeSystemUtils.submitTask(new Runnable() {
public void run() {
try {
jmeterProcess.waitFor();
// notify the log-thread that the process has ended and wait
// for
// polling to finish
if (config.getCreateLogFlag()) {
poll.endPolling();
}
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
synchronized (thisWrapper) {
jmeterProcess = null;
thisWrapper.notifyAll();
}
}
});
}
/**
* Creates a new log file based on the passed configuration.
*
* @param config the {@link JMeterWorkloadConfig}, only the logfile flag is requested
* @return the log file, <code>null</code> possible
* @throws IOException on file creation fail
*/
private File createLogFile(JMeterWorkloadConfig config) throws IOException {
File logFile = null;
if (config.getCreateLogFlag()) {
int logID = getUniqueLogID();
String logFilename = config.getPathToJMeterRootFolder() + "\\" + config.getLogFilePrefix() + logID;
logFile = new File(logFilename);
if (logFile.exists()) {
logFile.delete();
}
logFile.createNewFile();
}
return logFile;
}
/**
* Builds the command line to execute a Apache JMeter load script with the passed configuration. If the lof flag has
* been set, the output will be redirected to the passed log file.<br />
* See more about JMeter command line configuration: http://jmeter.apache.org/usermanual/get-started.html.
*
* @param config the configuration for JMeter
* @param logFile {@link File} which will get the JMeter output, if the configuration has the
* @return List of the translated configuration into command line arguments
*/
private List<String> buildCmdLine(final JMeterWorkloadConfig config, File logFile) {
List<String> cmd = new ArrayList<String>();
cmd.add("java");
cmd.add("-jar");
cmd.add("bin\\ApacheJMeter.jar");
cmd.add("-n"); // JMeter in non-gui mode
cmd.add("-t"); // load script fiel path
cmd.add("\"" + config.getPathToScript() + "\"");
if (config.getCreateLogFlag()) {
cmd.add("-j");
cmd.add(logFile.getAbsolutePath());
}
// now add all the JMeter variables
cmd.add("-Jp_durationSeconds=" + config.getExperimentDuration());
cmd.add("-Jp_numUsers=" + config.getNumUsers());
cmd.add("-Jp_thinkTimeMinMS=" + config.getThinkTimeMinimum());
cmd.add("-Jp_thinkTimeMaxMS=" + config.getThinkTimeMaximum());
double rampUpSecondsPerUser = config.getRampUpInterval() / config.getRampUpNumUsersPerInterval();
double coolDownSecondsPerUser = config.getCoolDownInterval() / config.getCoolDownNumUsersPerInterval();
cmd.add("-Jp_rampUpSecondsPerUser=" + rampUpSecondsPerUser);
cmd.add("-Jp_rampDownSecondsPerUser=" + coolDownSecondsPerUser);
if (config.getSamplingFileFlag()) {
cmd.add("-Jp_resultFile=" + config.getPathToSamplingFile());
}
// add custom properties
Properties additionalProps = config.getAdditionalProperties();
for (Entry<Object, Object> property : additionalProps.entrySet()) {
cmd.add("-J" + property.getKey() + "=" + property.getValue());
}
return cmd;
}
/**
* Returns the stream instance which belongs to this wrapper. It contains the log of the loadtests ran
*
* @return the stream instance - must not be closed
*/
public InputStream getLogStream() {
return logStream;
}
/**
* Checks whether a load test is running at the moment.
*
* @return <tt>true</tt> if running, <tt>false</tt> if not
*/
public boolean isLoadTestRunning() {
return (jmeterProcess != null);
}
/**
* Waits for the current loadtest to finish. If no loadtest is running, the method returns immediately.
*
* @throws InterruptedException if the Thread is interrupted
*/
public synchronized void waitForLoadTestFinish() throws InterruptedException {
while (jmeterProcess != null) {
this.wait();
}
}
}
|
sopeco/LPE-Common
|
org.lpe.common.jmeter/src/org/lpe/common/jmeter/JMeterWrapper.java
|
Java
|
apache-2.0
| 7,278
|
[
30522,
1013,
1008,
1008,
1008,
9385,
2297,
20066,
12943,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1008,
1996,
6105,
1012,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
1008,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
2156,
1996,
6105,
2005,
1996,
1008,
3563,
2653,
8677,
6656,
2015,
1998,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
7427,
8917,
1012,
6948,
2063,
1012,
2691,
1012,
1046,
22828,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
1025,
12324,
9262,
1012,
22834,
1012,
22834,
10288,
24422,
1025,
12324,
9262,
1012,
22834,
1012,
20407,
25379,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
9140,
9863,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
4949,
1012,
4443,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
5144,
1025,
12324,
8917,
1012,
6948,
2063,
1012,
2691,
1012,
1046,
22828,
1012,
22834,
1012,
8790,
24548,
8718,
18780,
21422,
1025,
12324,
8917,
1012,
6948,
2063,
1012,
2691,
1012,
1046,
22828,
1012,
22834,
1012,
5371,
18155,
3917,
1025,
12324,
8917,
1012,
6948,
2063,
1012,
2691,
1012,
1046,
22828,
1012,
9530,
8873,
2290,
1012,
1046,
22828,
6198,
11066,
8663,
8873,
2290,
1025,
12324,
8917,
1012,
6948,
2063,
1012,
2691,
1012,
21183,
4014,
1012,
2291,
1012,
6948,
2229,
27268,
6633,
21823,
4877,
1025,
1013,
1008,
1008,
1008,
10236,
4842,
2465,
2029,
16024,
1996,
4434,
2000,
1046,
22828,
10122,
2832,
1012,
1008,
1008,
1996,
1046,
22828,
13088,
29098,
2121,
6013,
2003,
5214,
1997,
2770,
2195,
7170,
22199,
2015,
1010,
1996,
30524,
22828,
13088,
29098,
2121,
1063,
1013,
1008,
1008,
1008,
3295,
1997,
1996,
1046,
22828,
8026,
19622,
1008,
1013,
2797,
2832,
1046,
22828,
21572,
9623,
2015,
1025,
2797,
8790,
24548,
8718,
18780,
21422,
15664,
25379,
1025,
1013,
1008,
1008,
1008,
28159,
6013,
1012,
1008,
1013,
2797,
10763,
1046,
22828,
13088,
29098,
2121,
6013,
1025,
2797,
1046,
22828,
13088,
29098,
2121,
1006,
1007,
1063,
1013,
1013,
3443,
1996,
5460,
2000,
3073,
8833,
2013,
1046,
22828,
15664,
25379,
1027,
2047,
8790,
24548,
8718,
18780,
21422,
1006,
1007,
1025,
1065,
2797,
10763,
20014,
2131,
19496,
22197,
8649,
3593,
1006,
1007,
1063,
2709,
1006,
20014,
1007,
2291,
1012,
2783,
7292,
19912,
2483,
1006,
1007,
1025,
1065,
1013,
1008,
1008,
1008,
1030,
2709,
28159,
6013,
1012,
1008,
1013,
2270,
10763,
25549,
1046,
22828,
13088,
29098,
2121,
2131,
7076,
26897,
1006,
1007,
1063,
2065,
1006,
6013,
1027,
1027,
19701,
1007,
1063,
6013,
1027,
30523,
8833,
1997,
2035,
4152,
4117,
1012,
1008,
1008,
2009,
2323,
2022,
2825,
2000,
2292,
2195,
1046,
22828,
12107,
2448,
2037,
5852,
1999,
5903,
1008,
1008,
1030,
3166,
10680,
28919,
2480,
1008,
1013,
2270,
2345,
2465,
1046,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
8833,
1997,
2035,
4152,
4117,
1012,
1008,
1008,
2009,
2323,
2022,
2825,
2000,
2292,
2195,
1046,
22828,
12107,
2448,
2037,
5852,
1999,
5903,
1008,
1008,
1030,
3166,
10680,
28919,
2480,
1008,
1013,
2270,
2345,
2465,
1046,
30526
] |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using ConverterContracts.ConversionElementsStyles;
using FB2Library.Elements;
using XHTMLClassLibrary.BaseElements;
using XHTMLClassLibrary.BaseElements.InlineElements;
using EPubLibrary.ReferenceUtils;
using XHTMLClassLibrary.BaseElements.InlineElements.TextBasedElements;
namespace FB2EPubConverter
{
internal class HRefManagerV2
{
/// <summary>
/// List of IDs
/// </summary>
private readonly Dictionary<string, IHTMLItem> _ids = new Dictionary<string, IHTMLItem>();
/// <summary>
/// List of references
/// </summary>
private readonly Dictionary<string, List<Anchor>> _references = new Dictionary<string, List<Anchor>>();
/// <summary>
/// List of references
/// </summary>
private readonly Dictionary<string, List<Image>> _images = new Dictionary<string, List<Image>>();
/// <summary>
/// List of remapped attributes
/// </summary>
private readonly Dictionary<string, string> _attributesRemap = new Dictionary<string, string>();
/// <summary>
/// Resets the manager to empty state,
/// releases all references etc
/// </summary>
public void Reset()
{
_ids.Clear();
_references.Clear();
_attributesRemap.Clear();
_images.Clear();
}
public string AddImageRefferenced(InlineImageItem item, Image img)
{
if (item == null)
{
return string.Empty;
}
string validName = MakeValidImageName(item.HRef);
if (!_images.ContainsKey(validName))
{
var entryList = new List<Image>();
_images.Add(validName, entryList);
}
_images[validName].Add(img);
return ReferencesUtils.FormatImagePath(validName,FlatStructure);
}
public string AddImageRefferenced(ImageItem item, Image img)
{
if (item == null)
{
return string.Empty;
}
string validName = MakeValidImageName(item.HRef);
if (!_images.ContainsKey(validName))
{
var entryList = new List<Image>();
_images.Add(validName, entryList);
}
_images[validName].Add(img);
return ReferencesUtils.FormatImagePath(validName, FlatStructure);
}
private static string MakeValidImageName(string id)
{
if (string.IsNullOrEmpty(id))
{
return string.Empty;
}
string result = id;
if (id.StartsWith("#") && id.Length > 1)
{
result = id.Substring(1);
}
return result;
}
/// <summary>
/// Add used ID to the list
/// </summary>
/// <param name="id">Id to list as used</param>
/// <param name="item">item that ID belong to</param>
/// <returns>returns and registers the id if available, empty string if ID already exists</returns>
public string AddIdUsed(string id,IHTMLItem item)
{
if (string.IsNullOrEmpty(id))
{
return id;
}
string newid = EnsureGoodId(id);
if (_ids.ContainsKey(newid))
{
// we get here if in file same ID used twice
// The assumption here that since the text located in FB2 main body we should not have same ID used more than once
// otherwise we would not know how (and where to) go back
Logger.Log.InfoFormat("item with ID {0} already defined, ignoring to avoid inconsistences", newid);
return string.Empty;
}
_ids.Add(newid, item);
return newid;
}
/// <summary>
/// Checks if ID already used
/// </summary>
/// <param name="id">ID to check</param>
/// <returns>true if used, false otherwise</returns>
private bool IsIdUsed(string id)
{
if ( id.StartsWith("#") && (id.Length > 1))
{
id = id.Substring(1);
}
if (_ids.ContainsKey(EnsureGoodId(id)))
{
return true;
}
return false;
}
/// <summary>
/// Adds reference
/// Used to add hyperlinks (anchors) from one part of the document to another
/// </summary>
/// <param name="reference">reference name (name of the link we going to "jump to" - href)</param>
/// <param name="anchor">anchor element that contains the reference (place we "jump from")</param>
public void AddReference(string reference, Anchor anchor)
{
if (!ReferencesUtils.IsExternalLink(reference)) // we count only "internal" references (no need for http://... )
{
reference = EnsureGoodReference(reference); // make sure that reference name is valid according to HTML rules
List<Anchor> list;
if (!_references.ContainsKey(reference)) // if this a first time we see "jump" to this ID
{
list = new List<Anchor>(); //allocate new list of referenced objects
_references.Add(reference, list); // add list to dictionary
}
else // if we already have at least one reference to this ID
{
list = _references[reference]; // find this ID in references dictionary
}
if (string.IsNullOrEmpty((string)anchor.GlobalAttributes.ID.Value)) // if anchor does not have ID already (FB2 link element does not have ID so this is just in case), we need this for backlinking
{
string backLink = string.Format("{0}_back", reference); // generate back link
if (backLink.StartsWith("#"))
// most references starts with # as part of the href linking, so we need to strip this character to get valid ID
{
backLink = backLink.Substring(1);
}
while (IsIdUsed(backLink))
{
backLink += "x";
}
anchor.GlobalAttributes.ID.Value = backLink;
}
anchor.GlobalAttributes.ID.Value = AddIdUsed((string)anchor.GlobalAttributes.ID.Value, anchor);
list.Add(anchor);
}
}
public void AddBackReference(string reference, Anchor anchor)
{
if (!ReferencesUtils.IsExternalLink(reference)) // we count only "internal" references (no need for http://... )
{
reference = EnsureGoodReference(reference); // make sure that reference name is valid according to HTML rules
List<Anchor> list;
if (!_references.ContainsKey(reference)) // if this a first time we see "jump" to this ID
{
list = new List<Anchor>(); //allocate new list of referenced objects
_references.Add(reference, list); // add list to dictionary
}
else // if we already have at least one reference to this ID
{
list = _references[reference]; // find this ID in references dictionarry
}
list.Add(anchor);
}
}
/// <summary>
/// Ensures that all IDs are valid
/// This still require remapping the references to updated IDs
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public string EnsureGoodId(string id)
{
if (id == null)
{
return "";
}
if (id.Length == 0)
{
return id;
}
if (_attributesRemap.Keys.Any(x => x == id))
{
return _attributesRemap[id];
}
bool remaped = false;
var res = new StringBuilder();
var pattern = new Regex(@"[^a-zA-Z]");
if (pattern.IsMatch(id[0].ToString(CultureInfo.InvariantCulture)))
{
res.Append("ID");
remaped = true;
}
const string validChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
foreach (var character in id)
{
if (validChars.Contains(character.ToString(CultureInfo.InvariantCulture)))
{
res.Append(character);
}
else
{
remaped = true;
res.Append("_");
}
}
if (remaped)
{
while (_attributesRemap.Keys.Any(x => x == id))
{
res.Append(new Random().Next(0, 9).ToString(CultureInfo.InvariantCulture));
}
_attributesRemap.Add(id, res.ToString());
}
return res.ToString();
}
public string EnsureGoodReference(string reference)
{
if ((string.IsNullOrEmpty(reference)) || (reference[0] != '#') || (reference.Length < 2))
{
return reference;
}
string subRef = reference.Substring(1);
return string.Format("#{0}", EnsureGoodId(subRef));
}
public void RemapAnchors(BookStructureManager structureManager)
{
var listToRemove = new List<string>();
foreach (var link in _references)
{
if (!ReferencesUtils.IsExternalLink(link.Key))
{
if (IsIdUsed(link.Key))
{
RemapInternalLink(structureManager, link);
}
else
{
listToRemove.Add(link.Key);
RemoveInvalidAnchor(link);
}
}
}
// Remove the unused anchor (and their ID if they have one)
// from the lists
foreach (var toRemove in listToRemove)
{
_references.Remove(toRemove);
}
}
/// <summary>
/// Processes all the references and removes invalid anchors
/// Invalid meaning pointing to non-existing IDs
/// only "internal" anchors are removed
/// </summary>
private void RemoveInvalidAnchor(KeyValuePair<string, List<Anchor>> link)
{
// remove all references to this ID
foreach (var element in _references[link.Key])
{
// The Anchor element can't have empty reference so
// we remove it and in case it has some meaningful content
// replace with span that is meaningless non-block element
// so contained text etc are kept
if (element.SubElements().Count != 0)
{
var spanElement = new Span(element.HTMLStandard);
foreach (var subElement in element.SubElements())
{
spanElement.Add(subElement);
}
if (element.Parent != null)
{
int index = element.Parent.SubElements().IndexOf(element);
if (index != -1)
{
spanElement.Parent = element.Parent;
element.Parent.SubElements().Insert(index, spanElement);
}
}
if (!string.IsNullOrEmpty((string)element.GlobalAttributes.ID.Value))
{
spanElement.GlobalAttributes.ID.Value = element.GlobalAttributes.ID.Value; // Copy ID anyway - may be someone "jumps" here
_ids[(string)element.GlobalAttributes.ID.Value] = spanElement; // and update the "pointer" to element
}
spanElement.GlobalAttributes.Class.Value = ElementStylesV2.BadExternalLink;
}
if (element.Parent != null)
{
element.Parent.Remove(element);
}
}
}
private void RemapInternalLink(BookStructureManager structureManager, KeyValuePair<string, List<Anchor>> link)
{
var linkRemaper = new LinkReMapperV2(link, _ids, structureManager);
linkRemaper.Remap();
}
public void RemoveInvalidImages(Dictionary<string, BinaryItem> dictionary)
{
foreach (var imageId in _images.Keys)
{
if (!dictionary.ContainsKey(imageId))
{
foreach (var element in _images[imageId])
{
if (element.Parent != null)
{
element.Parent.Remove(element);
}
}
}
}
}
public bool FlatStructure { get; set; }
}
}
|
LordKiRon/fb2converters
|
fb2epub/FB2EPubConverter/HRefManagerV2.cs
|
C#
|
mit
| 13,852
|
[
30522,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
24370,
1025,
2478,
2291,
1012,
11409,
4160,
1025,
2478,
2291,
1012,
3793,
1025,
2478,
2291,
1012,
3793,
1012,
3180,
10288,
20110,
8496,
1025,
2478,
10463,
2121,
8663,
6494,
16649,
1012,
7584,
12260,
8163,
21756,
4244,
1025,
2478,
1042,
2497,
2475,
29521,
19848,
2100,
1012,
3787,
1025,
2478,
1060,
11039,
19968,
26266,
29521,
19848,
2100,
1012,
2918,
12260,
8163,
1025,
2478,
1060,
11039,
19968,
26266,
29521,
19848,
2100,
1012,
2918,
12260,
8163,
1012,
23881,
12260,
8163,
1025,
2478,
4958,
12083,
29521,
19848,
2100,
1012,
4431,
21823,
4877,
1025,
2478,
1060,
11039,
19968,
26266,
29521,
19848,
2100,
1012,
2918,
12260,
8163,
1012,
23881,
12260,
8163,
1012,
3793,
15058,
9247,
13665,
2015,
1025,
3415,
15327,
1042,
2497,
2475,
13699,
12083,
8663,
16874,
2121,
1063,
4722,
2465,
17850,
12879,
24805,
4590,
2615,
2475,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
2862,
1997,
8909,
2015,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2797,
3191,
2239,
2135,
9206,
1026,
5164,
1010,
1045,
11039,
19968,
4221,
2213,
1028,
1035,
8909,
2015,
1027,
2047,
9206,
1026,
5164,
1010,
1045,
11039,
19968,
4221,
2213,
1028,
1006,
1007,
1025,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
2862,
1997,
7604,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2797,
3191,
2239,
2135,
9206,
1026,
5164,
1010,
2862,
1026,
8133,
1028,
1028,
1035,
7604,
1027,
2047,
9206,
1026,
5164,
1010,
2862,
1026,
8133,
1028,
1028,
1006,
1007,
1025,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
2862,
1997,
7604,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2797,
3191,
2239,
2135,
9206,
1026,
5164,
1010,
2862,
1026,
3746,
1028,
1028,
1035,
4871,
1027,
2047,
9206,
1026,
5164,
1010,
2862,
1026,
3746,
1028,
1028,
1006,
1007,
1025,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
2862,
1997,
2128,
2863,
11469,
12332,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2797,
3191,
2239,
2135,
9206,
1026,
5164,
1010,
5164,
1028,
1035,
12332,
28578,
9331,
1027,
2047,
9206,
1026,
5164,
1010,
5164,
1028,
1006,
1007,
1025,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
25141,
2015,
1996,
3208,
2000,
4064,
2110,
1010,
1013,
30524,
25141,
1006,
1007,
1063,
1035,
8909,
2015,
1012,
3154,
1006,
1007,
1025,
1035,
7604,
1012,
3154,
1006,
1007,
1025,
1035,
12332,
28578,
9331,
1012,
3154,
1006,
1007,
1025,
1035,
4871,
1012,
3154,
1006,
1007,
1025,
1065,
2270,
5164,
5587,
9581,
4590,
12879,
25523,
2094,
1006,
23881,
9581,
3351,
4221,
2213,
8875,
1010,
3746,
10047,
2290,
1007,
1063,
2065,
1006,
8875,
1027,
1027,
19701,
1007,
1063,
2709,
5164,
1012,
4064,
1025,
1065,
5164,
9398,
18442,
1027,
2191,
10175,
28173,
26860,
18442,
1006,
8875,
1012,
17850,
12879,
1007,
1025,
2065,
1006,
999,
1035,
4871,
1012,
3397,
14839,
1006,
9398,
18442,
1007,
1007,
1063,
13075,
4443,
9863,
1027,
2047,
2862,
1026,
3746,
1028,
1006,
1007,
1025,
1035,
4871,
1012,
5587,
1006,
9398,
18442,
1010,
4443,
9863,
1007,
1025,
1065,
1035,
30523,
1013,
1013,
7085,
2035,
7604,
4385,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
11675,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1013,
1013,
7085,
2035,
7604,
4385,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
11675,
30526
] |
package ru.st.selenium;
import static org.testng.AssertJUnit.assertTrue;
import org.testng.annotations.Test;
import ru.st.selenium.model.User;
public class AddNewUser extends TestBase {
@Test
public void addNewUserOk() {
String username = "user" + System.currentTimeMillis();
User user = new User()
.setLogin(username)
.setPassword("password")
.setEmail(username + "@test.com");
app.getUserHelper().loginAs(ADMIN);
app.getUserHelper().createUser(user);
app.getUserHelper().logout();
app.getUserHelper().loginAs(user);
assertTrue(app.getUserHelper().isLoggedInAs(user));
}
}
|
eabramovich/Se-Java-17
|
src/test/java/ru/st/selenium/AddNewUser.java
|
Java
|
apache-2.0
| 611
|
[
30522,
7427,
21766,
1012,
2358,
1012,
7367,
7770,
5007,
1025,
12324,
10763,
8917,
1012,
3231,
3070,
1012,
20865,
19792,
4183,
1012,
20865,
16344,
5657,
1025,
12324,
8917,
1012,
3231,
3070,
1012,
5754,
17287,
9285,
1012,
3231,
1025,
12324,
21766,
1012,
2358,
1012,
7367,
7770,
5007,
1012,
2944,
1012,
5310,
1025,
2270,
2465,
5587,
2638,
16050,
8043,
8908,
3231,
15058,
1063,
1030,
3231,
2270,
11675,
5587,
2638,
16050,
8043,
6559,
1006,
1007,
1063,
5164,
5310,
18442,
1027,
1000,
5310,
1000,
1009,
2291,
1012,
2783,
7292,
19912,
2483,
1006,
1007,
1025,
5310,
5310,
1027,
2047,
5310,
1006,
1007,
1012,
2275,
21197,
2378,
1006,
5310,
18442,
1007,
1012,
2275,
15194,
18351,
1006,
1000,
20786,
1000,
1007,
1012,
2275,
14545,
4014,
1006,
5310,
18442,
1009,
1000,
1030,
3231,
1012,
4012,
1000,
1007,
1025,
10439,
1012,
2131,
20330,
16001,
4842,
1006,
1007,
1012,
8833,
15227,
1006,
4748,
10020,
1007,
1025,
10439,
1012,
2131,
20330,
30524,
1006,
1007,
1012,
8833,
15227,
1006,
5310,
1007,
1025,
20865,
16344,
5657,
1006,
10439,
1012,
2131,
20330,
16001,
4842,
1006,
1007,
1012,
2003,
21197,
5999,
15227,
1006,
5310,
1007,
1007,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
16001,
4842,
1006,
1007,
1012,
3443,
20330,
1006,
5310,
1007,
1025,
10439,
1012,
2131,
20330,
16001,
4842,
1006,
1007,
1012,
8154,
4904,
1006,
1007,
1025,
10439,
1012,
2131,
20330,
16001,
4842,
30526
] |
MotorTemperatures = new Mongo.Collection('MotorTemperatures');
// fields : value, timestamp
MotorTemperatures.allow({
insert: function(userid, temp){return true;} //for now
});
Meteor.methods({
motorTemperatureInsert: function(temp) {
check(temp,Match.Integer);
var tempObject = {
value: temp,
timestamp: Date.now()
};
MotorTemperatures.insert(tempObject);
}
});
if(Meteor.isClient){
Session.set("actualMotorTemp",MotorTemperatures.find({}, {sort: {timestamp: -1}, limit:1}).fetch()[0]);
motorTemps = [];
Session.set("motorTemps", motorTemps);
MotorTemperatures.find().observe({
added: function(temp){
Session.set("actualMotorTemp",temp);
var localMotorTemps = Session.get("motorTemps");
localMotorTemps.push({x:temp.timestamp, y:temp.value});
if(localMotorTemps.length > 50){
localMotorTemps.shift();
}
Session.set("motorTemps", localMotorTemps);
}
});
}
|
yanisIk/TelemetryDashboard
|
.old app/collections/motorTemperature.js
|
JavaScript
|
apache-2.0
| 973
|
[
30522,
5013,
18532,
4842,
4017,
14900,
1027,
2047,
12256,
3995,
1012,
3074,
1006,
1005,
5013,
18532,
4842,
4017,
14900,
1005,
1007,
1025,
1013,
1013,
4249,
1024,
3643,
1010,
2335,
15464,
2361,
5013,
18532,
4842,
4017,
14900,
1012,
3499,
1006,
1063,
19274,
1024,
3853,
1006,
5310,
3593,
1010,
8915,
8737,
1007,
1063,
2709,
2995,
1025,
1065,
1013,
1013,
2005,
2085,
1065,
1007,
1025,
23879,
1012,
4725,
1006,
1063,
5013,
18532,
4842,
4017,
5397,
7076,
8743,
1024,
3853,
1006,
8915,
8737,
1007,
1063,
4638,
1006,
8915,
8737,
1010,
2674,
1012,
16109,
1007,
1025,
13075,
13657,
2497,
20614,
1027,
1063,
3643,
1024,
8915,
8737,
1010,
2335,
15464,
2361,
1024,
3058,
1012,
2085,
1006,
1007,
1065,
1025,
5013,
18532,
4842,
4017,
14900,
1012,
19274,
1006,
13657,
30524,
4017,
14900,
1012,
2424,
1006,
1063,
1065,
1010,
1063,
4066,
1024,
1063,
2335,
15464,
2361,
1024,
1011,
1015,
1065,
1010,
5787,
1024,
1015,
1065,
1007,
1012,
18584,
1006,
1007,
1031,
1014,
1033,
1007,
1025,
5013,
18532,
4523,
1027,
1031,
1033,
1025,
5219,
1012,
2275,
1006,
1000,
5013,
18532,
4523,
1000,
1010,
5013,
18532,
4523,
1007,
1025,
5013,
18532,
4842,
4017,
14900,
1012,
2424,
1006,
1007,
1012,
11949,
1006,
1063,
2794,
1024,
3853,
1006,
8915,
8737,
1007,
1063,
5219,
1012,
2275,
1006,
1000,
5025,
15319,
19731,
8737,
1000,
1010,
8915,
8737,
1007,
1025,
13075,
2334,
15319,
19731,
25370,
1027,
5219,
1012,
2131,
1006,
1000,
5013,
18532,
4523,
1000,
1007,
1025,
2334,
15319,
19731,
25370,
1012,
5245,
1006,
1063,
1060,
1024,
8915,
8737,
1012,
2335,
15464,
2361,
1010,
1061,
1024,
8915,
8737,
1012,
3643,
1065,
1007,
1025,
2065,
1006,
2334,
15319,
19731,
25370,
1012,
3091,
1028,
2753,
1007,
1063,
2334,
15319,
19731,
25370,
1012,
5670,
1006,
1007,
1025,
1065,
5219,
1012,
2275,
1006,
1000,
5013,
18532,
4523,
1000,
1010,
2334,
15319,
19731,
25370,
1007,
1025,
1065,
1065,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2497,
20614,
1007,
1025,
1065,
1065,
1007,
1025,
2065,
1006,
23879,
1012,
2003,
20464,
11638,
1007,
1063,
5219,
1012,
2275,
1006,
1000,
5025,
15319,
19731,
8737,
1000,
1010,
5013,
18532,
4842,
30526
] |
#ifndef __HELLO_WORLD_H__
#define __HELLO_WORLD_H__
// When you import this file, you import all the cocos2d classes
#include "cocos2d.h"
#include "Box2D.h"
#include "MyContactListener.h"
#include "GameSprite.h"
USING_NS_CC;
class PhysicsSprite : public cocos2d::CCSprite
{
public:
PhysicsSprite();
void setPhysicsBody(b2Body * body);
virtual bool isDirty(void);
virtual cocos2d::CCAffineTransform nodeToParentTransform(void);
private:
b2Body* m_pBody; // strong ref
};
class HelloWorld : public cocos2d::CCLayer {
CCSize _screenSize;
public:
~HelloWorld();
HelloWorld();
// returns a Scene that contains the HelloWorld as the only child
static cocos2d::CCScene* scene();
void initPhysics();
// adds a new sprite at a given coordinate
void addNewSpriteAtPosition(cocos2d::CCPoint p);
void gameReset();
void playerScore(int player);
void createEdge(float x1, float y1, float x2, float y2, int groupIndex);
virtual void draw();
virtual void ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
virtual void ccTouchesMoved(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
virtual void ccTouchesEnded(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
void update(float dt);
void updateTime(float dt);
private:
CCSize s = CCDirector::sharedDirector()->getWinSize();
b2Body* _groundBody;
b2Body *_player1Body;
b2Body *_player2Body;
b2Body *_ballBody;
b2Fixture *_player1Fixture;
b2Fixture *_player2Fixture;
b2Fixture *_ballFixture;
b2Fixture *lowerMiddle;
b2Fixture *higherMiddle;
GameSprite *_player1;
GameSprite *_player2;
CCSprite *_ball;
CCSprite *_player1ScoreLabel1;
CCSprite *_player1ScoreLabel2;
CCSprite *_player2ScoreLabel1;
CCSprite *_player2ScoreLabel2;
int _player1Score = 0;
int _sc1Tens;
int _sc1SingleDigit;
int _player2Score = 0;
int _sc2Tens;
int _sc2SingleDigit;
bool p1touched = false;
bool p2touched = false;
CCArray *_players;
b2World* world;
cocos2d::CCTexture2D* m_pSpriteTexture; // weak ref
b2MouseJoint *_mouseJoint1;
b2MouseJoint *_mouseJoint2;
MyContactListener *_contactListener;
int minutes;
int seconds;
bool playing;
cocos2d:: CCSprite *spriteTime ;
};
#endif // __HELLO_WORLD_H__
|
firstthumb/AirHockey
|
Classes/HelloWorldScene.h
|
C
|
unlicense
| 2,440
|
[
30522,
1001,
2065,
13629,
2546,
1035,
1035,
7592,
1035,
2088,
1035,
1044,
1035,
1035,
1001,
9375,
1035,
1035,
7592,
1035,
2088,
1035,
1044,
1035,
1035,
1013,
1013,
2043,
2017,
12324,
2023,
5371,
1010,
2017,
12324,
2035,
1996,
25033,
2015,
2475,
2094,
4280,
1001,
2421,
1000,
25033,
2015,
2475,
2094,
1012,
1044,
1000,
1001,
2421,
1000,
3482,
2475,
2094,
1012,
1044,
1000,
1001,
2421,
1000,
2026,
8663,
2696,
6593,
9863,
24454,
1012,
1044,
1000,
1001,
2421,
1000,
2399,
18098,
4221,
1012,
1044,
1000,
2478,
1035,
24978,
1035,
10507,
1025,
2465,
5584,
13102,
17625,
1024,
2270,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
13102,
17625,
1063,
2270,
1024,
5584,
13102,
17625,
1006,
1007,
1025,
11675,
2275,
15638,
23684,
1006,
1038,
2475,
23684,
1008,
2303,
1007,
1025,
7484,
22017,
2140,
2003,
4305,
5339,
2100,
1006,
11675,
1007,
1025,
7484,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
10354,
30524,
10507,
24314,
1063,
10507,
5332,
4371,
1035,
12117,
4697,
1025,
2270,
1024,
1066,
7592,
11108,
1006,
1007,
1025,
7592,
11108,
1006,
1007,
1025,
1013,
1013,
5651,
1037,
3496,
2008,
3397,
1996,
7592,
11108,
2004,
1996,
2069,
2775,
10763,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
11020,
8625,
1008,
3496,
1006,
1007,
1025,
11675,
1999,
4183,
15638,
1006,
1007,
1025,
1013,
1013,
9909,
1037,
2047,
11867,
17625,
2012,
1037,
2445,
13530,
11675,
5587,
2638,
9333,
18098,
4221,
4017,
26994,
1006,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
8400,
1052,
1007,
1025,
11675,
27911,
6810,
2102,
1006,
1007,
1025,
11675,
2867,
17345,
1006,
20014,
2447,
1007,
1025,
11675,
3443,
24225,
1006,
14257,
1060,
2487,
1010,
14257,
1061,
2487,
1010,
14257,
1060,
2475,
1010,
14257,
1061,
2475,
1010,
20014,
2177,
22254,
10288,
1007,
1025,
7484,
11675,
4009,
1006,
1007,
1025,
7484,
11675,
10507,
24826,
8376,
4783,
5289,
1006,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
13462,
1008,
12817,
1010,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
18697,
3372,
1008,
2724,
1007,
1025,
7484,
11675,
10507,
24826,
8376,
5302,
7178,
1006,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
13462,
1008,
12817,
1010,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
18697,
3372,
1008,
2724,
1007,
1025,
7484,
11675,
10507,
24826,
8376,
21945,
1006,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
13462,
1008,
12817,
1010,
25033,
2015,
2475,
2094,
1024,
1024,
10507,
18697,
3372,
1008,
2724,
1007,
1025,
11675,
10651,
1006,
14257,
26718,
1007,
1025,
11675,
10651,
7292,
1006,
14257,
26718,
1007,
1025,
2797,
1024,
10507,
5332,
4371,
1055,
1027,
10507,
4305,
2890,
16761,
1024,
1024,
4207,
4305,
2890,
16761,
1006,
1007,
1011,
1028,
2131,
10105,
5332,
4371,
1006,
1007,
1025,
1038,
2475,
23684,
1008,
1035,
2598,
23684,
1025,
1038,
2475,
23684,
1008,
1035,
2447,
2487,
23684,
1025,
1038,
2475,
23684,
1008,
1035,
2447,
2475,
23684,
1025,
1038,
2475,
23684,
1008,
1035,
3608,
23684,
1025,
1038,
2475,
8873,
30523,
23460,
6494,
3619,
14192,
13045,
14399,
12069,
3372,
6494,
3619,
14192,
1006,
11675,
1007,
1025,
2797,
1024,
1038,
2475,
23684,
1008,
1049,
1035,
1052,
23684,
1025,
1013,
1013,
2844,
25416,
1065,
1025,
2465,
7592,
11108,
1024,
2270,
25033,
2015,
2475,
2094,
1024,
1024,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
23460,
6494,
3619,
14192,
13045,
14399,
12069,
3372,
6494,
3619,
14192,
1006,
11675,
1007,
1025,
2797,
1024,
1038,
2475,
23684,
1008,
1049,
1035,
1052,
23684,
1025,
1013,
1013,
2844,
25416,
1065,
1025,
2465,
7592,
11108,
1024,
2270,
25033,
2015,
2475,
2094,
1024,
1024,
30526
] |
/*! \file ocl_icp_reg.hpp
* \brief Declares the classes for setting up the OpenCL %ICP pipeline.
* \author Nick Lamprianidis
* \version 1.1.0
* \date 2015
* \copyright The MIT License (MIT)
* \par
* Copyright (c) 2015 Nick Lamprianidis
* \par
* 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:
* \par
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* \par
* 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.
*/
#ifndef OCL_ICP_SBS_HPP
#define OCL_ICP_SBS_HPP
#include <GL/glew.h> // Add before CLUtils.hpp
#include <CLUtils.hpp>
#include <ICP/algorithms.hpp>
#include <eigen3/Eigen/Dense>
/*! \brief Creates an OpenCL environment with CL-GL interoperability. */
class CLEnvGL : public clutils::CLEnv
{
public:
/*! \brief Initializes the OpenCL environment. */
CLEnvGL (GLuint *glPC4DBuffer, GLuint *glRGBABuffer, int width, int height);
private:
/*! \brief Initializes the OpenGL memory buffers. */
void initGLMemObjects ();
GLuint *glPC4DBuffer, *glRGBABuffer;
int width, height;
};
/*! \brief Performs the %ICP iterations.
* \details Estimates, step by step, the homogeneous transformation between two point clouds,
* and transforms the relevant point cloud according to that transformation.
*/
template <cl_algo::ICP::ICPStepConfigT RC, cl_algo::ICP::ICPStepConfigW WC>
class ICPReg
{
public:
ICPReg (GLuint *glPC4DBuffer, GLuint *glRGBABuffer);
void init (std::vector<cl_float8> pc8d1, std::vector<cl_float8> pc8d2);
void registerPC ();
private:
unsigned int width, height, n, m, r;
CLEnvGL env;
clutils::CLEnvInfo<1> infoRBC, infoICP;
cl::Context &context;
cl::CommandQueue &queue;
GLuint *glPC4DBuffer, *glRGBABuffer;
cl_float blue[4], green[4], dummy[4];
std::vector<cl_float4> vBlue, vGreen, vDummy;
std::vector<cl::BufferGL> dBufferGL;
cl::size_t<3> src_origin_g, src_origin_c;
cl::size_t<3> dst_origin_1, dst_origin_2;
cl::size_t<3> region;
float a, c;
unsigned int max_iterations;
double angle_threshold;
double translation_threshold;
cl_algo::ICP::ICPLMs fLM, mLM;
cl_algo::ICP::ICP<RC, WC> reg;
cl_algo::ICP::ICPTransform<cl_algo::ICP::ICPTransformConfig::QUATERNION> transform;
};
#endif // OCL_ICP_SBS_HPP
|
pAIgn10/ICP
|
include/ocl_icp_reg.hpp
|
C++
|
mit
| 3,223
|
[
30522,
1013,
1008,
999,
1032,
5371,
1051,
20464,
1035,
24582,
2361,
1035,
19723,
1012,
6522,
2361,
1008,
1032,
4766,
18806,
1996,
4280,
2005,
4292,
2039,
1996,
2330,
20464,
1003,
24582,
2361,
13117,
1012,
1008,
1032,
3166,
4172,
10437,
6862,
28173,
2015,
1008,
1032,
2544,
1015,
1012,
1015,
1012,
1014,
1008,
1032,
3058,
2325,
1008,
1032,
9385,
1996,
10210,
6105,
1006,
10210,
1007,
1008,
1032,
11968,
1008,
9385,
1006,
1039,
1007,
2325,
4172,
10437,
6862,
28173,
2015,
1008,
1032,
11968,
1008,
6656,
2003,
2182,
3762,
4379,
1010,
2489,
1997,
3715,
1010,
2000,
2151,
2711,
11381,
1037,
6100,
1008,
1997,
2023,
4007,
1998,
3378,
12653,
6764,
1006,
1996,
1000,
4007,
1000,
1007,
1010,
2000,
3066,
1008,
1999,
1996,
4007,
2302,
16840,
1010,
2164,
2302,
22718,
1996,
2916,
1008,
2000,
2224,
1010,
6100,
1010,
19933,
1010,
13590,
1010,
10172,
1010,
16062,
1010,
4942,
13231,
12325,
1010,
1998,
1013,
2030,
5271,
1008,
4809,
1997,
1996,
4007,
1010,
1998,
2000,
9146,
5381,
2000,
3183,
1996,
4007,
2003,
1008,
19851,
2000,
2079,
2061,
1010,
3395,
2000,
1996,
2206,
3785,
1024,
1008,
1032,
11968,
1008,
1996,
2682,
9385,
5060,
1998,
2023,
6656,
5060,
4618,
2022,
2443,
1999,
1008,
2035,
4809,
2030,
6937,
8810,
1997,
1996,
4007,
1012,
1008,
1032,
11968,
1008,
1996,
4007,
2003,
3024,
1000,
2004,
2003,
1000,
1010,
2302,
10943,
2100,
1997,
2151,
2785,
1010,
4671,
2030,
1008,
13339,
1010,
2164,
2021,
2025,
3132,
2000,
1996,
10943,
3111,
1997,
6432,
8010,
1010,
1008,
10516,
2005,
1037,
3327,
3800,
1998,
2512,
2378,
19699,
23496,
3672,
1012,
1999,
2053,
2724,
4618,
1996,
1008,
6048,
2030,
9385,
13304,
2022,
20090,
2005,
2151,
4366,
1010,
12394,
2030,
2060,
1008,
14000,
1010,
3251,
1999,
2019,
2895,
1997,
3206,
1010,
17153,
2102,
2030,
4728,
1010,
17707,
2013,
1010,
1008,
2041,
1997,
2030,
1999,
4434,
2007,
1996,
4007,
2030,
1996,
2224,
2030,
2060,
24069,
1999,
1008,
1996,
4007,
1012,
1008,
1013,
1001,
2065,
13629,
2546,
1051,
20464,
1035,
24582,
2361,
1035,
21342,
1035,
6522,
2361,
1001,
9375,
1051,
20464,
1035,
24582,
2361,
1035,
21342,
1035,
6522,
2361,
1001,
2421,
1026,
1043,
2140,
1013,
1043,
2571,
2860,
1012,
1044,
1028,
1013,
1013,
5587,
30524,
1008,
999,
1032,
4766,
9005,
2019,
2330,
20464,
4044,
2007,
18856,
1011,
1043,
2140,
6970,
25918,
8010,
1012,
1008,
1013,
2465,
18856,
2368,
2615,
23296,
1024,
2270,
18856,
21823,
4877,
1024,
1024,
18856,
2368,
2615,
1063,
2270,
1024,
1013,
1008,
999,
1032,
4766,
3988,
10057,
1996,
2330,
20464,
4044,
1012,
1008,
1013,
18856,
2368,
2615,
23296,
1006,
1043,
7630,
18447,
1008,
1043,
14277,
2278,
2549,
18939,
16093,
7512,
1010,
1043,
7630,
18447,
1008,
1043,
20974,
18259,
7875,
16093,
7512,
1010,
20014,
9381,
1010,
20014,
4578,
1007,
1025,
2797,
1024,
1013,
1008,
999,
1032,
4766,
3988,
10057,
1996,
2330,
23296,
3638,
17698,
2015,
1012,
1008,
1013,
11675,
1999,
4183,
30523,
2077,
18856,
21823,
4877,
1012,
6522,
2361,
1001,
2421,
1026,
18856,
21823,
4877,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
24582,
2361,
1013,
13792,
1012,
6522,
2361,
1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
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2077,
18856,
21823,
4877,
1012,
6522,
2361,
1001,
2421,
1026,
18856,
21823,
4877,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
24582,
2361,
1013,
13792,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
1041,
29206,
2509,
1013,
1041,
29206,
1013,
9742,
1028,
1013,
30526
] |
<?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace ApiPlatform\Doctrine\Odm\Filter;
use ApiPlatform\Doctrine\Common\PropertyHelperTrait;
use ApiPlatform\Doctrine\Odm\PropertyHelperTrait as MongoDbOdmPropertyHelperTrait;
use Doctrine\ODM\MongoDB\Aggregation\Builder;
use Doctrine\Persistence\ManagerRegistry;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;
/**
* {@inheritdoc}
*
* Abstract class for easing the implementation of a filter.
*
* @experimental
*
* @author Alan Poulain <contact@alanpoulain.eu>
*/
abstract class AbstractFilter implements FilterInterface
{
use MongoDbOdmPropertyHelperTrait;
use PropertyHelperTrait;
protected $managerRegistry;
protected $logger;
protected $properties;
protected $nameConverter;
public function __construct(ManagerRegistry $managerRegistry, LoggerInterface $logger = null, array $properties = null, NameConverterInterface $nameConverter = null)
{
$this->managerRegistry = $managerRegistry;
$this->logger = $logger ?? new NullLogger();
$this->properties = $properties;
$this->nameConverter = $nameConverter;
}
/**
* {@inheritdoc}
*/
public function apply(Builder $aggregationBuilder, string $resourceClass, string $operationName = null, array &$context = [])
{
foreach ($context['filters'] as $property => $value) {
$this->filterProperty($this->denormalizePropertyName($property), $value, $aggregationBuilder, $resourceClass, $operationName, $context);
}
}
/**
* Passes a property through the filter.
*
* @param mixed $value
*/
abstract protected function filterProperty(string $property, $value, Builder $aggregationBuilder, string $resourceClass, string $operationName = null, array &$context = []);
protected function getManagerRegistry(): ManagerRegistry
{
return $this->managerRegistry;
}
protected function getProperties(): ?array
{
return $this->properties;
}
protected function getLogger(): LoggerInterface
{
return $this->logger;
}
/**
* Determines whether the given property is enabled.
*/
protected function isPropertyEnabled(string $property, string $resourceClass): bool
{
if (null === $this->properties) {
// to ensure sanity, nested properties must still be explicitly enabled
return !$this->isPropertyNested($property, $resourceClass);
}
return \array_key_exists($property, $this->properties);
}
protected function denormalizePropertyName($property)
{
if (!$this->nameConverter instanceof NameConverterInterface) {
return $property;
}
return implode('.', array_map([$this->nameConverter, 'denormalize'], explode('.', (string) $property)));
}
protected function normalizePropertyName($property)
{
if (!$this->nameConverter instanceof NameConverterInterface) {
return $property;
}
return implode('.', array_map([$this->nameConverter, 'normalize'], explode('.', (string) $property)));
}
}
|
api-platform/core
|
src/Doctrine/Odm/Filter/AbstractFilter.php
|
PHP
|
mit
| 3,450
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
1996,
17928,
4132,
2622,
1012,
1008,
1008,
1006,
1039,
1007,
4901,
29328,
8523,
1026,
29328,
8523,
1030,
20917,
4014,
1012,
4012,
1028,
1008,
1008,
2005,
1996,
2440,
9385,
1998,
6105,
2592,
1010,
3531,
3193,
1996,
6105,
1008,
5371,
2008,
2001,
5500,
2007,
2023,
3120,
3642,
1012,
1008,
1013,
13520,
1006,
9384,
1035,
4127,
1027,
1015,
1007,
1025,
3415,
15327,
17928,
24759,
4017,
14192,
1032,
8998,
1032,
1051,
22117,
1032,
11307,
1025,
2224,
17928,
24759,
4017,
14192,
1032,
8998,
1032,
2691,
1032,
3200,
16001,
4842,
6494,
4183,
1025,
2224,
17928,
24759,
4017,
14192,
1032,
8998,
1032,
1051,
22117,
1032,
3200,
16001,
4842,
6494,
4183,
2004,
12256,
3995,
18939,
7716,
8737,
18981,
15010,
16001,
4842,
6494,
4183,
1025,
2224,
8998,
1032,
1051,
22117,
1032,
12256,
3995,
18939,
1032,
28041,
1032,
12508,
1025,
2224,
8998,
1032,
28297,
1032,
3208,
2890,
24063,
2854,
1025,
2224,
8827,
2099,
1032,
8833,
1032,
8833,
4590,
18447,
2121,
12172,
1025,
2224,
8827,
2099,
1032,
8833,
1032,
19701,
21197,
4590,
1025,
2224,
25353,
2213,
14876,
4890,
1032,
6922,
1032,
7642,
17629,
1032,
2171,
8663,
16874,
2121,
1032,
2171,
8663,
16874,
23282,
3334,
12172,
1025,
1013,
1008,
1008,
1008,
1063,
1030,
22490,
3527,
2278,
1065,
1008,
1008,
10061,
2465,
2005,
24070,
1996,
7375,
1997,
1037,
11307,
1012,
1008,
1008,
1030,
6388,
1008,
1008,
1030,
3166,
5070,
13433,
7068,
2378,
1026,
3967,
1030,
5070,
6873,
7068,
2378,
1012,
7327,
1028,
1008,
1013,
10061,
2465,
10061,
8873,
21928,
22164,
11307,
18447,
2121,
12172,
1063,
2224,
12256,
3995,
18939,
7716,
8737,
18981,
15010,
16001,
4842,
6494,
4183,
1025,
2224,
3200,
16001,
4842,
6494,
4183,
1025,
5123,
1002,
3208,
2890,
24063,
2854,
1025,
5123,
1002,
8833,
4590,
1025,
5123,
1002,
5144,
1025,
5123,
1002,
2171,
8663,
16874,
2121,
1025,
2270,
3853,
1035,
1035,
9570,
1006,
3208,
2890,
24063,
2854,
1002,
3208,
2890,
24063,
2854,
1010,
8833,
4590,
18447,
2121,
12172,
1002,
8833,
4590,
1027,
19701,
1010,
9140,
1002,
5144,
1027,
30524,
1063,
1002,
2023,
1011,
1028,
3208,
2890,
24063,
2854,
1027,
1002,
3208,
2890,
24063,
2854,
1025,
1002,
2023,
1011,
1028,
8833,
4590,
1027,
1002,
8833,
4590,
1029,
1029,
2047,
19701,
21197,
4590,
1006,
1007,
1025,
1002,
2023,
1011,
1028,
5144,
1027,
1002,
5144,
1025,
1002,
2023,
1011,
1028,
2171,
8663,
16874,
2121,
1027,
1002,
2171,
8663,
16874,
2121,
1025,
1065,
1013,
1008,
1008,
1008,
1063,
1030,
22490,
3527,
2278,
1065,
1008,
1013,
2270,
3853,
6611,
1006,
12508,
1002,
28041,
8569,
23891,
2099,
1010,
5164,
1002,
7692,
26266,
1010,
5164,
1002,
3169,
18442,
1027,
19701,
1010,
9140,
1004,
1002,
6123,
1027,
1031,
1033,
1007,
1063,
18921,
6776,
1006,
1002,
6123,
1031,
1005,
17736,
1005,
1033,
2004,
1002,
3200,
1027,
1028,
1002,
3643,
1007,
1063,
1002,
2023,
1011,
1028,
11307,
21572,
4842,
3723,
1006,
1002,
2023,
1011,
1028,
7939,
2953,
9067,
4697,
21572,
4842,
25680,
14074,
1006,
1002,
3200,
1007,
1010,
1002,
3643,
1010,
1002,
28041,
8569,
30523,
19701,
1010,
2171,
8663,
16874,
23282,
3334,
12172,
1002,
2171,
8663,
16874,
2121,
1027,
19701,
1007,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
19701,
1010,
2171,
8663,
16874,
23282,
3334,
12172,
1002,
2171,
8663,
16874,
2121,
1027,
19701,
1007,
30526
] |
/**********************************************************************
* $Id$
*
* GEOS - Geometry Engine Open Source
* http://geos.refractions.net
*
* Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
* Copyright (C) 2007 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/buffer/OffsetSegmentString.java r378 (JTS-1.12)
*
**********************************************************************/
#ifndef GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
#define GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
#include <geos/geom/Coordinate.h> // for inlines
#include <geos/geom/CoordinateSequence.h> // for inlines
#include <geos/geom/CoordinateArraySequence.h> // for composition
#include <geos/geom/PrecisionModel.h> // for inlines
#include <vector>
#include <memory>
#include <cassert>
namespace geos {
namespace operation { // geos.operation
namespace buffer { // geos.operation.buffer
/// A dynamic list of the vertices in a constructed offset curve.
//
/// Automatically removes close vertices
/// which are closer than a given tolerance.
///
/// @author Martin Davis
///
class OffsetSegmentString
{
private:
geom::CoordinateArraySequence* ptList;
const geom::PrecisionModel* precisionModel;
/** \brief
* The distance below which two adjacent points on the curve
* are considered to be coincident.
*
* This is chosen to be a small fraction of the offset distance.
*/
double minimumVertexDistance;
/** \brief
* Tests whether the given point is redundant relative to the previous
* point in the list (up to tolerance)
*
* @param pt
* @return true if the point is redundant
*/
bool isRedundant(const geom::Coordinate& pt) const
{
if (ptList->size() < 1)
return false;
const geom::Coordinate& lastPt = ptList->back();
double ptDist = pt.distance(lastPt);
if (ptDist < minimumVertexDistance)
return true;
return false;
}
public:
friend std::ostream& operator<< (std::ostream& os, const OffsetSegmentString& node);
OffsetSegmentString()
:
ptList(new geom::CoordinateArraySequence()),
precisionModel(NULL),
minimumVertexDistance (0.0)
{
}
~OffsetSegmentString()
{
delete ptList;
}
void reset()
{
if ( ptList ) ptList->clear();
else ptList = new geom::CoordinateArraySequence();
precisionModel = NULL;
minimumVertexDistance = 0.0;
}
void setPrecisionModel(const geom::PrecisionModel* nPrecisionModel)
{
precisionModel = nPrecisionModel;
}
void setMinimumVertexDistance(double nMinVertexDistance)
{
minimumVertexDistance = nMinVertexDistance;
}
void addPt(const geom::Coordinate& pt)
{
assert(precisionModel);
geom::Coordinate bufPt = pt;
precisionModel->makePrecise(bufPt);
// don't add duplicate (or near-duplicate) points
if (isRedundant(bufPt))
{
return;
}
// we ask to allow repeated as we checked this ourself
// (JTS uses a vector for ptList, not a CoordinateSequence,
// we should do the same)
ptList->add(bufPt, true);
}
void addPts(const geom::CoordinateSequence& pts, bool isForward)
{
if ( isForward ) {
for (size_t i=0, n=pts.size(); i<n; ++i) {
addPt(pts[i]);
}
} else {
for (size_t i=pts.size(); i>0; --i) {
addPt(pts[i-1]);
}
}
}
/// Check that points are a ring
//
/// add the startpoint again if they are not
void closeRing()
{
if (ptList->size() < 1) return;
const geom::Coordinate& startPt = ptList->front();
const geom::Coordinate& lastPt = ptList->back();
if (startPt.equals(lastPt)) return;
// we ask to allow repeated as we checked this ourself
ptList->add(startPt, true);
}
/// Get coordinates by taking ownership of them
//
/// After this call, the coordinates reference in
/// this object are dropped. Calling twice will
/// segfault...
///
/// FIXME: refactor memory management of this
///
geom::CoordinateSequence* getCoordinates()
{
closeRing();
geom::CoordinateSequence* ret = ptList;
ptList = 0;
return ret;
}
inline int size() const { return ptList ? ptList->size() : 0 ; }
};
inline std::ostream& operator<< (std::ostream& os,
const OffsetSegmentString& lst)
{
if ( lst.ptList )
{
os << *(lst.ptList);
}
else
{
os << "empty (consumed?)";
}
return os;
}
} // namespace geos.operation.buffer
} // namespace geos.operation
} // namespace geos
#endif // ndef GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
|
Uli1/geos
|
include/geos/operation/buffer/OffsetSegmentString.h
|
C
|
lgpl-2.1
| 4,706
|
[
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1002,
8909,
1002,
1008,
1008,
20248,
2015,
1011,
10988,
3194,
2330,
3120,
1008,
8299,
1024,
1013,
1013,
20248,
2015,
1012,
25416,
25533,
2015,
1012,
5658,
1008,
1008,
9385,
1006,
1039,
1007,
2249,
5472,
3217,
15548,
8591,
2072,
1026,
2358,
8024,
1030,
3145,
16313,
1012,
5658,
1028,
1008,
9385,
1006,
1039,
1007,
2289,
25416,
25533,
2015,
2470,
4297,
1012,
1008,
1008,
2023,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
1998,
1013,
2030,
19933,
2009,
2104,
1008,
1996,
3408,
1997,
1996,
27004,
8276,
2236,
2270,
11172,
2004,
2405,
1008,
2011,
1996,
2489,
4007,
3192,
1012,
1008,
2156,
1996,
24731,
5371,
2005,
2062,
2592,
1012,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
2197,
3417,
1024,
3169,
1013,
17698,
1013,
16396,
3366,
21693,
11187,
18886,
3070,
1012,
9262,
1054,
24434,
2620,
1006,
1046,
3215,
1011,
1015,
1012,
2260,
1007,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1013,
1001,
2065,
13629,
2546,
20248,
2015,
1035,
6728,
30524,
1035,
1044,
1001,
9375,
20248,
2015,
1035,
6728,
1035,
17698,
1035,
16396,
3366,
21693,
11187,
18886,
3070,
1035,
1044,
1001,
2421,
1026,
20248,
2015,
1013,
20248,
2213,
1013,
13530,
1012,
1044,
1028,
1013,
1013,
2005,
23881,
2015,
1001,
2421,
1026,
20248,
2015,
1013,
20248,
2213,
1013,
12093,
2063,
4226,
5897,
1012,
1044,
1028,
1013,
1013,
2005,
23881,
2015,
1001,
2421,
1026,
20248,
2015,
1013,
20248,
2213,
1013,
13530,
2906,
9447,
3366,
4226,
5897,
1012,
1044,
1028,
1013,
1013,
2005,
5512,
1001,
2421,
1026,
20248,
2015,
1013,
20248,
2213,
1013,
11718,
5302,
9247,
1012,
1044,
1028,
1013,
1013,
2005,
23881,
2015,
1001,
2421,
1026,
9207,
1028,
1001,
2421,
1026,
3638,
1028,
1001,
2421,
1026,
16220,
8743,
1028,
3415,
15327,
20248,
2015,
1063,
3415,
15327,
3169,
1063,
1013,
1013,
20248,
2015,
1012,
3169,
3415,
30523,
1035,
17698,
1035,
16396,
3366,
21693,
11187,
18886,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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1035,
17698,
1035,
16396,
3366,
21693,
11187,
18886,
3070,
30526
] |
using ApiAiSDK.Model;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Connector;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using UPT.BOT.Aplicacion.DTOs.BOT;
using UPT.BOT.Distribucion.Bot.Acceso.Documento;
namespace UPT.BOT.Distribucion.Bot.BotService.Dialogos.Documento
{
[Serializable]
public class BoletinDialog : BaseDialog, IDialog<object>
{
private AIResponse response;
public BoletinDialog(AIResponse response)
{
this.response = response;
}
public async Task StartAsync(IDialogContext context)
{
IMessageActivity actividaMensaje = context.MakeMessage();
actividaMensaje.Text = response.Result.Fulfillment.Speech ?? string.Empty;
actividaMensaje.Recipient = actividaMensaje.From;
actividaMensaje.Type = ActivityTypes.Message;
await context.PostAsync(actividaMensaje);
List<BoletinDto> entidades = new BoletinProxy(ruta).Obtener();
List<Attachment> listaAdjuntos = new List<Attachment>();
HeroCard tarjetaFormato = new HeroCard("Boletines");
tarjetaFormato.Subtitle = "Puedes descargar boletines que te serán de gran ayuda!";
tarjetaFormato.Buttons = entidades.Select(p => new CardAction
{
Title = p.DescripcionTitulo,
Value = p.DescripcionUrl,
Type = ActionTypes.DownloadFile
}).ToList();
listaAdjuntos.Add(tarjetaFormato.ToAttachment());
IMessageActivity actividadTarjeta = context.MakeMessage();
actividadTarjeta.Recipient = actividadTarjeta.From;
actividadTarjeta.Attachments = listaAdjuntos;
actividadTarjeta.AttachmentLayout = AttachmentLayoutTypes.List;
actividadTarjeta.Type = ActivityTypes.Message;
await context.PostAsync(actividadTarjeta);
context.Done(this);
}
}
}
|
williamccondori/UPT.BOT
|
UPT.BOT.Distribucion.Bot.BotService/Dialogos/Documento/BoletinDialog.cs
|
C#
|
mit
| 2,032
|
[
30522,
2478,
17928,
15593,
2094,
2243,
1012,
2944,
1025,
2478,
7513,
1012,
28516,
1012,
12508,
1012,
13764,
8649,
2015,
1025,
2478,
7513,
1012,
28516,
1012,
19400,
1025,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
11409,
4160,
1025,
2478,
2291,
1012,
11689,
2075,
1012,
8518,
1025,
2478,
2039,
2102,
1012,
28516,
1012,
9706,
19341,
10446,
1012,
26718,
2891,
1012,
28516,
1025,
2478,
2039,
2102,
1012,
28516,
1012,
4487,
3367,
3089,
8569,
10446,
1012,
28516,
1012,
16222,
2229,
2080,
1012,
6254,
2080,
1025,
3415,
15327,
2039,
2102,
1012,
28516,
1012,
4487,
3367,
3089,
8569,
10446,
1012,
28516,
1012,
28516,
8043,
7903,
2063,
1012,
13764,
22844,
2015,
1012,
6254,
2080,
1063,
1031,
7642,
21335,
3468,
1033,
2270,
2465,
8945,
7485,
22254,
4818,
8649,
1024,
2241,
4818,
8649,
1010,
8909,
4818,
8649,
1026,
4874,
1028,
1063,
2797,
9149,
26029,
3366,
3433,
1025,
2270,
8945,
7485,
22254,
4818,
8649,
1006,
9149,
26029,
3366,
3433,
1007,
1063,
2023,
1012,
3433,
1027,
3433,
1025,
1065,
2270,
2004,
6038,
2278,
4708,
2707,
3022,
6038,
2278,
1006,
8909,
4818,
8649,
8663,
18209,
6123,
1007,
1063,
10047,
7971,
4270,
18908,
7730,
2552,
12848,
8524,
3549,
3736,
6460,
1027,
6123,
1012,
2191,
7834,
3736,
3351,
1006,
1007,
1025,
2552,
12848,
8524,
3549,
3736,
6460,
1012,
3793,
1027,
3433,
1012,
2765,
1012,
29362,
1012,
4613,
1029,
1029,
5164,
1012,
4064,
30524,
1012,
7799,
1027,
2552,
12848,
8524,
3549,
3736,
6460,
1012,
2013,
1025,
2552,
12848,
8524,
3549,
3736,
6460,
1012,
2828,
1027,
4023,
13874,
2015,
1012,
4471,
1025,
26751,
6123,
1012,
2695,
3022,
6038,
2278,
1006,
2552,
12848,
8524,
3549,
3736,
6460,
1007,
1025,
2862,
1026,
8945,
7485,
22254,
3406,
1028,
4372,
3775,
14697,
2229,
1027,
2047,
8945,
7485,
2378,
21572,
18037,
1006,
21766,
2696,
1007,
1012,
27885,
6528,
2121,
1006,
1007,
1025,
2862,
1026,
14449,
1028,
2862,
11057,
2094,
19792,
13122,
1027,
2047,
2862,
1026,
14449,
1028,
1006,
1007,
1025,
5394,
11522,
16985,
15759,
10354,
2953,
18900,
2080,
1027,
2047,
5394,
11522,
1006,
1000,
8945,
7485,
10586,
1000,
1007,
1025,
16985,
15759,
10354,
2953,
18900,
2080,
1012,
4942,
3775,
9286,
1027,
1000,
16405,
18352,
4078,
10010,
6843,
8945,
7485,
10586,
10861,
8915,
26358,
2078,
2139,
12604,
1037,
10513,
2850,
999,
1000,
1025,
16985,
15759,
10354,
2953,
18900,
2080,
1012,
11287,
1027,
4372,
3775,
14697,
2229,
1012,
7276,
1006,
1052,
1027,
1028,
2047,
4003,
18908,
3258,
1063,
2516,
1027,
1052,
1012,
4078,
26775,
11514,
10446,
3775,
8525,
4135,
1010,
3643,
1027,
1052,
1012,
4078,
26775,
11514,
10446,
3126,
2140,
1010,
2828,
1027,
2895,
13874,
2015,
1012,
8816,
8873,
2571,
1065,
1007,
1012,
2000,
9863,
1006,
1007,
1025,
2862,
11057,
2094,
19792,
13122,
1012,
5587,
1006,
16985,
15759,
10354,
2953,
18900,
2080,
1012,
2000,
19321,
6776,
3672,
1006,
1007,
1007,
1025,
10047,
7971,
4270,
18908,
7730,
2552,
12848,
27893,
7559,
15759,
2050,
1027,
6123,
1012,
2191,
7834,
3736,
3351,
1006,
1007,
1025,
2552,
12848,
27893,
7559,
15759,
2050,
1012,
7799,
1027,
2552,
12848,
27893,
7559,
15759,
2050,
1012,
2013,
1025,
30523,
1025,
2552,
12848,
8524,
3549,
3736,
6460,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1025,
2552,
12848,
8524,
3549,
3736,
6460,
30526
] |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>SubcloneSeeker: TreePrintTraverser Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">SubcloneSeeker
 <span id="projectnumber">1.0.0</span>
</div>
<div id="projectbrief">Subclone deconvolution software framework</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_tree_print_traverser.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="class_tree_print_traverser-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">TreePrintTraverser Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A tree traverser that prints tree in a text format.
<a href="class_tree_print_traverser.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for TreePrintTraverser:</div>
<div class="dyncontent">
<div class="center">
<img src="class_tree_print_traverser.png" usemap="#TreePrintTraverser_map" alt=""/>
<map id="TreePrintTraverser_map" name="TreePrintTraverser_map">
<area href="class_subclone_seeker_1_1_tree_traverse_delegate.html" title="Delegate class handling tree traversing. " alt="SubcloneSeeker::TreeTraverseDelegate" shape="rect" coords="0,0,238,24"/>
<area href="class_subclone_seeker_1_1_tree_traverse_delegate.html" title="Delegate class handling tree traversing. " alt="SubcloneSeeker::TreeTraverseDelegate" shape="rect" coords="248,0,486,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1a430034a5f0637b3eda13bc54f779a3"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tree_print_traverser.html#a1a430034a5f0637b3eda13bc54f779a3">preprocessNode</a> (<a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> *node)</td></tr>
<tr class="separator:a1a430034a5f0637b3eda13bc54f779a3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a826b9309cf08e779dcc52d3ed0414167"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tree_print_traverser.html#a826b9309cf08e779dcc52d3ed0414167">processNode</a> (<a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> *node)</td></tr>
<tr class="separator:a826b9309cf08e779dcc52d3ed0414167"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aebd7ac61ef639b769e0d7de4597e3202"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tree_print_traverser.html#aebd7ac61ef639b769e0d7de4597e3202">postprocessNode</a> (<a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> *node)</td></tr>
<tr class="separator:aebd7ac61ef639b769e0d7de4597e3202"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1a430034a5f0637b3eda13bc54f779a3"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tree_print_traverser.html#a1a430034a5f0637b3eda13bc54f779a3">preprocessNode</a> (<a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> *node)</td></tr>
<tr class="separator:a1a430034a5f0637b3eda13bc54f779a3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a826b9309cf08e779dcc52d3ed0414167"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tree_print_traverser.html#a826b9309cf08e779dcc52d3ed0414167">processNode</a> (<a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> *node)</td></tr>
<tr class="separator:a826b9309cf08e779dcc52d3ed0414167"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aebd7ac61ef639b769e0d7de4597e3202"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_tree_print_traverser.html#aebd7ac61ef639b769e0d7de4597e3202">postprocessNode</a> (<a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> *node)</td></tr>
<tr class="separator:aebd7ac61ef639b769e0d7de4597e3202"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html">SubcloneSeeker::TreeTraverseDelegate</a></td></tr>
<tr class="memitem:a640ce08a884fc2ae6e39298def2de8f3 inherit pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a640ce08a884fc2ae6e39298def2de8f3">TreeTraverseDelegate</a> ()</td></tr>
<tr class="separator:a640ce08a884fc2ae6e39298def2de8f3 inherit pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaaa5ba3f2351546d402c890e4fde6147 inherit pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#aaaa5ba3f2351546d402c890e4fde6147">~TreeTraverseDelegate</a> ()</td></tr>
<tr class="separator:aaaa5ba3f2351546d402c890e4fde6147 inherit pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec7c9f7f61234131af59b9ad80f9ae65 inherit pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#aec7c9f7f61234131af59b9ad80f9ae65">terminate</a> ()</td></tr>
<tr class="separator:aec7c9f7f61234131af59b9ad80f9ae65 inherit pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3e15793559ecc1949fa04ca17ab656f6 inherit pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a3e15793559ecc1949fa04ca17ab656f6">isTerminated</a> ()</td></tr>
<tr class="separator:a3e15793559ecc1949fa04ca17ab656f6 inherit pub_methods_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_class_subclone_seeker_1_1_tree_traverse_delegate"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_subclone_seeker_1_1_tree_traverse_delegate')"><img src="closed.png" alt="-"/> Protected Attributes inherited from <a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html">SubcloneSeeker::TreeTraverseDelegate</a></td></tr>
<tr class="memitem:a5515fc8591f48a1a90966cd3330c8bc3 inherit pro_attribs_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a5515fc8591f48a1a90966cd3330c8bc3">_isTerminated</a></td></tr>
<tr class="separator:a5515fc8591f48a1a90966cd3330c8bc3 inherit pro_attribs_class_subclone_seeker_1_1_tree_traverse_delegate"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A tree traverser that prints tree in a text format. </p>
<p>if B and C are children of A, the final output will look like A (B, C) </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aebd7ac61ef639b769e0d7de4597e3202"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void TreePrintTraverser::postprocessNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Hook to call after children nodes are recursively processed</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">node</td><td>the node whose children nodes are recursively processed </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a8ad5dc8fcaf603494e63582988d76093">SubcloneSeeker::TreeTraverseDelegate</a>.</p>
</div>
</div>
<a class="anchor" id="aebd7ac61ef639b769e0d7de4597e3202"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void TreePrintTraverser::postprocessNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Hook to call after children nodes are recursively processed</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">node</td><td>the node whose children nodes are recursively processed </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a8ad5dc8fcaf603494e63582988d76093">SubcloneSeeker::TreeTraverseDelegate</a>.</p>
</div>
</div>
<a class="anchor" id="a1a430034a5f0637b3eda13bc54f779a3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void TreePrintTraverser::preprocessNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Hook to call before children nodes are recursively processed</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">node</td><td>the node whose children nodes are to be recursively processed </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a42a135424c06cd01eb938376061ee949">SubcloneSeeker::TreeTraverseDelegate</a>.</p>
</div>
</div>
<a class="anchor" id="a1a430034a5f0637b3eda13bc54f779a3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void TreePrintTraverser::preprocessNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Hook to call before children nodes are recursively processed</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">node</td><td>the node whose children nodes are to be recursively processed </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a42a135424c06cd01eb938376061ee949">SubcloneSeeker::TreeTraverseDelegate</a>.</p>
</div>
</div>
<a class="anchor" id="a826b9309cf08e779dcc52d3ed0414167"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void TreePrintTraverser::processNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Process the given node during a tree traverse</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">node</td><td>the Node which needs to be processed </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a4bf2d3eda4c43103d2388dc41f6ff891">SubcloneSeeker::TreeTraverseDelegate</a>.</p>
</div>
</div>
<a class="anchor" id="a826b9309cf08e779dcc52d3ed0414167"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void TreePrintTraverser::processNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_subclone_seeker_1_1_tree_node.html">TreeNode</a> * </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Process the given node during a tree traverse</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">node</td><td>the Node which needs to be processed </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_subclone_seeker_1_1_tree_traverse_delegate.html#a4bf2d3eda4c43103d2388dc41f6ff891">SubcloneSeeker::TreeTraverseDelegate</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>utils/SubcloneSeeker.cc</li>
<li>utils/<a class="el" href="treeprint_8cc.html">treeprint.cc</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_tree_print_traverser.html">TreePrintTraverser</a></li>
<li class="footer">Generated on Thu Jul 3 2014 19:31:15 for SubcloneSeeker by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
</ul>
</div>
</body>
</html>
|
yiq/SubcloneSeeker
|
doc/html/class_tree_print_traverser.html
|
HTML
|
mit
| 21,097
|
[
30522,
1026,
999,
9986,
13874,
16129,
30524,
1012,
1014,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
1060,
11039,
19968,
2487,
1013,
26718,
2094,
1013,
1060,
11039,
19968,
2487,
1011,
17459,
1012,
26718,
2094,
1000,
1028,
1026,
16129,
20950,
3619,
1027,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
2639,
1013,
1060,
11039,
19968,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
4180,
1011,
2828,
1000,
4180,
1027,
1000,
3793,
1013,
1060,
11039,
19968,
1025,
25869,
13462,
1027,
21183,
2546,
1011,
1022,
1000,
1013,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
1060,
1011,
25423,
1011,
11892,
1000,
4180,
1027,
1000,
29464,
1027,
1023,
1000,
1013,
1028,
1026,
18804,
2171,
1027,
1000,
13103,
1000,
4180,
1027,
1000,
2079,
18037,
6914,
1015,
1012,
1022,
1012,
1021,
1000,
1013,
1028,
1026,
2516,
1028,
4942,
20464,
21821,
4402,
5484,
1024,
3392,
16550,
6494,
16070,
2099,
2465,
4431,
1026,
1013,
2516,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
21628,
2015,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
1046,
4226,
2854,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
1040,
6038,
29015,
2015,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
6583,
2615,
13334,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
24501,
4697,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
6583,
2615,
13334,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
1028,
1002,
1006,
6254,
1007,
1012,
3201,
1006,
1999,
4183,
6072,
21335,
3468,
1007,
1025,
1002,
1006,
3332,
1007,
1012,
7170,
1006,
24501,
4697,
26036,
13900,
1007,
1025,
1026,
1013,
5896,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
3945,
1013,
3945,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
5034,
2278,
1027,
1000,
3945,
1013,
3945,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
1028,
1002,
1006,
6254,
1007,
1012,
3201,
1006,
3853,
1006,
1007,
1063,
3945,
8758,
1012,
2006,
11246,
22471,
4221,
2213,
1006,
1014,
1007,
1025,
1065,
1007,
1025,
1026,
1013,
5896,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
2079,
18037,
30523,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
1060,
11039,
19968,
1015,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
1060,
11039,
19968,
1015,
30526
] |
/******************************************************************************
* _ _____ __________ *
* | | / / _ | / __/_ __/ Visibility *
* | |/ / __ |_\ \ / / Across *
* |___/_/ |_/___/ /_/ Space and Time *
* *
* This file is part of VAST. It is subject to the license terms in the *
* LICENSE file found in the top-level directory of this distribution and at *
* http://vast.io/license. No part of VAST, including this file, may be *
* copied, modified, propagated, or distributed except according to the terms *
* contained in the LICENSE file. *
******************************************************************************/
#pragma once
#include <caf/optional.hpp>
#include "vast/concept/parseable/core/parser.hpp"
#include "vast/concept/support/detail/attr_fold.hpp"
namespace vast {
template <class Parser>
class optional_parser : public parser<optional_parser<Parser>> {
public:
using inner_attribute = detail::attr_fold_t<typename Parser::attribute>;
using attribute =
std::conditional_t<
std::is_same_v<inner_attribute, unused_type>,
unused_type,
caf::optional<inner_attribute>
>;
constexpr explicit optional_parser(Parser p) : parser_{std::move(p)} {
// nop
}
template <class Iterator, class Attribute>
bool parse(Iterator& f, const Iterator& l, Attribute& a) const {
if constexpr (std::is_same_v<Attribute, unused_type>) {
parser_(f, l, unused);
} else {
inner_attribute attr;
if (parser_(f, l, attr))
a = std::move(attr);
}
return true;
}
private:
Parser parser_;
};
} // namespace vast
|
vast-io/vast
|
libvast/vast/concept/parseable/core/optional.hpp
|
C++
|
bsd-3-clause
| 1,930
|
[
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1035,
1008,
1008,
1064,
1064,
1013,
1013,
1035,
1064,
1013,
1035,
1035,
1013,
1035,
1035,
1035,
1013,
16476,
1008,
1008,
1064,
1064,
1013,
1013,
1035,
1035,
1064,
1035,
1032,
1032,
1013,
1013,
2408,
1008,
1008,
1064,
1035,
1035,
1035,
1013,
1035,
1013,
1064,
1035,
1013,
1035,
1035,
1035,
1013,
1013,
1035,
1013,
2686,
1998,
2051,
1008,
1008,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
6565,
1012,
2009,
2003,
3395,
2000,
1996,
6105,
3408,
1999,
1996,
1008,
1008,
6105,
5371,
2179,
1999,
1996,
2327,
1011,
2504,
14176,
1997,
2023,
4353,
1998,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
6565,
1012,
22834,
1013,
6105,
1012,
2053,
2112,
1997,
6565,
1010,
2164,
2023,
5371,
1010,
2089,
2022,
1008,
1008,
15826,
1010,
6310,
1010,
17678,
16098,
3064,
1010,
2030,
5500,
3272,
2429,
2000,
1996,
3408,
1008,
1008,
4838,
1999,
1996,
6105,
5371,
1012,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1013,
1001,
10975,
8490,
2863,
2320,
1001,
2421,
1026,
24689,
1013,
11887,
1012,
6522,
2361,
1028,
1001,
2421,
1000,
6565,
1013,
4145,
1013,
11968,
17310,
3468,
1013,
4563,
1013,
11968,
8043,
1012,
6522,
2361,
1000,
1001,
2421,
1000,
6565,
1013,
4145,
1013,
2490,
1013,
6987,
1013,
2012,
16344,
1035,
10671,
1012,
6522,
2361,
1000,
3415,
15327,
6565,
1063,
23561,
1026,
2465,
11968,
8043,
1028,
2465,
11887,
1035,
11968,
8043,
1024,
2270,
11968,
8043,
1026,
11887,
1035,
11968,
8043,
1026,
11968,
8043,
1028,
1028,
1063,
2270,
1024,
30524,
2003,
1035,
2168,
1035,
1058,
1026,
5110,
1035,
17961,
1010,
15171,
1035,
2828,
1028,
1010,
15171,
1035,
2828,
1010,
24689,
1024,
1024,
11887,
1026,
5110,
1035,
17961,
1028,
1028,
1025,
9530,
13473,
2595,
18098,
13216,
11887,
1035,
11968,
8043,
1006,
11968,
8043,
1052,
1007,
1024,
11968,
8043,
1035,
1063,
2358,
2094,
1024,
1024,
2693,
1006,
1052,
1007,
1065,
1063,
1013,
30523,
2478,
5110,
1035,
17961,
1027,
6987,
1024,
1024,
2012,
16344,
1035,
10671,
1035,
1056,
1026,
2828,
18442,
11968,
8043,
1024,
1024,
17961,
1028,
1025,
2478,
17961,
1027,
2358,
2094,
1024,
1024,
18462,
1035,
1056,
1026,
2358,
2094,
1024,
1024,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2478,
5110,
1035,
17961,
1027,
6987,
1024,
1024,
2012,
16344,
1035,
10671,
1035,
1056,
1026,
2828,
18442,
11968,
8043,
1024,
1024,
17961,
1028,
1025,
2478,
17961,
1027,
2358,
2094,
1024,
1024,
18462,
1035,
1056,
1026,
2358,
2094,
1024,
1024,
30526
] |
package models;
import java.util.*;
import javax.persistence.*;
import play.db.ebean.*;
import play.data.format.*;
import play.data.validation.*;
import com.avaje.ebean.*;
@Entity
public class VariavelInteresse extends Model {
@Id
public Long id;
@Constraints.Required(message="O campo sigla é obrigatório!")
public String sigla;
@Constraints.Required(message="O campo nome é obrigatório!")
public String nome;
public static Model.Finder<Long,VariavelInteresse> find = new Model.Finder<Long,VariavelInteresse>(Long.class, VariavelInteresse.class);
public static Map<String,String> opcoes() {
LinkedHashMap<String,String> opcoes = new LinkedHashMap<String,String>();
for(VariavelInteresse v: VariavelInteresse.find.orderBy("nome").findList()) {
opcoes.put(v.id.toString(), v.nome +" ("+v.sigla+")");
}
return opcoes;
}
public static Page<VariavelInteresse> page(int page, int pageSize, String sortBy, String order, String filter) {
return
find.where()
.ilike("nome", "%" + filter + "%")
.orderBy(sortBy + " " + order)
.findPagingList(pageSize)
.getPage(page);
}
}
|
cleitonpqz/jungle-s-map
|
app/models/VariavelInteresse.java
|
Java
|
mit
| 1,265
|
[
30522,
7427,
4275,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
1008,
1025,
12324,
9262,
2595,
1012,
28297,
1012,
1008,
1025,
12324,
2377,
1012,
16962,
1012,
1041,
4783,
2319,
1012,
1008,
1025,
12324,
2377,
1012,
2951,
1012,
4289,
1012,
1008,
1025,
12324,
2377,
1012,
2951,
1012,
27354,
1012,
1008,
1025,
12324,
4012,
1012,
10927,
6460,
1012,
1041,
4783,
2319,
1012,
1008,
1025,
1030,
9178,
2270,
2465,
13075,
2401,
15985,
18447,
18702,
3366,
8908,
2944,
1063,
1030,
8909,
2270,
2146,
8909,
1025,
1030,
14679,
1012,
3223,
1006,
4471,
1027,
1000,
1051,
22339,
9033,
23296,
2050,
1041,
27885,
3089,
20697,
27416,
999,
30524,
15985,
18447,
18702,
3366,
1028,
2424,
1027,
2047,
2944,
1012,
2424,
2121,
1026,
2146,
1010,
13075,
2401,
15985,
18447,
18702,
3366,
1028,
1006,
2146,
1012,
2465,
1010,
13075,
2401,
15985,
18447,
18702,
3366,
1012,
2465,
1007,
1025,
2270,
10763,
4949,
1026,
5164,
1010,
5164,
1028,
6728,
16288,
2015,
1006,
1007,
1063,
5799,
14949,
22444,
2361,
1026,
5164,
1010,
5164,
1028,
6728,
16288,
2015,
1027,
2047,
5799,
14949,
22444,
2361,
1026,
5164,
1010,
5164,
1028,
1006,
1007,
1025,
2005,
1006,
13075,
2401,
15985,
18447,
18702,
3366,
1058,
1024,
13075,
2401,
15985,
18447,
18702,
3366,
1012,
2424,
1012,
2344,
3762,
1006,
1000,
2053,
4168,
1000,
1007,
1012,
2424,
9863,
1006,
1007,
1007,
1063,
6728,
16288,
2015,
1012,
2404,
1006,
1058,
1012,
8909,
1012,
2000,
3367,
4892,
1006,
1007,
1010,
1058,
1012,
2053,
4168,
1009,
1000,
1006,
1000,
1009,
1058,
1012,
9033,
23296,
2050,
1009,
1000,
1007,
1000,
1007,
1025,
1065,
2709,
6728,
16288,
2015,
1025,
1065,
2270,
10763,
3931,
1026,
13075,
2401,
15985,
18447,
18702,
3366,
1028,
3931,
1006,
20014,
3931,
1010,
20014,
5530,
4697,
1010,
5164,
4066,
3762,
1010,
5164,
2344,
1010,
5164,
11307,
1007,
1063,
2709,
2424,
1012,
2073,
1006,
1007,
1012,
6335,
17339,
1006,
1000,
2053,
4168,
1000,
1010,
1000,
1003,
1000,
1009,
11307,
1009,
1000,
1003,
1000,
1007,
1012,
2344,
3762,
1006,
4066,
3762,
1009,
1000,
1000,
1009,
2344,
1007,
1012,
2424,
4502,
4726,
9863,
1006,
5530,
4697,
1007,
1012,
2131,
13704,
1006,
3931,
1007,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
1000,
1007,
2270,
5164,
9033,
23296,
2050,
1025,
1030,
14679,
1012,
3223,
1006,
4471,
1027,
1000,
1051,
22339,
2053,
4168,
1041,
27885,
3089,
20697,
27416,
999,
1000,
1007,
2270,
5164,
2053,
4168,
1025,
2270,
10763,
2944,
1012,
2424,
2121,
1026,
2146,
1010,
13075,
2401,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1000,
1007,
2270,
5164,
9033,
23296,
2050,
1025,
1030,
14679,
1012,
3223,
1006,
4471,
1027,
1000,
1051,
22339,
2053,
4168,
1041,
27885,
3089,
20697,
27416,
999,
1000,
1007,
2270,
5164,
2053,
4168,
1025,
2270,
10763,
2944,
1012,
2424,
2121,
1026,
2146,
1010,
13075,
2401,
30526
] |
/* The main calendar widget. DIV containing a table. */
.calendar {
position: relative;
display: none;
border-top: 2px solid #fff;
border-right: 2px solid #000;
border-bottom: 2px solid #000;
border-left: 2px solid #fff;
font-size: 11px;
color: #000;
cursor: default;
background: #FFFFCC; /* #d4d0c8; */
font-family: tahoma,verdana,sans-serif;
}
.calendar table {
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
font-size: 11px;
color: #000;
cursor: default;
background: #CCCCCC; /* #FFFFCC #d4d0c8; */
font-family: tahoma,verdana,sans-serif;
}
/* Header part -- contains navigation buttons and day names. */
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
text-align: center;
padding: 1px;
border-top: 1px solid #fff;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #fff;
}
.calendar .nav {
background: transparent url(menuarrow.gif) no-repeat 100% 100%;
}
.calendar thead .title { /* This holds the current "month, year" */
font-weight: bold;
padding: 1px;
border: 1px solid #000;
background: #848078;
color: #fff;
text-align: center;
}
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
border-bottom: 1px solid #000;
padding: 2px;
text-align: center;
background: #FFFF99 ; /* #f4f0 #f4f0e8; */
}
.calendar thead .daynames { /* Row <TR> containing the day names */
border-bottom: 1px solid #000;
padding: 2px;
text-align: center;
background: #FFFF99 ; /* #f4f0 #f4f0e8; */
}
.calendar thead .name { /* Cells <TD> containing the day names */
border-bottom: 1px solid #000;
padding: 2px;
text-align: center;
background: #f4f0; /* #f4f0e8; */
}
.calendar thead .weekend { /* How a weekend day name shows in header */
color: #f00;
background: #f4f0;
}
.calendar thead .hilite { /* How do the buttons in header appear when hover */
border-top: 2px solid #fff;
border-right: 2px solid #000;
border-bottom: 2px solid #000;
border-left: 2px solid #fff;
padding: 0px;
background-color: #e4eod; /* #e4e0d8; */
}
.calendar thead .active { /* Active (pressed) buttons in header */
padding: 2px 0px 0px 2px;
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
background-color: #c4c0b8;
}
/* The body part -- contains all the days in month. */
.calendar tbody .day { /* Cells <TD> containing month days dates */
width: 2em;
text-align: right;
padding: 2px 4px 2px 2px;
}
.calendar tbody .day.othermonth {
font-size: 80%;
color: #ffcc66; /* #aaa; */
background: #FFFFFF;
}
.calendar tbody .day.othermonth.oweekend {
color: #faa;
}
.calendar table .wn {
padding: 2px 3px 2px 2px;
border-right: 1px solid #000;
background: #FFFFCC ; /* #f4f0e8; */
}
.calendar tbody .rowhilite td {
background: #FFCC00 ; /* #e4e0d8; */
}
.calendar tbody .rowhilite td.wn {
background: #cc9900; /*#d4d0c8 */
}
.calendar tbody td.hilite { /* Hovered cells <TD> */
padding: 1px 3px 1px 1px;
border-top: 1px solid #fff;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #fff;
}
.calendar tbody td.active { /* Active (pressed) cells <TD> */
padding: 2px 2px 0px 2px;
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
}
.calendar tbody td.selected { /* Cell showing selected date */
font-weight: bold;
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
padding: 2px 2px 0px 2px;
background: yellow; /* #e4e0d; */
}
.calendar tbody td.weekend { /* Cells showing weekend days */
font-weight: 500;
color: #f00;
}
.calendar tbody td.today { /* Cell showing today date */
font-size: 12px;
font-weight: bold;
color: #00f;
}
.calendar tbody .disabled { color: #999; }
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
visibility: hidden;
}
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
display: none;
}
/* The footer part -- status bar and "Close" button */
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
}
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
background: #f4f0e;
padding: 1px;
border: 1px solid #000;
background: #996600; /* #848078; */
color: #fff;
text-align: center;
}
.calendar tfoot .hilite { /* Hover style for buttons in footer */
border-top: 1px solid #CCCC00;
border-right: 1px solid #FFCC00;
border-bottom: 1px solid #FFCC00;
border-left: 1px solid #CCCC00;
padding: 1px;
background: orange;
}
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
padding: 2px 0px 0px 2px;
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
}
/* Combo boxes (menus that display months/years for direct selection) */
.calendar .combo {
position: absolute;
display: none;
width: 4em;
top: 0px;
left: 0px;
cursor: default;
border-top: 1px solid #fff;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #fff;
background: #FFFF66; /* #e4e0d; */
font-size: 90%;
padding: 1px;
z-index: 100;
}
.calendar .combo .label,
.calendar .combo .label-IEfix {
text-align: center;
padding: 1px;
}
.calendar .combo .label-IEfix {
width: 4em;
}
.calendar .combo .active {
background: #b4d8dc; /* #B4D8DC; */
padding: 0px;
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
}
.calendar .combo .hilite {
background: #663300; /* #048; */
color: #fea;
}
.calendar td.time {
border-top: 1px solid #000;
padding: 1px 0px;
text-align: center;
background-color: #f4f0e; /* #f4f0e8; */
}
.calendar td.time .hour,
.calendar td.time .minute,
.calendar td.time .ampm {
padding: 0px 3px 0px 4px;
border: 1px solid #889;
font-weight: bold;
background-color: #fff;
}
.calendar td.time .ampm {
text-align: center;
}
.calendar td.time .colon {
padding: 0px 2px 0px 3px;
font-weight: bold;
}
.calendar td.time span.hilite {
border-color: #000;
background-color: #766;
color: #fff;
}
.calendar td.time span.active {
border-color: #f00;
background-color: #000;
color: #0f0;
}
|
dedefajriansyah/jibas
|
keuangan/style/calendar-win2k-1.css
|
CSS
|
gpl-3.0
| 6,806
|
[
30522,
1013,
1008,
1996,
2364,
8094,
15536,
24291,
1012,
4487,
2615,
4820,
1037,
2795,
1012,
1008,
1013,
1012,
8094,
1063,
2597,
1024,
5816,
1025,
4653,
1024,
3904,
1025,
3675,
1011,
2327,
1024,
1016,
2361,
2595,
5024,
1001,
21461,
2546,
1025,
3675,
1011,
2157,
1024,
1016,
2361,
2595,
5024,
1001,
2199,
1025,
3675,
1011,
3953,
1024,
1016,
2361,
2595,
5024,
1001,
2199,
1025,
3675,
1011,
2187,
1024,
1016,
2361,
2595,
5024,
1001,
21461,
2546,
1025,
15489,
1011,
2946,
1024,
2340,
2361,
2595,
1025,
3609,
1024,
1001,
2199,
1025,
12731,
25301,
2099,
1024,
12398,
1025,
4281,
1024,
1001,
21461,
4246,
9468,
1025,
1013,
1008,
1001,
1040,
2549,
2094,
2692,
2278,
2620,
1025,
1008,
1013,
15489,
1011,
2155,
1024,
11937,
23393,
2050,
1010,
2310,
26992,
2050,
1010,
20344,
1011,
14262,
10128,
1025,
1065,
1012,
8094,
2795,
1063,
3675,
1011,
2327,
1024,
1015,
2361,
2595,
5024,
1001,
2199,
1025,
3675,
1011,
2157,
1024,
1015,
2361,
2595,
5024,
1001,
21461,
2546,
1025,
3675,
1011,
3953,
1024,
1015,
2361,
2595,
5024,
1001,
21461,
2546,
1025,
3675,
1011,
2187,
1024,
1015,
2361,
2595,
5024,
1001,
2199,
1025,
15489,
1011,
2946,
1024,
2340,
2361,
2595,
1025,
3609,
1024,
1001,
2199,
1025,
12731,
25301,
2099,
1024,
12398,
1025,
4281,
1024,
1001,
10507,
9468,
9468,
1025,
1013,
1008,
1001,
21461,
4246,
9468,
1001,
1040,
2549,
2094,
2692,
2278,
2620,
1025,
1008,
1013,
15489,
1011,
2155,
1024,
11937,
23393,
2050,
1010,
2310,
26992,
2050,
1010,
20344,
1011,
14262,
10128,
1025,
1065,
1013,
1008,
20346,
2112,
1011,
1011,
3397,
9163,
11287,
1998,
2154,
3415,
1012,
1008,
1013,
1012,
8094,
1012,
6462,
1063,
1013,
1008,
1000,
1026,
1026,
1000,
1010,
1000,
1026,
1000,
1010,
1000,
1028,
1000,
1010,
1000,
1028,
1028,
1000,
11287,
2031,
2023,
2465,
1008,
1013,
3793,
1011,
25705,
1024,
2415,
1025,
11687,
30524,
3675,
1011,
3953,
1024,
1015,
2361,
2595,
5024,
1001,
2199,
1025,
3675,
1011,
2187,
1024,
1015,
2361,
2595,
5024,
1001,
21461,
2546,
1025,
1065,
1012,
8094,
1012,
6583,
2615,
1063,
4281,
1024,
13338,
24471,
2140,
1006,
12183,
2906,
10524,
1012,
21025,
2546,
1007,
2053,
1011,
9377,
2531,
1003,
2531,
1003,
1025,
1065,
1012,
8094,
1996,
4215,
1012,
2516,
1063,
1013,
1008,
2023,
4324,
1996,
2783,
1000,
3204,
1010,
2095,
1000,
1008,
1013,
15489,
1011,
3635,
1024,
7782,
1025,
11687,
4667,
1024,
1015,
2361,
2595,
1025,
3675,
1024,
1015,
2361,
2595,
5024,
1001,
2199,
1025,
4281,
1024,
1001,
6391,
17914,
2581,
2620,
1025,
3609,
1024,
1001,
21461,
2546,
1025,
3793,
1011,
25705,
1024,
2415,
1025,
1065,
1012,
8094,
1996,
4215,
1012,
2132,
10524,
1063,
1013,
1008,
5216,
1026,
19817,
1028,
4820,
9163,
11287,
1008,
1013,
3675,
1011,
3953,
1024,
1015,
2361,
2595,
5024,
1001,
2199,
1025,
11687,
4667,
1024,
1016,
2361,
2595,
1025,
3793,
1011,
25705,
1024,
2415,
1025,
4281,
1024,
1001,
21461,
4246,
2683,
2683,
1025,
1013,
1008,
1001,
1042,
2549,
2546,
2692,
1001,
1042,
2549,
2546,
2692,
30523,
4667,
1024,
1015,
2361,
2595,
1025,
3675,
1011,
2327,
1024,
1015,
2361,
2595,
5024,
1001,
21461,
2546,
1025,
3675,
1011,
2157,
1024,
1015,
2361,
2595,
5024,
1001,
2199,
1025,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
4667,
1024,
1015,
2361,
2595,
1025,
3675,
1011,
2327,
1024,
1015,
2361,
2595,
5024,
1001,
21461,
2546,
1025,
3675,
1011,
2157,
1024,
1015,
2361,
2595,
5024,
1001,
2199,
1025,
30526
] |
using System.Xml.Linq;
using FluentAssertions;
using Nerdle.AutoConfig.Mapping.Mappers;
using NUnit.Framework;
using System.Collections.ObjectModel;
using System;
using Nerdle.AutoConfig.Exceptions;
namespace Nerdle.AutoConfig.Tests.Unit.Mappers.DictionaryMapperTests
{
[TestFixture]
public class When_mapping_a_keyed_collection
{
readonly IMapper _sut = new KeyedCollectionMapper();
[Test]
public void The_keyed_collection_is_created()
{
var xElement = XElement.Parse("<myKeyedCollection></myKeyedCollection>");
var result = _sut.Map(xElement, typeof(KeyedCollectionExample));
result.Should().NotBeNull();
}
[Test]
public void The_keyed_collection_is_the_correct_type()
{
var xElement = XElement.Parse("<myKeyedCollection></myKeyedCollection>");
var result = _sut.Map(xElement, typeof(KeyedCollectionExample));
result.Should().BeOfType<KeyedCollectionExample>();
}
[Test]
public void Items_can_be_added()
{
var xElement = XElement.Parse("<myKeyedCollection><item>1</item><item>2</item></myKeyedCollection>");
var result = _sut.Map(xElement, typeof(KeyedCollectionExample)) as KeyedCollectionExample;
result.Should().HaveCount(2);
result["1"].Should().Be(1);
result["2"].Should().Be(2);
}
[Test]
public void The_type_must_be_instantiable()
{
var xElement = XElement.Parse("<myKeyedCollection></myKeyedCollection>");
Action mapping = () => _sut.Map(xElement, typeof(KeyedCollection<char, byte>));
mapping.Should().Throw<AutoConfigMappingException>()
.Where(e => e.Message.Contains(typeof(KeyedCollection<char, byte>).FullName)
&& e.Message.Contains("is not instantiable"));
}
[Test]
public void The_type_must_have_a_parameterless_constructor()
{
var xElement = XElement.Parse("<myKeyedCollection></myKeyedCollection>");
Action mapping = () => _sut.Map(xElement, typeof(KeyedCollectionWithNoParameterlessConstructorExample));
mapping.Should().Throw<AutoConfigMappingException>()
.Where(e => e.Message.Contains(typeof(KeyedCollectionWithNoParameterlessConstructorExample).FullName)
&& e.Message.Contains("no parameterless constructor"));
}
class KeyedCollectionExample : KeyedCollection<string, int>
{
protected override string GetKeyForItem(int item)
{
return item.ToString();
}
}
class KeyedCollectionWithNoParameterlessConstructorExample : KeyedCollectionExample
{
public KeyedCollectionWithNoParameterlessConstructorExample(int i)
{ }
}
}
}
|
edpollitt/Nerdle.AutoConfig
|
Nerdle.AutoConfig.Tests.Unit/Mappers/KeyedCollectionMapperTests/When_mapping_a_keyed_collection.cs
|
C#
|
mit
| 2,931
|
[
30522,
2478,
2291,
1012,
20950,
1012,
11409,
4160,
1025,
2478,
19376,
27241,
28228,
5644,
1025,
2478,
11265,
4103,
2571,
1012,
8285,
8663,
8873,
2290,
1012,
12375,
1012,
4949,
7347,
1025,
2478,
16634,
4183,
1012,
7705,
1025,
2478,
2291,
1012,
6407,
1012,
4874,
5302,
9247,
1025,
2478,
2291,
1025,
2478,
11265,
4103,
2571,
1012,
8285,
8663,
8873,
2290,
1012,
11790,
1025,
3415,
15327,
11265,
4103,
2571,
1012,
8285,
8663,
8873,
2290,
1012,
5852,
1012,
3131,
1012,
4949,
7347,
1012,
9206,
2863,
18620,
22199,
2015,
1063,
1031,
3231,
8873,
18413,
5397,
1033,
2270,
2465,
2043,
1035,
12375,
1035,
1037,
1035,
3145,
2098,
1035,
3074,
1063,
3191,
2239,
2135,
10047,
29098,
2121,
1035,
10514,
2102,
1027,
2047,
3145,
2098,
26895,
18491,
30524,
1035,
3145,
2098,
1035,
3074,
1035,
2003,
1035,
2580,
1006,
1007,
1063,
13075,
1060,
12260,
3672,
1027,
1060,
12260,
3672,
1012,
11968,
3366,
1006,
1000,
1026,
2026,
14839,
2098,
26895,
18491,
1028,
1026,
1013,
2026,
14839,
2098,
26895,
18491,
1028,
1000,
1007,
1025,
13075,
2765,
1027,
1035,
10514,
2102,
1012,
4949,
1006,
1060,
12260,
3672,
1010,
2828,
11253,
1006,
3145,
2098,
26895,
18491,
10288,
16613,
2571,
1007,
1007,
1025,
2765,
1012,
2323,
1006,
1007,
1012,
2025,
10609,
18083,
1006,
1007,
1025,
1065,
1031,
3231,
1033,
2270,
11675,
1996,
1035,
3145,
2098,
1035,
3074,
1035,
2003,
1035,
1996,
1035,
6149,
1035,
2828,
1006,
1007,
1063,
13075,
1060,
12260,
3672,
1027,
1060,
12260,
3672,
1012,
11968,
3366,
1006,
1000,
1026,
2026,
14839,
2098,
26895,
18491,
1028,
1026,
1013,
2026,
14839,
2098,
26895,
18491,
1028,
1000,
1007,
1025,
13075,
2765,
1027,
1035,
10514,
2102,
1012,
4949,
1006,
1060,
12260,
3672,
1010,
2828,
11253,
1006,
3145,
2098,
26895,
18491,
10288,
16613,
2571,
1007,
1007,
1025,
2765,
1012,
2323,
1006,
1007,
1012,
2022,
15794,
18863,
1026,
3145,
2098,
26895,
18491,
10288,
16613,
2571,
1028,
1006,
1007,
1025,
1065,
1031,
3231,
1033,
2270,
11675,
5167,
1035,
2064,
1035,
2022,
1035,
2794,
1006,
1007,
1063,
13075,
1060,
12260,
3672,
1027,
1060,
12260,
3672,
1012,
11968,
3366,
1006,
1000,
1026,
2026,
14839,
2098,
26895,
18491,
1028,
1026,
8875,
1028,
1015,
1026,
1013,
8875,
1028,
1026,
8875,
1028,
1016,
1026,
1013,
8875,
1028,
1026,
1013,
2026,
14839,
2098,
26895,
18491,
1028,
1000,
1007,
1025,
13075,
2765,
1027,
1035,
10514,
2102,
1012,
4949,
1006,
1060,
12260,
3672,
1010,
2828,
11253,
1006,
3145,
2098,
26895,
18491,
10288,
16613,
2571,
1007,
1007,
2004,
3145,
2098,
26895,
18491,
10288,
16613,
2571,
1025,
2765,
1012,
2323,
1006,
1007,
1012,
2031,
3597,
16671,
1006,
1016,
1007,
1025,
2765,
1031,
1000,
1015,
1000,
1033,
1012,
2323,
1006,
1007,
1012,
2022,
1006,
1015,
1007,
1025,
2765,
1031,
1000,
1016,
1000,
1033,
1012,
2323,
1006,
1007,
1012,
2022,
1006,
1016,
1007,
1025,
1065,
1031,
3231,
1033,
2270,
11675,
1996,
1035,
2828,
1035,
2442,
1035,
2022,
1035,
7107,
19210,
1006,
1007,
1063,
13075,
1060,
12260,
3672,
1027,
1060,
12260,
3672,
1012,
11968,
3366,
1006,
1000,
1026,
2026,
14839,
2098,
26895,
18491,
1028,
1026,
1013,
2026,
14839,
2098,
26895,
18491,
30523,
2863,
18620,
1006,
1007,
1025,
1031,
3231,
1033,
2270,
11675,
1996,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2863,
18620,
1006,
1007,
1025,
1031,
3231,
1033,
2270,
11675,
1996,
30526
] |
/**
* \file
*
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
*
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel microcontroller product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* \asf_license_stop
*
*/
#ifndef ASF_H
#define ASF_H
/*
* This file includes all API header files for the selected drivers from ASF.
* Note: There might be duplicate includes required by more than one driver.
*
* The file is automatically generated and will be re-written when
* running the ASF driver selector tool. Any changes will be discarded.
*/
// From module: Common SAM compiler driver
#include <compiler.h>
#include <status_codes.h>
// From module: Generic board support
#include <board.h>
// From module: Generic components of unit test framework
#include <unit_test/suite.h>
// From module: IOPORT - General purpose I/O service
#include <ioport.h>
// From module: Interrupt management - SAM implementation
#include <interrupt.h>
// From module: PMC - Power Management Controller
#include <pmc.h>
#include <sleep.h>
// From module: Part identification macros
#include <parts.h>
// From module: SAM FPU driver
#include <fpu.h>
// From module: SAM4E EK LED support enabled
#include <led.h>
// From module: SAM4E startup code
#include <exceptions.h>
// From module: Standard serial I/O (stdio) - SAM implementation
#include <stdio_serial.h>
// From module: System Clock Control - SAM4E implementation
#include <sysclk.h>
// From module: UART - Univ. Async Rec/Trans
#include <uart.h>
// From module: USART - Serial interface - SAM implementation for devices with both UART and USART
#include <serial.h>
// From module: USART - Univ. Syn Async Rec/Trans
#include <usart.h>
#endif // ASF_H
|
femtoio/femto-usb-blink-example
|
blinky/blinky/asf-3.21.0/sam/drivers/pmc/unit_tests/sam4e16e_sam4e_ek/iar/asf.h
|
C
|
mit
| 3,334
|
[
30522,
1013,
1008,
1008,
1008,
1032,
5371,
1008,
1008,
1032,
4766,
8285,
6914,
16848,
17928,
2421,
5371,
2005,
1996,
27218,
2884,
4007,
7705,
1006,
2004,
2546,
1007,
1008,
1008,
9385,
1006,
1039,
1007,
2262,
27218,
2884,
3840,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
1032,
2004,
2546,
1035,
6105,
1035,
2707,
1008,
1008,
1032,
3931,
6105,
1008,
1008,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
1008,
14080,
1010,
2024,
7936,
3024,
2008,
1996,
2206,
3785,
2024,
2777,
1024,
1008,
1008,
1015,
1012,
25707,
2015,
1997,
3120,
3642,
2442,
9279,
1996,
2682,
9385,
5060,
1010,
1008,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1012,
1008,
1008,
1016,
1012,
25707,
2015,
1999,
12441,
2433,
2442,
21376,
1996,
2682,
9385,
5060,
1010,
1008,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1999,
1996,
12653,
1008,
1998,
1013,
2030,
2060,
4475,
3024,
2007,
1996,
4353,
1012,
1008,
1008,
1017,
1012,
1996,
2171,
1997,
27218,
2884,
2089,
2025,
2022,
2109,
2000,
2203,
5668,
2063,
2030,
5326,
3688,
5173,
1008,
2013,
2023,
4007,
2302,
3563,
3188,
2517,
6656,
1012,
1008,
1008,
1018,
1012,
2023,
4007,
2089,
2069,
2022,
2417,
2923,
3089,
8569,
3064,
1998,
2109,
1999,
4434,
2007,
2019,
1008,
27218,
2884,
12702,
8663,
13181,
10820,
4031,
1012,
1008,
1008,
2023,
4007,
2003,
3024,
2011,
27218,
2884,
1000,
2004,
2003,
1000,
1998,
2151,
4671,
2030,
13339,
1008,
10943,
3111,
1010,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
1996,
13339,
10943,
3111,
1997,
1008,
6432,
8010,
1010,
10516,
2005,
1037,
3327,
3800,
1998,
2512,
1011,
20701,
2024,
1008,
4671,
2135,
1998,
4919,
5860,
19771,
7583,
1012,
1999,
2053,
2724,
4618,
27218,
2884,
2022,
20090,
2005,
1008,
2151,
3622,
1010,
14958,
1010,
5043,
2389,
1010,
2569,
1010,
27792,
1010,
2030,
9530,
3366,
15417,
4818,
1008,
12394,
1006,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
21423,
1997,
7681,
5350,
1008,
2030,
2578,
1025,
3279,
1997,
2224,
1010,
2951,
1010,
2030,
11372,
1025,
2030,
2449,
24191,
1007,
1008,
2174,
3303,
1998,
2006,
2151,
3399,
1997,
14000,
1010,
3251,
1999,
3206,
1010,
1008,
9384,
14000,
1010,
2030,
17153,
2102,
1006,
2164,
27988,
2030,
4728,
1007,
17707,
1999,
1008,
2151,
2126,
2041,
1997,
1996,
2224,
1997,
2023,
4007,
1010,
2130,
2065,
9449,
1997,
1996,
1008,
6061,
1997,
2107,
4053,
1012,
1008,
1008,
1032,
2004,
2546,
1035,
6105,
1035,
2644,
1008,
1008,
1013,
1001,
2065,
13629,
2546,
2004,
2546,
1035,
1044,
1001,
9375,
2004,
2546,
1035,
1044,
1013,
1008,
1008,
2023,
5371,
2950,
2035,
17928,
20346,
6764,
2005,
1996,
3479,
6853,
2013,
2004,
2546,
1012,
1008,
3602,
1024,
2045,
2453,
2022,
24473,
2950,
3223,
2011,
2062,
2084,
2028,
4062,
1012,
1008,
1008,
1996,
5371,
2003,
8073,
7013,
1998,
2097,
2022,
2128,
1011,
2517,
2043,
1008,
2770,
1996,
2004,
2546,
4062,
27000,
6994,
1012,
2151,
3431,
2097,
2022,
15105,
1012,
30524,
21624,
1012,
1044,
1028,
1001,
2421,
1026,
3570,
1035,
9537,
1012,
1044,
1028,
1013,
1013,
2013,
11336,
1024,
12391,
30523,
1008,
1013,
1013,
1013,
2013,
11336,
1024,
2691,
3520,
21624,
4062,
1001,
2421,
1026,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1008,
1013,
1013,
1013,
2013,
11336,
1024,
2691,
3520,
21624,
4062,
1001,
2421,
1026,
30526
] |
package com.avocarrot.adapters.sample.admob;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RatingBar;
import android.widget.TextView;
import android.widget.Toast;
import com.avocarrot.adapters.sample.R;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdLoader;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.formats.NativeAd;
import com.google.android.gms.ads.formats.NativeAppInstallAd;
import com.google.android.gms.ads.formats.NativeAppInstallAdView;
import com.google.android.gms.ads.formats.NativeContentAd;
import com.google.android.gms.ads.formats.NativeContentAdView;
import java.util.List;
public class AdmobNativeActivity extends AppCompatActivity {
@NonNull
private static final String EXTRA_AD_UNIT_ID = "ad_unit_id";
@NonNull
public static Intent buildIntent(@NonNull final Context context, @NonNull final String adUnitId) {
return new Intent(context, AdmobNativeActivity.class).putExtra(EXTRA_AD_UNIT_ID, adUnitId);
}
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admob_native);
final Intent intent = getIntent();
final String adUnitId = intent.getStringExtra(EXTRA_AD_UNIT_ID);
if (TextUtils.isEmpty(adUnitId)) {
finish();
return;
}
final AdLoader adLoader = new AdLoader.Builder(this, adUnitId)
.forAppInstallAd(new NativeAppInstallAd.OnAppInstallAdLoadedListener() {
@Override
public void onAppInstallAdLoaded(final NativeAppInstallAd ad) {
final FrameLayout frameLayout = (FrameLayout) findViewById(R.id.admob_ad_view);
final NativeAppInstallAdView adView = (NativeAppInstallAdView) getLayoutInflater().inflate(R.layout.admob_ad_app_install, null);
populate(ad, adView);
frameLayout.removeAllViews();
frameLayout.addView(adView);
}
})
.forContentAd(new NativeContentAd.OnContentAdLoadedListener() {
@Override
public void onContentAdLoaded(final NativeContentAd ad) {
final FrameLayout frameLayout = (FrameLayout) findViewById(R.id.admob_ad_view);
final NativeContentAdView adView = (NativeContentAdView) getLayoutInflater().inflate(R.layout.admob_ad_content, null);
populate(ad, adView);
frameLayout.removeAllViews();
frameLayout.addView(adView);
}
})
.withAdListener(new AdListener() {
@Override
public void onAdFailedToLoad(final int errorCode) {
Toast.makeText(getApplicationContext(), "Custom event native ad failed with code: " + errorCode, Toast.LENGTH_LONG).show();
}
})
.build();
adLoader.loadAd(new AdRequest.Builder().build());
final ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
}
/**
* Populates a {@link NativeAppInstallAdView} object with data from a given {@link NativeAppInstallAd}.
*/
private void populate(@NonNull final NativeAppInstallAd nativeAppInstallAd, @NonNull final NativeAppInstallAdView adView) {
adView.setNativeAd(nativeAppInstallAd);
adView.setHeadlineView(adView.findViewById(R.id.appinstall_headline));
adView.setImageView(adView.findViewById(R.id.appinstall_image));
adView.setBodyView(adView.findViewById(R.id.appinstall_body));
adView.setCallToActionView(adView.findViewById(R.id.appinstall_call_to_action));
adView.setIconView(adView.findViewById(R.id.appinstall_app_icon));
adView.setPriceView(adView.findViewById(R.id.appinstall_price));
adView.setStarRatingView(adView.findViewById(R.id.appinstall_stars));
adView.setStoreView(adView.findViewById(R.id.appinstall_store));
// Some assets are guaranteed to be in every NativeAppInstallAd.
((TextView) adView.getHeadlineView()).setText(nativeAppInstallAd.getHeadline());
((TextView) adView.getBodyView()).setText(nativeAppInstallAd.getBody());
((Button) adView.getCallToActionView()).setText(nativeAppInstallAd.getCallToAction());
((ImageView) adView.getIconView()).setImageDrawable(nativeAppInstallAd.getIcon().getDrawable());
final List<NativeAd.Image> images = nativeAppInstallAd.getImages();
if (images.size() > 0) {
((ImageView) adView.getImageView()).setImageDrawable(images.get(0).getDrawable());
}
// Some aren't guaranteed, however, and should be checked.
if (nativeAppInstallAd.getPrice() == null) {
adView.getPriceView().setVisibility(View.INVISIBLE);
} else {
adView.getPriceView().setVisibility(View.VISIBLE);
((TextView) adView.getPriceView()).setText(nativeAppInstallAd.getPrice());
}
if (nativeAppInstallAd.getStore() == null) {
adView.getStoreView().setVisibility(View.INVISIBLE);
} else {
adView.getStoreView().setVisibility(View.VISIBLE);
((TextView) adView.getStoreView()).setText(nativeAppInstallAd.getStore());
}
if (nativeAppInstallAd.getStarRating() == null) {
adView.getStarRatingView().setVisibility(View.INVISIBLE);
} else {
((RatingBar) adView.getStarRatingView()).setRating(nativeAppInstallAd.getStarRating().floatValue());
adView.getStarRatingView().setVisibility(View.VISIBLE);
}
}
/**
* Populates a {@link NativeContentAdView} object with data from a given {@link NativeContentAd}.
*/
private void populate(@NonNull final NativeContentAd nativeContentAd, @NonNull final NativeContentAdView adView) {
adView.setNativeAd(nativeContentAd);
adView.setHeadlineView(adView.findViewById(R.id.contentad_headline));
adView.setImageView(adView.findViewById(R.id.contentad_image));
adView.setBodyView(adView.findViewById(R.id.contentad_body));
adView.setCallToActionView(adView.findViewById(R.id.contentad_call_to_action));
adView.setLogoView(adView.findViewById(R.id.contentad_logo));
adView.setAdvertiserView(adView.findViewById(R.id.contentad_advertiser));
// Some assets are guaranteed to be in every NativeContentAd.
((TextView) adView.getHeadlineView()).setText(nativeContentAd.getHeadline());
((TextView) adView.getBodyView()).setText(nativeContentAd.getBody());
((TextView) adView.getCallToActionView()).setText(nativeContentAd.getCallToAction());
((TextView) adView.getAdvertiserView()).setText(nativeContentAd.getAdvertiser());
final List<NativeAd.Image> images = nativeContentAd.getImages();
if (images.size() > 0) {
((ImageView) adView.getImageView()).setImageDrawable(images.get(0).getDrawable());
}
// Some aren't guaranteed, however, and should be checked.
final NativeAd.Image logoImage = nativeContentAd.getLogo();
if (logoImage == null) {
adView.getLogoView().setVisibility(View.INVISIBLE);
} else {
((ImageView) adView.getLogoView()).setImageDrawable(logoImage.getDrawable());
adView.getLogoView().setVisibility(View.VISIBLE);
}
}
}
|
Avocarrot/android-adapters
|
avocarrot-app-sample/src/main/java/com/avocarrot/adapters/sample/admob/AdmobNativeActivity.java
|
Java
|
mit
| 8,086
|
[
30522,
7427,
4012,
1012,
20704,
24755,
18933,
2102,
1012,
15581,
2545,
1012,
7099,
1012,
4748,
5302,
2497,
1025,
12324,
11924,
1012,
4180,
1012,
6123,
1025,
12324,
11924,
1012,
4180,
1012,
7848,
1025,
12324,
11924,
1012,
9808,
1012,
14012,
1025,
12324,
11924,
1012,
2490,
1012,
5754,
17287,
3508,
1012,
2512,
11231,
3363,
1025,
12324,
11924,
1012,
2490,
1012,
1058,
2581,
1012,
10439,
1012,
2895,
8237,
1025,
12324,
11924,
1012,
2490,
1012,
1058,
2581,
1012,
10439,
1012,
10439,
9006,
4502,
2696,
6593,
7730,
1025,
12324,
11924,
1012,
3793,
1012,
3793,
21823,
4877,
1025,
30524,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
3793,
8584,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
15174,
1025,
12324,
4012,
1012,
20704,
24755,
18933,
2102,
1012,
15581,
2545,
1012,
7099,
1012,
1054,
1025,
12324,
4012,
1012,
8224,
1012,
11924,
1012,
13938,
2015,
1012,
14997,
1012,
4748,
9863,
24454,
1025,
12324,
4012,
1012,
8224,
1012,
11924,
1012,
13938,
2015,
1012,
14997,
1012,
4748,
11066,
2121,
1025,
12324,
4012,
1012,
8224,
1012,
11924,
1012,
13938,
2015,
1012,
14997,
1012,
4748,
2890,
15500,
1025,
12324,
4012,
1012,
8224,
1012,
11924,
1012,
13938,
2015,
1012,
14997,
1012,
11630,
1012,
3128,
4215,
1025,
12324,
4012,
1012,
8224,
1012,
11924,
1012,
13938,
2015,
1012,
14997,
1012,
11630,
1012,
3128,
29098,
7076,
9080,
27266,
1025,
12324,
4012,
1012,
8224,
1012,
11924,
1012,
13938,
2015,
1012,
14997,
1012,
11630,
1012,
3128,
29098,
7076,
9080,
27266,
8584,
1025,
12324,
4012,
1012,
8224,
1012,
11924,
1012,
13938,
2015,
1012,
14997,
1012,
11630,
1012,
3128,
8663,
6528,
17713,
1025,
12324,
4012,
1012,
8224,
1012,
11924,
1012,
13938,
2015,
1012,
14997,
1012,
11630,
1012,
3128,
8663,
6528,
17713,
8584,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025,
2270,
2465,
4748,
5302,
24700,
8082,
18908,
7730,
8908,
10439,
9006,
4502,
2696,
6593,
7730,
1063,
1030,
2512,
11231,
3363,
2797,
10763,
2345,
5164,
4469,
1035,
4748,
1035,
3131,
1035,
8909,
1027,
1000,
4748,
1035,
3131,
1035,
8909,
1000,
1025,
1030,
2512,
11231,
3363,
2270,
10763,
7848,
3857,
18447,
4765,
1006,
1030,
2512,
11231,
3363,
2345,
6123,
6123,
1010,
1030,
2512,
11231,
3363,
2345,
5164,
4748,
19496,
3775,
2094,
1007,
1063,
2709,
2047,
7848,
1006,
6123,
1010,
4748,
5302,
24700,
8082,
18908,
7730,
1012,
2465,
1007,
1012,
2404,
10288,
6494,
1006,
4469,
1035,
4748,
1035,
3131,
1035,
8909,
1010,
4748,
19496,
3775,
2094,
1007,
1025,
1065,
1030,
2058,
15637,
5123,
11675,
2006,
16748,
3686,
1006,
2345,
14012,
5552,
7076,
26897,
9153,
2618,
1007,
1063,
3565,
1012,
2006,
16748,
3686,
1006,
5552,
7076,
26897,
9153,
2618,
1007,
1025,
2275,
8663,
6528,
9189,
2666,
2860,
1006,
1054,
1012,
9621,
1012,
4023,
1035,
4748,
5302,
2497,
1035,
3128,
1007,
1025,
2345,
7848,
7848,
1027,
2131,
18447,
4765,
1006,
1007,
1025,
2345,
5164,
4748,
19496,
3775,
2094,
1027,
7848,
1012,
4152,
18886,
15465,
18413,
30523,
12324,
11924,
1012,
3193,
1012,
3193,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
6462,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
4853,
8485,
5833,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
3746,
8584,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
5790,
8237,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
12324,
11924,
1012,
3193,
1012,
3193,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
6462,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
4853,
8485,
5833,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
3746,
8584,
1025,
12324,
11924,
1012,
15536,
24291,
1012,
5790,
8237,
30526
] |
// Package network implements the Azure ARM Network service API version .
//
// Network Client
package network
// Copyright (c) Microsoft and contributors. 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.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"net/http"
)
const (
// DefaultBaseURI is the default URI used for the service Network
DefaultBaseURI = "https://management.azure.com"
)
// BaseClient is the base client for Network.
type BaseClient struct {
autorest.Client
BaseURI string
SubscriptionID string
}
// New creates an instance of the BaseClient client.
func New(subscriptionID string) BaseClient {
return NewWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewWithBaseURI creates an instance of the BaseClient client.
func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
return BaseClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
SubscriptionID: subscriptionID,
}
}
// CheckDNSNameAvailability checks whether a domain name in the cloudapp.azure.com zone is available for use.
//
// location is the location of the domain name. domainNameLabel is the domain name to be verified. It must conform to
// the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
func (client BaseClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string) (result DNSNameAvailabilityResult, err error) {
req, err := client.CheckDNSNameAvailabilityPreparer(ctx, location, domainNameLabel)
if err != nil {
err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", nil, "Failure preparing request")
return
}
resp, err := client.CheckDNSNameAvailabilitySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure sending request")
return
}
result, err = client.CheckDNSNameAvailabilityResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", resp, "Failure responding to request")
}
return
}
// CheckDNSNameAvailabilityPreparer prepares the CheckDNSNameAvailability request.
func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, location string, domainNameLabel string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"location": autorest.Encode("path", location),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2017-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
"domainNameLabel": autorest.Encode("query", domainNameLabel),
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// CheckDNSNameAvailabilitySender sends the CheckDNSNameAvailability request. The method will close the
// http.Response Body if it receives an error.
func (client BaseClient) CheckDNSNameAvailabilitySender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req,
azure.DoRetryWithRegistration(client.Client))
}
// CheckDNSNameAvailabilityResponder handles the response to the CheckDNSNameAvailability request. The method always
// closes the http.Response Body.
func (client BaseClient) CheckDNSNameAvailabilityResponder(resp *http.Response) (result DNSNameAvailabilityResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
|
tenxcloud/kubernetes
|
vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-09-01/network/client.go
|
GO
|
apache-2.0
| 4,704
|
[
30522,
1013,
1013,
7427,
2897,
22164,
1996,
24296,
2849,
2897,
2326,
17928,
2544,
1012,
1013,
1013,
1013,
1013,
2897,
7396,
7427,
2897,
1013,
1013,
9385,
1006,
1039,
1007,
7513,
1998,
16884,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
1013,
1013,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1013,
1013,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1013,
1013,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1013,
1013,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1013,
1013,
1013,
1013,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1013,
1013,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1013,
1013,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1013,
1013,
1013,
1013,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1013,
1013,
12546,
2104,
1996,
6105,
1012,
1013,
1013,
1013,
1013,
3642,
7013,
2011,
7513,
1006,
1054,
1007,
8285,
28533,
3642,
13103,
1012,
1013,
1013,
3431,
2089,
3426,
16542,
5248,
1998,
2097,
2022,
2439,
2065,
1996,
3642,
2003,
19723,
24454,
4383,
1012,
12324,
1006,
1000,
6123,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
24296,
1013,
2175,
1011,
8285,
28533,
1013,
8285,
28533,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
24296,
1013,
2175,
1011,
8285,
28533,
1013,
8285,
28533,
1013,
24296,
1000,
1000,
5658,
1013,
8299,
1000,
1007,
9530,
3367,
1006,
1013,
1013,
12398,
15058,
9496,
2003,
1996,
12398,
24471,
2072,
2109,
2005,
1996,
2326,
2897,
12398,
15058,
9496,
1027,
1000,
16770,
1024,
1013,
1013,
2968,
1012,
24296,
1012,
4012,
1000,
1007,
1013,
1013,
2918,
20464,
11638,
2003,
1996,
2918,
7396,
2005,
2897,
1012,
2828,
2918,
20464,
11638,
2358,
6820,
6593,
1063,
8285,
28533,
1012,
7396,
2918,
9496,
5164,
15002,
3593,
5164,
1065,
1013,
1013,
2047,
9005,
2019,
6013,
1997,
1996,
2918,
20464,
11638,
7396,
1012,
4569,
2278,
2047,
1006,
15002,
3593,
5164,
1007,
2918,
20464,
30524,
2918,
9496,
5164,
1010,
15002,
3593,
5164,
1007,
2918,
20464,
11638,
1063,
2709,
2918,
20464,
11638,
1063,
7396,
1024,
8285,
28533,
1012,
2047,
20464,
11638,
24415,
20330,
4270,
3372,
1006,
5310,
4270,
3372,
1006,
1007,
1007,
1010,
2918,
9496,
1024,
2918,
9496,
1010,
15002,
3593,
1024,
15002,
3593,
1010,
1065,
1065,
1013,
1013,
4638,
2094,
3619,
18442,
12462,
11733,
8553,
14148,
3251,
1037,
5884,
2171,
1999,
1996,
6112,
29098,
1012,
24296,
1012,
4012,
4224,
2003,
2800,
2005,
2224,
1012,
1013,
1013,
1013,
1013,
3295,
2003,
1996,
3295,
1997,
1996,
5884,
2171,
1012,
5884,
18442,
20470,
2884,
2003,
1996,
5884,
2171,
2000,
2022,
20119,
1012,
2009,
2442,
23758,
2000,
1013,
1013,
1996,
2206,
3180,
3670,
1024,
1034,
1031,
1037,
30523,
11638,
1063,
2709,
2047,
24415,
15058,
9496,
1006,
12398,
15058,
9496,
1010,
15002,
3593,
1007,
1065,
1013,
1013,
2047,
24415,
15058,
9496,
9005,
2019,
6013,
1997,
1996,
2918,
20464,
11638,
7396,
1012,
4569,
2278,
2047,
24415,
15058,
9496,
1006,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
11638,
1063,
2709,
2047,
24415,
15058,
9496,
1006,
12398,
15058,
9496,
1010,
15002,
3593,
1007,
1065,
1013,
1013,
2047,
24415,
15058,
9496,
9005,
2019,
6013,
1997,
1996,
2918,
20464,
11638,
7396,
1012,
4569,
2278,
2047,
24415,
15058,
9496,
1006,
30526
] |
# Laestadia smilacinae Dearn. & House SPECIES
#### Status
ACCEPTED
#### According to
Index Fungorum
#### Published in
null
#### Original name
Laestadia smilacinae Dearn. & House
### Remarks
null
|
mdoering/backbone
|
life/Fungi/Ascomycota/Sordariomycetes/Diaporthales/Gnomoniaceae/Laestadia/Laestadia smilacinae/README.md
|
Markdown
|
apache-2.0
| 199
|
[
30522,
1001,
2474,
4355,
25205,
15488,
11733,
28748,
2063,
6203,
2078,
30524,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
5950,
4569,
20255,
2819,
1001,
1001,
1001,
1001,
2405,
1999,
19701,
1001,
1001,
1001,
1001,
2434,
2171,
2474,
4355,
25205,
15488,
11733,
28748,
2063,
6203,
2078,
1012,
1004,
2160,
1001,
1001,
1001,
12629,
19701,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1012,
1004,
2160,
2427,
1001,
30526
] |
/*
(c) Copyright 2001-2008 The world wide DirectFB Open Source Community (directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __INPUT_H__
#define __INPUT_H__
#include <pthread.h>
#include <directfb.h>
#include <direct/modules.h>
#include <fusion/reactor.h>
#include <core/coretypes.h>
DECLARE_MODULE_DIRECTORY( dfb_input_modules );
/*
* Increase this number when changes result in binary incompatibility!
*/
#define DFB_INPUT_DRIVER_ABI_VERSION 7
#define DFB_INPUT_DRIVER_INFO_NAME_LENGTH 48
#define DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH 64
typedef struct {
int major; /* major version */
int minor; /* minor version */
} InputDriverVersion; /* major.minor, e.g. 0.1 */
typedef struct {
InputDriverVersion version;
char name[DFB_INPUT_DRIVER_INFO_NAME_LENGTH];
/* Name of driver,
e.g. 'Serial Mouse Driver' */
char vendor[DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH];
/* Vendor (or author) of the driver,
e.g. 'directfb.org' or 'Sven Neumann' */
} InputDriverInfo;
typedef struct {
unsigned int prefered_id; /* Prefered predefined input device id,
e.g. DIDID_MOUSE */
DFBInputDeviceDescription desc; /* Capabilities, type, etc. */
} InputDeviceInfo;
typedef struct {
int (*GetAvailable) (void);
void (*GetDriverInfo) (InputDriverInfo *driver_info);
DFBResult (*OpenDevice) (CoreInputDevice *device,
unsigned int number,
InputDeviceInfo *device_info,
void **driver_data);
DFBResult (*GetKeymapEntry) (CoreInputDevice *device,
void *driver_data,
DFBInputDeviceKeymapEntry *entry);
void (*CloseDevice) (void *driver_data);
} InputDriverFuncs;
typedef DFBEnumerationResult (*InputDeviceCallback) (CoreInputDevice *device,
void *ctx);
void dfb_input_enumerate_devices( InputDeviceCallback callback,
void *ctx,
DFBInputDeviceCapabilities caps );
DirectResult dfb_input_attach ( CoreInputDevice *device,
ReactionFunc func,
void *ctx,
Reaction *reaction );
DirectResult dfb_input_detach ( CoreInputDevice *device,
Reaction *reaction );
DirectResult dfb_input_attach_global( CoreInputDevice *device,
int index,
void *ctx,
GlobalReaction *reaction );
DirectResult dfb_input_detach_global( CoreInputDevice *device,
GlobalReaction *reaction );
DFBResult dfb_input_add_global ( ReactionFunc func,
int *ret_index );
DFBResult dfb_input_set_global ( ReactionFunc func,
int index );
void dfb_input_dispatch ( CoreInputDevice *device,
DFBInputEvent *event );
void dfb_input_device_description( const CoreInputDevice *device,
DFBInputDeviceDescription *desc );
DFBInputDeviceID dfb_input_device_id ( const CoreInputDevice *device );
CoreInputDevice *dfb_input_device_at ( DFBInputDeviceID id );
DFBResult dfb_input_device_get_keymap_entry( CoreInputDevice *device,
int keycode,
DFBInputDeviceKeymapEntry *entry );
DFBResult dfb_input_device_reload_keymap ( CoreInputDevice *device );
/* global reactions */
typedef enum {
DFB_WINDOWSTACK_INPUTDEVICE_LISTENER
} DFB_INPUT_GLOBALS;
#endif
|
ZHAW-INES/rioxo-uClinux-dist
|
lib/DirectFB/DirectFB-1.2.3/src/core/input.h
|
C
|
gpl-2.0
| 5,620
|
[
30522,
1013,
1008,
1006,
1039,
1007,
9385,
2541,
1011,
2263,
1996,
2088,
2898,
3622,
26337,
2330,
3120,
30524,
1047,
18981,
2361,
1026,
2079,
2243,
1030,
3622,
26337,
1012,
8917,
1028,
1010,
12460,
15876,
26379,
1026,
1998,
2072,
1030,
27424,
2818,
7393,
3775,
2290,
1012,
2139,
1028,
1010,
21313,
22860,
1026,
9253,
1030,
3622,
26337,
1012,
8917,
1028,
1010,
20184,
25353,
2099,
25787,
2050,
1026,
25353,
2099,
25787,
2050,
1030,
16596,
1012,
10882,
1028,
1998,
19569,
25022,
16665,
3490,
1026,
26613,
1030,
5198,
1012,
16420,
1012,
5658,
1028,
1012,
2023,
3075,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
8276,
2236,
2270,
6105,
2004,
2405,
2011,
1996,
2489,
4007,
3192,
1025,
2593,
2544,
1016,
1997,
1996,
6105,
1010,
2030,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
2023,
3075,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
27004,
8276,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
8276,
2236,
2270,
6105,
2247,
2007,
2023,
3075,
1025,
2065,
2025,
1010,
4339,
2000,
1996,
2489,
4007,
3192,
1010,
4297,
1012,
1010,
5354,
3379,
2173,
1011,
7621,
14210,
1010,
3731,
1010,
5003,
6185,
14526,
2487,
1011,
7558,
2581,
1010,
3915,
1012,
1008,
1013,
1001,
2065,
13629,
2546,
1035,
1035,
7953,
1035,
1044,
1035,
1035,
1001,
9375,
1035,
1035,
7953,
1035,
1044,
1035,
1035,
1001,
2421,
1026,
13866,
28362,
4215,
1012,
1044,
1028,
1001,
2421,
1026,
3622,
26337,
1012,
1044,
1028,
1001,
2421,
1026,
3622,
1013,
14184,
1012,
1044,
1028,
1001,
2421,
1026,
10077,
1013,
13308,
1012,
1044,
1028,
1001,
2421,
1026,
4563,
1013,
4563,
13874,
2015,
1012,
1044,
1028,
13520,
1035,
11336,
1035,
14176,
1006,
28894,
1035,
7953,
1035,
14184,
1007,
1025,
1013,
1008,
1008,
3623,
2023,
2193,
2043,
3431,
2765,
1999,
12441,
4297,
25377,
10450,
8553,
999,
1008,
1013,
1001,
9375,
28894,
1035,
7953,
1035,
4062,
1035,
11113,
2072,
1035,
2544,
1021,
1001,
9375,
28894,
1035,
7953,
1035,
4062,
1035,
18558,
1035,
2171,
1035,
3091,
4466,
1001,
9375,
28894,
1035,
7953,
1035,
4062,
1035,
18558,
1035,
21431,
1035,
3091,
4185,
21189,
12879,
2358,
6820,
6593,
1063,
20014,
2350,
1025,
1013,
1008,
2350,
2544,
1008,
1013,
20014,
3576,
1025,
1013,
1008,
3576,
2544,
1008,
1013,
1065,
7953,
23663,
2099,
27774,
1025,
1013,
1008,
2350,
1012,
3576,
1010,
1041,
1012,
1043,
1012,
1014,
1012,
1015,
1008,
1013,
21189,
12879,
2358,
6820,
6593,
1063,
7953,
23663,
2099,
27774,
2544,
1025,
25869,
2171,
1031,
28894,
1035,
7953,
1035,
4062,
1035,
18558,
1035,
2171,
1035,
3091,
1033,
1025,
1013,
1008,
2171,
1997,
4062,
1010,
1041,
1012,
1043,
1012,
1005,
7642,
8000,
4062,
1005,
1008,
1013,
25869,
21431,
1031,
28894,
30523,
2451,
1006,
3622,
26337,
1012,
8917,
1007,
1006,
1039,
1007,
9385,
2456,
1011,
2432,
19143,
1006,
6377,
2865,
1007,
18289,
2035,
2916,
9235,
1012,
2517,
2011,
11064,
6291,
30526
] |
[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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2451,
1006,
3622,
26337,
1012,
8917,
1007,
1006,
1039,
1007,
9385,
2456,
1011,
2432,
19143,
1006,
6377,
2865,
1007,
18289,
2035,
2916,
9235,
1012,
2517,
2011,
11064,
6291,
30526
] |
# Theodorea amurensis Kuntze SPECIES
#### Status
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null
|
mdoering/backbone
|
life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Theodorea/Theodorea amurensis/README.md
|
Markdown
|
apache-2.0
| 176
|
[
30522,
1001,
10117,
2050,
2572,
5397,
11745,
28919,
23102,
2427,
1001,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
2248,
3269,
3415,
5950,
1001,
1001,
1001,
1001,
2405,
1999,
19701,
1001,
1001,
1001,
1001,
2434,
2171,
19701,
1001,
1001,
1001,
12629,
19701,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<?php
/**
* File containing the basket_cleanup.php cronjob
*
* @copyright Copyright (C) 1999-2013 eZ Systems AS. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
* @version 2013.5
* @package kernel
*/
$ini = eZINI::instance();
// Check if this should be run in a cronjob
$useCronjob = $ini->variable( 'Session', 'BasketCleanup' ) == 'cronjob';
if ( !$useCronjob )
return;
// Only do basket cleanup once in a while
$freq = $ini->variable( 'Session', 'BasketCleanupAverageFrequency' );
if ( mt_rand( 1, max( $freq, 1 ) ) != 1 )
return;
$maxTime = $ini->variable( 'Session', 'BasketCleanupTime' );
$idleTime = $ini->variable( 'Session', 'BasketCleanupIdleTime' );
$fetchLimit = $ini->variable( 'Session', 'BasketCleanupFetchLimit' );
$cli->output( "Cleaning up expired baskets" );
eZDBGarbageCollector::collectBaskets( $maxTime, $idleTime, $fetchLimit );
?>
|
alafon/ezpublish-community-built
|
ezpublish_legacy/cronjobs/basket_cleanup.php
|
PHP
|
gpl-2.0
| 930
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
30524,
1007,
2639,
1011,
2286,
1041,
2480,
3001,
2004,
1012,
2035,
2916,
9235,
1012,
1008,
1030,
6105,
8299,
1024,
1013,
1013,
7479,
1012,
27004,
1012,
8917,
1013,
15943,
1013,
14246,
2140,
1011,
1016,
1012,
1014,
1012,
19067,
2102,
27004,
2236,
2270,
6105,
1058,
2475,
1008,
1030,
2544,
2286,
1012,
1019,
1008,
1030,
7427,
16293,
1008,
1013,
1002,
1999,
2072,
1027,
1041,
17168,
2072,
1024,
1024,
6013,
1006,
1007,
1025,
1013,
1013,
4638,
2065,
2023,
2323,
2022,
2448,
1999,
1037,
13675,
2239,
5558,
2497,
1002,
2224,
26775,
2239,
5558,
2497,
1027,
1002,
1999,
2072,
1011,
1028,
8023,
1006,
1005,
5219,
1005,
1010,
1005,
10810,
14321,
24076,
2361,
1005,
1007,
1027,
1027,
1005,
13675,
2239,
5558,
2497,
1005,
1025,
2065,
1006,
999,
1002,
2224,
26775,
2239,
5558,
2497,
1007,
2709,
1025,
1013,
1013,
2069,
2079,
10810,
27686,
2320,
1999,
1037,
2096,
1002,
10424,
2063,
4160,
1027,
1002,
1999,
2072,
1011,
1028,
8023,
1006,
1005,
5219,
1005,
1010,
1005,
10810,
14321,
24076,
4502,
26061,
3351,
19699,
2063,
4226,
9407,
1005,
1007,
1025,
2065,
1006,
11047,
1035,
14566,
1006,
1015,
1010,
4098,
1006,
1002,
10424,
2063,
4160,
1010,
1015,
1007,
1007,
999,
1027,
1015,
1007,
2709,
1025,
1002,
4098,
7292,
1027,
1002,
1999,
2072,
1011,
1028,
8023,
1006,
1005,
5219,
1005,
1010,
1005,
10810,
14321,
24076,
13876,
14428,
1005,
1007,
1025,
1002,
18373,
7292,
1027,
1002,
1999,
2072,
1011,
1028,
8023,
1006,
1005,
5219,
1005,
1010,
1005,
10810,
14321,
24076,
23267,
7485,
14428,
1005,
1007,
1025,
1002,
18584,
17960,
4183,
1027,
1002,
1999,
2072,
1011,
1028,
8023,
1006,
1005,
5219,
1005,
1010,
1005,
10810,
14321,
24076,
14376,
3388,
2818,
17960,
4183,
1005,
1007,
1025,
1002,
18856,
2072,
1011,
1028,
6434,
1006,
1000,
9344,
2039,
13735,
25946,
1000,
1007,
1025,
1041,
26494,
2497,
6843,
16078,
8586,
14511,
22471,
2953,
1024,
1024,
8145,
25351,
2015,
1006,
1002,
4098,
7292,
1010,
1002,
18373,
7292,
1010,
1002,
18584,
17960,
4183,
1007,
1025,
1029,
1028,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
5371,
4820,
1996,
10810,
1035,
27686,
1012,
25718,
13675,
2239,
5558,
2497,
1008,
1008,
1030,
9385,
9385,
1006,
1039,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
5371,
4820,
1996,
10810,
1035,
27686,
1012,
25718,
13675,
2239,
5558,
2497,
1008,
1008,
1030,
9385,
9385,
1006,
1039,
30526
] |
\documentclass{ximera}
\input{../preamble.tex}
\title{The Pythagorean Theorem}
\begin{document}
\begin{abstract}
In this activity we will see some proofs of the most famous theorem of
all.
\end{abstract}
\maketitle
\begin{question}
Remind us, what is the most famous theorem of all and what exactly
does it assert?
\end{question}
\subsection*{Proofs by picture}
\begin{question}
Check out:
\begin{image}
\includegraphics{pbppyth1.pdf}
\end{image}
How does the picture above ``prove'' the Pythagorean Theorem?
\end{question}
\begin{question}
Explain how the following picture ``proves'' the Pythagorean Theorem.
\begin{image}
\includegraphics{pbpdilation.pdf}
\end{image}
\end{question}
\begin{question}
Check out this tessellation involving $2$ squares:
\begin{image}
\includegraphics{pbppyth2.pdf}
\end{image}
How does the picture above ``prove'' the Pythagorean Theorem?
\end{question}
\subsection*{Euclid's proof}
\begin{question}
What would one need to prove about the following diagram to prove the
Pythagorean Theorem?
\begin{image}
\includegraphics{PythEuclid.pdf}
\end{image}
\end{question}
Let's see if we can do this!
\begin{question}
Draw a line perpendicular to $\bar{AB}$ that passes though both $C$
and $\bar{A'' B''}$. Call the intersection between this line and
$\bar{AB}$, point $E$; call the intersection point between this line
and $\bar{A''B''}$, point $E'$. Explain why $\tri ACA''$ has half the
area of rectangle $AEE'A''$.
\end{question}
\begin{question}
Explain why $\tri ABA'$ has half the area of square $ACC'A'$.
\end{question}
\begin{question}
Explain why $\tri ACA''$ is congruent to $\tri ABA'$.
\end{question}
\begin{question}
Explain why area of square $ACC'A'$ is equal to the area of rectangle
$AEE'A''$.
\end{question}
\begin{question}
Use similar ideas to complete a proof the Pythagorean Theorem.
\end{question}
\subsection*{The converse}
\begin{question} What is the converse to the Pythagorean Theorem? Is it true? How do you prove it?
\end{question}
\end{document}
|
bartsnapp/ximeraHistoryOfMath
|
thePythagoreanTheorem/thePythagoreanTheorem.tex
|
TeX
|
gpl-2.0
| 2,043
|
[
30522,
1032,
6254,
26266,
1063,
8418,
5017,
2050,
1065,
1032,
7953,
1063,
1012,
1012,
1013,
3653,
3286,
3468,
1012,
16060,
1065,
1032,
2516,
1063,
1996,
1052,
22123,
3270,
20255,
11219,
9872,
1065,
1032,
4088,
1063,
6254,
1065,
1032,
4088,
1063,
10061,
1065,
1999,
2023,
4023,
2057,
2097,
2156,
2070,
6947,
2015,
1997,
1996,
2087,
3297,
9872,
1997,
2035,
1012,
1032,
2203,
1063,
10061,
1065,
1032,
2191,
3775,
9286,
1032,
4088,
1063,
3160,
1065,
10825,
2149,
1010,
2054,
2003,
1996,
2087,
3297,
9872,
1997,
2035,
1998,
2054,
3599,
2515,
2009,
20865,
1029,
1032,
2203,
1063,
3160,
1065,
1032,
4942,
29015,
1008,
1063,
6947,
2015,
2011,
3861,
1065,
1032,
4088,
1063,
3160,
1065,
4638,
2041,
1024,
1032,
4088,
1063,
3746,
1065,
1032,
2421,
14773,
2015,
1063,
1052,
2497,
27659,
2705,
2487,
1012,
11135,
1065,
1032,
2203,
1063,
3746,
1065,
2129,
2515,
1996,
3861,
2682,
1036,
1036,
6011,
1005,
1005,
1996,
1052,
22123,
3270,
20255,
11219,
9872,
1029,
1032,
2203,
1063,
3160,
1065,
1032,
4088,
1063,
3160,
1065,
4863,
2129,
1996,
2206,
3861,
1036,
1036,
16481,
1005,
1005,
1996,
1052,
22123,
3270,
20255,
11219,
9872,
1012,
1032,
4088,
1063,
3746,
1065,
1032,
2421,
14773,
2015,
1063,
1052,
2497,
17299,
29545,
1012,
11135,
1065,
1032,
2203,
1063,
3746,
1065,
1032,
2203,
1063,
3160,
1065,
1032,
4088,
1063,
3160,
1065,
4638,
2041,
2023,
15540,
8411,
3508,
5994,
1002,
1016,
1002,
14320,
1024,
1032,
4088,
1063,
3746,
1065,
1032,
2421,
14773,
2015,
1063,
1052,
2497,
27659,
2705,
2475,
1012,
11135,
1065,
1032,
2203,
1063,
3746,
1065,
2129,
2515,
1996,
3861,
2682,
1036,
1036,
6011,
1005,
1005,
1996,
1052,
22123,
3270,
20255,
11219,
9872,
1029,
1032,
2203,
1063,
3160,
1065,
1032,
4942,
29015,
1008,
1063,
7327,
20464,
3593,
1005,
1055,
6947,
1065,
1032,
4088,
1063,
3160,
1065,
2054,
2052,
2028,
2342,
2000,
6011,
2055,
1996,
2206,
16403,
2000,
6011,
1996,
1052,
22123,
3270,
20255,
11219,
9872,
1029,
1032,
4088,
1063,
3746,
1065,
1032,
2421,
14773,
2015,
1063,
1052,
26688,
14194,
21273,
1012,
11135,
1065,
1032,
2203,
1063,
3746,
1065,
1032,
2203,
1063,
3160,
1065,
2292,
1005,
1055,
2156,
2065,
2057,
2064,
2079,
2023,
999,
1032,
4088,
1063,
3160,
1065,
4009,
1037,
2240,
19581,
2000,
1002,
1032,
3347,
1063,
11113,
1065,
1002,
2008,
5235,
2295,
2119,
1002,
30524,
1025,
2655,
1996,
6840,
2391,
2090,
2023,
2240,
1998,
1002,
1032,
3347,
1063,
1037,
1005,
1005,
1038,
1005,
1005,
1065,
1002,
1010,
2391,
1002,
1041,
1005,
1002,
1012,
4863,
2339,
1002,
1032,
13012,
9353,
2050,
1005,
1005,
1002,
2038,
2431,
1996,
2181,
1997,
28667,
23395,
1002,
29347,
2063,
1005,
1037,
1005,
1005,
1002,
1012,
1032,
2203,
1063,
3160,
1065,
1032,
4088,
1063,
3160,
1065,
4863,
2339,
1002,
1032,
13012,
19557,
1005,
1002,
2038,
2431,
1996,
2181,
1997,
2675,
1002,
16222,
1005,
1037,
1005,
1002,
1012,
1032,
2203,
1063,
3160,
1065,
1032,
4088,
1063,
3160,
1065,
30523,
1039,
1002,
1998,
1002,
1032,
3347,
1063,
1037,
1005,
1005,
1038,
1005,
1005,
1065,
1002,
1012,
2655,
1996,
6840,
2090,
2023,
2240,
1998,
1002,
1032,
3347,
1063,
11113,
1065,
1002,
1010,
2391,
1002,
1041,
1002,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1039,
1002,
1998,
1002,
1032,
3347,
1063,
1037,
1005,
1005,
1038,
1005,
1005,
1065,
1002,
1012,
2655,
1996,
6840,
2090,
2023,
2240,
1998,
1002,
1032,
3347,
1063,
11113,
1065,
1002,
1010,
2391,
1002,
1041,
1002,
30526
] |
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2001-2020 Intel Corporation
*/
/*
* 82542 Gigabit Ethernet Controller
*/
#include "e1000_api.h"
STATIC s32 e1000_init_phy_params_82542(struct e1000_hw *hw);
STATIC s32 e1000_init_nvm_params_82542(struct e1000_hw *hw);
STATIC s32 e1000_init_mac_params_82542(struct e1000_hw *hw);
STATIC s32 e1000_get_bus_info_82542(struct e1000_hw *hw);
STATIC s32 e1000_reset_hw_82542(struct e1000_hw *hw);
STATIC s32 e1000_init_hw_82542(struct e1000_hw *hw);
STATIC s32 e1000_setup_link_82542(struct e1000_hw *hw);
STATIC s32 e1000_led_on_82542(struct e1000_hw *hw);
STATIC s32 e1000_led_off_82542(struct e1000_hw *hw);
STATIC int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index);
STATIC void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw);
STATIC s32 e1000_read_mac_addr_82542(struct e1000_hw *hw);
/**
* e1000_init_phy_params_82542 - Init PHY func ptrs.
* @hw: pointer to the HW structure
**/
STATIC s32 e1000_init_phy_params_82542(struct e1000_hw *hw)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val = E1000_SUCCESS;
DEBUGFUNC("e1000_init_phy_params_82542");
phy->type = e1000_phy_none;
return ret_val;
}
/**
* e1000_init_nvm_params_82542 - Init NVM func ptrs.
* @hw: pointer to the HW structure
**/
STATIC s32 e1000_init_nvm_params_82542(struct e1000_hw *hw)
{
struct e1000_nvm_info *nvm = &hw->nvm;
DEBUGFUNC("e1000_init_nvm_params_82542");
nvm->address_bits = 6;
nvm->delay_usec = 50;
nvm->opcode_bits = 3;
nvm->type = e1000_nvm_eeprom_microwire;
nvm->word_size = 64;
/* Function Pointers */
nvm->ops.read = e1000_read_nvm_microwire;
nvm->ops.release = e1000_stop_nvm;
nvm->ops.write = e1000_write_nvm_microwire;
nvm->ops.update = e1000_update_nvm_checksum_generic;
nvm->ops.validate = e1000_validate_nvm_checksum_generic;
return E1000_SUCCESS;
}
/**
* e1000_init_mac_params_82542 - Init MAC func ptrs.
* @hw: pointer to the HW structure
**/
STATIC s32 e1000_init_mac_params_82542(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
DEBUGFUNC("e1000_init_mac_params_82542");
/* Set media type */
hw->phy.media_type = e1000_media_type_fiber;
/* Set mta register count */
mac->mta_reg_count = 128;
/* Set rar entry count */
mac->rar_entry_count = E1000_RAR_ENTRIES;
/* Function pointers */
/* bus type/speed/width */
mac->ops.get_bus_info = e1000_get_bus_info_82542;
/* function id */
mac->ops.set_lan_id = e1000_set_lan_id_multi_port_pci;
/* reset */
mac->ops.reset_hw = e1000_reset_hw_82542;
/* hw initialization */
mac->ops.init_hw = e1000_init_hw_82542;
/* link setup */
mac->ops.setup_link = e1000_setup_link_82542;
/* phy/fiber/serdes setup */
mac->ops.setup_physical_interface =
e1000_setup_fiber_serdes_link_generic;
/* check for link */
mac->ops.check_for_link = e1000_check_for_fiber_link_generic;
/* multicast address update */
mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_generic;
/* writing VFTA */
mac->ops.write_vfta = e1000_write_vfta_generic;
/* clearing VFTA */
mac->ops.clear_vfta = e1000_clear_vfta_generic;
/* read mac address */
mac->ops.read_mac_addr = e1000_read_mac_addr_82542;
/* set RAR */
mac->ops.rar_set = e1000_rar_set_82542;
/* turn on/off LED */
mac->ops.led_on = e1000_led_on_82542;
mac->ops.led_off = e1000_led_off_82542;
/* clear hardware counters */
mac->ops.clear_hw_cntrs = e1000_clear_hw_cntrs_82542;
/* link info */
mac->ops.get_link_up_info =
e1000_get_speed_and_duplex_fiber_serdes_generic;
return E1000_SUCCESS;
}
/**
* e1000_init_function_pointers_82542 - Init func ptrs.
* @hw: pointer to the HW structure
*
* Called to initialize all function pointers and parameters.
**/
void e1000_init_function_pointers_82542(struct e1000_hw *hw)
{
DEBUGFUNC("e1000_init_function_pointers_82542");
hw->mac.ops.init_params = e1000_init_mac_params_82542;
hw->nvm.ops.init_params = e1000_init_nvm_params_82542;
hw->phy.ops.init_params = e1000_init_phy_params_82542;
}
/**
* e1000_get_bus_info_82542 - Obtain bus information for adapter
* @hw: pointer to the HW structure
*
* This will obtain information about the HW bus for which the
* adapter is attached and stores it in the hw structure.
**/
STATIC s32 e1000_get_bus_info_82542(struct e1000_hw *hw)
{
DEBUGFUNC("e1000_get_bus_info_82542");
hw->bus.type = e1000_bus_type_pci;
hw->bus.speed = e1000_bus_speed_unknown;
hw->bus.width = e1000_bus_width_unknown;
return E1000_SUCCESS;
}
/**
* e1000_reset_hw_82542 - Reset hardware
* @hw: pointer to the HW structure
*
* This resets the hardware into a known state.
**/
STATIC s32 e1000_reset_hw_82542(struct e1000_hw *hw)
{
struct e1000_bus_info *bus = &hw->bus;
s32 ret_val = E1000_SUCCESS;
u32 ctrl;
DEBUGFUNC("e1000_reset_hw_82542");
if (hw->revision_id == E1000_REVISION_2) {
DEBUGOUT("Disabling MWI on 82542 rev 2\n");
e1000_pci_clear_mwi(hw);
}
DEBUGOUT("Masking off all interrupts\n");
E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
E1000_WRITE_REG(hw, E1000_RCTL, 0);
E1000_WRITE_REG(hw, E1000_TCTL, E1000_TCTL_PSP);
E1000_WRITE_FLUSH(hw);
/*
* Delay to allow any outstanding PCI transactions to complete before
* resetting the device
*/
msec_delay(10);
ctrl = E1000_READ_REG(hw, E1000_CTRL);
DEBUGOUT("Issuing a global reset to 82542/82543 MAC\n");
E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_RST);
hw->nvm.ops.reload(hw);
msec_delay(2);
E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
E1000_READ_REG(hw, E1000_ICR);
if (hw->revision_id == E1000_REVISION_2) {
if (bus->pci_cmd_word & CMD_MEM_WRT_INVALIDATE)
e1000_pci_set_mwi(hw);
}
return ret_val;
}
/**
* e1000_init_hw_82542 - Initialize hardware
* @hw: pointer to the HW structure
*
* This inits the hardware readying it for operation.
**/
STATIC s32 e1000_init_hw_82542(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
struct e1000_dev_spec_82542 *dev_spec = &hw->dev_spec._82542;
s32 ret_val = E1000_SUCCESS;
u32 ctrl;
u16 i;
DEBUGFUNC("e1000_init_hw_82542");
/* Disabling VLAN filtering */
E1000_WRITE_REG(hw, E1000_VET, 0);
mac->ops.clear_vfta(hw);
/* For 82542 (rev 2.0), disable MWI and put the receiver into reset */
if (hw->revision_id == E1000_REVISION_2) {
DEBUGOUT("Disabling MWI on 82542 rev 2.0\n");
e1000_pci_clear_mwi(hw);
E1000_WRITE_REG(hw, E1000_RCTL, E1000_RCTL_RST);
E1000_WRITE_FLUSH(hw);
msec_delay(5);
}
/* Setup the receive address. */
e1000_init_rx_addrs_generic(hw, mac->rar_entry_count);
/* For 82542 (rev 2.0), take the receiver out of reset and enable MWI */
if (hw->revision_id == E1000_REVISION_2) {
E1000_WRITE_REG(hw, E1000_RCTL, 0);
E1000_WRITE_FLUSH(hw);
msec_delay(1);
if (hw->bus.pci_cmd_word & CMD_MEM_WRT_INVALIDATE)
e1000_pci_set_mwi(hw);
}
/* Zero out the Multicast HASH table */
DEBUGOUT("Zeroing the MTA\n");
for (i = 0; i < mac->mta_reg_count; i++)
E1000_WRITE_REG_ARRAY(hw, E1000_MTA, i, 0);
/*
* Set the PCI priority bit correctly in the CTRL register. This
* determines if the adapter gives priority to receives, or if it
* gives equal priority to transmits and receives.
*/
if (dev_spec->dma_fairness) {
ctrl = E1000_READ_REG(hw, E1000_CTRL);
E1000_WRITE_REG(hw, E1000_CTRL, ctrl | E1000_CTRL_PRIOR);
}
/* Setup link and flow control */
ret_val = e1000_setup_link_82542(hw);
/*
* Clear all of the statistics registers (clear on read). It is
* important that we do this after we have tried to establish link
* because the symbol error count will increment wildly if there
* is no link.
*/
e1000_clear_hw_cntrs_82542(hw);
return ret_val;
}
/**
* e1000_setup_link_82542 - Setup flow control and link settings
* @hw: pointer to the HW structure
*
* Determines which flow control settings to use, then configures flow
* control. Calls the appropriate media-specific link configuration
* function. Assuming the adapter has a valid link partner, a valid link
* should be established. Assumes the hardware has previously been reset
* and the transmitter and receiver are not enabled.
**/
STATIC s32 e1000_setup_link_82542(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
s32 ret_val;
DEBUGFUNC("e1000_setup_link_82542");
ret_val = e1000_set_default_fc_generic(hw);
if (ret_val)
goto out;
hw->fc.requested_mode &= ~e1000_fc_tx_pause;
if (mac->report_tx_early)
hw->fc.requested_mode &= ~e1000_fc_rx_pause;
/*
* Save off the requested flow control mode for use later. Depending
* on the link partner's capabilities, we may or may not use this mode.
*/
hw->fc.current_mode = hw->fc.requested_mode;
DEBUGOUT1("After fix-ups FlowControl is now = %x\n",
hw->fc.current_mode);
/* Call the necessary subroutine to configure the link. */
ret_val = mac->ops.setup_physical_interface(hw);
if (ret_val)
goto out;
/*
* Initialize the flow control address, type, and PAUSE timer
* registers to their default values. This is done even if flow
* control is disabled, because it does not hurt anything to
* initialize these registers.
*/
DEBUGOUT("Initializing Flow Control address, type and timer regs\n");
E1000_WRITE_REG(hw, E1000_FCAL, FLOW_CONTROL_ADDRESS_LOW);
E1000_WRITE_REG(hw, E1000_FCAH, FLOW_CONTROL_ADDRESS_HIGH);
E1000_WRITE_REG(hw, E1000_FCT, FLOW_CONTROL_TYPE);
E1000_WRITE_REG(hw, E1000_FCTTV, hw->fc.pause_time);
ret_val = e1000_set_fc_watermarks_generic(hw);
out:
return ret_val;
}
/**
* e1000_led_on_82542 - Turn on SW controllable LED
* @hw: pointer to the HW structure
*
* Turns the SW defined LED on.
**/
STATIC s32 e1000_led_on_82542(struct e1000_hw *hw)
{
u32 ctrl = E1000_READ_REG(hw, E1000_CTRL);
DEBUGFUNC("e1000_led_on_82542");
ctrl |= E1000_CTRL_SWDPIN0;
ctrl |= E1000_CTRL_SWDPIO0;
E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
return E1000_SUCCESS;
}
/**
* e1000_led_off_82542 - Turn off SW controllable LED
* @hw: pointer to the HW structure
*
* Turns the SW defined LED off.
**/
STATIC s32 e1000_led_off_82542(struct e1000_hw *hw)
{
u32 ctrl = E1000_READ_REG(hw, E1000_CTRL);
DEBUGFUNC("e1000_led_off_82542");
ctrl &= ~E1000_CTRL_SWDPIN0;
ctrl |= E1000_CTRL_SWDPIO0;
E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
return E1000_SUCCESS;
}
/**
* e1000_rar_set_82542 - Set receive address register
* @hw: pointer to the HW structure
* @addr: pointer to the receive address
* @index: receive address array register
*
* Sets the receive address array register at index to the address passed
* in by addr.
**/
STATIC int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
DEBUGFUNC("e1000_rar_set_82542");
/*
* HW expects these in little endian so we reverse the byte order
* from network order (big endian) to little endian
*/
rar_low = ((u32) addr[0] | ((u32) addr[1] << 8) |
((u32) addr[2] << 16) | ((u32) addr[3] << 24));
rar_high = ((u32) addr[4] | ((u32) addr[5] << 8));
/* If MAC address zero, no need to set the AV bit */
if (rar_low || rar_high)
rar_high |= E1000_RAH_AV;
E1000_WRITE_REG_ARRAY(hw, E1000_RA, (index << 1), rar_low);
E1000_WRITE_REG_ARRAY(hw, E1000_RA, ((index << 1) + 1), rar_high);
return E1000_SUCCESS;
}
/**
* e1000_translate_register_82542 - Translate the proper register offset
* @reg: e1000 register to be read
*
* Registers in 82542 are located in different offsets than other adapters
* even though they function in the same manner. This function takes in
* the name of the register to read and returns the correct offset for
* 82542 silicon.
**/
u32 e1000_translate_register_82542(u32 reg)
{
/*
* Some of the 82542 registers are located at different
* offsets than they are in newer adapters.
* Despite the difference in location, the registers
* function in the same manner.
*/
switch (reg) {
case E1000_RA:
reg = 0x00040;
break;
case E1000_RDTR:
reg = 0x00108;
break;
case E1000_RDBAL(0):
reg = 0x00110;
break;
case E1000_RDBAH(0):
reg = 0x00114;
break;
case E1000_RDLEN(0):
reg = 0x00118;
break;
case E1000_RDH(0):
reg = 0x00120;
break;
case E1000_RDT(0):
reg = 0x00128;
break;
case E1000_RDBAL(1):
reg = 0x00138;
break;
case E1000_RDBAH(1):
reg = 0x0013C;
break;
case E1000_RDLEN(1):
reg = 0x00140;
break;
case E1000_RDH(1):
reg = 0x00148;
break;
case E1000_RDT(1):
reg = 0x00150;
break;
case E1000_FCRTH:
reg = 0x00160;
break;
case E1000_FCRTL:
reg = 0x00168;
break;
case E1000_MTA:
reg = 0x00200;
break;
case E1000_TDBAL(0):
reg = 0x00420;
break;
case E1000_TDBAH(0):
reg = 0x00424;
break;
case E1000_TDLEN(0):
reg = 0x00428;
break;
case E1000_TDH(0):
reg = 0x00430;
break;
case E1000_TDT(0):
reg = 0x00438;
break;
case E1000_TIDV:
reg = 0x00440;
break;
case E1000_VFTA:
reg = 0x00600;
break;
case E1000_TDFH:
reg = 0x08010;
break;
case E1000_TDFT:
reg = 0x08018;
break;
default:
break;
}
return reg;
}
/**
* e1000_clear_hw_cntrs_82542 - Clear device specific hardware counters
* @hw: pointer to the HW structure
*
* Clears the hardware counters by reading the counter registers.
**/
STATIC void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw)
{
DEBUGFUNC("e1000_clear_hw_cntrs_82542");
e1000_clear_hw_cntrs_base_generic(hw);
E1000_READ_REG(hw, E1000_PRC64);
E1000_READ_REG(hw, E1000_PRC127);
E1000_READ_REG(hw, E1000_PRC255);
E1000_READ_REG(hw, E1000_PRC511);
E1000_READ_REG(hw, E1000_PRC1023);
E1000_READ_REG(hw, E1000_PRC1522);
E1000_READ_REG(hw, E1000_PTC64);
E1000_READ_REG(hw, E1000_PTC127);
E1000_READ_REG(hw, E1000_PTC255);
E1000_READ_REG(hw, E1000_PTC511);
E1000_READ_REG(hw, E1000_PTC1023);
E1000_READ_REG(hw, E1000_PTC1522);
}
/**
* e1000_read_mac_addr_82542 - Read device MAC address
* @hw: pointer to the HW structure
*
* Reads the device MAC address from the EEPROM and stores the value.
**/
s32 e1000_read_mac_addr_82542(struct e1000_hw *hw)
{
s32 ret_val = E1000_SUCCESS;
u16 offset, nvm_data, i;
DEBUGFUNC("e1000_read_mac_addr");
for (i = 0; i < ETH_ADDR_LEN; i += 2) {
offset = i >> 1;
ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data);
if (ret_val) {
DEBUGOUT("NVM Read Error\n");
goto out;
}
hw->mac.perm_addr[i] = (u8)(nvm_data & 0xFF);
hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8);
}
for (i = 0; i < ETH_ADDR_LEN; i++)
hw->mac.addr[i] = hw->mac.perm_addr[i];
out:
return ret_val;
}
|
john-mcnamara-intel/dpdk
|
drivers/net/e1000/base/e1000_82542.c
|
C
|
mit
| 14,510
|
[
30522,
1013,
1008,
23772,
2595,
1011,
6105,
1011,
8909,
4765,
18095,
1024,
18667,
2094,
1011,
1017,
1011,
11075,
1008,
9385,
1006,
1039,
1007,
2541,
1011,
12609,
13420,
3840,
1008,
1013,
1013,
1008,
1008,
6445,
27009,
2475,
15453,
28518,
2102,
26110,
11486,
1008,
1013,
1001,
2421,
1000,
1041,
18613,
2692,
1035,
17928,
1012,
1044,
1000,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
1999,
4183,
1035,
6887,
2100,
1035,
11498,
5244,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
1999,
4183,
1035,
1050,
2615,
2213,
1035,
11498,
5244,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
1999,
4183,
1035,
6097,
1035,
11498,
5244,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
2131,
1035,
3902,
1035,
18558,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
25141,
1035,
1044,
2860,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
1999,
4183,
1035,
1044,
2860,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
16437,
1035,
4957,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
2419,
1035,
2006,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
2419,
1035,
2125,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
20014,
1041,
18613,
2692,
1035,
10958,
2099,
1035,
2275,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1010,
1057,
2620,
1008,
5587,
2099,
1010,
1057,
16703,
5950,
1007,
1025,
10763,
11675,
1041,
18613,
2692,
1035,
3154,
1035,
1044,
2860,
1035,
27166,
16344,
2015,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
3191,
1035,
6097,
1035,
5587,
2099,
1035,
6445,
27009,
2475,
1006,
2358,
6820,
6593,
1041,
18613,
2692,
1035,
1044,
2860,
1008,
1044,
2860,
1007,
1025,
1013,
1008,
1008,
1008,
1041,
18613,
2692,
1035,
1999,
4183,
1035,
6887,
2100,
1035,
11498,
5244,
1035,
6445,
27009,
2475,
1011,
1999,
4183,
6887,
2100,
4569,
2278,
13866,
2869,
1012,
1008,
1030,
30524,
2860,
3252,
1008,
1008,
1013,
10763,
1055,
16703,
1041,
18613,
2692,
1035,
1999,
4183,
1035,
6887,
2100,
1035,
11498,
5244,
1035,
30523,
1044,
2860,
1024,
20884,
2000,
1996,
1044,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1044,
2860,
1024,
20884,
2000,
1996,
1044,
30526
] |
#!/usr/bin/env bash
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
#
# Usage:
# ci_parameterized_build.sh
#
# The script obeys the following required environment variables:
# TF_BUILD_CONTAINER_TYPE: (CPU | GPU | ANDROID | ANDROID_FULL)
# TF_BUILD_PYTHON_VERSION: (PYTHON2 | PYTHON3 | PYTHON3.5)
# TF_BUILD_IS_PIP: (NO_PIP | PIP | BOTH)
#
# The below environment variable is required, but will be deprecated together
# with TF_BUILD_MAVX and both will be replaced by TF_BUILD_OPTIONS.
# TF_BUILD_IS_OPT: (NO_OPT | OPT)
#
# Note:
# 1) Certain combinations of parameter values are regarded
# as invalid and will cause the script to exit with code 0. For example:
# NO_OPT & PIP (PIP builds should always use OPT)
# ANDROID & PIP (Android and PIP builds are mutually exclusive)
#
# 2) TF_BUILD_PYTHON_VERSION is set to PYTHON3, the build will use the version
# pointed to by "which python3" on the system, which is typically python3.4. To
# build for python3.5, set the environment variable to PYTHON3.5
#
#
# Additionally, the script follows the directions of optional environment
# variables:
# TF_BUILD_DRY_RUN: If it is set to any non-empty value that is not "0",
# the script will just generate and print the final
# command, but not actually run it.
# TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS:
# String appended to the content of CI_DOCKER_EXTRA_PARAMS
# TF_BUILD_APPEND_ARGUMENTS:
# Additional command line arguments for the bazel,
# pip.sh or android.sh command
# TF_BUILD_MAVX: (Soon to be deprecated, use TF_BUILD_OPTIONS instead)
# (unset | MAVX | MAVX2)
# If set to MAVX or MAVX2, will cause bazel to use the
# additional flag --copt=-mavx or --copt=-mavx2, to
# perform AVX or AVX2 builds, respectively. This requires
# AVX- or AVX2-compatible CPUs.
# TF_BUILD_BAZEL_TARGET:
# Used to override the default bazel build target:
# //tensorflow/... -//tensorflow/compiler
# TF_BUILD_BAZEL_CLEAN:
# Will perform "bazel clean", if and only if this variable
# is set to any non-empty and non-0 value
# TF_BAZEL_BUILD_ONLY:
# If it is set to any non-empty value that is not "0", Bazel
# will only build specified targets
# TF_GPU_COUNT:
# Run this many parallel tests for serial builds.
# For now, only can be edited for PIP builds.
# TODO(gunan): Find a way to pass this environment variable
# to the script bazel runs (using --run_under).
# TF_BUILD_TEST_TUTORIALS:
# If set to any non-empty and non-0 value, will perform
# tutorials tests (Applicable only if TF_BUILD_IS_PIP is
# PIP or BOTH).
# See builds/test_tutorials.sh
# TF_BUILD_INTEGRATION_TESTS:
# If set this will perform integration tests. See
# builds/integration_tests.sh.
# TF_BUILD_RUN_BENCHMARKS:
# If set to any non-empty and non-0 value, will perform
# the benchmark tests (see *_logged_benchmark targets in
# tools/test/BUILD)
# TF_BUILD_OPTIONS:
# (FASTBUILD | OPT | OPTDBG | MAVX | MAVX2_FMA | MAVX_DBG |
# MAVX2_FMA_DBG)
# Use the specified configurations when building.
# When set, overrides TF_BUILD_IS_OPT and TF_BUILD_MAVX
# options, as this will replace the two.
# TF_SKIP_CONTRIB_TESTS:
# If set to any non-empty or non-0 value, will skipp running
# contrib tests.
# TF_NIGHTLY:
# If this run is being used to build the tf_nightly pip
# packages.
# TF_CUDA_CLANG:
# If set to 1, builds and runs cuda_clang configuration.
# Only available inside GPU containers.
#
# This script can be used by Jenkins parameterized / matrix builds.
# Helper function: Convert to lower case
to_lower () {
echo "$1" | tr '[:upper:]' '[:lower:]'
}
# Helper function: Strip leading and trailing whitespaces
str_strip () {
echo -e "$1" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
}
# Helper function: Exit on failure
die () {
echo $@
exit 1
}
##########################################################
# Default configuration
CI_BUILD_DIR="tensorflow/tools/ci_build"
# Command to call when Docker is available
DOCKER_MAIN_CMD="${CI_BUILD_DIR}/ci_build.sh"
# Command to call when Docker is unavailable
NO_DOCKER_MAIN_CMD="${CI_BUILD_DIR}/builds/configured"
# Additional option flags to apply when Docker is unavailable (e.g., on Mac)
NO_DOCKER_OPT_FLAG="--genrule_strategy=standalone"
DO_DOCKER=1
BAZEL_CMD="bazel test"
BAZEL_BUILD_ONLY_CMD="bazel build"
BAZEL_CLEAN_CMD="bazel clean"
DEFAULT_BAZEL_CONFIGS=""
PIP_CMD="${CI_BUILD_DIR}/builds/pip.sh"
PIP_TEST_TUTORIALS_FLAG="--test_tutorials"
PIP_INTEGRATION_TESTS_FLAG="--integration_tests"
ANDROID_CMD="${CI_BUILD_DIR}/builds/android.sh"
ANDROID_FULL_CMD="${CI_BUILD_DIR}/builds/android_full.sh"
TF_GPU_COUNT=${TF_GPU_COUNT:-8}
PARALLEL_GPU_TEST_CMD='//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute'
BENCHMARK_CMD="${CI_BUILD_DIR}/builds/benchmark.sh"
EXTRA_PARAMS=""
BAZEL_TARGET="//tensorflow/... -//tensorflow/compiler/..."
if [[ -n "$TF_SKIP_CONTRIB_TESTS" ]]; then
BAZEL_TARGET="$BAZEL_TARGET -//tensorflow/contrib/..."
else
BAZEL_TARGET="${BAZEL_TARGET} //tensorflow/contrib/lite/..."
fi
TUT_TEST_DATA_DIR="/tmp/tf_tutorial_test_data"
##########################################################
echo "Parameterized build starts at: $(date)"
echo ""
START_TIME=$(date +'%s')
# Convert all the required environment variables to lower case
TF_BUILD_CONTAINER_TYPE=$(to_lower ${TF_BUILD_CONTAINER_TYPE})
TF_BUILD_PYTHON_VERSION=$(to_lower ${TF_BUILD_PYTHON_VERSION})
TF_BUILD_IS_OPT=$(to_lower ${TF_BUILD_IS_OPT})
TF_BUILD_IS_PIP=$(to_lower ${TF_BUILD_IS_PIP})
if [[ ! -z "${TF_BUILD_MAVX}" ]]; then
TF_BUILD_MAVX=$(to_lower ${TF_BUILD_MAVX})
fi
# Print parameter values
echo "Required build parameters:"
echo " TF_BUILD_CONTAINER_TYPE=${TF_BUILD_CONTAINER_TYPE}"
echo " TF_BUILD_PYTHON_VERSION=${TF_BUILD_PYTHON_VERSION}"
echo " TF_BUILD_IS_OPT=${TF_BUILD_IS_OPT}"
echo " TF_BUILD_IS_PIP=${TF_BUILD_IS_PIP}"
echo "Optional build parameters:"
echo " TF_BUILD_DRY_RUN=${TF_BUILD_DRY_RUN}"
echo " TF_BUILD_MAVX=${TF_BUILD_MAVX}"
echo " TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS="\
"${TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS}"
echo " TF_BUILD_APPEND_ARGUMENTS=${TF_BUILD_APPEND_ARGUMENTS}"
echo " TF_BUILD_BAZEL_TARGET=${TF_BUILD_BAZEL_TARGET}"
echo " TF_BUILD_BAZEL_CLEAN=${TF_BUILD_BAZEL_CLEAN}"
echo " TF_BUILD_TEST_TUTORIALS=${TF_BUILD_TEST_TUTORIALS}"
echo " TF_BUILD_INTEGRATION_TESTS=${TF_BUILD_INTEGRATION_TESTS}"
echo " TF_BUILD_RUN_BENCHMARKS=${TF_BUILD_RUN_BENCHMARKS}"
echo " TF_BUILD_OPTIONS=${TF_BUILD_OPTIONS}"
# Function that tries to determine CUDA capability, if deviceQuery binary
# is available on path
function get_cuda_capability_version() {
if [[ ! -z $(which deviceQuery) ]]; then
# The first listed device is used
deviceQuery | grep "CUDA Capability .* version" | \
head -1 | awk '{print $NF}'
fi
}
# Container type, e.g., CPU, GPU
CTYPE=${TF_BUILD_CONTAINER_TYPE}
# Determine if the machine is a Mac
OPT_FLAG="--test_output=errors"
if [[ "$(uname -s)" == "Darwin" ]]; then
DO_DOCKER=0
echo "It appears this machine is a Mac. "\
"We will perform this build without Docker."
echo "Also, the additional option flags will be applied to the build:"
echo " ${NO_DOCKER_OPT_FLAG}"
MAIN_CMD="${NO_DOCKER_MAIN_CMD} ${CTYPE}"
OPT_FLAG="${OPT_FLAG} ${NO_DOCKER_OPT_FLAG}"
fi
# In DO_DOCKER mode, appends environment variable to docker's run invocation.
# Otherwise, exports the corresponding variable.
function set_script_variable() {
local VAR="$1"
local VALUE="$2"
if [[ $DO_DOCKER == "1" ]]; then
TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS="${TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS} -e $VAR=$VALUE"
else
export $VAR="$VALUE"
fi
}
# Process container type
if [[ ${CTYPE} == cpu* ]] || [[ ${CTYPE} == "debian.jessie.cpu" ]]; then
:
elif [[ ${CTYPE} == gpu* ]]; then
set_script_variable TF_NEED_CUDA 1
if [[ $TF_CUDA_CLANG == "1" ]]; then
OPT_FLAG="${OPT_FLAG} --config=cuda_clang"
set_script_variable TF_CUDA_CLANG 1
# For cuda_clang we download `clang` while building.
set_script_variable TF_DOWNLOAD_CLANG 1
else
OPT_FLAG="${OPT_FLAG} --config=cuda"
fi
# Attempt to determine CUDA capability version automatically and use it if
# CUDA capability version is not specified by the environment variables.
CUDA_CAPA_VER=$(get_cuda_capability_version)
if [[ ! -z ${CUDA_CAPA_VER} ]]; then
AUTO_CUDA_CAPA_VER=0
if [[ ${DO_DOCKER} == "1" ]] && \
[[ "${TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS}" != \
*"TF_CUDA_COMPUTE_CAPABILITIES="* ]]; then
AUTO_CUDA_CAPA_VER=1
TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS=\
"${TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS} -e "\
"TF_CUDA_COMPUTE_CAPABILITIES=${CUDA_CAPA_VER}"
echo "Docker GPU build: TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS="\
"\"${TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS}\""
elif [[ ${DO_DOCKER} == "0" ]] && \
[[ -z "${TF_CUDA_COMPUTE_CAPABILITIES}" ]]; then
AUTO_CUDA_CAPA_VER=1
TF_CUDA_COMPUTE_CAPABILITIES="${CUDA_CAPA_VER}"
echo "Non-Docker GPU build: TF_CUDA_COMPUTE_CAPABILITIES="\
"\"${TF_CUDA_COMPUTE_CAPABILITIES}\""
fi
if [[ ${AUTO_CUDA_CAPA_VER} == "1" ]]; then
echo "TF_CUDA_COMPUTE_CAPABILITIES is not set:"
echo "Using CUDA capability version from deviceQuery: ${CUDA_CAPA_VER}"
echo ""
fi
fi
elif [[ ${CTYPE} == "android" ]] || [[ ${CTYPE} == "android_full" ]]; then
:
else
die "Unrecognized value in TF_BUILD_CONTAINER_TYPE: "\
"\"${TF_BUILD_CONTAINER_TYPE}\""
fi
# Determine if this is a benchmarks job
RUN_BENCHMARKS=0
if [[ ! -z "${TF_BUILD_RUN_BENCHMARKS}" ]] &&
[[ "${TF_BUILD_RUN_BENCHMARKS}" != "0" ]]; then
RUN_BENCHMARKS=1
fi
# Process Bazel "-c opt" flag
if [[ -z "${TF_BUILD_OPTIONS}" ]]; then
if [[ ${TF_BUILD_IS_OPT} == "no_opt" ]]; then
# PIP builds are done only with the -c opt flag
if [[ ${TF_BUILD_IS_PIP} == "pip" ]]; then
echo "Skipping parameter combination: ${TF_BUILD_IS_OPT} & "\
"${TF_BUILD_IS_PIP}"
exit 0
fi
elif [[ ${TF_BUILD_IS_OPT} == "opt" ]]; then
OPT_FLAG="${OPT_FLAG} -c opt"
else
die "Unrecognized value in TF_BUILD_IS_OPT: \"${TF_BUILD_IS_OPT}\""
fi
# Process MAVX option
if [[ ! -z "${TF_BUILD_MAVX}" ]]; then
if [[ "${TF_BUILD_MAVX}" == "mavx" ]]; then
OPT_FLAG="${OPT_FLAG} --copt=-mavx"
elif [[ "${TF_BUILD_MAVX}" == "mavx2" ]]; then
OPT_FLAG="${OPT_FLAG} --copt=-mavx2"
else
die "Unsupported value in TF_BUILD_MAVX: ${TF_BUILD_MAVX}"
fi
fi
else
case $TF_BUILD_OPTIONS in
FASTBUILD)
echo "Running FASTBUILD mode (noopt, nodbg)."
;;
OPT)
OPT_FLAG="${OPT_FLAG} -c opt"
;;
OPTDBG)
OPT_FLAG="${OPT_FLAG} -c opt --copt=-g"
;;
MAVX)
OPT_FLAG="${OPT_FLAG} -c opt --copt=-mavx"
;;
MAVX_DBG)
OPT_FLAG="${OPT_FLAG} -c opt --copt=-g --copt=-mavx"
;;
MAVX2_FMA)
OPT_FLAG="${OPT_FLAG} -c opt --copt=-mavx2 --copt=-mfma"
;;
MAVX2_FMA_DBG)
OPT_FLAG="${OPT_FLAG} -c opt --copt=-g --copt=-mavx2 --copt=-mfma"
;;
esac
fi
# Strip whitespaces from OPT_FLAG
OPT_FLAG=$(str_strip "${OPT_FLAG}")
# 1) Filter out benchmark tests if this is not a benchmarks job;
# 2) Filter out tests with the "nomac" tag if the build is on Mac OS X.
EXTRA_ARGS=${DEFAULT_BAZEL_CONFIGS}
IS_MAC=0
if [[ "$(uname)" == "Darwin" ]]; then
IS_MAC=1
fi
if [[ "${TF_BUILD_APPEND_ARGUMENTS}" == *"--test_tag_filters="* ]]; then
ITEMS=(${TF_BUILD_APPEND_ARGUMENTS})
for ITEM in "${ITEMS[@]}"; do
if [[ ${ITEM} == *"--test_tag_filters="* ]]; then
NEW_ITEM="${ITEM}"
if [[ ${NEW_ITEM} != *"benchmark-test"* ]]; then
NEW_ITEM="${NEW_ITEM},-benchmark-test"
fi
if [[ ${IS_MAC} == "1" ]] && [[ ${NEW_ITEM} != *"nomac"* ]]; then
NEW_ITEM="${NEW_ITEM},-nomac"
fi
EXTRA_ARGS="${EXTRA_ARGS} ${NEW_ITEM}"
else
EXTRA_ARGS="${EXTRA_ARGS} ${ITEM}"
fi
done
else
EXTRA_ARGS="${EXTRA_ARGS} ${TF_BUILD_APPEND_ARGUMENTS} --test_tag_filters=-no_oss,-oss_serial,-benchmark-test"
if [[ ${IS_MAC} == "1" ]]; then
EXTRA_ARGS="${EXTRA_ARGS},-nomac"
fi
fi
# For any "tool" dependencies in genrules, Bazel will build them for host
# instead of the target configuration. We can save some build time by setting
# this flag, and it only affects a few tests.
EXTRA_ARGS="${EXTRA_ARGS} --distinct_host_configuration=false"
if [[ ! -z "${TF_BAZEL_BUILD_ONLY}" ]] &&
[[ "${TF_BAZEL_BUILD_ONLY}" != "0" ]];then
BAZEL_CMD=${BAZEL_BUILD_ONLY_CMD}
fi
# Process PIP install-test option
if [[ ${TF_BUILD_IS_PIP} == "no_pip" ]] ||
[[ ${TF_BUILD_IS_PIP} == "both" ]]; then
# Process optional bazel target override
if [[ ! -z "${TF_BUILD_BAZEL_TARGET}" ]]; then
BAZEL_TARGET=${TF_BUILD_BAZEL_TARGET}
fi
if [[ ${CTYPE} == cpu* ]] || \
[[ ${CTYPE} == "debian.jessie.cpu" ]]; then
# CPU only command, fully parallel.
NO_PIP_MAIN_CMD="${MAIN_CMD} ${BAZEL_CMD} ${OPT_FLAG} ${EXTRA_ARGS} -- "\
"${BAZEL_TARGET}"
elif [[ ${CTYPE} == gpu* ]]; then
# GPU only command, run as many jobs as the GPU count only.
NO_PIP_MAIN_CMD="${BAZEL_CMD} ${OPT_FLAG} "\
"--local_test_jobs=${TF_GPU_COUNT} "\
"--run_under=${PARALLEL_GPU_TEST_CMD} ${EXTRA_ARGS} -- ${BAZEL_TARGET}"
elif [[ ${CTYPE} == "android" ]]; then
# Run android specific script for android build.
NO_PIP_MAIN_CMD="${ANDROID_CMD} ${OPT_FLAG} "
elif [[ ${CTYPE} == "android_full" ]]; then
# Run android specific script for full android build.
NO_PIP_MAIN_CMD="${ANDROID_FULL_CMD} ${OPT_FLAG} "
fi
fi
if [[ ${TF_BUILD_IS_PIP} == "pip" ]] ||
[[ ${TF_BUILD_IS_PIP} == "both" ]]; then
# Android builds conflict with PIP builds
if [[ ${CTYPE} == "android" ]]; then
echo "Skipping parameter combination: ${TF_BUILD_IS_PIP} & "\
"${TF_BUILD_CONTAINER_TYPE}"
exit 0
fi
PIP_MAIN_CMD="${MAIN_CMD} ${PIP_CMD} ${CTYPE} ${EXTRA_ARGS} ${OPT_FLAG}"
# Add flag for integration tests
if [[ ! -z "${TF_BUILD_INTEGRATION_TESTS}" ]] &&
[[ "${TF_BUILD_INTEGRATION_TESTS}" != "0" ]]; then
PIP_MAIN_CMD="${PIP_MAIN_CMD} ${PIP_INTEGRATION_TESTS_FLAG}"
fi
# Add command for tutorial test
if [[ ! -z "${TF_BUILD_TEST_TUTORIALS}" ]] &&
[[ "${TF_BUILD_TEST_TUTORIALS}" != "0" ]]; then
PIP_MAIN_CMD="${PIP_MAIN_CMD} ${PIP_TEST_TUTORIALS_FLAG}"
# Prepare data directory for tutorial tests
mkdir -p "${TUT_TEST_DATA_DIR}" ||
die "FAILED to create data directory for tutorial tests: "\
"${TUT_TEST_DATA_DIR}"
if [[ "${DO_DOCKER}" == "1" ]]; then
EXTRA_PARAMS="${EXTRA_PARAMS} -v ${TUT_TEST_DATA_DIR}:${TUT_TEST_DATA_DIR}"
fi
fi
fi
if [[ ${RUN_BENCHMARKS} == "1" ]]; then
MAIN_CMD="${BENCHMARK_CMD} ${OPT_FLAG}"
elif [[ ${TF_BUILD_IS_PIP} == "no_pip" ]]; then
MAIN_CMD="${NO_PIP_MAIN_CMD}"
elif [[ ${TF_BUILD_IS_PIP} == "pip" ]]; then
MAIN_CMD="${PIP_MAIN_CMD}"
elif [[ ${TF_BUILD_IS_PIP} == "both" ]]; then
MAIN_CMD="${NO_PIP_MAIN_CMD} && ${PIP_MAIN_CMD}"
else
die "Unrecognized value in TF_BUILD_IS_PIP: \"${TF_BUILD_IS_PIP}\""
fi
# Check if this is a tf_nightly build
if [[ "${TF_NIGHTLY}" == "1" ]]; then
EXTRA_PARAMS="${EXTRA_PARAMS} -e TF_NIGHTLY=1"
fi
# Process Python version
if [[ ${TF_BUILD_PYTHON_VERSION} == "python2" ]]; then
:
elif [[ ${TF_BUILD_PYTHON_VERSION} == "python3" || \
${TF_BUILD_PYTHON_VERSION} == "python3.4" || \
${TF_BUILD_PYTHON_VERSION} == "python3.5" || \
${TF_BUILD_PYTHON_VERSION} == "python3.6" ]]; then
# Supply proper environment variable to select Python 3
if [[ "${DO_DOCKER}" == "1" ]]; then
EXTRA_PARAMS="${EXTRA_PARAMS} -e CI_BUILD_PYTHON=${TF_BUILD_PYTHON_VERSION}"
else
# Determine the path to python3
PYTHON3_PATH=$(which "${TF_BUILD_PYTHON_VERSION}" | head -1)
if [[ -z "${PYTHON3_PATH}" ]]; then
die "ERROR: Failed to locate ${TF_BUILD_PYTHON_VERSION} binary on path"
else
echo "Found ${TF_BUILD_PYTHON_VERSION} binary at: ${PYTHON3_PATH}"
fi
export PYTHON_BIN_PATH="${PYTHON3_PATH}"
fi
else
die "Unrecognized value in TF_BUILD_PYTHON_VERSION: "\
"\"${TF_BUILD_PYTHON_VERSION}\""
fi
# Append additional Docker extra parameters
EXTRA_PARAMS="${EXTRA_PARAMS} ${TF_BUILD_APPEND_CI_DOCKER_EXTRA_PARAMS}"
# Finally, do a dry run or call the command
# The command, which may consist of multiple parts (e.g., in the case of
# TF_BUILD_SERIAL_TESTS=1), are written to a bash script, which is
# then called. The name of the script is randomized to make concurrent
# builds on the node possible.
TMP_SCRIPT="$(mktemp)_ci_parameterized_build.sh"
if [[ "${DO_DOCKER}" == "1" ]]; then
# Map the tmp script into the Docker container
EXTRA_PARAMS="${EXTRA_PARAMS} -v ${TMP_SCRIPT}:/tmp/tf_build.sh"
if [[ ! -z "${TF_BUILD_BAZEL_CLEAN}" ]] &&
[[ "${TF_BUILD_BAZEL_CLEAN}" != "0" ]] &&
[[ "${TF_BUILD_IS_PIP}" != "both" ]]; then
# For TF_BUILD_IS_PIP == both, "bazel clean" will have already
# been performed before the "bazel test" step
EXTRA_PARAMS="${EXTRA_PARAMS} -e TF_BUILD_BAZEL_CLEAN=1"
fi
EXTRA_PARAMS=$(str_strip "${EXTRA_PARAMS}")
echo "Exporting CI_DOCKER_EXTRA_PARAMS: ${EXTRA_PARAMS}"
export CI_DOCKER_EXTRA_PARAMS="${EXTRA_PARAMS}"
fi
# Write to the tmp script
echo "#!/usr/bin/env bash" > ${TMP_SCRIPT}
if [[ ! -z "${TF_BUILD_BAZEL_CLEAN}" ]] &&
[[ "${TF_BUILD_BAZEL_CLEAN}" != "0" ]]; then
echo ${BAZEL_CLEAN_CMD} >> ${TMP_SCRIPT}
fi
echo ${MAIN_CMD} >> ${TMP_SCRIPT}
echo "Executing final command (${TMP_SCRIPT})..."
echo "=========================================="
cat ${TMP_SCRIPT}
echo "=========================================="
echo ""
TMP_DIR=""
DOCKERFILE_FLAG=""
if [[ "${DO_DOCKER}" == "1" ]]; then
if [[ "${TF_BUILD_PYTHON_VERSION}" == "python3.5" ]] ||
[[ "${TF_BUILD_PYTHON_VERSION}" == "python3.6" ]]; then
# Modify Dockerfile for Python3.5 | Python3.6 build
TMP_DIR=$(mktemp -d)
echo "Docker build will occur in temporary directory: ${TMP_DIR}"
# Copy the files required for the docker build
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cp -r "${SCRIPT_DIR}/install" "${TMP_DIR}/install" || \
die "ERROR: Failed to copy directory ${SCRIPT_DIR}/install"
DOCKERFILE="${SCRIPT_DIR}/Dockerfile.${TF_BUILD_CONTAINER_TYPE}"
cp "${DOCKERFILE}" "${TMP_DIR}/" || \
die "ERROR: Failed to copy Dockerfile at ${DOCKERFILE}"
DOCKERFILE="${TMP_DIR}/Dockerfile.${TF_BUILD_CONTAINER_TYPE}"
# Replace a line in the Dockerfile
if sed -i \
"s/RUN \/install\/install_pip_packages.sh/RUN \/install\/install_${TF_BUILD_PYTHON_VERSION}_pip_packages.sh/g" \
"${DOCKERFILE}"
then
echo "Copied and modified Dockerfile for ${TF_BUILD_PYTHON_VERSION} build: ${DOCKERFILE}"
else
die "ERROR: Faild to copy and modify Dockerfile: ${DOCKERFILE}"
fi
DOCKERFILE_FLAG="--dockerfile ${DOCKERFILE}"
fi
fi
chmod +x ${TMP_SCRIPT}
# Map TF_BUILD container types to containers we actually have.
if [[ "${CTYPE}" == "android_full" ]]; then
CONTAINER="android"
else
CONTAINER=${CTYPE}
fi
FAILURE=0
if [[ ! -z "${TF_BUILD_DRY_RUN}" ]] && [[ ${TF_BUILD_DRY_RUN} != "0" ]]; then
# Do a dry run: just print the final command
echo "*** This is a DRY RUN ***"
else
# Actually run the command
if [[ "${DO_DOCKER}" == "1" ]]; then
${DOCKER_MAIN_CMD} ${CONTAINER} ${DOCKERFILE_FLAG} /tmp/tf_build.sh
else
${TMP_SCRIPT}
fi
if [[ $? != "0" ]]; then
FAILURE=1
fi
fi
[[ ${FAILURE} == "0" ]] && RESULT="SUCCESS" || RESULT="FAILURE"
rm -f ${TMP_SCRIPT}
END_TIME=$(date +'%s')
echo ""
echo "Parameterized build ends with ${RESULT} at: $(date) "\
"(Elapsed time: $((END_TIME - START_TIME)) s)"
# Clean up temporary directory if it exists
if [[ ! -z "${TMP_DIR}" ]]; then
echo "Cleaning up temporary directory: ${TMP_DIR}"
rm -rf "${TMP_DIR}"
fi
exit ${FAILURE}
|
ZhangXinNan/tensorflow
|
tensorflow/tools/ci_build/ci_parameterized_build.sh
|
Shell
|
apache-2.0
| 21,407
|
[
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
4372,
2615,
24234,
1001,
9385,
2355,
1996,
23435,
12314,
6048,
1012,
2035,
2916,
9235,
1012,
1001,
1001,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1001,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1001,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1001,
1001,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1001,
1001,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1001,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1001,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1001,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1001,
12546,
2104,
1996,
6105,
1012,
1001,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1001,
1001,
8192,
1024,
1001,
25022,
1035,
16381,
3550,
1035,
3857,
1012,
14021,
1001,
1001,
1996,
5896,
15470,
2015,
1996,
2206,
3223,
4044,
10857,
1024,
1001,
1056,
2546,
1035,
3857,
1035,
30524,
14246,
2226,
1064,
11924,
1064,
11924,
1035,
2440,
1007,
1001,
1056,
2546,
1035,
3857,
1035,
18750,
1035,
2544,
1024,
1006,
18750,
2475,
1064,
18750,
2509,
1064,
18750,
2509,
1012,
1019,
1007,
1001,
1056,
2546,
1035,
3857,
1035,
2003,
1035,
28315,
1024,
1006,
2053,
1035,
28315,
1064,
28315,
1064,
2119,
1007,
1001,
1001,
1996,
2917,
4044,
8023,
2003,
3223,
1010,
2021,
2097,
2022,
2139,
28139,
12921,
2362,
1001,
2007,
1056,
2546,
1035,
3857,
1035,
5003,
2615,
2595,
1998,
2119,
2097,
2022,
2999,
2011,
1056,
2546,
1035,
3857,
1035,
7047,
1012,
1001,
1056,
2546,
1035,
3857,
1035,
2003,
1035,
23569,
1024,
1006,
2053,
1035,
23569,
1064,
23569,
1007,
1001,
1001,
3602,
1024,
1001,
1015,
1007,
3056,
14930,
1997,
16381,
5300,
2024,
5240,
1001,
2004,
19528,
1998,
2097,
3426,
1996,
5896,
2000,
6164,
2007,
3642,
1014,
1012,
2005,
2742,
1024,
1001,
2053,
1035,
23569,
1004,
28315,
1006,
28315,
16473,
2323,
2467,
2224,
23569,
1007,
1001,
11924,
1004,
28315,
1006,
11924,
1998,
28315,
16473,
2024,
20271,
7262,
1007,
1001,
1001,
1016,
1007,
1056,
2546,
1035,
3857,
1035,
18750,
1035,
2544,
2003,
2275,
2000,
18750,
2509,
1010,
1996,
3857,
2097,
2224,
1996,
2544,
1001,
4197,
2000,
2011,
1000,
2029,
18750,
2509,
1000,
2006,
1996,
2291,
1010,
2029,
2003,
4050,
18750,
2509,
1012,
1018,
1012,
2000,
1001,
3857,
2005,
18750,
2509,
1012,
1019,
1010,
2275,
1996,
4044,
8023,
2000,
18750,
2509,
1012,
1019,
1001,
1001,
1001,
5678,
1010,
1996,
5896,
30523,
11661,
1035,
2828,
1024,
1006,
17368,
1064,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
11661,
1035,
2828,
1024,
1006,
17368,
1064,
30526
] |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `parse_declared` fn in crate `style`.">
<meta name="keywords" content="rust, rustlang, rust-lang, parse_declared">
<title>style::properties::longhands::direction::parse_declared - Rust</title>
<link rel="stylesheet" type="text/css" href="../../../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../../../main.css">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'><a href='../../../index.html'>style</a>::<wbr><a href='../../index.html'>properties</a>::<wbr><a href='../index.html'>longhands</a>::<wbr><a href='index.html'>direction</a></p><script>window.sidebarCurrent = {name: 'parse_declared', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content fn">
<h1 class='fqn'><span class='in-band'>Function <a href='../../../index.html'>style</a>::<wbr><a href='../../index.html'>properties</a>::<wbr><a href='../index.html'>longhands</a>::<wbr><a href='index.html'>direction</a>::<wbr><a class='fn' href=''>parse_declared</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>−</span>]
</a>
</span><a id='src-22361' class='srclink' href='../../../../src/style/home/servo/buildbot/slave/doc/build/target/debug/build/style-9c4aa7d9dd75bd7f/out/properties.rs.html#12336-12364' title='goto source code'>[src]</a></span></h1>
<pre class='rust fn'>pub fn parse_declared(context: &<a class='struct' href='../../../../style/parser/struct.ParserContext.html' title='style::parser::ParserContext'>ParserContext</a>, input: &mut <a class='struct' href='../../../../cssparser/parser/struct.Parser.html' title='cssparser::parser::Parser'>Parser</a>) -> <a class='enum' href='../../../../core/result/enum.Result.html' title='core::result::Result'>Result</a><<a class='enum' href='../../../../style/properties/enum.DeclaredValue.html' title='style::properties::DeclaredValue'>DeclaredValue</a><<a class='enum' href='../../../../style/properties/longhands/direction/computed_value/enum.T.html' title='style::properties::longhands::direction::computed_value::T'>SpecifiedValue</a>>, <a class='primitive' href='../../../../std/primitive.tuple.html'>()</a>></pre></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
<dt>+</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../../../";
window.currentCrate = "style";
window.playgroundUrl = "";
</script>
<script src="../../../../jquery.js"></script>
<script src="../../../../main.js"></script>
<script defer src="../../../../search-index.js"></script>
</body>
</html>
|
servo/doc.servo.org
|
style/properties/longhands/direction/fn.parse_declared.html
|
HTML
|
mpl-2.0
| 5,251
|
[
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
11374,
1027,
1000,
4372,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
3193,
6442,
1000,
4180,
1027,
1000,
9381,
1027,
5080,
1011,
9381,
1010,
3988,
1011,
4094,
1027,
1015,
1012,
1014,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
13103,
1000,
4180,
1027,
1000,
18399,
3527,
2278,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
6412,
1000,
4180,
1027,
1000,
17928,
12653,
2005,
1996,
18399,
1036,
11968,
3366,
1035,
4161,
1036,
1042,
2078,
1999,
27297,
1036,
2806,
1036,
1012,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
3145,
22104,
1000,
4180,
1027,
1000,
18399,
1010,
18399,
25023,
1010,
18399,
1011,
11374,
1010,
11968,
3366,
1035,
4161,
1000,
1028,
1026,
2516,
1028,
2806,
1024,
1024,
5144,
1024,
1024,
2146,
11774,
2015,
1024,
1024,
3257,
1024,
1024,
11968,
3366,
1035,
4161,
1011,
18399,
1026,
1013,
2516,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
18399,
3527,
2278,
1012,
20116,
2015,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
2364,
1012,
20116,
2015,
1000,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
2465,
1027,
1000,
18399,
3527,
2278,
1000,
1028,
1026,
999,
1011,
1011,
1031,
2065,
8318,
2063,
29464,
1022,
1033,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
5432,
1000,
1028,
2023,
2214,
16602,
2003,
4895,
6342,
9397,
15613,
1998,
2097,
2087,
3497,
4653,
24151,
2477,
1012,
1026,
1013,
4487,
2615,
1028,
1026,
999,
1031,
2203,
10128,
1033,
1011,
1011,
1028,
1026,
6583,
2615,
2465,
1027,
1000,
2217,
8237,
1000,
1028,
1026,
1052,
2465,
1027,
1005,
3295,
1005,
1028,
1026,
1037,
17850,
12879,
1027,
1005,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
5950,
1012,
16129,
1005,
1028,
2806,
1026,
1013,
1037,
1028,
1024,
1024,
1026,
25610,
2099,
1028,
1026,
1037,
17850,
12879,
1027,
1005,
1012,
1012,
1013,
1012,
1012,
1013,
5950,
1012,
16129,
1005,
1028,
5144,
1026,
1013,
1037,
1028,
1024,
1024,
1026,
25610,
2099,
1028,
1026,
1037,
17850,
12879,
1027,
1005,
1012,
1012,
1013,
5950,
30524,
1027,
1063,
2171,
1024,
1005,
11968,
3366,
1035,
4161,
1005,
1010,
5939,
1024,
1005,
1042,
2078,
1005,
1010,
2128,
14277,
8988,
1024,
1005,
1005,
1065,
1025,
1026,
1013,
5896,
1028,
1026,
5896,
13366,
2121,
5034,
2278,
1027,
1000,
2217,
8237,
1011,
5167,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
1013,
6583,
2615,
1028,
1026,
6583,
2615,
2465,
1027,
1000,
4942,
30523,
1012,
16129,
1005,
1028,
2146,
11774,
2015,
1026,
1013,
1037,
1028,
1024,
1024,
1026,
25610,
2099,
1028,
1026,
1037,
17850,
12879,
1027,
1005,
5950,
1012,
16129,
1005,
1028,
3257,
1026,
1013,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,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1012,
16129,
1005,
1028,
2146,
11774,
2015,
1026,
1013,
1037,
1028,
1024,
1024,
1026,
25610,
2099,
1028,
1026,
1037,
17850,
12879,
1027,
1005,
5950,
1012,
16129,
1005,
1028,
3257,
1026,
1013,
1037,
1028,
1026,
1013,
1052,
1028,
1026,
5896,
1028,
3332,
1012,
2217,
8237,
10841,
14343,
3372,
30526
] |
module NetuitiveRailsAgent
class NetuitiveLoggerTest < Test::Unit::TestCase
def self.prepare
NetuitiveRailsAgent::ConfigManager.load_config
end
def test_format_age
age = NetuitiveRailsAgent::NetuitiveLogger.format_age('weekly')
assert_equal(age, 'weekly')
age = NetuitiveRailsAgent::NetuitiveLogger.format_age(nil)
assert_equal(age, 'daily')
age = NetuitiveRailsAgent::NetuitiveLogger.format_age(10)
assert_equal(age, 10)
age = NetuitiveRailsAgent::NetuitiveLogger.format_age('10')
assert_equal(age, 10)
end
def test_format_size
size = NetuitiveRailsAgent::NetuitiveLogger.format_size('weekly')
assert_equal(size, 'weekly')
size = NetuitiveRailsAgent::NetuitiveLogger.format_size(nil)
assert_equal(size, 1_000_000)
size = NetuitiveRailsAgent::NetuitiveLogger.format_size(10)
assert_equal(size, 10)
size = NetuitiveRailsAgent::NetuitiveLogger.format_size('10')
assert_equal(size, 10)
end
end
end
|
Netuitive/netuitive_rails_agent
|
test/test_netuitive_logger.rb
|
Ruby
|
apache-2.0
| 1,027
|
[
30522,
11336,
5658,
14663,
16402,
12502,
3736,
11461,
2465,
5658,
14663,
3512,
21197,
4590,
22199,
1026,
3231,
1024,
1024,
3131,
1024,
1024,
3231,
18382,
13366,
2969,
1012,
7374,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
9530,
8873,
25494,
17325,
1012,
7170,
1035,
9530,
8873,
2290,
2203,
13366,
3231,
1035,
4289,
1035,
2287,
2287,
1027,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
5658,
14663,
3512,
21197,
4590,
1012,
4289,
1035,
2287,
1006,
1005,
4882,
1005,
1007,
20865,
1035,
5020,
1006,
2287,
1010,
1005,
4882,
1005,
1007,
2287,
1027,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
5658,
14663,
3512,
21197,
4590,
1012,
4289,
1035,
2287,
1006,
9152,
2140,
1007,
20865,
1035,
5020,
1006,
2287,
1010,
1005,
3679,
1005,
1007,
2287,
1027,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
5658,
14663,
3512,
21197,
4590,
1012,
4289,
1035,
2287,
1006,
2184,
1007,
20865,
1035,
5020,
1006,
2287,
1010,
2184,
1007,
2287,
1027,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
5658,
14663,
3512,
21197,
4590,
1012,
4289,
1035,
2287,
1006,
1005,
2184,
1005,
1007,
20865,
1035,
5020,
1006,
2287,
1010,
2184,
1007,
2203,
13366,
3231,
1035,
4289,
1035,
2946,
2946,
1027,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
5658,
14663,
3512,
21197,
4590,
1012,
4289,
1035,
2946,
1006,
1005,
4882,
1005,
1007,
20865,
1035,
5020,
1006,
2946,
1010,
1005,
4882,
1005,
1007,
2946,
1027,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
5658,
14663,
3512,
21197,
4590,
1012,
4289,
1035,
2946,
1006,
9152,
2140,
1007,
20865,
1035,
5020,
1006,
2946,
1010,
1015,
1035,
2199,
1035,
2199,
1007,
2946,
1027,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
5658,
14663,
3512,
21197,
4590,
1012,
4289,
1035,
2946,
1006,
2184,
1007,
20865,
1035,
5020,
1006,
2946,
1010,
2184,
1007,
2946,
1027,
5658,
14663,
16402,
12502,
3736,
11461,
1024,
1024,
5658,
14663,
3512,
21197,
4590,
1012,
4289,
1035,
2946,
1006,
1005,
2184,
1005,
1007,
20865,
1035,
5020,
1006,
2946,
1010,
2184,
1007,
2203,
2203,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.