text:
/* COLORS
============================= */
.repcontrol {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  margin: 1%;
  width: 98%; }
  .repcontrol .btn {
    color: transparent !important;
    float: unset;
    padding: 0px;
    text-shadow: none;
    width: 2.5em; }
  .repcontrol .repcontrol_add {
    position: relative; }
  .repcontrol .repcontrol_edit:after,
  .repcontrol .repcontrol_add:after {
    background: transparent;
    color: #004242;
    font-family: pictos;
    font-size: 1.5em;
    position: relative;
    width: 0.2em; }
  .repcontrol .repcontrol_edit:after {
    content: '(';
    left: -100%; }
  .repcontrol .repcontrol_add:after {
    content: '&';
    left: -70%; }
  .repcontrol .repcontrol_edit:hover,
  .repcontrol .repcontrol_add:hover,
  .repcontrol .repcontrol_edit:focus,
  .repcontrol .repcontrol_add:focus {
    background: #d9d9d9; }
  .repcontrol .repcontrol_edit:hover:after,
  .repcontrol .repcontrol_add:hover:after,
  .repcontrol .repcontrol_edit:focus:after,
  .repcontrol .repcontrol_add:focus:after {
    color: #113232; }

.editmode ~ .repcontrol .repcontrol_edit:after {
  content: ')'; }

.itemcontrol {
  z-index: 10; }
  .itemcontrol .repcontrol_del,
  .itemcontrol .repcontrol_move {
    font-size: 1em;
    height: 2em;
    padding: 0px;
    width: 2em; }
  .itemcontrol .repcontrol_del {
    background-color: darkred;
    font-family: pictos; }
    .itemcontrol .repcontrol_del:before {
      display: none; }

div.sheet-npc .repcontrol .repcontrol_add {
  left: 90%; }

/* SWITCHES
============================= */
/* GLOBAL SETTINGS
    =============================  */
* {
  box-sizing: border-box;
  font-family: sans-serif; }

.charsheet {
  min-width: 850px;
  background-size: cover; }
  .charsheet h1, .charsheet h2, .charsheet h3 {
    color: whitesmoke; }
  .charsheet h1 {
    font-size: 1.5em; }
  .charsheet h2 {
    font-size: 1.1em;
    line-height: 1em;
    padding-top: 10%; }
  .charsheet h3 {
    font-size: 1em; }
  .charsheet input[type=text],
  .charsheet input[type=number] {
    border: 3px solid #004242;
    height: 2em;
    width: 100%;
    border-radius: 6px;
    font-style: bold;
    font-size: 1.2em; }
    .charsheet input[type=text]::placeholder,
    .charsheet input[type=number]::placeholder {
      color: #000; }
  .charsheet input[type=text] {
    text-align: left; }
  .charsheet input[type=number][type=number]::-webkit-inner-spin-button, .charsheet input[type=number][type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    margin: 0; }
  .charsheet input[type=number][type="number"]:disabled {
    background: #000;
    color: whitesmoke; }
  .charsheet label {
    width: 100%; }
  .charsheet select {
    -moz-appearance: none;
    -webkit-appearance: none;
    background: whitesmoke;
    border: 3px solid #004242;
    color: #000;
    height: 2.2em;
    line-height: 1em;
    margin: 0px;
    padding: 0% 0% 0% 5%;
    width: 100%; }
    .charsheet select optgroup {
      font-weight: bold; }
    .charsheet select option {
      text-align: center; }
  .charsheet textarea::placeholder {
    color: #000; }

/* SWITCHES
============================= */
/* The switch - the box around the slider */
.sheet-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px; }

/* Hide default HTML checkbox */
.sheet-switch input {
  opacity: 0;
  width: 0;
  height: 0; }

/* The slider */
.sheet-slider {
  -webkit-transition: .4s;
  background-color: #4d4d4d;
  border-radius: 34px;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s; }

.sheet-slider:before {
  -webkit-transition: .4s;
  background-color: whitesmoke;
  border-radius: 50%;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 16px; }

input:checked + .sheet-slider {
  background-color: #004242; }

input:focus + .sheet-slider {
  box-shadow: 0 0 1px #004242; }

input:checked + .sheet-slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px); }

/* GRID
============================= */
div.sheet-grid {
  display: inline-grid;
  grid-column-gap: 1%; }

/* GENERIC STYLES
============================= */
.sheet-border-bottom {
  border-bottom: 0.15em solid #004242; }

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

.sheet-background-color {
  background-color: rgba(1, 1, 1, 0.71); }

.sheet-dashed {
  border: 3px dashed rgba(1, 1, 1, 0.71); }

 /* PC
============================= */
div.sheet-pc {
  background-color: rgba(1, 1, 1, 0.71);
  grid-column-gap: 0.1%;
  grid-row-gap: 1%;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  padding-bottom: 10%;
  width: 100%;
 /* CHARACTER INFO
----------------------------- */
 /* CHARACTER QUOTE
----------------------------- */
  	/* CHARACTER SHAOOW
      ----------------------------- */
  /* TABS
   ----------------------------- */
  	/* TOUGHNESS & CORRUPTION SHARED STYLES
   ----------------------------- */
  	/* TOUGHNESS
   ----------------------------- */
  	/* CORRUPTION
   ----------------------------- */
  	/* ATTRIBUTES
   ----------------------------- */
  	/* ATTACKS & DEFENSE SHARED STYLES
   ----------------------------- */
  	/* ATTACKS
   ----------------------------- */
  /* DEFENSE
  ----------------------------- */
  	/* TRAITS & ABILITIES
   ----------------------------- */
  	/* TRAITS
   ----------------------------- */
  	/* ABILITIES
   ----------------------------- */ }
  div.sheet-pc div.sheet-character-info {
    grid-template-columns: 22em 2fr 3fr 2fr 1fr 1fr;
    grid-area: 1 / 1 / 1 / 3; }
    div.sheet-pc div.sheet-character-info label {
      grid-row: 1; }
    div.sheet-pc div.sheet-character-info span {
      grid-row: 2; }
  div.sheet-pc div.sheet-character-quote {
    grid-template-columns: 1fr 90% 1fr;
    grid-column: 1 / 2; }
    div.sheet-pc div.sheet-character-quote input[type="text"] {
      font-style: italic; }
    div.sheet-pc div.sheet-character-quote label {
      grid-column: 2 / 3;
      font-style: italic; }
    div.sheet-pc div.sheet-character-quote span.sheet-quote {
      transform: rotate(180deg);
      position: relative;
      font-size: 3em; }
      div.sheet-pc div.sheet-character-quote span.sheet-quote:nth-of-type(1) {
        transform: rotate(360deg);
        top: -20%; }
      div.sheet-pc div.sheet-character-quote span.sheet-quote:nth-of-type(2) {
        transform: rotate(180deg);
        top: -20%; }
  div.sheet-pc div.sheet-character-shadow {
    grid-column: 2 / 3; }
  div.sheet-pc div.sheet-tabs {
    grid-column: 1 / 4;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 5px solid #000; }
    div.sheet-pc div.sheet-tabs input.sheet-tab:nth-of-type(1),
    div.sheet-pc div.sheet-tabs span.sheet-tab:nth-of-type(1) {
      grid-row: 1;
      grid-column: 1 / 1; }
    div.sheet-pc div.sheet-tabs input.sheet-tab:nth-of-type(2),
    div.sheet-pc div.sheet-tabs span.sheet-tab:nth-of-type(2) {
      grid-row: 1;
      grid-column: 2 / 2; }
    div.sheet-pc div.sheet-tabs input.sheet-tab:nth-of-type(3),
    div.sheet-pc div.sheet-tabs span.sheet-tab:nth-of-type(3) {
      grid-row: 1;
      grid-column: 3 / 3; }
    div.sheet-pc div.sheet-tabs input.sheet-tab:nth-of-type(4),
    div.sheet-pc div.sheet-tabs span.sheet-tab:nth-of-type(4) {
      grid-row: 1;
      grid-column: 4 / 4; }
  div.sheet-pc div.sheet-tough-corr-row {
    margin: 0px 20%; }
    div.sheet-pc div.sheet-tough-corr-row label {
      grid-row: 2; }
    div.sheet-pc div.sheet-tough-corr-row span {
      grid-row: 3; }
  div.sheet-pc div.sheet-toughness {
    grid-column: 1 / 2;
    grid-template-columns: 1fr 1fr 1fr; }
    div.sheet-pc div.sheet-toughness h1 {
      grid-area: 1 / 1 / 1 / 4; }
  div.sheet-pc div.sheet-corruption {
    grid-column: 2 / 3;
    grid-template-columns: 5em 1fr 1fr 1fr; }
    div.sheet-pc div.sheet-corruption button[type="roll"] {
      grid-row: 2;
      background-image: url(http://i.imgur.com/MC61Qmt.png?1);
      background-position: center;
      height: 1.5em; }
      div.sheet-pc div.sheet-corruption button[type="roll"]:before {
        display: none; }
    div.sheet-pc div.sheet-corruption h1 {
      grid-area: 1 / 1 / 1 / 5; }
    div.sheet-pc div.sheet-corruption select {
      grid-row: 3; }
  div.sheet-pc div.sheet-attributes {
    grid-column: 1 / 3;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    margin-bottom: 2%; }
    div.sheet-pc div.sheet-attributes input[type="number"] {
      background: whitesmoke;
      border-radius: 3em;
      border: 3px solid #004242;
      color: #000;
      font-size: 1.5em;
      height: 3em;
      text-align: center;
      width: 3em;
      grid-row: 1;
      margin-left: 15%;
      padding: 0 .5em; }
    div.sheet-pc div.sheet-attributes button {
      background: rgba(16, 32, 48, 0.78);
      grid-row: 2;
      height: 1.5em;
      overflow: hidden;
      text-align: center;
      font-size: 1.3em;
      border-bottom: 2px solid #113232;
      border-right: 2px solid #113232;
      color: whitesmoke;
      text-shadow: 1px 1px 2px #004242, 0 0 25px #113232, 0 0 5px #113232; }
      div.sheet-pc div.sheet-attributes button:before {
        display: none; }
      div.sheet-pc div.sheet-attributes button span {
        box-shadow: 3px 3px 2px #4d4d4d inset, -3px -3px 1px #113232 inset;
        padding: .5em 0; }
  div.sheet-pc div.sheet-attacks,
  div.sheet-pc div.sheet-defense {
    grid-column: 1 / 3; }
    div.sheet-pc div.sheet-attacks button[type="roll"],
    div.sheet-pc div.sheet-defense button[type="roll"] {
      background-position: center;
      background-repeat: no-repeat;
      height: 100%;
      width: 100%; }
      div.sheet-pc div.sheet-attacks button[type="roll"]:before,
      div.sheet-pc div.sheet-defense button[type="roll"]:before {
        display: none; }
    div.sheet-pc div.sheet-attacks div.sheet-section-header h1,
    div.sheet-pc div.sheet-defense div.sheet-section-header h1 {
      grid-row: 1; }
    div.sheet-pc div.sheet-attacks div.sheet-section-header h2,
    div.sheet-pc div.sheet-defense div.sheet-section-header h2 {
      grid-row: 1;
      border-top-left-radius: 3em;
      border-top-right-radius: 3em; }
    div.sheet-pc div.sheet-attacks div.sheet-section-header h3,
    div.sheet-pc div.sheet-defense div.sheet-section-header h3 {
      grid-row: 3; }
  div.sheet-pc div.sheet-attacks h1 {
    grid-column: 1 / 6; }
  div.sheet-pc div.sheet-attacks h2 {
    grid-column: 6 / 9; }
  div.sheet-pc div.sheet-attacks button[type="roll"] {
    background-image: url(http://i.imgur.com/EPH4536.png); }
  div.sheet-pc div.sheet-attacks div.sheet-section-header,
  div.sheet-pc div.sheet-attacks div.sheet-section-body {
    grid-template-columns: 2.5em 15em 8em 5em 1fr 5em 5em 5em;
    width: 100%; }
  div.sheet-pc div.sheet-defense h1 {
    grid-column: 1 / 7; }
  div.sheet-pc div.sheet-defense h2 {
    grid-column: 7 / 10; }
  div.sheet-pc div.sheet-defense button[type="roll"] {
    background-image: url(http://i.imgur.com/QFy0qCe.png?); }
  div.sheet-pc div.sheet-defense div.sheet-section-header,
  div.sheet-pc div.sheet-defense div.sheet-section-body {
    grid-template-columns: 2.5em 15em 4em 8em 5em 1fr 4em 5em 5em;
    width: 100%; }
  div.sheet-pc div.sheet-section-pc2 {
    grid-column: 1 / 3; }
    div.sheet-pc div.sheet-section-pc2 div.sheet-left-side,
    div.sheet-pc div.sheet-section-pc2 div.sheet-right-side {
      display: inline-block;
      vertical-align: top;
      width: 48%; }
    div.sheet-pc div.sheet-section-pc2 div.sheet-left-side {
      margin-right: 2%; }
  div.sheet-pc div.sheet-traits,
  div.sheet-pc div.sheet-abilities {
    margin: 0px 5%;
    grid-template-rows: min-content;
    width: 100%; }
    div.sheet-pc div.sheet-traits button[type=roll],
    div.sheet-pc div.sheet-abilities button[type=roll] {
      color: #000; }
      div.sheet-pc div.sheet-traits button[type=roll]:before,
      div.sheet-pc div.sheet-abilities button[type=roll]:before {
        display: block; }
    div.sheet-pc div.sheet-traits h1,
    div.sheet-pc div.sheet-abilities h1 {
      grid-area: 1 / 1 / 1 / 4; }
    div.sheet-pc div.sheet-traits label.sheet-long,
    div.sheet-pc div.sheet-abilities label.sheet-long {
      grid-column: 2 / 7; }
    div.sheet-pc div.sheet-traits select[name*="attribute"],
    div.sheet-pc div.sheet-abilities select[name*="attribute"] {
      grid-column: 1 / 3; }
    div.sheet-pc div.sheet-traits input[type="text"][name*="type"],
    div.sheet-pc div.sheet-abilities input[type="text"][name*="type"] {
      grid-column: 3 / 5; }
    div.sheet-pc div.sheet-traits textarea,
    div.sheet-pc div.sheet-abilities textarea {
      grid-column: 1 / 7; }
    div.sheet-pc div.sheet-traits div.sheet-section-body,
    div.sheet-pc div.sheet-abilities div.sheet-section-body {
      margin-bottom: 2%; }
    div.sheet-pc div.sheet-traits div.sheet-section-header,
    div.sheet-pc div.sheet-abilities div.sheet-section-header {
      max-height: 2.5em; }
  div.sheet-pc div.sheet-traits div.sheet-section-header,
  div.sheet-pc div.sheet-traits div.sheet-section-body,
  div.sheet-pc div.sheet-abilities div.sheet-section-header,
  div.sheet-pc div.sheet-abilities div.sheet-section-body {
    grid-template-columns: 2.5em 1fr 1fr 1fr 1fr 1fr;
    width: 98%; }
  div.sheet-pc div.sheet-boon,
  div.sheet-pc div.sheet-burdens {
    margin: 0px 5%;
    grid-template-rows: min-content;
    width: 100%; }
    div.sheet-pc div.sheet-boon div.sheet-section-header,
    div.sheet-pc div.sheet-boon div.sheet-section-body,
    div.sheet-pc div.sheet-burdens div.sheet-section-header,
    div.sheet-pc div.sheet-burdens div.sheet-section-body {
      grid-template-columns: 1fr 1fr 1fr 1fr; }
      div.sheet-pc div.sheet-boon div.sheet-section-header label:nth-of-type(1),
      div.sheet-pc div.sheet-boon div.sheet-section-body label:nth-of-type(1),
      div.sheet-pc div.sheet-burdens div.sheet-section-header label:nth-of-type(1),
      div.sheet-pc div.sheet-burdens div.sheet-section-body label:nth-of-type(1) {
        grid-row: 1;
        grid-column: 1 / 5; }
    div.sheet-pc div.sheet-boon textarea,
    div.sheet-pc div.sheet-burdens textarea {
      grid-column: 1 / 5; }
  div.sheet-pc div.sheet-traits,
  div.sheet-pc div.sheet-boon {
    grid-column: 1 / 2; }
  div.sheet-pc div.sheet-abilities,
  div.sheet-pc div.sheet-burdens {
    grid-column: 2 / 3; }
  div.sheet-pc div.sheet-section-pc3,
  div.sheet-pc div.sheet-section-pc4 {
    grid-column: 1 / 3; }
  div.sheet-pc div.sheet-section-pc3 select {
    width: 15%; }

 /* OLD CSS
============================= */
/*** Background ***/
.sheet-col-small {
  text-align: center;
  min-width: 5em; }

.sheet-col-medium {
  text-align: center;
  min-width: 6em; }

.sheet-row > div {
  display: inline-block; }

.sheet-row {
  padding: 0 30px 10px 30px; }

.sheet-2colrow > .sheet-col {
  margin: 10px !important; }

/*** Font ***/
::-webkit-input-placeholder {
  /* WebKit, Blink, Edge */
  color: #fafafa;
  background-color: transparent; }

:-moz-placeholder {
  /* Mozilla Firefox 4 to 18 */
  color: #fafafa;
  opacity: 1; }

::-moz-placeholder {
  /* Mozilla Firefox 19+ */
  color: #fafafa;
  opacity: 1; }

:-ms-input-placeholder {
  /* Internet Explorer 10-11 */
  color: #fafafa; }

/*** Pages ***/
.sheet-row div[class^="repcontrol"] {
  padding: 1em; }

input.sheet-tab {
  width: 100%;
  height: 23px;
  cursor: pointer;
  position: relative;
  opacity: 0;
  z-index: 9999;
  vertical-align: top; }

span.sheet-tab {
  text-align: center;
  display: inline-block;
  padding-left: 3px;
  padding-right: 3px;
  height: 23px;
  cursor: pointer;
  position: relative;
  margin-top: 0px;
  color: #FAFAFA;
  border-radius: 5px 5px 0px 0px;
  font-size: 12px;
  box-shadow: 2px 2px 5px #FAFAFA inset,-2px -2px 5px #202020 inset;
  vertical-align: top;
  background-color: #303030; }

input.sheet-tab::before {
  display: inline-block;
  margin-top: -30px;
  content: attr(title);
  text-align: center;
  width: 100%;
  height: 100%; }

input.sheet-tab:checked::before {
  background: #4E686A;
  color: blue; }

/* Next section makes a page visible when the tab is clicked */
div.sheet-section-pc1,
div.sheet-section-pc2,
div.sheet-section-pc3,
div.sheet-section-pc4 {
  display: none; }

input.sheet-tab[value="1"] ~ div.sheet-pc div.sheet-section-pc1 {
  display: inline-grid; }

input.sheet-tab[value="1"] ~ div.sheet-pc div.sheet-section-pc2,
input.sheet-tab[value="2"] ~ div.sheet-pc div.sheet-section-pc2,
input.sheet-tab[value="3"] ~ div.sheet-pc div.sheet-section-pc3,
input.sheet-tab[value="4"] ~ div.sheet-pc div.sheet-section-pc4 {
  display: inline-block; }

input.sheet-tab:checked + span.sheet-tab {
  box-shadow: -2px -2px 5px #FAFAFA inset, 2px 2px 5px #202020 inset;
  opacity: 1; }

label {
  margin: 0;
  padding: 0;
  text-align: left;
  font-size: 1em;
  font-weight: normal;
  color: #D8D8D8; }

input[type=radio] {
  margin: 0 5px 0 5px; }

input[type=number] {
  -moz-appearance: textfield; }

input[type="number"].sheet-number-box-small {
  border: 3px solid #004040;
  padding: 0 0 0 3px;
  width: 3.1em;
  height: 2em;
  text-align: left;
  vertical-align: middle;
  border-radius: 6px; }

.sheet-roll {
  width: 25px;
  height: 25px;
  border: 2px solid #004040;
  border-radius: 6px; }

input[type="checkbox"] {
  border: 3px solid #004040;
  color: #000000;
  background: #FBFCFC;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 1px 1px 2px #000101, -1px -1px 2px #000101,1px -1px 2px #000101, -1px 1px 2px #000101; }

textarea {
  padding: 3px;
  box-sizing: border-box;
  margin: 0;
  resize: vertical;
  overflow: hidden;
  display: block;
  text-align: left;
  border: 3px solid #004040;
  color: #000000;
  background: #FBFCFC;
  border-radius: 6px;
  height: 6.3em;
  width: 100%; }

input[name^="attr_friend"] {
  width: 48%; }

.sheet-table fieldset,
.sheet-table {
  display: table;
  text-align: center; }

.sheet-table > fieldset,
.sheet-table > div {
  display: table-row;
  width: 75px; }

.sheet-table fieldset > div,
.sheet-table > div > div {
  display: table-cell;
  vertical-align: bottom; }

.sheet-table label {
  text-align: center; }

/*** Buttons ***/
/*** Roll Templates ***/
.sheet-rolltemplate-defense,
.sheet-rolltemplate-attack, .sheet-rolltemplate-attrib {
  padding: 1px; }

.sheet-rolltemplate-attack table {
  font-family: "Georgia";
  background-color: #a0a0a0;
  background: url(http://www.designbolts.com/wp-content/uploads/2013/02/Rough-Grey-Tilable-Pattern-For-Website-Background.jpg) top left repeat;
  width: 100%;
  border: 3px solid #7f0000; }

.sheet-rolltemplate-attack th {
  border-top: 3px solid #7f0000;
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  font-weight: bold;
  color: #7f0000; }

.sheet-rolltemplate-attack td {
  padding: 3px; }

.sheet-rolltemplate-attack .sheet-attkhead {
  border-bottom: 3px solid #7f0000; }

.sheet-rolltemplate-attack .sheet-attkcat {
  text-align: right;
  width: 50%; }

.sheet-rolltemplate-attack .sheet-attkresult {
  font-weight: bold;
  text-align: left;
  width: 50%;
  padding-left: 5px; }

.sheet-rolltemplate-attack .sheet-attkhit {
  color: #007f00; }

.sheet-rolltemplate-attack .sheet-attkmiss {
  color: #7f0000; }

.sheet-rolltemplate-attack .sheet-effex {
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  /*    border-top:3px solid #7f0000; */ }

.sheet-rolltemplate-defense table {
  font-family: "Georgia";
  background-color: #a0a0a0;
  background: url(http://www.designbolts.com/wp-content/uploads/2013/02/Rough-Grey-Tilable-Pattern-For-Website-Background.jpg) top left repeat;
  width: 100%;
  border: 3px solid #00007f; }

.sheet-rolltemplate-defense th {
  border-top: 3px solid #00007f;
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  font-weight: bold;
  color: #00007f; }

.sheet-rolltemplate-defense td {
  padding: 3px; }

.sheet-rolltemplate-defense .sheet-defhead {
  border-bottom: 3px solid #00007f; }

.sheet-rolltemplate-defense .sheet-defcat {
  text-align: right;
  width: 50%; }

.sheet-rolltemplate-defense .sheet-defresult {
  font-weight: bold;
  text-align: left;
  width: 50%;
  padding-left: 5px; }

.sheet-rolltemplate-defense .sheet-defhit {
  color: #7f0000; }

.sheet-rolltemplate-defense .sheet-defmiss {
  color: #007f00; }

.sheet-rolltemplate-defense .sheet-effex {
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  /*    border-top:3px solid #00007f; */ }

.sheet-rolltemplate-attrib table {
  font-family: "Georgia";
  background-color: #a0a0a0;
  background: url(http://www.designbolts.com/wp-content/uploads/2013/02/Rough-Grey-Tilable-Pattern-For-Website-Background.jpg) top left repeat;
  width: 100%;
  border: 3px solid #007f00; }

.sheet-rolltemplate-attrib th {
  border-top: 3px solid #007f00;
  border-bottom: 3px solid #007f00;
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  color: #007f00; }

.sheet-rolltemplate-attrib td {
  padding: 3px; }

.sheet-rolltemplate-attrib .sheet-attribcat {
  text-align: right;
  width: 50%; }

.sheet-rolltemplate-attrib .sheet-attribresult {
  font-weight: bold;
  text-align: left;
  width: 50%;
  padding-left: 5px; }

.sheet-rolltemplate-attrib .sheet-attribhit {
  color: #007f00;
  font-weight: bold; }

.sheet-rolltemplate-attrib .sheet-attribmiss {
  color: #7f0000;
  font-weight: bold; }

.sheet-rolltemplate-attrib .sheet-effex {
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  border-top: 3px solid #007f00; }

.sheet-rolltemplate-abilitycheck table {
  font-family: "Georgia";
  background-color: #a0a0a0;
  background: url(http://www.designbolts.com/wp-content/uploads/2013/02/Rough-Grey-Tilable-Pattern-For-Website-Background.jpg) top left repeat;
  width: 100%;
  border: 3px solid #cc6600; }

.sheet-rolltemplate-abilitycheck th {
  border-top: 3px solid #cc6600;
  border-bottom: 3px solid #cc6600;
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  color: #cc6600; }

.sheet-rolltemplate-abilitycheck td {
  padding: 3px; }

.sheet-rolltemplate-abilitycheck .sheet-attribcat {
  text-align: right;
  width: 50%; }

.sheet-rolltemplate-abilitycheck .sheet-attribresult {
  font-weight: bold;
  text-align: left;
  width: 50%;
  padding-left: 5px; }

.sheet-rolltemplate-abilitycheck .sheet-attribhit {
  color: #007f00;
  font-weight: bold; }

.sheet-rolltemplate-abilitycheck .sheet-attribmiss {
  color: #7f0000;
  font-weight: bold; }

.sheet-rolltemplate-abilitycheck .sheet-effex {
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  border-top: 3px solid #cc6600; }

.sheet-rolltemplate-powercheck table {
  font-family: "Georgia";
  background-color: #a0a0a0;
  background: url(http://www.designbolts.com/wp-content/uploads/2013/02/Rough-Grey-Tilable-Pattern-For-Website-Background.jpg) top left repeat;
  width: 100%;
  border: 3px solid #9900ff; }

.sheet-rolltemplate-powercheck th {
  border-top: 3px solid #9900ff;
  border-bottom: 3px solid #9900ff;
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  color: #9900ff; }

.sheet-rolltemplate-powercheck td {
  padding: 3px; }

.sheet-rolltemplate-powercheck .sheet-attribcat {
  text-align: right;
  width: 50%; }

.sheet-rolltemplate-powercheck .sheet-attribresult {
  font-weight: bold;
  text-align: left;
  width: 50%;
  padding-left: 5px; }

.sheet-rolltemplate-powercheck .sheet-attribhit {
  color: #007f00;
  font-weight: bold; }

.sheet-rolltemplate-powercheck .sheet-attribmiss {
  color: #7f0000;
  font-weight: bold; }

.sheet-rolltemplate-powercheck .sheet-effex {
  background-color: #ffffff;
  background: url(https://www.toptal.com/designers/subtlepatterns/patterns/concrete_seamless.png) top left repeat;
  text-align: center;
  border-top: 3px solid #9900ff; }

.charsheet {
  background-color: #000303;
  background-image: url("http://i.imgur.com/XOomnMY.jpg?1");
  background-repeat: no-repeat;
  background-position: 0px 33px;
  text-shadow: 1px 1px 2px #000101, -1px -1px 2px #000101,1px -1px 2px #000101, -1px 1px 2px #000101, 1px 1px 12px #000101, -1px -1px 12px #000101,1px -1px 12px #000101, -1px 1px 12px #000101;
  color: #FAFAFA; }

/*** Misc***/
[class^="sheet-faded"] {
  background-color: rgba(0, 0, 0, 0.3);
  display: inline;
  border-radius: 1em 1em 0 0; }

.sheet-faded-nam {
  vertical-align: middle;
  width: 76px;
  padding: 4px; }

.sheet-faded-nam > div {
  display: inline-block;
  width: 32%; }

.sheet-faded-text {
  vertical-align: middle;
  padding: 4px; }

.sheet-label-row div,
.sheet-label-row label {
  display: inline-block; }

.sheet-label-row div > span {
  margin-right: 6px; }

.sheet-label-large {
  padding: 0;
  font-size: 1.5em;
  margin: 0px 0px .5em 0px; }

.sheet-row-with-labels div {
  display: inline-block;
  vertical-align: bottom; }

.sheet-row-with-labels label {
  text-align: center; }

.sheet-ability-section {
  width: 360px;
  display: inline-block;
  padding: 4px 4px 0 4px; }

.sheet-attributes {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  height: 80px;
  border-radius: 6px;
  text-align: center; }

.sheet-attributes > div {
  display: inline-block;
  padding-bottom: 5px;
  font-size: 16px;
  width: 10.5%; }

.charsheet * {
  box-sizing: border-box;
  font-family: "Georgia"; }


text:
module Fog
  module Compute
    class Fifo

      class Mock
        def get_dataset(id)
          if ds = self.data[:datasets][id]
            res = Excon::Response.new
            res.status = 200
            res.body = ds
          else
            raise Excon::Errors::NotFound
          end
        end
      end

      class Real
        def get_dataset(id)
          request(
            :method => "GET",
            :path => "datasets/#{id}"
          )
        end
      end

    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
SafeDictionary
==============

Another Safe Accessor to NSDictionary


text:
from munch import Munch, munchify
import json

def readin_config_file( filename: str) -> Munch:

    if ".yaml" in filename or ".yml" in filename:
        return readin_yaml_file( filename )
    elif  ".json" in filename:
        return readin_json_file( filename )
    else:
        raise NotImplementedError("Cannot use {} as config file".format( filename))

def readin_json_file(filename:str) -> Munch:

    with open( filename ) as json_file:
        data = json.load(json_file)
        json_file.close(  )
    return munchify(data)

def readin_yaml_file(config_file:str) -> Munch:
    """ reads in and checks the config file

    Args:
      config_file: yaml formatted config files

    Returns:
      config ( munch )

    Raises:
      None
    """

    with open(config_file, 'r') as stream:
        config = Munch.fromYAML(stream)
        stream.close()

    return config


text:
var m = require('mithril'),
	mdl = require('mithril.component.mdl')(m),
	sugartags = require('mithril.sugartags')(m),
	db = require('../system/api/flatfiledb/api.server.js')(m);

var self = module.exports.index = {
	models: {
		todo: function(data){
			this.text = data.text;
			this.done = m.prop(data.done == "false"? false: data.done);
			this._id = data._id;
		}
	},
	controller: function(params) {
		var ctrl = this;

		ctrl.list = [];

		db.find({type: 'todo.index.todo'}, {background: true, initialValue: []}).then(function(data) {
			ctrl.list = Object.keys(data.result).map(function(key) {
				return new self.models.todo(data.result[key]);
			});
		});

		ctrl.addTodo = function(e){
			var value = ctrl.vm.input();
			if(value) {
				var newTodo = new self.models.todo({
					text: ctrl.vm.input(),
					done: false
				});
				ctrl.list.push(newTodo);
				ctrl.vm.input("");
				db.save({ type: 'todo.index.todo', model: newTodo } ).then(function(res){
					newTodo._id = res.result;
				});
			}
			e.preventDefault();
			return false;
		};

		ctrl.archive = function(){
			var list = [];
			ctrl.list.map(function(todo) {
				if(!todo.done()) {
					list.push(todo);
				} else {
					db.remove({ type: 'todo.index.todo', _id: todo._id }).then(function(response){
						console.log(response.result);
					});
				}
			});
			ctrl.list = list;
		};

		ctrl.vm = {
			left: function(){
				var count = 0;
				ctrl.list.map(function(todo) {
					count += todo.done() ? 0 : 1;
				});
				return count;
			},
			done: function(todo){
				return function() {
					todo.done(!todo.done());
				}
			},
			input: m.prop("")
		};

		return ctrl;
	},
	view: function(ctrl) {
		with(sugartags) {
			return DIV({"class": "container"}, [
				LINK({href: '/css/todos.css', rel:'stylesheet'}),
				H4("Todos - " + ctrl.vm.left() + " of " + ctrl.list.length + " remaining"),
				mdl.mButton({text: "Archive", onclick: ctrl.archive}),
				UL([
					ctrl.list.map(function(todo){
						return LI({ class: todo.done()? "done": "", onclick: ctrl.vm.done(todo) }, todo.text);
					})
				]),
				FORM({ onsubmit: ctrl.addTodo }, [
					INPUT({ type: "text", value: ctrl.vm.input, placeholder: "Add todo"}),
					BUTTON({ type: "submit"}, "Add")
				])
			]);
		}
	}
	//	Test authenticate
	//,authenticate: true
};


text:
package org.apache.tajo.engine.query;

import org.apache.tajo.IntegrationTest;
import org.apache.tajo.QueryTestCaseBase;
import org.apache.tajo.TajoConstants;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import java.sql.ResultSet;

@Category(IntegrationTest.class)
public class TestSortQuery extends QueryTestCaseBase {

  public TestSortQuery() {
    super(TajoConstants.DEFAULT_DATABASE_NAME);
  }

  @Test
  public final void testSort() throws Exception {
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortWithAlias1() throws Exception {
    // select l_linenumber, l_orderkey as sortkey from lineitem order by sortkey;
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortWithAlias2() throws Exception {
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortWithAlias3() throws Exception {
    ResultSet res = executeQuery();
    System.out.println(resultSetToString(res));
    cleanupQuery(res);
  }

  @Test
  public final void testSortWithExpr1() throws Exception {
    // select l_linenumber, l_orderkey as sortkey from lineitem order by l_orderkey + 1;
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortWithExpr2() throws Exception {
    // select l_linenumber, l_orderkey as sortkey from lineitem order by l_linenumber, l_orderkey, (l_orderkey is null);
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortWithAliasButOriginalName() throws Exception {
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortDesc() throws Exception {
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testTopK() throws Exception {
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortAfterGroupby() throws Exception {
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortAfterGroupbyWithAlias() throws Exception {
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortWithDate() throws Exception {
    // skip this test if catalog uses HCatalogStore.
    // It is because HCatalogStore does not support Time data type.
    if (!testingCluster.isHCatalogStoreRunning()) {
      // create external table table1 (col1 timestamp, col2 date, col3 time) ...
      executeDDL("create_table_with_date_ddl.sql", "table1");

      ResultSet res = executeQuery();
      assertResultSet(res);
      cleanupQuery(res);
    }
  }

  @Test
  public final void testAsterisk() throws Exception {
    //select *, length(l_comment) as len_comment from lineitem order by len_comment;
    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }

  @Test
  public final void testSortWithAscDescKeys() throws Exception {
    executeDDL("create_table_with_asc_desc_keys.sql", "table2");

    ResultSet res = executeQuery();
    assertResultSet(res);
    cleanupQuery(res);
  }
}


text:
@import UIKit;
#import "FDScrollingTabBarDelegate.h"

#pragma mark - Class Interface

@interface FDScrollingTabBar : UIView
<
	UICollectionViewDataSource,
	UICollectionViewDelegate
>

#pragma mark - Properties

@property (nonatomic, copy) UIFont *font;
@property (nonatomic, copy) UIFont *highlightedFont;

@property (nonatomic, copy) UIColor *barTintColor;
@property (nonatomic, copy) UIColor *separatorColor;
@property (nonatomic, copy) UIColor *highlightedTextColor;

@property (nonatomic, copy) NSArray *items;
@property (nonatomic, assign) NSUInteger selectedIndex;

@property (nonatomic, weak) id<FDScrollingTabBarDelegate> delegate;

@end


text:
Создание нового пользователя

Редактирование пользователя

<form class="form-horizontal" ng-submit="save(changeUserForm.$invalid)" name="changeUserForm" novalidate>

        Имя

            <input type="text" class="form-control" name="username" placeholder="Имя пользователя"
                   data-ng-model="user.username" required>

        E-mail

            <input type="email" class="form-control" id="email" name="email" placeholder="E-mail"
                   data-ng-model="user.email" data-ng-pattern="/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i">

        Пароль

            <input type="password" name="newPassword" class="form-control" id="inputPassword"
                   placeholder="Пароль" data-ng-model="user.password" required>

        Повторить пароль

            <input type="password" name="repeatNewPassword" class="form-control" id="inputPassword2"
                   placeholder="Повторить пароль" data-ng-model="user.repeatPassword" required>

        Роли

                    #
                    Роль

                    <input type="checkbox" ng-model="role.checked">
                    {{role.title}}

        Точки доставки

                            Наименование
                            Адрес

                            {{deliveryPoint.title}}
                            {{deliveryPoint.address}}

                    Добавить точку доставки

                    <button type='button' data-ng-click="removeAllUserDeliveryPoints()" class="btn btn-danger">Удалить все точки доставки</button>

            <button type="submit" class="btn btn-primary">Сохранить</button>
            Сменить пароль

            <button ng-if="!user.locked" type='button' data-ng-click="lockUser()" class="btn btn-warning">Заблокировать</button>
            <button ng-if="user.locked" type='button' data-ng-click="unlockUser()" class="btn btn-warning">Разблокировать</button>
            <button type='button' data-ng-click="deleteUser()" class="btn btn-danger">Удалить</button>

</form>


text:
 package com.indeed.flamdex.writer;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class MockFlamdexWriter implements FlamdexWriter {
    private final Collection<String> intFields;
    private final Collection<String> stringFields;
    private int numDocs;
    private String directory;

    private final Map<String, Map<Long, List<Integer>>> intTerms = new HashMap<String, Map<Long, List<Integer>>>();
    private final Map<String, Map<String, List<Integer>>> stringTerms = new HashMap<String, Map<String, List<Integer>>>();

    public MockFlamdexWriter(String directory) {
        this.directory = directory;
        this.intFields = new ArrayList<String>();
        this.stringFields = new ArrayList<String>();
        this.numDocs = 0;
    }

    private class MockIntFieldWriter implements IntFieldWriter {
        private List<Integer> currentDocList;
        private Map<Long, List<Integer>> terms;
        private long currentTerm;

        public MockIntFieldWriter(Map<Long, List<Integer>> terms) {
            this.terms = terms;
            this.currentTerm = Integer.MIN_VALUE;
        }

        @Override
        public void nextTerm(long term) throws IOException {
            if (this.currentTerm >= term) {
                throw new RuntimeException("Terms not inserted in order");
            }
            this.currentTerm = term;
            this.currentDocList = new ArrayList<Integer>();
            this.terms.put(term, this.currentDocList);
        }

        @Override
        public void nextDoc(int doc) throws IOException {
            numDocs++;
            if (this.currentDocList.size() > 0 &&
                    doc < this.currentDocList.get(this.currentDocList.size() - 1)) {
                throw new RuntimeException("Docs not inserted in order");
            }
            this.currentDocList.add(doc);
        }

        @Override
        public void close() throws IOException {
            // do nothing
        }

    }

    private class MockStringFieldWriter implements StringFieldWriter {
        private List<Integer> currentDocList;
        private Map<String, List<Integer>> terms;
        private String currentTerm;

        public MockStringFieldWriter(Map<String, List<Integer>> terms) {
            this.terms = terms;
            this.currentTerm = null;
        }

        @Override
        public void nextTerm(String term) throws IOException {
            if (currentTerm != null && currentTerm.compareTo(term) >= 0) {
                throw new RuntimeException("Terms not inserted in order");
            }
            this.currentTerm = term;
            this.currentDocList = new ArrayList<Integer>();
            this.terms.put(term, this.currentDocList);
        }

        @Override
        public void nextDoc(int doc) throws IOException {
            numDocs++;
            if (this.currentDocList.size() > 0 &&
                    doc < this.currentDocList.get(this.currentDocList.size() - 1)) {
                throw new RuntimeException("Docs not inserted in order");
            }
            this.currentDocList.add(doc);
        }

        @Override
        public void close() throws IOException {
            // do nothing
        }

    }

    @Override
    public IntFieldWriter getIntFieldWriter(String field) throws IOException {
        this.intFields.add(field);
        this.intTerms.put(field, new LinkedHashMap<Long, List<Integer>>());
        return new MockIntFieldWriter(this.intTerms.get(field));
    }

    @Override
    public StringFieldWriter getStringFieldWriter(String field) throws IOException {
        this.stringFields.add(field);
        this.stringTerms.put(field, new LinkedHashMap<String, List<Integer>>());
        return new MockStringFieldWriter(this.stringTerms.get(field));
    }

    @Override
    public void close() throws IOException {
        // do nothing
    }

    @Override
    public String getOutputDirectory() {
        return null;
    }

    public Collection<String> getIntFields() {
        return intFields;
    }

    public Collection<String> getStringFields() {
        return stringFields;
    }

    @Override
    public void resetMaxDocs(long numDocs) {
        /* does nothing */
    }

    public int getNumDocs() {
        return numDocs;
    }

    public String getDirectory() {
        return directory;
    }

    public Map<String, Map<Long, List<Integer>>> getIntTerms() {
        return intTerms;
    }

    public Map<String, Map<String, List<Integer>>> getStringTerms() {
        return stringTerms;
    }

}


text:
/**
 * Created by joel on 2/25/15.
 *
 * Actions, including getters / setters, are stored here.
 *
 */

'use strict';

//require("./blastFramework");

require('./blastFramework');

__actions.getGameWidth = function () {
    if ($blast._game) {
        return $blast._game.width;
    }
};

__actions.getGameHeight = function () {
    if ($blast._game) {
        return $blast._game.height;
    }
};

__actions.getSpriteProp = function (name, property) {
    var spriteObj;
    if (!$blast._game) {
        return -2;
    }

    spriteObj = $blast.getObject(name);
    if (!spriteObj) {
        return -4;
    }

    if (property === 'x') {
        return spriteObj.obj.x;

    } else if (property === 'y') {
        return spriteObj.obj.y;

    } else if (property === 'velX') {
        return spriteObj.obj.body.velocity.x;

    } else if (property === 'velY') {
        return spriteObj.obj.body.velocity.y;

    } else {
        return 23;
    }

    return 46;

};

__actions.setSpriteProp = function (name, property, value) {
    var spriteObj;
    if (!$blast._game) {
        return;
    }

    spriteObj = $blast.getObject(name);
    if (!spriteObj) {
        return;
    }

    if (property === 'x' || property === 'y') {
        spriteObj.obj[property] = value;

    } else if (property === 'velX') {
        spriteObj.obj.body.velocity.x = value;

    } else if (property === 'velY') {
        spriteObj.obj.body.velocity.y = value;

    }
};

__actions.setGameScale = function (width, height) {
    var width = width || 0
        , height = height || 0;
    $blast._game.world.setBounds(0, 0, width, height);
    console.log('Game size changed=' + width + ',' + height);
};

__actions.setCameraPos = function (x, y) {
    var x = x || 0
        , y = y || 0;

    $blast._game.camera.x = x;
    $blast._game.camera.y = y;
};

__actions.setCameraFollow = function (name) {
    var spriteObj = $blast.getObject(name).obj;
    if (!spriteObj) {
        console.err('Oops.  No such obj for camera to follow.');
        return null;
    }

    $blast._game.camera.follow(spriteObj, Phaser.Camera.FOLLOW_LOCKON);
};


text:
layout: documentation
title: Installing Bazel using Bazelisk
category: getting-started
---

# Installing Bazel using Bazelisk

This page describes how to install Bazel using Bazelisk.

[Bazelisk](https://github.com/bazelbuild/bazelisk) is a launcher for Bazel which
automatically downloads and installs an appropriate version of Bazel. Use
Bazelisk if you need to switch between different versions of Bazel depending on
the current working directory, or to always keep Bazel updated to the latest
release.

You can install Bazelisk in multiple ways, including:

* `npm install -g @bazel/bazelisk`
* using [a binary release](https://github.com/bazelbuild/bazelisk/releases) for
  Linux, macOS, or Windows
* using Homebrew on macOS
* by compiling from source using Go: `go get github.com/bazelbuild/bazelisk`

For more details, see
[the official README](https://github.com/bazelbuild/bazelisk/blob/master/README.md).


text:
package me.graduation.interfaces.role.web.command;

import java.io.Serializable;

/**
 * Created by ivan_ on 2015/3/31.
 */
public class ListCommand implements Serializable {
    private int page = 1;
    private int pageSize = 20;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}


text:
<?php
/**
 * Map View Single Featured Event
 * This file contains one featured event in the map
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/pro/map/single-featured.php
 *
 * @version 4.4.12
 *
 */

if ( ! defined( 'ABSPATH' ) ) {
	die( '-1' );
}

global $post;

$venue_details = tribe_get_venue_details();

// Venue microformats
$has_venue         = ( $venue_details ) ? ' vcard' : '';
$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';

echo tribe_event_featured_image( null, 'large' );
?>

<?php do_action( 'tribe_events_before_the_event_title' ) ?>

<?php echo tribe_event_distance(); ?>

	<a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title() ?>" rel="bookmark">
		<?php the_title() ?>

<?php do_action( 'tribe_events_after_the_event_title' ) ?>

<?php do_action( 'tribe_events_before_the_meta' ) ?>
<div class="tribe-events-event-meta <?php echo esc_attr( $has_venue . $has_venue_address ); ?>">

		<?php echo tribe_events_event_schedule_details() ?>

	<?php if ( $venue_details ) : ?>

			<?php echo implode( ', ', $venue_details ); ?>

	<?php endif; ?>

<?php do_action( 'tribe_events_after_the_meta' ) ?>

<?php if ( tribe_get_cost() ) : ?>

		<?php echo tribe_get_cost( null, true ); ?>
		<?php
			/** This action is documented in the-events-calendar/src/views/list/single-event.php */
			do_action( 'tribe_events_inside_cost' )
		?>

<?php endif; ?>

<?php do_action( 'tribe_events_before_the_content' ) ?>

	<?php echo tribe_events_get_the_excerpt() ?>
	<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'tribe-events-calendar-pro' ) ?> »

<?php
do_action( 'tribe_events_after_the_content' );


text:
package antoniotoro.practica2.listacorreos;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/ListaCorreosServlet")
public class ListaCorreosServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	private static final String EXPR_REG_EMAIL = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
			+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request,response);
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		try {
			String accion = request.getParameter("action");
			if (accion.equals("listarUsuarios")) {
				List<Usuario> lista = BDUsuario.listarUsuarios();
				ObjectOutputStream objOut = new ObjectOutputStream(response.getOutputStream());
				objOut.writeObject(lista);
				objOut.flush();
				objOut.close();
			}
			else if (accion.equals("aniadirUsuario")) {
				final Pattern pattern = Pattern.compile(EXPR_REG_EMAIL);

				ObjectOutputStream output = new ObjectOutputStream(response.getOutputStream());
				try {
					String nombre   = request.getParameter("nombre"),
					       apellido = request.getParameter("apellido"),
					       email    = request.getParameter("email");

					Matcher matcher = pattern.matcher(email);

					if (BDUsuario.existeEmail(email)) {
						output.writeInt(1);
						output.writeObject("Usuario ya existente");
					}
					else if (!matcher.matches()){
						output.writeInt(2);
						output.writeObject("Correo electronico no valido");
					}
					else {
						Usuario usuario = new Usuario();
						usuario.setNombre(nombre);
						usuario.setApellido(apellido);
						usuario.setEmail(email);

						BDUsuario.insertar(usuario);

						output.writeInt(0);
						output.writeObject("Usuario añadido correctamente");
					}
				} catch (Exception e) {
					output.writeInt(-1);
					output.writeObject("Error al añadir usuario");
				} finally {
					output.flush();
					output.close();
				}
			}
			else if (accion.equals("actualizarUsuario")) {
				ObjectOutputStream output = new ObjectOutputStream(response.getOutputStream());
				try {
					String nombre   = request.getParameter("nombre"),
					       apellido = request.getParameter("apellido"),
					       email    = request.getParameter("email");

					if (BDUsuario.existeEmail(email)) {
						Usuario usuario = new Usuario();
						usuario.setNombre(nombre);
						usuario.setApellido(apellido);
						usuario.setEmail(email);

						BDUsuario.actualizar(usuario);

						output.writeInt(0);
						output.writeObject("Usuario actualizado");
					}
					else {
						output.writeInt(1);
						output.writeObject("El usuario no existe");
					}
				} catch (Exception e) {
					output.writeInt(-1);
					output.writeObject("Error al actualizar usuario");
				} finally {
					output.flush();
					output.close();
				}
			}
			else if (accion.equals("eliminarUsuario")) {
				ObjectOutputStream output = new ObjectOutputStream(response.getOutputStream());
				try {
					String email = request.getParameter("email");

					if (BDUsuario.existeEmail(email)) {
						Usuario usuario = BDUsuario.seleccionarUsuario(email);
						BDUsuario.eliminar(usuario);

						output.writeInt(0);
						output.writeObject("Usuario eliminado");
					}
					else {
						output.writeInt(1);
						output.writeObject("El usuario no existe");
					}
				} catch (Exception e) {
					output.writeInt(-1);
					output.writeObject("Error al eliminar usuario");
				} finally {
					output.flush();
					output.close();
				}
			}
			else {
				ObjectOutputStream output = new ObjectOutputStream(response.getOutputStream());

				output.writeInt(-2);
				output.writeObject("Accion no permitida");
				output.flush();
				output.close();
			}
		}
		catch(Exception e) {
			response.setContentType("text/html");
			PrintWriter out = response.getWriter();
			out.println("
" + "Lista de usuarios" + "
");

			out.println("
");
			out.println("
Nombre	Apellido	Email	");
			for(Usuario u : BDUsuario.listarUsuarios()) {
				out.println("
" + u.getNombre() + "	");
				out.println("" + u.getApellido() + "	");
				out.println("" + u.getEmail() + "
");
			}
			out.println("
");
		}
	}
}


text:
////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011-2016 by Rob Jellinghaus.                        //
// All Rights Reserved.                                               //
////////////////////////////////////////////////////////////////////////

using Holofunk.Core;
using Holofunk.SceneGraphs;
using Microsoft.Xna.Framework;
using System;

namespace Holofunk
{
    /// An abstract "widget" that allows control of a Loop.
    /// <remarks>The top-level object that is created when a user starts recording a new loop.
    /// Audio and video data is routed to this Loopie as long as it remains in the Holofunk class's
    /// active list of Recorders.</remarks>
    class Loopie : Recorder<Sample, float>, TimedRecorder<Sample, byte>
    {
        static int s_nextId;

        readonly int m_id;

        LoopieCondition m_condition;

        // Is this loopie currently touched by the cursor?
        bool m_touched;
        // color of the player touching it (or white if both players)
        Color m_touchedColor;

        /// Index of the creating player.
        readonly int m_playerIndex;

        readonly HolofunkModel m_model;
        readonly TrackNode m_loopieNode;
        readonly DenseSampleFloatStream m_audioStream;
        readonly SparseSampleByteStream m_videoStream;

        ///
        /// The track gets created when the Loopie finishes being recorded.
        ///
        Track m_track;

        /// Track sample count that we want to stop at;
        /// set by StopRecordingAtNextBeat; if -1, we are not waiting for a track to finish
        ContinuousDuration m_currentRecordingContinuousDuration = (ContinuousDuration)(-1);

        /// The number of beats long we consider the currently recorded track to be.
        int m_currentRecordingBeatCount;

        readonly static Color[] s_colors = new[] {
            Color.Blue,
            Color.Purple,
            Color.SeaGreen,
            Color.DarkOrchid,
            Color.Aqua,
            Color.Magenta,
            Color.SteelBlue,
            Color.Tomato,
            Color.Turquoise,
            Color.RoyalBlue,
            Color.MediumVioletRed,
            Color.Maroon,
            Color.LimeGreen,
            Color.HotPink
        };

        ///
        /// Create a new Loopie, initially in Record mode; add it to the relevant Recorder lists so data will start
        /// flowing immediately.
        ///
        internal Loopie(
            Moment now,
            HolofunkModel model,
            TextureContent content,
            DenseSampleFloatStream audioStream,
            SparseSampleByteStream videoStream,
            Transform transform,
            int playerIndex,
            bool isRightHand,
            int inputChannel)
        {
            m_id = s_nextId++;
            m_playerIndex = playerIndex;
            m_audioStream = audioStream;
            m_videoStream = videoStream;

            SetCondition(LoopieCondition.Record);

            m_model = model;

            m_loopieNode = new TrackNode(
                m_model.SceneGraph.TrackGroupNode,
                transform,
                "Track #" + m_id,
                content,
                m_id,
                videoStream,
                false,
                // set the scale proportionately to the maximum level (on both channels)
                () => {
                    if (m_condition == LoopieCondition.Record) {
                        return m_model.Bass.LevelRatio(inputChannel) * 0.5f; // B4CK remove this 0.5f
                    }
                    else {
                        return m_track.LevelRatio;
                    }
                },
                // set the color: gray if muted, otherwise based on our unique ID
                () => m_condition == LoopieCondition.Record
                    ? new Color((byte)0x80, (byte)0, (byte)0, (byte)0x80)
                    : m_condition == LoopieCondition.Mute
                    ? HolofunkSceneGraph.MuteColor
                    : s_colors[m_id % s_colors.Length],
                () => m_condition == LoopieCondition.Mute
                    ? new Color(0x80, 0x80, 0x80, 0x80) // half transparent
                    : Color.White,
                () => {
                    if (m_condition == LoopieCondition.Record) {
                        return (long)(m_currentRecordingBeatCount * (int)m_model.Clock.ContinuousBeatDuration);
                    }
                    else {
                        return m_audioStream.DiscreteDuration;
                    }
                },
                () => now.CompleteBeats,
                () => m_condition == LoopieCondition.Record
                    ? new Color((byte)0xFF, (byte)0, (byte)0, (byte)0xFF)
                    : m_condition == LoopieCondition.Mute
                    ? HolofunkSceneGraph.MuteColor
                    : s_colors[m_id % s_colors.Length],
                () => (float)(MagicNumbers.MaxStreamCount + 1 - model.Loopies.Count) / MagicNumbers.MaxStreamCount);

            m_track = new Track(m_model.Bass, m_id, m_model[m_playerIndex].MicrophoneParameters, m_audioStream);
        }

        #region Properties

        internal int Id { get { return m_id; } }
        internal LoopieCondition Condition { get { return m_condition; } }
        internal Transform Transform
        {
            get { return m_loopieNode.LocalTransform; }
            set { m_loopieNode.LocalTransform = value; }
        }
        internal int PlayerIndex { get { return m_playerIndex; } }
        internal bool Touched
        {
            get { return m_touched; }
            set { m_touched = value; }
        }
        internal Color TouchedColor
        {
            get { return m_touchedColor; }
            set { m_touchedColor = value; }
        }
        internal Track Track { get { return m_track; } }
        public DenseSampleFloatStream Stream { get { return m_audioStream; } }

        #endregion

        /// How long should this track be, given how much has been recorded so far?
        /// <remarks>The goal of this method is to round up the current track length to one of
        /// the following values:  1 beat, 2 beats, or a multiple of 4 beats.</remarks>
        int TrackBeatLength(Duration<Sample> trackDuration)
        {
            float continuousBeatDuration = (float)m_model.Clock.ContinuousBeatDuration;

            // How many full or fractional beats elapsed so far?
            Moment trackLengthMoment = m_model.Clock.Time((Time<Sample>)(long)trackDuration);

            float fbeats = ((float)(long)trackDuration) / continuousBeatDuration;
            int floorBeats = (int)Math.Floor(fbeats);
            //HoloDebug.Assert(trackLengthMoment.CompleteBeats == floorBeats);

            int beats = trackLengthMoment.CompleteBeats + 1;

            //HoloDebug.Assert(trackDuration <= beats * continuousBeatDuration);

            switch (beats) {
                case 1:
                case 2:
                    return beats;
                default:
                    return (beats + 0x3) & ~0x3;
                /*
            case 3:
            case 4:
                return 4;
            default:
                // round up to next multiple of 8
                return (beats + 0x7) & ~0x7;
                */
            }
        }

        ///
        /// Record some audio data.
        ///
        /// <remarks>
        /// [AsioThread]
        ///
        /// This method is responsible for detecting when the audio stream is long enough, and shutting down the
        /// recording for that stream in that case.
        /// </remarks>
        public bool Record(Moment now, Duration<Sample> duration, IntPtr audioBuffer)
        {
            int finalDurationCeiling = (int)Math.Ceiling((float)m_currentRecordingContinuousDuration);

            if (finalDurationCeiling > -1) {
                HoloDebug.Assert(m_audioStream.DiscreteDuration <= finalDurationCeiling);
            }

            int prevBeatCount = m_currentRecordingBeatCount;
            m_currentRecordingBeatCount = TrackBeatLength(m_audioStream.DiscreteDuration);
            if (prevBeatCount != m_currentRecordingBeatCount) {
                // breakpoint here
            }

            bool done = false;

            if (finalDurationCeiling > -1
                && (m_audioStream.DiscreteDuration + duration) > finalDurationCeiling) {
                duration = finalDurationCeiling - m_audioStream.DiscreteDuration;
                done = true;
            }

            // Only the one ASIO stream will ever call into this method, so we don't need to lock m_audioStream here,
            // as there are no other objects concurrently mutating it.
            m_audioStream.Append(duration, audioBuffer);

            if (done) {
                // we are done!
                m_audioStream.Shut(m_currentRecordingContinuousDuration);
                m_videoStream.Shut(m_currentRecordingContinuousDuration);

                m_condition = LoopieCondition.Loop;

                lock (m_model.Loopies) {
                    m_model.Loopies.Add(this);
                }

                m_track.StartPlaying(now);

                // all done!
                return true;
            }
            else {
                return false;
            }
        }

        public bool Record(Time<Sample> time, byte[] videoBuffer, int offset, int width, int stride, int height)
        {
            if (m_condition != LoopieCondition.Record) {
                return true; // done
            }
            else {
                lock (m_videoStream) { // [KinectThread] to avoid racing writes and reads from m_videoStream
                    m_videoStream.AppendSliver(time, videoBuffer, offset, width, stride, height);
                }
                return false;
            }
        }

        public void StopRecordingAtNextBeat(Moment now, ParameterMap microphoneParameters)
        {
            Duration<Sample> originalDuration = m_audioStream.DiscreteDuration;
            int beatLength = TrackBeatLength(originalDuration);

            HoloDebug.Assert(beatLength > 0);
            m_currentRecordingContinuousDuration = (ContinuousDuration)(beatLength * (float)now.Clock.ContinuousBeatDuration);

            Duration<Sample> finalDurationCeiling = (long)Math.Ceiling((float)m_currentRecordingContinuousDuration);
            Duration<Sample> endDuration = m_audioStream.DiscreteDuration;
            // debugging apparent race here....
            HoloDebug.Assert(originalDuration == endDuration);
            HoloDebug.Assert(endDuration <= finalDurationCeiling);

            m_track.Parameters.ShareAll(microphoneParameters.Copy(false));
            m_track.UpdateEffects(now);
        }

        internal void SetCondition(LoopieCondition condition)
        {
            m_condition = condition;

            switch (m_condition) {
                case LoopieCondition.Record: return;
                case LoopieCondition.Mute: m_track.SetMuted(true); break;
                case LoopieCondition.Loop: m_track.SetMuted(false); break;
                default: HoloDebug.Assert(false, "Impossible LoopieCondition"); break;
            }
        }

        internal void GameUpdate(Moment now)
        {
            m_loopieNode.Update(now, Touched, TouchedColor);
        }

        public void Dispose(Moment now)
        {
            m_track.SetMuted(true);
            m_track.Dispose(now);

            m_videoStream.Dispose();

            m_loopieNode.Detach();
        }
    }
}


text:
Quick start guide
=================

The use of package is very simple. This document is a brief explanation.

Installation
------------

Install the package is so easy. Simple type this:

.. code-block:: bash

    > sudo pip install openvas2document

.. note::

    Remember that you need **Python 3**!!

Generate Excel
--------------

To generate an Excel File you need to export the OpenVAS results as a XML format. If you can't a report by hand, you can find one in :file:`example` folder.

Then, you need to use :samp:`openvas_to_document` tool:

.. code-block:: bash

    > openvas_to_document -i my_openvas_report.xml -o generated_excel.xslx

For further information go to the :ref:`Openvas to report manual <openvas_to_document_man>`.

Filter results
--------------

If you want to filter the XML OpenVAS file, deleting some targets for example, and generate a new XML document without this information, you can user :samp:`openvas_cutter`

First we create a file with the targets that we want to remove.

.. code-block::  bash

    > echo 10.0.1.1 > remove_targets.txt

Now launch the script:

.. code-block:: bash

    > openvas_cutter -i my_openvas_report.xml -o my_openvas_report_filtered.xml --exclude-hosts remove_targets.txt

For further information go to the :ref:`Openvas cutter manual <openvas_cutter_man>`.

As a library
------------

You also can use the library in your won code, importing as a usual lib. After install de library, using bellow instructions, you only must do:

.. code-block:: python

    from openvas_to_report.api import Config, convert

    c = Config(input_files=["input_file.xml"], output_file="results.xslx")
    convert(c)

For further information go to the :ref:`Openvas as library manual <openvas_library_man>`.


text:
# php_data_object

[![Build Status](https://travis-ci.org/flancer32/php_data_object.svg)](https://travis-ci.org/flancer32/php_data_object)
[![codecov.io](https://codecov.io/github/flancer32/php_data_object/coverage.svg?branch=master)](https://codecov.io/github/flancer32/php_data_object?branch=master)

_"Smart data structures and dumb code works a lot better than the other way around."_ (c) Eric S. Raymond

_"Bad programmers worry about the code. Good programmers worry about data structures and their relationships."_ (c) Linus Torvalds

## Overview
This is yet another PHP implementation of the data container (like [DTO](https://en.wikipedia.org/wiki/Data_transfer_object) / [SDO](http://php.net/manual/en/book.sdo.php)). Some kind of the wrapper around associative array. The main goal of this implementation is to be an accessor for the raw data.

## Native PHP objects

### Structure
We can use any property of any PHP object:

    $obj1 = new class {};
    $obj2 = new class {};
    $obj1->name = 'first';
    $obj2->code = 'OBJ2';
    $obj1->sub = $obj2;
    $this->assertEquals('first', $obj1->name);
    $this->assertEquals('OBJ2', $obj1->sub->code);

[More...](./docs/010_PhpObjects.md)

### Paths
We can set/get value of the inner property in PHP style:

    $obj->sub->code = $code;
    $code = $obj->sub->code;

but we will have "_Undefined property_" error if `$obj->sub` property does not exist.

### Type checking
We need to use accessors to control properties types.

This is `Customer` class with `string` property:

    /**
     * @property string $name Customer name.
     */
    class Customer
    {
        public function getName() : string
        {
            return $this->name;
        }

        public function setName(string $data)
        {
            $this->name = $data;
        }
    }

This is `Order` class with `Customer` property:

    /**
     * @property Customer $customer
     */
    class Order
    {
        public function getCustomer() : Customer
        {
            return $this->customer;
        }

        public function setCustomer(Customer $data)
        {
            $this->customer = $data;
        }
    }

This is code without errors (all types are expected):

    $customer = new Customer();
    $customer->setName('John Dow');
    $order = new Order();
    $order->setCustomer($customer);
    $this->assertTrue(is_string($order->getCustomer()->getName()));

This code will throw a `\TypeError` exception:

    $customer = new class {};
    $customer->name = 'John Dow';
    $order = new Order();
    $order->setCustomer($customer);

[More...](./docs/020_TypeChecking.md)

## Data Objects

### Structure

### Paths
With paths we will have property value if chain of properties exists or `null` otherwise:

    $code = $obj->get('sub/code');
    $code = $obj->get('/sub/code');    // equals to 'sub/code'
    $code = $obj->get('/subs/0/code'); // 'subs' is array
    $code = $obj->get('/sub/code/does/not/exist'); // 'null' is returned, no error is occured

Also we can set data property by path:

    $obj->set('order/customer/name', 'John Dow');

### Type hinting

## Installation
Add to `composer.json`:

    "require": {
        "flancer32/php_data_object": "0.1.0"
    }

## Development

    $ composer install
    $ ./vendor/bin/phpunit -c ./test/unit/phpunit.dist.xml


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace Utilities
{
    public class Logger
    {
        public static bool EchoToConsole = true;

        public static bool LogsInUTC = true;

        protected StreamWriter LogStream = null;
        protected bool UseTimestamps = false;
        protected bool UseDatestamps = false;
        protected IDecorator Decorator = null;

        public Logger(IDecorator dec, FileInfo file, string title, bool timeStamp, bool datestamp)
        {
            if (dec == null)
                return;

            Decorator = dec;

            LogStream = null;
            try
            {
                bool header = !file.Exists;

                LogStream = new StreamWriter(file.OpenWrite());

                if (!file.Exists)
                    LogStream.Write(Decorator.LogFileHeader(file.Name));

                LogStream.Write(Decorator.LogSessionOpen());
                WriteLogLine("Session opened.", true, true);
            }
            catch (Exception /*ex*/)
            {
                if (LogStream != null)
                    LogStream.Close();

                LogStream = null;
            }
        }

        ~Logger()
        {
            if (LogStream != null)
            {
                WriteLogLine("Session closed.", true, true);
                LogStream.Write(Decorator.LogSessionClose());

                LogStream.Close();
            }
            LogStream = null;
        }

        public void Log(string entry)
        {
            WriteLogLine(entry, UseTimestamps, UseDatestamps);
        }

        protected DateTime GetNow()
        {
            return LogsInUTC ? DateTime.UtcNow : DateTime.Now;
        }

        protected void WriteLogLine(string entry, bool timestamp, bool datestamp)
        {
            string data = string.Empty;

            DateTime now = GetNow();

            if (datestamp)
                data += "[" + now.ToShortDateString() + "] ";

            if (timestamp)
                data += "[" + now.ToShortTimeString() + "] ";

            data += entry;

            string line = Decorator.LogDecorate(data);
            LogStream.Write(line);

            LogStream.Flush();
            Console.WriteLine(line);
        }
    }
}


text:
About
Contact


text:
/*
 * Example Contiki test script (JavaScript).
 * A Contiki test script acts on mote output, such as via printf()'s.
 * The script may operate on the following variables:
 *  Mote mote, int id, String msg
 */

TIMEOUT(2000, log.log("last message: " + msg + "\n"));

WAIT_UNTIL(msg.equals('Hello, world'));
log.testOK();


text:
#include "CCPULinearForceAffector.h"
#include "extensions/Particle3D/PU/CCPUParticleSystem3D.h"

NS_CC_BEGIN

//-----------------------------------------------------------------------
void PULinearForceAffector::preUpdateAffector(float deltaTime)
{
    // Scale force
    _scaledVector = _forceVector * deltaTime;
}
//-----------------------------------------------------------------------

void PULinearForceAffector::updatePUAffector( PUParticle3D *particle, float /*deltaTime*/ )
{
    //for (auto iter : _particleSystem->getParticles())
    {
        //PUParticle3D *particle = iter;
        // Affect the direction and take the specialisation into account
        if (_forceApplication == FA_ADD)
        {
            particle->direction += _scaledVector * calculateAffectSpecialisationFactor(particle);
        }
        else
        {
            particle->direction = (particle->direction + _forceVector) / 2;
        }
    }

}

PULinearForceAffector* PULinearForceAffector::create()
{
    auto plfa = new (std::nothrow) PULinearForceAffector();
    plfa->autorelease();
    return plfa;
}

void PULinearForceAffector::copyAttributesTo( PUAffector* affector )
{
    PUBaseForceAffector::copyAttributesTo(affector);
}

NS_CC_END


text:
using System;
using System.Diagnostics.CodeAnalysis;

namespace Tests.Unit.Lender.Slos.Database.Bases
{
    [ExcludeFromCodeCoverage]
    public class SurfaceTestingBase<TContext> : IDisposable
        where TContext : TestContextBase, new()
    {
        ~SurfaceTestingBase()
        {
            Dispose(false);
        }

        protected TContext TestFixtureContext { get; private set; }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Clean up all managed resources
                if (TestFixtureContext != null) TestFixtureContext.Dispose();
            }

            // Clean up any unmanaged resources here.
        }

        protected void SetUpTestFixture(
            TContext context = null,
            bool buildSchema = false)
        {
            TestFixtureContext = context ?? new TContext();

            TestFixtureContext.InitializeConnection();
        }
    }
}


text:
package com.purejadeite.jadegreen.content;

import java.util.List;
import java.util.Map;

import com.purejadeite.jadegreen.definition.DefinitionInterface;
import com.purejadeite.util.collection.Table;

/**
 * Excelファイルから取得した値
 * @author mitsuhiroseino
 */
public interface ContentInterface<P extends ContentInterface<?, ?>, D extends DefinitionInterface<?>> {

	public List<String> getKey();

	public String getUuid();

	/**
	 * 定義IDを取得します
	 * @return 定義ID
	 */
	public String getId();

	/**
	 * 完全な定義IDを取得します
	 * @return 完全な定義ID
	 */
	public String getFullId();

	/**
	 * 項目名を取得します
	 * @return 項目名
	 */
	public String getName();

	/**
	 * 定義を取得します
	 * @return 定義
	 */
	public D getDefinition();

	/**
	 * 編集していない値を取得します
	 * @return 値
	 */
	public Object getRawValues();

	/**
	 * 編集した値を取得します
	 * @return 値
	 */
	public Object getValues();

	/**
	 * コンテンツをMap形式で取得します
	 * @return コンテンツ
	 */
	public Map<String,Object> toMap();

	/**
	 * 自身の属するブックコンテンツを取得します
	 * @return ブックコンテンツ
	 */
	public BookContent getBook();

	/**
	 * 自身の属するシートコンテンツを取得します
	 * @return シートコンテンツ
	 */
	public SheetContent getSheet();

	/**
	 * 指定のシート定義のシートコンテンツを全て取得します
	 * @param sheetDefinition シートの定義
	 * @return シートコンテンツのリスト
	 */
	public List<SheetContent> getSheets(DefinitionInterface<?> sheetDefinition);

	/**
	 * myKeyDefinitionの示すコンテンツと等しい値を持つ、keyDefinitionの示すコンテンツのシートを取得します
	 * @param myKeyContent キーとなるコンテンツの定義
	 * @param keyDefinition 比較対象のコンテンツの定義
	 * @return キーの一致するシートのリスト
	 */
	public List<SheetContent> getSheets(DefinitionInterface<?> myKeyDefinition, DefinitionInterface<?> keyDefinition);

	/**
	 * myKeyContentと等しい値を持つ、keyDefinitionの示すコンテンツのシートを取得します
	 * @param myKeyContent キーとなる値を持ったコンテンツ
	 * @param keyDefinition 比較対象のコンテンツの定義
	 * @return キーの一致するシートのリスト
	 */
	public List<SheetContent> getSheets(ContentInterface<?, ?> myKeyContent, DefinitionInterface<?> keyDefinition);

	/**
	 * 自身の属するテーブルコンテンツを取得します
	 * @return テーブルコンテンツ
	 */
	public TableContentInterface getTable();

	/**
	 * 自身の属するカテゴリコンテンツを取得します
	 * @return カテゴリコンテンツ
	 */
	public CategoryContentInterface getCategory();

	/**
	 * 自身の配下にある指定のセル定義のセルコンテンツを取得します
	 * @param cellDefinition セル定義
	 * @return セルコンテンツ
	 */
	public ContentInterface<?, ?> getCell(DefinitionInterface<?> cellDefinition);

	/**
	 * 自身の配下にある指定のIDのセルコンテンツを取得します
	 * @param id 定義ID
	 * @return セルコンテンツ
	 */
	public ContentInterface<?, ?> getCell(String id);

	/**
	 * 任意のコンテンツを取得します
	 * @param definition 定義
	 * @return 指定の定義のコンテンツリスト
	 */
	public List<ContentInterface<?, ?>> getContents(DefinitionInterface<?> definition);

	/**
	 * 親を取得します
	 * @return 親コンテンツ
	 */
	public P getParent();

	public int capture(Table<String> table);

}


text:
package bookshop2.seller.outgoing.orderRejected;

import org.aries.bean.Proxy;
import org.aries.tx.service.rmi.RMIProxy;

public class OrderRejectedReplyProxyForRMI extends RMIProxy implements Proxy<OrderRejectedReply> {

	private OrderRejectedReplyInterceptor orderRejectedReplyInterceptor;

	public OrderRejectedReplyProxyForRMI(String serviceId, String host, int port) {
		super(serviceId, host, port);
		createDelegate();
	}

	protected void createDelegate() {
		orderRejectedReplyInterceptor = new OrderRejectedReplyInterceptor();
		orderRejectedReplyInterceptor.setProxy(this);
	}

	@Override
	public OrderRejectedReply getDelegate() {
		return orderRejectedReplyInterceptor;
	}

}


text:
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>

#include <bp-checks.h>

/* This must be initialized data because commons can't have aliases.  */
void *__curbrk = 0;

/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
   to work around different old braindamage in the old Linux ELF dynamic
   linker.  */
weak_alias (__curbrk, ___brk_addr)

int
__brk (void *addr)
{
  void *__unbounded newbrk;

  INTERNAL_SYSCALL_DECL (err);
  newbrk = (void *__unbounded) INTERNAL_SYSCALL (brk, err, 1,
						 __ptrvalue (addr));

  __curbrk = newbrk;

  if (newbrk < addr)
    {
      __set_errno (ENOMEM);
      return -1;
    }

  return 0;
}
weak_alias (__brk, brk)


text:
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System.Collections;

public class selectionScript : MonoBehaviour {

	public Canvas selectionMenu;
	public Canvas valueCanvas;
	public Button characterOne;
	public Button characterTwo;
	public Button characterThree;
	public Button valueOne;
	public Button valueTwo;
	public Image char1;
	public Image char2;
	public Image char3;
	public Image char4;
	public Image char5;
	public Image char6;
	public Text User1;
	public Text CPU;
	public int selectCounter;

	// Use this for initialization
	void Start () {
		selectionMenu = selectionMenu.GetComponent<Canvas> ();
		valueCanvas = valueCanvas.GetComponent<Canvas> ();
		characterOne = characterOne.GetComponent<Button> ();
		characterTwo = characterTwo.GetComponent<Button> ();
		characterThree = characterThree.GetComponent<Button> ();
		valueOne = valueOne.GetComponent<Button> ();
		valueTwo = valueTwo.GetComponent<Button> ();
		char1 = char1.GetComponent<Image> ();
		char2 = char2.GetComponent<Image> ();
		char3 = char3.GetComponent<Image> ();
		char4 = char4.GetComponent<Image> ();
		char5 = char5.GetComponent<Image> ();
		char6 = char6.GetComponent<Image> ();
		valueCanvas.enabled = false;
		char1.enabled = false;
		char2.enabled = false;
		char3.enabled = false;
		char4.enabled = false;
		char5.enabled = false;
		char6.enabled = false;
		User1.enabled = true;
		CPU.enabled = false;
		valueOne.enabled = false;
		valueTwo.enabled = false;
		selectCounter = 0;
	}

	public void turnFinder (){
		if (selectCounter % 2 == 0) {
			CPU.enabled = false;
			User1.enabled = true;
		}
		else {
			User1.enabled = false;
			CPU.enabled = true;
		}
	}

	public void valuePicker (){
		characterOne.interactable = false;
		characterTwo.interactable = false;
		characterThree.interactable = false;
		valueCanvas.enabled = true;
		valueOne.enabled = true;
		valueTwo.enabled = true;
	}

	public void spawnOne (){
		characterOne.interactable = true;
		characterTwo.interactable = true;
		characterThree.interactable = true;
		valueCanvas.enabled = false;
		//associate value to character
	}

	public void spawnTwo (){
		characterOne.interactable = true;
		characterTwo.interactable = true;
		characterThree.interactable = true;
		valueCanvas.enabled = false;
		//associate value to character
	}

	public void characterOnePress(){
		selectCounter = selectCounter + 1;
		turnFinder ();
		if(selectCounter % 2 != 0){
			char1.enabled = true;
			char2.enabled = false;
			char3.enabled = false;
			char4.enabled = false;
			char5.enabled = false;
			char6.enabled = false;
			}
		else{
			char1.enabled = false;
			char2.enabled = false;
			char3.enabled = false;
			char4.enabled = true;
			char5.enabled = false;
			char6.enabled = false;
		}
		valuePicker ();
	}

	public void characterTwoPress(){
		selectCounter = selectCounter + 1;
		turnFinder ();
		if(selectCounter % 2 != 0){
			char1.enabled = false;
			char2.enabled = true;
			char3.enabled = false;
			char4.enabled = false;
			char5.enabled = false;
			char6.enabled = false;
		}
		else{
			char1.enabled = false;
			char2.enabled = false;
			char3.enabled = false;
			char4.enabled = false;
			char5.enabled = true;
			char6.enabled = false;
		}
		valuePicker ();
	}

	public void characterThreePress(){
		selectCounter = selectCounter + 1;
		turnFinder ();
		if(selectCounter % 2 != 0){
			char1.enabled = false;
			char2.enabled = false;
			char3.enabled = true;
			char4.enabled = false;
			char5.enabled = false;
			char6.enabled = false;
		}
		else{
			char1.enabled = false;
			char2.enabled = false;
			char3.enabled = false;
			char4.enabled = false;
			char5.enabled = false;
			char6.enabled = true;
		}
		valuePicker ();
	}

}


text:
require "spec_helper"
require "heroku/command/auth"

describe Heroku::Command::Auth do
  describe "auth" do
    it "displays heroku help auth" do
      stderr, stdout = execute("auth")

      expect(stderr).to eq("")
      expect(stdout).to include "Additional commands"
      expect(stdout).to include "auth:login"
      expect(stdout).to include "auth:logout"
    end
  end

  describe "auth:token" do

    it "displays the user's api key" do
      stderr, stdout = execute("auth:token")
      expect(stderr).to eq("")
      expect(stdout).to eq <<-STDOUT
apikey01
STDOUT
    end
  end

  describe "auth:whoami" do
    it "displays the user's email address" do
      stderr, stdout = execute("auth:whoami")
      expect(stderr).to eq("")
      expect(stdout).to eq <<-STDOUT
email@example.com
STDOUT
    end

  end

end


text:
package edu.neu.ccs.pyramid.regression;

import edu.neu.ccs.pyramid.feature.Feature;

/**
 * Created by chengli on 2/28/15.
 */
public class LinearRule implements Rule {
    private Feature feature;
    private double weight;
    private double featureValue;
    private double score;

    public LinearRule() {
    }

    public Feature getFeature() {
        return feature;
    }

    public void setFeature(Feature feature) {
        this.feature = feature;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getFeatureValue() {
        return featureValue;
    }

    public void setFeatureValue(double featureValue) {
        this.featureValue = featureValue;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("LinearRule{");
        sb.append("feature=").append(feature);
        sb.append(", weight=").append(weight);
        sb.append(", featureValue=").append(featureValue);
        sb.append(", score=").append(score);
        sb.append('}');
        return sb.toString();
    }
}


text:
module RoarExtensions::Helpers
  module EmbeddedParameterParsing

    def self.included(base)
      base.class_eval do
        before_filter :parse_embedded_params_filter
      end
    end

    def parse_embedded_params_filter
      params[:embedded] = parse_embedded_params(params[:embedded])
    end

    def parse_embedded_params(embedded_str)
      parse_embedded_params_list((embedded_str || '').split(','))
    end

  private
    def parse_embedded_params_list(embedded)
      with_children, without_children = embedded.map {|embed| embed.split(':', 2) }.
                                                 each {|pair| pair[0] = pair[0].to_sym}.
                                                 partition {|pair| pair.length > 1}

      nested_embeds = with_children.inject({}) {|acc, (direct_embed, child)|
                                                  acc[direct_embed] ||= []
                                                  acc[direct_embed] << child
                                                  acc
                                               }.map do |(direct_embed, children)|
                                                  [direct_embed, parse_embedded_params_list(children)]
                                                end

      without_children.flatten!
      without_children << Hash[nested_embeds] unless nested_embeds.empty?
      without_children
    end
  end
end


text:
package ru.gkpromtech.exhibition.media;

import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Hashtable;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;

import ru.gkpromtech.exhibition.R;
import ru.gkpromtech.exhibition.db.DbHelper;
import ru.gkpromtech.exhibition.db.Table;
import ru.gkpromtech.exhibition.events.EventReader;
import ru.gkpromtech.exhibition.model.Entity;
import ru.gkpromtech.exhibition.model.Media;
import ru.gkpromtech.exhibition.model.Online;
import ru.gkpromtech.exhibition.model.Organization;

public class MediaAllFragment extends Fragment {

    private final static int MAX_ROWS_IN_DAY_GROUP = 2;

    private Table<Online> onlineTable;
    private List<Online> online;
    private Context mContext;

    private final static SimpleDateFormat mDateFormat =
            new SimpleDateFormat("dd.MM.yyyy", Locale.getDefault());

    public MediaAllFragment() {
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);
        View view = inflater.inflate(R.layout.fragment_media_tab, container, false);
        mContext = getActivity();

        final MediaGalleryView tab = (MediaGalleryView)view.findViewById(R.id.tab1);
        setTabContentByDate(tab);

        mDateFormat.setTimeZone(TimeZone.getDefault());

        return view;
    }

    void setTabContentByDate(MediaGalleryView tab1) {
        final Hashtable<String, List<Media>> images_by_date = new Hashtable<>();

        onlineTable = DbHelper.getInstance(getActivity()).getTableFor(Online.class);
        online = new ArrayList<>();
        online = onlineTable.select(null, null, null, null, null);

        List<Date> days = EventReader.getInstance(mContext).getDays();

        Calendar calendar = Calendar.getInstance();
        calendar.set(1970, 1, 1);
        Date dayOld = calendar.getTime();
        calendar.set(2100, 12, 31);
        Date dayFuture = calendar.getTime();

        // Идентификаторы Организаторов и соорганизаторов
        Table<Organization> organizations = DbHelper.getInstance(getActivity()).getTableFor(Organization.class);
        String selection = "status IN (0, 1)";
        List<Organization> rows = organizations.select(selection, null, null, null, "status");
        Integer[] MKV_ORG_ID = new Integer[rows.size()];
        int org_index = 0;
        for (Organization org: rows) {
            MKV_ORG_ID[org_index++] = org.id;
        }

        // все до начала выставки
        final List<Media> itemsOld = getMedia(dayOld, days.get(0), MKV_ORG_ID);
        if (itemsOld.size() > 0) {
            String text = getResources().getString(R.string.media_title_old_images);
            images_by_date.put(text, itemsOld);
            tab1.add(text, itemsOld, MAX_ROWS_IN_DAY_GROUP);
        }

        // дни во время выставки
        for (int i = 1; i < days.size()-1; i ++) {
            List<Media> media = getMedia(days.get(i), days.get(i+1), MKV_ORG_ID);
            if (media.size() > 0) {
                tab1.add(mDateFormat.format(days.get(i)), media, MAX_ROWS_IN_DAY_GROUP);
            }
        }

        // все после выставки
        final List<Media> itemsFuture = getMedia(days.get(days.size()-1), dayFuture, MKV_ORG_ID);
        if (itemsFuture.size() > 0) {
            String text = getResources().getString(R.string.media_title_afterparty_images);
            images_by_date.put(text, itemsFuture);
            tab1.add(text, itemsFuture, MAX_ROWS_IN_DAY_GROUP);
        }

        tab1.setOnMediaGalleryInteraction(new MediaGalleryView.MediaGalleryInteraction() {
            @Override
            public void onItemCliked(String group, int index) {
                List<Media> items = images_by_date.get(group);
                Media item = items.get(index);
                if (item.type == Media.IMAGE) {
                    Intent i = new Intent(getActivity(), FullImageActivity.class);
                    i.putExtra("items", (Serializable) items);
                    i.putExtra("index", index);
                    startActivity(i);
                }
                else {
                    VideoPlayerActivity.showVideo(mContext, item);
                }
            }

            @Override
            public void onMoreButtonClicked(String group) {
                List<Media> items = images_by_date.get(group);

                Intent i = new Intent(getActivity(), ImagesGridActivity.class);
                i.putExtra("items", (Serializable) items);
                i.putExtra("header", group);
                startActivity(i);
            }

            @Override
            public void onOnlineItemClicked(int index) {
                Online channel = online.get(index);
                VideoPlayerActivity.showOnlineVideo(getActivity(), channel);
            }

        });
    }

    private List<Media> getMedia(Date from, Date to, Integer[] organizationIds) {
        List<Media> result = new ArrayList<Media>();

        try {
            Table<Media> media = DbHelper.getInstance(getActivity()).getTableFor(Media.class);

            String selection = "f0.createtime >= ? AND f0.createtime < ? AND (t.type=0 OR t.type=1)";

            int orgsLen = (organizationIds != null)? organizationIds.length: 0;

            String[] args = new String[2 + orgsLen];
            args[0] = String.valueOf(from.getTime());
            args[1] = String.valueOf(to.getTime());
            if (orgsLen > 0) {
                selection += " AND t.organizationid IN (" + DbHelper.makePlaceholders(organizationIds.length) + ")";
                System.arraycopy(DbHelper.makeArguments(organizationIds), 0, args, 2, organizationIds.length);
            }

            List<Pair<Entity[], Media>> joinedMedias =
                    media.selectJoined(new Table.Join[]{
                                    new Table.Join("id", ru.gkpromtech.exhibition.model.Object.class, "id")
                            },
                            selection, args, "f0.createtime DESC");

            for (Pair<Entity[], Media> m : joinedMedias) {
                result.add(m.second);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }

        return result;
    }
}


text:
class FontSchumacherMisc < Formula
  desc "X.Org Fonts: font schumacher misc"
  homepage "https://www.x.org/"
  ### http://www.linuxfromscratch.org/blfs/view/svn/x/x7font.html
  url "https://www.x.org/pub/individual/font/font-schumacher-misc-1.1.2.tar.bz2"
  mirror "https://xorg.freedesktop.org/archive/individual/font/font-schumacher-misc-1.1.2.tar.bz2"
  mirror "https://ftp.x.org/archive/individual/font/font-schumacher-misc-1.1.2.tar.bz2"
  sha256 "e444028656e0767e2eddc6d9aca462b16a2be75a47244dbc199b2c44eca87e5a"
  revision 2
  # tag "linuxbrew"

  bottle do
    root_url "https://linuxbrew.bintray.com/bottles-xorg"
    sha256 x86_64_linux: "02904e3a0c4e70b0c59543aba1b476f56ea04dc7b8b5119b83f6f94725395f41"
  end

  keg_only "part of Xorg-fonts package"

  depends_on "bzip2" => [:build, :recommended]
  depends_on "font-util" => :build
  depends_on "fontconfig" => :build
  depends_on "linuxbrew/xorg/bdftopcf" => :build
  depends_on "linuxbrew/xorg/mkfontscale" => :build
  depends_on "pkg-config" => :build

  def install
    args = %W[
      --prefix=#{prefix}
      --sysconfdir=#{etc}
      --localstatedir=#{var}
      --disable-dependency-tracking
      --disable-silent-rules
      --with-fontrootdir=#{share}/fonts/X11
    ]
    args << "--with-compression=bzip2" if build.with? "bzip2"

    system "./configure", *args
    system "make"
    system "make", "install"
  end
end


text:
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.DeviceUpdate.Models
{
    public partial class IotHubSettings : IUtf8JsonSerializable
    {
        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
        {
            writer.WriteStartObject();
            writer.WritePropertyName("resourceId");
            writer.WriteStringValue(ResourceId);
            writer.WriteEndObject();
        }

        internal static IotHubSettings DeserializeIotHubSettings(JsonElement element)
        {
            string resourceId = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("resourceId"))
                {
                    resourceId = property.Value.GetString();
                    continue;
                }
            }
            return new IotHubSettings(resourceId);
        }
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">

	<title>SHTOOLS - License and Copyright</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="css/sh.css">
	<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico">
	<link rel="icon" type="image/vnd.microsoft.icon" href="images/favicon.ico">
	<meta name="description" content="SHTOOLS can be modified and distributed according to the revised BSD license.">

				HOME
				DOWNLOAD
				DOCUMENTATION
				FAQ

>  Home > Documentation

License/Copyright

Copyright © 2005-2016, SHTOOLS

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

	This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed.  In no event shall the copyright owner or
contributors be liable for any direct, indirect, incidental, special,
exemplary, or consequential damages (including, but not limited to,
procurement of substitute goods or services; loss of use, data, or
profits; or business interruption) however caused and on any theory of
liability, whether in contract, strict liability, or tort (including
negligence or otherwise) arising in any way out of the use of this
software, even if advised of the possibility of such damage.

	>  Home > Documentation

			Institut de Physique du Globe de Paris
			University of Sorbonne Paris Cité
			© 2016 SHTOOLS


text:
'use strict';

module.exports = function(config) {
  config.set({
    basePath: '../../',

    singleRun: true,
    browsers: ['PhantomJS'],
    frameworks: ['mocha'],
    reporters: ['spec', 'coverage'],

    coverageReporter: {
      dir: 'coverage/frontend',
      reporters: [
        { type: 'lcov', subdir: '.' },
        { type: 'text-summary' }
      ]
    },

    preprocessors: {
      'dist/*.js': ['coverage']
    },

    plugins: [
      'karma-phantomjs-launcher',
      'karma-chrome-launcher',
      'karma-firefox-launcher',
      'karma-mocha',
      'karma-spec-reporter',
      'karma-coverage'
    ],
    colors: true,
    autoWatch: true,
    files: [
      'node_modules/chai/chai.js',
      'node_modules/chai-datetime/chai-datetime.js',
      'node_modules/chai-shallow-deep-equal/chai-shallow-deep-equal.js',
      'node_modules/q/q.js',
      'node_modules/phantomjs-polyfill/bind-polyfill.js',
      'node_modules/jquery/dist/jquery.js',
      'node_modules/jquery-mockjax/dist/jquery.mockjax.js',
      'node_modules/sinon/pkg/sinon.js',
      'node_modules/sinon-chai/lib/sinon-chai.js',
      'dist/jmap-client.js',
      // This must be here, before the actual tests
      'test/frontend/require.js',
      // Tests
      'test/common/**/*.js',
      'test/frontend/transport/JQueryTransport.js'
    ]
  });
};