text:
<tool id="hicexplorer_hicmergematrixbins" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>merge adjacent bins from a Hi-C contact matrix to reduce its resolution</description>
    <macros>
        <token name="@BINARY@">hicMergeMatrixBins</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        ln -s '$matrix_h5_cooler' 'matrix.$matrix_h5_cooler.ext' &&
        @BINARY@
            --matrix 'matrix.$matrix_h5_cooler.ext'
            --numBins $numBins
            $runningWindow
            --outFileName 'matrix.$matrix_h5_cooler.ext'
        && mv 'matrix.$matrix_h5_cooler.ext' matrix
]]>
    </command>
    <inputs>
        <expand macro='matrix_h5_cooler_macro' />
        <param argument="--numBins" type="integer" min="1" value="3" label="Number of bins to merge" />
        <param argument="--runningWindow" type="boolean" falsevalue="" truevalue="--runningWindow" label="Set to merge for using a running window of length --numBins. Usually not set." />
    </inputs>
    <outputs>
        <data name="outFileName" from_work_dir="matrix" format="cool">
            <change_format>
                <when input_dataset="matrix_h5_cooler" attribute="ext" value="h5" format="h5" />
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="matrix_h5_cooler" value="small_test_matrix.h5" />
            <param name="numBins" value="5" />
            <output name="outFileName" ftype="h5">
                <assert_contents>
                    <has_h5_keys keys='intervals,matrix,nan_bins' />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[

Change matrix resolution
========================

**hicMergeMatrixBins** is used to decrease the resolution of a matrix. With this tool, you can for example create out of a 100 kb
contact matrix a 1000 kb one:

Number of bins to merge = 10

100 kb * 10 = 1000 kb = 1 Mb

Depending on the downstream analyses to perform on a Hi-C matrix generated with HiCExplorer, one might need different bin resolutions. For example using ``hicPlotMatrix`` to display chromatin interactions of a whole chromosome will not produce any meaningful vizualisation if it is performed on a matrix at restriction sites resolution (unmerged). Furthermore, the higher the resolution of a matrix, the more detailed it is, which can make it
difficult to interpret, especially if the read depth of the Hi-C data is not high enough. **hicMergeMatrixBins** address these issues by merging a given number of adjacent bins to reduce Hi-C matrices resolution.

_________________

Usage
-----

To limit the loss of information, it is mandatory to perform **hicMergeMatrixBins** on matrices prior to any correction and any other bin merging (direct output from ``hicBuildMatrix``). After bin merging, ``hicCorrectMatrix`` must be used for downstream analyses requiring corrected matrices.

_________________

Output
------

**hicMergeMatrixBins** outputs a Hi-C matrix with reduced resolution.

Below, we will develop the example of a Hi-C matrix in *Drosophila melanogaster* that we want to display at the whole X-chromosome scale and at the scale of a 1Mb region of the X chromosome. To do this, we performed two different bin merging using **hicMergeMatrixBins** on an uncorrected matrix built at the restiction sites resolution using ``hicBuildMatrix``.

Starting from a matrix with bins of a median length of 529bp (restriction enzyme resolution, here DpnII), running **hicMergeMatrixBins** with a number of bins to merge of 3 produced a matrix with bins of a median length of 1661bp, while **hicMergeMatrixBins** with a number of bins to merge of 50 produced a matrix with bins of a median length of 29798bp.

After the correction of these three matrices using ``hicCorrectMatrix``, we plotted them using ``hicPlotMatrix`` at the scale of the whole X-chromosome and at the scale of the X:2000000-3000000 region to see the effect of bin merging on the interactions visualization.

- **Effect of bins merging at the scale of a chromosome:**

.. image:: $PATH_TO_IMAGES/hicMergeMatrixBins_Xchr.png
   :width: 60 %

When observed altogether, the plots above show that the merging of bins by 50 is the most adequate way to plot interactions for a whole chromosome in *Drosophila melanogaster* when starting from a matrix with bins of a median length of 529bp.

- **Effect of bins merging at the scale of a specific region:**

.. image:: $PATH_TO_IMAGES/hicMergeMatrixBins_Xregion.png
   :width: 60 %

When observed altogether, the plots above show that the merging of bins by 3 is the most adequate way to plot interactions for a region of 1Mb in Drosophila melanogaster when starting from a matrix with bins of a median length of 529bp.

_________________

| For more information about HiCExplorer please consider our documentation on readthedocs.io_

.. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
]]>    </help>
    <expand macro="citations" />
</tool>


text:
/* ========================================================================
 * WIDGETS
 * ======================================================================== */
/* ========================================================================
 * TABLE OF CONTENT
 * ========================================================================
   OVERVIEW
   MINI STAT
   MINI STAT TYPE 2
   MINI STAT TYPE 3
   MINI STAT TYPE 4
   MINI STAT TYPE 5
   BLOG
   PROFILE
   CURRENT CITY
   FORECAST
   VISITOR CHART
   TO-DO
   RECENT ACTIVITY
   OVERVIEW SOCIAL
 * ======================================================================== */
.widget-wrapper {
  position: relative;
  border: none !important;
}
/* ========================================================================
 * OVERVIEW
 * ======================================================================== */
.widget-overview .overview-label {
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.75;
  display: block;
  line-height: normal;
  margin-bottom: 2px;
}
.widget-overview h1 {
  margin: 0;
  line-height: 36px;
  font-size: 38px;
}
.widget-overview .row {
  margin-bottom: 10px;
}
.widget-overview .row:last-child {
  margin-bottom: 0px;
}
.widget-overview h4 {
  margin-top: 2px;
  margin-bottom: 0px;
}
/* ========================================================================
 * MINI STAT
 * ======================================================================== */
.mini-stat {
  padding: 15px;
  margin-bottom: 20px;
}
.mini-stat-chart {
  width: auto;
  height: 60px;
  display: inline-block;
  line-height: 60px;
  text-align: center;
  float: left;
  margin-right: 10px;
}
.mini-stat-icon {
  width: 60px;
  height: 60px;
  display: inline-block;
  line-height: 60px;
  text-align: center;
  font-size: 30px;
  background: none repeat scroll 0% 0% #EEE;
  border-radius: 100%;
  float: left;
  margin-right: 10px;
  color: #FFF;
}
.mini-stat-info {
  font-size: 12px;
  padding-top: 2px;
}
.mini-stat-info span {
  display: block;
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 5px;
  margin-top: 7px;
}
/* ========================================================================
 * MINI STAT TYPE 2
 * ======================================================================== */
.mini-stat-type-2 {
  position: relative;
  background-color: #FBFBFB;
  padding: 10px;
  margin-bottom: 20px;
}
.mini-stat-type-2 h3,
.mini-stat-type-2 p {
  margin: 0;
}
.mini-stat-type-2.border-danger {
  border-top: 15px solid #e9573f;
}
.mini-stat-type-2.border-success {
  border-top: 15px solid #8cc152;
}
.mini-stat-type-2.border-primary {
  border-top: 15px solid #00b1e1;
}
.mini-stat-type-2.border-lilac {
  border-top: 15px solid #906094;
}
.mini-stat-type-2 .text-muted {
  font-size: 10px;
}
.mini-stat-type-2 .overview-icon {
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  height: 50px;
  width: 50px;
  text-align: center;
  display: block;
  content: "";
  line-height: 50px;
  font-size: 30px;
  margin: 15px auto;
}
/* ========================================================================
 * MINI STAT TYPE 3
 * ======================================================================== */
.mini-stat-type-3 {
  position: relative;
  background-color: #FBFBFB;
  padding: 10px;
  margin-bottom: 20px;
}
.mini-stat-type-3 h3 {
  margin-top: 8px;
}
.mini-stat-type-3 .meta-stat {
  display: block;
  border-top: 1px solid #dddddd;
  font-size: 10px;
  color: #A7A7A7;
  padding-top: 5px;
  margin: 0 40px;
}
/* ========================================================================
 * MINI STAT TYPE 4
 * ======================================================================== */
.mini-stat-type-4 {
  text-align: center;
  margin-bottom: 20px;
  background-color: #ffffff;
  padding: 20px;
}
.mini-stat-type-4 h1,
.mini-stat-type-4 h3 {
  margin-top: 0;
  font-weight: 300;
}
.mini-stat-type-4 h1 {
  font-size: 100px;
}
/* ========================================================================
 * MINI STAT TYPE 5
 * ======================================================================== */
.mini-stat-type-5 {
  text-align: center;
  margin-bottom: 20px;
  background-color: #ffffff;
  padding: 20px;
}
.mini-stat-type-5.border-facebook {
  border-top: 5px solid #3b5998;
}
.mini-stat-type-5.border-twitter {
  border-top: 5px solid #00a0d1;
}
.mini-stat-type-5.border-youtube {
  border-top: 5px solid #c4302b;
}
.mini-stat-type-5 h1,
.mini-stat-type-5 h3 {
  margin-top: 0;
  font-weight: 300;
}
.mini-stat-type-5 h3 {
  font-size: 18px;
}
.mini-stat-type-5 h3 .label {
  display: inline-block;
  padding: 0;
  font-size: 10px;
  vertical-align: middle;
  padding-top: 2px;
}
.mini-stat-type-5 h1 {
  font-size: 35px;
  margin: 25px 0;
  position: relative;
}
.mini-stat-type-5 h1 .status,
.mini-stat-type-5 h1 .number {
  display: inline-block;
}
.mini-stat-type-5 h1 .status {
  font-size: 15px;
  vertical-align: middle;
  margin-left: -55px;
}
.mini-stat-type-5 h1 .status .percent,
.mini-stat-type-5 h1 .status i {
  display: block;
}
.mini-stat-type-5 p {
  margin: 0;
  font-size: 12px;
}
/* ========================================================================
 * BLOG
 * ======================================================================== */
