text:
#include <opencv2/core.hpp>
#include <vector>

#ifndef __OPENCV_OMNIDIR_HPP__
#define __OPENCV_OMNIDIR_HPP__

namespace cv
{
namespace omnidir
{
    //! @addtogroup ccalib
    //! @{

    enum {
        CALIB_USE_GUESS             = 1,
        CALIB_FIX_SKEW              = 2,
        CALIB_FIX_K1                = 4,
        CALIB_FIX_K2                = 8,
        CALIB_FIX_P1                = 16,
        CALIB_FIX_P2                = 32,
        CALIB_FIX_XI                = 64,
        CALIB_FIX_GAMMA             = 128,
        CALIB_FIX_CENTER            = 256
    };

    enum{
        RECTIFY_PERSPECTIVE         = 1,
        RECTIFY_CYLINDRICAL         = 2,
        RECTIFY_LONGLATI            = 3,
        RECTIFY_STEREOGRAPHIC       = 4
    };

    enum{
        XYZRGB  = 1,
        XYZ     = 2
    };
/**
 * This module was accepted as a GSoC 2015 project for OpenCV, authored by
 * Baisheng Lai, mentored by Bo Li.
 */

    /** @brief Projects points for omnidirectional camera using CMei's model

    @param objectPoints Object points in world coordinate, vector of vector of Vec3f or Mat of
    1xN/Nx1 3-channel of type CV_32F and N is the number of points. 64F is also acceptable.
    @param imagePoints Output array of image points, vector of vector of Vec2f or
    1xN/Nx1 2-channel of type CV_32F. 64F is also acceptable.
    @param rvec vector of rotation between world coordinate and camera coordinate, i.e., om
    @param tvec vector of translation between pattern coordinate and camera coordinate
    @param K Camera matrix \f$K = \vecthreethree{f_x}{s}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\f$.
    @param D Input vector of distortion coefficients \f$(k_1, k_2, p_1, p_2)\f$.
    @param xi The parameter xi for CMei's model
    @param jacobian Optional output 2Nx16 of type CV_64F jacobian matrix, contains the derivatives of
    image pixel points wrt parameters including \f$om, T, f_x, f_y, s, c_x, c_y, xi, k_1, k_2, p_1, p_2\f$.
    This matrix will be used in calibration by optimization.

    The function projects object 3D points of world coordinate to image pixels, parameter by intrinsic
    and extrinsic parameters. Also, it optionally compute a by-product: the jacobian matrix containing
    contains the derivatives of image pixel points wrt intrinsic and extrinsic parameters.
     */
    CV_EXPORTS_W void projectPoints(InputArray objectPoints, OutputArray imagePoints, InputArray rvec, InputArray tvec,
                       InputArray K, double xi, InputArray D, OutputArray jacobian = noArray());

    /** @brief Undistort 2D image points for omnidirectional camera using CMei's model

    @param distorted Array of distorted image points, vector of Vec2f
    or 1xN/Nx1 2-channel Mat of type CV_32F, 64F depth is also acceptable
    @param K Camera matrix \f$K = \vecthreethree{f_x}{s}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\f$.
    @param D Distortion coefficients \f$(k_1, k_2, p_1, p_2)\f$.
    @param xi The parameter xi for CMei's model
    @param R Rotation trainsform between the original and object space : 3x3 1-channel, or vector: 3x1/1x3
    1-channel or 1x1 3-channel
    @param undistorted array of normalized object points, vector of Vec2f/Vec2d or 1xN/Nx1 2-channel Mat with the same
    depth of distorted points.
     */
    CV_EXPORTS_W void undistortPoints(InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray xi, InputArray R);

    /** @brief Computes undistortion and rectification maps for omnidirectional camera image transform by a rotation R.
    It output two maps that are used for cv::remap(). If D is empty then zero distortion is used,
    if R or P is empty then identity matrices are used.

    @param K Camera matrix \f$K = \vecthreethree{f_x}{s}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\f$, with depth CV_32F or CV_64F
    @param D Input vector of distortion coefficients \f$(k_1, k_2, p_1, p_2)\f$, with depth CV_32F or CV_64F
    @param xi The parameter xi for CMei's model
    @param R Rotation transform between the original and object space : 3x3 1-channel, or vector: 3x1/1x3, with depth CV_32F or CV_64F
    @param P New camera matrix (3x3) or new projection matrix (3x4)
    @param size Undistorted image size.
    @param mltype Type of the first output map that can be CV_32FC1 or CV_16SC2 . See convertMaps()
    for details.
    @param map1 The first output map.
    @param map2 The second output map.
    @param flags Flags indicates the rectification type,  RECTIFY_PERSPECTIVE, RECTIFY_CYLINDRICAL, RECTIFY_LONGLATI and RECTIFY_STEREOGRAPHIC
    are supported.
     */
    CV_EXPORTS_W void initUndistortRectifyMap(InputArray K, InputArray D, InputArray xi, InputArray R, InputArray P, const cv::Size& size,
        int mltype, OutputArray map1, OutputArray map2, int flags);

    /** @brief Undistort omnidirectional images to perspective images

    @param distorted The input omnidirectional image.
    @param undistorted The output undistorted image.
    @param K Camera matrix \f$K = \vecthreethree{f_x}{s}{c_x}{0}{f_y}{c_y}{0}{0}{_1}\f$.
    @param D Input vector of distortion coefficients \f$(k_1, k_2, p_1, p_2)\f$.
    @param xi The parameter xi for CMei's model.
    @param flags Flags indicates the rectification type,  RECTIFY_PERSPECTIVE, RECTIFY_CYLINDRICAL, RECTIFY_LONGLATI and RECTIFY_STEREOGRAPHIC
    @param Knew Camera matrix of the distorted image. If it is not assigned, it is just K.
    @param new_size The new image size. By default, it is the size of distorted.
    @param R Rotation matrix between the input and output images. By default, it is identity matrix.
    */
    CV_EXPORTS_W void undistortImage(InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray xi, int flags,
        InputArray Knew = cv::noArray(), const Size& new_size = Size(), InputArray R = Mat::eye(3, 3, CV_64F));

    /** @brief Perform omnidirectional camera calibration, the default depth of outputs is CV_64F.

    @param objectPoints Vector of vector of Vec3f object points in world (pattern) coordinate.
    It also can be vector of Mat with size 1xN/Nx1 and type CV_32FC3. Data with depth of 64_F is also acceptable.
    @param imagePoints Vector of vector of Vec2f corresponding image points of objectPoints. It must be the same
    size and the same type with objectPoints.
    @param size Image size of calibration images.
    @param K Output calibrated camera matrix.
    @param xi Output parameter xi for CMei's model
    @param D Output distortion parameters \f$(k_1, k_2, p_1, p_2)\f$
    @param rvecs Output rotations for each calibration images
    @param tvecs Output translation for each calibration images
    @param flags The flags that control calibrate
    @param criteria Termination criteria for optimization
    @param idx Indices of images that pass initialization, which are really used in calibration. So the size of rvecs is the
    same as idx.total().
    */
    CV_EXPORTS_W double calibrate(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, Size size,
        InputOutputArray K, InputOutputArray xi, InputOutputArray D, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs,
        int flags, TermCriteria criteria, OutputArray idx=noArray());

    /** @brief Stereo calibration for omnidirectional camera model. It computes the intrinsic parameters for two
    cameras and the extrinsic parameters between two cameras. The default depth of outputs is CV_64F.

    @param objectPoints Object points in world (pattern) coordinate. Its type is vector<vector<Vec3f> >.
    It also can be vector of Mat with size 1xN/Nx1 and type CV_32FC3. Data with depth of 64_F is also acceptable.
    @param imagePoints1 The corresponding image points of the first camera, with type vector<vector<Vec2f> >.
    It must be the same size and the same type as objectPoints.
    @param imagePoints2 The corresponding image points of the second camera, with type vector<vector<Vec2f> >.
    It must be the same size and the same type as objectPoints.
    @param imageSize1 Image size of calibration images of the first camera.
    @param imageSize2 Image size of calibration images of the second camera.
    @param K1 Output camera matrix for the first camera.
    @param xi1 Output parameter xi of Mei's model for the first camera
    @param D1 Output distortion parameters \f$(k_1, k_2, p_1, p_2)\f$ for the first camera
    @param K2 Output camera matrix for the first camera.
    @param xi2 Output parameter xi of CMei's model for the second camera
    @param D2 Output distortion parameters \f$(k_1, k_2, p_1, p_2)\f$ for the second camera
    @param rvec Output rotation between the first and second camera
    @param tvec Output translation between the first and second camera
    @param rvecsL Output rotation for each image of the first camera
    @param tvecsL Output translation for each image of the first camera
    @param flags The flags that control stereoCalibrate
    @param criteria Termination criteria for optimization
    @param idx Indices of image pairs that pass initialization, which are really used in calibration. So the size of rvecs is the
    same as idx.total().
    @
    */
    CV_EXPORTS_W double stereoCalibrate(InputOutputArrayOfArrays objectPoints, InputOutputArrayOfArrays imagePoints1, InputOutputArrayOfArrays imagePoints2,
        const Size& imageSize1, const Size& imageSize2, InputOutputArray K1, InputOutputArray xi1, InputOutputArray D1, InputOutputArray K2, InputOutputArray xi2,
        InputOutputArray D2, OutputArray rvec, OutputArray tvec, OutputArrayOfArrays rvecsL, OutputArrayOfArrays tvecsL, int flags, TermCriteria criteria, OutputArray idx=noArray());

    /** @brief Stereo rectification for omnidirectional camera model. It computes the rectification rotations for two cameras

    @param R Rotation between the first and second camera
    @param T Translation between the first and second camera
    @param R1 Output 3x3 rotation matrix for the first camera
    @param R2 Output 3x3 rotation matrix for the second camera
    */
    CV_EXPORTS_W void stereoRectify(InputArray R, InputArray T, OutputArray R1, OutputArray R2);

    /** @brief Stereo 3D reconstruction from a pair of images

    @param image1 The first input image
    @param image2 The second input image
    @param K1 Input camera matrix of the first camera
    @param D1 Input distortion parameters \f$(k_1, k_2, p_1, p_2)\f$ for the first camera
    @param xi1 Input parameter xi for the first camera for CMei's model
    @param K2 Input camera matrix of the second camera
    @param D2 Input distortion parameters \f$(k_1, k_2, p_1, p_2)\f$ for the second camera
    @param xi2 Input parameter xi for the second camera for CMei's model
    @param R Rotation between the first and second camera
    @param T Translation between the first and second camera
    @param flag Flag of rectification type, RECTIFY_PERSPECTIVE or RECTIFY_LONGLATI
    @param numDisparities The parameter 'numDisparities' in StereoSGBM, see StereoSGBM for details.
    @param SADWindowSize The parameter 'SADWindowSize' in StereoSGBM, see StereoSGBM for details.
    @param disparity Disparity map generated by stereo matching
    @param image1Rec Rectified image of the first image
    @param image2Rec rectified image of the second image
    @param newSize Image size of rectified image, see omnidir::undistortImage
    @param Knew New camera matrix of rectified image, see omnidir::undistortImage
    @param pointCloud Point cloud of 3D reconstruction, with type CV_64FC3
    @param pointType Point cloud type, it can be XYZRGB or XYZ
    */
    CV_EXPORTS_W void stereoReconstruct(InputArray image1, InputArray image2, InputArray K1, InputArray D1, InputArray xi1,
        InputArray K2, InputArray D2, InputArray xi2, InputArray R, InputArray T, int flag, int numDisparities, int SADWindowSize,
        OutputArray disparity, OutputArray image1Rec, OutputArray image2Rec, const Size& newSize = Size(), InputArray Knew = cv::noArray(),
        OutputArray pointCloud = cv::noArray(), int pointType = XYZRGB);

namespace internal
{
    void initializeCalibration(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, Size size, OutputArrayOfArrays omAll,
        OutputArrayOfArrays tAll, OutputArray K, double& xi, OutputArray idx = noArray());

