text:
/* Requires: normalize.css */
/* Global Reset & Standards ---------------------- */
*, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }

html { font-size: 62.5%; }

body {font-weight: normal; font-style: normal; font-size: 14px; line-height: 1.4; color: #222222; position: relative; -webkit-font-smoothing: antialiased; }

/* Links ---------------------- */
a img { border: none; }

a { color: #2ba6cb; text-decoration: none; line-height: inherit; }

a:hover { color: #2795b6; }

a:focus { color: #2795b6; }

p a, p a:visited { line-height: inherit; }

/* Misc ---------------------- */
.left { float: left; }

.right { float: right; }

.text-left { text-align: left; }

.text-right { text-align: right; }

.text-center { text-align: center; }

.hide { display: none; }

.hide-override { display: none !important; }

.highlight { background: #ffff99; }

#googlemap img, object, embed { max-width: none; }

#map_canvas embed { max-width: none; }

#map_canvas img { max-width: none; }

#map_canvas object { max-width: none; }

/* Reset for strange margins by default on <figure> elements */
figure { margin: 0; }

/* Base Type Styles Using Modular Scale ---------------------- */
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 14px; direction: ltr; }

p { font-family: inherit; font-weight: normal; font-size: 14px; line-height: 1.6; margin-bottom: 17px; }
p.lead { font-size: 17.5px; line-height: 1.6; margin-bottom: 17px; }

aside p { font-size: 13px; line-height: 1.35; font-style: italic; }

h1, h2, h3, h4, h5, h6 { font-family: Arial, sans-serif; font-weight: bold; font-style: normal; color: #222222; text-rendering: optimizeLegibility; line-height: 1.1; margin-bottom: 14px; margin-top: 14px; }
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-size: 60%; color: #6f6f6f; line-height: 0; }

h1 { font-size: 28px; }

h2 { font-size: 22px; }

h3 { font-size: 20px; }

h4 { font-size: 18px; }

h5 { font-size: 16px; }

h6 { font-size: 14px; }

hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 22px 0 21px; height: 0; }

.subheader { line-height: 1.3; color: #6f6f6f; font-weight: 300; margin-bottom: 17px; }

em, i { font-style: italic; line-height: inherit; }

strong, b { font-weight: bold; line-height: inherit; }

small { font-size: 60%; line-height: inherit; }

code { font-weight: bold; background: #ffff99; }

/* Lists ---------------------- */
ul, ol, dl { font-size: 14px; line-height: 1.6; margin-bottom: 17px; list-style-position: outside; }

ul li ul, ul li ol { margin-left: 20px; margin-bottom: 0; }
ul.square, ul.circle, ul.disc { margin-left: 17px; }
ul.square { list-style-type: square; }
ul.square li ul { list-style: inherit; }
ul.circle { list-style-type: circle; }
ul.circle li ul { list-style: inherit; }
ul.disc { list-style-type: disc; }
ul.disc li ul { list-style: inherit; }
ul.no-bullet { list-style: none; }
ul.large li { line-height: 21px; }

ol { margin-left: 20px; }
ol li ul, ol li ol { margin-left: 20px; margin-bottom: 0; }

/* Blockquotes ---------------------- */
blockquote, blockquote p { line-height: 1.5; color: #6f6f6f; }

blockquote { margin: 0 0 17px; padding: 9px 20px 0 19px; border-left: 1px solid #ddd; }
blockquote cite { display: block; font-size: 13px; color: #555555; }
blockquote cite:before { content: "\2014 \0020"; }
blockquote cite a, blockquote cite a:visited { color: #555555; }

abbr, acronym { text-transform: uppercase; font-size: 90%; color: #222222; border-bottom: 1px solid #ddd; cursor: help; }

abbr { text-transform: none; }

/* Print styles.  Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/ Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com)
*/
.print-only { display: none !important; }

@media print { * { background: transparent !important; color: black !important; box-shadow: none !important; text-shadow: none !important; filter: none !important; -ms-filter: none !important; }
  /* Black prints faster: h5bp.com/s */
  a, a:visited { text-decoration: underline; }
  a[href]:after { content: " (" attr(href) ")"; }
  abbr[title]:after { content: " (" attr(title) ")"; }
  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
  /* Don't show links for images, or javascript/internal links */
  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  thead { display: table-header-group; }
  /* h5bp.com/t */
  tr, img { page-break-inside: avoid; }
  img { max-width: 100% !important; }
  @page { margin: 0.5cm; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3 { page-break-after: avoid; }
  .hide-on-print { display: none !important; }
  .print-only { display: block !important; }
  .hide-for-print { display: none !important; }
  .show-for-print { display: inherit !important; } }
/* Requires globals.css */

/* Standard Forms ---------------------- */
form { margin: 0 0 19.41641px; }

.f-row form .f-row { margin: 0 -6px; }
.f-row form .f-row .column, .f-row form .f-row .columns { padding: 0 6px; }
.f-row form .f-row.collapse { margin: 0; }
.f-row form .f-row.collapse .column, .f-row form .f-row.collapse .columns { padding: 0; }

label { font-size: 14px; color: #4d4d4d; cursor: pointer; display: block; font-weight: 500; margin-bottom: 3px; }
label.right { float: none; text-align: right; }
label.inline { line-height: 32px; margin: 0 0 12px 0; }

.prefix, .postfix { display: block; position: relative; z-index: 2; text-align: center; width: 100%; padding-top: 0; padding-bottom: 0; height: 32px; line-height: 31px; }

a.button.prefix, a.button.postfix { padding-left: 0; padding-right: 0; text-align: center; }

span.prefix, span.postfix { background: #f2f2f2; border: 1px solid #cccccc; }

.prefix { left: 2px; -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; overflow: hidden; }

.postfix { right: 2px; -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; }

input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], textarea { background-color: white; font-family: inherit; border: 1px solid #cccccc; -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.75); font-size: 14px; margin: 0; padding: 6px; height: 26px; width: 100%; -webkit-transition: all 0.15s linear; -moz-transition: all 0.15s linear; -o-transition: all 0.15s linear; transition: all 0.15s linear; }
input[type="text"].oversize, input[type="password"].oversize, input[type="date"].oversize, input[type="datetime"].oversize, input[type="email"].oversize, input[type="number"].oversize, input[type="search"].oversize, input[type="tel"].oversize, input[type="time"].oversize, input[type="url"].oversize, textarea.oversize { font-size: 17px; padding: 4px 6px; }
input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, textarea:focus { background: #fafafa; border-color: #b3b3b3; }
input[type="text"][disabled], input[type="password"][disabled], input[type="date"][disabled], input[type="datetime"][disabled], input[type="email"][disabled], input[type="number"][disabled], input[type="search"][disabled], input[type="tel"][disabled], input[type="time"][disabled], input[type="url"][disabled], textarea[disabled] { background-color: #ddd; }

textarea { height: auto; }

select { width: 100%; }

/* Fieldsets */
fieldset { border: solid 1px #ddd; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; padding: 12px 12px 0; margin: 18px 0; }
fieldset legend { font-weight: bold; background: white; padding: 0 3px; margin: 0; margin-left: -3px; }

/* Errors */
.error input, input.error, .error textarea, textarea.error { border-color: #c60f13; background-color: rgba(198, 15, 19, 0.1); }

.error label, label.error { color: #c60f13; }

.error small, small.error { display: block; padding: 6px 4px; margin-top: -13px; margin-bottom: 12px; background: #c60f13; color: #fff; font-size: 12px; font-weight: bold; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; }

.error textarea:focus, textarea.error:focus { background: #fafafa; border-color: #b3b3b3; }

/* The Grid ---------------------- */
.f-row { width: 960px; margin: 0 auto; }
.f-row .f-row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.f-row.collapse .column, .f-row.collapse .columns { padding: 0; }
.f-row .f-row.collapse { margin: 0; }

.column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.column.centered, .columns.centered { float: none; margin: 0 auto; }

[class*="column"] + [class*="column"]:last-child { float: right;}

[class*="column"] + [class*="column"].end { float: left; }

.one, .f-row .one { width: 8.33333%; }

.two, .f-row .two { width: 16.66667%; }

.three, .f-row .three { width: 25%; }

.four, .f-row .four { width: 33.33333%; }

.five, .f-row .five { width: 41.66667%; }

.six, .f-row .six { width: 50%; }

.seven, .f-row .seven { width: 58.33333%; }

.eight, .f-row .eight { width: 66.66667%; }

.nine, .f-row .nine { width: 75%; }

.ten, .f-row .ten { width: 83.33333%; }

.eleven, .f-row .eleven { width: 91.66667%; }

.twelve, .f-row .twelve { width: 100%; }

.f-row .offset-by-one { margin-left: 8.33333%; }

.f-row .offset-by-two { margin-left: 16.66667%; }

.f-row .offset-by-three { margin-left: 25%; }

.f-row .offset-by-four { margin-left: 33.33333%; }

.f-row .offset-by-five { margin-left: 41.66667%; }

.f-row .offset-by-six { margin-left: 50%; }

.f-row .offset-by-seven { margin-left: 58.33333%; }

.f-row .offset-by-eight { margin-left: 66.66667%; }

.f-row .offset-by-nine { margin-left: 75%; }

.f-row .offset-by-ten { margin-left: 83.33333%; }

.push-two { left: 16.66667%; }

.pull-two { right: 16.66667%; }

.push-three { left: 25%; }

.pull-three { right: 25%; }

.push-four { left: 33.33333%; }

.pull-four { right: 33.33333%; }

.push-five { left: 41.66667%; }

.pull-five { right: 41.66667%; }

.push-six { left: 50%; }

.pull-six { right: 50%; }

.push-seven { left: 58.33333%; }

.pull-seven { right: 58.33333%; }

.push-eight { left: 66.66667%; }

.pull-eight { right: 66.66667%; }

.push-nine { left: 75%; }

.pull-nine { right: 75%; }

.push-ten { left: 83.33333%; }

.pull-ten { right: 83.33333%; }

img, object, embed { max-width: 100%; height: auto; }

object, embed { height: 100%; }

img { -ms-interpolation-mode: bicubic; }

#map_canvas img, .map_canvas img { max-width: none!important; }

/* Nicolas Gallagher's micro clearfix */
.f-row { *zoom: 1; }
.f-row:before, .f-row:after { content: " "; display: table; }
.f-row:after { clear: both; }

/* Block Grids ---------------------- */
/* These are 2-up, 3-up, 4-up and 5-up ULs, suited
for repeating blocks of content. Add 'mobile' to
them to switch them just like the layout grid
(one item per line) on phones

For IE7/8 compatibility block-grid items need to be
the same height. You can optionally uncomment the
lines below to support arbitrary height, but know
that IE7/8 do not support :nth-child.
-------------------------------------------------- */
.block-grid { display: block; overflow: hidden; padding: 0; }
.block-grid > li { display: block; height: auto; float: left; }
.block-grid.one-up { margin: 0; margin: 0 -8px; }
.block-grid.one-up > li { width: 100%; padding: 0 0 15px; padding: 0 8px 8px; }
.block-grid.two-up { margin: 0 -15px; margin: 0 -8px; }
.block-grid.two-up > li { width: 50%; padding: 0 15px 15px; padding: 0 8px 8px; }
.block-grid.two-up > li:nth-child(2n+1) { clear: both; }
.block-grid.three-up { margin: 0 -12px; margin: 0 -8px; }
.block-grid.three-up > li { width: 33.33333%; padding: 0 12px 12px; padding: 0 8px 8px; }
.block-grid.three-up > li:nth-child(3n+1) { clear: both; }
.block-grid.four-up { margin: 0 -10px; }
.block-grid.four-up > li { width: 25%; padding: 0 10px 10px; }
.block-grid.four-up > li:nth-child(4n+1) { clear: both; }
.block-grid.five-up { margin: 0 -8px; }
.block-grid.five-up > li { width: 20%; padding: 0 8px 8px; }
.block-grid.five-up > li:nth-child(5n+1) { clear: both; }
.block-grid.six-up { margin: 0 -8px; }
.block-grid.six-up > li { width: 16.66667%; padding: 0 8px 8px; }
.block-grid.six-up > li:nth-child(6n+1) { clear: both; }
.block-grid.seven-up { margin: 0 -8px; }
.block-grid.seven-up > li { width: 14.28571%; padding: 0 8px 8px; }
.block-grid.seven-up > li:nth-child(7n+1) { clear: both; }
.block-grid.eight-up { margin: 0 -8px; }
.block-grid.eight-up > li { width: 12.5%; padding: 0 8px 8px; }
.block-grid.eight-up > li:nth-child(8n+1) { clear: both; }
.block-grid.nine-up { margin: 0 -8px; }
.block-grid.nine-up > li { width: 11.11111%; padding: 0 8px 8px; }
.block-grid.nine-up > li:nth-child(9n+1) { clear: both; }
.block-grid.ten-up { margin: 0 -8px; }
.block-grid.ten-up > li { width: 10%; padding: 0 8px 8px; }
.block-grid.ten-up > li:nth-child(10n+1) { clear: both; }
.block-grid.eleven-up { margin: 0 -8px; }
.block-grid.eleven-up > li { width: 9.09091%; padding: 0 8px 8px; }
.block-grid.eleven-up > li:nth-child(11n+1) { clear: both; }
.block-grid.twelve-up { margin: 0 -8px; }
.block-grid.twelve-up > li { width: 8.33333%; padding: 0 8px 8px; }
.block-grid.twelve-up > li:nth-child(12n+1) { clear: both; }

/* Normal Buttons ---------------------- */
.button { width: auto; background: #2ba6cb; border: 1px solid #1e728c; -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; color: white; cursor: pointer; display: inline-block; font-family: inherit; font-size: 14px; font-weight: bold; line-height: 1; margin: 0; padding: 10px 20px 11px; position: relative; text-align: center; text-decoration: none; -webkit-transition: background-color 0.15s ease-in-out; -moz-transition: background-color 0.15s ease-in-out; -o-transition: background-color 0.15s ease-in-out; transition: background-color 0.15s ease-in-out; /* Hovers */ /* Sizes */ /* Colors */ /* Radii */ /* Layout */ /* Disabled ---------- */ }
.button:hover, .button:focus { color: white; background-color: #2284a1; }
.button:active { -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; }
.button.large { font-size: 17px; padding: 15px 30px 16px; }
.button.medium { font-size: 14px; }
.button.small { font-size: 11px; padding: 7px 14px 8px; }
.button.tiny { font-size: 10px; padding: 5px 10px 6px; }
.button.expand { width: 100%; text-align: center; }
.button.primary { background-color: #2ba6cb; border: 1px solid #1e728c; }
.button.primary:hover, .button.primary:focus { background-color: #2284a1; }
.button.success { background-color: #5da423; border: 1px solid #396516; }
.button.success:hover, .button.success:focus { background-color: #457a1a; }
.button.alert { background-color: #c60f13; border: 1px solid #7f0a0c; }
.button.alert:hover, .button.alert:focus { background-color: #970b0e; }
.button.secondary { background-color: #e9e9e9; color: #1d1d1d; border: 1px solid #c3c3c3; }
.button.secondary:hover, .button.secondary:focus { background-color: #d0d0d0; }
.button.radius { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
.button.round { -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; }
.button.full-width { width: 100%; text-align: center; padding-left: 0px !important; padding-right: 0px !important; }
.button.left-align { text-align: left; text-indent: 12px; }
.button.disabled, .button[disabled] { opacity: 0.6; cursor: default; background: #2ba6cb; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
.button.disabled :hover, .button[disabled] :hover { background: #2ba6cb; }
.button.disabled.success, .button[disabled].success { background-color: #5da423; }
.button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { background-color: #5da423; outline: none; }
.button.disabled.alert, .button[disabled].alert { background-color: #c60f13; }
.button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { background-color: #c60f13; outline: none; }
.button.disabled.secondary, .button[disabled].secondary { background-color: #e9e9e9; }
.button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { background-color: #e9e9e9; outline: none; }

/* Don't use native buttons on iOS */
input[type=submit].button, button.button { -webkit-appearance: none; }

/* Correct FF button padding */
@-moz-document url-prefix() { button::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner { border: none; padding: 0; }
  input[type="submit"].tiny.button { padding: 3px 10px 4px; }
  input[type="submit"].small.button { padding: 5px 14px 6px; }
  input[type="submit"].button, input[type=submit].medium.button { padding: 8px 20px 9px; }
  input[type="submit"].large.button { padding: 13px 30px 14px; } }

/* Table of Contents

:: Visibility
:: Alerts
:: Labels
:: Tooltips
:: Panels
:: Accordion
:: Side Nav
:: Sub Nav
:: Pagination
:: Breadcrumbs
:: Lists
:: Inline/Link Lists
:: Keystroke Chars
:: Image Thumbnails
:: Video
:: Tables
:: Microformats
:: Progress Bars
:: Pricing Tables

*/
/* Alerts ---------------------- */
div.alert-box { display: block; padding: 6px 7px 7px; font-weight: bold; font-size: 14px; color: white; background-color: #2ba6cb; border: 1px solid rgba(0, 0, 0, 0.1); margin-bottom: 12px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); position: relative; }
div.alert-box.success { background-color: #5da423; color: #fff; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); }
div.alert-box.alert { background-color: #c60f13; color: #fff; text-shadow: 0 -1px rgba(0, 0, 0, 0.3); }
div.alert-box.secondary { background-color: #e9e9e9; color: #505050; text-shadow: 0 1px rgba(255, 255, 255, 0.3); }
div.alert-box a.close { color: #333; position: absolute; right: 4px; top: -1px; font-size: 17px; opacity: 0.2; padding: 4px; }
div.alert-box a.close:hover, div.alert-box a.close:focus { opacity: 0.4; }

/* Labels ---------------------- */
.label { padding: 1px 4px 2px; font-size: 12px; font-weight: bold; text-align: center; text-decoration: none; line-height: 1; white-space: nowrap; display: inline; position: relative; bottom: 1px; color: #fff; background: #2ba6cb; }
.label.radius { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }
.label.round { padding: 1px 7px 2px; -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; }
.label.alert { background-color: #c60f13; }
.label.success { background-color: #5da423; }
.label.secondary { background-color: #e9e9e9; color: #505050; }

/* Panels ---------------------- */
.panel { background: #f2f2f2; border: solid 1px #e6e6e6; margin: 0 0 22px 0; padding: 20px; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel.callout { background: #2ba6cb; color: #fff; border-color: #2284a1; -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.5); }
.panel.callout a { color: #fff; }
.panel.callout .button { background: white; border: none; color: #2ba6cb; text-shadow: none; }
.panel.callout .button:hover, .panel.callout .button:focus { background: rgba(255, 255, 255, 0.8); }
.panel.radius { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; }

/* Side Nav ---------------------- */
ul.side-nav { display: block; list-style: none; margin: 0; padding: 17px 0; }
ul.side-nav li { display: block; list-style: none; margin: 0 0 7px 0; line-height:1.1; padding: 3px 0; }
ul.side-nav li a { display: block; }
ul.side-nav li.active a { color: #4d4d4d; font-weight: bold; }
ul.side-nav li.divider { border-top: 1px solid #e6e6e6; height: 0; padding: 0; }

/* Sub Navs http://www.zurb.com/article/292/how-to-create-simple-and-effective-sub-na ---------------------- */
dl.sub-nav { display: block; width: auto; overflow: hidden; margin: -4px 0 18px; margin-right: 0; margin-left: -9px; padding-top: 4px; }
dl.sub-nav dt, dl.sub-nav dd { float: left; display: inline; margin-left: 9px; margin-bottom: 10px; }
dl.sub-nav dt { color: #999; font-weight: normal; }
dl.sub-nav dd a { text-decoration: none; -webkit-border-radius: 1000px; -moz-border-radius: 1000px; -ms-border-radius: 1000px; -o-border-radius: 1000px; border-radius: 1000px; }
dl.sub-nav dd.active a { font-weight: bold; background: #2ba6cb; color: #fff; padding: 3px 9px; cursor: default; }

/* Pagination ---------------------- */
ul.pagination { display: block; height: 24px; margin-left: -5px; }
ul.pagination li { float: left; display: block; height: 24px; color: #999; font-size: 14px; margin-left: 5px; }
ul.pagination li a { display: block; padding: 1px 7px 1px; color: #555; }
ul.pagination li:hover a, ul.pagination li a:focus { background: #e6e6e6; }
ul.pagination li.unavailable a { cursor: default; color: #999; }
ul.pagination li.unavailable:hover a, ul.pagination li.unavailable a:focus { background: transparent; }
ul.pagination li.current a { background: #2ba6cb; color: white; font-weight: bold; cursor: default; }
ul.pagination li.current a:hover, ul.pagination li.current a:focus { background: #2ba6cb; }

/* Inline Link List */
ul.inline-list, ul.link-list { margin: 0 0 17px -22px; padding: 0; list-style: none; overflow: hidden; }
ul.inline-list > li, ul.link-list > li { list-style: none; float: left; margin-left: 22px; display: block; }
ul.inline-list > li > *, ul.link-list > li > * { display: block; }

/* Tables ----------------------
table { background: #fff; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; margin: 0 0 18px; border: 1px solid #ddd; }

table thead, table tfoot { background: #f5f5f5; }

table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { display: table-cell; font-size: 14px; line-height: 18px; text-align: left; }

table thead tr th, table tfoot tr td { padding: 8px 10px 9px; font-size: 14px; font-weight: bold; color: #222; }

table thead tr th:first-child, table tfoot tr td:first-child { border-left: none; }

table thead tr th:last-child, table tfoot tr td:last-child { border-right: none; }

table tbody tr.even, table tbody tr.alt { background: #f9f9f9; }

table tbody tr:nth-child(even) { background: #f9f9f9; }

table tbody tr td { color: #333; padding: 9px 10px; border: none; }
*/

/* Pricing Tables ---------------------- */
.pricing-table { border: solid 1px #dddddd; margin-left: 0; margin-bottom: 20px; }
.pricing-table * { list-style: none; line-height: 1; }
.pricing-table .title { background-color: #dddddd; padding: 15px 20px; text-align: center; color: #333333; font-weight: bold; font-size: 16px; }
.pricing-table .price { background-color: #eeeeee; padding: 15px 20px; text-align: center; color: #333333; font-weight: normal; font-size: 20px; }
.pricing-table .description { background-color: white; padding: 15px; text-align: center; color: #777777; font-size: 12px; font-weight: normal; line-height: 1.4; border-bottom: dotted 1px #dddddd; }
.pricing-table .bullet-item { background-color: white; padding: 15px; text-align: center; color: #333333; font-size: 14px; font-weight: normal; border-bottom: dotted 1px #dddddd; }
.pricing-table .cta-button { background-color: whitesmoke; text-align: center; padding: 20px; }


text:
source settings.sh

set -e

# Bazel's --build_python_zip replaces our carefully engineered symbolic links
# with copies.  This function puts the symbolic links back.
function fix_zip_file {
  orig_zip_file=$1

  # Step 1:  Copy the zip file to a temporary place.
  TMPDIR=$(mktemp -d -t tmp.XXXXXXXXXXX)
  # The .zip version of the binary doesn't have the header that makes it
  # self-executable.  We use that version because otherwise unzip would
  # complain and raise an error code.
  cp "${orig_zip_file}.zip" "${TMPDIR}"

  # Step 2: Unzip it.
  pushd "${TMPDIR}" > /dev/null
  BN=$(basename "${orig_zip_file}")
  unzip -qq "${BN}.zip"

  # Step 3: Restore the symbolic links.
  find "runfiles/com_google_deepvariant" -name '*.so' -exec ln --force -s --relative "runfiles/com_google_protobuf/python/google/protobuf/pyext/_message.so" {} \;

  # Step 4: Fix the __main__.py's use of zipfile, which can't handle
  # symbolic links.  Replace it with an invocation of unzip, which can.
  # The lines we replace are
  # with zipfile.ZipFile(zip_path) as zf:
  #   for info in zf.infolist():
  #     zf.extract(info, dest_dir)
  #     # UNC-prefixed paths must be absolute/normalized. See

  sed -i 's/  with zipfile.ZipFile(zip_path) as zf:/  if True:/' __main__.py
  sed -i 's/  for info in zf.infolist():/  if True:/' __main__.py
  sed -i 's/  zf.extract(info, dest_dir)/  os.system("unzip -qq " + zip_path + " -d " + dest_dir)/' __main__.py
  sed -i 's/  # UNC-prefixed paths must be absolute\/normalized. See/  return/' __main__.py

  # Step 5: Zip it back up, with zip --symbolic
  rm -f "${BN}.zip"
  ZIP_OUT="/tmp/${BN}.zip"
  rm -f "${ZIP_OUT}"
  zip -q --symlinks -r "${ZIP_OUT}" *

  # Step 6: Make the zip file self-executable
  SELF_ZIP="/tmp/${BN}"
  # If the Python interpreter discovers it is being run from part of a zip
  # file, it will uncompress and run the __main__.py.  This is the trick that
  # bazel uses to make a self-executable zip, see for example
  # https://github.com/bazelbuild/bazel/blob/558b717e906156477b1c6bd29d049a0fb8e18b27/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java#L193
  echo '#!/usr/bin/env python3' | cat - "${ZIP_OUT}" > "${SELF_ZIP}"

  # Step 7: Copy it back and make it executable.
  popd > /dev/null
  rm -f "${orig_zip_file}"
  mv "${SELF_ZIP}" "${orig_zip_file}"
  chmod +x "${orig_zip_file}"

  # Step 8: DeepVariant also uses "${orig_zip_file}.zip" in many of its
  # instructions, so make sure that we also copy that.
  rm -f "${orig_zip_file}.zip"
  mv "${ZIP_OUT}" "${orig_zip_file}.zip"
  # No executable bit because the .zip version is not self-executing and
  # must be invoked as
  #   python3 ${orig_zip_file}.zip
}

# shellcheck disable=SC2086
bazel build -c opt \
  --output_filter=DONT_MATCH_ANYTHING \
  --noshow_loading_progress \
  --show_result=0 \
  ${DV_COPT_FLAGS} \
  --build_python_zip \
  :binaries

# shellcheck disable=SC2086
bazel build -c opt \
  --output_filter=DONT_MATCH_ANYTHING \
  --noshow_loading_progress \
  --show_result=0 \
  ${DV_COPT_FLAGS} \
  --build_python_zip \
  :binaries-deeptrio

# shellcheck disable=SC2086
bazel build  -c opt \
  --output_filter=DONT_MATCH_ANYTHING \
  --noshow_loading_progress \
  --show_result=0 \
  --noshow_progress \
  ${DV_COPT_FLAGS} \
  :licenses_zip

# Bazel understandably doesn't like it when its output files are edited, so
# make sure all the builds are done before we fix things.

# TODO: Replace this hand-made list with a find command.
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/call_variants"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/call_variants_keras"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/make_examples"
fix_zip_file "bazel-out/k8-opt/bin/deeptrio/make_examples"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/model_eval"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/model_train"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/postprocess_variants"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/vcf_stats_report"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/show_examples"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/runtime_by_region_vis"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/multisample_make_examples"
fix_zip_file "bazel-out/k8-opt/bin/deepvariant/freeze_graph"

redpajama_set_name: RedPajamaGithub


text:
#region License(Apache Version 2.0)

#endregion
#region ChangeLog
/******************************************
 * 2017-10-7 OutMan Create
 *
 * ***************************************/
#endregion
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Reflection;

namespace WitsWay.Utilities.Web.Extends
{
    /// <summary>
    /// 字符串扩展
    /// </summary>
    public static class CookieContainerExtends
    {
        /// <summary>
        /// 遍历Cookie容器
        /// </summary>
        /// <param name="cookieContainer">Cookie容器</param>
        /// <returns></returns>
        public static List<Cookie> GetAllCookies(this CookieContainer cookieContainer)
        {
            var cookies = new List<Cookie>();
            var table = (Hashtable)cookieContainer.GetType().InvokeMember("m_domainTable", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance, null, cookieContainer, new object[] { });
            foreach (var pathList in table.Values)
            {
                var cookieList = (SortedList)pathList.GetType().InvokeMember("m_list", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance, null, pathList, new object[] { });
                foreach (CookieCollection colCookies in cookieList.Values)
                {
                    foreach (Cookie cookie in colCookies) { cookies.Add(cookie); }
                }
            }
            return cookies;
        }
    }

}


text:
import { __decorate, __metadata } from "tslib";
import * as au from "../aurelia";
let ValidationContainer = class ValidationContainer {
    constructor(element, coloursService) {
        this.element = element;
        this.coloursService = coloursService;
        this.validateResults = [];
        this.mdUnrenderValidateResults = (results, renderer) => {
            this.validateResults = this.validateResults.filter(x => !results.find(y => y.id === x.id));
            this.validationClass = undefined;
        };
        this.mdRenderValidateResults = (results, renderer) => {
            this.validateResults.push(...results.filter(x => !x.valid));
            let invalid = results.find(x => !x.valid);
            if (invalid || this.showSuccess) {
                this.validationClass = invalid ? "invalid" : "valid";
            }
        };
    }
    attached() {
        this.validateResults = [];
        this.validationClass = undefined;
        this.element.mdUnrenderValidateResults = this.mdUnrenderValidateResults;
        this.element.mdRenderValidateResults = this.mdRenderValidateResults;
    }
};
__decorate([
    au.ato.bindable.booleanMd,
    __metadata("design:type", Boolean)
], ValidationContainer.prototype, "showSuccess", void 0);
ValidationContainer = __decorate([
    au.customElement("validation-container"),
    __metadata("design:paramtypes", [Element, au.MdColorsService])
], ValidationContainer);
export { ValidationContainer };
//# sourceMappingURL=validation-container.js.map


text:
/* global Ext */
/*
 * version  2.1
 * author Doug Hendricks. doug[always-At]theactivegroup.com
 * Copyright 2007-2009, Active Group, Inc.  All rights reserved.
 *
 ************************************************************************************
 *   This file is distributed on an AS IS BASIS WITHOUT ANY WARRANTY;
 *   without even the implied warranty of MERCHANTABILITY or
 *   FITNESS FOR A PARTICULAR PURPOSE.
 ************************************************************************************

 License: ux.Media.Flash classes are licensed under the terms of
 the Open Source GPL 3.0 license (details: http://www.gnu.org/licenses/gpl.html).

 Commercial use is prohibited without a Commercial License. See http://licensing.theactivegroup.com.

 Donations are welcomed: http://donate.theactivegroup.com

 Notes: the <embed> tag is NOT used(or necessary) in this implementation

 Version:
        2.1
           Addresses the Flash visibility/re-initialization issues for all browsers.
           Adds bi-directional fscommand support for all A-Grade browsers.
           Adds ExternalInterface Binding support with optional externalsNamespace support

        Rc1
           Adds inline media rendering within markup:

           New extensible classes :
              ux.Media.Flash
              ux.FlashComponent
              ux.FlashPanel
              ux.FlashWindow

   A custom implementation for advanced Flash object interaction
       Supports:
            version detection,
            version assertion,
            Flash Express Installation (inplace version upgrades),
            and custom Event Sync for interaction with SWF.ActionScript.

    mediaCfg: {Object}
         {
           url       : Url resource to load when rendered
          ,loop      : (true/false)
          ,start     : (true/false)
          ,height    : (defaults 100%)
          ,width     : (defaults 100%)
          ,scripting : (true/false) (@macro enabled)
          ,controls  : optional: show plugins control menu (true/false)
          ,eventSynch: (Bool) If true, this class initializes an internal event Handler for
                       ActionScript event synchronization
          ,listeners  : {"mouseover": function() {}, .... } DOM listeners to set on the media object each time the Media is rendered.
          ,requiredVersion: (String,Array,Number) If specified, used in version detection.
          ,unsupportedText: (String,DomHelper cfg) Text to render if plugin is not installed/available.
          ,installUrl:(string) Url to inline SWFInstaller, if specified activates inline Express Install.
          ,installRedirect : (string) optional post install redirect
          ,installDescriptor: (Object) optional Install descriptor config
         }
    */

(function(){

   var ux = Ext.ux.Media;
    /**
     *
     * @class Ext.ux.Media.Flash
     * @extends Ext.ux.Media
     * @author Doug Hendricks. doug[always-At]theactivegroup.com
     * @donate
     * @constructor
     * @version 2.1
     * @desc
     * Base Media Class for Flash objects. Used for rendering Flash Objects for use with inline markup.

    */

    Ext.ux.Media.Flash = Ext.extend( Ext.ux.Media, {

        varsName       :'flashVars',

       /**
        *
        * @cfg {String} externalsNamespace  Defines the namespace within the Flash class instance to hold
          references to Flash ExternalInterface methods.
If null, the namespace defaults to class instance (this) itself.
          If specified, the namespace is created when ExternalInterface bindings are created.

          with:   externalsNamespace : 'player', you would reference ExternalInterface methods as:
          @example
             this.player.Play();
        */
        externalsNamespace :  null,

        /** @private */
        mediaType: Ext.apply({
              tag      : 'object'
             ,cls      : 'x-media x-media-swf'
             ,type     : 'application/x-shockwave-flash'
             ,loop     : null
             ,style   : {'z-index':0}
             ,scripting: "sameDomain"
             ,start    : true
             ,unsupportedText : {cn:['The Adobe Flash Player{0}is required.',{tag:'br'},{tag:'a',cn:[{tag:'img',src:'http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif'}],href:'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash',target:'_flash'}]}
             ,params   : {
                  movie     : "@url"
                 ,play      : "@start"
                 ,loop      : "@loop"
                 ,menu      : "@controls"
                 ,quality   : "high"
                 ,bgcolor   : "#FFFFFF"
                 ,wmode     : "opaque"
                 ,allowscriptaccess : "@scripting"
                 ,allowfullscreen : false
                 ,allownetworking : 'all'
                }
             },Ext.isIE?
                    {classid :"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
                     codebase:"http" + ((Ext.isSecure) ? 's' : '') + "://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
                    }:
                    {data     : "@url"}),

        /** @private */
        getMediaType: function(){
             return this.mediaType;
        },

        /** @private
         * Remove the following characters to permit Flash ExternalInterface: +-/\*.
         */
        assertId : function(id, def){
             id || (id = def || Ext.id());
             return id.replace(/\+|-|\\|\/|\*/g,'');
         },

        /** @private
         *  (called once by the constructor)
         */
        initMedia : function(){

            ux.Flash.superclass.initMedia.call(this);

            var mc = Ext.apply({}, this.mediaCfg||{});
            var requiredVersion = (this.requiredVersion = mc.requiredVersion || this.requiredVersion|| false ) ;
            var hasFlash  = !!(this.playerVersion = this.detectFlashVersion());
            var hasRequired = hasFlash && (requiredVersion?this.assertVersion(requiredVersion):true);

            var unsupportedText = this.assert(mc.unsupportedText || this.unsupportedText || (this.getMediaType()||{}).unsupportedText,null);
            if(unsupportedText){
                 unsupportedText = Ext.DomHelper.markup(unsupportedText);
                 unsupportedText = mc.unsupportedText = String.format(unsupportedText,
                     (requiredVersion?' '+requiredVersion+' ':' '),
                     (this.playerVersion?' '+this.playerVersion+' ':' Not installed.'));
            }
            mc.mediaType = "SWF";

            if(!hasRequired ){
                this.autoMask = false;

                //Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
                var canInstall = hasFlash && this.assertVersion('6.0.65');
                if(canInstall && mc.installUrl){

                       mc =  mc.installDescriptor || {
                           mediaType  : 'SWF'
                            ,tag      : 'object'
                            ,cls      : 'x-media x-media-swf x-media-swfinstaller'
                            ,id       : 'SWFInstaller'
                            ,type     : 'application/x-shockwave-flash'
                            ,data     : "@url"
                            ,url              : this.prepareURL(mc.installUrl)
                            //The dimensions of playerProductInstall.swf must be at least 310 x 138 pixels,
                            ,width            : (/%$/.test(mc.width)) ? mc.width : ((parseInt(mc.width,10) || 0) < 310 ? 310 :mc.width)
                            ,height           : (/%$/.test(mc.height))? mc.height :((parseInt(mc.height,10) || 0) < 138 ? 138 :mc.height)
                            ,loop             : false
                            ,start            : true
                            ,unsupportedText  : unsupportedText
                            ,params:{
                                      quality          : "high"
                                     ,movie            : '@url'
                                     ,allowscriptacess : "always"
                                     ,wmode            : "opaque"
                                     ,align            : "middle"
                                     ,bgcolor          : "#3A6EA5"
                                     ,pluginspage      : mc.pluginsPage || this.pluginsPage || "http://www.adobe.com/go/getflashplayer"
                                   }
                        };
                        mc.params[this.varsName] = "MMredirectURL="+( mc.installRedirect || window.location)+
                                            "&MMplayerType="+(Ext.isIE?"ActiveX":"Plugin")+
                                            "&MMdoctitle="+(document.title = document.title.slice(0, 47) + " - Flash Player Installation");
                } else {
                    //Let superclass handle with unsupportedText property
                    mc.mediaType=null;
                }
            }

            /**
            *  Sets up a eventSynch between the ActionScript environment
            *  and converts it's events into native Ext events.
            *  When this config option is true, binds an ExternalInterface definition
            *  to the ux.Media.Flash class method Ext.ux.Media.Flash.eventSynch.
            *
            *  The default binding definition pass the following flashVars to the Flash object:
            *
            *  allowedDomain,
            *  elementID (the ID assigned to the DOM <object> )
            *  eventHandler (the globally accessible function name of the handler )
            *     the default implementation expects a call signature in the form:
            *
            *    ExternalInterface.call( 'eventHandler', elementID, eventString )

            *  For additional flexibility, your own eventSynch may be defined to match an existing
            *  ActionScript ExternalInterface definition.
            */

            if(mc.eventSynch){
                mc.params || (mc.params = {});
                var vars = mc.params[this.varsName] || (mc.params[this.varsName] = {});
                if(typeof vars === 'string'){ vars = Ext.urlDecode(vars,true); }
                var eventVars = (mc.eventSynch === true ? {
                         allowedDomain  : vars.allowedDomain || document.location.hostname
                        ,elementID      : mc.id || (mc.id = Ext.id())
                        ,eventHandler   : 'Ext.ux.Media.Flash.eventSynch'
                        }: mc.eventSynch );

                Ext.apply(mc.params,{
                     allowscriptaccess  : 'always'
                })[this.varsName] = Ext.applyIf(vars,eventVars);
            }

            this.bindExternals(mc.boundExternals);

            delete mc.requiredVersion;
            delete mc.installUrl;
            delete mc.installRedirect;
            delete mc.installDescriptor;
            delete mc.eventSynch;
            delete mc.boundExternals;

            this.mediaCfg = mc;

        },

        /**
        * Asserts the desired version against the installed Flash Object version.
        * @param {mixed} versionMap Acceptable parameter formats for versionMap:
        *
        *  '9.0.40' (string)

        *   9  or 9.1  (number)

        *   [9,0,43]  (array)
        *
        * @return {Boolean} true if the desired version is => installed version
        *  and false for all other conditions
        */
        assertVersion : function(versionMap){

            var compare;
            versionMap || (versionMap = []);

            if(Ext.isArray(versionMap)){
                compare = versionMap;
            } else {
                compare = String(versionMap).split('.');
            }
            compare = (compare.concat([0,0,0,0])).slice(0,3); //normalize

            var tpv;
            if(!(tpv = this.playerVersion || (this.playerVersion = this.detectFlashVersion()) )){ return false; }

            if (tpv.major > parseFloat(compare[0])) {
                        return true;
            } else if (tpv.major == parseFloat(compare[0])) {
                   if (tpv.minor > parseFloat(compare[1]))
                            {return true;}
                   else if (tpv.minor == parseFloat(compare[1])) {
                        if (tpv.rev >= parseFloat(compare[2])) { return true;}
                        }
                   }
            return false;
        },

       /**
        * Flash version detection function
        * @returns {Object} {major,minor,rev} version object or
        * false if Flash is not installed or detection failed.
        */
        detectFlashVersion : function(){
            if(ux.Flash.prototype.flashVersion ){
                return this.playerVersion = ux.Flash.prototype.flashVersion;
            }
            var version=false;
            var formatVersion = function(version){
              return version && !!version.length?
                {major:version[0] !== null? parseInt(version[0],10): 0
                ,minor:version[1] !== null? parseInt(version[1],10): 0
                ,rev  :version[2] !== null? parseInt(version[2],10): 0
                ,toString : function(){return this.major+'.'+this.minor+'.'+this.rev;}
                }:false;
            };
            var sfo= null;
            if(Ext.isIE){

                try{
                    sfo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
                }catch(e){
                    try {
                        sfo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                        version = [6,0,21];
                        // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this solution)
                        sfo.allowscriptaccess = "always";
                    } catch(ex) {
                        if(version && version[0] === 6)
                            {return formatVersion(version); }
                        }
                    try {
                        sfo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
                    } catch(ex1) {}
                }
                if (sfo) {
                    version = sfo.GetVariable("$version").split(" ")[1].split(",");
                }
             }else if(navigator.plugins && navigator.mimeTypes.length){
                sfo = navigator.plugins["Shockwave Flash"];
                if(sfo && sfo.description) {
                    version = sfo.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".");
                }
            }
            return (this.playerVersion = ux.Flash.prototype.flashVersion = formatVersion(version));

        }

        /** @private */
        ,onAfterMedia : function(ct){

              ux.Flash.superclass.onAfterMedia.apply(this,arguments);
              var mo;
              if(mo = this.mediaObject){

                  var id = mo.id;
                  if(Ext.isIE ){

                    //fscommand bindings
                    //implement a fsCommand event interface since its not supported on IE when writing innerHTML

                    if(!(Ext.query('script[for='+id+']').length)){
                      writeScript('var c;if(c=Ext.getCmp("'+this.id+'")){c.onfsCommand.apply(c,arguments);}',
                                  {event:"FSCommand", htmlFor:id});
                    }
                  }else{
                      window[id+'_DoFSCommand'] || (window[id+'_DoFSCommand']= this.onfsCommand.createDelegate(this));
                  }
              }
         },

        /** Remove (safely) an existing mediaObject from the Component.
         *
         */
        clearMedia  : function(){

           //de-register fscommand hooks
           if(this.mediaObject){
               var id = this.mediaObject.id;
               if(Ext.isIE){
                    Ext.select('script[for='+id+']',true).remove();
               } else {
                    window[id+'_DoFSCommand']= null;
                    delete window[id+'_DoFSCommand'];
               }
           }

           return ux.Flash.superclass.clearMedia.call(this) || this;

        },

        /**
         * Returns a reference to the embedded Flash object
         * @return {HTMLElement}
         */
        getSWFObject : function() {
            return this.getInterface();
        },

        /**
         * @private
         * fscommand handler
         * ref: http://www.northcode.com/blog.php/2007/09/11/FSCommand-and-getURL-Bug-in-Flash-Player-9
         */

        onfsCommand : function( command, args){

            if(this.events){
                this.fireEvent('fscommand', this, command ,args );
            }

        },

        /**
         * Use Flash's SetVariable method if available
         * @param {String} varName The named variable to set.
         * @param {Mixed} value The value to set.
         * @return {Boolean} Returns True if the operation was successful.
         *
         */

        setVariable : function(varName, value){
            var fo = this.getInterface();
            if(fo && 'SetVariable' in fo){
                fo.SetVariable(varName,value);
                return true;
            }
            fo = null;
            return false;

        },

       /** Use Flash's GetVariable method if available
        * @param {string} varName The named variable to retrieve.
        * @return {Mixed} returns 'undefined' if the function is not supported.
        */
        getVariable : function(varName ){
            var fo = this.getInterface();
            if(fo && 'GetVariable' in fo){
                return fo.GetVariable(varName );
            }
            fo = null;
            return undefined;

        },

        /** Helper method used to bind Flash ExternalInterface methods to a property on the ux.Flash Component level.

         * Note: ExternalInterface bindings are maintained on the{@link #Ext.ux.Media.Flash-externalsNamespace} property, not the DOM Element itself.
         *
This prevent potential corruption during Flash refreshes which may occur during DOM reflow or when the Flash object is not visible.
         * @param {String|Array} methods A single method name or Array of method names to bind.  Methods can be simple strings or objects of the form:

         * {name:'methodName', returnType:'javascript'}.  Methods defined as strings default to a 'javascript' returnType.
         * @example flashObj.bindExternals(['Play', 'Stop', 'Rewind', {name: 'GetPlayList', returnType : 'xml'} ]);
         * flashMediaObj.Play();
         */
        bindExternals : function(methods){

            if(methods && this.playerVersion.major >= 8){
                methods = new Array().concat(methods);
            }else{
                return;
            }

            var nameSpace = (typeof this.externalsNamespace == 'string' ?
                  this[this.externalsNamespace] || (this[this.externalsNamespace] = {} )
                     : this );

            Ext.each(methods,function(method){

               var m = method.name || method;
               var returnType = method.returnType || 'javascript';

                //Do not overwrite existing function with the same name.
               nameSpace[m] || (nameSpace[m] = function(){
                      return this.invoke.apply(this,[m, returnType].concat(Array.prototype.slice.call(arguments,0)));
               }.createDelegate(this));

            },this);
        },

        /** Invoke a Flash ExternalInterface method
         * @param {String} method Method Name to invoke
         * @param {Mixed} arguments (Optional)  (1-n) method arguments.
         * @return {Mixed} Result (if provided) or, 'undefined' if the method
         * is not defined by the External Interface
         */
        invoke   : function(method , returnType /* , optional arguments, .... */ ){

            var obj,r;

            if(method && (obj = this.getInterface()) && 'CallFunction' in obj ){
                var c = [
                    String.format('<invoke name="{0}" returntype="{1}">',method, returnType),
                    '<arguments>',
                    (Array.prototype.slice.call(arguments,2)).map(this._toXML, this).join(''),
                    '</arguments>',
                    '</invoke>'].join('');

                r = obj.CallFunction(c);

                typeof r === 'string' && returnType ==='javascript' && (r= Ext.decode(r));

            }
            return r;

        },

        /**
         * this function is designed to be used when a Flashplayer player object notifies the browser
         * if its initialization state
         */
        onFlashInit  :  function(){

            if(this.mediaMask && this.autoMask){this.mediaMask.hide();}
            this.fireEvent.defer(300,this,['flashinit',this, this.getInterface()]);

        },

        /**  Flash Specific Method to synthesize a mediaload event
         * @private
         */
        pollReadyState : function(cb, readyRE){
            var media;

            if(media= this.getInterface()){
                if(typeof media.PercentLoaded != 'undefined'){
                   var perc = media.PercentLoaded() ;

                   this.fireEvent( 'progress' ,this , this.getInterface(), perc) ;
                   if( perc = 100 ) { cb(); return; }
                }

                this._countPoll++ > this._maxPoll || arguments.callee.defer(10,this,arguments);

            }

         },

        /**
         * @private
         * Dispatches events received from the SWF object (when defined by the eventSynch mediaConfig option).
         *
         * @method _handleSWFEvent
         * @private
         */
        _handleSWFEvent: function(event)
        {
            var type = event.type||event||false;
            if(type){
                 if(this.events && !this.events[String(type)])
                     { this.addEvents(String(type));}

                 return this.fireEvent.apply(this, [String(type), this].concat(Array.prototype.slice.call(arguments,0)));
            }
        },

       _toXML    : function(value){

           var format = Ext.util.Format;
           var type = typeof value;
           if (type == "string") {
               return "<string>" + format.xmlEncode(value) + "</string>";}
           else if (type == "undefined")
              {return "<undefined/>";}
           else if (type == "number")
              {return "<number>" + value + "</number>";}
           else if (value == null)
              {return "<null/>";}
           else if (type == "boolean")
              {return value ? "<true/>" : "<false/>";}
           else if (value instanceof Date)
              {return "<date>" + value.getTime() + "</date>";}
           else if (Ext.isArray(value))
              {return this._arrayToXML(value);}
           else if (type == "object")
              {return this._objectToXML(value);}
           else {return "<null/>";}
         },

        _arrayToXML  : function(arrObj){

            var s = "<array>";
            for (var i = 0,l = arrObj.length ; i < l; i++) {
                s += "<property id=\"" + i + "\">" + this._toXML(arrObj[i]) + "</property>";
            }
            return s + "</array>";
        },

        _objectToXML  : function(obj){

            var s = "<object>";
            for (var prop in obj) {
                if(obj.hasOwnProperty(prop)){
                   s += "<property id=\"" + prop + "\">" + this._toXML(obj[prop]) + "</property>";
                }
              }
            return s + "</object>";

        }

    });

    /**
     Class Method to handle defined Flash interface events
     @memberOf Ext.ux.Media.Flash
    */
    Ext.ux.Media.Flash.eventSynch = function(elementID, event /* additional arguments optional */ ){
            var SWF = Ext.get(elementID), inst;
            if(SWF && (inst = SWF.ownerCt)){
                return inst._handleSWFEvent.apply(inst, Array.prototype.slice.call(arguments,1));
            }
        };

    var componentAdapter = {
       init         : function(){

          this.getId = function(){
              return this.id || (this.id = "flash-comp" + (++Ext.Component.AUTO_ID));
          };

          this.addEvents(

             /**
              * Fires when the Flash Object reports an initialized state via a public callback function.
              * @event flashinit
              * @memberOf Ext.ux.Media.Flash
              * @param {Ext.ux.Media.Flash} this Ext.ux.Media.Flash instance
              * @param {Element} SWFObject The Flash object DOM Element.
              *
              * this callback must implemented to be useful in raising this event.
              * @example
              * //YouTube Global ready handler
                var onYouTubePlayerReady = function(playerId) {

                    //Search for a ux.Flash-managed player.
                    var flashComp, el = Ext.get(playerId);
                    if(flashComp = (el?el.ownerCt:null)){
                       flashComp.onFlashInit();
                    }

                };
              */
              'flashinit',

             /**
              * Fires when the Flash Object issues an fscommand to the ux.Flash Component
              * @event fscommand
              * @memberOf Ext.ux.Media.Flash
              * @param {Ext.ux.Media.Flash} this Ext.ux.Media.Flash instance
              * @param {string} command The command string
              * @param {string} args The arguments string
              */
              'fscommand',

             /**
              * Fires indicating the load progress of the Flash Movie Object
              * @event progress
              * @memberOf Ext.ux.Media.Flash
              * @param {Ext.ux.Media.Flash} this Ext.ux.Media.Flash instance
              * @param {Element} SWFObject The Flash object DOM Element.
              * @param {Integer} percent The percentage of the Movie loaded.
             */
             'progress' );

        }

    };

     /**
      *
      * @class Ext.ux.Media.Flash.Component
      * @extends Ext.ux.Media.Component
      * @base Ext.ux.Media.Flash
      * @version  2.1
      * @author Doug Hendricks. doug[always-At]theactivegroup.com
      * @copyright 2007-2009, Active Group, Inc.  All rights reserved.
      * @donate
      * @license GPL 3.0
      * @constructor

      * @param {Object} config The config object
      * @desc
      * Base Media Class for Flash objects
      * Used primarily for rendering Flash Objects for use with inline markup.
    */
   Ext.ux.Media.Flash.Component = Ext.extend(Ext.ux.Media.Component, {
         /**
         * @private
         */
         ctype         : "Ext.ux.Media.Flash.Component",

        /**
         * @private
         */
         cls    : "x-media-flash-comp",

         /**
         * @private
         */
         autoEl  : {tag:'div',style : { overflow: 'hidden', display:'block'}},

        /**
         * @private
         * The className of the Media interface to inherit
         */
         mediaClass    : Ext.ux.Media.Flash,

        /** @private */
         initComponent   : function(){

            componentAdapter.init.apply(this,arguments);
            Ext.ux.Media.Flash.Component.superclass.initComponent.apply(this,arguments);

         }

   });

   Ext.reg('uxflash', Ext.ux.Media.Flash.Component);

   ux.Flash.prototype.detectFlashVersion();

   /**
     *
     * @class Ext.ux.Media.Flash.Panel
     * @extends Ext.ux.Media.Panel
     * @version 2.1
     * @author Doug Hendricks. doug[always-At]theactivegroup.com
     * @donate
     * @copyright 2007-2009, Active Group, Inc.  All rights reserved.
     * @constructor
     * @base Ext.ux.Media.Flash
     * @param {Object} config The config object
     * @desc
     * Base Media Class for Flash objects
     * Used primarily for rendering Flash Objects for use with inline markup.
    */

   Ext.ux.Media.Flash.Panel = Ext.extend(Ext.ux.Media.Panel,{

        ctype         : "Ext.ux.Media.Flash.Panel",

        mediaClass    : Ext.ux.Media.Flash,

        autoScroll    : false,

        /**
         * @cfg {Boolean} shadow Set to false to prevent DOM reflow when shadow is hidden/shown
         * @default false
         */
        shadow        : false,

        /** @private */
        initComponent   : function(){
            componentAdapter.init.apply(this,arguments);
            Ext.ux.Media.Flash.Panel.superclass.initComponent.apply(this,arguments);

       }

   });

   Ext.reg('flashpanel', ux.Flash.Panel);
   Ext.reg('uxflashpanel', ux.Flash.Panel);

   /**
    *
    * @class Ext.ux.Media.Flash.Portlet
    * @extends Ext.ux.Media.Portlet
    * @version  2.1
    * @donate
    * @author Doug Hendricks. doug[always-At]theactivegroup.com
    * @copyright 2007-2009, Active Group, Inc.  All rights reserved.
    * @desc
    * Base Media Class for Flash objects
    * Used primarily for rendering Flash Objects for use with inline markup.
    */

   Ext.ux.Media.Flash.Portlet = Ext.extend(Ext.ux.Media.Portlet,{
       ctype         : "Ext.ux.Media.Flash.Portlet",
       anchor       : '100%',
       frame        : true,
       collapseEl   : 'bwrap',
       collapsible  : true,
       draggable    : true,
       autoScroll    : false,
       autoWidth    : true,
       cls          : 'x-portlet x-flash-portlet',
       mediaClass    : Ext.ux.Media.Flash,
       /** @private */
       initComponent   : function(){
           componentAdapter.init.apply(this,arguments);
           Ext.ux.Media.Flash.Panel.superclass.initComponent.apply(this,arguments);

       }

   });

   Ext.reg('flashportlet', ux.Flash.Portlet);
   Ext.reg('uxflashportlet', ux.Flash.Portlet);

   /**
    *
    * @class Ext.ux.Media.Flash.Window
    * @extends Ext.ux.Media.Window
    * @version  2.1
    * @author Doug Hendricks. doug[always-At]theactivegroup.com
    * @donate
    * @copyright 2007-2009, Active Group, Inc.  All rights reserved.
    * @constructor
    * @base Ext.ux.Media.Flash
    * @param {Object} config The config object
    * @desc
    * Base Media Class for Flash objects
    * Used primarily for rendering Flash Objects for use with inline markup.
    */

   Ext.ux.Media.Flash.Window  = Ext.extend( Ext.ux.Media.Window , {

        ctype         : "Ext.ux.Media.Flash.Window",
        mediaClass    : Ext.ux.Media.Flash,

        autoScroll    : false,

        /**
         * @cfg {Boolean} shadow Set to false to prevent DOM reflow when shadow is hidden/shown
         * @default false
         */
        shadow        : false,

        /** @private */
        initComponent   : function(){
            componentAdapter.init.apply(this,arguments);
            Ext.ux.Media.Flash.Window.superclass.initComponent.apply(this,arguments);

       }

   });

   Ext.reg('flashwindow', ux.Flash.Window);

   /**
    *
    * @class Ext.ux.Media.Flash.Element
    * @extends Ext.ux.Media.Element
    * @version  2.1
    * @author Doug Hendricks. doug[always-At]theactivegroup.com
    * @donate
    * @copyright 2007-2009, Active Group, Inc.  All rights reserved.
    * @desc
    * Base Media Class for Flash objects
    * Used primarily for rendering Flash Objects for use with inline markup.
    */

   Ext.ux.Media.Flash.Element = Ext.extend ( Ext.ux.Media.Element , {

        /**
         * Removes this Flash element from the DOM and deletes it from the cache.  For Flash objects,
         * this requires special treatment to prevent Memory leakage (for IE).
         * @param {Boolean} cleanse (optional) Perform a cleanse of immediate childNodes as well.
         * @param {Boolean} deep (optional) Perform a deep cleanse of all nested childNodes as well.
         */

       remove : function(){

             var d ;
             // Fix streaming media troubles for IE
             // IE has issues with loose references when removing an <object>
             // before the onload event fires (all <object>s should have readyState == 4 after browsers onload)

             // Advice: do not attempt to remove the Component before onload has fired on IE/Win.

            if(Ext.isIE && Ext.isWindows && (d = this.dom)){

                this.removeAllListeners();
                d.style.display = 'none'; //hide it regardless of state
                if(d.readyState == 4){
                    for (var x in d) {
                        if (x.toLowerCase() != 'flashvars' && typeof d[x] == 'function') {
                            d[x] = null;
                        }
                    }
                }

             }

             Ext.ux.Media.Flash.Element.superclass.remove.apply(this, arguments);

         }

   });

   Ext.ux.Media.Flash.prototype.elementClass  =  Ext.ux.Media.Flash.Element;

   var writeScript = function(block, attributes) {
        attributes = Ext.apply({},attributes||{},{type :"text/javascript",text:block});

         try{
            var head,script, doc= document;
            if(doc && doc.getElementsByTagName){
                if(!(head = doc.getElementsByTagName("head")[0] )){

                    head =doc.createElement("head");
                    doc.getElementsByTagName("html")[0].appendChild(head);
                }
                if(head && (script = doc.createElement("script"))){
                    for(var attrib in attributes){
                          if(attributes.hasOwnProperty(attrib) && attrib in script){
                              script[attrib] = attributes[attrib];
                          }
                    }
                    return !!head.appendChild(script);
                }
            }
         }catch(ex){}
         return false;
    };

    /* This is likely unnecessary with this implementation, as Flash objects are removed as needed
     * during the clearMedia method, but included to cleanup inline flash markup.
     */
    if(Ext.isIE && Ext.isWindows && ux.Flash.prototype.flashVersion.major == 9) {

        window.attachEvent('onbeforeunload', function() {
              __flash_unloadHandler = __flash_savedUnloadHandler = function() {};
        });

        //Note: we cannot use IE's onbeforeunload event because an internal Flash Form-POST
        // raises the browsers onbeforeunload event when the server returns a response.  that is crazy!
        window.attachEvent('onunload', function() {

            Ext.each(Ext.query('.x-media-swf'), function(item, index) {
                item.style.display = 'none';
                for (var x in item) {
                    if (x.toLowerCase() != 'flashvars' && typeof item[x] == 'function') {
                        item[x] = null;
                    }
                }
            });
        });

    }

 Ext.apply(Ext.util.Format , {
       /**
         * Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.
         * @param {String} value The string to encode
         * @return {String} The encoded text
         */
        xmlEncode : function(value){
            return !value ? value : String(value)
                .replace(/&/g, "&")
                .replace(/>/g, ">")
                .replace(/</g, "<")
                .replace(/"/g, """)
                .replace(/'/g, "'");
        },

        /**
         * Convert certain characters (&, <, >, and ') from their HTML character equivalents.
         * @param {String} value The string to decode
         * @return {String} The decoded text
         */
        xmlDecode : function(value){
            return !value ? value : String(value)
                .replace(/>/g, ">")
                .replace(/</g, "<")
                .replace(/"/g, '"')
                .replace(/&/g, "&")
                .replace(/'/g, "'");

        }

    });

 Ext.ux.FlashComponent  = Ext.ux.Media.Flash.Component ;
 Ext.ux.FlashPanel      = Ext.ux.Media.Flash.Panel;
 Ext.ux.FlashPortlet    = Ext.ux.Media.Flash.Portlet;
 Ext.ux.FlashWindow     = Ext.ux.Media.Flash.Window;

})();


text:
* Extracts over 75 features from the csv file generated by PreProcessing code
* The csv file needs to be pre-sorted according to configuration in file sort_csv.py
#Usage

* python convo.py <file-name>  //file-name is input csv file
* python flow.py <file-name> //to extract feature set for flows


text:
#ifndef SHARED_H
#define SHARED_H 1

#include "transmission.h"

/***********************************************************************
 * tr_sharedInit, tr_sharedClose
 ***********************************************************************
 * Starts / stops a thread to handle running things that are shared
 * among the torrents: NAT-PMP/UPnP, incoming connections, peer choking
 **********************************************************************/
tr_shared_t * tr_sharedInit           ( tr_handle_t * );
void          tr_sharedClose          ( tr_shared_t * );

/***********************************************************************
 * tr_sharedLock, tr_sharedUnlock
 ***********************************************************************
 * Gets / releases exclusive access to ressources used by the shared
 * thread
 **********************************************************************/
void          tr_sharedLock           ( tr_shared_t * );
void          tr_sharedUnlock         ( tr_shared_t * );

/***********************************************************************
 * tr_sharedSetPort
 ***********************************************************************
 * Changes the port for incoming connections.  tr_sharedGetPublicPort
 * should be called with the shared lock held.
 **********************************************************************/
void         tr_sharedSetPort         ( tr_shared_t *, int port );
int          tr_sharedGetPublicPort   ( tr_shared_t * s );

/***********************************************************************
 * tr_sharedTraversalEnable, tr_sharedTraversalStatus
 ***********************************************************************
 * Enables/disables and retrieves the status of NAT traversal.  Should
 * be called with the shared lock held.
 **********************************************************************/
void         tr_sharedTraversalEnable ( tr_shared_t *, int enable );
int          tr_sharedTraversalStatus ( tr_shared_t * );

/***********************************************************************
 * tr_sharedSetLimit
 ***********************************************************************
 *
 **********************************************************************/
void         tr_sharedSetLimit        ( tr_shared_t *, int limit );

#endif


text:
package org.neo4j.cypher.internal.compiler.v2_3.docgen

import org.neo4j.cypher.internal.frontend.v2_3.perty.gen.{DocHandlerTestSuite, toStringDocGen}

class ToStringDocGenTest extends DocHandlerTestSuite[Any] {

  val docGen = toStringDocGen

  test("handles nulls") {
    pprintToString(null) should equal("null")
  }

  test("handles values") {
    pprintToString(1) should equal("1")
  }

  test("handles object instances") {
    object Test { override def toString = "surprise" }

    pprintToString(Test) should equal("surprise")
  }
}


text:
Test.describe("Basic tests")
Test.assert_equals(sale_hotdogs(0), 0)
Test.assert_equals(sale_hotdogs(1), 100)
Test.assert_equals(sale_hotdogs(2), 200)
Test.assert_equals(sale_hotdogs(3), 300)
Test.assert_equals(sale_hotdogs(4), 400)
Test.assert_equals(sale_hotdogs(5), 475)
Test.assert_equals(sale_hotdogs(9), 855)
Test.assert_equals(sale_hotdogs(10), 900)
Test.assert_equals(sale_hotdogs(11), 990)
Test.assert_equals(sale_hotdogs(100), 9000)


text:
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Blackbox.App where

------------------------------------------------------------------------------
import Prelude hiding (lookup)

------------------------------------------------------------------------------
import Control.Applicative
import Control.Lens
import Control.Monad.Trans
import Data.Maybe
import Data.Monoid
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.Configurator
import Snap.Core
import Snap.Util.FileServe

------------------------------------------------------------------------------
import Data.Map.Syntax ((##))
import Snap.Snaplet
import Snap.Snaplet.Heist
import qualified Snap.Snaplet.HeistNoClass as HNC
import Heist
import Heist.Interpreted

------------------------------------------------------------------------------
import Blackbox.Common
import Blackbox.BarSnaplet
import Blackbox.FooSnaplet
import Blackbox.EmbeddedSnaplet
import Blackbox.Types
import Snap.Snaplet.Session
import Snap.Snaplet.Session.Backends.CookieSession

                            --------------------
                            --  THE SNAPLET   --
                            --------------------

------------------------------------------------------------------------------
app :: SnapletInit App App
app = makeSnaplet "app" "Test application" Nothing $ do
    hs <- nestSnaplet "heist" heist $ heistInit "templates"
    fs <- nestSnaplet "foo" foo $ fooInit hs
    bs <- nestSnaplet "" bar $ nameSnaplet "baz" $ barInit hs foo
    sm <- nestSnaplet "session" session $
          initCookieSessionManager "sitekey.txt" "_session" (Just (30 * 60))
    ns <- embedSnaplet "embed" embedded embeddedInit
    _lens <- getLens
    addConfig hs $ mempty
        { hcInterpretedSplices = do
            "appsplice" ## textSplice "contents of the app splice"
            "appconfig" ## shConfigSplice _lens }
    addRoutes [ ("/hello", writeText "hello world")
              , ("/routeWithSplice", routeWithSplice)
              , ("/routeWithConfig", routeWithConfig)
              , ("/public", serveDirectory "public")
              , ("/sessionDemo", sessionDemo)
              , ("/sessionTest", sessionTest)
              ]
    wrapSite (<|> heistServe)
    return $ App hs (over snapletValue fooMod fs) bs sm ns

-------------------------------------------------------------------------------
routeWithSplice :: Handler App App ()
routeWithSplice = do
    str <- with foo getFooField
    writeText $ T.pack $ "routeWithSplice: "++str

------------------------------------------------------------------------------
routeWithConfig :: Handler App App ()
routeWithConfig = do
    cfg <- getSnapletUserConfig
    val <- liftIO $ lookup cfg "topConfigField"
    writeText $ "routeWithConfig: " `T.append` fromJust val

------------------------------------------------------------------------------
sessionDemo :: Handler App App ()
sessionDemo = withSession session $ do
  with session $ do
    curVal <- getFromSession "foo"
    case curVal of
      Nothing -> setInSession "foo" "bar"
      Just _ -> return ()
  list <- with session $ (T.pack . show) `fmap` sessionToList
  csrf <- with session $ (T.pack . show) `fmap` csrfToken
  HNC.renderWithSplices heist "session" $ do
    "session" ## textSplice list
    "csrf" ## textSplice csrf

------------------------------------------------------------------------------
sessionTest :: Handler App App ()
sessionTest = withSession session $ do
  q <- getParam "q"
  val <- case q of
    Just x -> do
      let x' = T.decodeUtf8 x
      with session $ setInSession "test" x'
      return x'
    Nothing -> fromMaybe "" `fmap` with session (getFromSession "test")
  writeText val

fooMod :: FooSnaplet -> FooSnaplet
fooMod f = f { fooField = fooField f ++ "z" }


text:
package org.apache.hadoop.mapred;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

import java.io.IOException;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

/**
 * Used to expire files in cache that hasn't been accessed for a while
 */
public class ExpireUnusedFilesInCache extends Thread {
  /** Logger. */
  private static final Log LOG =
    LogFactory.getLog(ExpireUnusedFilesInCache.class);

  /** Configuration. */
  private final Configuration conf;
  /** Clock. */
  private final Clock clock;
  /** The directories to purge. */
  private final Path[] cachePath;
  /** The filesystem to use. */
  private final FileSystem fs;
  /** Expire threshold in milliseconds. */
  private final long expireCacheThreshold;
  /** Intervals to clear cache */
  private final long clearCacheInterval;

  /**
   * Constructor.
   * @param conf The configuration.
   * @param clock The clock.
   * @param systemDir The system directory.
   * @param fs The filesystem.
   */
  public ExpireUnusedFilesInCache(
    Configuration conf, Clock clock, Path systemDir) throws IOException {
    this.conf = conf;
    this.clock = clock;
    this.fs = systemDir.getFileSystem(conf);

    Path sharedPath = new Path(systemDir, JobSubmissionProtocol.CAR);
    sharedPath = sharedPath.makeQualified(fs);
    this.cachePath = new Path[3];
    this.cachePath[0] = new Path(sharedPath, "files");
    this.cachePath[1] = new Path(sharedPath, "archives");
    this.cachePath[2] = new Path(sharedPath, "libjars");

    clearCacheInterval = conf.getLong(
      "mapred.cache.shared.check_interval",
      24 * 60 * 60 * 1000);

    expireCacheThreshold =
      conf.getLong("mapred.cache.shared.expire_threshold",
        24 * 60 * 60 * 1000);

    setDaemon(true);
    LOG.info("ExpireUnusedFilesInCache created with " +
      " sharedPath = " + sharedPath +
      " clearCacheInterval = " + clearCacheInterval +
      " expireCacheThreshold = " + expireCacheThreshold);
  }

  @Override
  public void run() {
    while (true) {
      long currentTime = clock.getTime();

      for (int i = 0; i < cachePath.length; i++) {
        try {
          if (!fs.exists(cachePath[i])) continue;

          FileStatus[] fStatus = fs.listStatus(cachePath[i]);

          for (int j = 0; j < fStatus.length; j++) {
            if (!fStatus[j].isDir()) {
              long atime = fStatus[j].getAccessTime();

              if (currentTime - atime > expireCacheThreshold) {
                fs.delete(fStatus[j].getPath(), false);
              }
            }
          }
        } catch (IOException ioe) {
          LOG.error("IOException when clearing cache", ioe);
        }
      }
      try {
        Thread.sleep(clearCacheInterval);
      } catch (InterruptedException e) {
      }
    }
  }
}


text:
import ckan.plugins as p

import federador as fed

import os

import ckan.plugins.toolkit as toolkit
import ckan.lib.base as base

import urllib
import ckan.lib.helpers as ckanhelper

import operator #usado para ordenar los tags en orden ascendente // used asc tags order

#ckan2.3
# mlg_ds_list: Devuelve la lista de datasets
# mlg_ds_list: Returns datasets name list
def mlg_ds_list():
	return toolkit.get_action('package_list')(data_dict={})

#ckan2.3
# mlg_count_resources: Devuelve el numero de recursos.
# mlg_count_resources: Returns numbers of resources
def mlg_count_resources():
	ds = mlg_ds_list()
	count = 0
	for dsname in ds:
		data_dict = {'id':dsname}
		dsitem = toolkit.get_action('package_show')(data_dict=data_dict)
		count = count + dsitem['num_resources']
	return count

#ckan2.3
#mlg_top_tags: Devuelve las etiquetas más usadas, recibe el numero de etiquetas que tiene que devolver, si no recibe nada, devuelve 10 etiquetas.
# usa la libreria de estadisticas que trae ckan.
#mlg_top_tags: Returns most used tags, it recieve numbers of max tags to return, if not, by default, returns 10 tags.
# This function uses stats CKAN library.
def mlg_top_tags(showtags=10):
	import ckanext.stats.stats as ckanstats

	classtags = ckanstats.Stats()
	return classtags.top_tags(limit=showtags)

#ckan2.3
def mlg_ds_resources_list(dsname):

	data_dict = {'id':dsname}
	return toolkit.get_action('package_show')(data_dict=data_dict)

# mlg_tracking_summary: Recibe un identificador de dataset en iddataset
# devuelve el numero de visitas recientes (tracking_summary['recent'])
# y el numero total de visitas (tracking_summary['total'])
# mlg_tracking_summary: Get dataset id parameter iddataset
# returns numbers of recents visits (tracking_summary['recent'])
# and total visits (tracking_summary['total'])
def mlg_tracking_summary(iddataset):

	data_dict = {"id":iddataset}

	response = toolkit.get_action('package_show')(data_dict=data_dict)
	return response['tracking_summary']

# mlg_most_downloaded: Recibe el numero maximo de datasets que se van a devoler (_num_max)
# y el orden _order
# devuelve los datasets mas descargados
# mlg_most_downloaded: Get _num_max: number of datasets method will return _order: order by
# returns most downloaded datasets
def mlg_most_downloaded(_num_max, _order):

	data_dict = {"rows":_num_max,"sort":_order}

	response = toolkit.get_action('package_search')(data_dict=data_dict)
	return response['results']
# mlg_cur_datetime Devuelve la hora y fecha actual en formato YYYY-MM-DDTHH-MI-SS
# mlg_cur_datetime Returns current datetime, format YYYY-MM-DDTHH-MI-SS
def mlg_cur_datetime (self):
	from datetime import datetime, date, time
	today = str(datetime.now())
	return today[:10]+'T'+today[11:19]

# mlg_group_list: Devuelve una lista con los grupos
# mlg_group_list: Returns list of groups
def mlg_group_list():
	data_dict = {'all_fields': True} #all_fields returns each group field (name, url, image,...).
	return toolkit.get_action('group_list')(data_dict=data_dict)

# mlg_organization_list Devuelve una lista con las organizaciones
# mlg_organization_list: Returns list of organization
def mlg_organization_list():
	data_dict = {'all_fields': True} #all_fields returns each group field (name, url, image,...).
	return toolkit.get_action('organization_list')(data_dict=data_dict)

class malagae(p.SingletonPlugin):

    p.implements(p.IConfigurer)
    p.implements(p.ITemplateHelpers)

    p.implements(p.IRoutes, inherit=True)

#iruiz: Redefinir before_map para
# apl = nueva entrada en el menu, que se llama aplicaciones.
# federador = los ficheros que se usan en la federacion

# Redefine before_map:
    def before_map(self, m):

	import pylons.config as config

# Redefine before_map: include aplicaciones on main menu
	apl_url_config = config['ckan_mlg.apl_url']                     #loading url ckan must open

	m.connect('aplicaciones', #name of path route
	'/aplicaciones', #url to map path to
	controller='ckanext.malaga.controller:AplicacionesController', #controller
	action='aplicaciones', apl_url=apl_url_config) #controller action (method)

# Redefine before_map: URL /local/generador execute GenerarRDF and generate rdf file used on datos.gob.es federacion
	federador_fname = config['ckan_mlg.federador_file']             #rdf filename (include path)
	federador_template = config['ckan_mlg.federador_template']      #loading rdf template filename (include path)
	federador_process = config['ckan_mlg.federador_process']        #federador process

	m.connect(federador_process, #name of path route
	'/'+federador_process, #url to map path to
	controller='ckanext.malaga.generadorrdf:GenerarRDF', #controller
	action='generar',fname=federador_fname, template=federador_template) #controller

	return m

    def update_config(self, config):
        # add template directory that contains our snippet
		p.toolkit.add_template_directory(config, '/usr/lib/ckan/default/src/ckanext-malaga/ckanext/malaga/theme/templates')
		p.toolkit.add_public_directory (config, '/usr/lib/ckan/default/src/ckanext-malaga/ckanext/malaga/public')

    #iruiz: register helper function
    def get_helpers(self):
        return {'mlg_count_resources':mlg_count_resources,
		'mlg_tracking_summary': mlg_tracking_summary,
		'mlg_most_downloaded': mlg_most_downloaded,
		'mlg_cur_datetime': mlg_cur_datetime,
		'mlg_fed_datasets_related': fed.mlg_fed_datasets_related,
		'mlg_fed_total_resources_size': fed.mlg_fed_total_resources_size,
		'mlg_group_list': mlg_group_list,
		'mlg_organization_list': mlg_organization_list,
		'mlg_federador_value':fed.mlg_federador_value,
		'mlg_ds_list': mlg_ds_list,
		'mlg_top_tags': mlg_top_tags,
		'mlg_ds_resources_list': mlg_ds_resources_list
}


text:
package gov.nih.nci.caintegrator;

import java.io.File;

public class TestArrayDesignFiles {

    public static final String EMPTY_PATH = "/arraydesign/affymetrix/emptyfile.csv";
    public static final File EMPTY_FILE = getFile(EMPTY_PATH);

    // Affymetrix files
    public static final String HG_U133_PLUS_2_CDF_PATH = "/arraydesign/affymetrix/HG-U133_Plus_2.cdf";
    public static final String HG_U133A_CDF_PATH = "/arraydesign/affymetrix/HG-U133A.cdf";
    public static final String HG_U133_PLUS_2_ANNOTATION_PATH = "/arraydesign/affymetrix/HG-U133_Plus_2.na26.annot.csv";
    public static final String HG_U133_PLUS_2_ANNOTATION_TEST_PATH = "/arraydesign/affymetrix/HG-U133_Plus_2.na26.annot_Test.csv";
    public static final String HG_U133A_ANNOTATION_PATH = "/arraydesign/affymetrix/HG-U133A.na27.annot.csv";
    public static final String YEAST_2_CDF_PATH = "/arraydesign/affymetrix/Yeast_2.cdf";
    public static final String YEAST_2_ANNOTATION_PATH = "/arraydesign/affymetrix/Yeast_2.na26.annot.csv";
    public static final String HG_U133B_ANNOTATION_PATH = "/arraydesign/affymetrix/HG-U133B.na27.annot.csv";
    public static final String HG_U95AV2_ANNOTATION_PATH = "/arraydesign/affymetrix/HG_U95Av2.na27.annot.csv";
    public static final String HG_U95B_ANNOTATION_PATH = "/arraydesign/affymetrix/HG_U95B.na27.annot.csv";
    public static final String HG_U95C_ANNOTATION_PATH = "/arraydesign/affymetrix/HG_U95C.na27.annot.csv";
    public static final String HG_U95D_ANNOTATION_PATH = "/arraydesign/affymetrix/HG_U95D.na27.annot.csv";
    public static final String HG_U133B_CDF_PATH = "/arraydesign/affymetrix/HG-U133B.cdf";
    public static final String HG_U95AV2_CDF_PATH = "/arraydesign/affymetrix/HG_U95Av2.CDF";
    public static final String HG_U95B_CDF_PATH = "/arraydesign/affymetrix/HG_U95B.CDF";
    public static final String HG_U95C_CDF_PATH = "/arraydesign/affymetrix/HG_U95C.CDF";
    public static final String HG_U95D_CDF_PATH = "/arraydesign/affymetrix/HG_U95D.CDF";
    public static final String MAPPING_50K_HIND_ANNOTATION_PATH = "/arraydesign/affymetrix/Mapping50K_Hind240.na27.annot.csv";
    public static final String MAPPING_50K_HIND_ANNOTATION_TEST_PATH = "/arraydesign/affymetrix/Mapping50K_Hind240.na27.annot_Test.csv";
    public static final String MAPPING_50K_HIND_CDF_PATH = "/arraydesign/affymetrix/Mapping50K_Hind240.cdf";
    public static final String MAPPING_50K_XBA_CDF_PATH = "/arraydesign/affymetrix/Mapping50K_Xba240.CDF";
    public static final String MAPPING_50K_XBA_ANNOTATION_PATH = "/arraydesign/affymetrix/Mapping50K_Xba240.na27.annot.csv";
    public static final String MAPPING_50K_XBA_ANNOTATION_TEST_PATH = "/arraydesign/affymetrix/Mapping50K_Xba240.na27.annot_Test.csv";

    public static final File HG_U133A_CDF_FILE = getFile(HG_U133A_CDF_PATH);
    public static final File HG_U133A_ANNOTATION_FILE = getFile(HG_U133A_ANNOTATION_PATH);
    public static final File HG_U133_PLUS_2_CDF_FILE = getFile(HG_U133_PLUS_2_CDF_PATH);
    public static final File HG_U133_PLUS_2_ANNOTATION_FILE = getFile(HG_U133_PLUS_2_ANNOTATION_PATH);
    public static final File HG_U133_PLUS_2_ANNOTATION_TEST_FILE = getFile(HG_U133_PLUS_2_ANNOTATION_TEST_PATH);
    public static final File YEAST_2_ANNOTATION_FILE = getFile(YEAST_2_ANNOTATION_PATH);
    public static final File YEAST_2_CDF_FILE = getFile(YEAST_2_CDF_PATH);
    public static final File HG_U133B_ANNOTATION_FILE = getFile(HG_U133B_ANNOTATION_PATH);
    public static final File HG_U95AV2_ANNOTATION_FILE = getFile(HG_U95AV2_ANNOTATION_PATH);
    public static final File HG_U95B_ANNOTATION_FILE = getFile(HG_U95B_ANNOTATION_PATH);
    public static final File HG_U95C_ANNOTATION_FILE = getFile(HG_U95C_ANNOTATION_PATH);
    public static final File HG_U95D_ANNOTATION_FILE = getFile(HG_U95D_ANNOTATION_PATH);
    public static final File HG_U133B_CDF_FILE = getFile(HG_U133B_CDF_PATH);
    public static final File HG_U95AV2_CDF_FILE = getFile(HG_U95AV2_CDF_PATH);
    public static final File HG_U95B_CDF_FILE = getFile(HG_U95B_CDF_PATH);
    public static final File HG_U95C_CDF_FILE = getFile(HG_U95C_CDF_PATH);
    public static final File HG_U95D_CDF_FILE = getFile(HG_U95D_CDF_PATH);
    public static final File MAPPING_50K_HIND_ANNOTATION_FILE = getFile(MAPPING_50K_HIND_ANNOTATION_PATH);
    public static final File MAPPING_50K_HIND_ANNOTATION_TEST_FILE = getFile(MAPPING_50K_HIND_ANNOTATION_TEST_PATH);
    public static final File MAPPING_50K_HIND_CDF_FILE = getFile(MAPPING_50K_HIND_CDF_PATH);
    public static final File MAPPING_50K_XBA_CDF = getFile(MAPPING_50K_XBA_CDF_PATH);
    public static final File MAPPING_50K_XBA_ANNOTATION_FILE = getFile(MAPPING_50K_XBA_ANNOTATION_PATH);
    public static final File MAPPING_50K_XBA_ANNOTATION_TEST_FILE = getFile(MAPPING_50K_XBA_ANNOTATION_TEST_PATH);

    // Agilent files
    public static final String HUMAN_GENOME_CGH244A_ANNOTATION_PATH = "/arraydesign/agilent/014693_D_GeneList_20070207.txt";
    public static final String AGILENT_G4502A_07_01_TCGA_XML_ANNOTATION_TEST_PATH = "/arraydesign/agilent/AgilentG4502A_07_01.tcga_Test.xml";
    public static final String AGILENT_G4502A_07_01_TCGA_ADF_ANNOTATION_PATH = "/arraydesign/agilent/AgilentG4502A_07_01.tcga.adf";
    public static final String AGILENT_G4502A_07_01_TCGA_ADF_ANNOTATION_TEST_PATH = "/arraydesign/agilent/AgilentG4502A_07_01.tcga_Test.adf";
    public static final String AGILENT_G4502A_07_01_ANNOTATION_TEST_PATH = "/arraydesign/agilent/AgilentG4502A_07_01_Test.tsv";
    public static final String AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_PATH = "/arraydesign/agilent/mskcc.org_TCGA_HG-CGH-244A_v081008.ADF";
    public static final String AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_TEST_PATH = "/arraydesign/agilent/mskcc.org_TCGA_HG-CGH-244A_v081008_Test.ADF";
    public static final String AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_TEST_BAD_PATH = "/arraydesign/agilent/mskcc.org_TCGA_HG-CGH-244A_v081008_Test_Bad.ADF";
    public static final String AGILENT_014693_XML_ANNOTATION_FILE_PATH = "/arraydesign/agilent/014693_D_F_20080627.xml";
    public static final String AGILENT_22522_XML_ANNOTATION_FILE_PATH = "/arraydesign/agilent/Agilent-022522.xml";

    public static final File HUMAN_GENOME_CGH244A_ANNOTATION_FILE = getFile(HUMAN_GENOME_CGH244A_ANNOTATION_PATH);
    public static final File AGILENT_G4502A_07_01_TCGA_XML_ANNOTATION_TEST_FILE = getFile(AGILENT_G4502A_07_01_TCGA_XML_ANNOTATION_TEST_PATH);
    public static final File AGILENT_G4502A_07_01_TCGA_ADF_ANNOTATION_FILE = getFile(AGILENT_G4502A_07_01_TCGA_ADF_ANNOTATION_PATH);
    public static final File AGILENT_G4502A_07_01_TCGA_ADF_ANNOTATION_TEST_FILE = getFile(AGILENT_G4502A_07_01_TCGA_ADF_ANNOTATION_TEST_PATH);
    public static final File AGILENT_G4502A_07_01_ANNOTATION_TEST_FILE = getFile(AGILENT_G4502A_07_01_ANNOTATION_TEST_PATH);
    public static final File AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_FILE = getFile(AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_PATH);
    public static final File AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_TEST_FILE = getFile(AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_TEST_PATH);
    public static final File AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_TEST_BAD_FILE = getFile(AGILENT_HG_CGH_244A_TCGA_ADF_ANNOTATION_TEST_BAD_PATH);
    public static final File AGILENT_014693_XML_ANNOTATION_FILE = getFile(AGILENT_014693_XML_ANNOTATION_FILE_PATH);
    public static final File AGILENT_22522_XML_ANNOTATION_FILE = getFile(AGILENT_22522_XML_ANNOTATION_FILE_PATH);

    public static File getFile(String resourcePath) {
        return new File(TestArrayDesignFiles.class.getResource(resourcePath).getFile());
    }

}