.panel-blog {
  padding: 20px;
}
.panel-blog .panel-body {
  background-color: #ffffff !important;
}
#blog-list .blog-title {
  color: #333;
  margin: 5px 0px 0px 0px;
  font-weight: 400;
  font-size: 16px;
}
#blog-list .blog-title a {
  color: #333;
}
#blog-list .blog-subtitle {
  font-size: 15px;
  text-transform: uppercase;
  color: #333;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 15px;
  margin-top: 20px;
}
#blog-list .blog-meta {
  list-style: none;
  padding: 0px;
  margin: 5px 0px;
  display: block;
}
#blog-list .blog-meta:after {
  clear: both;
  display: block;
  content: '';
}
#blog-list .blog-meta li {
  float: left;
  padding: 0px 5px;
  border-right: 1px solid #DDD;
  line-height: normal;
  font-size: 11px;
  margin-bottom: 5px;
}
#blog-list .blog-meta li:first-child {
  padding-left: 0px;
}
#blog-list .blog-meta li:last-child {
  padding-right: 0;
  border-right: 0;
}
#blog-list .blog-author {
  margin: 20px 0px 30px;
  border-top: 1px solid #dddddd;
  border-bottom: 1px solid #dddddd;
  padding: 20px 0px;
}
#blog-list .blog-item {
  background: #fcfcfc;
  margin-bottom: 20px;
  position: relative;
}
#blog-list .blog-item .carousel {
  margin-bottom: 10px;
  padding-right: 10px;
  width: 300px;
}
#blog-list .blog-item .carousel:hover .carousel-control {
  display: block;
}
#blog-list .blog-item .carousel-caption {
  bottom: 10px;
  right: 10px;
  left: auto;
  padding-bottom: 0px;
  padding-top: 0px;
}
#blog-list .blog-item .carousel-control {
  display: block;
  background-image: none;
}
#blog-list .blog-item .carousel-control span {
  position: absolute;
  top: 40%;
  font-size: 20px;
  width: 30px;
  height: 30px;
  border: 1px solid white;
  border-radius: 50%;
  line-height: 27px;
}
#blog-list .blog-item .carousel-control.left span {
  right: 0px;
}
#blog-list .blog-item .carousel-control.right {
  right: 12px;
}
#blog-list .blog-item .carousel-control.right span {
  left: 0px;
}
#blog-list .blog-item .carousel-indicators {
  left: 15px;
  margin-left: 0px;
  bottom: 0px;
  width: auto;
}
#blog-list .blog-img {
  padding-right: 10px;
  width: 300px;
}
#blog-list .blog-details {
  padding-top: 4px;
}
#blog-list .blog-img,
#blog-list .blog-details,
#blog-list .quote,
#blog-list .carousel {
  display: table-cell;
  vertical-align: top;
}
#blog-list .blog-summary {
  font-size: 13px;
}
#blog-list .blog-summary p {
  margin: 5px 0px;
}
#blog-list .blog-summary .btn {
  margin-top: 5px;
}
#blog-list .blog-quote .quote-primary a {
  color: #fff;
  background-color: #00b1e1;
}
#blog-list .blog-quote .quote-primary a:hover {
  background-color: #009dc8;
}
#blog-list .blog-quote .quote-success a {
  color: #fff;
  background-color: #8cc152;
}
#blog-list .blog-quote .quote-success a:hover {
  background-color: #7fb842;
}
#blog-list .blog-quote .quote-info a {
  color: #fff;
  background-color: #63d3e9;
}
#blog-list .blog-quote .quote-info a:hover {
  background-color: #4dcde6;
}
#blog-list .blog-quote .quote-warning a {
  color: #fff;
  background-color: #f6bb42;
}
#blog-list .blog-quote .quote-warning a:hover {
  background-color: #f5b22a;
}
#blog-list .blog-quote .quote-danger a {
  color: #fff;
  background-color: #e9573f;
}
#blog-list .blog-quote .quote-danger a:hover {
  background-color: #e64328;
}
#blog-list .blog-quote .quote-lilac a {
  color: #fff;
  background-color: #906094;
}
#blog-list .blog-quote .quote-lilac a:hover {
  background-color: #815685;
}
#blog-list .blog-quote .quote-inverse a {
  color: #fff;
  background-color: #2a2a2a;
}
#blog-list .blog-quote .quote-inverse a:hover {
  background-color: #1d1d1d;
}
#blog-list .blog-quote .quote-teal a {
  color: #fff;
  background-color: #37bc9b;
}
#blog-list .blog-quote .quote-teal a:hover {
  background-color: #31a88b;
}
#blog-list .blog-quote .quote {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  width: 300px;
  padding-right: 10px;
}
#blog-list .blog-quote .quote a {
  padding: 22px;
  color: white;
  display: block;
  text-align: center;
  text-decoration: none;
}
#blog-list .blog-quote .quote a:hover {
  text-decoration: none;
}
#blog-list .blog-quote .quote-author {
  display: block;
  opacity: 0.5;
}
#blog-list .blog-quote .blog-meta {
  margin-top: 5px;
  margin-bottom: 5px;
}
#blog-list .blog-video {
  display: table-cell;
  position: relative;
  width: 290px;
  overflow: hidden;
  vertical-align: top;
  height: 235px;
}
#blog-list .blog-video iframe {
  position: absolute;
  width: 100%;
  height: 218px;
  border: none;
  top: 0;
  left: 0;
}
#blog-list .blog-video + .blog-details {
  padding-left: 10px;
}
#blog-list .blog-grid .media {
  border-bottom: 1px solid #dddddd;
  padding: 15px;
  margin: 0px;
}
#blog-list .blog-grid .media:last-child {
  border-bottom: none;
  margin-bottom: 20px;
}
#blog-list .blog-grid .thumbnail {
  margin: 0px;
}
#blog-list .blog-grid a {
  font-size: 13px;
}
#blog-list .blog-grid b {
  font-size: 12px;
}
#blog-list .blog-grid img {
  width: 55px;
}
#blog-list .blog-list-slider .carousel-indicators {
  top: -33px;
  right: 10px;
  width: 17%;
  left: inherit;
}
.blog-title {
  color: #333;
  margin: 0px;
  font-weight: 400;
  font-size: 16px;
}
.blog-title a {
  color: #333;
}
.blog-subtitle {
  font-size: 15px;
  text-transform: uppercase;
  color: #333;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 15px;
  margin-top: 20px;
}
.blog-meta {
  list-style: none;
  padding: 0px;
  margin: 10px 0px 10px;
  display: block;
}
.blog-meta:after {
  clear: both;
  display: block;
  content: '';
}
.blog-meta li {
  float: left;
  padding: 0px 5px;
  border-right: 1px solid #DDD;
  line-height: normal;
  font-size: 11px;
  margin-bottom: 5px;
}
.blog-meta li:first-child {
  padding-left: 0px;
}
.blog-meta li:last-child {
  padding-right: 0;
  border-right: 0;
}
.blog-img {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}
.blog-author {
  margin: 20px 0px 30px;
  border-top: 1px solid #dddddd;
  border-bottom: 1px solid #dddddd;
  padding: 20px 0px;
}
.blog-item {
  background: #fcfcfc;
  margin-bottom: 20px;
  position: relative;
}
.blog-item .carousel {
  margin-bottom: 10px;
}
.blog-item .carousel:hover .carousel-control {
  display: block;
}
.blog-item .carousel-caption {
  bottom: 10px;
  right: 10px;
  left: auto;
  padding-bottom: 0px;
  padding-top: 0px;
}
.blog-item .carousel-control {
  display: block;
  background-image: none;
}
.blog-item .carousel-control span {
  position: absolute;
  top: 40%;
  font-size: 20px;
  width: 30px;
  height: 30px;
  border: 1px solid white;
  border-radius: 50%;
  line-height: 27px;
}
.blog-item .carousel-control.left span {
  right: 0px;
}
.blog-item .carousel-control.right span {
  left: 0px;
}
.blog-item .carousel-indicators {
  left: 15px;
  margin-left: 0px;
  bottom: 0px;
  width: auto;
}
.blog-details {
  padding: 10px;
}
.blog-summary {
  font-size: 13px;
}
.blog-summary p {
  margin: 10px 0;
}
.blog-summary .btn {
  margin-top: 10px;
}
.blog-quote .quote-primary a {
  color: #fff;
  background-color: #00b1e1;
}
.blog-quote .quote-primary a:hover {
  background-color: #009dc8;
}
.blog-quote .quote-success a {
  color: #fff;
  background-color: #8cc152;
}
.blog-quote .quote-success a:hover {
  background-color: #7fb842;
}
.blog-quote .quote-info a {
  color: #fff;
  background-color: #63d3e9;
}
.blog-quote .quote-info a:hover {
  background-color: #4dcde6;
}
.blog-quote .quote-warning a {
  color: #fff;
  background-color: #f6bb42;
}
.blog-quote .quote-warning a:hover {
  background-color: #f5b22a;
}
.blog-quote .quote-danger a {
  color: #fff;
  background-color: #e9573f;
}
.blog-quote .quote-danger a:hover {
  background-color: #e64328;
}
.blog-quote .quote-lilac a {
  color: #fff;
  background-color: #906094;
}
.blog-quote .quote-lilac a:hover {
  background-color: #815685;
}
.blog-quote .quote-inverse a {
  color: #fff;
  background-color: #2a2a2a;
}
.blog-quote .quote-inverse a:hover {
  background-color: #1d1d1d;
}
.blog-quote .quote-teal a {
  color: #fff;
  background-color: #37bc9b;
}
.blog-quote .quote-teal a:hover {
  background-color: #31a88b;
}
.blog-quote .quote {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
}
.blog-quote .quote a {
  padding: 15px;
  color: white;
  display: block;
  text-align: center;
}
.blog-quote .quote a:hover {
  text-decoration: none;
}
.blog-quote .quote-author {
  display: block;
  opacity: 0.5;
  text-transform: capitalize;
}
.blog-quote .blog-meta {
  margin-top: 5px;
  margin-bottom: 5px;
}
.blog-video {
  overflow: hidden;
  height: 0;
  padding-top: 43px;
  padding-bottom: 50%;
  position: relative;
}
.blog-video iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
  top: 0;
  left: 0;
}
.blog-list .media {
  border-bottom: 1px solid #dddddd;
  padding: 15px;
  margin: 0px;
}
.blog-list .media:last-child {
  border-bottom: none;
  margin-bottom: 20px;
}
.blog-list .thumbnail {
  margin: 0px;
}
.blog-list a {
  font-size: 13px;
}
.blog-list b {
  font-size: 12px;
}
.blog-list img {
  width: 55px;
}
.blog-list-slider .carousel-indicators {
  top: -33px;
  right: 10px;
  width: 17%;
  left: inherit;
}
.blog-tags {
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-tags li,
.blog-tags a {
  display: inline-block;
  height: 24px;
  line-height: 24px;
  position: relative;
  font-size: 11px;
}
.blog-tags li {
  padding: 0px;
  margin-bottom: 10px;
}
.blog-tags a {
  margin-left: 20px;
  padding: 0 10px 0 12px;
  background: #00b1e1;
  color: #fff;
  text-decoration: none;
  -moz-border-radius-bottomright: 4px;
  -webkit-border-bottom-right-radius: 4px;
  border-bottom-right-radius: 4px;
  -moz-border-radius-topright: 4px;
  -webkit-border-top-right-radius: 4px;
  border-top-right-radius: 4px;
}
.blog-tags a:before {
  content: "";
  float: left;
  position: absolute;
  top: 0;
  left: -12px;
  width: 0;
  height: 0;
  border-color: transparent #00b1e1 transparent transparent;
  border-style: solid;
  border-width: 12px 12px 12px 0;
}
.blog-tags a:after {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  float: left;
  width: 4px;
  height: 4px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
  border-radius: 2px;
  background: #fff;
  -moz-box-shadow: -1px -1px 2px #00a5d2;
  -webkit-box-shadow: -1px -1px 2px #00a5d2;
  box-shadow: -1px -1px 2px #00a5d2;
}
.blog-tags a:hover {
  background: #555;
  color: white;
}
.blog-tags a:hover:before {
  border-color: transparent #555 transparent transparent;
}
.blog-twitter .blog-twitter-list {
  padding: 5px;
  position: relative;
  margin-bottom: 10px;
  border-right: solid 2px #dddddd;
}
.blog-twitter .blog-twitter-list:hover {
  background-color: #e1e1e1;
  border-right: solid 2px #8cc152;
}
.blog-twitter .blog-twitter-list a {
  color: #4d90fe;
}
.blog-twitter .blog-twitter-list p {
  margin-bottom: 0;
}
.blog-twitter .blog-twitter-list span {
  color: #555;
  display: block;
  font-size: 12px;
}
.blog-twitter .blog-twitter-list .blog-twitter-icon {
  color: #c8c8c8;
  right: 10px;
  bottom: 10px;
  font-size: 30px;
  position: absolute;
}
.blog-gallery li {
  padding-right: 3px;
  margin-bottom: 10px;
  opacity: 0.8;
}
.blog-gallery li:hover {
  opacity: 1;
}
.comment-count {
  font-size: 13px;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 15px;
  margin-top: 0px;
}
.comment-list .media {
  border-bottom: 1px dotted #dddddd;
  padding-top: 15px !important;
  padding-bottom: 15px;
}
.comment-list .media:last-child {
  border-bottom: none;
}
.comment-list .media .media {
  border-bottom: none;
  padding-bottom: 0px;
}
.comment-list .media-object {
  width: 60px;
  margin-right: 5px;
}
.comment-list h4 {
  margin: 0px;
  color: #333;
  font-size: 16px;
}
.comment-list .media-body .media {
  border-top: 1px dotted #dddddd;
  padding-top: 15px;
}
.comment-list .media-body p:last-child {
  margin-bottom: 0px;
}
.comment-list .reply {
  padding: 3px 8px;
  line-height: normal;
  border-radius: 2px;
}
@media (max-width: 360px) {
  #blog-list .blog-item {
    height: inherit !important;
  }
  #blog-list .blog-img,
  #blog-list .blog-quote .quote,
  #blog-list .blog-item .carousel,
  #blog-list .blog-video {
    width: 100%;
    display: block;
    padding-right: 0px;
  }
}
/* ========================================================================
 * PROFILE
 * ======================================================================== */