    void initializeStereoCalibration(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,
        const Size& size1, const Size& size2, OutputArray om, OutputArray T, OutputArrayOfArrays omL, OutputArrayOfArrays tL, OutputArray K1, OutputArray D1, OutputArray K2, OutputArray D2,
        double &xi1, double &xi2, int flags, OutputArray idx);

    void computeJacobian(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, InputArray parameters, Mat& JTJ_inv, Mat& JTE, int flags,
							double epsilon);

    void computeJacobianStereo(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,
        InputArray parameters, Mat& JTJ_inv, Mat& JTE, int flags, double epsilon);

    void encodeParameters(InputArray K, InputArrayOfArrays omAll, InputArrayOfArrays tAll, InputArray distoaration, double xi, OutputArray parameters);

    void encodeParametersStereo(InputArray K1, InputArray K2, InputArray om, InputArray T, InputArrayOfArrays omL, InputArrayOfArrays tL,
        InputArray D1, InputArray D2, double xi1, double xi2, OutputArray parameters);

    void decodeParameters(InputArray paramsters, OutputArray K, OutputArrayOfArrays omAll, OutputArrayOfArrays tAll, OutputArray distoration, double& xi);

    void decodeParametersStereo(InputArray parameters, OutputArray K1, OutputArray K2, OutputArray om, OutputArray T, OutputArrayOfArrays omL,
        OutputArrayOfArrays tL, OutputArray D1, OutputArray D2, double& xi1, double& xi2);

    void estimateUncertainties(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, InputArray parameters, Mat& errors, Vec2d& std_error, double& rms, int flags);

    void estimateUncertaintiesStereo(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2, InputArray parameters, Mat& errors,
        Vec2d& std_error, double& rms, int flags);

    double computeMeanReproErr(InputArrayOfArrays imagePoints, InputArrayOfArrays proImagePoints);

    double computeMeanReproErr(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, InputArray K, InputArray D, double xi, InputArrayOfArrays omAll,
        InputArrayOfArrays tAll);

    double computeMeanReproErrStereo(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2, InputArray K1, InputArray K2,
        InputArray D1, InputArray D2, double xi1, double xi2, InputArray om, InputArray T, InputArrayOfArrays omL, InputArrayOfArrays TL);

    void checkFixed(Mat &G, int flags, int n);

    void subMatrix(const Mat& src, Mat& dst, const std::vector<int>& cols, const std::vector<int>& rows);

    void flags2idx(int flags, std::vector<int>& idx, int n);

    void flags2idxStereo(int flags, std::vector<int>& idx, int n);

    void fillFixed(Mat&G, int flags, int n);

    void fillFixedStereo(Mat& G, int flags, int n);

    double findMedian(const Mat& row);

    Vec3d findMedian3(InputArray mat);

    void getInterset(InputArray idx1, InputArray idx2, OutputArray inter1, OutputArray inter2, OutputArray inter_ori);

    void compose_motion(InputArray _om1, InputArray _T1, InputArray _om2, InputArray _T2, Mat& om3, Mat& T3, Mat& dom3dom1,
        Mat& dom3dT1, Mat& dom3dom2, Mat& dom3dT2, Mat& dT3dom1, Mat& dT3dT1, Mat& dT3dom2, Mat& dT3dT2);

    //void JRodriguesMatlab(const Mat& src, Mat& dst);

    //void dAB(InputArray A, InputArray B, OutputArray dABdA, OutputArray dABdB);
} // internal

//! @}

} // omnidir

} //cv
#endif


text:
<?php

namespace Fuel\Core;

class Database_Result_Cached extends \Database_Result
{

	/**
	 * @param  array   $result
	 * @param  string  $sql
	 * @param  mixed   $as_object
	 */
	public function __construct(array $result, $sql, $as_object = null)
	{
		parent::__construct($result, $sql, $as_object);

		// Find the number of rows in the result
		$this->_total_rows = count($result);
	}

	public function __destruct()
	{
		// Cached results do not use resources
	}

	/**
	 * @return $this
	 */
	public function cached()
	{
		return $this;
	}

	/**
	 * @param integer $offset
	 *
	 * @return bool
	 */
	public function seek($offset)
	{
		if ( ! $this->offsetExists($offset))
		{
			return false;
		}

		$this->_current_row = $offset;
		return true;
	}

	/**
	 * @return mixed
	 */
	public function current()
	{
		return $this->valid() ? $this->_result[$this->_current_row] : null;
	}

}

redpajama_set_name: RedPajamaGithub


text:
import { arrayFirst } from '../array.js';

export function domNodeIsContainedBy (node, containedByNode) {
    if (node === containedByNode)
        return true;
    if (node.nodeType === 11)
        return false; // Fixes issue #1162 - can't use node.contains for document fragments on IE8
    if (containedByNode.contains)
        return containedByNode.contains(node.nodeType !== 1 ? node.parentNode : node);
    if (containedByNode.compareDocumentPosition)
        return (containedByNode.compareDocumentPosition(node) & 16) == 16;
    while (node && node != containedByNode) {
        node = node.parentNode;
    }
    return !!node;
}

export function domNodeIsAttachedToDocument (node) {
    return domNodeIsContainedBy(node, node.ownerDocument.documentElement);
}

export function anyDomNodeIsAttachedToDocument(nodes) {
    return !!arrayFirst(nodes, domNodeIsAttachedToDocument);
}

export function tagNameLower(element) {
    // For HTML elements, tagName will always be upper case; for XHTML elements, it'll be lower case.
    // Possible future optimization: If we know it's an element from an XHTML document (not HTML),
    // we don't need to do the .toLowerCase() as it will always be lower case anyway.
    return element && element.tagName && element.tagName.toLowerCase();
}

export function isDomElement(obj) {
    if (window.HTMLElement) {
        return obj instanceof HTMLElement;
    } else {
        return obj && obj.tagName && obj.nodeType === 1;
    }
}

export function isDocumentFragment(obj) {
    if (window.DocumentFragment) {
        return obj instanceof DocumentFragment;
    } else {
        return obj && obj.nodeType === 11;
    }
}


text:
<!DOCTYPE html>

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <title>Blahutka - Ruby on Rails</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="Ruby on Rails development">
  <meta name="keywords" content="Ruby on Rails, Ruby, twitter bootstrap, development">
  <meta name="author" content="Blahutka">

  <link rel="stylesheet" href="docs/assets/css/bootstrap.css">
  <link rel="stylesheet" href="docs/assets/css/bootstrap-responsive.css">
  <link rel="stylesheet" href="site/public/stylesheets/font-awesome.css">

  <link rel="stylesheet" href="site/public/stylesheets/slimbox2/slimbox2.css">
  <link rel="stylesheet" href="site/public/stylesheets/application.css">

Web Enthusiast

          <address>
            Petr Blahutka

            Czech Republic

            blahutka[at]centrum.cz

            Linkedin.com

            Github
          </address>

Design

I prefere to develope
        Outside In style. Start with
        fast prototyping with
        Adobe Fireworks
        then HTML/CSS with
        TwitterBootstrap
        and last but not least Ruby on Rails.

HTML/CSS

I'm using for views development CSS with
        Sass or
        Less and
        TwitterBootstrap.

Javascript

      Most of the time I worked with jQuery and
      CoffeeScript compiler. I play with Ember JS and
      I really like Riot Js a React-like user interface micro-library

Ruby

I love to work with Ruby and
        Ruby on Rails.
        If the project is really small application/micro page I use
        Sinatra
        with support
        Padrino.

Testing and BDD,TDD

        I think this should be the standard on every
        ROR project.
        Development with Cucumber and
        RSpec
        is perfect solution for
        BDD
        or
        TDD.
        But on projects that I was involved
        this was newer the request.

I'm trying some touch with Cucumber/Rspec on my own projects.
        This is my priority to do better development.

My Tools Desktop, Servers, Hosting

          For my work I'v been using Ubuntu desktop since version 6 and I'm quite happy.
         I'm writing codes in RubyMine.

To manage linux servers (Ubuntu) I usually use
          Capistrano or similar ruby tools.

I'm also interested in

          Lean development

          Eric Ries (www.theleanstartup.com)

Traveling with Couchsurfing.com

YOU CAN HIRE ME

Ruby

                with
                Ruby on Rails, Sinatra,
                Padrino

HTML/CSS

                css with
                Sass or
                Less and
                TwitterBootstrap, javascript
                jQuery

Design

                and prototyping with
                Adobe Fireworks

Portfolio, projects that I worked on

Tools

Trackwave.com/Cor.us, USA

Project was build with

                  rails, v 3.2

                  twitter-bootstrap-rails, v 3.2

                  coffee-rails

                  sass-rails

                  ruby, v 1.9

                  jquery-rails

                  pg

7

Gems

1

Project

show more

Trackwave.com/Cor.us, USA

Cor.us is Survey application, that collects data from customers in a store.
                      I worked on the admin part of the application. Ruby, GUI HTML/CSS, Javascript

            Tools:

Rails,

Twitter Bootstrap,

Coffee Script,

Sass CSS,

see all...

Tools

Hyper Local Media Inc, USA

Project was build with

                  rails, v 3.2

                  twitter-bootstrap-rails, v 2.2

                  sass-rails

                  ruby, v 1.9

                  rails-stripe

                  jquery-rails

6

Gems

1

Project

show more

Hyper Local Media Inc, USA

CMS for local Newspapers. It was old web app which I converted to Twitter Bootstrap.
                      Simultaneously I was adding new functions (Ruby, Javascript)

            Tools:

Ruby on Rails,

Twitter Bootstrap,

Sass CSS,

Ruby 1.9,

see all...

Tools

Najdijob.cz

Project was build with

                  rails, v 2.2.2

                  geonames

                  ultrasphinx

                  capistrano

                  capistrano-ext

                  deprec

                  capistrano_colors

                  aws-s3

                  eventmachine

                  ebuilder

                  tlsmail

                  mysql2

                  mysqlplus

                  jQuery

                  HTML

                  Css

16

Gems

1

Project

show more

Najdijob.cz

Job search engine.
              I build this application for myself. Server setup (capistrano), data grabbing
              from web. Data synchronization with Amazon S3 and web server.

            Tools:

Ruby on Rails,

Geonames,

Ultrasphinx,

Capistrano,

see all...

Tools

Adwave.com, USA/CZ

Project was build with

                  sass

                  jQuery

                  html

3

Gems

1

Project

show more

Adwave.com, USA/CZ

AdWave is a free cross-promotional
                         and advertising network enabling developers,
                        advertisers and publishers to grow their social apps.

            Tools:

Sass,

