text:
package io.fabric8.api;

import java.nio.file.Path;

/**
 * A runtime properties provider
 */
public interface RuntimeProperties {

    String RUNTIME_IDENTITY = "runtime.id";
    String RUNTIME_HOME_DIR = "runtime.home";
    String RUNTIME_DATA_DIR = "runtime.data";
    String RUNTIME_CONF_DIR = "runtime.conf";

    String DEFAULT_ENV_PREFIX = "FABRIC8_";

    /**
     * Get the identity for the current container
     */
    String getRuntimeIdentity();

    /**
     * Get the home path of the current runtime.
     */
    Path getHomePath();

    /**
     * Get the conf path of the current runtime.
     */
    Path getConfPath();

    /**
     * Get the data path of the current runtime.
     */
    Path getDataPath();

    String getProperty(String key);

    String getProperty(String key, String defaultValue);

    /**
     * Add a runtime attribute for the given key.
     * @throws IllegalStateException if an attribute with the given key
     */
    <T> void putRuntimeAttribute(Class<T> key, T options);

    /**
     * Get a runtime attribute for the given key.
     * @return null if the attribute does not exist
     */
    <T> T getRuntimeAttribute(Class<T> key);

    /**
     * Remove a runtime attribute for the given key.
     * @return null if the attribute does not exist
     */
    <T> T removeRuntimeAttribute(Class<T> key);

    /**
     * Clears the runtime attributes.
     */
    <T> void clearRuntimeAttributes();
}

redpajama_set_name: RedPajamaGithub


text:
var Command = require('ronin').Command
var fs = require('fs')
var path = require('path')
var webshot = require('webshot')
var ipfsAPI = require('ipfs-api')
var open = require('open')

module.exports = Command.extend({
  desc: 'View or generate screenshots for your application',

  options: {
    gen: 'boolean'
  },

  run: function (gen, name) {
    try {
      var configPath = path.resolve(process.cwd() + '/ipscend.json')
      fs.statSync(configPath)
      snapshot()
    } catch (err) {
      // console.log(err)
      console.log('Project must be initiated first, run `ipscend init`')
    }

    function snapshot () {
      var config = JSON.parse(fs.readFileSync(configPath))
      if (config.versions.length === 0) {
        return console.log('You need to publish at least once with <ipscend publish>')
      }

      var ipfs = ipfsAPI('localhost', '5001')

      if (!gen) {
        ipfs.add(new Buffer(JSON.stringify(config.versions)), function (err, res) {
          if (err || !res) {
            return console.error('err', err)
          }
          var previewAppHash = 'QmaJtFXp1ft4hLznscpRjEufZLTT8YuFn82vWFPeT2rprC'
          var versionsHash = res[0].Hash
          var base = 'http://localhost:8080/ipfs/'
          open(base + previewAppHash + '/#' + versionsHash)
        })
        return
      }

      if (gen) {
        var len = config.versions.length
        config.versions.forEach(function (version) {
          if (!version.snapshot) {
            webshot('http://localhost:8080/ipfs/' + version.hash,
                '/tmp/' + version.hash + '.png', {
                  shotSize: {
                    width: 'all',
                    height: 'all'
                  }
                }, function (err) {
              if (err) {
                return console.log(err)
              }

              ipfs.add('/tmp/' + version.hash + '.png', function (err, res) {
                if (err || !res) {
                  return console.error('err', err)
                }
                version.snapshot = res[0].Hash
                len--
                if (len === 0) {
                  var fd = fs.openSync(configPath, 'w')
                  fs.writeSync(fd, JSON.stringify(config, null, '  '), 0, 'utf-8')
                }
              })
            })
          } else {
            len--
          }
        })
      }
    }
  }
})


text:
package main

import (
	"image"
	"image/color"
	"image/gif"
	"io"
	"log"
	"math"
	"math/rand"
	"net/http"
	"strconv"
)

var palette = []color.Color{color.White, color.Black}

const (
	whiteIndex = 0 // first color in palette
	blackIndex = 1 // next color in palette
)

func main() {
	http.HandleFunc("/", handler)
	log.Fatal(http.ListenAndServe("localhost:8000", nil))
}

//!+handler
// handler echoes the HTTP request.
func handler(w http.ResponseWriter, r *http.Request) {
	if err := r.ParseForm(); err != nil {
		log.Print(err)
	}
	cycles := 5
	if cyclesStr := r.FormValue("cycles"); cyclesStr != "" {
		if value, err := strconv.Atoi(cyclesStr); err == nil {
			cycles = value
		}
	}

	lissajous(w, cycles)
}

func lissajous(out io.Writer, cycles int) {
	const (
		//cycles  = 5     // number of complete x oscillator revolutions
		res     = 0.001 // angular resolution
		size    = 100   // image canvas covers [-size..+size]
		nframes = 64    // number of animation frames
		delay   = 8     // delay between frames in 10ms units
	)
	freq := rand.Float64() * 3.0 // relative frequency of y oscillator
	anim := gif.GIF{LoopCount: nframes}
	phase := 0.0 // phase difference
	for i := 0; i < nframes; i++ {
		rect := image.Rect(0, 0, 2*size+1, 2*size+1)
		img := image.NewPaletted(rect, palette)
		for t := 0.0; t < float64(cycles)*2*math.Pi; t += res {
			x := math.Sin(t)
			y := math.Sin(t*freq + phase)
			img.SetColorIndex(size+int(x*size+0.5), size+int(y*size+0.5),
				blackIndex)
		}
		phase += 0.1
		anim.Delay = append(anim.Delay, delay)
		anim.Image = append(anim.Image, img)
	}
	gif.EncodeAll(out, &anim) // NOTE: ignoring encoding errors
}

//!-main


text:
!
!svn $Id: oyster_floats_mod.h 2328 2014-01-23 20:16:18Z arango $
!================================================== Hernan G. Arango ===
!  Copyright (c) 2002-2014 The ROMS/TOMS Group      Diego A. Narvaez   !
!    Licensed under a MIT/X style license                              !
!    See License_ROMS.txt                                              !
!=======================================================================
!                                                                      !
!  Parameters for oyster model (Dekshenieks et al. 1993, 1996, 1997;   !
!  Narvaez et al. 2012a,b):                                            !
!                                                                      !
!  Larvae_GR0      growth rate (um/day)                                !
!  Larvae_size0    size in terms of length (um)                        !
!  food_supply     food supply (constant source; mg Carbon/l)          !
!  settle_size     settlement size (um)                                !
!                                                                      !
!  Turbidity effect parameters on planktonic larvae growth:            !
!                                                                      !
!  turb_ambi       ambient turbidity level (g/l)                       !
!  turb_axis       turbidity linear axis crossing (g/l)                !
!  turb_base       turbidity exponential base factor (g/l)             !
!  turb_crit       critical turbidity value (g/l)                      !
!  turb_mean       turbidity exponential mean (g/l)                    !
!  turb_rate       turbidity exponential rate (1/(g/l))                !
!  turb_size       minimum larvae size (um) affected by turbidity      !
!  turb_slop       turbidity linear slope (1/(g/l))                    !
!                                                                      !
!  Planktonic larvae vertical migration (swimming) parameters:         !
!                                                                      !
!  slope_Sdec      coefficient due to decreasing salinity              !
!  slope_Sinc      coefficient due to increasing salinity              !
!  swim_Sdec       fraction active due to decreasing salinity          !
!  swim_Sinc       fraction active due to increasing salinity          !
!  swim_Tmax       maximum swimming time fraction                      !
!  swim_Tmin       minimum swimming time fraction                      !
!                                                                      !
!  Planktonic larvae sinking parameters:                               !
!                                                                      !
!  sink_base       exponential base factor (mm/s)                      !
!  sink_rate       exponential rate factor (1/um)                      !
!  sink_size       exponential mean size (um)                          !
!                                                                      !
!  Planktonic larvae swimming speed (mm/s) as a function of larval     !
!  size (um) and temperature (Celsius), look table parameters:         !
!                                                                      !
!  swim_DL         larval size J-axis increment                        !
!  swim_DT         temperature I-axis increment                        !
!  swim_Im         number of values in temperature I-axis              !
!  swim_Jm         number of values in larval size J-axis              !
!  swim_L0         starting value for larval size J-axis               !
!  swim_T0         starting value for temperature I-axis               !
!  swim_table      larval swimming speed look table                    !
!                                                                      !
!  Planktonic larvae growth rate factor (nondimensional) as a function !
!  salinity and temperature, look table parameters:                    !
!                                                                      !
!  Gfactor_DS      salinity I-axis increment                           !
!  Gfactor_DT      temperature J-axis increment                        !
!  Gfactor_Im      number of values in salinity I-axis                 !
!  Gfactor_Jm      number of values in temperature J-axis              !
!  Gfactor_S0      starting value for salinity I-axis                  !
!  Gfactor_T0      starting value for temperature J-axis               !
!  Gfactor_table   larval growth rate factor look table                !
!                                                                      !
!  Planktonic larvae growth rate as a function of food supply and      !
!  larval size, look table parameters:                                 !
!                                                                      !
!  Grate_DF        food supply I-axis increment                        !
!  Grate_DL        larval size J-axis increment                        !
!  Grate_Im        number of values in food supply I-axis              !
!  Grate_Jm        number of values in larval size J-axis              !
!  Grate_F0        starting value for food supply I-axis               !
!  Grate_L0        starting value for larval size J-axis               !
!  Grate_table     larval growth rate look table                       !
!                                                                      !
!=======================================================================
!
      USE mod_param
!
      implicit none
!
!  Oyster floats model parameters.
!
      integer  :: Gfactor_Im
      integer  :: Gfactor_Jm

      integer  :: Grate_Im
      integer  :: Grate_Jm

      integer  :: swim_Im
      integer  :: swim_Jm
!
      real(r8) :: Gfactor_DS
      real(r8) :: Gfactor_DT
      real(r8) :: Gfactor_S0
      real(r8) :: Gfactor_T0

      real(r8) :: Grate_F0
      real(r8) :: Grate_L0
      real(r8) :: Grate_DF
      real(r8) :: Grate_DL

      real(r8) :: swim_DL
      real(r8) :: swim_DT
      real(r8) :: swim_L0
      real(r8) :: swim_T0
!
      real(r8), allocatable :: Larvae_GR0(:)        ! um/day
      real(r8), allocatable :: Larvae_size0(:)      ! um
      real(r8), allocatable :: food_supply(:)       ! mg Carbon/l
      real(r8), allocatable :: settle_size(:)       ! um
!
      real(r8), allocatable :: sink_base(:)         ! mm/s
      real(r8), allocatable :: sink_rate(:)         ! 1/um
      real(r8), allocatable :: sink_size(:)         ! um
!
      real(r8), allocatable :: slope_Sinc(:)
      real(r8), allocatable :: slope_Sdec(:)
      real(r8), allocatable :: swim_Sdec(:)
      real(r8), allocatable :: swim_Sinc(:)
      real(r8), allocatable :: swim_Tmax(:)
      real(r8), allocatable :: swim_Tmin(:)
!
      real(r8), allocatable :: turb_ambi(:)         ! g/l
      real(r8), allocatable :: turb_axis(:)         ! g/l
      real(r8), allocatable :: turb_base(:)         ! g/l
      real(r8), allocatable :: turb_crit(:)         ! g/l
      real(r8), allocatable :: turb_mean(:)         ! g/l
      real(r8), allocatable :: turb_rate(:)         ! l/g
      real(r8), allocatable :: turb_size(:)         ! um
      real(r8), allocatable :: turb_slop(:)         ! l/g