.profile-cover {
  width: 100%;
}
.profile-cover .cover {
  position: relative;
  border: 10px solid #FFF;
}
.profile-cover .cover .inner-cover {
  overflow: hidden;
  height: auto;
}
.profile-cover .cover .inner-cover img {
  border: 1px solid transparent;
  text-align: center;
  width: 100%;
}
.profile-cover .cover .inner-cover .cover-menu-mobile {
  position: absolute;
  top: 10px;
  right: 10px;
}
.profile-cover .cover .inner-cover .cover-menu-mobile button i {
  font-size: 17px;
}
.profile-cover .cover ul.cover-menu {
  padding-left: 150px;
  position: absolute;
  overflow: hidden;
  left: 1px;
  float: left;
  bottom: 0px;
  width: 100%;
  margin: 0px;
  background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.24);
}
.profile-cover .cover ul.cover-menu li {
  display: block;
  float: left;
  margin-right: 0px;
  padding: 0px 10px;
  line-height: 40px;
  height: 40px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  -ms-transition: all 0.3s;
  -o-transition: all 0.3s;
  transition: all 0.3s;
}
.profile-cover .cover ul.cover-menu li:hover {
  background-color: rgba(0, 0, 0, 0.44);
}
.profile-cover .cover ul.cover-menu li.active {
  background-color: rgba(0, 0, 0, 0.64);
}
.profile-cover .cover ul.cover-menu li a {
  color: #FFF;
  font-weight: bold;
  display: block;
  height: 40px;
  line-height: 40px;
  text-decoration: none;
}
.profile-cover .cover ul.cover-menu li a i {
  font-size: 18px;
}
.profile-cover .profile-body {
  margin: 0px auto 10px;
  position: relative;
}
.profile-cover .profile-timeline {
  padding: 15px;
}
/* ========================================================================
 * CURRENT CITY
 * ======================================================================== */
.weather-current-city {
  padding: 10px;
  color: #fff;
  margin-bottom: 20px;
}
.weather-current-city img {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 125px;
  -webkit-border-top-left-radius: 3px;
  -moz-border-radius-topleft: 3px;
  border-top-left-radius: 3px;
  -webkit-border-top-right-radius: 3px;
  -moz-border-radius-topright: 3px;
  border-top-right-radius: 3px;
}
.current-city {
  display: block;
  font-size: 1em;
  font-weight: 700;
  margin-bottom: 10px;
}
.current-temp {
  display: block;
  font-weight: 700;
  letter-spacing: -3px;
  font-size: 2.8em;
  text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
  line-height: 1.1em;
}
.current-day {
  display: block;
  font-size: 1em;
  font-weight: 400;
  position: absolute;
}
.current-day-icon {
  display: block;
  float: right;
  font-size: 5.2em;
  font-weight: 700;
}
ul.days {
  list-style: none outside none;
  margin-top: 20px;
  padding: 0 10px;
  color: #fff;
}
ul.days li {
  text-align: center;
  border-left: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
}
ul.days li:first-child {
  border-left: none;
}
ul.days li strong {
  position: relative;
  border-radius: 3px;
  font-size: 1.1em;
  text-transform: uppercase;
  line-height: 25px;
  margin-bottom: 5px;
  display: block;
}
ul.days li span {
  display: block;
  font-weight: 700;
  letter-spacing: -1px;
  font-size: 1.9em;
  margin-bottom: 5px;
}
/* ========================================================================
 * FORECAST
 * ======================================================================== */
.weather-forecast {
  position: relative;
  color: #fff;
}
.weather-forecast img {
  width: 100%;
  -webkit-border-radius: 3px 3px 0px 0px;
  -moz-border-radius: 3px 3px 0px 0px;
  border-radius: 3px 3px 0px 0px;
}
.weather-forecast .title {
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 400;
  text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.8);
  color: #FFF;
  position: absolute;
  left: 30px;
  bottom: 15px;
}
.weather-forecast .country-select {
  position: absolute;
  top: 10px;
  right: 27px;
}
.weather-full-info {
  color: #CBCBCB;
  background-color: white;
  padding: 20px;
  -webkit-border-radius: 0px 0px 3px 3px;
  -moz-border-radius: 0px 0px 3px 3px;
  border-radius: 0px 0px 3px 3px;
}
.weather-full-info .degree {
  font-size: 27px;
  font-weight: 600;
  display: inline-block;
  padding-left: 10px;
}
.weather-full-info .degree:after {
  content: "o";
  position: relative;
  top: -12px;
  font-size: 16px;
}
.weather-full-info ul {
  margin-bottom: 0px;
}
.weather-full-info ul li {
  list-style: none;
  border-left: 1px dotted #F1F2F7;
}
.weather-full-info ul li:first-child {
  border-left: none;
}
.weather-full-info ul li i {
  font-size: 25px;
}
.weather-full-info h2 {
  font-size: 14px;
  font-weight: 300;
  margin: 0px 0px 5px;
}
.weather-full-info .statistics {
  padding-top: 5px;
}
.weather-full-info .statistics:after {
  content: "o";
  position: relative;
  top: -5px;
  font-size: 10px;
}
.weather-full-info .today-status h1 {
  margin: 0px 0px 20px 0px;
  font-size: 19px;
}
.weather-full-info .today-status i {
  font-size: 30px;
  color: #81b71a;
}
@media (max-width: 600px) {
  .weather-full-info .today-status {
    text-align: center;
  }
}
@media (max-width: 360px) {
  .weather-full-info .today-status {
    margin-bottom: 10px;
  }
  .weather-full-info ul li {
    padding-bottom: 10px;
    padding-top: 10px;
    border-left: none !important;
  }
}
/* ========================================================================
 * VISITOR CHART
 * ======================================================================== */