JQuery,

Html,

see all...

Tools

CleaningService (prototyping)

Project was build with

                  rails, v 3.2

                  sass

                  twitter-bootstrap-rails, v 3.2

3

Gems

1

Project

show more

CleaningService (prototyping)

Web app, Managing time and People. I created partially functional prototype (rails application without connection to database)

            Tools:

Ruby on Rails,

Sass,

Twitter Bootstrap,

see all...

Tools

Himalaya (eshop)

Project was build with

                  rails, v 3.2

                  spree

                  twitter-bootstrap-rails, v 3.2

3

Gems

1

Project

show more

Himalaya (eshop)

I created SpreeCommerce eshop. Running on Heroku, and designed according customer preferences

            Tools:

Ruby on Rails,

SpreeCommerce,

Twitter Bootstrap,

see all...

Tools

Teaching app (prototyping)

Project was build with

                  rails, v 3.2

                  sass

                  twitter-bootstrap-rails, v 3.2

3

Gems

1

Project

show more

Teaching app (prototyping)

Web app for learning and teaching. I created partially functional prototype (rails application without connection to database)

            Tools:

Ruby on Rails,

Sass,

Twitter Bootstrap,

see all...

Tools

Dentservis.cz, CZ

Project was build with

                  rails, v 3.2

                  pg

                  sassy_noise

                  sass-rails

                  less-rails-bootstrap

                  bootstrap-datepicker-rails

                  state_machine

                  will_paginate

                  inherited_resources

                  simple_form

                  erector

                  mini_record

                  meta_search

                  friendly_id

                  wicked_pdf

                  googlecharts

                  completeness-fu

                  delayed_job

                  delayed_job_active_record

                  factory_girl

                  simple_audit

                  devise

                  cancan

                  faker

24

Gems

1

Project

show more

Dentservis.cz, CZ

Contract management
                      for Dentist Laboratories. This is first stage prototyping (TwitterBootstrap) and design UI.
                      Some RubyOnRails setup DB and structure

            Tools:

Rails,

PostgreSql,

SassyNoise,

Sass-rails,

see all...

Tools

Facetuner.com, USA/CZ

Project was build with

                  jQuery

                  HTML

                  sass

3

Gems

1

Project

show more

Facetuner.com, USA/CZ

Social application. I worked
                     as HTML/CSS webmaster

            Tools:

JQuery,

HTML,

Sass,

see all...

Tools

RebateGiant, USA/CZ

Project was build with

                  jQuery

                  HTML

                  sass

3

Gems

1

Project

show more

RebateGiant, USA/CZ

RebateGiant offers consumers money-saving services including cash back rebates,
                        discount coupons, special promotions and free shipping offers from top brand providers.

            Tools:

JQuery,

HTML,

Sass,

see all...

Tools

OnlineVault.com, USA/CZ

Project was build with

                  jQueryMobile

                  HTML

                  Css

3

Gems

1

Project

show more

OnlineVault.com, USA/CZ

small yet powerful application that automatically backs up all your important data to secure servers but also makes it possible for you to access it on the go!

            Tools:

JQueryMobile,

HTML,

Css,

see all...

Tools

StrelecDent.cz, CZ

Project was build with

                  rails, v 3.0.0

                  mysql2

                  compass

                  rails_admin

                  devise

                  i18n_routing

                  mini_record

                  will_paginate

                  magic_encoding

                  aws-s3

                  paperclip

11

Gems

1

Project

show more

StrelecDent.cz, CZ

Small presentation site for Dentist laboratory. Ruby on Rails

            Tools:

Rails,

Mysql2,

Compass,

RailsAdmin,

see all...

Tools

Strechy-Ondrik.cz, CZ

Project was build with

                  sinatra

                  padriono

                  less

                  sass

                  will_paginate

                  erubis

                  guard

                  html

                  jQuery

9

Gems

1

Project

show more

Strechy-Ondrik.cz, CZ

Small presentation for an roofer guy. Padrino framework

            Tools:

Sinatra,

Padriono,

Less,

Sass,

see all...

Tools

PohodovyServis.cz, CZ

Project was build with

                  rails, v 3.2.3

                  mysql2

                  sass-rails

                  less-rails-bootstrap

                  bootstrap-datepicker-rails

                  simple_state_machine

                  will_paginate

                  inherited_resources

                  simple_form

                  erector

                  mini_record

                  meta_search

                  friendly_id

                  guard

                  factory_girl

                  rack-livereload

                  capistrano

                  jQuery

                  HTML

19

Gems

1

Project

show more

PohodovyServis.cz, CZ

Customer service
                    for electronics, PC etc. One place to deal with you service. I worked on whole application

            Tools:

Rails,

Mysql2,

Sass-rails,

Less-rails-bootstrap,

see all...

Back to top

Designed and built with
      twitter bootstrap,
      Sinatra by Blahutka


text:
from xml.etree.ElementTree import QName
import xml.etree.cElementTree as ET
from optparse import OptionParser
import sys

filename = " "

if __name__ == "__main__":

    parser = OptionParser()
    parser.add_option("-n","--cluster-name",dest="cluster_name")
    parser.add_option("-s","--subscription-id",dest="subscription_id")
    parser.add_option("-t","--tenant-id",dest="tenant_id")
    parser.add_option("-a","--aad-client-id",dest="aad_client_id")
    parser.add_option("-c","--aad-client-secret",dest="aad_client_secret")
    parser.add_option("-g","--group-name",dest="group_name")
    parser.add_option("-l","--cluster-tag",dest="cluster_tag")
    parser.add_option("-k","--cluster-port",dest="cluster_port")
    parser.add_option("-f","--filename",dest="filename")
    if len(sys.argv) > 0:
        opts,args = parser.parse_args(sys.argv)
        ## Opening the hazelcast.xml file
        try:
            ## f = open(opts.filename)
            ## Registering default namespace
            hazelcast_ns = "http://www.hazelcast.com/schema/config"
            ET.register_namespace('', hazelcast_ns)
            ns = {'hazelcast_ns': hazelcast_ns}
            ## Loading the root parser
            tree = ET.parse(opts.filename)
            root = tree.getroot()

            ## Finding and replacing the old group tag with the new one
            for group in root.iter(str(QName(hazelcast_ns, "group"))):
                group.find("hazelcast_ns:name", ns).text = opts.cluster_name
            print("Updated cluster user name...")

            for network in root.iter(str(QName(hazelcast_ns, "network"))):
                network.find("hazelcast_ns:port", ns).text = opts.cluster_port
            print("Updated cluster port...")

            print("Updating Azure discovery...")
            for azure in root.iter(str(QName(hazelcast_ns, "azure"))):
                azure.find("hazelcast_ns:client-id", ns).text = opts.aad_client_id
                azure.find("hazelcast_ns:client-secret", ns).text = opts.aad_client_secret
                azure.find("hazelcast_ns:tenant-id", ns).text = opts.tenant_id
                azure.find("hazelcast_ns:subscription-id", ns).text = opts.subscription_id
                azure.find("hazelcast_ns:cluster-id", ns).text = opts.cluster_tag
                azure.find("hazelcast_ns:group-name", ns).text = opts.group_name
            print("Updated Azure discovery....")

            tree.write(opts.filename)
            print("Updating configuration file suceeded , file updated and saved at " + opts.filename)
        except IOError as e:
            print("Unable to open configuration file, I/O error ({0}) : {1}".format(e.errno, e.strerror))

    else:
        print("Script exited without executing, no input parameters found")


text:
package JDO;

import java.nio.charset.Charset;
import java.util.ArrayList;

import javassist.expr.NewArray;

/**
 * Ä¿Ç°¿ÉÄÜÎÞÓã¬Ö÷Òª×÷ÓÃÊÇÒ»¿ªÊ¼Æô¶¯µÄ clearbufferÏß³Ì
 * @author Administrator
 *
 */
public class UploadBuffer {
	private static UploadBuffer instance = null;
	private ArrayList<String[]>uploadList=new ArrayList<String[]>();
	private UploadBuffer() {
		//new ClearUploadBuffer("clear thread").start();
	}

	public static UploadBuffer getInstance() {
		if (instance == null) {
		      instance = new UploadBuffer();
	    }
		return instance;
	}
	public boolean queryItem(String item){
	    //System.out.println("item len:"+item.length());
		for (int i = 0; i < uploadList.size(); i++) {
			String cString=uploadList.get(i)[0];
			//if(item.substring(37,42).equals(uploadList.get(i)[0].substring(37,42))){
			if(item.substring(0,16).equals(cString.substring(0,16)) && item.substring(37).equals(cString.substring(37))){
				return true;
			}
		}
		return false;
	}
	public void addItem(String item){
		if(!queryItem(item)){
			String[] contentString={item,String.valueOf(System.currentTimeMillis())};
			uploadList.add(contentString);
		}
	}
	public boolean deleteItem(){
		//System.out.println("delete");
		for (int i = 0; i <uploadList.size(); i++) {
			Long theTimeLong=Long.parseLong(uploadList.get(i)[1]);
			if(System.currentTimeMillis()-theTimeLong>60000)
			{
				uploadList.remove(i);
			}
		}
		return true;
	}
	public static void main(String[] args) throws InterruptedException {
		/*String a=String.valueOf(System.currentTimeMillis());
		System.out.println((a));
		Thread.currentThread().sleep(1000);
		String b=String.valueOf(System.currentTimeMillis());
		System.out.println(b);
		System.out.println(Long.parseLong(b)-Long.parseLong(a));*/
		//char[]temp1={0,0,0,1};
		//String aString=temp1.toString();
		//aString.getChars(srcBegin, srcEnd, dst, dstBegin)
		//int num=0;
		//System.arraycopy(temp1,0,num,0,4);
		byte[]s=new byte[3];
		s[0]=1;
		s[1]=3;
		s[2]=4;
		String ss=new String(s, Charset.forName("UTF-8"));
		byte[]b=ss.getBytes();

		System.out.println(b[1]);
		String string="a$b$c";
		b=string.getBytes();
		System.out.println(new String(b,Charset.forName("UTF-8")));

	}
}