!
      real(r8), allocatable :: Gfactor_table(:,:)
      real(r8), allocatable :: Grate_table(:,:)
      real(r8), allocatable :: swim_table(:,:)
!
      CONTAINS
!
      SUBROUTINE allocate_behavior
!
!=======================================================================
!                                                                      !
!  This routine allocates oyster model variables.                      !
!                                                                      !
!=======================================================================
!
!-----------------------------------------------------------------------
!  Allocate various module variables.
!-----------------------------------------------------------------------
!
      IF (.not.allocated(Larvae_GR0)) THEN
        allocate ( Larvae_GR0(Ngrids) )
      END IF

      IF (.not.allocated(Larvae_size0)) THEN
        allocate ( Larvae_size0(Ngrids) )
      END IF

      IF (.not.allocated(food_supply)) THEN
        allocate ( food_supply(Ngrids) )
      END IF

      IF (.not.allocated(settle_size)) THEN
        allocate ( settle_size(Ngrids) )
      END IF

      IF (.not.allocated(sink_base)) THEN
        allocate ( sink_base(Ngrids) )
      END IF

      IF (.not.allocated(sink_rate)) THEN
        allocate ( sink_rate(Ngrids) )
      END IF

      IF (.not.allocated(sink_size)) THEN
        allocate ( sink_size(Ngrids) )
      END IF

      IF (.not.allocated(slope_Sdec)) THEN
        allocate ( slope_Sdec(Ngrids) )
      END IF

      IF (.not.allocated(slope_Sinc)) THEN
        allocate ( slope_Sinc(Ngrids) )
      END IF

      IF (.not.allocated(swim_Sdec)) THEN
        allocate ( swim_Sdec(Ngrids) )
      END IF

      IF (.not.allocated(swim_Sinc)) THEN
        allocate ( swim_Sinc(Ngrids) )
      END IF

      IF (.not.allocated(swim_Tmax)) THEN
        allocate ( swim_Tmax(Ngrids) )
      END IF

      IF (.not.allocated(swim_Tmin)) THEN
        allocate ( swim_Tmin(Ngrids) )
      END IF

      IF (.not.allocated(turb_ambi)) THEN
        allocate ( turb_ambi(Ngrids) )
      END IF

      IF (.not.allocated(turb_axis)) THEN
        allocate ( turb_axis(Ngrids) )
      END IF

      IF (.not.allocated(turb_base)) THEN
        allocate ( turb_base(Ngrids) )
      END IF

      IF (.not.allocated(turb_crit)) THEN
        allocate ( turb_crit(Ngrids) )
      END IF

      IF (.not.allocated(turb_mean)) THEN
        allocate ( turb_mean(Ngrids) )
      END IF

      IF (.not.allocated(turb_rate)) THEN
        allocate ( turb_rate(Ngrids) )
      END IF

      IF (.not.allocated(turb_size)) THEN
        allocate ( turb_size(Ngrids) )
      END IF

      IF (.not.allocated(turb_slop)) THEN
        allocate ( turb_slop(Ngrids) )
      END IF

      RETURN
      END SUBROUTINE allocate_behavior


text:
use smallvec::SmallVec;

use crate::entity::borrow::Reborrow;
use crate::entity::storage::AsStorage;
use crate::entity::view::Bind;
use crate::graph::data::{Data, GraphData, Parametric};
use crate::graph::edge::Arc;
use crate::graph::face::{Face, FaceKey};
use crate::graph::mutation::face::{self, FaceInsertCache};
use crate::graph::mutation::vertex;
use crate::graph::mutation::{Consistent, Mode, Mutable, Mutation};
use crate::graph::path::Path;
use crate::graph::vertex::{Vertex, VertexKey, VertexView};
use crate::graph::GraphError;
use crate::IteratorExt as _;

pub struct PathExtrudeCache {
    // Avoid allocations for single arc extrusions.
    sources: SmallVec<[VertexKey; 2]>,
}

impl PathExtrudeCache {
    pub fn from_path<B>(path: Path<B>) -> Result<Self, GraphError>
    where
        B: Reborrow,
        B::Target: AsStorage<Arc<Data<B>>>
            + AsStorage<Face<Data<B>>>
            + AsStorage<Vertex<Data<B>>>
            + Consistent
            + Parametric,
    {
        if path.arcs().any(|arc| !arc.is_boundary_arc()) {
            Err(GraphError::TopologyMalformed)
        }
        else {
            Ok(PathExtrudeCache {
                sources: path.vertices().keys().collect(),
            })
        }
    }
}

pub fn extrude_contour_with<N, P, F>(
    mut mutation: N,
    cache: PathExtrudeCache,
    f: F,
) -> Result<FaceKey, GraphError>
where
    N: AsMut<Mutation<P>>,
    P: Mode,
    P::Graph: Mutable,
    F: Fn(&<Data<P::Graph> as GraphData>::Vertex) -> <Data<P::Graph> as GraphData>::Vertex,
{
    let PathExtrudeCache { sources } = cache;
    let destinations: SmallVec<[_; 2]> = sources
        .iter()
        .cloned()
        .rev()
        .map(|source| -> Result<_, GraphError> {
            let vertex =
                VertexView::bind(mutation.as_mut(), source).ok_or(GraphError::TopologyNotFound)?;
            let data = f(vertex.get());
            Ok(vertex::insert(mutation.as_mut(), data))
        })
        .collect::<Result<_, _>>()?;
    let cache =
        FaceInsertCache::from_storage(mutation.as_mut(), sources.into_iter().chain(destinations))?;
    face::insert_with(mutation.as_mut(), cache, Default::default)
}


text:
This document contains details about the process for building binaries for
Terraform.

## Versioning

As a pre-1.0 project, we use the MINOR and PATCH versions as follows:

 * a `MINOR` version increment indicates a release that may contain backwards
   incompatible changes
 * a `PATCH` version increment indicates a release that may contain bugfixes as
   well as additive (backwards compatible) features and enhancements

## Process

If only need to build binaries for the platform you're running (Windows, Linux,
Mac OS X etc..), you can follow the instructions in the README for [Developing
Terraform][1].