.stat-stack.widget-visitor > .panel-body {
  background-color: #F5F5F5 !important;
}
.stat-stack.widget-visitor > .panel-body .text-strong {
  color: #636e7b;
}
.stat-stack.widget-visitor > .panel-body .text-muted {
  color: #777;
}
.stat-stack.widget-market > .panel-body {
  background-color: #FBFBFB !important;
}
.widget-visitor .stat-left .panel-footer {
  padding: 20px 10px 10px !important;
}
.widget-visitor .stat-left .panel-footer .border-right {
  border-right: 1px dotted #dddddd;
}
.widget-visitor .stat-left .panel-footer .border-right:last-child {
  border-right: none;
}
.widget-visitor .stat-left .resize-chart {
  height: 250px;
}
.widget-visitor .stat-right .panel-footer {
  padding: 0px 20px 20px !important;
}
.widget-market .stat-left .panel-footer {
  padding: 20px 20px 10px !important;
}
.widget-market .stat-left .resize-chart {
  height: 310px;
}
.widget-market .stat-right .panel-footer {
  padding: 30px 20px 15px !important;
}
.widget-market .stat-right .resize-chart {
  width: 100%;
  height: 270px;
}
@media (max-width: 1024px) {
  .widget-market .stat-left .mini-stat .mini-stat-chart {
    float: none !important;
    margin-left: auto;
    margin-right: auto;
  }
  .widget-market .stat-left .mini-stat .mini-stat-info {
    text-align: center !important;
  }
  .widget-market .stat-left .panel-footer {
    padding: 20px 20px 10px !important;
  }
}
.stat-left {
  background-color: #F5F5F5;
}
.stat-left .panel-heading .panel-toolbar .btn-group .btn {
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.stat-left .panel-heading .panel-toolbar .btn-group .btn.dropdown-toggle {
  border-right: 1px solid rgba(255, 255, 255, 0.5);
}
.stat-left .panel-footer h4 {
  margin-top: 0px;
  margin-bottom: 5px;
}
.stat-left .mini-stat-info span {
  font-size: 18px;
}
.stat-left .mini-stat-info p {
  font-size: 11px;
}
.stat-left .resize-chart {
  width: 100%;
}
.stat-left .resize-chart > .legend > div,
.stat-left .resize-chart > .legend > table {
  top: 0px !important;
  left: 40px !important;
}
.stat-left .resize-chart > .legend > div:first-child {
  background-color: transparent !important;
}
.stat-left .resize-chart > .legend .legendColorBox {
  padding-right: 5px;
}
.stat-left .resize-chart > .legend .legendColorBox > div {
  border: none !important;
}
.stat-left .resize-chart > .legend .legendLabel {
  color: #ffffff;
}
@media (max-width: 360px) {
  .stat-left .panel-footer .row {
    margin: 0px;
  }
  .stat-left .panel-footer [class*="col-"] {
    border-bottom: 1px dotted #dddddd;
    border-right: none !important;
    padding: 10px;
  }
  .stat-left .panel-footer [class*="col-"]:first-child {
    padding-top: 0px;
  }
  .stat-left .panel-footer [class*="col-"]:last-child {
    padding-bottom: 0px;
    border-bottom: none;
  }
}
.stat-right .panel-body {
  -webkit-border-radius: 0px 3px 3px 0px;
  -moz-border-radius: 0px 3px 3px 0px;
  border-radius: 0px 3px 3px 0px;
}
.stat-right .panel-body span {
  font-size: 12px;
}
.stat-right .progress {
  margin-bottom: 11px;
}
.stat-right .income-progress {
  padding: 0px 20px;
  background-color: #FBFBFB;
}
.stat-right .resize-chart {
  width: 100%;
  height: 100px;
}
.stat-right .panel-body {
  padding: 20px 20px 0px 20px !important;
}
.stat-right .panel-footer {
  padding: 0px 20px 10px !important;
  background-color: #FBFBFB;
  border-top: none;
}
.stat-right .panel-footer span {
  font-size: 11px;
}
.stat-right .flot-text {
  font-size: 11px;
  color: #999 !important;
}
/* ========================================================================
 * TO-DO
 * ======================================================================== */
.widget-todo .todo-list {
  list-style: none;
  padding: 0px;
  margin: 0px;
}
.widget-todo .todo-list li {
  border-bottom: 1px solid #dddddd;
  padding: 8px 10px 2px;
}
.widget-todo .todo-list li input:checked + label {
  text-decoration: line-through;
  color: #999;
  font-size: 15px;
}
/* ========================================================================
 * RECENT ACTIVITY
 * ======================================================================== */
.recent-activity {
  margin: 0;
  padding: 0;
  position: relative;
  margin-bottom: 30px;
}
.recent-activity > h3 {
  margin-top: 0;
  font-size: 20px;
  font-weight: 300;
}
.recent-activity-item {
  position: relative;
  margin: 0;
  padding: 0;
}
.recent-activity-item:before {
  content: "";
  position: absolute;
  display: block;
  width: 3px;
  background: #e6e6e8;
  top: 0px;
  bottom: -30px;
  margin-left: 8px;
}
.recent-activity-item.recent-activity-danger:before {
  background: #f6bbb1;
}
.recent-activity-item.recent-activity-danger .recent-activity-badge-userpic {
  border: 3px solid #f6bbb1;
}
.recent-activity-item.recent-activity-success:before {
  background: #cae3b0;
}
.recent-activity-item.recent-activity-success .recent-activity-badge-userpic {
  border: 3px solid #cae3b0;
}
.recent-activity-item.recent-activity-primary:before {
  background: #62ddff;
}
.recent-activity-item.recent-activity-primary .recent-activity-badge-userpic {
  border: 3px solid #62ddff;
}
.recent-activity-item.recent-activity-info:before {
  background: #d3f3f9;
}
.recent-activity-item.recent-activity-info .recent-activity-badge-userpic {
  border: 3px solid #d3f3f9;
}
.recent-activity-item.recent-activity-warning:before {
  background: #fce7bc;
}
.recent-activity-item.recent-activity-warning .recent-activity-badge-userpic {
  border: 3px solid #fce7bc;
}
.recent-activity-item.recent-activity-lilac:before {
  background: #c6abc9;
}
.recent-activity-item.recent-activity-lilac .recent-activity-badge-userpic {
  border: 3px solid #c6abc9;
}
.recent-activity-item.recent-activity-teals:before {
  background: #93dfcc;
}
.recent-activity-item.recent-activity-teals .recent-activity-badge-userpic {
  border: 3px solid #93dfcc;
}
.recent-activity-item.recent-activity-inverse:before {
  background: #6a6a6a;
}
.recent-activity-item.recent-activity-inverse .recent-activity-badge-userpic {
  border: 3px solid #6a6a6a;
}
.recent-activity-item.recent-activity-last:before {
  content: initial;
}
.recent-activity-badge {
  float: left;
  position: relative;
  padding-right: 20px;
  height: 20px;
  width: 20px;
}
.recent-activity-badge-userpic {
  width: 20px;
  height: 20px;
  content: "";
  display: block;
  border: 3px #f3f3f4 solid;
  background-color: #f3f3f4;
  -webkit-border-radius: 50% !important;
  -moz-border-radius: 50% !important;
  border-radius: 50% !important;
}
.recent-activity-body {
  position: relative;
  padding: 0;
  margin-top: 10px;
  margin-left: 30px;
}
.recent-activity-body:before,
.recent-activity-body:after {
  content: " ";
  display: table;
}
.recent-activity-body:after {
  clear: both;
}
.recent-activity-body-head {
  margin-bottom: 10px;
}
.recent-activity-body-title {
  font-size: 15px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0;
  text-transform: capitalize;
}
.recent-activity-body-content {
  font-size: 13px;
  margin-top: 10px;
}
.recent-activity-body-content p:last-child {
  margin-bottom: 0;
}
.text-muted {
  color: #B0ADAD;
}
@media (max-width: 768px) {
  .recent-activity-body-head-caption {
    width: 100%;
  }
}
/* ========================================================================
 * OVERVIEW SOCIAL
 * ======================================================================== */
.widget-social-overview {
  position: relative;
}
.widget-social-overview .bg-facebook .ct-series-a .ct-line,
.widget-social-overview .bg-facebook .ct-series-a .ct-point {
  stroke: #FFFFFF;
}
.widget-social-overview .bg-facebook .ct-series-b .ct-line,
.widget-social-overview .bg-facebook .ct-series-b .ct-point {
  stroke: #87A1D0;
}
.widget-social-overview .bg-twitter .ct-series-a .ct-line,
.widget-social-overview .bg-twitter .ct-series-a .ct-point {
  stroke: #42C9F2;
}
.widget-social-overview .bg-youtube .ct-series-a .ct-area,
.widget-social-overview .bg-youtube .ct-series-a .ct-point {
  stroke: #FFFFFF;
  fill: #DABFBF;
}
.widget-social-overview .bg-youtube .ct-series-b .ct-area,
.widget-social-overview .bg-youtube .ct-series-b .ct-point {
  stroke: #F7403A;
  fill: #590502;
}
.widget-social-overview .overview-heading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px;
}
.widget-social-overview .overview-heading h3 {
  margin: 0;
  padding: 0;
}
.widget-social-overview .overview-heading .mark,
.widget-social-overview .overview-heading .inline {
  display: inline-block;
}
.widget-social-overview .overview-heading .mark {
  height: 10px;
  width: 10px;
  float: left;
  margin-top: 5px;
  margin-right: 5px;
}
.widget-social-overview .overview-heading ul li:last-child {
  padding-right: 0;
}
.widget-social-overview .panel-heading {
  padding-top: 50px !important;
  border-bottom: none !important;
}
.widget-social-overview .panel-body h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 300;
  color: #A5A5A5;
}
.widget-social-overview .panel-body p {
  text-align: left;
  font-weight: bold;
  font-size: 23px;
  margin: 0;
  padding: 0;
  color: #3f5fa3;
}
.widget-social-overview .panel-body p i {
  color: #3f5fa3;
  font-size: 20px;
  margin-right: 5px;
}
.widget-social-overview .panel-body .pull-right a {
  text-decoration: none;
}
.widget-social-overview .panel-body .pull-right a:hover i {
  color: #989898;
}
.widget-social-overview .panel-body .pull-right a i {
  font-size: 35px;
  font-weight: 300;
  color: #A5A5A5;
}
.widget-social-overview .ct-chart {
  width: 100%;
  height: 200px;
  margin-left: -10px;
}
.widget-social-overview .ct-grids line {
  stroke: white;
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Cake\Database;

/**
 * Represents a database statement. Concrete implementations
 * can either use PDOStatement or a native driver
 */
interface StatementInterface
{

    /**
     * Assign a value to a positional or named variable in prepared query. If using
     * positional variables you need to start with index one, if using named params then
     * just use the name in any order.
     *
     * It is not allowed to combine positional and named variables in the same statement
     *
     * ### Examples:
     *
     * ```
     * $statement->bindValue(1, 'a title');
     * $statement->bindValue('active', true, 'boolean');
     * $statement->bindValue(5, new \DateTime(), 'date');
     * ```
     *
     * @param string|int $column name or param position to be bound
     * @param mixed $value The value to bind to variable in query
     * @param string $type name of configured Type class
     * @return void
     */
    public function bindValue($column, $value, $type = 'string');

    /**
     * Closes a cursor in the database, freeing up any resources and memory
     * allocated to it. In most cases you don't need to call this method, as it is
     * automatically called after fetching all results from the result set.
     *
     * @return void
     */
    public function closeCursor();

    /**
     * Returns the number of columns this statement's results will contain
     *
     * ### Example:
     *
     * ```
     *  $statement = $connection->prepare('SELECT id, title from articles');
     *  $statement->execute();
     *  echo $statement->columnCount(); // outputs 2
     * ```
     *
     * @return int
     */
    public function columnCount();

    /**
     * Returns the error code for the last error that occurred when executing this statement
     *
     * @return int|string
     */
    public function errorCode();

    /**
     * Returns the error information for the last error that occurred when executing
     * this statement
     *
     * @return array
     */
    public function errorInfo();

    /**
     * Executes the statement by sending the SQL query to the database. It can optionally
     * take an array or arguments to be bound to the query variables. Please note
     * that binding parameters from this method will not perform any custom type conversion
     * as it would normally happen when calling `bindValue`
     *
     * @param array|null $params list of values to be bound to query
     * @return bool true on success, false otherwise
     */
    public function execute($params = null);

    /**
     * Returns the next row for the result set after executing this statement.
     * Rows can be fetched to contain columns as names or positions. If no
     * rows are left in result set, this method will return false
     *
     * ### Example:
     *
     * ```
     *  $statement = $connection->prepare('SELECT id, title from articles');
     *  $statement->execute();
     *  print_r($statement->fetch('assoc')); // will show ['id' => 1, 'title' => 'a title']
     * ```
     *
     * @param string $type 'num' for positional columns, assoc for named columns
     * @return array|false Result array containing columns and values or false if no results
     * are left
     */
    public function fetch($type = 'num');

    /**
     * Returns an array with all rows resulting from executing this statement
     *
     * ### Example:
     *
     * ```
     *  $statement = $connection->prepare('SELECT id, title from articles');
     *  $statement->execute();
     *  print_r($statement->fetchAll('assoc')); // will show [0 => ['id' => 1, 'title' => 'a title']]
     * ```
     *
     * @param string $type num for fetching columns as positional keys or assoc for column names as keys
     * @return array list of all results from database for this statement
     */
    public function fetchAll($type = 'num');

    /**
     * Returns the number of rows affected by this SQL statement
     *
     * ### Example:
     *
     * ```
     *  $statement = $connection->prepare('SELECT id, title from articles');
     *  $statement->execute();
     *  print_r($statement->rowCount()); // will show 1
     * ```
     *
     * @return int
     */
    public function rowCount();

    /**
     * Statements can be passed as argument for count()
     * to return the number for affected rows from last execution
     *
     * @return int
     */
    public function count();

    /**
     * Binds a set of values to statement object with corresponding type
     *
     * @param array $params list of values to be bound
     * @param array $types list of types to be used, keys should match those in $params
     * @return void
     */
    public function bind($params, $types);

    /**
     * Returns the latest primary inserted using this statement
     *
     * @param string|null $table table name or sequence to get last insert value from
     * @param string|null $column the name of the column representing the primary key
     * @return string
     */
    public function lastInsertId($table = null, $column = null);
}


text:
from PyQt4 import QtCore, QtGui

class NewAddressWizardIntroPage(QtGui.QWizardPage):
    def __init__(self):
        super(QtGui.QWizardPage, self).__init__()
        self.setTitle("Creating a new address")

        label = QtGui.QLabel("This wizard will help you create as many addresses as you like. Indeed, creating and abandoning addresses is encouraged.\n\n"
            "What type of address would you like? Would you like to send emails or not?\n"
            "You can still change your mind later, and register/unregister with an email service provider.\n\n")
        label.setWordWrap(True)

        self.emailAsWell = QtGui.QRadioButton("Combined email and bitmessage address")
        self.onlyBM = QtGui.QRadioButton("Bitmessage-only address (no email)")
        self.emailAsWell.setChecked(True)
        self.registerField("emailAsWell", self.emailAsWell)
        self.registerField("onlyBM", self.onlyBM)

        layout = QtGui.QVBoxLayout()
        layout.addWidget(label)
        layout.addWidget(self.emailAsWell)
        layout.addWidget(self.onlyBM)
        self.setLayout(layout)

    def nextId(self):
        if self.emailAsWell.isChecked():
            return 4
        else:
            return 1

class NewAddressWizardRngPassphrasePage(QtGui.QWizardPage):
    def __init__(self):
        super(QtGui.QWizardPage, self).__init__()
        self.setTitle("Random or Passphrase")

        label = QtGui.QLabel("
You may generate addresses by using either random numbers or by using a passphrase. "
            "If you use a passphrase, the address is called a "deterministic" address. "
            "The \'Random Number\' option is selected by default but deterministic addresses have several pros and cons:
"
            "

Pros:	Cons:
"
            "
You can recreate your addresses on any computer from memory. "
            "You need-not worry about backing up your keys.dat file as long as you can remember your passphrase.	"
            "You must remember (or write down) your passphrase if you expect to be able "
            "to recreate your keys if they are lost. "
#            "You must remember the address version number and the stream number along with your passphrase. "
            "If you choose a weak passphrase and someone on the Internet can brute-force it, they can read your messages and send messages as you."
            "
")
        label.setWordWrap(True)

        self.randomAddress = QtGui.QRadioButton("Use a random number generator to make an address")
        self.deterministicAddress = QtGui.QRadioButton("Use a passphrase to make an address")
        self.randomAddress.setChecked(True)

        layout = QtGui.QVBoxLayout()
        layout.addWidget(label)
        layout.addWidget(self.randomAddress)
        layout.addWidget(self.deterministicAddress)
        self.setLayout(layout)

    def nextId(self):
        if self.randomAddress.isChecked():
            return 2
        else:
            return 3

class NewAddressWizardRandomPage(QtGui.QWizardPage):
    def __init__(self, addresses):
        super(QtGui.QWizardPage, self).__init__()
        self.setTitle("Random")

        label = QtGui.QLabel("Random address.")
        label.setWordWrap(True)

        labelLabel = QtGui.QLabel("Label (not shown to anyone except you):")
        self.labelLineEdit = QtGui.QLineEdit()

        self.radioButtonMostAvailable = QtGui.QRadioButton("Use the most available stream\n"
            "(best if this is the first of many addresses you will create)")
        self.radioButtonExisting = QtGui.QRadioButton("Use the same stream as an existing address\n"
            "(saves you some bandwidth and processing power)")
        self.radioButtonMostAvailable.setChecked(True)
        self.comboBoxExisting = QtGui.QComboBox()
        self.comboBoxExisting.setEnabled(False)
        self.comboBoxExisting.setEditable(True)

        for address in addresses:
            self.comboBoxExisting.addItem(address)

#        self.comboBoxExisting.setObjectName(_fromUtf8("comboBoxExisting"))
        self.checkBoxEighteenByteRipe = QtGui.QCheckBox("Spend several minutes of extra computing time to make the address(es) 1 or 2 characters shorter")

        layout = QtGui.QGridLayout()
        layout.addWidget(label, 0, 0)
        layout.addWidget(labelLabel, 1, 0)
        layout.addWidget(self.labelLineEdit, 2, 0)
        layout.addWidget(self.radioButtonMostAvailable, 3, 0)
        layout.addWidget(self.radioButtonExisting, 4, 0)
        layout.addWidget(self.comboBoxExisting, 5, 0)
        layout.addWidget(self.checkBoxEighteenByteRipe, 6, 0)
        self.setLayout(layout)

        QtCore.QObject.connect(self.radioButtonExisting, QtCore.SIGNAL("toggled(bool)"), self.comboBoxExisting.setEnabled)

        self.registerField("label", self.labelLineEdit)
        self.registerField("radioButtonMostAvailable", self.radioButtonMostAvailable)
        self.registerField("radioButtonExisting", self.radioButtonExisting)
        self.registerField("comboBoxExisting", self.comboBoxExisting)

#        self.emailAsWell = QtGui.QRadioButton("Combined email and bitmessage account")
#        self.onlyBM = QtGui.QRadioButton("Bitmessage-only account (no email)")
#        self.emailAsWell.setChecked(True)

    def nextId(self):
        return 6

class NewAddressWizardPassphrasePage(QtGui.QWizardPage):
    def __init__(self):
        super(QtGui.QWizardPage, self).__init__()
        self.setTitle("Passphrase")

        label = QtGui.QLabel("Deterministric address.")
        label.setWordWrap(True)

        passphraseLabel = QtGui.QLabel("Passphrase")
        self.lineEditPassphrase = QtGui.QLineEdit()
        self.lineEditPassphrase.setEchoMode(QtGui.QLineEdit.Password)
        self.lineEditPassphrase.setInputMethodHints(QtCore.Qt.ImhHiddenText|QtCore.Qt.ImhNoAutoUppercase|QtCore.Qt.ImhNoPredictiveText)
        retypePassphraseLabel = QtGui.QLabel("Retype passphrase")
        self.lineEditPassphraseAgain = QtGui.QLineEdit()
        self.lineEditPassphraseAgain.setEchoMode(QtGui.QLineEdit.Password)

        numberLabel = QtGui.QLabel("Number of addresses to make based on your passphrase:")
        self.spinBoxNumberOfAddressesToMake = QtGui.QSpinBox()
        self.spinBoxNumberOfAddressesToMake.setMinimum(1)
        self.spinBoxNumberOfAddressesToMake.setProperty("value", 8)
#        self.spinBoxNumberOfAddressesToMake.setObjectName(_fromUtf8("spinBoxNumberOfAddressesToMake"))
        label2 = QtGui.QLabel("In addition to your passphrase, you must remember these numbers:")
        label3 = QtGui.QLabel("Address version number: 4")
        label4 = QtGui.QLabel("Stream number: 1")

        layout = QtGui.QGridLayout()
        layout.addWidget(label, 0, 0, 1, 4)
        layout.addWidget(passphraseLabel, 1, 0, 1, 4)
        layout.addWidget(self.lineEditPassphrase, 2, 0, 1, 4)
        layout.addWidget(retypePassphraseLabel, 3, 0, 1, 4)
        layout.addWidget(self.lineEditPassphraseAgain, 4, 0, 1, 4)
        layout.addWidget(numberLabel, 5, 0, 1, 3)
        layout.addWidget(self.spinBoxNumberOfAddressesToMake, 5, 3)
        layout.setColumnMinimumWidth(3, 1)
        layout.addWidget(label2, 6, 0, 1, 4)
        layout.addWidget(label3, 7, 0, 1, 2)
        layout.addWidget(label4, 7, 2, 1, 2)
        self.setLayout(layout)

    def nextId(self):
        return 6

class NewAddressWizardEmailProviderPage(QtGui.QWizardPage):
    def __init__(self):
        super(QtGui.QWizardPage, self).__init__()
        self.setTitle("Choose email provider")

        label = QtGui.QLabel("Currently only Mailchuck email gateway is available "
            "(@mailchuck.com email address). In the future, maybe other gateways will be available. "
            "Press Next.")
        label.setWordWrap(True)

#        self.mailchuck = QtGui.QRadioButton("Mailchuck email gateway (@mailchuck.com)")
#        self.mailchuck.setChecked(True)

        layout = QtGui.QVBoxLayout()
        layout.addWidget(label)
#        layout.addWidget(self.mailchuck)
        self.setLayout(layout)

    def nextId(self):
        return 5

class NewAddressWizardEmailAddressPage(QtGui.QWizardPage):
    def __init__(self):
        super(QtGui.QWizardPage, self).__init__()
        self.setTitle("Email address")

        label = QtGui.QLabel("Choosing an email address. Address must end with @mailchuck.com")
        label.setWordWrap(True)

        self.specificEmail = QtGui.QRadioButton("Pick your own email address:")
        self.specificEmail.setChecked(True)
        self.emailLineEdit = QtGui.QLineEdit()
        self.randomEmail = QtGui.QRadioButton("Generate a random email address")

        QtCore.QObject.connect(self.specificEmail, QtCore.SIGNAL("toggled(bool)"), self.emailLineEdit.setEnabled)

        layout = QtGui.QVBoxLayout()
        layout.addWidget(label)
        layout.addWidget(self.specificEmail)
        layout.addWidget(self.emailLineEdit)
        layout.addWidget(self.randomEmail)
        self.setLayout(layout)

    def nextId(self):
        return 6

class NewAddressWizardWaitPage(QtGui.QWizardPage):
    def __init__(self):
        super(QtGui.QWizardPage, self).__init__()
        self.setTitle("Wait")

        self.label = QtGui.QLabel("Wait!")
        self.label.setWordWrap(True)
        self.progressBar = QtGui.QProgressBar()
        self.progressBar.setMinimum(0)
        self.progressBar.setMaximum(100)
        self.progressBar.setValue(0)

#        self.emailAsWell = QtGui.QRadioButton("Combined email and bitmessage account")
#        self.onlyBM = QtGui.QRadioButton("Bitmessage-only account (no email)")
#        self.emailAsWell.setChecked(True)

        layout = QtGui.QVBoxLayout()
        layout.addWidget(self.label)
        layout.addWidget(self.progressBar)
#        layout.addWidget(self.emailAsWell)
#        layout.addWidget(self.onlyBM)
        self.setLayout(layout)

    def update(self, i):
        if i == 101 and self.wizard().currentId() == 6:
            self.wizard().button(QtGui.QWizard.NextButton).click()
            return
        elif i == 101:
            print "haha"
            return
        self.progressBar.setValue(i)
        if i == 50:
            self.emit(QtCore.SIGNAL('completeChanged()'))

    def isComplete(self):
#        print "val = " + str(self.progressBar.value())
        if self.progressBar.value() >= 50:
            return True
        else:
            return False

    def initializePage(self):
        if self.field("emailAsWell").toBool():
            val = "yes/"
        else:
            val = "no/"
        if self.field("onlyBM").toBool():
            val += "yes"
        else:
            val += "no"

        self.label.setText("Wait! " + val)
#        self.wizard().button(QtGui.QWizard.NextButton).setEnabled(False)
        self.progressBar.setValue(0)
        self.thread = NewAddressThread()
        self.connect(self.thread, self.thread.signal, self.update)
        self.thread.start()

    def nextId(self):
        return 10

class NewAddressWizardConclusionPage(QtGui.QWizardPage):
    def __init__(self):
        super(QtGui.QWizardPage, self).__init__()
        self.setTitle("All done!")

        label = QtGui.QLabel("You successfully created a new address.")
        label.setWordWrap(True)

        layout = QtGui.QVBoxLayout()
        layout.addWidget(label)
        self.setLayout(layout)

class Ui_NewAddressWizard(QtGui.QWizard):
    def __init__(self, addresses):
        super(QtGui.QWizard, self).__init__()

        self.pages = {}

        page = NewAddressWizardIntroPage()
        self.setPage(0, page)
        self.setStartId(0)
        page = NewAddressWizardRngPassphrasePage()
        self.setPage(1, page)
        page = NewAddressWizardRandomPage(addresses)
        self.setPage(2, page)
        page = NewAddressWizardPassphrasePage()
        self.setPage(3, page)
        page = NewAddressWizardEmailProviderPage()
        self.setPage(4, page)
        page = NewAddressWizardEmailAddressPage()
        self.setPage(5, page)
        page = NewAddressWizardWaitPage()
        self.setPage(6, page)
        page = NewAddressWizardConclusionPage()
        self.setPage(10, page)

        self.setWindowTitle("New address wizard")
        self.adjustSize()
        self.show()

class NewAddressThread(QtCore.QThread):
    def __init__(self):
        QtCore.QThread.__init__(self)
        self.signal = QtCore.SIGNAL("signal")

    def __del__(self):
        self.wait()

    def createDeterministic(self):
        pass

    def createPassphrase(self):
        pass

    def broadcastAddress(self):
        pass

    def registerMailchuck(self):
        pass

    def waitRegistration(self):
        pass

    def run(self):
        import time
        for i in range(1, 101):
            time.sleep(0.1) # artificial time delay
            self.emit(self.signal, i)
        self.emit(self.signal, 101)
#        self.terminate()

if __name__ == '__main__':

    import sys

    app = QtGui.QApplication(sys.argv)

    wizard = Ui_NewAddressWizard(["a", "b", "c", "d"])
    if (wizard.exec_()):
        print "Email: " + ("yes" if wizard.field("emailAsWell").toBool() else "no")
        print "BM: " + ("yes" if wizard.field("onlyBM").toBool() else "no")
    else:
        print "Wizard cancelled"
    sys.exit()


text:
These formulae were those that depended on [TeX](https://www.tug.org/mactex/).

All formulae were migrated to other taps or deleted.


text:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <persistence-unit name="accounts-pu">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>

        <!-- Use this data source name for JBoss AS -->
        <!--<jta-data-source>java:/DefaultDS</jta-data-source>-->
        <!-- Use this data source name for Glassfish -->
        <!--
        <jta-data-source>jdbc/__default</jta-data-source>
        -->
        <properties>
            <!-- Properties for Hibernate (default provider for JBoss AS) -->
            <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
            <property name="hibernate.show_sql" value="false"/>
            <!--            <property name="hibernate.transaction.flush_before_completion" value="true"/>
            <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>-->

            <!--Is ignored by tomee-->
            <!--            <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:accountsdb" />
            <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbc.JDBCDriver" />
            <property name="javax.persistence.jdbc.user" value="sa"/>
            <property name="javax.persistence.jdbc.password" value=""/>-->

            <!--<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>-->
        </properties>
    </persistence-unit>
</persistence>


text:
package org.dashbuilder.displayer;

import org.dashbuilder.dataset.DataSet;
import org.dashbuilder.dataset.DataSetLookupBuilder;

/**
 * A DisplayerSettingsBuilder allows for the assembly of a DisplayerSettings instance in a friendly manner.
 *
 *

 *   DisplayerSettingsFactory.newBarChartSettings()
 *   .title("By Product")
 *   .titleVisible(false)
 *   .margins(10, 50, 100, 100)
 *   .column("Product")
 *   .column("Total amount")
 *   .horizontal()
 *   .buildSettings();
 *

 *
 * @see DisplayerSettings
 */
public interface DisplayerSettingsBuilder<T> extends DataSetLookupBuilder<T> {

    /**
     * Set the DisplayerSettings' UUID.
     *
     * @param uuid The UUID of the DisplayerSettings that is being assembled.
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T uuid(String uuid);

    /**
     * Set a direct reference to the source data set that will be used by the Displayer that is being assembled.
     *
When using this dataset provided mode the data set lookup operations set (if any): filter, group & sort  will not be taking into account).
     *
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     * @see org.dashbuilder.dataset.DataSet
     */
    T dataset(DataSet dataSet);

    /**
     * Sets the caption that will be shown for this particular visualization of the data.
     * @param title The caption to be shown
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T title(String title);

    /**
     * Set whether the caption should be visible or not.
     * @param visible True if the caption is to be visible, false if not.
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T titleVisible(boolean visible);

    /**
     * Set the background color for the displayer.
     * @param backgroundColor The background color code.
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T backgroundColor(String backgroundColor);

    /**
     * Set the renderer that will be used for visualizing this DisplayerSettings.
     * @param renderer The identifier of the renderer.
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T renderer(String renderer);

    /**
     * Enable the ability to select/filter values (or range of values) within the data displayer.
     *
     *
 Usually, in a dashboard there exists a unique coordinator which takes cares of propagate all the data
     * selection events among the other displayers. If enabled then there exists also the ability to configure how to
     * interact with other displayers in the same dashboard.

     * @param applySelf If true then any filter request issued within the data displayer will be applied to the own displayer.
     * @param notifyOthers If true then any filter request issued within the data displayer will be propagated to other interested displayers.
     * @param receiveFromOthers If true then the data displayer will listen for filter requests coming from other displayers.
     *
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T filterOn(boolean applySelf, boolean notifyOthers, boolean receiveFromOthers);

    /**
     * Disable the ability to select/filter values (or range of values) within the displayer.
     *
     * @param receiveFromOthers If true then the data displayer will listen for filter requests coming from other displayers.
     * @see DisplayerSettingsBuilder#filterOn DisplayerSettingsBuilder's filterOn method.
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T filterOff(boolean receiveFromOthers);

    /**
     * Force the displayer to redraw only when data becomes stale.
     *
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T refreshOn();

    /**
     * Force the displayer to redraw every time interval.
     *
     * @param seconds The refresh time frame in seconds. If < 0 then periodic refresh is disabled.
     * @param onStale Refresh when the data becomes stale.
     *
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T refreshOn(int seconds, boolean onStale);

    /**
     * Switch off the automatic refresh.
     *
     * @see DisplayerSettingsBuilder#refreshOn DisplayerSettingsBuilder's refreshOn method.
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T refreshOff();

    /**
     * Defines the display name for the last specified data set column.
     *
     * NOTE: This method can only be called right after a call to DataSetLookupBuilder#column(...).
     *
     * @param name The column display name.
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T format(String name);

    /**
     * Defines the display format for the last specified data set column.Every data set value will be formatted
     * according to the specified pattern parameter which defines the string format of the data set value.
     * Examples:
     *

     *
format("Amount", "$ #,###.##") => "$ 10,450.5"

     *
format("Amount", "$ #,### K") => "$ 450 K"

     *

     *
     * NOTE: This method can only be called right after a call to DataSetLookupBuilder#column(...).
     *
     * @param name The column display name.
     * @param pattern The standard java DecimalFormat and DateFormat can be used used for both number and date columns.
     * @see java.text.DecimalFormat
     * @see java.text.SimpleDateFormat
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T format(String name, String pattern);

    /**
     * Defines the display format for the specified data set column. Every data set value will be formatted
     * according to the specified pattern parameter which defines the string format of the data set value.
     * Examples:
     *

     *
format("Amount", "$ #,###.##") => "$ 10,450.5"

     *
format("Amount", "$ #,### K") => "$ 450 K"

     *

     *
     * @param columnId The column identifier.
     * @param name The column display name.
     * @param pattern The standard java DecimalFormat and DateFormat are used for both number and date columns.
     * @see java.text.DecimalFormat
     * @see java.text.SimpleDateFormat
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T format(String columnId, String name, String pattern);

    /**
     * Defines a mathematical expression used to calculate the real values to display for the last specified data set
     * column.
     *
     *
For numeric columns the expression can be any basic math expression where the value keyword represent
     * the source data set value and any of the basic math operators "/ * + -" are allowed. Examples:
     *

     *
format("Amount", "$ #,###.##").expression("value") => "$ 10,450.5"

     *
format("Amount", "$ #,###.##").expression("value-1") => "$ 10,449.5"

     *
format("Amount", "$ #,##0.00 K").expression("value/1000") => "$ 10.45 K"

     *

     *
     *
 For text columns you can manipulate the string using any javascript statement: Examples

     *

     *
format("Quarter").expression("["1st Q", "2nd Q", "3rd Q", "4th Q"][value+1]") => "3rd Q" (value=1 in a date fixed grouped column)

     *
format("3 chars").expression("value.substring(0, 3) + "...") => "Dav..." it takes the first 3 chars only

     *

     *
     * NOTE: This method can only be called right after a call to DataSetLookupBuilder#column(...)
     *
     * @param expression The expression used to calculate the value to display
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T expression(String expression);

    /**
     * Sames as expression(String expression) but using the specified column.
     *
     * @param columnId The column identifier.
     * @param expression The expression used to calculate the value to display
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T expression(String columnId, String expression);

    /**
     *
Support for user-provided HTML templates. For instance, a metric displayer could be configured as follows:

     *
     *

     * {@code

     *
${title}

     *
${value}

     *

     *  }

     *
     * Notice that, references (like "${value.ref}" in the example above) can be added to any of the HTML elements so that they can be referenced from the Javascript template.
     * See {@link #jsTemplate(String)} for further details.
     *
     * @param html The HTML template used to render the displayer. The following enumeration contains all the available variables:
     *

     *
id: An identifier that it is unique among all the displayers

     *
title: The metric title

     *
value: The formatted value

     *
value.raw: The raw value

     *
width: The metric width

     *
height: The metric height

     *
marginTop: The top margin

     *
marginBottom: The bottom margin

     *
marginLeft: The left margin

     *
marginRight: The right margin

     *
bgColor: The background color

     *
isFilterEnabled: true or false depending whether the filter setting is enabled (see {@link #filterOn(boolean, boolean, boolean)})

     *
isFilterOn: true or false depending whether the filter function is currently on or of

     *

     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T htmlTemplate(String html);

    /**
     * Specifies the JS template that is invoked every time the displayer is drawn.
     *
     *
Notice, HTML elements tagged as "${...}" can be referenced from the JS template. For instance, given the following
     * HTML template:

     *
     *

     * {@code

     *
${title}

     *
${value}

     *

     *  }

     *
     *
It is possible to implement some conditional into the JS so that the color of the text displayed depends on its value:

     *
     *

     * {@code ${valref}.style.color= ${value.raw} > 1000 ? "red" : "black";
     *  }

     *
     * where the "${valref}" is the identifier of the HTML element holding the value.
     *
     * @param js A JS template. Notice, the same variables supported in {@link #htmlTemplate(String)} can be used in the JS.
     * @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
     */
    T jsTemplate(String js);

    /**
     * @return The DisplayerSettings instance that has been configured.
     * @see DisplayerSettings
     */
    DisplayerSettings buildSettings();
}


text:
doppio-cf
=========

`doppio-cf` is a plugin that allows [doppio][1] to intelligently configure the
underlying server instance when running in a Cloud Foundry environment.

## Usage

First install the packages:

    npm install doppio
    npm install doppio-cf

Then load the plugin:

    var doppio = require("doppio"),
        server;

    doppio.loadPlugin("doppio-cf");
    server = doppio();

See the [doppio.loadPlugin()][2] documentation for more details.

[1]: https://github.com/jagoda/doppio "Doppio"
[2]: https://github.com/jagoda/doppio#doppioloadpluginid "doppio.loadPlugin()"


text:
/***********************************************************************
	created:	07/06/2006
	author:		Olivier Delannoy

	purpose:	This codec provide Corona based image loading
*************************************************************************/
/***************************************************************************
 *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
 *
 *   Permission is hereby granted, free of charge, to any person obtaining
 *   a copy of this software and associated documentation files (the
 *   "Software"), to deal in the Software without restriction, including
 *   without limitation the rights to use, copy, modify, merge, publish,
 *   distribute, sublicense, and/or sell copies of the Software, and to
 *   permit persons to whom the Software is furnished to do so, subject to
 *   the following conditions:
 *
 *   The above copyright notice and this permission notice shall be
 *   included in all copies or substantial portions of the Software.
 *
 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *   OTHER DEALINGS IN THE SOFTWARE.
 ***************************************************************************/
#ifndef _CEGUICoronaImageCodec_h_
#define _CEGUICoronaImageCodec_h_
#include "../../ImageCodec.h"

#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
#   ifdef CEGUICORONAIMAGECODEC_EXPORTS
#       define CEGUICORONAIMAGECODEC_API __declspec(dllexport)
#   else
#       define CEGUICORONAIMAGECODEC_API __declspec(dllimport)
#   endif
#else
#   define CEGUICORONAIMAGECODEC_API
#endif
// Start of CEGUI namespace section
namespace CEGUI
{
/*!
  \brief
  Image codec based on the Corona library
*/
class CEGUICORONAIMAGECODEC_API CoronaImageCodec : public ImageCodec
{
public:
    CoronaImageCodec();
    ~CoronaImageCodec();

    Texture* load(const RawDataContainer& data, Texture* result);
protected:

private:

};

} // End of CEGUI namespace section

#endif // end of guard _CEGUICoronaImageCodec_h_


text:
var assert = require("assert");
var spawn = require("child_process").spawn;

if (!process.env.UGLIFYJS_TEST_ALL) return;

function run(command, args, done) {
    var id = setInterval(function() {
        process.stdout.write("\0");
    }, 5 * 60 * 1000);
    spawn(command, args, {
        stdio: "ignore"
    }).on("exit", function(code) {
        clearInterval(id);
        assert.strictEqual(code, 0);
        done();
    });
}

describe("test/benchmark.js", function() {
    this.timeout(5 * 60 * 1000);
    [
        "-b",
        "-b bracketize",
        "-m",
        "-mc passes=3",
        "-mc passes=3,toplevel",
        "-mc passes=3,unsafe",
        "-mc keep_fargs=false,passes=3",
        "-mc keep_fargs=false,passes=3,pure_getters,unsafe,unsafe_comps,unsafe_math,unsafe_proto",
    ].forEach(function(options) {
        it("Should pass with options " + options, function(done) {
            var args = options.split(/ /);
            args.unshift("test/benchmark.js");
            run(process.argv[0], args, done);
        });
    });
});

describe("test/jetstream.js", function() {
    this.timeout(20 * 60 * 1000);
    it("Should install phantomjs-prebuilt", function(done) {
        run("npm", ["install", "phantomjs-prebuilt@2.1.14"], done);
    });
    [
        "-mc warnings=false",
        "-mc keep_fargs=false,passes=3,pure_getters,unsafe,unsafe_comps,unsafe_math,unsafe_proto,warnings=false",
    ].forEach(function(options) {
        it("Should pass with options " + options, function(done) {
            var args = options.split(/ /);
            args.unshift("test/jetstream.js");
            run(process.argv[0], args, done);
        });
    });
});


text:
#ifndef RECEPTOR_H
#define RECEPTOR_H 1

int bindlisten(int ret_stream[], int *retlen_stream, int ret_dgram[], int *retlen_dgram, const char *interface, unsigned short port, unsigned int backlog);

void destroy_usock(unsigned short port);

#endif


text:
#include <aws/core/Aws.h>

#include <aws/ec2/EC2Client.h>
#include <aws/ec2/model/MonitorInstancesRequest.h>
#include <aws/ec2/model/MonitorInstancesResponse.h>
#include <aws/ec2/model/UnmonitorInstancesRequest.h>
#include <aws/ec2/model/UnmonitorInstancesResponse.h>

#include <iostream>

void EnableMonitoring(const Aws::String& instanceId)
{
    Aws::EC2::EC2Client ec2_client;

    Aws::EC2::Model::MonitorInstancesRequest monitorInstancesRequest;
    monitorInstancesRequest.AddInstanceIds(instanceId);
    monitorInstancesRequest.SetDryRun(true);

    auto monitorInstancesDryRunOutcome = ec2_client.MonitorInstances(monitorInstancesRequest);
    assert(!monitorInstancesDryRunOutcome.IsSuccess());
    if(monitorInstancesDryRunOutcome.GetError().GetErrorType() != Aws::EC2::EC2Errors::DRY_RUN_OPERATION)
    {
        std::cout << "Failed dry run to enable monitoring on instance " << instanceId << ": " << monitorInstancesDryRunOutcome.GetError().GetMessage() << std::endl;
        return;
    }

    monitorInstancesRequest.SetDryRun(false);
    auto monitorInstancesOutcome = ec2_client.MonitorInstances(monitorInstancesRequest);
    if(!monitorInstancesOutcome.IsSuccess())
    {
        std::cout << "Failed to enable monitoring on instance " << instanceId << ": " << monitorInstancesOutcome.GetError().GetMessage() << std::endl;
    }
    else
    {
        std::cout << "Successfully enabled monitoring on instance " << instanceId << std::endl;
    }
}

void DisableMonitoring(const Aws::String& instanceId)
{
    Aws::EC2::EC2Client ec2_client;

    Aws::EC2::Model::UnmonitorInstancesRequest unmonitorInstancesRequest;
    unmonitorInstancesRequest.AddInstanceIds(instanceId);
    unmonitorInstancesRequest.SetDryRun(true);

    auto unmonitorInstancesDryRunOutcome = ec2_client.UnmonitorInstances(unmonitorInstancesRequest);
    assert(!unmonitorInstancesDryRunOutcome.IsSuccess());
    if(unmonitorInstancesDryRunOutcome.GetError().GetErrorType() != Aws::EC2::EC2Errors::DRY_RUN_OPERATION)
    {
        std::cout << "Failed dry run to disable monitoring on instance " << instanceId << ": " << unmonitorInstancesDryRunOutcome.GetError().GetMessage() << std::endl;
        return;
    }

    unmonitorInstancesRequest.SetDryRun(false);
    auto unmonitorInstancesOutcome = ec2_client.UnmonitorInstances(unmonitorInstancesRequest);
    if(!unmonitorInstancesOutcome.IsSuccess())
    {
        std::cout << "Failed to disable monitoring on instance " << instanceId << ": " << unmonitorInstancesOutcome.GetError().GetMessage() << std::endl;
    }
    else
    {
        std::cout << "Successfully disable monitoring on instance " << instanceId << std::endl;
    }
}

/**
 * Toggles detailed monitoring for an ec2 instance based on command line input
 */
int main(int argc, char** argv)
{
    if(argc != 3)
    {
        std::cout << "Usage: ec2_monitor_instance <instance_id> <true|false>" << std::endl;
        return 1;
    }

    Aws::String instanceId = argv[1];

    bool enableMonitoring = false;
    Aws::StringStream ss(argv[2]);
    ss >> std::boolalpha >> enableMonitoring;

    Aws::SDKOptions options;
    Aws::InitAPI(options);

    if(enableMonitoring)
    {
        EnableMonitoring(instanceId);
    }
    else
    {
        DisableMonitoring(instanceId);
    }

    Aws::ShutdownAPI(options);

    return 0;
}


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows;

namespace BCQueue.Resources
{
    [ValueConversion(typeof(Member.sl), typeof(Color))]
    public class Converter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (!(value is Member.sl))
                throw new ArgumentException("Value is not of enum type sl.");

            var skillLevel = (Member.sl)value;
            if (skillLevel == Member.sl.Tournament)
                return Colors.Black.ToString();
            else if (skillLevel == Member.sl.Beginner)
                return Colors.MediumSpringGreen.ToString();
            else if (skillLevel == Member.sl.Intermediate)
                return Colors.Khaki.ToString();
            else if (skillLevel == Member.sl.Advanced)
                return Colors.Crimson.ToString();
            else
                return Colors.LightGray.ToString();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException("The binding mode should be OneWay");
        }
    }
}


text:
[![Build Status](https://api.travis-ci.org/etewiah/property_web_builder.svg?branch=master)](https://api.travis-ci.org/etewiah/property_web_builder)

Среди всех проектов с открытым исходным кодом написанных на ruby on rails так никто и не решился написать решение для сайтов по продаже и аренде неджвижимости.
В результате WordPress стал чуть ли не единственным инструментом для быстрого создания сайтов данной тематики.
К сожалению его решение далеко от иделала. Чтобы компенсировать этот недостаток, проект PropertyBuilder пытается решить эту проблему.
Данный проект написан с открытым исходным кодом на фреймворке Ruby On Rails.

Более подробнее можно прочить здесь: [http://propertywebbuilder.com](http://propertywebbuilder.com)

##[Demo](https://propertywebbuilder.herokuapp.com/)

Для начала можете посмотреть демо версию [https://propertywebbuilder.herokuapp.com](https://propertywebbuilder.herokuapp.com/)

Изучить функционал панели администратора можно авторизоваться со следующими данными: логин admin@example.com, пароль "pwb123456".

![pwb_iphone_landing](https://cloud.githubusercontent.com/assets/1741198/22990222/bfec0168-f3b8-11e6-89df-b950c4979970.png)

## Версия Rails

PropertyWebBuilder должна быть запущена с Rails >= 5.1.0

## Версия Ruby

PropertyWebBuilder  должна быть запущена с Ruby >= 2.0.0.

## Установка

В существующий проект Rails добавьте в Gemfile следующие строки:

```ruby
gem 'pwb', git: 'https://github.com/etewiah/property_web_builder', branch: 'master'
gem 'globalize', git: 'https://github.com/globalize/globalize'

```

Также убедитесь, что использутете базу данных Postgres(путем установки гема 'pg' и локальной версии Postgres)
И после запустите:
```bash
$ bundle
```
Установитe PropertyWebBuilder, добавив следующие строки в файл routes.rb

```ruby
mount Pwb::Engine => '/'
```
И запустите следующие команды из коносоли:

```bash
rails pwb:install:migrations
rails db:create
rails db:migrate
rails pwb:db:seed
rails pwb:db:seed_pages
```


text:
<?xml version="1.0" encoding="utf-8"?>
<crawler>
<database>
	<param name="dbtype">mongodb</param>
	<param name="dbhost">localhost</param>
	<param name="dbport">27017</param>
	<param name="dbname">crawler</param>
	<param name="dbuser"></param>
	<param name="dbpassword"></param>
</database>

<queues>
	<param name="dbtype">mongodb</param>
	<param name="dbhost">localhost</param>
	<param name="dbport">27017</param>
	<param name="dbname">crawler_queues</param>
	<param name="dbuser"></param>
	<param name="dbpassword"></param>
</queues>

<cache>
	<!-- uncomment in order to enable document cache -->
	<!--param name="dbtype">mongodb</param-->
	<param name="dbhost">localhost</param>
	<param name="dbport">27017</param>
	<param name="dbname">crawler_cache</param>
	<param name="dbuser"></param>
	<param name="dbpassword"></param>
</cache>

<proxy>
	<param name="host"></param>
	<param name="port"></param>
	<param name="exclude"></param>
	<param name="username"></param>
	<param name="password"></param>
</proxy>

<documenthandler>
	<default>
		<param name="classname">fr.eolya.crawler.documenthandler.XmlQueueWriterHandler</param>
		<param name="checkqueuesize_each">10</param>
		<param name="jobspath">queue</param>
		<param name="jobslimit">10000</param>
	</default>
</documenthandler>

<param name="log_verbose">1</param>
<param name="log_debug">0</param>

<param name="force_once">0</param>
<param name="robots_wildcard_allowed">1</param>
<param name="user_agent">CaBot</param>
<param name="bypass_robots_file">0</param>
<param name="bypass_robots_meta">0</param>
<param name="max_depth">99</param>
<param name="max_page">0</param>
<param name="max_page_length">1000000</param>
<param name="max_redirection">6</param>

<param name="period_binary_file">720</param>
<param name="period_optimized_source">24</param>
<param name="period">168</param>

<param name="child_only">0</param>

<param name="extension_exclude">png,gif,jpg,jpeg,jpe,tiff,tif,bmp,mov,mp3,mpeg,mpg,mpe,avi,movie,dwg,mp4,bin,dvi,tar,gtar,zip,gzip,gz,man,ai,eps,ps,aif,aiff,aifc,wave,h264</param>

<param name="contenttype_include">application/x-shockwave-flash,text/html,text/xml,text/plain,application/pdf,application/xhtml+xml,application/msword,application/vnd.ms-excel,application/rss+xml,application/xml,application/rtf,text/rtf,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/atom+xml,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</param>
<!--param name="contenttype_exclude">image/jpeg,video/quicktime,application/zip,application/x-zip-compressed</param-->
<param name="contenttype_exclude"></param>

<param name="rss_extract">0</param>

<param name="max_simultaneous_source">4</param>
<param name="max_simultaneous_item_per_source">1</param>

<param name="witness_files_path">log</param>

<param name="crawler.scripts_path">config/crawler/scripts</param>

<param name="swfToHtmlPath">external/swf2html</param>

<param name="geo_location">1</param>

<param name="log_filename">log/crawler.log</param>
<param name="log_filename_test">log/crawler_test.log</param>

<!--param name="country_include">en, fr, ca, ru, cn, pt, nl, it, es, al, af</param-->
<param name="country_exclude"></param>

<param name="ignore_url_fields">PHPSESSID,jsessionid</param>
<!-- PHPSESSID|JSESSIONID|ASPSESSIONID|sid|zenid -->

<param name="removedoc_httpstatus">404</param>
<!-- 403,500,502, ... -->

</crawler>


text:
import git
import datetime

def doCommit():
	try:
		now = datetime.datetime.now() # current date and time
		date_time = now.strftime("%Y/%m/%d, %H:%M:%S")
		commit_message = "auto update @ " + date_time
		repo = git.Repo("./")
		repo.git.add("json/")
		repo.index.commit(commit_message)
		origin = repo.remote(name='origin')

		origin.push()
	except Exception as e:
		print(e)
		raise e


text:
using System;
using System.Collections.Generic;

namespace Divergent.Sales.Data.Models
{
    public class Order
    {
        public Guid Id { get; set; }

        public Guid CustomerId { get; set; }

        public DateTime DateTimeUtc { get; set; }

        public string State { get; set; }

        public ICollection<Item> Items { get; set; }
    }

    public class Item
    {
        public Guid Id { get; set; }
        public Guid OrderId { get; set; }
        public Product Product { get; set; }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Aspose.Imaging.Live.Demos.UI.Config;

namespace Aspose.Imaging.Live.Demos.UI
{
	public class Global : HttpApplication
	{

		protected void Application_Error(object sender, EventArgs e)
		{

		}

		void Application_Start(object sender, EventArgs e)
		{
			AreaRegistration.RegisterAllAreas();
			GlobalConfiguration.Configure(WebApiConfig.Register);
			RouteConfig.RegisterRoutes(RouteTable.Routes);
			BundleConfig.RegisterBundles(BundleTable.Bundles);
			RegisterCustomRoutes(RouteTable.Routes);
		}
		void Session_Start(object sender, EventArgs e)
		{
			//Check URL to set language resource file
			string _language = "EN";

			SetResourceFile(_language);
		}

		private void SetResourceFile(string strLanguage)
		{
			if (Session["AsposeCellsResources"] == null)
				Session["AsposeCellsResources"] = new GlobalAppHelper(HttpContext.Current, Application, Configuration.ResourceFileSessionName, strLanguage);
		}

			void RegisterCustomRoutes(RouteCollection routes)
		{
			routes.RouteExistingFiles = true;
			routes.Ignore("{resource}.axd/{*pathInfo}");

			routes.MapRoute(
				name: "Default",
				url: "Default",
				defaults: new { controller = "Home", action = "Default" }
			);

			routes.MapRoute(
				"AsposeImagingConversionRoute",
				"{product}/Conversion",
				 new { controller = "Conversion", action = "Conversion" }
			);

			routes.MapRoute(
				"AsposeImagingWatermarkRoute",
				"{product}/watermark",
				 new { controller = "Watermark", action = "Watermark" }
			);

			routes.MapRoute(
				"DownloadFileRoute",
				"common/download",
				new { controller = "Common", action = "DownloadFile" }

			);
			routes.MapRoute(
				"UploadFileRoute",
				"common/uploadfile",
				new { controller = "Common", action = "UploadFile" }

			);

			routes.MapPageRoute(
				"AsposeNewAppReverseSearchRoute",
				"imaging/reverse/{SearchId}",
				"~/ReverseImageSearchApp/ReverseSearchStart.aspx"
			);

			routes.MapPageRoute(
				"AsposeAppReverseSearchRoute",
				"imaging/reverse",
				"~/ReverseImageSearchApp/ReverseSearchStart.aspx", false,
				new RouteValueDictionary { { "SearchId", "new" } }
			);

			routes.MapPageRoute(
				"AsposeAppReverseSearchResultsRoute",
				"imaging/reverse/{SearchId}/results",
				"~/ReverseImageSearchApp/ReverseSearchResults.aspx"
			);
		}

		private void MapProductToolPageRoute(RouteCollection routes, string routeName, string routeUrl, string physicalFile, string productRegex)
		{
			routes.MapPageRoute(routeName, routeUrl, physicalFile, false, null, new RouteValueDictionary { { "Product", productRegex } });
		}
	}
}


text:
package com.webyweather.dto;

public class WeatherDesc {

    private String value;

    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}


text:
// (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { Injectable } from '@angular/core';
import { CoreLangProvider } from '@providers/lang';
import { CoreSitesProvider } from '@providers/sites';
import { CoreConfigConstants } from '../../../configconstants';

/**
 * Custom main menu item.
 */
export interface CoreMainMenuCustomItem {
    /**
     * Type of the item: app, inappbrowser, browser or embedded.
     * @type {string}
     */
    type: string;

    /**
     * Url of the item.
     * @type {string}
     */
    url: string;

    /**
     * Label to display for the item.
     * @type {string}
     */
    label: string;

    /**
     * Name of the icon to display for the item.
     * @type {string}
     */
    icon: string;
}

/**
 * Service that provides some features regarding Main Menu.
 */
@Injectable()
export class CoreMainMenuProvider {
    static NUM_MAIN_HANDLERS = 4;

    constructor(private langProvider: CoreLangProvider, private sitesProvider: CoreSitesProvider) { }

    /**
     * Get a list of custom menu items for a certain site.
     *
     * @param {string} [siteId] Site ID. If not defined, current site.
     * @return {Promise<CoreMainMenuCustomItem[]>} List of custom menu items.
     */
    getCustomMenuItems(siteId?: string): Promise<CoreMainMenuCustomItem[]> {
        return this.sitesProvider.getSite(siteId).then((site) => {
            const itemsString = site.getStoredConfig('tool_mobile_custommenuitems'),
                map = {},
                result = [];

            let items,
                position = 0; // Position of each item, to keep the same order as it's configured.

            if (!itemsString || typeof itemsString != 'string') {
                // Setting not valid.
                return result;
            }

            // Add items to the map.
            items = itemsString.split(/(?:\r\n|\r|\n)/);
            items.forEach((item) => {
                const values = item.split('|'),
                    label = values[0] ? values[0].trim() : values[0],
                    url = values[1] ? values[1].trim() : values[1],
                    type = values[2] ? values[2].trim() : values[2],
                    lang = (values[3] ? values[3].trim() : values[3]) || 'none';
                let id,
                    icon = values[4] ? values[4].trim() : values[4];

                if (!label || !url || !type) {
                    // Invalid item, ignore it.
                    return;
                }

                id = url + '#' + type;
                if (!icon) {
                    // Icon not defined, use default one.
                    icon = type == 'embedded' ? 'qr-scanner' : 'link';
                }

                if (!map[id]) {
                    // New entry, add it to the map.
                    map[id] = {
                        url: url,
                        type: type,
                        position: position,
                        labels: {}
                    };
                    position++;
                }

                map[id].labels[lang.toLowerCase()] = {
                    label: label,
                    icon: icon
                };
            });

            if (!position) {
                // No valid items found, stop.
                return result;
            }

            return this.langProvider.getCurrentLanguage().then((currentLang) => {
                const fallbackLang = CoreConfigConstants.default_lang || 'en';

                // Get the right label for each entry and add it to the result.
                for (const id in map) {
                    const entry = map[id];
                    let data = entry.labels[currentLang] || entry.labels[currentLang + '_only'] ||
                            entry.labels.none || entry.labels[fallbackLang];

                    if (!data) {
                        // No valid label found, get the first one that is not "_only".
                        for (const lang in entry.labels) {
                            if (lang.indexOf('_only') == -1) {
                                data = entry.labels[lang];
                                break;
                            }
                        }

                        if (!data) {
                            // No valid label, ignore this entry.
                            continue;
                        }
                    }

                    result[entry.position] = {
                        url: entry.url,
                        type: entry.type,
                        label: data.label,
                        icon: data.icon
                    };
                }

                // Remove undefined values.
                return result.filter((entry) => {
                    return typeof entry != 'undefined';
                });
            });
        });
    }
}


text:
<?php

/**
 * Simple API for rendering blocks of Remarkup.
 *
 * Example usage:
 *
 *   $fancy_text = new PHUIRemarkupView($viewer, $raw_remarkup);
 *   $view->appendChild($fancy_text);
 *
 */
final class PHUIRemarkupView extends AphrontView {

  private $corpus;
  private $contextObject;
  private $options;
  private $oneoff;
  private $generateTableOfContents;

  // TODO: In the long run, rules themselves should define available options.
  // For now, just define constants here so we can more easily replace things
  // later once this is cleaned up.
  const OPTION_PRESERVE_LINEBREAKS = 'preserve-linebreaks';
  const OPTION_GENERATE_TOC = 'header.generate-toc';

  public function __construct(PhabricatorUser $viewer, $corpus) {
    $this->setUser($viewer);
    $this->corpus = $corpus;
  }

  public function setContextObject($context_object) {
    $this->contextObject = $context_object;
    return $this;
  }

  public function getContextObject() {
    return $this->contextObject;
  }

  public function setRemarkupOption($key, $value) {
    $this->options[$key] = $value;
    return $this;
  }

  public function setRemarkupOptions(array $options) {
    foreach ($options as $key => $value) {
      $this->setRemarkupOption($key, $value);
    }
    return $this;
  }

  public function setGenerateTableOfContents($generate) {
    $this->generateTableOfContents = $generate;
    return $this;
  }

  public function getGenerateTableOfContents() {
    return $this->generateTableOfContents;
  }

  public function getTableOfContents() {
    return $this->oneoff->getTableOfContents();
  }

  public function render() {
    $viewer = $this->getViewer();
    $corpus = $this->corpus;
    $context = $this->getContextObject();

    $options = $this->options;

    $oneoff = id(new PhabricatorMarkupOneOff())
      ->setContent($corpus)
      ->setContentCacheFragment($this->getContentCacheFragment());

    if ($options) {
      $oneoff->setEngine($this->getEngine());
    } else {
      $oneoff->setPreserveLinebreaks(true);
    }

    $generate_toc = $this->getGenerateTableOfContents();
    $oneoff->setGenerateTableOfContents($generate_toc);
    $this->oneoff = $oneoff;

    $content = PhabricatorMarkupEngine::renderOneObject(
      $oneoff,
      'default',
      $viewer,
      $context);

    return $content;
  }

  private function getEngine() {
    $options = $this->options;
    $viewer = $this->getViewer();

    $viewer_key = $viewer->getCacheFragment();
    $engine_key = $this->getEngineCacheFragment();

    $cache = PhabricatorCaches::getRequestCache();
    $cache_key = "remarkup.engine({$viewer_key}, {$engine_key})";

    $engine = $cache->getKey($cache_key);
    if (!$engine) {
      $engine = PhabricatorMarkupEngine::newMarkupEngine($options);
      $cache->setKey($cache_key, $engine);
    }

    return $engine;
  }

  private function getEngineCacheFragment() {
    $options = $this->options;

    ksort($options);

    $engine_key = serialize($options);
    $engine_key = PhabricatorHash::digestForIndex($engine_key);

    return $engine_key;
  }

  private function getContentCacheFragment() {
    $corpus = $this->corpus;

    $content_fragment = PhabricatorHash::digestForIndex($corpus);
    $options_fragment = array(
      'toc' => $this->getGenerateTableOfContents(),
    );
    $options_fragment = serialize($options_fragment);
    $options_fragment = PhabricatorHash::digestForIndex($options_fragment);

    return "remarkup({$content_fragment}, {$options_fragment})";
  }

}


text:
/* global Vue */
/**
 * First we will load all of this project's JavaScript dependencies which
 * include Vue and Vue Resource. This gives a great starting point for
 * building robust, powerful web applications using Vue and Laravel.
 */
require("./base");

/**
 * Register Vue components...
 */
import MediaModal from "./components/MediaModal.vue";
import MediaManager from "./components/MediaManager.vue";

Vue.component("media-modal", MediaModal);
Vue.component("media-manager", MediaManager);

/**
 * If it doesn't already exist, register a separate empty vue instance that
 * is attached to the window, we can use it to listen out for and handle
 * any events that may emitted by components...
 */
if (!window.eventHub) {
	window.eventHub = new Vue();
}