text:
<!--
  ~ Copyright (c) 2016 eilslabs.
  ~
  ~ Distributed under the MIT License (license terms are at https://www.github.com/TheRoddyWMS/Roddy/LICENSE.txt).
  -->

<configuration configurationType='project' name='TestProjectForUnitTests' description='Like the name says' runtimeServiceClass='de.dkfz.roddy.knowledge.examples.SimpleRuntimeService' imports="testProjectImportLvl0">
    <availableAnalyses>
        <analysis id='test' configuration='testAnalysis' useplugin="TestPluginWithJarFile:develop" />
        <analysis id='testWithoutJar' configuration='testAnalysis' useplugin="TestPluginWithoutJarFile:develop" />
        <analysis id="testnative" configuration="testAnalysisNative" />
    </availableAnalyses>
    <configurationvalues>
        <cvalue name='inputBaseDirectory' value='$USERHOME/temp/roddyLocalTest/testproject/vbp' type='path'/>
        <cvalue name='outputBaseDirectory' value='$USERHOME/temp/roddyLocalTest/testproject/rpp' type='path'/>
        <!--<cvalue name="analysisMethodNameOnOutput" value="genome" type="string"/>-->
        <cvalue name="outputAnalysisBaseDirectory" value="${outputBaseDirectory}/${pid}" type="path"/>
        <!--<cvalue name="outputAnalysisBaseDirectory" value="${outputBaseDirectory}/${pid}" type="path"/>-->

        <cvalue name='isDebugConfiguration' value='true' type="boolean"/>
        <cvalue name='extractSamplesFromOutputFiles' value='true' type="boolean"/>
        <!--<cvalue name="testOutputDirectory" value="${outputAnalysisBaseDirectory}/testfiles2" type="path"/>-->

        <cvalue name='debugOptionsUseVerboseOutput' value='true' type="boolean"/>
        <cvalue name='debugOptionsUseExecuteOutput' value='true' type="boolean"/>
        <cvalue name='debugOptionsUseUndefinedVariableBreak' value='true' type="boolean"/>
        <cvalue name='debugOptionsUseExitOnError' value='false' type="boolean"/>
        <cvalue name='debugOptionsParseScripts' value='false' type="boolean"/>

        <cvalue name='CHROMOSOME_INDICES' value='( {1..22} )' type='bashArray'/>
    </configurationvalues>
    <subconfigurations>
        <configuration name="sub_inherit" inheritAnalyses="false">
            <availableAnalyses>
                <analysis id='test' configuration='testAnalysis'/>
            </availableAnalyses>
            <configurationvalues>
                <cvalue name='outputAnalysisBaseDirectory' value='${outputBaseDirectory}/${pid}' type='path'/>
            </configurationvalues>
            <processingTools>
                <tool name='testScript' value='testScriptSleep.sh' basepath='devel'>
                    <resourcesets>
                        <rset size="l" memory="4" cores="4" nodes="1" walltime="1"/>
                    </resourcesets>
                    <input type="file" typeof="de.dkfz.roddy.knowledge.examples.TextFile" scriptparameter="FILENAME_IN"/>
                    <output type="file" typeof="de.dkfz.roddy.knowledge.examples.TextFile" scriptparameter="FILENAME_OUT"/>
                </tool>

            </processingTools>
        </configuration>
    </subconfigurations>
</configuration>


text:
class ApplicationController < ActionController::Base
  protect_from_forgery with: :exception

  def render_basic
    action = params[:action]
    respond_to do |format|
      format.json do
        render json: export_json(send("#{action}_json"))
      end
      format.html { render action }
    end
  end

  def export_json(value)
    hash = value.respond_to?(:change_values) ? value : value.as_json
    hash.change_values(skip_inner: false) do |v|
      case v
      when Date
        v.to_time.to_i * 1000
      when Time
        v.to_i * 1000
      else
        v
      end
    end.lower_camelize_keys!
  end

  def logged_user
    User.first
  end
end


text:
package org.apache.apex.examples.dynamic;

import org.apache.apex.malhar.lib.stream.DevNull;
import org.apache.hadoop.conf.Configuration;

import com.datatorrent.api.DAG;
import com.datatorrent.api.StreamingApplication;
import com.datatorrent.api.annotation.ApplicationAnnotation;

@ApplicationAnnotation(name = "Dyn")
/**
 * @since 3.7.0
 */
public class App implements StreamingApplication
{

  @Override
  public void populateDAG(DAG dag, Configuration conf)
  {
    Gen gen         = dag.addOperator("gen",     Gen.class);
    DevNull devNull = dag.addOperator("devNull", DevNull.class);

    dag.addStream("data", gen.out, devNull.data);
  }
}


text:
@protocol ATCalendarTitleViewDelegate;

@interface ATCalendarTitleView : UIView <UISearchBarDelegate> {
    id<ATCalendarTitleViewDelegate> _delegate;
    UILabel *_dateLabel;
    UISearchBar *_searchBar;
    UIView *_blindView;
    NSDate *_date;
}
@property (nonatomic, assign) id<ATCalendarTitleViewDelegate> delegate;
@property (nonatomic, retain) UILabel *dateLabel;
@property (nonatomic, retain) UISearchBar *searchBar;
@property (nonatomic, retain) UIView *blindView;
@property (nonatomic, retain) NSDate *date;

- (void)setDate:(NSDate *)date;

@end

@protocol ATCalendarTitleViewDelegate <NSObject>

@optional
- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar;
- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar;
- (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar;
- (void)searchBarTextDidEndEditing:(UISearchBar *)searchBar;
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText;
- (BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar;
- (void)searchBarBookmarkButtonClicked:(UISearchBar *)searchBar;
- (void)searchBarCancelButtonClicked:(UISearchBar *) searchBar;
- (void)searchBarResultsListButtonClicked:(UISearchBar *)searchBar __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_2);
- (void)searchBar:(UISearchBar *)searchBar selectedScopeButtonIndexDidChange:(NSInteger)selectedScope __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);

@end


text:
'''

 '''

# Base class of communicationServer that handles message traffic across a certain type of tunnel (Socket/Serial bridge)
class communicationServer:
    def __init__(self):
        pass

    # Accept a message from the other side of the tunnel
    def accept(self):
        pass

    # Other server object writes to the internal buffer of communicationServer
    def writeToInternal(self, srcContent):
        pass

    # Upon a remote request, communicationServer write whatever is in the internal buffer to the remote client
    def writeToExternal(self):
        pass


text:
package sealion.dao;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

import org.seasar.doma.AnnotateWith;
import org.seasar.doma.Annotation;
import org.seasar.doma.AnnotationTarget;

@AnnotateWith(annotations = {
        @Annotation(target = AnnotationTarget.CLASS, type = ApplicationScoped.class),
        @Annotation(target = AnnotationTarget.CONSTRUCTOR, type = Inject.class) })
@Retention(RetentionPolicy.RUNTIME)
public @interface CdiManaged {
}


text:
"""
Corpus reader for corpora whose documents are xml files.

(note -- not named 'xml' to avoid conflicting w/ standard xml package)
"""

from api import CorpusReader
from util import *
from nltk.internals import deprecated

# Use the c version of ElementTree, which is faster, if possible:
try: from xml.etree import cElementTree as ElementTree
except ImportError: from nltk.etree import ElementTree

class XMLCorpusReader(CorpusReader):
    """
    Corpus reader for corpora whose documents are xml files.
    """
    def xml(self, files=None):
        return concat([ElementTree.parse(filename).getroot()
                       for filename in self.abspaths(files)])

    def raw(self, files=None):
        return concat([open(filename).read()
                       for filename in self.abspaths(files)])

    #{ Deprecated since 0.8
    @deprecated("Use .raw() or .xml() instead.")
    def read(self, items=None, format='xml'):
        if format == 'raw': return self.raw(items)
        if format == 'xml': return self.xml(items)
        raise ValueError('bad format %r' % format)
    #}


text:
/*
 * service_registration.c
 *
 *  \date       Aug 6, 2010
 *  \author    	Apache Celix Project Team
 *  \copyright	Apache License, Version 2.0
 */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "service_registration_private.h"
#include "constants.h"
#include "service_factory.h"
#include "service_reference.h"
#include "celix_log.h"
#include "celix_threads.h"

static celix_status_t serviceRegistration_initializeProperties(service_registration_pt registration, properties_pt properties);

celix_status_t serviceRegistration_createInternal(service_registry_pt registry, bundle_pt bundle, char * serviceName, long serviceId,
        void * serviceObject, properties_pt dictionary, bool isFactory, service_registration_pt *registration);

service_registration_pt serviceRegistration_create(service_registry_pt registry, bundle_pt bundle, char * serviceName, long serviceId, void * serviceObject, properties_pt dictionary) {
    service_registration_pt registration = NULL;
	serviceRegistration_createInternal(registry, bundle, serviceName, serviceId, serviceObject, dictionary, false, &registration);
	return registration;
}

service_registration_pt serviceRegistration_createServiceFactory(service_registry_pt registry, bundle_pt bundle, char * serviceName, long serviceId, void * serviceObject, properties_pt dictionary) {
    service_registration_pt registration = NULL;
    serviceRegistration_createInternal(registry, bundle, serviceName, serviceId, serviceObject, dictionary, true, &registration);
    return registration;
}

celix_status_t serviceRegistration_createInternal(service_registry_pt registry, bundle_pt bundle, char * serviceName, long serviceId,
        void * serviceObject, properties_pt dictionary, bool isFactory, service_registration_pt *registration) {
    celix_status_t status = CELIX_SUCCESS;

    *registration = malloc(sizeof(**registration));
    if (*registration) {
		(*registration)->isServiceFactory = isFactory;
		(*registration)->registry = registry;
		(*registration)->className = strdup(serviceName);
		(*registration)->bundle = bundle;
		(*registration)->references = NULL;
		arrayList_create(&(*registration)->references);

		(*registration)->serviceId = serviceId;
		(*registration)->svcObj = serviceObject;
		if (isFactory) {
			(*registration)->serviceFactory = (service_factory_pt) (*registration)->svcObj;
		} else {
			(*registration)->serviceFactory = NULL;
		}

		//	serviceReference_create(pool, bundle, *registration, &(*registration)->reference);

		(*registration)->isUnregistering = false;
		celixThreadMutex_create(&(*registration)->mutex, NULL);

		serviceRegistration_initializeProperties(*registration, dictionary);
    } else {
    	status = CELIX_ENOMEM;
    }

	return CELIX_SUCCESS;
}

celix_status_t serviceRegistration_destroy(service_registration_pt registration) {
    free(registration->className);
	registration->className = NULL;
	registration->registry = NULL;

	properties_destroy(registration->properties);
	arrayList_destroy(registration->references);

	celixThreadMutex_destroy(&registration->mutex);

	registration = NULL;
	free(registration);

	return CELIX_SUCCESS;
}

static celix_status_t serviceRegistration_initializeProperties(service_registration_pt registration, properties_pt dictionary) {
	char * sId = (char *)malloc(sizeof(registration->serviceId) + 1);

	if (dictionary == NULL) {
		dictionary = properties_create();
	}

	registration->properties = dictionary;

	sprintf(sId, "%ld", registration->serviceId);
	properties_set(dictionary, (char *) OSGI_FRAMEWORK_SERVICE_ID, sId);
	properties_set(dictionary, (char *) OSGI_FRAMEWORK_OBJECTCLASS, registration->className);
	free(sId);

	return CELIX_SUCCESS;
}

bool serviceRegistration_isValid(service_registration_pt registration) {
	return registration == NULL ? false : registration->svcObj != NULL;
}

void serviceRegistration_invalidate(service_registration_pt registration) {
	celixThreadMutex_lock(&registration->mutex);
	registration->svcObj = NULL;
	celixThreadMutex_unlock(&registration->mutex);
}

celix_status_t serviceRegistration_unregister(service_registration_pt registration) {
	celix_status_t status = CELIX_SUCCESS;
	celixThreadMutex_lock(&registration->mutex);
	if (!serviceRegistration_isValid(registration) || registration->isUnregistering) {
		printf("Service is already unregistered\n");
		status = CELIX_ILLEGAL_STATE;
	} else {
		registration->isUnregistering = true;
	}
	celixThreadMutex_unlock(&registration->mutex);

//	bundle_pt bundle = NULL;
//	status = serviceReference_getBundle(registration->reference, &bundle);
	if (status == CELIX_SUCCESS) {
		serviceRegistry_unregisterService(registration->registry, registration->bundle, registration);
	}

	framework_logIfError(logger, status, NULL, "Cannot unregister service registration");

	return status;
}

celix_status_t serviceRegistration_getService(service_registration_pt registration, bundle_pt bundle, void **service) {
    if (registration->isServiceFactory) {
        service_factory_pt factory = registration->serviceFactory;
        factory->getService(registration->serviceFactory, bundle, registration, service);
    } else {
        (*service) = registration->svcObj;
    }
    return CELIX_SUCCESS;
}

celix_status_t serviceRegistration_getProperties(service_registration_pt registration, properties_pt *properties) {
	celix_status_t status = CELIX_SUCCESS;

	if (registration != NULL && *properties == NULL) {
		*properties = registration->properties;
	} else {
		status = CELIX_ILLEGAL_ARGUMENT;
	}

	framework_logIfError(logger, status, NULL, "Cannot get registration properties");

	return status;
}

celix_status_t serviceRegistration_setProperties(service_registration_pt registration, properties_pt properties) {
	properties_pt oldProps = registration->properties;

	serviceRegistration_initializeProperties(registration, properties);

	serviceRegistry_servicePropertiesModified(registration->registry, registration, oldProps);

	return CELIX_SUCCESS;
}

celix_status_t serviceRegistration_getRegistry(service_registration_pt registration, service_registry_pt *registry) {
	celix_status_t status = CELIX_SUCCESS;

	if (registration != NULL && *registry == NULL) {
		*registry = registration->registry;
	} else {
		status = CELIX_ILLEGAL_ARGUMENT;
	}

	framework_logIfError(logger, status, NULL, "Cannot get registry");

	return status;
}

celix_status_t serviceRegistration_getServiceReferences(service_registration_pt registration, array_list_pt *references) {
	celix_status_t status = CELIX_SUCCESS;

	if (registration != NULL && *references == NULL) {
		*references = registration->references;
	} else {
		status = CELIX_ILLEGAL_ARGUMENT;
	}

	framework_logIfError(logger, status, NULL, "Cannot get service reference");

	return status;
}

celix_status_t serviceRegistration_getBundle(service_registration_pt registration, bundle_pt *bundle) {
	celix_status_t status = CELIX_SUCCESS;

	if (registration != NULL && *bundle == NULL) {
		*bundle = registration->bundle;
	} else {
		status = CELIX_ILLEGAL_ARGUMENT;
	}

	framework_logIfError(logger, status, NULL, "Cannot get bundle");

	return status;
}

celix_status_t serviceRegistration_getServiceName(service_registration_pt registration, char **serviceName) {
	celix_status_t status = CELIX_SUCCESS;

	if (registration != NULL && *serviceName == NULL) {
		*serviceName = registration->className;
	} else {
		status = CELIX_ILLEGAL_ARGUMENT;
	}

	framework_logIfError(logger, status, NULL, "Cannot get service name");

	return status;
}


text:
// Copyright (c) Microsoft Corporation
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#pragma once

NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_BEGIN

    class xbox_live_context_impl;

class service_call_logging_config
{
public:

    /// <summary>
    /// Gets the service_call_logger singleton instance
    /// </summary>
    _XSAPIIMP static std::shared_ptr<service_call_logging_config> get_singleton_instance();

    /// <summary>
    /// Enables the tracking of service calls
    /// </summary>
    _XSAPIIMP void enable();

    /// <summary>
    /// Disables the tracking of service calls
    /// </summary>
    _XSAPIIMP void disable();

#if TV_API || UWP_API || UNIT_TEST_SERVICES
    /// <summary>
    /// Internal API
    /// Enables Logs to be enabled/disabled through protocal activation
    /// </summary>
    void _Register_for_protocol_activation();
#endif

    /// <summary>
    /// Internal API
    /// </summary>
    void _ReadLocalConfig();

private:

    service_call_logging_config();
    service_call_logging_config(const service_call_logging_config&);
    void operator=(const service_call_logging_config&);
    friend xbox_live_context_impl;
};

NAMESPACE_MICROSOFT_XBOX_SERVICES_CPP_END


text:
import React, { Component, PropTypes } from 'react'
import NotificationSystem from '../Notification/System'
import ModalSystem from '../Modal/System'
import IndicatorSystem from '../Indicator/System'
import PickerSystem from '../Picker/System'
import { getThemes } from '../../utils/theme'
import classNames from 'classnames'

export default class View extends Component {

  static propTypes = {
    children: PropTypes.node,
    theme: PropTypes.oneOf(getThemes()),
    className: PropTypes.string
  };

  static childContextTypes = {
    ui: PropTypes.object
  };

  constructor (props) {
    super(props)
    this._tabbar = 'none'
  }

  getChildContext () {
    return {
      ui: {
        addNotification: (notification) => { this.addNotification(notification) },
        setTabbar: (type) => { this.setTabbar(type) },
        getTabbar: () => { return this.getTabbar() },
        showPreloader: () => { this.showPreloader() },
        hidePreloader: () => { this.hidePreloader() },
        showModal: (modal) => { this.showModal(modal) },
        hideModal: () => { this.hideModal() },
        showPicker: (picker) => { this.showPicker(picker) }
      }
    }
  }

  setTabbar (type) {
    this._type = type
  }

  getTabbar () {
    return this._type
  }

  addNotification (notification) {
    this.refs['notificationSystem'].addNotification(notification)
  }

  showPreloader () {
    this.refs['indicatorSystem'].showPreloader()
  }

  hidePreloader () {
    this.refs['indicatorSystem'].hidePreloader()
  }

  showModal (modal) {
    this.refs['modalSystem'].showModal(modal)
  }

  hideModal () {
    this.refs['modalSystem'].hideModal()
  }

  showPicker (picker) {
    this.refs['pickerSystem'].showPicker(picker)
  }

  render () {
    const { children, className, theme } = this.props
    const classes = classNames({
      'view': true,
      [`theme-${theme}`]: theme
    }, className)
    return (

            {children}

        <NotificationSystem ref='notificationSystem' />
        <ModalSystem ref='modalSystem' />
        <IndicatorSystem ref='indicatorSystem' />
        <PickerSystem ref='pickerSystem' />

    )
  }
}


text:
import unittest

from binary_search import find

# Tests adapted from `problem-specifications//canonical-data.json`

class BinarySearchTest(unittest.TestCase):
    def test_finds_a_value_in_an_array_with_one_element(self):
        self.assertEqual(find([6], 6), 0)

    def test_finds_a_value_in_the_middle_of_an_array(self):
        self.assertEqual(find([1, 3, 4, 6, 8, 9, 11], 6), 3)

    def test_finds_a_value_at_the_beginning_of_an_array(self):
        self.assertEqual(find([1, 3, 4, 6, 8, 9, 11], 1), 0)

    def test_finds_a_value_at_the_end_of_an_array(self):
        self.assertEqual(find([1, 3, 4, 6, 8, 9, 11], 11), 6)

    def test_finds_a_value_in_an_array_of_odd_length(self):
        self.assertEqual(
            find([1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 634], 144), 9
        )

    def test_finds_a_value_in_an_array_of_even_length(self):
        self.assertEqual(find([1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377], 21), 5)

    def test_identifies_that_a_value_is_not_included_in_the_array(self):
        with self.assertRaisesWithMessage(ValueError):
            find([1, 3, 4, 6, 8, 9, 11], 7)

    def test_a_value_smaller_than_the_array_s_smallest_value_is_not_found(self):
        with self.assertRaisesWithMessage(ValueError):
            find([1, 3, 4, 6, 8, 9, 11], 0)

    def test_a_value_larger_than_the_array_s_largest_value_is_not_found(self):
        with self.assertRaisesWithMessage(ValueError):
            find([1, 3, 4, 6, 8, 9, 11], 13)

    def test_nothing_is_found_in_an_empty_array(self):
        with self.assertRaisesWithMessage(ValueError):
            find([], 1)

    def test_nothing_is_found_when_the_left_and_right_bounds_cross(self):
        with self.assertRaisesWithMessage(ValueError):
            find([1, 2], 0)

    # Utility functions
    def assertRaisesWithMessage(self, exception):
        return self.assertRaisesRegex(exception, r".+")

if __name__ == "__main__":
    unittest.main()


text:
Puppet::Type.newtype(:cs_rsc_defaults) do
  @doc = "Type for manipulating corosync/pacemaker global defaults for
    resource options. The type is pretty simple interface for setting
    key/value pairs or removing them completely.  Removing them will result
    in them taking on their default value.

    More information on resource defaults can be found here:

    * http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-defaults.html
    * http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-options.html"

  ensurable

  newparam(:name) do
    desc "Name identifier of this property.  Simply the name of the resource
      option.  Happily most of these are unique."

    isnamevar
  end

  newparam(:cib) do
    desc "Corosync applies its configuration immediately. Using a CIB allows
      you to group multiple primitives and relationships to be applied at
      once. This can be necessary to insert complex configurations into
      Corosync correctly.

      This paramater sets the CIB this rsc_defaults should be created in. A
      cs_shadow resource with a title of the same name as this value should
      also be added to your manifest."
  end

  newproperty(:value) do
    desc "Value of the property.  It is expected that this will be a single
      value but we aren't validating string vs. integer vs. boolean because
      resource options can range the gambit."
  end

  autorequire(:service) do
    %w[corosync pacemaker]
  end
end


text:
import * as ts from 'typescript';

export const NO_MATCH: Match = {
  diagnostic: undefined
};
export interface Match {
  diagnostic: ts.Diagnostic;
  // First fix is applied by default
  // Other fixes may be shown in an interactive context
  fixes?: Fix[];
}
export interface Replacement {
  start: number;
  end: number;
  replaceWith: string;
}
export class Fix {
  replacements: Replacement[] = [];
  constructor(private nodeStart: number, private nodeEnd: number) {}
  appendText(text: string): this {
    this.replacements.push({start: this.nodeEnd, end: this.nodeEnd, replaceWith: text});
    return this;
  }
}

export class MatchBuilder {
  private diagnostic: ts.Diagnostic;
  private fixes: Fix[] = [];
  constructor(private node: ts.Node) {
    this.diagnostic = {
      messageText: '',
      category: 1,
      code: 1,
      file: node.getSourceFile(),
      start: node.getStart(),
      length: node.getEnd() - node.getStart(),
    };
  }
  public set diagnosticMsg(msg: string) { this.diagnostic.messageText = msg; }
  public addFix(fix: Fix = new Fix(this.node.getStart(), this.node.getEnd())) {
    this.fixes.push(fix);
    return fix;
  }
  public build(): Match { return {diagnostic: this.diagnostic, fixes: this.fixes}; }
}


text:
(function () {
    'use strict';
    angular.module('app').service('DailyObservationService', [
        '$http',
        function ($http) {
            var service = {
                get: get,
                save: save
            };

            return service;

            function get() {
                return $http.get("/api/dailyobservations");
            }

            function save(object) {
                return $http.post("/api/dailyobservations", object);
            }
        }
    ]);
}

)();


text:
package com.intellij.lang.jsgraphql.psi.impl;

import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static com.intellij.lang.jsgraphql.psi.GraphQLElementTypes.*;
import com.intellij.lang.jsgraphql.psi.*;

public abstract class GraphQLStringLiteralImpl extends GraphQLStringLiteralMixin implements GraphQLStringLiteral {

  public GraphQLStringLiteralImpl(ASTNode node) {
    super(node);
  }

  public void accept(@NotNull GraphQLVisitorBase visitor) {
    visitor.visitStringLiteral(this);
  }

  @Override
  public void accept(@NotNull PsiElementVisitor visitor) {
    if (visitor instanceof GraphQLVisitorBase) accept((GraphQLVisitorBase)visitor);
    else super.accept(visitor);
  }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="max_duration_seconds">300</integer>
    <integer name="duration_pitch_seconds">5</integer>
</resources>


text:
package com.cloudTop.starshare.been;

import android.os.Parcel;
import android.os.Parcelable;

import com.cloudTop.starshare.utils.LogUtils;

import java.util.List;

/**
 * Created by Administrator on 2017/7/11.
 */

public class HomePageInfoBean  {
    private String home_last_pic_tail="";
    private List<SymbolInfoBean> symbol_info;

    public List<SymbolInfoBean> getSymbol_info() {
        return symbol_info;
    }

    public void setSymbol_info(List<SymbolInfoBean> symbol_info) {
        this.symbol_info = symbol_info;
    }

    public String getHome_last_pic_tail() {
        return home_last_pic_tail;
    }

    public void setHome_last_pic_tail(String home_last_pic_tail) {
        this.home_last_pic_tail = home_last_pic_tail;
    }

    public static class SymbolInfoBean  implements Parcelable {
        /**
         * change : 0
         * currentPrice : 0
         * home_button_pic :
         * home_pic : http://wx1.sinaimg.cn/mw690/4e39d498gy1ffrtvf9rbij20zk0qodqt.jpg
         * name : 林志玲
         * pchg : 0
         * pic : http://tva2.sinaimg.cn/crop.0.0.512.512.180/4e39d498jw8f9zphpwmorj20e80e80t6.jpg
         * priceTime : 1499741959
         * pushlish_type : 0
         * star_type : 1
         * symbol : 1001
         * sysTime : 1499741959
         * wid : 1011312412824
         */

        private int change;
        private int currentPrice;
        private String home_button_pic;
        private String home_pic_tail="";
        private String name;
        private int pchg;
        private String pic_tail="";
        private int priceTime;
        private int pushlish_type;
        private int star_type;
        private String symbol;
        private int sysTime;
        private String wid;
        private String work;

        public String getWork() {
            return work;
        }

        public void setWork(String work) {
            this.work = work;
        }

        public int getChange() {
            return change;
        }

        public void setChange(int change) {
            this.change = change;
        }

        public int getCurrentPrice() {
            return currentPrice;
        }

        public void setCurrentPrice(int currentPrice) {
            this.currentPrice = currentPrice;
        }

        public String getHome_button_pic() {
            return home_button_pic;
        }

        public void setHome_button_pic(String home_button_pic) {
            this.home_button_pic = home_button_pic;
        }

        public String getHome_pic_tail() {
            LogUtils.loge("getHome_pic_tail:"+home_pic_tail);
            return home_pic_tail;
        }

        public void setHome_pic_tail(String home_pic_tail) {
            this.home_pic_tail = home_pic_tail;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getPchg() {
            return pchg;
        }

        public void setPchg(int pchg) {
            this.pchg = pchg;
        }

        public String getPic_tail() {
            return pic_tail;
        }

        public void setPic_tail(String pic_tail) {
            this.pic_tail = pic_tail;
        }

        public int getPriceTime() {
            return priceTime;
        }

        public void setPriceTime(int priceTime) {
            this.priceTime = priceTime;
        }

        public int getPushlish_type() {
            return pushlish_type;
        }

        public void setPushlish_type(int pushlish_type) {
            this.pushlish_type = pushlish_type;
        }

        public int getStar_type() {
            return star_type;
        }

        public void setStar_type(int star_type) {
            this.star_type = star_type;
        }

        public String getSymbol() {
            return symbol;
        }

        public void setSymbol(String symbol) {
            this.symbol = symbol;
        }

        public int getSysTime() {
            return sysTime;
        }

        public void setSysTime(int sysTime) {
            this.sysTime = sysTime;
        }

        public String getWid() {
            return wid;
        }

        public void setWid(String wid) {
            this.wid = wid;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.change);
            dest.writeInt(this.currentPrice);
            dest.writeString(this.home_button_pic);
            dest.writeString(this.home_pic_tail);
            dest.writeString(this.name);
            dest.writeInt(this.pchg);
            dest.writeString(this.pic_tail);
            dest.writeInt(this.priceTime);
            dest.writeInt(this.pushlish_type);
            dest.writeInt(this.star_type);
            dest.writeString(this.symbol);
            dest.writeInt(this.sysTime);
            dest.writeString(this.wid);
            dest.writeString(this.work);
        }

        public SymbolInfoBean() {
        }

        protected SymbolInfoBean(Parcel in) {
            this.change = in.readInt();
            this.currentPrice = in.readInt();
            this.home_button_pic = in.readString();
            this.home_pic_tail = in.readString();
            this.name = in.readString();
            this.pchg = in.readInt();
            this.pic_tail = in.readString();
            this.priceTime = in.readInt();
            this.pushlish_type = in.readInt();
            this.star_type = in.readInt();
            this.symbol = in.readString();
            this.sysTime = in.readInt();
            this.wid = in.readString();
            this.work = in.readString();
        }

        public static final Parcelable.Creator<SymbolInfoBean> CREATOR = new Parcelable.Creator<SymbolInfoBean>() {
            @Override
            public SymbolInfoBean createFromParcel(Parcel source) {
                return new SymbolInfoBean(source);
            }

            @Override
            public SymbolInfoBean[] newArray(int size) {
                return new SymbolInfoBean[size];
            }
        };
    }
}


text:
require 'test_helper'

class CalculateAllMysqlTest < Minitest::Test

  def db_credentials
    { adapter: 'mysql2', database: 'calculate_all_test', username: 'root' }
  end

  def setup
    super unless defined? @@connected
    @@connected = true
  end

  include CalculateAllCommon

end


text:
title:  The Man Noah
date:  12/04/2021
---

**Before the Flood, the earth is filled with sin and evil people everywhere. But there is someone who is different from the people of his time. That man is Noah. Read Genesis 6:9. What does this verse say about Noah? On the lines below write your answers about what you think each part of the verse means**:

`1. Noah "was a good man all his life" (ERV):`

`2. Noah "was without blame among the people of his time" (NIrV)`

`3. Noah "always followed God" (ERV):`

Noah knows the Lord as his personal Savior. Noah is someone that the Lord can work with. Noah will listen to God, obey Him, and trust in Him. That is why the Lord can use Noah to build the boat. In the New Testament, Peter names Noah "a preacher of right living" (2 Peter 2:5, NLV).

`Read Genesis 6:8. How does this verse help us understand the special connection between Noah and God?`

The first time we see the word "favor" in the Bible is in Genesis 6:8 (NLV). The word "favor" has the same meaning here in the Old Testament as it does in the New Testament. Another word for "favor" is "grace." Grace or favor is the gift of mercy from God to sinners. God gives us His gift of mercy to forgive us for our sins. We can do nothing to earn His forgiveness. We must accept it freely by faith. Remember, Noah is a good man. But he is also a sinner who needs grace. So, Noah is no different from any of us who are trying to follow the Lord with all our hearts.

`Noah needs grace the same as we do. Ask yourself: How am I the same as Noah? Do people say that I am good and follow the Lord? Write down the reasons for your answer.`


text:
module Cardapi
  # Adaptador de exemplo chamado caso a aplicacao mae nao o tenha configurado
  class SampleAdapter

    def processa(transacao)
      transacao
    end

    def autentica(api_key, password)
      true
    end

    def estorna(transacao)
      transacao
    end

  end
end


text:
//
// test/unit/controllers/controllersSpec.js
//

describe("Unit: Testing Controllers", function() {

  var $rootScope
    , $controller
    ;

  var controller = function(ctrl, mock) {
   //create a scope object for us to use.

    if(!mock) mock = {};
    if(!mock.$scope) {
      mock.$scope = $rootScope.$new();
    }

    //now run that scope through the controller function,
    //injecting any services or other injectables we need.
    return $controller(ctrl, mock);
  };

  beforeEach(angular.mock.module('nx-calendar'));

  /* IMPORTANT!
   * this is where we're setting up the $scope and
   * calling the controller function on it, injecting
   * all the important bits, like our mockService */
  beforeEach(inject(function(_$rootScope_, _$controller_) {
    $rootScope = _$rootScope_;
    $controller = _$controller_;
  }));

  describe("nx-calendar-controller", function() {

    var scope, mock;

    beforeEach(function() {
      scope = $rootScope.$new();
      mock  = { $scope: scope };
    });

    it("should have a configuration filled with defaults", function() {
      controller('nx-calendar-controller', mock);
      scope.should.have.property('config');
      scope.should.have.property('view');
    });

    it("should have set the view-property to 'day' when undefined", function() {
      controller('nx-calendar-controller', mock);
      scope.view.should.be.equal('day');
    });

    it("should have use the view-property when it was set to 'month'", function() {
      scope.view = 'month';
      controller('nx-calendar-controller', mock);
      scope.view.should.be.equal('month');
    });

    it("should have use the view-property when it was set to 'events'", function() {
      scope.view = 'events';
      controller('nx-calendar-controller', mock);
      scope.view.should.be.equal('events');
    });

    it("should have set the view-property to 'day' when it is set to 'test'", function() {
      scope.view = 'test';
      controller('nx-calendar-controller', mock);
      scope.view.should.be.equal('day');
    });

  });

});


text:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class YouLoseForm
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.Label2 = New System.Windows.Forms.Label()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.SuspendLayout()
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.Font = New System.Drawing.Font("Chiller", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label2.ForeColor = System.Drawing.Color.Maroon
        Me.Label2.Location = New System.Drawing.Point(3, 27)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(71, 31)
        Me.Label2.TabIndex = 4
        Me.Label2.Text = "LOSE!"
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Font = New System.Drawing.Font("Chiller", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.ForeColor = System.Drawing.Color.DarkRed
        Me.Label1.Location = New System.Drawing.Point(3, 3)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(53, 31)
        Me.Label1.TabIndex = 3
        Me.Label1.Text = "YOU"
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.Font = New System.Drawing.Font("Webdings", 34.0!)
        Me.Label3.ForeColor = System.Drawing.Color.Crimson
        Me.Label3.Location = New System.Drawing.Point(63, 8)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(66, 48)
        Me.Label3.TabIndex = 5
        Me.Label3.Text = "+"
        '
        'YouLoseForm
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.BackColor = System.Drawing.Color.Tomato
        Me.ClientSize = New System.Drawing.Size(122, 58)
        Me.ControlBox = False
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.Label1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.Name = "YouLoseForm"
        Me.ShowIcon = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
End Class


text:
package com.alicode.game.dogedash.screens;

import static com.badlogic.gdx.scenes.scene2d.actions.Actions.delay;
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.forever;
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.moveBy;
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.rotateBy;
import static com.badlogic.gdx.scenes.scene2d.actions.Actions.sequence;

import com.alicode.game.dogedash.Assets;
import com.alicode.game.dogedash.Consts;
import com.alicode.game.dogedash.DogeDashCore;
import com.alicode.game.dogedash.models.WindowOverlay;
import com.alicode.game.dogedash.utils.txt.GameText;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.scenes.scene2d.Action;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import com.badlogic.gdx.utils.Scaling;

public class HighscoresScreen implements Screen {

	enum MenuState {
		ShowLevel, ShowDifficulty
	}

	private Image imageMenuBg, imageBackButton, imageMenuMomNosePaw, imageMenuMomBody, imageMenuCreamPupBody, imageMenuCreamPupPaw,
			imageMenuCreamPupPaw2, imageMenuBluePup;

	private Image imageEasyHighscore, imageNormalHighscore, imageHardHighscore;
	private Image imageLevel1, imageLevel2, imageLevel3;
	private Image imageChosenTime, imageChosenCaughtPups, imageChosenMissedPups, imageChosenStyle, imageChosenPupPoints;

	private GameText easyHighscore, normalHighscore, hardHighscore;
	private GameText chosenTime, chosenCaughtPups, chosenMissedPups, chosenStyle, chosenPupPoints;

	private DogeDashCore game;
	private Drawable tempDrawable;
	private int levelNum, difficultyNum;
	private String tableName;
	private Stage stage;
	private WindowOverlay winOverlay;
	private InputMultiplexer inputMultiplexer;

	public HighscoresScreen(DogeDashCore game) {
		this.game = game;

		easyHighscore = new GameText();
		normalHighscore = new GameText();
		hardHighscore = new GameText();
		winOverlay = new WindowOverlay();

		chosenTime = new GameText();
		chosenCaughtPups = new GameText();
		chosenMissedPups = new GameText();
		chosenPupPoints = new GameText();
		chosenStyle = new GameText();

		stage = new Stage();
		inputMultiplexer = new InputMultiplexer(stage);
	}

	@Override
	public void show() {

		initBackground();
		initForeground();
		initInput();
		initActors();

	}

	private void initBackground() {
		// background shit
		tempDrawable = new TextureRegionDrawable(Assets.menu);
		imageMenuBg = new Image(tempDrawable, Scaling.stretch);
		imageMenuBg.setFillParent(true);

		tempDrawable = new TextureRegionDrawable(Assets.menu_mombody);
		imageMenuMomBody = new Image(tempDrawable, Scaling.stretch);
		imageMenuMomBody.setFillParent(true);

		tempDrawable = new TextureRegionDrawable(Assets.menu_mom_nose_paw);
		imageMenuMomNosePaw = new Image(tempDrawable, Scaling.stretch);
		imageMenuMomNosePaw.setFillParent(true);

		tempDrawable = new TextureRegionDrawable(Assets.menu_mombody);
		imageMenuMomBody = new Image(tempDrawable, Scaling.stretch);
		imageMenuMomBody.setFillParent(true);

		tempDrawable = new TextureRegionDrawable(Assets.menu_bluepup);
		imageMenuBluePup = new Image(tempDrawable);
		imageMenuBluePup.setX(460);
		imageMenuBluePup.setY(45);

		tempDrawable = new TextureRegionDrawable(Assets.menu_creampup_body);
		imageMenuCreamPupBody = new Image(tempDrawable);
		imageMenuCreamPupBody.setX(200);
		imageMenuCreamPupBody.setY(-10);

		tempDrawable = new TextureRegionDrawable(Assets.menu_creampup_paw);
		imageMenuCreamPupPaw = new Image(tempDrawable);
		imageMenuCreamPupPaw.setX(200);
		imageMenuCreamPupPaw.setY(10);

		tempDrawable = new TextureRegionDrawable(Assets.menu_creampup_paw2);
		imageMenuCreamPupPaw2 = new Image(tempDrawable);
		imageMenuCreamPupPaw2.setX(290);
		imageMenuCreamPupPaw2.setY(10);

		tempDrawable = new TextureRegionDrawable(Assets.back);
		imageBackButton = new Image(tempDrawable);
		imageBackButton.setX(660);
		imageBackButton.setY(20);

	}

	private void initForeground() {
		tempDrawable = new TextureRegionDrawable(Assets.lvl1);
		imageLevel1 = new Image(tempDrawable);
		imageLevel1.setX(30);
		imageLevel1.setY(340);

		tempDrawable = new TextureRegionDrawable(Assets.lvl2);
		imageLevel2 = new Image(tempDrawable);
		imageLevel2.setX(30);
		imageLevel2.setY((340 - Assets.lvl1.getRegionHeight() * 1) - 10);

		tempDrawable = new TextureRegionDrawable(Assets.tutorial_select);
		imageLevel3 = new Image(tempDrawable);
		imageLevel3.setX(30);
		imageLevel3.setY((340 - Assets.lvl1.getRegionHeight() * 2) - 20);

		tempDrawable = new TextureRegionDrawable(Assets.tutorial_select);
		imageLevel3 = new Image(tempDrawable);
		imageLevel3.setX(30);
		imageLevel3.setY((340 - Assets.lvl1.getRegionHeight() * 2) - 20);

		tempDrawable = new TextureRegionDrawable(Assets.easySmall);
		imageEasyHighscore = new Image(tempDrawable);
		imageEasyHighscore.setX(360);
		imageEasyHighscore.setY(435);
		easyHighscore.setX(600);
		easyHighscore.setY(435 + Assets.easySmall.getRegionHeight());
		easyHighscore.setText("Choose");

		tempDrawable = new TextureRegionDrawable(Assets.normalSmall);
		imageNormalHighscore = new Image(tempDrawable);
		imageNormalHighscore.setX(360);
		imageNormalHighscore.setY(385);
		normalHighscore.setX(600);
		normalHighscore.setY(385 + Assets.normalSmall.getRegionHeight());
		normalHighscore.setText("a");

		tempDrawable = new TextureRegionDrawable(Assets.hardSmall);
		imageHardHighscore = new Image(tempDrawable);
		imageHardHighscore.setX(360);
		imageHardHighscore.setY(335);
		hardHighscore.setX(600);
		hardHighscore.setY(335 + Assets.hardSmall.getRegionHeight());
		hardHighscore.setText("stage");

		tempDrawable = new TextureRegionDrawable(Assets.time);
		imageChosenTime = new Image(tempDrawable);
		imageChosenTime.setX(360);
		imageChosenTime.setY(220);
		chosenTime.setX(600);
		chosenTime.setY(220 + Assets.time.getRegionHeight());
		chosenTime.setText("and");

		tempDrawable = new TextureRegionDrawable(Assets.stylepoints);
		imageChosenStyle = new Image(tempDrawable);
		imageChosenStyle.setX(360);
		imageChosenStyle.setY(190);
		chosenStyle.setX(600);
		chosenStyle.setY(190 + Assets.stylepoints.getRegionHeight());
		chosenStyle.setText("a");

		tempDrawable = new TextureRegionDrawable(Assets.puppiescaught);
		imageChosenCaughtPups = new Image(tempDrawable);
		imageChosenCaughtPups.setX(360);
		imageChosenCaughtPups.setY(160);
		chosenCaughtPups.setX(600);
		chosenCaughtPups.setY(160 + Assets.puppiescaught.getRegionHeight());
		chosenCaughtPups.setText("difficulty");

		tempDrawable = new TextureRegionDrawable(Assets.pup_missed);
		imageChosenMissedPups = new Image(tempDrawable);
		imageChosenMissedPups.setX(360);
		imageChosenMissedPups.setY(130);
		chosenMissedPups.setX(600);
		chosenMissedPups.setY(130 + Assets.pup_missed.getRegionHeight());
		chosenMissedPups.setText("to display");

		tempDrawable = new TextureRegionDrawable(Assets.pup_points);
		imageChosenPupPoints = new Image(tempDrawable);
		imageChosenPupPoints.setX(360);
		imageChosenPupPoints.setY(100);
		chosenPupPoints.setX(600);
		chosenPupPoints.setY(100 + Assets.pup_points.getRegionHeight());
		chosenPupPoints.setText("your stats!");

	}

	private void initInput() {

		InputProcessor backProcessor = new InputAdapter() {
			@Override
			public boolean keyDown(int keycode) {

				if ((keycode == Keys.ESCAPE) || (keycode == Keys.BACK)) {

					game.setScreen(new MenuScreen(game));

				}

				return false;
			}
		};
		inputMultiplexer.addProcessor(backProcessor);
		inputMultiplexer.addProcessor(stage);
		Gdx.input.setInputProcessor(inputMultiplexer);

		imageLevel1.addListener(new InputListener() {
			public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
				return true;
			}

			public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
				Action completeAction = new Action() {
					public boolean act(float delta) {
						imageLevel2.clearActions();
						imageLevel3.clearActions();
						imageEasyHighscore.clearActions();
						imageNormalHighscore.clearActions();
						imageHardHighscore.clearActions();
						imageEasyHighscore.addAction(Actions.forever(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f))));
						imageLevel1.addAction(Actions.forever(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f))));
						return true;
					}
				};
				// GameAudio.dogeBark();
				tableName = "levelDay";
				levelNum = 1;
				difficultyNum = 1;
				imageLevel1.setOrigin(imageLevel1.getWidth() / 4, imageLevel1.getHeight() / 2);
				imageLevel1.addAction(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f)));
				imageLevel1.addAction(completeAction);

				easyHighscore.setText("" + DogeDashCore.db.getLevelHighscore(levelNum, tableName).getHighScore());
				normalHighscore.setText("" + DogeDashCore.db.getLevelHighscore(++levelNum, tableName).getHighScore());
				hardHighscore.setText("" + DogeDashCore.db.getLevelHighscore(++levelNum, tableName).getHighScore());

				chosenTime.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getTimeAlive());
				chosenStyle.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getStylePoints());
				chosenCaughtPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getCaughtPuppyNum());
				chosenMissedPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getMissedPuppyNum());
				chosenPupPoints.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getPuppyPoints());
			}
		});

		imageLevel2.addListener(new InputListener() {
			public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
				return true;
			}

			public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
				Action completeAction = new Action() {
					public boolean act(float delta) {
						imageLevel1.clearActions();
						imageLevel3.clearActions();
						imageEasyHighscore.clearActions();
						imageNormalHighscore.clearActions();
						imageHardHighscore.clearActions();
						imageEasyHighscore.addAction(Actions.forever(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f))));
						imageLevel2.addAction(Actions.forever(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f))));
						return true;
					}
				};
				tableName = "levelNight";
				levelNum = 1;
				difficultyNum = 1;
				// GameAudio.dogeBark();
				imageLevel2.setOrigin(imageLevel2.getWidth() / 4, imageLevel2.getHeight() / 2);
				imageLevel2.addAction(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f)));
				imageLevel2.addAction(completeAction);

				easyHighscore.setText("" + DogeDashCore.db.getLevelHighscore(1, "levelNight").getHighScore());
				normalHighscore.setText("" + DogeDashCore.db.getLevelHighscore(2, "levelNight").getHighScore());
				hardHighscore.setText("" + DogeDashCore.db.getLevelHighscore(3, "levelNight").getHighScore());

				chosenTime.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getTimeAlive());
				chosenStyle.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getStylePoints());
				chosenCaughtPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getCaughtPuppyNum());
				chosenMissedPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getMissedPuppyNum());
				chosenPupPoints.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getPuppyPoints());

			}
		});

		imageLevel3.addListener(new InputListener() {
			public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
				return true;
			}

			public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
				Action completeAction = new Action() {
					public boolean act(float delta) {
						imageLevel1.clearActions();
						imageLevel2.clearActions();
						imageLevel3.addAction(Actions.forever(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f))));
						return true;
					}
				};
				// GameAudio.dogeBark();
				levelNum = 3;
				imageLevel3.setOrigin(imageLevel3.getWidth() / 4, imageLevel3.getHeight() / 2);
				imageLevel3.addAction(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f)));
				imageLevel3.addAction(completeAction);

				easyHighscore.setText("missingNo");
				normalHighscore.setText("missingNo");
				hardHighscore.setText("missingNo");

				chosenTime.setText("missingNo");
				chosenStyle.setText("missingNo");
				chosenCaughtPups.setText("missingNo");
				chosenMissedPups.setText("missingNo");
				chosenPupPoints.setText("missingNo");
			}

		});

		imageEasyHighscore.addListener(new InputListener() {
			public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
				return true;
			}

			public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
				Action completeAction = new Action() {
					public boolean act(float delta) {
						imageNormalHighscore.clearActions();
						imageHardHighscore.clearActions();
						imageEasyHighscore.addAction(Actions.forever(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f),
								delay(0.5f))));
						return true;
					}
				};
				// GameAudio.dogeBark();
				difficultyNum = 1;
				imageEasyHighscore.setOrigin(easyHighscore.getWidth() / 4, easyHighscore.getHeight() / 2);
				imageEasyHighscore.addAction(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f)));
				imageEasyHighscore.addAction(completeAction);
				if (levelNum > 0) {
					chosenTime.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getTimeAlive());
					chosenStyle.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getStylePoints());
					chosenCaughtPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getCaughtPuppyNum());
					chosenMissedPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getMissedPuppyNum());
					chosenPupPoints.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getPuppyPoints());
				}
			}
		});

		imageNormalHighscore.addListener(new InputListener() {
			public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
				return true;
			}

			public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
				Action completeAction = new Action() {
					public boolean act(float delta) {
						imageEasyHighscore.clearActions();
						imageHardHighscore.clearActions();
						imageNormalHighscore.addAction(Actions.forever(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f),
								delay(0.5f))));
						return true;
					}
				};
				// GameAudio.dogeBark();
				difficultyNum = 2;
				imageNormalHighscore.setOrigin(easyHighscore.getWidth() / 4, easyHighscore.getHeight() / 2);
				imageNormalHighscore.addAction(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f)));
				imageNormalHighscore.addAction(completeAction);
				if (levelNum > 0) {
					chosenTime.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getTimeAlive());
					chosenStyle.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getStylePoints());
					chosenCaughtPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getCaughtPuppyNum());
					chosenMissedPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getMissedPuppyNum());
					chosenPupPoints.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getPuppyPoints());
				}
			}
		});

		imageHardHighscore.addListener(new InputListener() {
			public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
				return true;
			}

			public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
				Action completeAction = new Action() {
					public boolean act(float delta) {
						imageEasyHighscore.clearActions();
						imageNormalHighscore.clearActions();
						imageHardHighscore.addAction(Actions.forever(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f),
								delay(0.5f))));
						return true;
					}
				};
				// GameAudio.dogeBark();
				difficultyNum = 3;
				imageHardHighscore.setOrigin(imageHardHighscore.getWidth() / 4, imageHardHighscore.getHeight() / 2);
				imageHardHighscore.addAction(sequence(Actions.scaleBy(.1f, 0.1f, 0.2f), Actions.scaleTo(1, 1, 0.2f), delay(0.5f)));
				imageHardHighscore.addAction(completeAction);
				if (levelNum > 0) {
					chosenTime.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getTimeAlive());
					chosenStyle.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getStylePoints());
					chosenCaughtPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getCaughtPuppyNum());
					chosenMissedPups.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getMissedPuppyNum());
					chosenPupPoints.setText("" + DogeDashCore.db.getLevelHighscore(difficultyNum, tableName).getPuppyPoints());
				}
			}
		});

		imageBackButton.addListener(new InputListener() {
			public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
				return true;
			}

			public void touchUp(InputEvent event, float x, float y, int pointer, int button) {

				game.setScreen(new MenuScreen(game));
			}
		});

	}

	private void initActors() {
		stage.addActor(imageMenuBg);

		stage.addActor(imageBackButton);
		stage.addActor(imageMenuMomBody);
		imageMenuBluePup.setOrigin(imageMenuBluePup.getWidth() / 2, imageMenuBluePup.getHeight());

		imageMenuBluePup.addAction(forever(sequence(rotateBy(5, 2), delay(0.5f), sequence(rotateBy(-5, 2)))));
		stage.addActor(imageMenuBluePup);
		stage.addActor(imageMenuMomNosePaw);

		imageMenuCreamPupBody.setOrigin(imageMenuCreamPupBody.getWidth() / 2, imageMenuCreamPupBody.getHeight() / 2);
		imageMenuCreamPupBody.addAction(forever(sequence(moveBy(0, 10, 1), delay(0.5f), sequence(moveBy(0, -10, 1)))));
		stage.addActor(imageMenuCreamPupBody);
		imageMenuCreamPupPaw.setOrigin(imageMenuCreamPupPaw.getWidth() / 2, imageMenuCreamPupPaw.getHeight() / 2);
		imageMenuCreamPupPaw.addAction(forever(sequence(moveBy(0, 10, 1), delay(0.5f), sequence(moveBy(0, -10, 1)))));
		imageMenuCreamPupPaw.addAction(forever(sequence(rotateBy(20, 1), delay(0.5f), sequence(rotateBy(-20, 1)))));
		stage.addActor(imageMenuCreamPupPaw);
		imageMenuCreamPupPaw2.setOrigin(imageMenuCreamPupPaw.getWidth() / 2, imageMenuCreamPupPaw.getHeight() / 2);
		imageMenuCreamPupPaw2.addAction(forever(sequence(moveBy(0, 10, 1), delay(0.5f), sequence(moveBy(0, -10, 1)))));
		imageMenuCreamPupPaw2.addAction(forever(sequence(rotateBy(-20, 1), delay(0.5f), sequence(rotateBy(20, 1)))));
		stage.addActor(imageMenuCreamPupPaw2);

		//fix for S3 resolution
		winOverlay.setX(0);
		winOverlay.setY(0);
		winOverlay.setWidth(1280);
		winOverlay.setHeight(720);

		stage.addActor(winOverlay);

		stage.addActor(imageBackButton);

		stage.addActor(imageLevel1);
		stage.addActor(imageLevel2);
		stage.addActor(imageLevel3);

		stage.addActor(imageNormalHighscore);
		stage.addActor(imageHardHighscore);
		stage.addActor(imageEasyHighscore);

		stage.addActor(imageChosenTime);
		stage.addActor(imageChosenCaughtPups);
		stage.addActor(imageChosenMissedPups);
		stage.addActor(imageChosenStyle);
		stage.addActor(imageChosenPupPoints);

		stage.addActor(normalHighscore);
		stage.addActor(hardHighscore);
		stage.addActor(easyHighscore);

		stage.addActor(chosenTime);
		stage.addActor(chosenCaughtPups);
		stage.addActor(chosenMissedPups);
		stage.addActor(chosenStyle);
		stage.addActor(chosenPupPoints);

	}

	@Override
	public void render(float delta) {
		Gdx.gl.glClearColor(0, 0, 0, 1);
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

		stage.act(delta);
		stage.draw();

	}

	@Override
	public void resize(int width, int height) {
		Vector2 size = Scaling.fit.apply(Consts.GAMEWIDTH, Consts.GAMEHEIGHT, width, height);
		int viewportX = (int) (width - size.x) / 2;
		int viewportY = (int) (height - size.y) / 2;
		int viewportWidth = (int) size.x;
		int viewportHeight = (int) size.y;
		Gdx.gl.glViewport(viewportX, viewportY, viewportWidth, viewportHeight);
		stage.setViewport(Consts.GAMEWIDTH, Consts.GAMEHEIGHT, true);

	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub

	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub

	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		inputMultiplexer.clear();
	}

}