The guide below outlines the steps HashiCorp takes to build the official release
binaries for Terraform. This process will generate a set of binaries for each supported
platform, using the [gox](https://github.com/mitchellh/gox) tool.

A Vagrant virtual machine is used to provide a consistent environment with
the pre-requisite tools in place. The specifics of this VM are defined in the
[Vagrantfile](Vagrantfile).

```sh
# clone the repository if needed
git clone https://github.com/hashicorp/terraform.git
cd terraform

# Spin up a fresh build VM
vagrant destroy -f
vagrant up
vagrant ssh

# The Vagrantfile installs Go and configures the $GOPATH at /opt/gopath
# The current "terraform" directory is then sync'd into the gopath
cd /opt/gopath/src/github.com/hashicorp/terraform/

# Verify unit tests pass
make test

# Build the release
# This generates binaries for each platform and places them in the pkg folder
make bin
```

After running these commands, you should have binaries for all supported
platforms in the `pkg` folder.

[1]: https://github.com/hashicorp/terraform#developing-terraform


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.3  (Linux)">
	<META NAME="AUTHOR" CONTENT="Marcus Leech">
	<META NAME="CREATED" CONTENT="20090414;20595300">
	<META NAME="CHANGEDBY" CONTENT="Marcus Leech">
	<META NAME="CHANGED" CONTENT="20090415;18181600">
	<META NAME="CHANGEDBY" CONTENT="Marcus Leech">

IRA
General Information

IRA is a general-purpose receiver platform for conducting radio
astronomy observations of several types:

Continuum (Total Power) both single and dual-beam

Primary and secondary total power data logged once per
			second to external file

Spectral similiar to
	a laboratory spectrum analyser, but tailored for radio astronomy use

Includes ability to set discrete
			notch filters via simple user interface

Spot frequencies can be easily
			displayed along with computed relative velocity, and relative
			power

High-resolution (6000 bins)
			spectra logged every 20 seconds to external file

Current spectral display
			can be copied into external PostScript file.

Transients can detect
	strong transients in the post-detector data for both primary and
	secondary beam

User-settable trigger thresholds

With dual-beam (split)
			mode, can perform transient validation.

Transients are logged when
			detected, including profile of the transient pulse shape

Pulsars can be used
	to monitor pulsars, using flexible folding mechanism,
	and high-quality pulse profile display.

User-settable pulse repetition
			rate, and folding parameters

Can copy current pulse
			profile to PostScript file.

Pulsar pulse profiles are logged
			to an external file every 15 seconds

SETI a
	high-performance SETI detectiion engine can perform SETI searches
	over the entire input bandwidth (250KHz up to 16MHz, depending on
	available resources)

User settable values for
			integration times and the 'K' constant

Accompanying waterfall display
			allows flexibility in display

Waterfall display can be copied
			to an external XPM file

System Requirements

IRA requires a modern Linux
platform to run on, Science Radio Laboratories
(http://www.science-radio-labs.com)
currently offers software installation "kits" for:

Fedora 8,9,10

Ubuntu 8.10

The available compute and memory
resources will determine the maximum available observing bandwidth
for use with IRA.

A minimum of 1GB of memory is
	required, with 2GB or 4GB providing more flexibility

Single-CPU systems of at least
	2.4GHz

Multi-CPU systems are preferred
	(Pentium D 9XX, Core 2 Duo, Core 2 Quad, Core i7, AMD Athlon X2
	(7550 7750, etc), AMD Phenom)

A typical single-CPU system at
	2.4GHz can usually handle 1 to 2MHz of input bandwidth on a single
	channel

A Core 2 Q6600 with at least 6GB
	of memory can handle a single-channel at 16MHz, and dual-channels up
	to 6.4MHz

A recent install of Gnu Radio is
also required—see http://www.gnuradio.org
for build and installation instructions.  IRA requires access to a
source tree, since it makes some minor customizations to Gnu Radio
to facilitate IRA performance.

Other
Hardware Requirements

IRA requires a USRP1 (http://www.ettus.com)
for its radio interface, along with the daughter-card(s) that are
appropriate for the operating frequencies. The DBS_RX, for example,
allows observing over the 950MHz to 2300Mhz frequency range, which
happens to include both the Hydrogen line, and several of the
Hydroxyl lines. The TV_RX card allows observing in the 50MHz
to 800Mhz region. A high-quality USB cable rated for USB 2.0 use is
required between the USRP1 and the computer platform.

In some circumstances an external down-converter can be used, with
the IF output from the down-converter feeding a BASIC_RX or LF_RX
card. Several modern all-band receivers have wide IF outputs that
allow them to be used to down-convert UHF and microwave frequencies
to 10.7MHz or some other intermediate frequency that is in range for
the BASIC_RX and LF_RX cards (approximately 100Hz to 30Mhz). It is
vitally important that the
down-converter has a feature that disables Automatic Gain
Control (AGC). Without the
ability to disable AGC, radio astronomy continuum
observations cannot be usefully
conducted, since the down-converter/receiver will tend to
compress-out any slight variations in received signal power (which is
precisely what a continuum observation
is all about).

Antenna Requirements

The type and size of antenna
required for successful observations is determined largely by the
types of observations that are to be performed. Solar observations at
UHF frequencies and higher, for example, can usually be conducted
using smaller parabolic-dish antennas. For example, at 12GHz, using a
standard TVRO Low Noise Block Down-converter Feed-horn
(LNBF), successful solar
observations can be conducted using a dish of approximately 60cm
diameter, at lower frequencies a larger dish is required, since the
thermal component of the solar radio noise increases with increasing
frequency.

For observing weaker sources,
including pulsars, spectral lines, etc, larger antennas are required.
For example at 21cm, the Hydrogen Line can
be observed using a dish of as little as 1.3M diameter, while sources
such as Cygnus A, Casseopia A, Sagittarius A require
a dish of at least 2 to 2.5M diameter.

For pulsars at low UHF frequencies
(300MHz to 500Mhz), a dish of at least 3.8M diameter is required to
successfully observe a handful of the most powerful pulsars.

Observing Site
Requirements

Just as optical astronomical
observations require clear access to the sky, so do radio
observations. Trees, hills, buildings, and other obstructions will
completely block most of the radio waves that are arriving from the
cosmos. It is important, therefore to choose an observing site that
is clear of obstructions, to within at least 20 degrees of the
horizon, but less horizon blockage is always better!

Most observations cannot be
conducted within large built-up areas such as large cities, due to
the overwhelming amount of local-produced Radio Frequency
Interference (RFI). It is
sometimes possible to conduct observations at the higher microwave
frequencies (4GHz and higher) from within a built-up area, but
generally over a smaller section of sky, that avoids local
terrestrial interference sources.

Your observing site should have
stable power, both for the computer, and the USRP. For some types of
instruments, such as a Meridian Transit radio
telescope, observations may be conducted over very long time
periods--having a power failure interrupt such an observing "run"
can be very frustrating.

Other things to consider

Front-end Gain and noise figure

It is typically the case that the
receiving apparatus (USRP and computer) are located at some distance
from the dish itself (indeed, proper RFI hygiene virtually commands
that this be so). For this reason,
the gain of the low-noise amplifier (LNA)
chain out at the antenna needs to be able to adequately compensate
for RF cable loss between the antenna and other receiving apparatus.
Typically, amplifiers with gain totalling 25dB or more are used in
situations with long cable runs.

Since the signals arriving from
the cosmos are extremely weak, it
is important that the first gain stage in the receiving system
(whether an LNA or an LNBF) have a very low noise figure.
Noise figures below roughly 0.8dB provide acceptable performance.
Sometimes the performance of a low-noise device is quoted in terms of
noise temperature. In
this case, temperatures below roughly 60K are considered adequate for
radio astronomy observations for small observatories. Very often
manufacturers will quote a noise temperature that seems impossibly
low—they'll quote the lowest temperature they were able to achieve
in the lab, rather than the typical or average temperature. If a
device manufacturer claims a noise temperature below 25K, it is very
likely that "typical" devices will have a noise temperature 8-15K
higher.

Gain stability

Apart from the noise issues, and the
overall gain issues there is another extremely important issue
when considering front-end hardware for a small radio observatory.
The overall system stability, in terms of gain or detected signal
strength determines the quality and reliability of observations made
of the weaker sources. Indeed, the variation in gain of a system can
often exceed the detector variation caused by a source! The two
factors that dominate gain stability in low-noise amplifiers are
power-supply stability, and temperature stability.

Ensure that whatever power-supply is
being used for the front-end components (LNAs and line amplifiers) is
very, very stable. Use a supply that is larger than is required for
the anticipated load, by a factor of three or four. Generally,
linear-regulated power supplies, with large filter capacitors are
preferred over switching power supplies, which tend to produce
unwanted RF noise.

If possible, the front-end electronics
should be mounted to a heavy aluminum plate, with the entire
assembly, including the feed-horn(s) enclosed in an insulated
enclosure. White polystyrene foam of 22mm or greater thickness is an
excellent material for this purpose. Polystyrene foam is also quite
transparent to most RF, so it can be safely used in front of
the feed-horn. Packing the spaces inside the enclosure with loose
polystyrene packing material can also help with thermal stability of
the front end.

In some circumstances, active thermal
control of the entire front-end can be used to achieve excellent
system gain stability, at a cost of adding complexity to an already
complex system. Both heating and cooling systems can be considered.
Heaters, for example, are easier to use, and if actively controlled
with a temperature set-point a few degrees above the
seasonally-adjusted ambient temperature, they can be very useful.
Heating does add a small penalty in noise figure, but if you
start out with an already-excellent noise temperature, it will only
be degraded very slightly by using a heater to stabilize the
LNA temperature above ambient by a few degrees.

Feed-line loss

Feed-lines are lossy, more so at higher
frequencies than lower frequencies. Keep the feed-lines as short as
is practical, and consider burying them, to improve their temperature
stability. It is the  case that feed-line loss factors change with
temperature, so stabilizing the temperature of your feed-line, by
burying it, can be a very wise investment.

With adequate consideration given
to weather-proofing, the USRP system can be moved out to the antenna
itself, drastically reducing the amount of feed-line (and therefore,
loss) that must be used. Systems using this technique must use a
USB-2.0 extender. Contact sales@science-radio-labs.com
for more information about our recommended USB-2.0 extender, and its
limitations.

Lightning Protection

In many parts of the world, lightning
is hazard that must be considered when designing an observing system.
If RG-6 feed-lines are used, high-quality in-line lightning arrestors
are available from nearly-any do-it-yourself TVRO satellite store,
and there are a number of such stores that have on-line ordering
available. These units are rugged, and can asborb a large number of
induced-current "hits" without needing to be replaced.
Furthermore, they're usually available for under USD$5.00 each.


text:
"""
   Copyright 2014 The Trustees of Princeton University

   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 os
import re
import sys
import logging
import argparse
import logging
import threading
import time

import syndicate.ag.curation.specfile as AG_specfile
import syndicate.ag.curation.crawl as AG_crawl
import syndicate.ag.curation.args as AG_args
import syndicate.ag.curation.acl as AG_acl
import syndicate.ag.datasets.disk as AG_disk

logging.basicConfig( format='[%(asctime)s] [%(levelname)s] [%(module)s:%(lineno)d] %(message)s' )
log = logging.getLogger()
log.setLevel( logging.ERROR )

if __name__ == "__main__":
   parser = AG_args.make_arg_parser( "Syndicate Acquisition Gateway disk dataset curation tool" )

   parser.add_argument( '-F', "--file-perm", dest="file_perm", required=True, help="Permission bits (in octal) to be applied for each file.")
   parser.add_argument( '-D', "--dir-perm", dest="dir_perm", required=True, help="Permission bits (in octal) to be applied for each directory.")
   parser.add_argument( '-R', "--reval", dest="reval_sec", required=True, help="Length of time to go between revalidating entries.  Formatted as a space-separated list of numbers, with units 's' for seconds, 'm' for minutes, 'h' for hours, and 'd' for days.  For example, '10d 12h 30m' means ten days, twelve hours, and thirty minutes.")
   parser.add_argument( "root", nargs=1, help="Directory hierarchy on disk to be crawled.")

   args = parser.parse_args()

   if args.debug:
      log.setLevel( logging.DEBUG )

   # sanity check: octal file perm and dir perm
   file_perm = 0
   dir_perm = 0

   try:
      file_perm = int( args.file_perm, 8 )
      dir_perm = int( args.dir_perm, 8 )
   except:
      print >> sys.stderr, "ERROR: invalid permission string"
      parser.print_help()
      sys.exit(1)

   num_threads = AG_args.get_num_threads_or_die( args )
   max_retries = AG_args.get_num_retries_or_die( args )

   blacklists, whitelists = AG_acl.load_blacklists_and_whitelists( args.blacklists, args.whitelists )

   disk_include_callback = lambda path, is_directory: AG_acl.include_in_listing( path, is_directory, blacklists, whitelists )

   disk_specfile_callbacks = AG_specfile.specfile_callbacks( file_reval_sec_cb = lambda path: args.reval_sec,
                                                             dir_reval_sec_cb  = lambda path: args.reval_sec,
                                                             file_perm_cb      = lambda path: file_perm,
                                                             dir_perm_cb       = lambda path: dir_perm,
                                                             query_string_cb   = lambda path: "/" + os.path.join( args.root[0].strip("/"), path.strip("/")) )

   hierarchy = AG_disk.build_hierarchy( args.root[0], disk_include_callback, disk_specfile_callbacks, num_threads=num_threads, max_retries=max_retries )

   if hierarchy is not None:
      specfile_text = AG_specfile.generate_specfile( {}, hierarchy )

      print specfile_text


text:
package org.visallo.webster.parameterProviders;

import org.visallo.webster.App;
import org.visallo.webster.HandlerChain;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

public class AppParameterProviderFactory extends ParameterProviderFactory<App> {
    private static final ParameterProvider<App> PARAMETER_PROVIDER = new ParameterProvider<App>() {
        @Override
        public App getParameter(HttpServletRequest request, HttpServletResponse response, HandlerChain chain) {
            return App.getApp(request);
        }
    };

    @Override
    public boolean isHandled(Method handleMethod, Class<? extends App> parameterType, Annotation[] parameterAnnotations) {
        return App.class.isAssignableFrom(parameterType);
    }

    @Override
    public ParameterProvider<App> createParameterProvider(Method handleMethod, Class<?> parameterType, Annotation[] parameterAnnotations) {
        return PARAMETER_PROVIDER;
    }
}


text:
local colorise = {}

colorise.rgb2hex = function (rgb)
	local hexadecimal = '#'

	for key = 1, #rgb do
	    local value = rgb[key]
		local hex = ''

		while(value > 0)do
			local index = math.fmod(value, 16) + 1
			value = math.floor(value / 16)
			hex = string.sub('0123456789ABCDEF', index, index) .. hex
		end

		if(string.len(hex) == 0)then
			hex = '00'
		elseif(string.len(hex) == 1)then
			hex = '0' .. hex
		end
		hexadecimal = hexadecimal .. hex
	end

	return hexadecimal
end

local core = {}

core.settings = {}

-- flag to disable skylayer at global step
core.settings.enabled = true

-- default gradient interval values
core.settings.gradient_default_min_value = 0
core.settings.gradient_default_max_value = 1000

-- how often sky will be updated in seconds
core.settings.update_interval = 4

-- helps track total dtime
core.timer = 0

core.default_clouds = nil

-- keeps player related data such as player itself and own sky layers
core.sky_players = {}

-- adds player to sky layer affected players list
core.add_player = function(player)
	local data = {}
	data.id = player:get_player_name()
	data.player = player
	data.skylayers = {}
	table.insert(core.sky_players, data)
end

-- remove player from sky layer affected players list
core.remove_player = function(player_name)
	if #core.sky_players == 0 then
		return
	end
	for k, player_data in ipairs(core.sky_players) do
		if player_data.id == player_name then
			reset_sky(player_data.player)
			table.remove(core.sky_players, k)
			return
		end
	end
end

core.get_player_by_name = function(player_name)
	if player_name == nil then
		return nil
	end
	if #minetest.get_connected_players() == 0 then
		return nil
	end
	for i, player in ipairs(minetest.get_connected_players()) do
		if player:get_player_name() == player_name then
			return player
		end
	end
	return nil
end

core.get_player_data = function(player_name)
	if #core.sky_players == 0 then
		return nil
	end
	for k, player_data in ipairs(core.sky_players) do
		if player_data.id == player_name then
			return player_data
		end
	end
end

core.create_new_player_data = function(player_name)
	local player_data = core.get_player_data(player_name)
	if player_data == nil then
		local player = core.get_player_by_name(player_name)
		if player == nil then
			minetest.log("error", "Fail to resolve player '" .. player_name .. "'")
			return
		end
		core.add_player(player)
		return core.get_player_data(player_name)
	end
	return player_data
end

-- sets default / regular sky for player
core.reset_sky = function(player)
	core.set_default_sky(player)
	core.set_default_clouds(player)
end

core.set_default_sky = function(player)
	player:set_sky(nil, "regular", nil)
end

core.set_default_clouds = function(player)
	player:set_clouds(core.default_clouds)
end

-- resolves latest skylayer based on added layer time
core.get_latest_layer = function(layers)
	if #layers == 0 then
		return nil
	end

	local latest_layer = nil
	for k, layer in ipairs(layers) do
		if latest_layer == nil then
			latest_layer = layer
		else
			if layer.added_time >= latest_layer.added_time then
				latest_layer = layer
			end
		end
	end

	return latest_layer
end

core.convert_to_rgb = function(minval, maxval, current_val, colors)
	local max_index = #colors - 1
	local val = (current_val-minval) / (maxval-minval) * max_index + 1.0
	local index1 = math.floor(val)
	local index2 = math.min(math.floor(val)+1, max_index + 1)
	local f = val - index1
	local c1 = colors[index1]
	local c2 = colors[index2]

	return {
		r=math.floor(c1.r + f*(c2.r - c1.r)),
		g=math.floor(c1.g + f*(c2.g-c1.g)),
		b=math.floor(c1.b + f*(c2.b - c1.b))
	}
end

-- Returns current gradient color in {r, g, b} format
core.calculate_current_gradient_color = function(gradient_colors, min_val, max_val)
	if gradient_colors == nil then return nil end
	local timeofday = minetest.get_timeofday()
	if min_val == nil then
		min_val = core.settings.gradient_default_min_value
	end
	if max_val == nil then
		max_val = core.settings.gradient_default_max_value
	end
	local rounded_time = math.floor(timeofday * max_val)
	return core.convert_to_rgb(min_val, max_val, rounded_time, gradient_colors)
end

-- Returns current sky color in {r, g, b} format
core.get_current_layer_color = function(gradient_colors, min_val, max_val)
	return core.calculate_current_gradient_color(gradient_colors, min_val, max_val)
end

-- Returns current cloud color in hex format
core.get_current_cloud_color = function(gradient_colors, min_val, max_val)
	local rgb_color = core.calculate_current_gradient_color(gradient_colors, min_val, max_val)
	if rgb_color == nil then return nil end
	return colorise.rgb2hex({rgb_color.r, rgb_color.g, rgb_color.b})
end

core.update_sky_details = function(player, sky_layer)
	local sky_data = sky_layer.sky_data

	if sky_data == nil then
		if sky_layer.reset_defaults == true then
			core.set_default_sky(player)
			sky_layer.reset_defaults = false
		end
		return
	end

	local sky_color = core.get_current_layer_color(
		sky_data.gradient_colors,
		sky_data.gradient_min_value,
		sky_data.gradient_max_value)
	local bgcolor = sky_data.bgcolor
	if sky_color ~= nil then
		bgcolor = sky_color
	end
	local sky_type = "plain" -- default
	if sky_data.type ~= nil then
		sky_type = sky_data.type
	end
	local clouds = sky_layer.clouds_data ~= nil
	if sky_data.clouds ~= nil then
		clouds = sky_data.clouds
	end
	player:set_sky(bgcolor, sky_type, sky_data.textures, clouds)
end

core.update_clouds_details = function(player, sky_layer)
	local clouds_data = sky_layer.clouds_data

	if clouds_data == nil then
		if sky_layer.reset_defaults == true then
			core.set_default_clouds(player)
			sky_layer.reset_defaults = false
		end
		return
	end

	local cloud_color = core.get_current_cloud_color(
		clouds_data.gradient_colors,
		clouds_data.gradient_min_value,
		clouds_data.gradient_max_value)
	if cloud_color == nil then
		cloud_color = clouds_data.color
	end
	player:set_clouds({
		color = cloud_color,
		density = clouds_data.density,
		ambient = clouds_data.ambient,
		height = clouds_data.height,
		thickness = clouds_data.thickness,
		speed = clouds_data.speed})
end

core.update_sky = function(player, timer)
	local player_data = core.get_player_data(player:get_player_name())
	if player_data == nil then return end

	local current_layer = core.get_latest_layer(player_data.skylayers)
	if current_layer == nil then
		return
	end

	if skylayer.update_interval == nil then
		skylayer.update_interval = core.settings.update_interval
	end

	if player_data.last_active_layer == nil or player_data.last_active_layer ~= current_layer.name then
		current_layer.reset_defaults = true
	end
	player_data.last_active_layer = current_layer.name

	if current_layer.updated == false or core.timer >= skylayer.update_interval then
		current_layer.updated = os.time()
		core.update_sky_details(player, current_layer)
		core.update_clouds_details(player, current_layer)
	end
end

minetest.register_on_joinplayer(function(player)
	if core.default_clouds == nil then
		core.default_clouds = player:get_clouds()
	end
end)

minetest.register_globalstep(function(dtime)
	if core.settings.enabled == false then
		return
	end

	if #minetest.get_connected_players() == 0 then
		return
	end

	-- timer addition calculated outside of players loop
	core.timer = core.timer + dtime;

	for k, player in ipairs(minetest.get_connected_players()) do
		core.update_sky(player, core.timer)
	end

	-- reset timer outside of loop to make sure that all players sky will be updated
	if core.timer >= core.settings.update_interval then
		core.timer = 0
	end
end)

-------------------------
-- Sky Layers: API

-- License: MIT
-- Credits: xeranas
-------------------------

skylayer = {}

-- set flag for enable / disable skylayer
skylayer.is_enabled = function(enabled)
	core.settings.enabled = enabled
end

skylayer.add_layer = function(player_name, layer)
	if layer == nil or layer.name == nil then
		minetest.log("error", "Incorrect skylayer definition")
		return
	end

	local player_data = core.get_player_data(player_name)
	if player_data == nil then
		player_data = core.create_new_player_data(player_name)
	end

	if player_data == nil then
		minetest.log("error", "Fail to add skylayer to player '" .. player_name .. "'")
		return
	end
	layer.added_time = os.time()
	layer.updated = false
	table.insert(player_data.skylayers, layer)
end

skylayer.remove_layer = function(player_name, layer_name)
	local player_data = core.get_player_data(player_name)
	if player_data == nil or player_data.skylayers == nil then
		return
	end

	if #player_data.skylayers == 0 then
		return
	end

	for k, layer in ipairs(player_data.skylayers) do
		if layer.name == layer_name then
			table.remove(player_data.skylayers, k)
			if #player_data.skylayers == 0 then
				local player = core.get_player_by_name(player_name)
				if player ~= nil then
					core.reset_sky(player)
				end
			end
			return
		end
	end
end


text:
package algorithms.CardGame;

import java.util.Scanner;

public class CardGame {
    private ArrayQueue<Card> player1;
    private ArrayQueue<Card> player2;
    private ArrayQueue<Card> aside;
    private StringBuffer buffer;

    public CardGame() throws Exception {
        // Initialize everything
        player1 = new ArrayQueue<Card>(52);
        player2 = new ArrayQueue<Card>(52);
        aside   = new ArrayQueue<Card>(52);
        buffer  = new StringBuffer();

        int[] cursor = new int[52];
        for (int i = 0; i < cursor.length; i++)
            cursor[i] = i+1;

        // Shuffle the cards
        for (int i = 0; i < cursor.length; i++) {
            int random      = (int) (Math.random() * 52);
            int cursorInt   = cursor[random];
            cursor[random]  = cursor[i];
            cursor[i]       = cursorInt;
        }

        // Assign cards to the players
        for (int i = 0; i < cursor.length; i++) {
            int type    = (int) (cursor[i]/13.25);
            int weight  = cursor[i] - type * 13;
            if (i % 2 == 0)
                player1.enqueue(new Card(type, weight));
            else
                player2.enqueue(new Card(type, weight));
        }
    }

    /**
     * Give the cards in the aside queue and the ones on table to the winning player
     * @param wonPlayer The player that won, and will thus receive the cards
     * @param card1 The card of player 1 on the table
     * @param card2 The card of player 2 on the table
     * @return A string containing all cards of both players
     * @throws Exception Caused by the enqueue method,
     *                      can't occur due to this implementation
     */
    private String giveCards(ArrayQueue<Card> wonPlayer, Card card1, Card card2) throws Exception {
        // First give all cards that are aside
        while (aside.size() != 0)
            wonPlayer.enqueue(aside.dequeue());

        // Now give the cards that are on the table
        wonPlayer.enqueue(card1);
        wonPlayer.enqueue(card2);

        // Add the new cards to the StringBuffer, and empty it afterwards
        buffer.append("Player 1: ");
        buffer.append(card1.toString());
        buffer.append(" || Player 2: ");
        buffer.append(card2.toString());
        buffer.append("\n");

        String currentString = buffer.toString();
        buffer.setLength(0);

        return currentString;
    }

    /**
     * Initialize the next round, compare both cards and act accordingly
     * Uses recursion when both cards are equally weighted
     * @return Will eventually return what giveCards returns,
     *          can be "delayed" due to the recursion
     * @throws Exception Due to the enqueue and dequeue methods,
     *          won't occur due to this implementation
     */
    public String nextRound() throws Exception {
        // Each player puts a card on the table
        Card card1 = player1.dequeue();
        Card card2 = player2.dequeue();

        // Compare the cards and act accordingly
        if (card1.getWeight() != card2.getWeight()) {
            if (card1.getWeight() < card2.getWeight())
                return giveCards(player2, card1, card2);
            else
                return giveCards(player1, card1, card2);
        }
        else {
            // Equally weighted cards, these cards go to the aside queue
            aside.enqueue(card1);
            aside.enqueue(card2);

            // Make sure we also display the cards in the aside queue
            buffer.append("Player 1: ");
            buffer.append(card1.toString());
            buffer.append(" || Player 2: ");
            buffer.append(card2.toString());
            buffer.append("\n");

            // Game over when someone is out of cards, this should never occur though
            if (player1.size() == 0 || player2.size() == 0) {
                System.out.println("The game is over!");
                System.exit(0);
            }

            return nextRound();
        }
    }

    public String toString() {
        return "Card amounts: " + player1.size() + "  - " + player2.size() + "\n";
    }

    /**
     * THe main method which makes a new game and allows interaction
     * @param args Needed for the user input
     * @throws Exception Because of the CardGame constructor which uses enqueue methods,
     *                      won't occur due to this implementation
     */
    public static void main(String[] args) throws Exception {
        CardGame game   = new CardGame();
        Scanner scanner = new Scanner(System.in);
        System.out.println("******************* Card Game *******************");
        System.out.println("Press q to quit, any other key for the next round");

        // Uncomment this to see the card amounts will eventually stabilize themselves
        // for(int i = 0; i < 1000000; i++)
        //    game.nextRound();

        while(true) {
            String next = scanner.next();
            if (next.equals("q"))
                System.exit(0);

            System.out.println(game.nextRound());
            System.out.println(game.toString());
        }
    }
}


text:
var m = require('mithril')

exports.controller = function () {
  var ctrl = this;
}

exports.view = function (ctrl) {
  return m('div', [
     m("head", [
    m("link[href='./style.css'][rel=stylesheet]")
  ]),
    m('h1.center-align', 'Welcome to the Network'),
    m('p.center-align', 'Please sign in to access your future.'),
    m('.center-align', [
      m('a[href=/auth/makerpass/callback]', [
        m('button.btn', 'Sign In')
      ])
    ])
  ])
}


text:
package yinlei.applicaptionmarket.ui.adapter;

import android.content.Context;
import android.content.res.TypedArray;
import android.support.v7.widget.RecyclerView;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.facebook.drawee.view.SimpleDraweeView;

import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import yinlei.applicaptionmarket.R;
import yinlei.applicaptionmarket.ui.activity.DetailActivity;
import yinlei.applicaptionmarket.utils.SettingPrefUtils;
import yinlei.applicaptionmarket.utils.StringUtils;
import yinlei.applicaptionmarket.utils.UIUtils;

/**
 * 在此写用途
 *
 * @version V1.0 <描述当前版本功能>
 * @FileName: ListAppAdapter.java
 * @author: 若兰明月
 * @date: 2016-06-19 18:25
 */

public class ListAppAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
    private List<Integer> datas;
    private Context context;
    private static final int TYPE_HEADER = 0;
    private static final int TYPE_ITEM = 1;

    public ListAppAdapter(Context context, List<Integer> datas) {
        this.datas = datas;
        this.context = context;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        if (viewType == TYPE_HEADER) {
            View view = LayoutInflater.from(context).inflate(R.layout.item_header, parent, false);
            HeaderViewHolder headerViewHolder = new HeaderViewHolder(view);
            return headerViewHolder;
        } else {
            View view = LayoutInflater.from(context).inflate(R.layout.app_item, parent, false);
            AppItemViewHolder viewHolder = new AppItemViewHolder(view, context);
            return viewHolder;
        }

    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

        if (holder instanceof AppItemViewHolder) {
            ((AppItemViewHolder) holder).appName.setTextSize(TypedValue.COMPLEX_UNIT_PX,
                    SettingPrefUtils.getTitleSize(UIUtils.getContext()));
            ((AppItemViewHolder) holder).appSize.setTextSize(TypedValue.COMPLEX_UNIT_PX
            ,SettingPrefUtils.getTextSize(UIUtils.getContext()));
            ((AppItemViewHolder) holder).appDes.setTextSize(TypedValue.COMPLEX_UNIT_PX
                    ,SettingPrefUtils.getTitleSize(UIUtils.getContext()));
            ((AppItemViewHolder) holder).appDownload.setTextSize(TypedValue.COMPLEX_UNIT_PX
                    ,SettingPrefUtils.getTextSize(UIUtils.getContext()));
        } else if (holder instanceof HeaderViewHolder) {

        }

    }

    @Override
    public int getItemCount() {
        return datas.size() + 1;
    }

    @Override
    public int getItemViewType(int position) {
        return position == 0 ? TYPE_HEADER : TYPE_ITEM;
    }
}

class AppItemViewHolder extends RecyclerView.ViewHolder {
    public TextView appName;
    public TextView appDownload, appSize;
    public TextView appDes;
    public SimpleDraweeView appIcon;
    private Context mContext;

    @Bind(R.id.re_layout)
    RelativeLayout reLayout;

    @OnClick(R.id.re_layout)
    void reItemClick() {
        DetailActivity.startActivity(mContext, "webview_load_progress_drawable", "webview_load_progress_drawable", "webview_load_progress_drawable", 3);
    }

    public AppItemViewHolder(View itemView, Context context) {
        super(itemView);
        this.mContext = context;
        ButterKnife.bind(this, itemView);
        appName = (TextView) itemView.findViewById(R.id.app_name);
        appDes = (TextView) itemView.findViewById(R.id.app_dec);
        appDownload = (TextView) itemView.findViewById(R.id.app_download);
        appSize = (TextView) itemView.findViewById(R.id.app_size);
        appIcon = (SimpleDraweeView) itemView.findViewById(R.id.app_icon);
        reLayout = (RelativeLayout) itemView.findViewById(R.id.re_layout);
    }

}

class HeaderViewHolder extends RecyclerView.ViewHolder {

    public HeaderViewHolder(View itemView) {
        super(itemView);

    }

}


text:
namespace OneSignal.CSharp.SDK.Resources.Devices
{
    /// <summary>
    /// Device types enum.
    /// </summary>
    public enum DeviceTypeEnum
    {
        /// <summary>
        /// Apple operating system compatible devices such as: phones, tables, TV-s, watches and other devices.
        /// </summary>
        iOS = 0,

        /// <summary>
        /// Android operating system compatible devices such as: phones, tables, TV-s, watches and other devices.
        /// </summary>
        Android = 1,

        /// <summary>
        /// Amazon's android operating system compatible devices such as: phones, tables, TV-s, watches and other devices.
        /// </summary>
        Amazon = 2,

        /// <summary>
        /// Windows RT operating system compatible devices such as: phones, tables, TV-s, watches and other devices.
        /// </summary>
        WindowsPhoneMPNS = 3,

        /// <summary>
        /// Used for Chrome app.
        /// </summary>
        ChromeApp = 4,

        /// <summary>
        /// Used for Chrome web site.
        /// </summary>
        ChromeWebsite = 5,

        /// <summary>
        /// Windows 8.0 operating system generation used on phones.
        /// </summary>
        WindowsPhoneWNS = 6,

        /// <summary>
        /// Used for Safari.
        /// </summary>
        Safari = 7,

        /// <summary>
        /// Used for Firefox.
        /// </summary>
        Firefox = 8,

        /// <summary>
        /// Mac OS computers.
        /// </summary>
        MacOSX = 9
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">

<TITLE>
gnu.crypto.tool (GNU cryptographic primitives and tools)
</TITLE>
<META NAME="keywords" CONTENT="gnu.crypto.tool package">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

gnu.crypto.tool

Classes

CipherSpeed

Ent

HashSpeed

NessieCipherTVEmitter

NessieHashTVEmitter

NistKat

NistMCT

SaslC

SaslConnection

SaslS

SimpleCallbackHandler

SMTPClient


text:
Possible solution in Scala to Single Sign On Kata Kata created by Fredrik Wendt.

Kata done during Barcelona Software Craftmanship's dojo, [Starting point](https://github.com/emilybache/Single-Sign-On-Kata)


text:
import runPipelineTest from './runPipelineTest.js'

export default function () {
  runPipelineTest()
}


text:
"use strict";

var cy;

function getSelection() {
	var sel = [];
	cy.nodes(':selected').each(function() {
		sel.push(this.id());
	});
	return sel;
}

function nodeIds(selector) {
	selector = typeof(selector) !== 'undefined' ? selector : '';
	var ids = [];
	$.each(cy.nodes(selector), function (i, element) {
		ids.push(element.id());
	});
	return ids;
}

function redraw() {
	cy.forceRender();
	window.setTimeout(updateCount, 50);
	if ($('#expand-animate').prop('checked')) {
		cy.layout({
			name: 'arbor',
			liveUpdate: true
		});
	}
	$('#load-message, #network-loading').fadeOut(300, function() {
		$(this).hide();
	});
}

function selectAll() {
	cy.nodes().select();
}

function selectNone() {
	cy.nodes().unselect();
}

function selectNeighbors() {
	cy.nodes(':selected').nodes().neighborhood().nodes().select();
}

function selectHighlighted() {
	selectNone();
	cy.nodes('.highlighted').nodes().select();
}

function removeSelected() {
	cy.remove(cy.nodes(':selected'));
	updateCount();
	updateSelectCount();
}

function invertSelection() {
	var selected = cy.nodes(':selected');
	selectAll();
	selected.unselect();
}

function addToBasket() {
	var selected = nodeIds(':selected');
	$.ajax({
		url: 'api/update_basket',
		type: 'GET',
		data: { gene: selected },
		success: function () {
			cy.nodes(':selected').addClass('basket');
		}
	})
}

function removeFromBasket() {
	var selected = nodeIds(':selected');
	$.ajax({
		url: 'api/remove_from_basket',
		type: 'GET',
		data: { genes: selected },
		success: function () {
			cy.nodes(':selected').removeClass('basket');
		}
	})
}

function exportGML() {
	var jsonNetwork = JSON.stringify(cy.json().elements);
	$.download('api/export_gml_network', {'json': encodeURI(jsonNetwork)}, 'POST');
}

function exportPNG() {
	var jsonNetwork = JSON.stringify(cy.json().elements);
	$.download('api/export_png_network', {'json': encodeURI(jsonNetwork)}, 'POST');
}

function exportPDF() {
	var jsonNetwork = JSON.stringify(cy.json().elements);
	$.download('api/export_pdf_network', {'json': encodeURI(jsonNetwork)}, 'POST');
}

function searchNetwork() {
	cy.nodes().unselect();
	var sstring = $('#network-search-input').val();
	if (sstring == '') {
		return;
	}
	cy.nodes('[orf="'+sstring+'"]').select();
}

function updateCount() {
	var no_nodes = cy.nodes().length;
	var no_edges = cy.edges().length;
	$('#node-count').html(no_nodes);
	$('#edge-count').html(no_edges);
}

function updateSelectCount() {
	var no_nodes = cy.nodes(':selected').length;
	$('#select-count').html(no_nodes);
}

function initTooltips() {
	cy.nodes().each(function() {
		this.qtip({
			content: {
				title: this.data('orf'),
				text: 'Symbol: '+this.data('symbol')+''
			},
			show: {
				event: 'mouseover'
			},
			hide: {
				event: 'mouseout'
			},
			style: {
				classes: 'network-tooltip'
			}
		})
	});
}

function expandNode(json) {
	// Calculate the positions of the objects
	var n_nodes = json.nodes.length;
	var r = 100;
	var x = this.position().x;
	var y = this.position().y;
	var angle_incr = (2 * Math.PI) / n_nodes;
	for (var i = 0; i < n_nodes; i++) {
		var angle = angle_incr * i;
		var x_offset = Math.cos(angle) * r;
		var y_offset = Math.sin(angle) * r;
		json.nodes[i].position = { 'x': x + x_offset, 'y': y + y_offset };
	}
	// Remove duplicate edges
	var expand_threshold = $('#expand-threshold').val();
	cy.add(json);
	// Nodes are now added, but not all edges. Do that now.
	var ids = [];
	$.each(cy.nodes(), function (i, element) {
		ids.push(element.id());
	});
	$.ajax({
		url: 'api/network_edges',
		type: 'POST',
		datatype: 'json',
		data: {
			genes: ids,
			th: expand_threshold,
			ntype: $('#network-type').val()
		},
		success: function (edges) {
			// Don't do anything if there aren't any new edges
			if (edges.edges.length === cy.edges("[weight>"+expand_threshold+"]").length) {
				$('#load-message #load-gif').hide();
				$('#load-message .message').html('No neighbors found at threshold ' + expand_threshold);
				setTimeout(function() {
					$('#load-message, #network-loading').fadeOut(300, function() {
						$(this).hide();
						$('#load-message #load-gif').show();
					});
				}, 1500);
				return;
			}
			cy.remove(cy.edges("[weight>"+expand_threshold+"]"));
			cy.add(edges);
			// For some reason the edges aren't drawn straight away,
			// and can't seem to force a redraw directly, but with
			// a small delay it works...
			window.setTimeout(redraw, 1);
		}
	});
}

function highlightNodes(id, enrichType) {
	// Remove previous highlight
	cy.nodes().removeClass("highlighted");
	var ajaxParam = {
		type: "POST",
		datatype: "json",
		success: function(res) {
			var nodes = cy.filter(function(i, ele) {
				if (!isNaN(ele.id())) {
					return $.inArray(parseInt(ele.id()), res) !== -1;
				} else {
					return false;
				}
			});
			nodes.addClass("highlighted");
		}
	};
	if (enrichType === "go") {
		ajaxParam.url = "api/go_genes";
		ajaxParam.data = {
			go: id,
			genelist: lastGOGenes
		};
	} else if (enrichType === "motif") {
		ajaxParam.url = "api/motif_genes";
		ajaxParam.data = {
			motif: id,
			genelist: lastMotifGenes
		};
	}
	$.ajax(ajaxParam);
}

$(function () {
	$('#network-container').cytoscape({
		elements: network_data,

		layout: {
			name: 'arbor',
			liveUpdate: false,
			maxSimulationTime: 2000,
			fit: true,
			padding: [50, 50, 50, 50],
			ungrabifyWhileSimulating: true,
			stableEnergy: function (energy) {
				var e = energy;
				return (e.max <= 0.5) || (e.mean <= 0.3);
			}
		},

		zoomingEnabled: true,

		style: cytoscape.stylesheet()
			.selector('node')
				.css({
					'content': $('#node-labels').val(),
					'text_align': 'center',
					'font-family': 'helvetica, arial, sans-serif',
					'border-width': 1,
					'background-color': '#AAA',
					'cursor': 'pointer',
					'shape': 'ellipse',
					'width': 20,
					'height': 20,
					'font-size': 15
				})
			.selector('node.basket')
				.css({
					'background-color': '#12AA12'
				})
			.selector('node.tf')
				.css({
					'shape': 'rectangle'
				})
			.selector('node:selected')
				.css({
					'border-color': '#CA281D',
					'border-width': 3,
					'box-shadow': '2px 2px 2px 2px black'
				})
			.selector('node.highlighted')
				.css({
					height: 30,
					width: 30
				})
			.selector('edge')
				.css({
					'opacity': 0.5,
					'width': 'mapData(weight, 0, 20, 0.5, 8)',
					'line-color': '#666'
				})
		,

		ready: function () {
			console.log('network is ready');
			cy = this;
			updateCount();
			updateSelectCount();
			initTooltips();
			$('#load-message .message').html('Calculating layout...');
			cy.nodes().bind('select unselect', updateSelectCount);
		},
		done: function () {
			console.log('layout done');
			$('#load-message, #network-loading').fadeOut(300, function () {
				$(this).hide();
			});
		}
	});

	$('#network-container').cytoscapePanzoom({
		autodisableForMobile: true
	});

	$('#network-container').cytoscapeCxtmenu({
	    menuRadius: 80,
	    selector: 'node',
	    commands: [
	        {
	            content: 'Delete',
	            select: function () {
	            	cy.remove(this);
	            }
	        }, {
	            content: 'Expand',
	            select: function () {
	                $('#load-message .message').html('Expanding...');
	                $('#load-message, #network-loading').show();
	                $.ajax({
	                	url: 'api/network_neighbors/' +
	                		this.data().orf + '/' +
	                		$('#expand-threshold').val() + '/' +
	                		$('#network-type').val(),
	                	type: 'GET',
	                	datatype: 'json',
	                	context: this,
	                	success: expandNode
	                });
	            }
	        }, {
	        	content: 'Toggle basket',
	        	select: function () {
	        		$.ajax({
	        			url: 'api/update_basket',
	        			type: 'GET',
	        			context: this,
	        			data: { gene: this.id() },
		        		success: function () {
		        			this.toggleClass('basket');
		        		}
	        		});
	        	}
	        }, {
	        	content: 'Gene page in new tab',
	        	select: function () {
	        		var win = window.open(baseURL + 'gene/details/' + this.data().orf);
	        	}
	        }
	    ],
	    fillColor: 'rgba(0, 0, 0, 0.75)',
	    activeFillColor: 'rgba(40, 187, 91, 0.75)',
	    activePadding: 5,
	    indicatorSize: 18,
	    separatorWidth: 3,
	    spotlightPadding: 3,
	    minSpotlightRadius: 24,
	    maxSpotlightRadius: 38,
	    itemColor: 'white',
	    itemTextShadowColor: 'black',
	    zIndex: 100000
	});

	// Search listener
	$('#network-search-button').click(searchNetwork);
	$('#network-search-input').keyup(function (e) {
		if (e.which === 13) {
			searchNetwork();
		}
	});

	// Node labels
	$('#node-labels').change(function() {
		cy.nodes().css({content: $('#node-labels').val()});
	});

	// Button listeners
	$('#select-all').click(selectAll);
	$('#select-none').click(selectNone);
	$('#select-highlighted').click(selectHighlighted);
	$('#select-invert').click(invertSelection);
	$('#remove-selection').click(removeSelected);
	$('#select-neighbors').click(selectNeighbors);

	$('#basket-add').click(addToBasket);
	$('#basket-remove').click(removeFromBasket);

	$('#export-gml').click(exportGML);
	$('#export-png').click(exportPNG);
	$('#export-pdf').click(exportPDF);

	// Initiate enrichment tools
	enrichmentTools(getSelection, function() {
		highlightNodes(this.id.replace("highlight-", ""), "go");
	}, function() {
		highlightNodes(this.id.replace("highlight-", ""), "motif");
	});

	// Initiate expression plot
	expressionPlot(getSelection, baseURL);
});


text:
<title>OgreGLSLESProgramPipelineManager.h File Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="doxygen.css">
<link type="text/css" rel="stylesheet" href="tabs.css">

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Directories

File List

File Members

RenderSystems

GLES2

src

GLSLES

include

Classes |
Namespaces

OgreGLSLESProgramPipelineManager.h File Reference

#include "OgreGLES2Prerequisites.h"

#include "OgreSingleton.h"

#include "OgreGLSLESProgramPipeline.h"

#include "OgreGLSLESProgramManagerCommon.h"

Go to the source code of this file.

Classes

class  	Ogre::GLSLESProgramPipelineManager

 	Ogre assumes that there are separate vertex and fragment programs to deal with but GLSL ES has one program pipeline object that represents the active vertex and fragment program objects during a rendering state.  More...

Namespaces

namespace  	Ogre

Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Last modified Sun Sep 2 2012 07:27:24


text:
<?php

namespace Tests\Functionnal\AppBundle\Controller;

use AppBundle\Shell\Shell;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;

/**
 * Functionnal tests for CallbackController
 *
 * @author gbprod <contact@gb-prod.fr>
 */
class CallbackControllerTest extends WebTestCase
{
    private $client;
    private $shell;

    public function setUp()
    {
        $this->client = static::createClient();

        $this->shell = $this->prophesize(Shell::class);
        $this->client->getContainer()->set('app.shell', $this->shell->reveal());
    }
    public function testCallbackReturn204()
    {
        $this->shell
            ->execute('git pull && make deploy', '/var/www/html/miscelaneous')
            ->shouldBeCalled()
        ;

        $this->client->request(
            'POST',
            '/webhook/callback',
            [],
            [],
            ['HTTP_X_HUB_SIGNATURE' => 'sha1=696d01972673c1c21d393ed3ffcc1c425865e159'],
            json_encode([
                'ref' => 'refs/heads/prod',
                'repository' => [
                    'full_name' => 'gbprod/miscelaneous',
                ]
            ])
        );

        $this->assertEquals(204, $this->client->getResponse()->getStatusCode());
    }

    public function testCallbackReturn403()
    {
        $this->client->request(
            'POST',
            '/webhook/callback',
            [],
            [],
            ['HTTP_X_HUB_SIGNATURE' => 'sha1=fake'],
            '{"foo": "bar"}'
        );

        $this->assertEquals(403, $this->client->getResponse()->getStatusCode());
    }
}


text:
package edu.fmi.fuzzy.classifier;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

import org.apache.lucene.queryparser.classic.ParseException;

import edu.fmi.fuzzy.classifier.model.Genre;
import edu.fmi.fuzzy.classifier.model.Movie;
import edu.fmi.fuzzy.classifier.view.ClassificationView;

public class FuzzyClassifier implements OnSubmitListener {

	private static final int NEIGHBOURS_COUNT = 3;

	private MovieIndex index;

	private OnItemClassifiedListener listener;

	public FuzzyClassifier(final TrainingSet trainingSet) {
		try {
			index = new MovieIndex();
			for (final Movie movie : trainingSet) {
				index.index(movie);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public void setOnItemClassifiedListener(OnItemClassifiedListener listener) {
		this.listener = listener;
	}

	public void classifyExample(final Movie movie) {
		try {
			Map<Movie, Float> neighbours = index.getNeighbours(movie,
					NEIGHBOURS_COUNT);
			listener.onItemClassified(computeGenreValues(neighbours));
		} catch (ParseException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	private Map<Genre, Float> computeGenreValues(Map<Movie, Float> neighbours) {
		final Map<Genre, Float> classification = new HashMap<Genre, Float>();

		float nominator = 0f;
		float denominator = 0f;
		float total = 0f;

		for (Genre genre : Genre.values()) {
			for (final Entry<Movie, Float> entry : neighbours.entrySet()) {
				final Movie movie = entry.getKey();
				final float score = entry.getValue();
				nominator += movie.getGenreValue(genre) * (1 / (score * score));
				denominator += (1 / (score * score));
			}

			final float value = denominator != 0 ? nominator / denominator : 0f;
			total += value;
			classification.put(genre, value);
		}

		if (total != 0) {
			final float coef = 1 / total;
			for (final Entry<Genre, Float> entry : classification.entrySet()) {
				classification.put(entry.getKey(), entry.getValue() * coef);
			}
		}

		return classification;
	}

	@Override
	public void onSubmit(String title, String primaryRole,
			String secondaryRole, String director, String summary) {
		final Movie inputMovie = new Movie(title, primaryRole, secondaryRole,
				director, summary);
		classifyExample(inputMovie);
	}

	public static void main(String[] args) {
		final TrainingSet trainingSet = new TrainingSet();
		final FuzzyClassifier classifier = new FuzzyClassifier(trainingSet);

		final ClassificationView view = new ClassificationView(classifier);
		view.setVisible(true);

		classifier.setOnItemClassifiedListener(view);
	}
}


text:
<?php
namespace Poll\PollBundle\Tests\Entity;

use Poll\PollBundle\Service\ObjectFactory;
use Poll\PollBundle\Service\ServiceImpl\LocalObjectFactory;
use Poll\PollBundle\Entity\PollItem;

class SingleChoiceQuestionImplTest extends \PHPUnit_Framework_TestCase {

	protected $factory;

	public function setUp() {
		$this->factory = new LocalObjectFactory;
	}

	public function testInstantiation() {
		$object = $this->factory->createQuestion(ObjectFactory::SINGLE_CHOICE_QUESTION);
		$this->assertInstanceOf(
				'\Poll\PollBundle\Entity\Choice\SingleChoiceQuestion',
				$object);
		$this->assertInstanceOf(
				'\Poll\PollBundle\Entity\Choice\ChoiceQuestion',
				$object);
		$this->assertInstanceOf(
				'\Poll\PollBundle\Entity\Question',
				$object);
		return $object;
	}

	/**
	 * @depends testInstantiation
	 */
	public function testId($q) {
		$id = $q->getId();
		$this->assertFalse($id == '' || $id == NULL,'Instance nema nastavene Id');
	}

	/**
	 * @depends testInstantiation
	 */
	public function testAttributes($q) {
		$q1 = uniqid('question',TRUE);
		$q->setQuestion($q1);

		$this->assertEquals($q1,$q->getQuestion(),'Nastaveny a ziskany text otazky nejsou shodne');
	}

	/**
	 * @depends testInstantiation
	 */
	public function testColleciton($q) {
		$o1 = $this->factory->createOption(ObjectFactory::UNSHARED_OPTION);
		$o2 = $this->factory->createOption(ObjectFactory::SHARED_OPTION);
		$q->addOption($o1);
		$q->addOption($o2);

		$this->assertTrue($q->hasOption($o1),'Vlozena moznost nebyla nasledne nalezena');
		$this->assertTrue($q->hasOption($o2),'Vlozena moznost nebyla nasledne nalezena');
		$this->assertEquals($o1,$q->getOption($o1->getId()),'Vlozena a ziskana moznost nejsou shodne');
		$this->assertEquals($o2,$q->getOption($o2->getId()),'Vlozena a ziskana moznost nejsou shodne');

		$q->removeOption($o1);
		$q->removeOption($o2);

		$this->assertFalse($q->hasOption($o1),'Odstranena moznost je stale v otazce');
		$this->assertFalse($q->hasOption($o2),'Odstranena moznost je stale v otazce');
	}

	/**
	 * @depends testInstantiation
	 */
	public function testInversion($q) {
		$o1 = $this->factory->createOption(ObjectFactory::UNSHARED_OPTION);
		$q->addOption($o1);

		$this->assertTrue($o1->hasQuestion($q),'Nefunguje inverzni vazba mezi otazkou a moznosti');
	}

	/**
	 * @depends testInstantiation
	 */
	public function testFluency($q) {
		$o1 = $this->factory->createOption(ObjectFactory::UNSHARED_OPTION);

		$this->assertEquals($q,$q->setQuestion('question'),'Nefunguje fluent interface');
		$this->assertEquals($q,$q->addOption($o1),'Nefunguje fluent interface');
		$this->assertEquals($q,$q->removeOption($o1),'Nefunguje fluent interface');
	}

	/**
	 * @depends testInstantiation
	 */
	public function testType($q) {
		$this->assertEquals(PollItem::TYPE_SIMPLE,$q->getType(),'Otazka nema nastaveny typ anketni polozky');
	}

}


text:
require 'rails_helper'

RSpec.describe AssetsController, :type => :controller do

  before(:each) do
    sign_in create(:admin)
  end

  describe "GET Index" do
    it 'returns in less than 30 seconds' do

      t_start = Time.now
      get 'index'
      t_finish = Time.now

      expect(t_finish - t_start).to be < 30.seconds
    end
  end

end


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v12/common/asset_types.proto

namespace Google\Ads\GoogleAds\V12\Common;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A Callout asset.
 *
 * Generated from protobuf message google.ads.googleads.v12.common.CalloutAsset
 */
class CalloutAsset extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The callout text.
     * The length of this string should be between 1 and 25, inclusive.
     *
     * Generated from protobuf field string callout_text = 1 [(.google.api.field_behavior) = REQUIRED];
     */
    protected $callout_text = '';
    /**
     * Start date of when this asset is effective and can begin serving, in
     * yyyy-MM-dd format.
     *
     * Generated from protobuf field string start_date = 2;
     */
    protected $start_date = '';
    /**
     * Last date of when this asset is effective and still serving, in yyyy-MM-dd
     * format.
     *
     * Generated from protobuf field string end_date = 3;
     */
    protected $end_date = '';
    /**
     * List of non-overlapping schedules specifying all time intervals for which
     * the asset may serve. There can be a maximum of 6 schedules per day, 42 in
     * total.
     *
     * Generated from protobuf field repeated .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule_targets = 4;
     */
    private $ad_schedule_targets;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $callout_text
     *           Required. The callout text.
     *           The length of this string should be between 1 and 25, inclusive.
     *     @type string $start_date
     *           Start date of when this asset is effective and can begin serving, in
     *           yyyy-MM-dd format.
     *     @type string $end_date
     *           Last date of when this asset is effective and still serving, in yyyy-MM-dd
     *           format.
     *     @type array<\Google\Ads\GoogleAds\V12\Common\AdScheduleInfo>|\Google\Protobuf\Internal\RepeatedField $ad_schedule_targets
     *           List of non-overlapping schedules specifying all time intervals for which
     *           the asset may serve. There can be a maximum of 6 schedules per day, 42 in
     *           total.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V12\Common\AssetTypes::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The callout text.
     * The length of this string should be between 1 and 25, inclusive.
     *
     * Generated from protobuf field string callout_text = 1 [(.google.api.field_behavior) = REQUIRED];
     * @return string
     */
    public function getCalloutText()
    {
        return $this->callout_text;
    }

    /**
     * Required. The callout text.
     * The length of this string should be between 1 and 25, inclusive.
     *
     * Generated from protobuf field string callout_text = 1 [(.google.api.field_behavior) = REQUIRED];
     * @param string $var
     * @return $this
     */
    public function setCalloutText($var)
    {
        GPBUtil::checkString($var, True);
        $this->callout_text = $var;

        return $this;
    }

    /**
     * Start date of when this asset is effective and can begin serving, in
     * yyyy-MM-dd format.
     *
     * Generated from protobuf field string start_date = 2;
     * @return string
     */
    public function getStartDate()
    {
        return $this->start_date;
    }

    /**
     * Start date of when this asset is effective and can begin serving, in
     * yyyy-MM-dd format.
     *
     * Generated from protobuf field string start_date = 2;
     * @param string $var
     * @return $this
     */
    public function setStartDate($var)
    {
        GPBUtil::checkString($var, True);
        $this->start_date = $var;

        return $this;
    }

    /**
     * Last date of when this asset is effective and still serving, in yyyy-MM-dd
     * format.
     *
     * Generated from protobuf field string end_date = 3;
     * @return string
     */
    public function getEndDate()
    {
        return $this->end_date;
    }

    /**
     * Last date of when this asset is effective and still serving, in yyyy-MM-dd
     * format.
     *
     * Generated from protobuf field string end_date = 3;
     * @param string $var
     * @return $this
     */
    public function setEndDate($var)
    {
        GPBUtil::checkString($var, True);
        $this->end_date = $var;

        return $this;
    }

    /**
     * List of non-overlapping schedules specifying all time intervals for which
     * the asset may serve. There can be a maximum of 6 schedules per day, 42 in
     * total.
     *
     * Generated from protobuf field repeated .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule_targets = 4;
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAdScheduleTargets()
    {
        return $this->ad_schedule_targets;
    }

    /**
     * List of non-overlapping schedules specifying all time intervals for which
     * the asset may serve. There can be a maximum of 6 schedules per day, 42 in
     * total.
     *
     * Generated from protobuf field repeated .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule_targets = 4;
     * @param array<\Google\Ads\GoogleAds\V12\Common\AdScheduleInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAdScheduleTargets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V12\Common\AdScheduleInfo::class);
        $this->ad_schedule_targets = $arr;

        return $this;
    }

}


text:
/**
 *
 */
package org.openntf.red.nsf.endpoint;

/**
 * Basic set of functions that should be present in any data entity.
 *
 * @author Vladimir Kornienko
 * @since 0.4.0
 */
@SuppressWarnings("rawtypes")
public interface Base<TE extends Endpoint, TEF extends EndpointFactory, TEP extends Object> {
	/**
	 * Returns the ancestor endpoint factory.
	 *
	 * @return Ancestor endpoint factory.
	 * @since 0.4.0
	 * @see EndpointFactory
	 */
	public TEF getAncestorFactory();

	/**
	 * Returns the ancestor endpoint (endpoints return themselves).
	 *
	 * @return Ancestor endpoint.
	 * @since 0.4.0
	 * @see Endpoint
	 */
	public TE getAncestorEndpoint();

	/**
	 * Returns the object's immediate parent.
	 *
	 * @return Object's parent
	 * @since 0.4.0
	 */
	public TEP getParent();
}


text:
module MoonropeClient
  module Responses
    class Success < Response

      def success?
        true
      end

      #
      # @return [Boolean] whether this is a creation or not
      #
      def creation?
        flags['creation']
      end

      #
      # @return [Boolean] whether this is a modification or not
      #
      def modification?
        flags['modification']
      end

      #
      # @return [Boolean] whether this is a deletion or not
      #
      def deletion?
        flags['deletion']
      end

    end
  end
end


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:wheel="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    android:orientation="vertical"
    tools:context="com.eworkplaceapps.ed.SelectContact">

    <include layout="@layout/status_bar" />
    <include layout="@layout/a" />

    <FrameLayout
        android:id="@+id/select_contact_frame_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center">

        <RelativeLayout
            android:id="@+id/relativePanel"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical">

            <include layout="@layout/loading_empty_view" />

            <ListView
                android:id="@+id/list"
                android:layout_width="fill_parent"
                android:layout_height="match_parent"
                android:layout_toLeftOf="@+id/quickscroll"
                android:animationCache="false"
                android:choiceMode="multipleChoice"
                android:divider="@null"
                android:drawSelectorOnTop="false"
                android:overScrollMode="never"
                android:scrollbars="none"
                android:scrollingCache="false"
                android:smoothScrollbar="true"></ListView>

            <com.eworkplaceapps.ed.quickscroll.QuickScroll
                android:id="@+id/quickscroll"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_alignParentRight="true" />
        </RelativeLayout>

        <TextView
            android:id="@+id/tvNoDataMsg"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:padding="20dp"
            android:text="@string/no_data_msg"
            android:textSize="18dp"
            android:textStyle="bold"
            android:visibility="gone" />

        <com.eworkplaceapps.ed.view.ProgressWheel
            android:id="@+id/loading"
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:layout_gravity="center"
            android:visibility="gone"
            wheel:matProg_barColor="@color/lightTeal"
            wheel:matProg_progressIndeterminate="true" />
    </FrameLayout>
</LinearLayout>


text:
.edui-btn-toolbar .edui-btn .edui-icon-source {
    background-position: -260px -0px;
}

.edui-btn-toolbar .edui-btn .edui-icon-undo {
    background-position: -160px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-redo {
    background-position: -100px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-bold {
    background-position: 0 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-italic {
    background-position: -60px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-underline {
    background-position: -140px 0
}

.edui-btn-toolbar .edui-btn .edui-icon-strikethrough {
    background-position: -120px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-superscript {
    background-position: -620px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-subscript {
    background-position: -600px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-font, .edui-btn-toolbar .edui-btn .edui-icon-forecolor {
    background-position: -720px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-backcolor {
    background-position: -760px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-insertorderedlist {
    background-position: -80px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-insertunorderedlist {
    background-position: -20px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-selectall {
    background-position: -400px -20px;
}

.edui-btn-toolbar .edui-btn .edui-icon-cleardoc {
    background-position: -520px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-paragraph {
    background-position: -140px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-fontfamily {
    background-position: -140px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-fontsize {
    background-position: -140px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-justifyleft {
    background-position: -460px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-justifycenter {
    background-position: -420px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-justifyright {
    background-position: -480px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-justifyjustify {
    background-position: -440px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-link {
    background-position: -500px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-unlink {
    background-position: -640px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-image {
    background-position: -380px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-emotion {
    background-position: -60px -20px;
}

.edui-btn-toolbar .edui-btn .edui-icon-video {
    background-position: -320px -20px;
}

.edui-btn-toolbar .edui-btn .edui-icon-map {
    background-position: -40px -40px;
}

.edui-btn-toolbar .edui-btn .edui-icon-gmap {
    background-position: -260px -40px;
}

.edui-btn-toolbar .edui-btn .edui-icon-horizontal {
    background-position: -360px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-print {
    background-position: -440px -20px;
}

.edui-btn-toolbar .edui-btn .edui-icon-preview {
    background-position: -420px -20px;
}

.edui-btn-toolbar .edui-btn-fullscreen {
    float: right;
}

.edui-btn-toolbar .edui-btn .edui-icon-fullscreen {
    background-position: -100px -20px;
}

.edui-btn-toolbar .edui-btn .edui-icon-removeformat {
    background-position: -580px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-drafts {
    background-position: -560px 0;
}

.edui-btn-toolbar .edui-btn .edui-icon-formula {
    background-position: -80px -20px;
}


text:
/****************************************************************************************
 Script to read and write cookies from JavaScript
 Written by Mark Wilton-Jones, 31/12/2001
 *****************************************************************************************

 Please see http://www.howtocreate.co.uk/jslibs/ for details and a demo of this script
 Please see http://www.howtocreate.co.uk/jslibs/termsOfUse.html for terms of use

 This script allows you to store and retrieve cookies easily using JavaScript. Cookies
 are variables that can be stored on a user's computer and be picked up by any other web
 pages in the correct domain. Cookies are set to expire after a certain length of time.

 Be warned that many users will not permit cookies on their computers. Do not make your
 web sites rely on them. This script provides a return value that says if they accepted
 or rejected a cookie.

 To use:
 _________________________________________________________________________

 Inbetween the <head> tags, put:

 <script src="PATH TO SCRIPT/cookie.js" type="text/javascript" language="javascript"></script>

 To store a cookie, use:

 var cookieAccepted = setCookie( cookieName, cookieValue[, lifeTime[, path[, domain[, isSecure]]]] )

 cookieName is the name of the cookie (as a string) and can contain any characters.

 cookieValue is the value that the cookie stores (as a string) and can contain any characters.

 lifeTime is the amount of time in seconds that you want the cookie to last for (after which
 the user's computer will delete it). The default is until the browser is closed.

 path gives the path or directories that the cookie should be accessible from. The default is
 the current path. Alter this using ../ (up one directory) / starting at the base directory
 and subdirectoryName/ to start from the currentDirectory/subdirectoryName/

 domain gives the domain that the cookie is accessible from. This must have at least one . in it
 and in many browsers it must have at least two. The default is the current domain.

 isSecure can be true or false and says whether or not the cookie is only accessible on sites
 with a secure (https) connection.

 If the user rejected the cookie, cookieAccepted will be false. In Opera, if cookies are on prompt,
 the failure responce is received immediately, even if the user then accepts the cookie.

 To retrieve a cookie, use:

 var myCookie = retrieveCookie( cookieNameAsAString );

 To modify a cookie, simply set it again with the new settings;

 To delete a cookie, use:

 var cookieDeletePermitted = setCookie( cookieNameAsAString, '', 'delete' );

 or set lifeTime to a less than 0 value.

 If the user rejected the attempt to delete the cookie, cookieDeletePermitted will be false.
 _______________________________________________________________________________________*/

function retrieveCookie( cookieName ) {
    /* retrieved in the format
     cookieName4=value; cookieName3=value; cookieName2=value; cookieName1=value
     only cookies for this domain and path will be retrieved */
    var cookieJar = document.cookie.split( "; " );
    for( var x = 0; x < cookieJar.length; x++ ) {
        var oneCookie = cookieJar[x].split( "=" );
        if( oneCookie[0] == escape( cookieName ) ) { return oneCookie[1] ? unescape( oneCookie[1] ) : ''; }
    }
    return null;
}

function setCookie( cookieName, cookieValue, lifeTime, path, domain, isSecure ) {
    if( !cookieName ) { return false; }
    if( lifeTime == "delete" ) { lifeTime = -10; } //this is in the past. Expires immediately.
    /* This next line sets the cookie but does not overwrite other cookies.
     syntax: cookieName=cookieValue[;expires=dataAsString[;path=pathAsString[;domain=domainAsString[;secure]]]]
     Because of the way that document.cookie behaves, writing this here is equivalent to writing
     document.cookie = whatIAmWritingNow + "; " + document.cookie; */
    document.cookie = escape( cookieName ) + "=" + escape( cookieValue ) +
        ( lifeTime ? ";expires=" + ( new Date( ( new Date() ).getTime() + ( 1000 * lifeTime ) ) ).toGMTString() : "" ) +
        ( path ? ";path=" + path : "") + ( domain ? ";domain=" + domain : "") +
        ( isSecure ? ";secure" : "");
    //check if the cookie has been set/deleted as required
    if( lifeTime < 0 ) { if( typeof( retrieveCookie( cookieName ) ) == "string" ) { return false; } return true; }
    if( typeof( retrieveCookie( cookieName ) ) == "string" ) { return true; } return false;
}


text:
#ifndef _MC_PLATFORM_H_
#define _MC_PLATFORM_H_

/* MobiCore Interrupt for Qualcomm */
#define MC_INTR_SSIQ						280

/* Use SMC for fastcalls */
#define MC_SMC_FASTCALL

/*--------------- Implementation -------------- */
#include <soc/qcom/scm.h>
/* from following file */
#define SCM_SVC_MOBICORE		250
#define SCM_CMD_MOBICORE		1

extern int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, size_t cmd_len,
		    void *resp_buf, size_t resp_len);

static inline int smc_fastcall(void *fc_generic, size_t size)
{
	return scm_call(SCM_SVC_MOBICORE, SCM_CMD_MOBICORE,
			fc_generic, size,
			fc_generic, size);
}

/* Enable mobicore mem traces */
#define MC_MEM_TRACES

/* Enable the use of vm_unamp instead of the deprecated do_munmap
 * and other 3.7 features
 */
#define MC_VM_UNMAP

/* Enable Power Management for Crypto Engine */
#define MC_CRYPTO_CLOCK_MANAGEMENT

#endif /* _MC_PLATFORM_H_ */


text:
package sx.lambda.voxel.net.mc.client.handlers;

import org.spacehq.mc.protocol.packet.ingame.server.world.ServerSpawnPositionPacket;
import sx.lambda.voxel.RadixClient;

/**
 * Created by louxiu on 12/17/15.
 */
public class SpawnPositionHandler implements PacketHandler<ServerSpawnPositionPacket> {
    private final RadixClient game;

    public SpawnPositionHandler(RadixClient game) {
        this.game = game;
    }

    @Override
    public void handle(ServerSpawnPositionPacket packet) {
//        Gdx.app.debug("", "ServerSpawnPositionPacket"
//                + ", positionX=" + packet.getPosition().getX()
//                + ", positionY=" + packet.getPosition().getY()
//                + ", positionZ=" + packet.getPosition().getZ()
//                + ", priority=" + packet.isPriority());
    }
}


text:
extern crate pretty_env_logger;

use std::vec::Vec;
use std::any::Any;

use interface::i_ele;
use interface::i_component;

/// # command for resetting draw group content
#[derive(Clone)]
pub struct CmdDrawGroupClear ( pub i_component::ComponentDrawGroupClear );

impl CmdDrawGroupClear {

    pub fn init( group_id: usize ) -> CmdDrawGroupClear {
        CmdDrawGroupClear( i_component::ComponentDrawGroupClear { _group_id: group_id } )
    }
}

impl i_ele::IObjImpl for CmdDrawGroupClear {
    fn as_any( & self ) -> & Any {
        self
    }

    fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
        let c = self.0.clone();
        components.push( Box::new( c ) );
        trace!( "loaded command: draw group: clear" );
        Ok( () )
    }
}

#[derive(Clone)]
pub struct CmdDrawGroupDependentObjects ( pub i_component::ComponentDrawGroupDependentObjects );

impl CmdDrawGroupDependentObjects {

    pub fn init( group_id: usize, obj_ids: &[ usize ] ) -> CmdDrawGroupDependentObjects {
        CmdDrawGroupDependentObjects( i_component::ComponentDrawGroupDependentObjects { _group_id: group_id, _obj_ids: obj_ids.to_vec() } )
    }
}

impl i_ele::IObjImpl for CmdDrawGroupDependentObjects {
    fn as_any( & self ) -> & Any {
        self
    }

    fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
        let c = self.0.clone();
        components.push( Box::new( c ) );
        trace!( "loaded command: draw group: set objects" );
        Ok( () )
    }
}

#[derive(Clone)]
pub struct CmdDrawGroupBind ( pub i_component::ComponentDrawGroupBind );

impl CmdDrawGroupBind {

    pub fn init( group_id: usize ) -> CmdDrawGroupBind {
        CmdDrawGroupBind( i_component::ComponentDrawGroupBind { _group_id: group_id } )
    }
}

impl i_ele::IObjImpl for CmdDrawGroupBind {
    fn as_any( & self ) -> & Any {
        self
    }

    fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
        let c = self.0.clone();
        components.push( Box::new( c ) );
        trace!( "loaded command: draw group: set objects" );
        Ok( () )
    }
}

#[derive(Clone)]
pub struct CmdDrawGroupDispatch ( pub i_component::ComponentDrawGroupDispatch );

impl CmdDrawGroupDispatch {

    pub fn init( group_id: usize ) -> CmdDrawGroupDispatch {
        CmdDrawGroupDispatch( i_component::ComponentDrawGroupDispatch { _group_id: group_id } )
    }
}

impl i_ele::IObjImpl for CmdDrawGroupDispatch {
    fn as_any( & self ) -> & Any {
        self
    }

    fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
        let c = self.0.clone();
        components.push( Box::new( c ) );
        trace!( "loaded command: draw group: set objects" );
        Ok( () )
    }
}

#[derive(Clone)]
pub struct CmdDrawGroupDependentUniforms ( pub i_component::ComponentDrawGroupDependentUniforms );

impl CmdDrawGroupDependentUniforms {

    pub fn init( group_id: usize, uniform_ids: &[ u64 ] ) -> CmdDrawGroupDependentUniforms {
        CmdDrawGroupDependentUniforms( i_component::ComponentDrawGroupDependentUniforms { _group_id: group_id, _uniform_ids: uniform_ids.to_vec() } )
    }
}

impl i_ele::IObjImpl for CmdDrawGroupDependentUniforms {
    fn as_any( & self ) -> & Any {
        self
    }

    fn update_components( & mut self, components: & mut Vec< Box< i_component::IComponent > > ) -> Result< (), & 'static str > {
        let c = self.0.clone();
        components.push( Box::new( c ) );
        trace!( "loaded command: draw group: set objects" );
        Ok( () )
    }
}


text:
<!DOCTYPE html>

	<title>Pointer Tooltips with jQuery UI</title>
	<meta charset="utf-8">

	<link rel="stylesheet" href="../assets/jquery-ui/1.10.2/jquery-ui.css">

		Top
		<input type="radio" name="option" value="top" id="top">
		Bottom
		<input type="radio" name="option" value="bottom" id="bottom">
		Left
		<input type="radio" value="left" name="option" id="left">
		Right
		<input type="radio" value="right" name="option" id="right" checked>

		<input type="text" title="I am a tooltip!">


text:
package app.models;

import org.javalite.activejdbc.Model;
import org.javalite.activejdbc.annotations.IdName;
import org.javalite.activejdbc.annotations.Table;

@Table("jab_akd_dprd")
@IdName("kd_jab")
public class MdJabAkdDprd extends Model {

}