text:
package com.google.template.soy.jssrc.dsl;

import static com.google.template.soy.jssrc.dsl.CodeChunk.WithValue.LITERAL_EMPTY_STRING;
import static com.google.template.soy.jssrc.dsl.CodeChunk.id;

import com.google.common.collect.ImmutableList;
import com.google.template.soy.jssrc.dsl.CodeChunk.RequiresCollector;
import com.google.template.soy.jssrc.restricted.JsExprUtils;
import java.util.List;
import java.util.regex.Pattern;

/** Utility methods for working with CodeChunks. */
public final class CodeChunkUtils {

  /**
   * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#Variables
   *
   *
This incorrectly allows keywords, but that's not a big problem because doing so would cause
   * JSCompiler to crash. This also incorrectly disallows Unicode in identifiers, but that's not a
   * big problem because the JS backend generally names identifiers after Soy identifiers, which
   * don't allow Unicode either.
   */
  private static final Pattern ID = Pattern.compile("[A-Za-z_$][\\w$]*");

  private CodeChunkUtils() {}

  /** Validates that the given string is a valid javascript identifier. */
  static void checkId(String id) {
    if (!ID.matcher(id).matches()) {
      throw new IllegalArgumentException(String.format("not a valid js identifier: %s", id));
    }
  }

  /**
   * Builds a {@link CodeChunk.WithValue} that represents the concatenation of the given code
   * chunks. The {@code +} operator is used for concatenation.
   *
   *
The resulting chunk is not guaranteed to be string-valued if the first two operands do not
   * produce strings when combined with the plus operator; e.g. 2+2 might be 4 instead of '22'.
   *
   *
This is a port of {@link JsExprUtils#concatJsExprs}, which should eventually go away.
   * TODO(user): make that go away.
   */
  public static CodeChunk.WithValue concatChunks(List<? extends CodeChunk.WithValue> chunks) {

    if (chunks.isEmpty()) {
      return LITERAL_EMPTY_STRING;
    }

    CodeChunk.WithValue accum = chunks.get(0);
    for (CodeChunk.WithValue chunk : chunks.subList(1, chunks.size())) {
      accum = accum.plus(chunk);
    }
    return accum;
  }

  /**
   * Builds a {@link CodeChunk.WithValue} that represents the concatenation of the given code
   * chunks. This doesn't assume the values represented by the inputs are necessarily strings, but
   * guarantees that the value represented by the output is a string.
   */
  public static CodeChunk.WithValue concatChunksForceString(
      List<? extends CodeChunk.WithValue> chunks) {
    if (!chunks.isEmpty()
        && chunks.get(0).isRepresentableAsSingleExpression()
        && JsExprUtils.isStringLiteral(
            chunks.get(0).assertExprAndCollectRequires(RequiresCollector.NULL))) {
      return concatChunks(chunks);
    } else if (chunks.size() > 1
        && chunks.get(1).isRepresentableAsSingleExpression()
        && JsExprUtils.isStringLiteral(
            chunks.get(1).assertExprAndCollectRequires(RequiresCollector.NULL))) {
      return concatChunks(chunks);
    } else {
      return concatChunks(
          ImmutableList.<CodeChunk.WithValue>builder()
              .add(LITERAL_EMPTY_STRING)
              .addAll(chunks)
              .build());
    }
  }
}