text:
<?php

defined ( 'BASEPATH' ) or exit ( 'No direct script access allowed' );

/**
 * CUBRID Database Adapter Class
 *
 * Note: _DB is an extender class that the app controller
 * creates dynamically based on whether the query builder
 * class is being used or not.
 *
 * @package CodeIgniter
 * @subpackage Drivers
 * @category Database
 * @author Esen Sagynov
 * @link http://codeigniter.com/user_guide/database/
 */
class CI_DB_cubrid_driver extends CI_DB {

	/**
	 * Database driver
	 *
	 * @var string
	 */
	public $dbdriver = 'cubrid';

	/**
	 * Auto-commit flag
	 *
	 * @var bool
	 */
	public $auto_commit = TRUE;

	// --------------------------------------------------------------------

	/**
	 * Identifier escape character
	 *
	 * @var string
	 */
	protected $_escape_char = '`';

	/**
	 * ORDER BY random keyword
	 *
	 * @var array
	 */
	protected $_random_keyword = array (
			'RANDOM()',
			'RANDOM(%d)'
	);

	// --------------------------------------------------------------------

	/**
	 * Class constructor
	 *
	 * @param array $params
	 * @return void
	 */
	public function __construct($params) {
		parent::__construct ( $params );

		if (preg_match ( '/^CUBRID:[^:]+(:[0-9][1-9]{0,4})?:[^:]+:[^:]*:[^:]*:(\?.+)?$/', $this->dsn, $matches )) {
			if (stripos ( $matches [2], 'autocommit=off' ) !== FALSE) {
				$this->auto_commit = FALSE;
			}
		} else {
			// If no port is defined by the user, use the default value
			empty ( $this->port ) or $this->port = 33000;
		}
	}

	// --------------------------------------------------------------------

	/**
	 * Non-persistent database connection
	 *
	 * @param bool $persistent
	 * @return resource
	 */
	public function db_connect($persistent = FALSE) {
		if (preg_match ( '/^CUBRID:[^:]+(:[0-9][1-9]{0,4})?:[^:]+:([^:]*):([^:]*):(\?.+)?$/', $this->dsn, $matches )) {
			$func = ($persistent !== TRUE) ? 'cubrid_connect_with_url' : 'cubrid_pconnect_with_url';
			return ($matches [2] === '' && $matches [3] === '' && $this->username !== '' && $this->password !== '') ? $func ( $this->dsn, $this->username, $this->password ) : $func ( $this->dsn );
		}

		$func = ($persistent !== TRUE) ? 'cubrid_connect' : 'cubrid_pconnect';
		return ($this->username !== '') ? $func ( $this->hostname, $this->port, $this->database, $this->username, $this->password ) : $func ( $this->hostname, $this->port, $this->database );
	}

	// --------------------------------------------------------------------

	/**
	 * Reconnect
	 *
	 * Keep / reestablish the db connection if no queries have been
	 * sent for a length of time exceeding the server's idle timeout
	 *
	 * @return void
	 */
	public function reconnect() {
		if (cubrid_ping ( $this->conn_id ) === FALSE) {
			$this->conn_id = FALSE;
		}
	}

	// --------------------------------------------------------------------

	/**
	 * Database version number
	 *
	 * @return string
	 */
	public function version() {
		if (isset ( $this->data_cache ['version'] )) {
			return $this->data_cache ['version'];
		}

		return (! $this->conn_id or ($version = cubrid_get_server_info ( $this->conn_id )) === FALSE) ? FALSE : $this->data_cache ['version'] = $version;
	}

	// --------------------------------------------------------------------

	/**
	 * Execute the query
	 *
	 * @param string $sql
	 *        	query
	 * @return resource
	 */
	protected function _execute($sql) {
		return cubrid_query ( $sql, $this->conn_id );
	}

	// --------------------------------------------------------------------

	/**
	 * Begin Transaction
	 *
	 * @param bool $test_mode
	 * @return bool
	 */
	public function trans_begin($test_mode = FALSE) {
		// When transactions are nested we only begin/commit/rollback the outermost ones
		if (! $this->trans_enabled or $this->_trans_depth > 0) {
			return TRUE;
		}

		// Reset the transaction failure flag.
		// If the $test_mode flag is set to TRUE transactions will be rolled back
		// even if the queries produce a successful result.
		$this->_trans_failure = ($test_mode === TRUE);

		if (cubrid_get_autocommit ( $this->conn_id )) {
			cubrid_set_autocommit ( $this->conn_id, CUBRID_AUTOCOMMIT_FALSE );
		}

		return TRUE;
	}

	// --------------------------------------------------------------------

	/**
	 * Commit Transaction
	 *
	 * @return bool
	 */
	public function trans_commit() {
		// When transactions are nested we only begin/commit/rollback the outermost ones
		if (! $this->trans_enabled or $this->_trans_depth > 0) {
			return TRUE;
		}

		cubrid_commit ( $this->conn_id );

		if ($this->auto_commit && ! cubrid_get_autocommit ( $this->conn_id )) {
			cubrid_set_autocommit ( $this->conn_id, CUBRID_AUTOCOMMIT_TRUE );
		}

		return TRUE;
	}

	// --------------------------------------------------------------------

	/**
	 * Rollback Transaction
	 *
	 * @return bool
	 */
	public function trans_rollback() {
		// When transactions are nested we only begin/commit/rollback the outermost ones
		if (! $this->trans_enabled or $this->_trans_depth > 0) {
			return TRUE;
		}

		cubrid_rollback ( $this->conn_id );

		if ($this->auto_commit && ! cubrid_get_autocommit ( $this->conn_id )) {
			cubrid_set_autocommit ( $this->conn_id, CUBRID_AUTOCOMMIT_TRUE );
		}

		return TRUE;
	}

	// --------------------------------------------------------------------

	/**
	 * Platform-dependant string escape
	 *
	 * @param
	 *        	string
	 * @return string
	 */
	protected function _escape_str($str) {
		return cubrid_real_escape_string ( $str, $this->conn_id );
	}

	// --------------------------------------------------------------------

	/**
	 * Affected Rows
	 *
	 * @return int
	 */
	public function affected_rows() {
		return cubrid_affected_rows ();
	}

	// --------------------------------------------------------------------

	/**
	 * Insert ID
	 *
	 * @return int
	 */
	public function insert_id() {
		return cubrid_insert_id ( $this->conn_id );
	}

	// --------------------------------------------------------------------

	/**
	 * List table query
	 *
	 * Generates a platform-specific query string so that the table names can be fetched
	 *
	 * @param bool $prefix_limit
	 * @return string
	 */
	protected function _list_tables($prefix_limit = FALSE) {
		$sql = 'SHOW TABLES';

		if ($prefix_limit !== FALSE && $this->dbprefix !== '') {
			return $sql . " LIKE '" . $this->escape_like_str ( $this->dbprefix ) . "%'";
		}

		return $sql;
	}

	// --------------------------------------------------------------------

	/**
	 * Show column query
	 *
	 * Generates a platform-specific query string so that the column names can be fetched
	 *
	 * @param string $table
	 * @return string
	 */
	protected function _list_columns($table = '') {
		return 'SHOW COLUMNS FROM ' . $this->protect_identifiers ( $table, TRUE, NULL, FALSE );
	}

	// --------------------------------------------------------------------

	/**
	 * Returns an object with field data
	 *
	 * @param string $table
	 * @return array
	 */
	public function field_data($table) {
		if (($query = $this->query ( 'SHOW COLUMNS FROM ' . $this->protect_identifiers ( $table, TRUE, NULL, FALSE ) )) === FALSE) {
			return FALSE;
		}
		$query = $query->result_object ();

		$retval = array ();
		for($i = 0, $c = count ( $query ); $i < $c; $i ++) {
			$retval [$i] = new stdClass ();
			$retval [$i]->name = $query [$i]->Field;

			sscanf ( $query [$i]->Type, '%[a-z](%d)', $retval [$i]->type, $retval [$i]->max_length );

			$retval [$i]->default = $query [$i]->Default;
			$retval [$i]->primary_key = ( int ) ($query [$i]->Key === 'PRI');
		}

		return $retval;
	}

	// --------------------------------------------------------------------

	/**
	 * Error
	 *
	 * Returns an array containing code and message of the last
	 * database error that has occured.
	 *
	 * @return array
	 */
	public function error() {
		return array (
				'code' => cubrid_errno ( $this->conn_id ),
				'message' => cubrid_error ( $this->conn_id )
		);
	}

	// --------------------------------------------------------------------

	/**
	 * FROM tables
	 *
	 * Groups tables in FROM clauses if needed, so there is no confusion
	 * about operator precedence.
	 *
	 * @return string
	 */
	protected function _from_tables() {
		if (! empty ( $this->qb_join ) && count ( $this->qb_from ) > 1) {
			return '(' . implode ( ', ', $this->qb_from ) . ')';
		}

		return implode ( ', ', $this->qb_from );
	}

	// --------------------------------------------------------------------

	/**
	 * Close DB Connection
	 *
	 * @return void
	 */
	protected function _close() {
		cubrid_close ( $this->conn_id );
	}
}


text:
// ***********************************************************************
// <copyright file="IScriptPlugin.cs" company="ServiceStack, Inc.">
//     Copyright (c) ServiceStack, Inc. All Rights Reserved.
// </copyright>
// <summary>Fork for YetAnotherForum.NET, Licensed under the Apache License, Version 2.0</summary>
// ***********************************************************************
namespace ServiceStack.Script;

/// <summary>
/// Interface IScriptPlugin
/// </summary>
public interface IScriptPlugin
{
    /// <summary>
    /// Registers the specified context.
    /// </summary>
    /// <param name="context">The context.</param>
    void Register(ScriptContext context);
}

/// <summary>
/// Interface IScriptPluginBefore
/// </summary>
public interface IScriptPluginBefore
{
    /// <summary>
    /// Befores the plugins loaded.
    /// </summary>
    /// <param name="context">The context.</param>
    void BeforePluginsLoaded(ScriptContext context);
}

/// <summary>
/// Interface IScriptPluginAfter
/// </summary>
public interface IScriptPluginAfter
{
    /// <summary>
    /// Afters the plugins loaded.
    /// </summary>
    /// <param name="context">The context.</param>
    void AfterPluginsLoaded(ScriptContext context);
}

redpajama_set_name: RedPajamaGithub


text:
@interface PodsDummy_Pods_MyoSDK : NSObject
@end
@implementation PodsDummy_Pods_MyoSDK
@end


text:
@interface NewFeedsCollectionViewCell ()

@property (nonatomic, strong) NSArray *feedsVCClasses;

@end

@implementation NewFeedsCollectionViewCell

- (NSArray *)feedsVCClasses {
    if (!_feedsVCClasses) {
        _feedsVCClasses = @[[ExploreViewController class], [FollowingViewController class], [VideoViewController class], [MusicViewController class], [GalleryViewController class], [TeaViewController class]];
    }
    return _feedsVCClasses;
}

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {

    }
    return self;
}

- (void)setNewFeedsCollectionViewCellType:(NewFeedsCollectionViewCellType)newFeedsCollectionViewCellType {
    if (self.contentView.subviews.count == 0) {
        [self createExploreVCWithType:newFeedsCollectionViewCellType];
    }
}

- (void)createExploreVCWithType:(NewFeedsCollectionViewCellType)type {
    BaseViewController *vc = [[self.feedsVCClasses[type] alloc] init];
    vc.view.frame = self.contentView.frame;
    [self.contentView addSubview:vc.view];
}

@end


text:
Photosynthesis
====================
# A work in progress..

# Overview
Aims to provide a quick and light-weight solution for uploading location-tagged images and associating them with an event.  It came to my attention that after the Bostom bombing police were manually analyzing meta-data from images in order to locate where they were taken.  This simple app would have saved them a lot of time.  Though it's being developed with emergecy situations in mind, the Event model is generic and could just as easily be used for entertainment ie) concerts, festivals, etc.

# Installation
npm install


text:
#ifndef MPS2_ETHERNET_API_H
#define MPS2_ETHERNET_API_H

#include "device.h"

#if DEVICE_ETHERNET

#ifdef __cplusplus
extern "C" {
#endif

// Connection constants

// send ethernet write buffer, returning the packet size sent
int ethernet_transmission(unsigned char * pkt, unsigned int length);

// recieve from ethernet buffer, returning packet size, or 0 if no packet
int ethernet_reception(unsigned int *recvbuf, unsigned int *index);

// get the ethernet address
int ethernet_mac_address(char *mac);

unsigned int ethernet_check_ready(void);

unsigned int ethernet_intf(void);

int smsc9220_check_id(void);

int smsc9220_check_macaddress(void);

void smsc9220_print_mac_registers(void);
void smsc9220_print_phy_registers(void);

#ifdef __cplusplus
}
#endif

#endif

#endif


text:
package com.algaworks.pedidovenda.model;

public enum TipoPessoa {

	FISICA, JURIDICA

}


text:
package dan.dit.whatsthat.riddle.types;

import android.text.TextUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * A riddle type that describes the format of a riddle. Used to specify the preference or refusal
 * of a riddle in a specific format, will affect which images are preferred or refused. Available are
 * Square (width=height), Portrait(height>width) and Landscape(height<width).
 * Created by daniel on 01.04.15.
 */
public abstract class FormatRiddleType extends RiddleType {
    private static final Map<String, FormatRiddleType> ALL_TYPES = new HashMap<>();
    public static final FormatSquare SQUARE_INSTANCE = new FormatSquare();
    public static final FormatLandscape LANDSCAPE_INSTANCE = new FormatLandscape();
    public static final FormatPortrait PORTRAIT_INSTANCE = new FormatPortrait();

    private static final int INTEREST_VALUE = 2;

    public static class FormatSquare extends FormatRiddleType {
        public static final String NAME = "FormatSquare";

        @Override
        protected String getName() {return NAME;}
    }

    public static class FormatLandscape extends FormatRiddleType {
        public static final String NAME = "FormatLandscape";

        @Override
        protected String getName() {return NAME;}
    }

    public static class FormatPortrait extends FormatRiddleType {
        public static final String NAME = "FormatPortrait";

        @Override
        protected String getName() {return NAME;}
    }

    @Override
    public int getInterestValue() {
        return INTEREST_VALUE;
    }

    @Override
    protected char getTypePrefix() {
        return RiddleType.RIDDLE_TYPE_PREFIX_FORMAT;
    }

    public static FormatRiddleType getInstance(String fullName) {
        if (TextUtils.isEmpty(fullName) || fullName.length() < FULL_NAME_MIN_LENGTH) {
            return null;
        }
        return ALL_TYPES.get(fullName);
    }

    @Override
    protected void registerType() {
        ALL_TYPES.put(getFullName(), this);
    }
}


text:
'use strict';

var expect = require('chai').expect;
var http = require('http');
var https = require('https');
var fs = require('fs');
var path = require('path');
var enableTerminate = require('../index');

var PORT = 3113;

function hr2ms(duration) {
  return duration[0] * 1000 + duration[1] / 1e6;
}

/* global feature, scenario, given, when, then, and */
/* eslint-disable no-unused-expressions, handle-callback-err */
/* eslint max-nested-callbacks: ["error", 15] */

feature('Setup', function() {
  scenario('Invoke "enableTerminate" over an HTTP server', function() {
    var server;
    var returnedServer;

    given('that I have an HTTP server', function() {
      server = http.createServer();
    });
    when('I call the "enableTerminate" function over such a server', function() {
      returnedServer = enableTerminate(server);
    });
    then('The server has a "terminate" function', function() {
      expect(returnedServer).to.respondTo('terminate');
    });
    and('The "enableTerminate" function returns the server', function() {
      expect(returnedServer).to.deep.equal(server);
    });
  });

  scenario('Invoke "enableTerminate" over an HTTPS server', function() {
    var server;
    var returnedServer;

    given('that I have an HTTPS server', function() {
      var serverOptions = {
        key: fs.readFileSync(path.join(__dirname, 'key.pem')),
        cert: fs.readFileSync(path.join(__dirname, 'cert.pem'))
      };
      server = https.createServer(serverOptions);
    });
    when('I call the "enableTerminate" function over such a server', function() {
      returnedServer = enableTerminate(server);
    });
    then('The server has a "terminate" function', function() {
      expect(returnedServer).to.respondTo('terminate');
    });
    and('The "enableTerminate" function returns the server', function() {
      expect(returnedServer).to.deep.equal(server);
    });
  });
});

feature('Terminate an HTTP server', function() {
  var dataset;

  scenario('No requests have been performed yet against the server', function() {
    var server;
    var duration;
    var terminatedByTimeout;

    given('that I have an HTTP server with the "terminate" function', function(done) {
      server = enableTerminate(http.createServer(function onRequest(req, res) {
        res.writeHead(200);
        res.end();
      }).listen(PORT, done));
    });
    and('No requests have been performed yet against the server', function() {
      // noop
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    then('It is immediately closed', function() {
      expect(hr2ms(duration)).to.be.below(10);
    });
    and('and the terminatedByTimeout parameter is false', function() {
      expect(terminatedByTimeout).to.be.false;
    });
  });

  dataset = [
    {desc: 'the client sends the "Connection: close" header', serverClose: false, clientClose: true},
    {desc: 'the server sends the "Connection: close" header', serverClose: true, clientClose: false},
    {desc: 'the server closes the connection after the keep-alive timeout', serverClose: false, clientClose: false}
  ];
  scenario('Some requests have been completed and their connections have been closed', dataset, function(variant) {
    var server;
    var duration;
    var terminatedByTimeout;

    given('that I have an HTTP server with the "terminate" function', function(done) {
      server = enableTerminate(http.createServer(function onRequest(req, res) {
        setImmediate(function() {
          if (variant.serverClose) {
            res.shouldKeepAlive = false;
          }
          res.writeHead(200);
          res.end();
        });
      }).listen(PORT, done));
      server.timeout = 3000; // keep-alive timeout
    });
    and('Some requests have been performed against the server and their connections have been closed', function(done) {
      var opts = {
        method: 'GET',
        host: 'localhost',
        port: PORT,
        agent: variant.clientClose ? false : http.GlobalAgent
      };
      var req = http.request(opts, function onResponse(res) {
        // We are not interested on the response but this callback in needed to avoid the connection to be closed
      });
      req.on('error', done);
      req.on('socket', function onSocket(socket) {
        socket.on('close', function onClose() {
          done();
        });
      });
      req.end();
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    then('It is immediately closed', function() {
      expect(hr2ms(duration)).to.be.below(10);
    });
    and('and the terminatedByTimeout parameter is false', function() {
      expect(terminatedByTimeout).to.be.false;
    });
  });

  scenario('Some requests have been completed but their connections are still open', function() {
    var server;
    var duration;
    var terminatedByTimeout;

    given('that I have an HTTP server with the "terminate" function', function(done) {
      server = enableTerminate(http.createServer(function onRequest(req, res) {
        setImmediate(function() {
          res.writeHead(200);
          res.end();
        });
      }).listen(PORT, done));
    });
    and('Some requests have been performed against the server ' +
        'but their connections have not been closed yet', function(done) {
      var opts = {
        method: 'GET',
        host: 'localhost',
        port: PORT,
        agent: http.GlobalAgent
      };
      var req = http.request(opts, function onResponse(res) {
        done();
      });
      req.on('error', done);
      req.end();
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    then('It is immediately closed', function() {
      expect(hr2ms(duration)).to.be.below(10);
    });
    and('and the terminatedByTimeout parameter is false', function() {
      expect(terminatedByTimeout).to.be.false;
    });
  });

  scenario('There are running requests', function() {
    var DELAY = 2000;
    var server;
    var duration;
    var terminatedByTimeout;

    given('that I have an HTTP server with the "terminate" function', function(done) {
      server = enableTerminate(http.createServer(function onRequest(req, res) {
        setTimeout(function() {
          res.writeHead(200);
          res.end();
        }, DELAY);
      }).listen(PORT, done));
    });
    and('Some requests have been sent against the server ' +
        'but their responses have not been received yet', function(done) {
      var opts = {
        method: 'GET',
        host: 'localhost',
        port: PORT,
        agent: http.GlobalAgent
      };
      var req = http.request(opts);
      req.on('error', done);
      req.end();
      setTimeout(done, DELAY / 2);
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    then('It waits for the running requests to finish', function() {
      expect(hr2ms(duration)).to.be.closeTo(DELAY - (DELAY / 2), 50);
    });
    and('and the terminatedByTimeout parameter is false', function() {
      expect(terminatedByTimeout).to.be.false;
    });
  });

  dataset = [
    {desc: 'Exit without waiting for the request handler to finish', waitForRequestHandler: false},
    {desc: 'Wait for the request handler to finish before exiting', waitForRequestHandler: true}
  ];
  scenario('There are running requests that take longer than the configured timeout', dataset, function(variant) {
    var TIMEOUT = 1000;
    var server;
    var duration;
    var error;
    var terminatedByTimeout;

    given('that I have an HTTP server with the "terminate" function configured with a timeout', function(done) {
      server = enableTerminate(http.createServer(function onRequest(req, res) {
        setTimeout(function() {
          res.writeHead(200);
          res.end();
        }, TIMEOUT * 2);
      }).listen(PORT, done), {timeout: TIMEOUT});
    });
    and('Some requests have been sent against the server ' +
        'but their responses have not been received yet', function(done) {
      var opts = {
        method: 'GET',
        host: 'localhost',
        port: PORT,
        agent: http.GlobalAgent
      };
      var req = http.request(opts);
      req.on('error', function onError(err) {
        // Catch the "socket hang up" error
        error = err;
      });
      req.end();
      setTimeout(done, TIMEOUT / 2);
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    if (variant.waitForRequestHandler) {
      and('I wait for the server request handler to finish', function(done) {
        setTimeout(done, TIMEOUT * 2 + 500);
      });
    }
    then('It waits for the running request to finish or the timeout expires', function() {
      expect(hr2ms(duration)).to.be.closeTo(TIMEOUT, 50);
      expect(error).to.have.property('code', 'ECONNRESET');
    });
    and('and the terminatedByTimeout parameter is true', function() {
      expect(terminatedByTimeout).to.be.true;
    });
  });
});

feature('Terminate an HTTPS server', function() {
  var dataset;
  var serverOptions = {
    key: fs.readFileSync(path.join(__dirname, 'key.pem')),
    cert: fs.readFileSync(path.join(__dirname, 'cert.pem'))
  };

  scenario('No requests have been performed yet against the server', function() {
    var server;
    var duration;
    var terminatedByTimeout;

    given('that I have an HTTPS server with the "terminate" function', function(done) {
      server = enableTerminate(https.createServer(serverOptions, function onRequest(req, res) {
        res.writeHead(200);
        res.end();
      }).listen(PORT, done));
    });
    and('No requests have been performed yet against the server', function() {
      // noop
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    then('It is immediately closed', function() {
      expect(hr2ms(duration)).to.be.below(10);
    });
    and('and the terminatedByTimeout parameter is false', function() {
      expect(terminatedByTimeout).to.be.false;
    });
  });

  dataset = [
    {desc: 'the client sends the "Connection: close" header', serverClose: false, clientClose: true},
    {desc: 'the server sends the "Connection: close" header', serverClose: true, clientClose: false},
    {desc: 'the server closes the connection after the keep-alive timeout', serverClose: false, clientClose: false}
  ];
  scenario('Some requests have been completed and their connections have been closed', dataset, function(variant) {
    var server;
    var duration;
    var terminatedByTimeout;

    given('that I have an HTTPS server with the "terminate" function', function(done) {
      server = enableTerminate(https.createServer(serverOptions, function onRequest(req, res) {
        setImmediate(function() {
          if (variant.serverClose) {
            res.shouldKeepAlive = false;
          }
          res.writeHead(200);
          res.end();
        });
      }).listen(PORT, done));
      server.timeout = 3000; // keep-alive timeout
    });
    and('Some requests have been performed against the server and their connections have been closed', function(done) {
      var opts = {
        method: 'GET',
        host: 'localhost',
        port: PORT,
        agent: variant.clientClose ? false : http.GlobalAgent,
        ca: [fs.readFileSync(path.join(__dirname, 'cert.pem'))]
      };
      var req = https.request(opts, function onResponse(res) {
        // We are not interested on the response but this callback in needed to avoid the connection to be closed
      });
      req.on('error', done);

      req.on('socket', function onSocket(socket) {
        socket.on('close', function onClose() {
          done();
        });
      });
      req.end();
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    then('It is immediately closed', function() {
      expect(hr2ms(duration)).to.be.below(10);
    });
    and('and the terminatedByTimeout parameter is false', function() {
      expect(terminatedByTimeout).to.be.false;
    });
  });

  scenario('Some requests have been completed but their connections are still open', function() {
    var server;
    var duration;
    var terminatedByTimeout;

    given('that I have an HTTPS server with the "terminate" function', function(done) {
      server = enableTerminate(https.createServer(serverOptions, function onRequest(req, res) {
        setImmediate(function() {
          res.writeHead(200);
          res.end();
        });
      }).listen(PORT, done));
    });
    and('Some requests have been performed against the server ' +
        'but their connections have not been closed yet', function(done) {
      var opts = {
        method: 'GET',
        host: 'localhost',
        port: PORT,
        agent: http.GlobalAgent,
        ca: [fs.readFileSync(path.join(__dirname, 'cert.pem'))]
      };
      var req = https.request(opts, function onResponse(res) {
        done();
      });
      req.on('error', done);
      req.end();
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    then('It is immediately closed', function() {
      expect(hr2ms(duration)).to.be.below(10);
    });
    and('and the terminatedByTimeout parameter is false', function() {
      expect(terminatedByTimeout).to.be.false;
    });
  });

  scenario('There are running requests', function() {
    var DELAY = 2000;
    var server;
    var duration;
    var terminatedByTimeout;

    given('that I have an HTTPS server with the "terminate" function', function(done) {
      server = enableTerminate(https.createServer(serverOptions, function onRequest(req, res) {
        setTimeout(function() {
          res.writeHead(200);
          res.end();
        }, DELAY);
      }).listen(PORT, done));
    });
    and('Some requests have been sent against the server ' +
        'but their responses have not been received yet', function(done) {
      var opts = {
        method: 'GET',
        host: 'localhost',
        port: PORT,
        agent: http.GlobalAgent,
        ca: [fs.readFileSync(path.join(__dirname, 'cert.pem'))]
      };
      var req = https.request(opts);
      req.on('error', done);
      req.end();
      setTimeout(done, DELAY / 2);
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    then('It waits for the running requests to finish', function() {
      expect(hr2ms(duration)).to.be.closeTo(DELAY - (DELAY / 2), 50);
    });
    and('and the terminatedByTimeout parameter is false', function() {
      expect(terminatedByTimeout).to.be.false;
    });
  });

  dataset = [
    {desc: 'Exit without waiting for the request handler to finish', waitForRequestHandler: false},
    {desc: 'Wait for the request handler to finish before exiting', waitForRequestHandler: true}
  ];
  scenario('There are running requests that take longer than the configured timeout', dataset, function(variant) {
    var TIMEOUT = 1000;
    var server;
    var duration;
    var error;
    var terminatedByTimeout;

    given('that I have an HTTPS server with the "terminate" function configured with a timeout', function(done) {
      server = enableTerminate(https.createServer(serverOptions, function onRequest(req, res) {
        setTimeout(function() {
          res.writeHead(200);
          res.end();
        }, TIMEOUT * 2);
      }).listen(PORT, done), {timeout: TIMEOUT});
    });
    and('Some requests have been sent against the server ' +
        'but their responses have not been received yet', function(done) {
      var opts = {
        method: 'GET',
        host: 'localhost',
        port: PORT,
        agent: http.GlobalAgent,
        ca: [fs.readFileSync(path.join(__dirname, 'cert.pem'))]
      };
      var req = https.request(opts);
      req.on('error', function onError(err) {
        // Catch the "socket hang up" error
        error = err;
      });
      req.end();
      setTimeout(done, TIMEOUT / 2);
    });
    when('I terminate the server', function(done) {
      var start = process.hrtime();
      server.terminate(function(err, terminatedByTimeout_) {
        duration = process.hrtime(start);
        terminatedByTimeout = terminatedByTimeout_;
        done();
      });
    });
    if (variant.waitForRequestHandler) {
      and('I wait for the server request handler to finish', function(done) {
        setTimeout(done, TIMEOUT * 2 + 500);
      });
    }
    then('It waits for the running request to finish or the timeout expires', function() {
      expect(hr2ms(duration)).to.be.closeTo(TIMEOUT, 50);
      expect(error).to.have.property('code', 'ECONNRESET');
    });
    and('and the terminatedByTimeout parameter is true', function() {
      expect(terminatedByTimeout).to.be.true;
    });
  });
});


text:
package com.lo.apps.ws.client.entity.invoice;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for anonymous complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="requestDateTime" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="invoiceHeaderData" type="{http://localhost:8080/invoice/schema}InvoiceHeader"/>
 *         <element name="invoiceRecordData" type="{http://localhost:8080/invoice/schema}InvoiceRecord" maxOccurs="unbounded"/>
 *       </sequence>
 *       <attribute name="Id" use="required" type="{http://www.w3.org/2001/XMLSchema}long" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "requestDateTime",
    "invoiceHeaderData",
    "invoiceRecordData"
})
@XmlRootElement(name = "Invoice", namespace = "http://localhost:8080/invoice/schema")
public class Invoice {

    @XmlElement(namespace = "http://localhost:8080/invoice/schema", required = true)
    protected String requestDateTime;
    @XmlElement(namespace = "http://localhost:8080/invoice/schema", required = true)
    protected InvoiceHeader invoiceHeaderData;
    @XmlElement(namespace = "http://localhost:8080/invoice/schema", required = true)
    protected List<InvoiceRecord> invoiceRecordData;

    /**
     * Gets the value of the requestDateTime property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getRequestDateTime() {
        return requestDateTime;
    }

    /**
     * Sets the value of the requestDateTime property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setRequestDateTime(String value) {
        this.requestDateTime = value;
    }

    /**
     * Gets the value of the invoiceHeaderData property.
     *
     * @return
     *     possible object is
     *     {@link InvoiceHeader }
     *
     */
    public InvoiceHeader getInvoiceHeaderData() {
        return invoiceHeaderData;
    }

    /**
     * Sets the value of the invoiceHeaderData property.
     *
     * @param value
     *     allowed object is
     *     {@link InvoiceHeader }
     *
     */
    public void setInvoiceHeaderData(InvoiceHeader value) {
        this.invoiceHeaderData = value;
    }

    /**
     * Gets the value of the invoiceRecordData property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the invoiceRecordData property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getInvoiceRecordData().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link InvoiceRecord }
     *
     *
     */
    public List<InvoiceRecord> getInvoiceRecordData() {
        if (invoiceRecordData == null) {
            invoiceRecordData = new ArrayList<InvoiceRecord>();
        }
        return this.invoiceRecordData;
    }

}


text:
class CreateIssues < ActiveRecord::Migration
  def change
    create_table :issues do |t|
      t.datetime :date
      #t.references :address, index: true, foreign_key: true
      #t.references :homeowner, index: true, foreign_key: true
      #t.references :letter, index: true, foreign_key: true
      #t.integer :status
      #t.boolean :resolved, default: false
      #t.references :user, index: true, foreign_key: true
      t.text :note
      t.string :picture
      #t.references :issueCategory, index: true, foreign_key: true
      #t.references :user, foreign_key: true

      t.timestamps null: false
    end
  end
end


text:
using System.Xml.Serialization;

namespace StayWell.ServiceDefinitions.Mapping.Objects
{
	[XmlType("Published")]
	public class PublishedChangeResponse
	{
		public int PreviouslyPublished { get; set; }
		public int NewlyPublished { get; set; }
		public int Total { get; set; }
	}
}


text:
/* CSS Document */
.clearfix{clear:both;}
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}

.baner_content{width:100%; height:350px;}
.youjilist{width:1200px; margin:60px auto;}
.youjilist li{height:312px; background:#e6e6e6; margin-bottom:20px;}
.youjilist .imgMain{width:440px; float:left; height:312px;}
.youjilist .n_content{width:740px; float:left; margin-left:20px; background:url(../images/logo.png) 540px 36px no-repeat;}
.youjilist .n_content .title{border-bottom:2px solid #49c1a8; height:120px;}
.youjilist .n_content .title h2{font-size:18px; font-weight:400; padding-top:27px; line-height:30px;}
.youjilist .n_content .title span{display:block; line-height:48px;}
.youjilist .n_content .description{line-height:24px; padding:10px 0; font-size:12px; text-align:left;}
.youjilist .n_content .view{width:160px; height:50px; text-align:center; color:#fff; font-size:16px; background:#49c1a8; display:block; line-height:50px; margin:0 auto;}
.youjilist .page{padding:30px 0; text-align:center;}
.youjilist .page a,.youjilist .page span{color: #8698b8;border: 1px solid #e0e5e9; display:inline-block; width:40px; height:40px; padding:0 14px; line-height:40px; border-radius:2px;}
.youjilist .page span.current{border:1px solid #000; background:#49c1a8; color:#fff;}
.youjicontent{width:1200px; margin:50px auto;}
.youjicontent h1{text-align:center; border-bottom:2px solid #ccc; border-top:2px solid #ccc; line-height:48px; font-size:20px; font-weight:bold;}
.youjicontent .youji_mc{padding:50px 0; line-height:30px; font-size:14px;}
.about_menu{width:100%; height:50px; border-bottom:2px solid #49c1a8;}
.about_menu ul{width:1200px; margin:0 auto;}
.about_menu ul li{width:150px; height:50px; float:left; text-align:center; line-height:50px; font-size:16px;}
.about_menu ul li.current{background:#49c1a8;} .about_menu ul li.current a{color:#fff;}
.about_content{width:100%; min-height:1000px; background:url(../images/about_conent_bj.jpg) center bottom no-repeat;}
.about_content .mc{width:1200px; margin:0 auto;}
.about_content .mc h1{height:40px; line-height:40px; text-align:left; font-size:24px;}
.about_content .mc .mc_content{padding:40px 0 0 0; line-height:30px; font-size:14px;}
.dingzhi_liucheng{width:1200px; margin:0 auto; padding:50px 0 18px 0; text-align:center;}
.dingzhiCentent{width:100%; height:810px; background:url(../images/dingzhi_bj.jpg) center no-repeat; margin-bottom:76px;}
.dingzhiCentent .dzcontent{width:940px; margin:0 auto; padding-top:20px;}
.dingzhiCentent .dzcontent .left_icon{width:70px; float:left;}
.dingzhiCentent .dzcontent .left_icon li{text-align:center; line-height:30px; font-size:14px; color:#fff;}
.dingzhiCentent .dzcontent .left_icon li i,.dingzhiCentent .dzcontent .form_m .people i{background:url(../images/dingzhi_icon.png) no-repeat; display:inline-block; width:70px; height:70px;}
.dingzhiCentent .dzcontent .left_icon li.two{margin-top:60px;}
.dingzhiCentent .dzcontent .left_icon li.two i{background-position:-71px 0;}
.dingzhiCentent .dzcontent .left_icon li.three{margin-top:60px;}
.dingzhiCentent .dzcontent .left_icon li.three i{background-position:-141px 0;}
.dingzhiCentent .dzcontent .left_icon li.four{margin-top:80px;}
.dingzhiCentent .dzcontent .left_icon li.four i{background-position:-211px 0;}

.dingzhiCentent .dzcontent .form_m{width:800px; float:right; color:#fff;}
.dingzhiCentent .dzcontent .form_m li{border:1px solid #fff; margin-bottom:20px; padding:26px 30px;}
.dingzhiCentent .dzcontent .form_m .inputtxt{width:218px; height:36px; background:#fff; border:0; opacity:1; color:#000; padding:4px;}
.dingzhiCentent .dzcontent .form_m .txtarea{width:100%; height:100px; padding:10px; background:none;border:0; color:#666;}
.dingzhiCentent .dzcontent .form_m .people{width:100px; float:left; text-align:center;}
.dingzhiCentent .dzcontent .form_m .people i.cr{background-position:-280px 0;}
.dingzhiCentent .dzcontent .form_m .people i.xh{background-position:-350px 0;}
.dingzhiCentent .dzcontent .form_m .people .q_box{border:1px solid #fff; width:100px; height:30px; background:#fff;}
.dingzhiCentent .dzcontent .form_m .people .q_box a{display:block;width:28px; height:28px; background:#49c1a8; color:#fff; font-size:18px; line-height:28px; float:left;}
.dingzhiCentent .dzcontent .form_m .people .q_box .q_txt{width:40px; height:28px; border:0; background:#fff; color:#000; float:left; text-align:center;}
.dingzhiCentent .dzcontent .form_m .people span{display:block; line-height:40px; font-size:16px; color:#fff;}
.dingzhiCentent .dzcontent .form_m .dobtn{padding-left:125px;}
.dingzhiCentent .dzcontent .form_m .dobtn a{display:inline-block; width:150px; height:50px; text-align:center; line-height:50px; font-size:18px; color:#fff;}
.dingzhiCentent .dzcontent .form_m .dobtn a.tijiao{background:#49c1a8;}
.dingzhiCentent .dzcontent .form_m .dobtn a.chongzhi{background:#000;}

.aimtrip_content{width:1200px; margin:50px auto; overflow:hidden;}
.aimtrip_content ul{width:1230px;}
.aimtrip_content li{width:380px; height:600px; float:left; margin:0 30px 30px 0; position:relative; background:#f2f2f2;}
.aimtrip_content .title{width:150px; height:150px; border-radius:150px; background:#49c1a8; border:4px solid #fff; left:110px; top:223px; position:absolute; text-align:center; line-height:150px; color:#fff; font-size:36px; font-weight:bold; overflow:hidden;}
.aimtrip_content .image{width:380px; height:300px; overflow:hidden;}
.aimtrip_content .txt{line-height:24px; font-size:14px; padding:90px 26px 10px 26px;}
.aimtrip_content .link{ height:40px; text-align:center;}
.aimtrip_content .link a{width:100px; height:40px; background:#000; line-height:40px; text-align:center; display:inline-block; font-size:18px; color:#fff;}
.aimtrip_content .page{padding:30px 0; text-align:center;}
.aimtrip_content .page a,.aimtrip_content .page span{color: #8698b8;border: 1px solid #e0e5e9; display:inline-block; width:40px; height:40px; padding:0 14px; line-height:40px; border-radius:2px;}
.aimtrip_content .page span.current{border:1px solid #000; background:#49c1a8; color:#fff;}
.aim_view{width:1200px; margin:0px auto;}
.aim_view .baner{width:1200px; height:460px;}
.aim_view .title{height:70px; background:#43948e; position: relative;}
.aim_view .title h1{ font-size:18px; color:#fff; padding:0 10px; float: left; line-height: 70px; margin: 0;}
.aim_view .title .o_info{ float: right; padding: 0 10px;}
.aim_view .title .o_info span{display:inline-block;}
.aim_view .title .o_info span.price{color:#fff; font-size:28px; font-weight:400; line-height:70px; padding-right:10px;}
.aim_view .title .o_info span.fen{color:#fff; font-size:36px; font-weight:400; line-height:70px; padding:0 28px;}
.aim_view .title .o_info a{display:inline-block; width:100px; height:40px; background:#000; color:#fff; text-align:center; line-height:40px; font-size:18px;}
.aim_view .nav_menu{margin:50px auto; height:48px; border-bottom:2px solid #49c1a8;}
.aim_view .nav_menu li{width:150px; height:48px; text-align:center; float:left; line-height:48px; font-size:18px; cursor:pointer;}
.aim_view .nav_menu li.cur{background:#49c1a8; color:#fff;}
.aim_view .aimview_mc{padding:0 0 50px 0; line-height:30px; font-size:14px;}
.zhuti_content{width:1200px; margin:50px auto;}
.zhuti_content .shaixuan{height:250px;}
.zhuti_content .shaixuan .tab{border-top:1px solid #b3b3b3;}
.zhuti_content .shaixuan .tab a{display:inline-block; width:116px; height:50px; color:#4d4d4d; font-size:16px; line-height:50px; text-align:center;}
.zhuti_content .shaixuan .tab a.cur{background:#49c1a8; color:#fff;}
.zhuti_content .shaixuan .sx_content{height:250px; background:url(../images/sx_bj.jpg) no-repeat; padding:0 150px;}
.zhuti_content .shaixuan .sx_content .sx_main{width:340px; height:100px; float:left;}
.zhuti_content .shaixuan .sx_content .sx_main .sx_list{width:210px; float:left; padding:20px 0 0 0;}
.zhuti_content .shaixuan .sx_content .sx_main .sx_list a{display:inline-block; padding:4px 6px; color:#fff; margin:0 0 10px 0;}
.zhuti_content .shaixuan .sx_content .sx_main .sx_list a.cur{background:#49c1a8;}
.zhuti_content .shaixuan .sx_content .sx_main .labl{width:70px; float:right; color:#fff; padding:42px 0 0 0;}
.zhuti_content .shaixuan .sx_content .sx_right{margin-left:200px;}
.zhuti_content .pro_list{width:1200px; overflow:hidden;}
.zhuti_content .pro_list ul{width:1220px;}
.zhuti_content .pro_list li{width:590px; height:400px; margin:20px 20px 0 0; position:relative; float:left;}
.zhuti_content .pro_list li img{width:590px; height:400px;}
.zhuti_content .pro_list .txt_bj{height:100px; width:100%; border-top:2px solid #49c1a8; position:absolute; left:0; bottom:0; background:#000; opacity:0.5; z-index:1;}
.zhuti_content .pro_list .txt{height:100px; width:100%;position:absolute; left:0; bottom:0;z-index:2;}
.zhuti_content .pro_list .txt h1{width:330px; line-height:30px; padding:10px; font-size:16px; font-weight:400; color:#fff; margin:20px 0 0 0; float:left;}
.zhuti_content .pro_list .txt .price{width:100px; line-height:30px; display:block; float:left; color:#fff; margin:36px 0 0 90px;}
.zhuti_content .pro_list .txt .price span{color:#49c1a8; font-size:18px; font-weight:700;}
.zhuti_content .pro_list .txt i{width:32px; height:32px; background:url(../images/pro_sign.png) no-repeat; position:absolute; right:20px; bottom:10px;}
.zhuti_content .page{padding:30px 0; text-align:center;}
.zhuti_content .page a,.zhuti_content .page span{color: #8698b8;border: 1px solid #e0e5e9; display:inline-block; width:40px; height:40px; padding:0 14px; line-height:40px; border-radius:2px;}
.zhuti_content .page span.current{border:1px solid #000; background:#49c1a8; color:#fff;}

.baner{ height:460px; margin:10px 0 0 0;}
.baner #focus{width:1200px;height:460px;overflow:hidden;position:relative;}
.baner #focus ul{height:250px;position:absolute;}
.baner #focus ul li{float:left;width:1200px;height:460px;overflow:hidden;position:relative;}
.baner #focus ul li div{position:absolute;overflow:hidden;}
.baner #focus .btn{position:absolute;width:945px;height:14px;bottom:20px; text-align:center;}
.baner #focus .btn span{display:inline-block;_display:inline;_zoom:1;width:12px;height:12px;_font-size:0;margin-left:5px;cursor:pointer;background:#D9D9D9; border-radius: 12px;-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);}
.baner #focus .btn span.on{background:#f46;}

/* 2016-2-16 */
@media screen and (max-width:930px){

	.aimtrip_content{ width: auto;}
	.aimtrip_content ul{ width: auto;}
	.aimtrip_content li{ margin:0 30px 30px;}

	.aimview_mc img{ max-width: 100%;}

	.aim_view{ width: auto; max-width: 930px;}
	.aim_view .baner{ width: auto; max-width: 930px; text-align: center;}
	.aim_view .baner img{ max-width: 100%;}
	.aim_view .nav_menu li{ width: 100px;}

	.youjilist{width:1200px; margin:60px auto;}

}
@media screen and (max-width:640px){

	.aim_view .nav_menu li{ width: 100px;}
	.aim_view .title .o_info{ float: left;}
	.aim_view .title{ height: 140px;}
	.aim_view .title .o_info{ float: left;}

	/* 2016-2-19 */
	.youjilist{width:auto; margin:60px auto;}
	.youjilist ul{}
	.youjilist li{height:auto; background:#e6e6e6; margin-bottom:20px;}
	.youjilist .imgMain{width:100%; clear: left; height:auto;}
	.youjilist .imgMain img{ width: 100%;}
	.youjilist .n_content{width:auto; clear: left; margin-left: 0; background:url(../images/logo.png) 540px 36px no-repeat; padding: 0 10px 10px;}
	.youjilist .n_content .title{border-bottom:2px solid #49c1a8; height:auto;}
.youjilist .n_content .title h2{font-size:18px; font-weight:400; padding-top:0; line-height:30px;}
.youjilist .n_content .title span{display:block; line-height:30px;}
.youjilist .n_content .description{ padding: 0;}

}

@media only screen and (min-width: 480px) and (max-width: 639px){

}


text:
<?php

namespace GuideBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * PatientCharacteristics
 *
 * @ORM\Table(name="patient_characteristics")
 * @ORM\Entity(repositoryClass="GuideBundle\Repository\PatientCharacteristicsRepository")
 */
class PatientCharacteristics
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var int
     *
     * @ORM\OneToOne(targetEntity="Actors")
     * @ORM\JoinColumn(name="actorId", referencedColumnName="id")
     */
    private $actorId;

    /**
     * @var string
     *
     * @ORM\Column(name="allergy", type="string", length=60, nullable=true)
     */
    private $allergy;

    /**
     * @var string
     *
     * @ORM\Column(name="chronic_diseases", type="string", length=60, nullable=true)
     */

    private $chronic_diseases;

    /**
     * Get id
     *
     * @return int
     */

    public function getId()
    {
        return $this->id;
    }

    /**
     * Set actorId
     *
     * @param integer $actorId
     *
     * @return PatientCharacteristics
     */
    public function setActorId($actorId)
    {
        $this->actorId = $actorId;

        return $this;
    }

    /**
     * Get actorId
     *
     * @return int
     */
    public function getActorId()
    {
        return $this->actorId;
    }

    /**
     * Set allergy
     *
     * @param string $allergy
     *
     * @return PatientCharacteristics
     */
    public function setAllergy($allergy)
    {
        $this->allergy = $allergy;

        return $this;
    }

    /**
     * Get allergy
     *
     * @return string
     */
    public function getAllergy()
    {
        return $this->allergy;
    }

    /**
     * Set chronic_diseases
     *
     * @param string $chronic_diseases
     *
     * @return PatientCharacteristics
     */
    public function setChronicDieseases($chronic_diseases)
    {
        $this->chronic_diseases = $chronic_diseases;

        return $this;
    }

    /**
     * Get chronic_diseases
     *
     * @return string
     */
    public function getChronicDieseases()
    {
        return $this->chronic_diseases;
    }
}


text:
/*
 * @test
 * @bug 6981576
 * @summary Tests that default border for the titled border is not null
 * @author Sergey Malenkov
 */

import java.awt.Component;
import java.awt.Graphics;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.border.TitledBorder;

public class Test6981576 extends TitledBorder implements Runnable, Thread.UncaughtExceptionHandler {
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Test6981576());
    }

    private int index;
    private LookAndFeelInfo[] infos;
    private JFrame frame;

    private Test6981576() {
        super("");
    }

    @Override
    public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
        getBorder().paintBorder(c, g, x, y, width, height);
    }

    public void run() {
        if (this.infos == null) {
            this.infos = UIManager.getInstalledLookAndFeels();
            Thread.currentThread().setUncaughtExceptionHandler(this);
            JPanel panel = new JPanel();
            panel.setBorder(this);
            this.frame = new JFrame(getClass().getSimpleName());
            this.frame.add(panel);
            this.frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            this.frame.setVisible(true);
        }
        if (this.index == this.infos.length) {
            this.frame.dispose();
        }
        else {
            LookAndFeelInfo info = this.infos[this.index % this.infos.length];
            try {
                UIManager.setLookAndFeel(info.getClassName());
            }
            catch (Exception exception) {
                System.err.println("could not change look and feel");
            }
            SwingUtilities.updateComponentTreeUI(this.frame);
            this.frame.pack();
            this.frame.setLocationRelativeTo(null);
            this.index++;
            SwingUtilities.invokeLater(this);
        }
    }

    public void uncaughtException(Thread thread, Throwable throwable) {
        System.exit(1);
    }
}


text:
(function() {
  var out$ = typeof exports != 'undefined' && exports || typeof define != 'undefined' && {} || this;

  var doctype = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [<!ENTITY nbsp " ">]>';

  function isElement(obj) {
    return obj instanceof HTMLElement || obj instanceof SVGElement;
  }

  function requireDomNode(el) {
    if (!isElement(el)) {
      throw new Error('an HTMLElement or SVGElement is required; got ' + el);
    }
  }

  function isExternal(url) {
    return url && url.lastIndexOf('http',0) == 0 && url.lastIndexOf(window.location.host) == -1;
  }

  function inlineImages(el, callback) {
    requireDomNode(el);

    var images = el.querySelectorAll('image'),
        left = images.length,
        checkDone = function() {
          if (left === 0) {
            callback();
          }
        };

    checkDone();
    for (var i = 0; i < images.length; i++) {
      (function(image) {
        var href = image.getAttributeNS("http://www.w3.org/1999/xlink", "href");
        if (href) {
          if (isExternal(href.value)) {
            console.warn("Cannot render embedded images linking to external hosts: "+href.value);
            return;
          }
        }
        var canvas = document.createElement('canvas');
        var ctx = canvas.getContext('2d');
        var img = new Image();
        img.crossOrigin="anonymous";
        href = href || image.getAttribute('href');
        if (href) {
          img.src = href;
          img.onload = function() {
            canvas.width = img.width;
            canvas.height = img.height;
            ctx.drawImage(img, 0, 0);
            image.setAttributeNS("http://www.w3.org/1999/xlink", "href", canvas.toDataURL('image/png'));
            left--;
            checkDone();
          }
          img.onerror = function() {
            console.log("Could not load "+href);
            left--;
            checkDone();
          }
        } else {
          left--;
          checkDone();
        }
      })(images[i]);
    }
  }

  function getDimension(el, clone, dim) {
    var v = (el.viewBox && el.viewBox.baseVal && el.viewBox.baseVal[dim]) ||
      (clone.getAttribute(dim) !== null && !clone.getAttribute(dim).match(/%$/) && parseInt(clone.getAttribute(dim))) ||
      el.getBoundingClientRect()[dim] ||
      parseInt(clone.style[dim]) ||
      parseInt(window.getComputedStyle(el).getPropertyValue(dim));
    return (typeof v === 'undefined' || v === null || isNaN(parseFloat(v))) ? 0 : v;
  }

  function reEncode(data) {
    data = encodeURIComponent(data);
    data = data.replace(/%([0-9A-F]{2})/g, function(match, p1) {
      var c = String.fromCharCode('0x'+p1);
      return c === '%' ? '%25' : c;
    });
    return decodeURIComponent(data);
  }

  out$.prepareSvg = function(el, options, cb) {
    requireDomNode(el);

    options = options || {};
    options.scale = options.scale || 1;
    options.responsive = options.responsive || false;
    var xmlns = "http://www.w3.org/2000/xmlns/";

    inlineImages(el, function() {
      var outer = document.createElement("div");
      var clone = el.cloneNode(true);
      var width, height;
      if(el.tagName == 'svg') {
        width = options.width || getDimension(el, clone, 'width');
        height = options.height || getDimension(el, clone, 'height');
      } else if(el.getBBox) {
        var box = el.getBBox();
        width = box.x + box.width;
        height = box.y + box.height;
        clone.setAttribute('transform', clone.getAttribute('transform').replace(/translate\(.*?\)/, ''));

        var svg = document.createElementNS('http://www.w3.org/2000/svg','svg')
        svg.appendChild(clone)
        clone = svg;
      } else {
        console.error('Attempted to render non-SVG element', el);
        return;
      }

      clone.setAttribute("version", "1.1");
      if (!clone.getAttribute('xmlns')) {
        clone.setAttributeNS(xmlns, "xmlns", "http://www.w3.org/2000/svg");
      }
      if (!clone.getAttribute('xmlns:xlink')) {
        clone.setAttributeNS(xmlns, "xmlns:xlink", "http://www.w3.org/1999/xlink");
      }

      if (options.responsive) {
        clone.removeAttribute('width');
        clone.removeAttribute('height');
        clone.setAttribute('preserveAspectRatio', 'xMinYMin meet');
      } else {
        clone.setAttribute("width", width * options.scale);
        clone.setAttribute("height", height * options.scale);
      }

      clone.setAttribute("viewBox", [
        options.left || 0,
        options.top || 0,
        width,
        height
      ].join(" "));

      var fos = clone.querySelectorAll('foreignObject > *');
      for (var i = 0; i < fos.length; i++) {
        if (!fos[i].getAttribute('xmlns')) {
          fos[i].setAttributeNS(xmlns, "xmlns", "http://www.w3.org/1999/xhtml");
        }
      }

      outer.appendChild(clone);

        var s = document.createElement('style');
        s.setAttribute('type', 'text/css');
        s.innerHTML = "<![CDATA[\n" + css + "\n]]>";
        var defs = document.createElement('defs');
        defs.appendChild(s);
        clone.insertBefore(defs, clone.firstChild);

        if (cb) {
            var outHtml = outer.innerHTML;
            outHtml = outHtml.replace(/NS\d+:href/gi, 'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');
            cb(outHtml, width, height);
        }
    });
  }

  out$.svgAsDataUri = function(el, options, cb) {
    out$.prepareSvg(el, options, function(svg) {
      var uri = 'data:image/svg+xml;base64,' + window.btoa(reEncode(doctype + svg));
      if (cb) {
        cb(uri);
      }
    });
  }

  out$.svgAsPngUri = function(el, options, cb) {
    requireDomNode(el);

    options = options || {};
    options.encoderType = options.encoderType || 'image/png';
    options.encoderOptions = options.encoderOptions || 0.8;

    var convertToPng = function(src, w, h) {
      var canvas = document.createElement('canvas');

      var context = canvas.getContext('2d');
      canvas.width = w;
      canvas.height = h;

      if(options.canvg) {
        options.canvg(canvas, src);
      } else {
        context.drawImage(src, 0, 0);
      }

        // debug
        // document.getElementById("content").append(canvas);
        //

      if(options.backgroundColor){
        context.globalCompositeOperation = 'destination-over';
        context.fillStyle = options.backgroundColor;
        context.fillRect(0, 0, canvas.width, canvas.height);
      }

      var png;
      try {
        png = canvas.toDataURL(options.encoderType, options.encoderOptions);
      } catch (e) {
        if ((typeof SecurityError !== 'undefined' && e instanceof SecurityError) || e.name == "SecurityError") {
          console.error("Rendered SVG images cannot be downloaded in this browser.");
          return;
        } else {
          throw e;
        }
      }
      cb(png);
    }

    if(options.canvg) {
      out$.prepareSvg(el, options, convertToPng);
    } else {
      out$.svgAsDataUri(el, options, function(uri) {
        var image = new Image();

        image.onload = function() {
          convertToPng(image, image.width, image.height);
        }

        image.onerror = function() {
          console.error(
            'There was an error loading the data URI as an image on the following SVG\n',
            window.atob(uri.slice(26)), '\n',
            "Open the following link to see browser's diagnosis\n",
            uri);
        }

        image.src = uri;
      });
    }
  }

  out$.download = function(name, uri) {
    if (navigator.msSaveOrOpenBlob) {
      navigator.msSaveOrOpenBlob(uriToBlob(uri), name);
    } else {
      var saveLink = document.createElement('a');
      var downloadSupported = 'download' in saveLink;
      if (downloadSupported) {
        saveLink.download = name;
        saveLink.href = uri;
        saveLink.style.display = 'none';
        document.body.appendChild(saveLink);
        saveLink.click();
        document.body.removeChild(saveLink);
      }
      else {
        window.open(uri, '_temp', 'menubar=no,toolbar=no,status=no');
      }
    }
  }

  function uriToBlob(uri) {
    var byteString = window.atob(uri.split(',')[1]);
    var mimeString = uri.split(',')[0].split(':')[1].split(';')[0]
    var buffer = new ArrayBuffer(byteString.length);
    var intArray = new Uint8Array(buffer);
    for (var i = 0; i < byteString.length; i++) {
      intArray[i] = byteString.charCodeAt(i);
    }
    return new Blob([buffer], {type: mimeString});
  }

  out$.saveSvg = function(el, name, options) {
    requireDomNode(el);

    options = options || {};
    out$.svgAsDataUri(el, options, function(uri) {
      out$.download(name, uri);
    });
  }

  out$.saveSvgAsPng = function(el, name, options) {
    requireDomNode(el);

    options = options || {};
    out$.svgAsPngUri(el, options, function(uri) {
      out$.download(name, uri);
    });
  }

  // if define is defined create as an AMD module
  if (typeof define !== 'undefined') {
    define(function() {
      return out$;
    });
  }

})();


text:
/* eslint no-param-reassign: ["error", { "props": false }] */

import router from '@/router';
import * as api from '@/api/user';
import { USER } from '@/store/types';
import { camelize } from '@/utils/transfer';
import { checkAuthorizeRedirect } from '@/utils/authorization';
import { AUTH_STATE } from '@/config/index';

export default {
  namespaced: true,
  state: {
    user: null,
    status: AUTH_STATE.GUEST,
  },
  getters: {
    user: (state) => {
      if (state.status === AUTH_STATE.LOGGED_IN && state.user && Object.keys(state.user).length !== 0) {
        return state.user;
      }
      return null;
    },
    status: state => state.status,
  },
  actions: {
    [USER.LOGIN]({ dispatch, rootState }, { phone, code }) {
      return new Promise((resolve, reject) => {
        api.login(phone, code).then(() => {
          dispatch(USER.GET, { reload: true, silent: true }).then(() => {
            const redirect = rootState.route.query.redirect;
            if (redirect) {
              router.push({ path: redirect });
            } else {
              router.push({ name: 'index' });
            }
            resolve();
          });
        }).catch(reject);
      });
    },
    [USER.LOGOUT]({ commit, rootState }) {
      return new Promise((resolve, reject) => {
        api.logout().then(async () => {
          commit(USER.LOGOUT);
          const { route } = router.resolve(rootState.common.route.to.fullPath);
          const redirect = await checkAuthorizeRedirect(route);
          if (redirect) {
            router.push(redirect);
          }
          resolve();
        }).catch(reject);
      });
    },
    [USER.GET]({ commit, state }, { reload, refresh, strict = true, silent } = {}) {
      if (refresh ? state.user : reload || !state.user) {
        // window.__INITIAL_STATE__ = {"errcode":401,"errmsg":"未授权"}; // 测试数据
        if (typeof window.__INITIAL_STATE__ === 'object') {
          const res = camelize(window.__INITIAL_STATE__);
          commit(USER.GET, {
            status: res.errcode,
            user: res.data || {},
          });
          delete window.__INITIAL_STATE__;
        } else {
          return new Promise((resolve, reject) => {
            api.getUser(strict, silent).then((res) => {
              commit(USER.GET, {
                status: res.data ? res.errcode : AUTH_STATE.GUEST,
                user: res.data || {},
              });
              resolve();
            }).catch((err) => {
              if (err && err.response) {
                commit(USER.GET, {
                  status: err.response.errcode,
                  user: err.response.data || {},
                });
                resolve();
              } else {
                reject(err);
              }
            });
          });
        }
      }
      return Promise.resolve();
    },
  },
  mutations: {
    [USER.GET](state, { status, user = {} }) {
      state.user = user;
      state.status = status;
    },
    [USER.LOGOUT](state) {
      state.user = {};
      state.status = AUTH_STATE.GUEST;
    },
  },
};


text:
<?php

namespace Integrated\Bundle\IntegratedBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class IntegratedIntegratedBundle extends Bundle
{
}


text:
function testDateNow() {
    // Accessing global.Date for the first time will change the global shape,
    // so do it before the loop starts; otherwise we have to loop an extra time
    // to pick things up.
    var time = Date.now();
    for (var j = 0; j < 9; ++j)
        time = Date.now();
    return "ok";
}
assertEq(testDateNow(), "ok");


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>com.alexgilleran.icesoap.xml (IceSoap 1.1.1 API)</title>
<meta name="date" content="2016-04-21">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package com.alexgilleran.icesoap.xml

Interface Summary

Interface
Description

XMLAttribute

Represents an attribute on an XML node.

XMLElement

Represents an XML element (aka a tag).

XMLNode

Interface that represents a single XML node within an XML document.

XMLParentNode

Represents an XMLNode - an XML element with zero or more other elements
 beneath it in the XML hierarchy.

XMLTextNode

An XML text element - i.e.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Copyright © 2016. All rights reserved.


text:
#ifndef NONLINEARIMAGER_H
#define NONLINEARIMAGER_H

#include "pandabase.h"

#include "projectionScreen.h"
#include "displayRegion.h"
#include "graphicsOutput.h"
#include "camera.h"
#include "texture.h"
#include "pandaNode.h"
#include "nodePath.h"
#include "pointerTo.h"
#include "pvector.h"
#include "graphicsEngine.h"
#include "callbackObject.h"
#include "asyncTask.h"

class GraphicsEngine;
class GraphicsStateGuardian;
class GraphicsOutput;
class GenericAsyncTask;

/**
 * This class object combines the rendered output of a 3-d from one or more
 * linear (e.g.  perspective) cameras, as seen through a single, possibly
 * nonlinear camera.
 *
 * This can be used to generate real-time imagery of a 3-d scene using a
 * nonlinear camera, for instance a fisheye camera, even though the underlying
 * graphics engine may only support linear cameras.  It can also pre-distort
 * imagery to compensate for off-axis projectors, and/or curved screens of any
 * complexity.
 *

 *
 * A NonlinearImager may be visualized as a dark room into which a number of
 * projection screens have been placed, of arbitrary size and shape and at any
 * arbitrary position and orientation to each other.  Onto each of these
 * screens is projected the view as seen by a normal perspective camera that
 * exists in the world (that is, under render).
 *
 * There also exist in the room one or more (possibly nonlinear) cameras,
 * called viewers, that observe these screens.  The image of the projection
 * screens seen by each viewer is finally displayed on the viewer's associated
 * DisplayRegion.  By placing the viewer(s) appropriately relative to the
 * screens, and by choosing suitable lens properties for the viewer(s), you
 * can achieve a wide variety of distortion effects.
 *

 *
 * There are several different LensNode (Camera) objects involved at each
 * stage in the process.  To help keep them all straight, different words are
 * used to refer to each different kind of Camera used within this object.
 * The camera(s) under render, that capture the original view of the world to
 * be projected onto the screens, are called source cameras, and are set per
 * screen via set_source_camera().  The LensNode that is associated with each
 * screen to project the image as seen from the screen's source camera is
 * called a projector; these are set via the ProjectionScreen::set_projector()
 * interface.  Finally, the cameras that view the whole configuration of
 * screens are called viewers; each of these is associated with a
 * DisplayRegion, and they are set via set_viewer_camera().
 *
 * Of all these lenses, only the source cameras must use linear (that is,
 * perspective or orthographic) lenses.  The projectors and viewers may be any
 * arbitrary lens, linear or otherwise.
 */
class EXPCL_PANDAFX NonlinearImager {
PUBLISHED:
  NonlinearImager();
  ~NonlinearImager();

  int add_screen(ProjectionScreen *screen);
  int add_screen(const NodePath &screen, const string &name);
  int find_screen(const NodePath &screen) const;
  void remove_screen(int index);
  void remove_all_screens();

  int get_num_screens() const;
  NodePath get_screen(int index) const;
  MAKE_SEQ(get_screens, get_num_screens, get_screen);
  GraphicsOutput *get_buffer(int index) const;
  MAKE_SEQ(get_buffers, get_num_screens, get_buffer);

  void set_texture_size(int index, int width, int height);
  void set_source_camera(int index, const NodePath &source_camera);

  void set_screen_active(int index, bool active);
  bool get_screen_active(int index) const;

  int add_viewer(DisplayRegion *dr);
  int find_viewer(DisplayRegion *dr) const;
  void remove_viewer(int index);
  void remove_all_viewers();

  void set_viewer_camera(int index, const NodePath &viewer_camera);
  NodePath get_viewer_camera(int index) const;
  NodePath get_viewer_scene(int index) const;

  int get_num_viewers() const;
  DisplayRegion *get_viewer(int index) const;
  MAKE_SEQ(get_viewers, get_num_viewers, get_viewer);

  NodePath get_dark_room() const;
  GraphicsEngine *get_graphics_engine() const;

  void recompute();

public:
  static AsyncTask::DoneStatus recompute_callback(GenericAsyncTask *task, void *data);
  void recompute_if_stale();

private:
  class Viewer {
  public:
    PT(DisplayRegion) _dr;
    PT(Camera) _internal_camera;
    NodePath _internal_scene;
    NodePath _viewer;
    PT(LensNode) _viewer_node;
    UpdateSeq _viewer_lens_change;
  };
  typedef pvector<Viewer> Viewers;

  class Mesh {
  public:
    NodePath _mesh;
    UpdateSeq _last_screen;
  };
  typedef pvector<Mesh> Meshes;

  class Screen {
  public:
    NodePath _screen;
    PT(ProjectionScreen) _screen_node;
    string _name;
    PT(GraphicsOutput) _buffer;
    NodePath _source_camera;
    int _tex_width, _tex_height;
    bool _active;

    // One mesh per viewer.
    Meshes _meshes;
  };
  typedef pvector<Screen> Screens;

  void recompute_screen(Screen &screen, size_t vi);
  void render_screen(GraphicsEngine *engine, Screen &screen);

  Viewers _viewers;
  Screens _screens;

  PT(GraphicsEngine) _engine;
  PT(AsyncTask) _recompute_task;
  NodePath _dark_room;

  bool _stale;
};

#include "nonlinearImager.I"

#endif


text:
using JustLogic.Core;
using System.Collections.Generic;
using UnityEngine;

[UnitMenu("Color/Get Blue")]
[UnitFriendlyName("Color.Get Blue")]
[UnitUsage(typeof(Color), HideExpressionInActionsList = true)]
public class JLColorGetBlue : JLExpression
{
    public override object GetAnyResult(IExecutionContext context)
    {
        return Color.blue;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.4.4.BUILD-SNAPSHOT</version>
	</parent>
	<groupId>org.springframework.cloud</groupId>
	<artifactId>spring-cloud-starter-parent</artifactId>
	<version>Camden.SR5</version>
	<name>spring-cloud-starter-parent</name>
	<description>Spring Cloud Starter Parent</description>
	<packaging>pom</packaging>
	<url>https://projects.spring.io/spring-cloud</url>
	<organization>
		<name>Pivotal Software, Inc.</name>
		<url>https://www.spring.io</url>
	</organization>
	<properties>
		<main.basedir>${basedir}/../..</main.basedir>
		<spring-cloud.version>Camden.SR5</spring-cloud.version>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>${spring-cloud.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<distributionManagement>
		<downloadUrl>https://github.com/spring-cloud</downloadUrl>
		<site>
			<id>spring-docs</id>
			<url>
				scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}
			</url>
		</site>
		<repository>
			<id>repo.spring.io</id>
			<name>Spring Release Repository</name>
			<url>https://repo.spring.io/libs-release-local</url>
		</repository>
		<snapshotRepository>
			<id>repo.spring.io</id>
			<name>Spring Snapshot Repository</name>
			<url>https://repo.spring.io/libs-snapshot-local</url>
		</snapshotRepository>
	</distributionManagement>
	<profiles>
		<profile>
			<id>spring</id>
			<repositories>
				<repository>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>https://repo.spring.io/libs-snapshot-local</url>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://repo.spring.io/libs-milestone-local</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>spring-releases</id>
					<name>Spring Releases</name>
					<url>https://repo.spring.io/release</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>https://repo.spring.io/libs-snapshot-local</url>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</pluginRepository>
				<pluginRepository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://repo.spring.io/libs-milestone-local</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
		<profile>
			<id>milestone</id>
			<distributionManagement>
				<repository>
					<id>repo.spring.io</id>
					<name>Spring Milestone Repository</name>
					<url>https://repo.spring.io/libs-milestone-local</url>
				</repository>
			</distributionManagement>
		</profile>
		<profile>
			<id>bintray</id>
			<distributionManagement>
				<repository>
					<id>bintray</id>
					<name>Jcenter Repository</name>
					<url>https://api.bintray.com/maven/spring/jars/org.springframework.cloud:${bintray.package}</url>
				</repository>
			</distributionManagement>
		</profile>
		<profile>
			<id>central</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<distributionManagement>
				<snapshotRepository>
					<id>sonatype-nexus-snapshots</id>
					<name>Sonatype Nexus Snapshots</name>
					<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
				</snapshotRepository>
				<repository>
					<id>sonatype-nexus-staging</id>
					<name>Nexus Release Repository</name>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>
</project>


text:
class J {
  public static void m(String... a) { }
  public static void m(J... a) { }
}


text:
package ru.job4j.depsort;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

public class DepSort {

   private Comparator<String> stringComparator = new Comparator<String>() {
        @Override
        public int compare(String o1, String o2) {
            return o1.compareTo(o2);
        }
    };

    public List<String> sortAndReverse(String[] strings) {
            List<String> stringList = Arrays.asList(strings);

            stringList.sort(stringComparator);
            System.out.println(stringList);

            return stringList;
    }

    public List<String> reverse(String[] strings) {
        List<String> stringList = Arrays.asList(strings);

        stringList.sort(stringComparator);
        stringList.sort(new Comparator<String>() {
            @Override
            public int compare(String o1, String o2) {

                int result;
                if(o1.compareTo(o2) == 0) {
                    result = 0;
                } else if (o1.compareTo(o2) == 1) {
                    result = -1;
                } else {
                    result = 1;
                }

                return  result;
            }
        });

        System.out.println(stringList);

        return stringList;
    }

}


text:
package runconfig

import (
	"strings"

	"github.com/docker/docker/engine"
	"github.com/docker/docker/nat"
	"github.com/docker/docker/utils"
)

type NetworkMode string

func (n NetworkMode) IsHost() bool {
	return n == "host"
}

func (n NetworkMode) IsContainer() bool {
	parts := strings.SplitN(string(n), ":", 2)
	return len(parts) > 1 && parts[0] == "container"
}

type DeviceMapping struct {
	PathOnHost        string
	PathInContainer   string
	CgroupPermissions string
}

type RestartPolicy struct {
	Name              string
	MaximumRetryCount int
}

type HostConfig struct {
	Binds           []string
	ContainerIDFile string
	LxcConf         []utils.KeyValuePair
	Privileged      bool
	PortBindings    nat.PortMap
	Links           []string
	PublishAllPorts bool
	Dns             []string
	DnsSearch       []string
	VolumesFrom     []string
	Devices         []DeviceMapping
	NetworkMode     NetworkMode
	CapAdd          []string
	CapDrop         []string
	RestartPolicy   RestartPolicy
}

func ContainerHostConfigFromJob(job *engine.Job) *HostConfig {
	hostConfig := &HostConfig{
		ContainerIDFile: job.Getenv("ContainerIDFile"),
		Privileged:      job.GetenvBool("Privileged"),
		PublishAllPorts: job.GetenvBool("PublishAllPorts"),
		NetworkMode:     NetworkMode(job.Getenv("NetworkMode")),
	}

	job.GetenvJson("LxcConf", &hostConfig.LxcConf)
	job.GetenvJson("PortBindings", &hostConfig.PortBindings)
	job.GetenvJson("Devices", &hostConfig.Devices)
	job.GetenvJson("RestartPolicy", &hostConfig.RestartPolicy)
	if Binds := job.GetenvList("Binds"); Binds != nil {
		hostConfig.Binds = Binds
	}
	if Links := job.GetenvList("Links"); Links != nil {
		hostConfig.Links = Links
	}
	if Dns := job.GetenvList("Dns"); Dns != nil {
		hostConfig.Dns = Dns
	}
	if DnsSearch := job.GetenvList("DnsSearch"); DnsSearch != nil {
		hostConfig.DnsSearch = DnsSearch
	}
	if VolumesFrom := job.GetenvList("VolumesFrom"); VolumesFrom != nil {
		hostConfig.VolumesFrom = VolumesFrom
	}
	if CapAdd := job.GetenvList("CapAdd"); CapAdd != nil {
		hostConfig.CapAdd = CapAdd
	}
	if CapDrop := job.GetenvList("CapDrop"); CapDrop != nil {
		hostConfig.CapDrop = CapDrop
	}

	return hostConfig
}


text:
using Aspose.Slides.Charts;
using Aspose.Slides;
using Aspose.Slides.Examples.CSharp;
using Aspose.Slides.Export;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharp.Charts
{

	public class FontSizeLegend
	{
		public static void Run()
		{
			//ExStart:FontSizeLegend
			// The path to the documents directory.
			string dataDir = RunExamples.GetDataDir_Charts();

			using (Presentation pres = new Presentation(dataDir+"test.pptx"))
			{
				IChart chart = pres.Slides[0].Shapes.AddChart(Aspose.Slides.Charts.ChartType.ClusteredColumn, 50, 50, 600, 400);

				chart.Legend.TextFormat.PortionFormat.FontHeight = 20;

				chart.Axes.VerticalAxis.IsAutomaticMinValue = false;

				chart.Axes.VerticalAxis.MinValue = -5;

				chart.Axes.VerticalAxis.IsAutomaticMaxValue = false;

				chart.Axes.VerticalAxis.MaxValue = 10;

				pres.Save(dataDir+"output.pptx", SaveFormat.Pptx);
			}

			//ExEnd:FontSizeLegend
		}
	}
}


text:
package com.talkwalker.kaggle.transforming.utils;

import java.io.IOException;
import java.io.InputStream;

import org.apache.tika.exception.TikaException;
import org.apache.tika.metadata.Metadata;
import org.apache.tika.parser.AutoDetectParser;
import org.apache.tika.sax.BodyContentHandler;
import org.apache.tika.sax.ToXMLContentHandler;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;

/**
 * Helper class to using Apache Tika to read ebooks into XHTML or plain text
 *
 * @author Christopher Schank
 *
 */
public class DocumentReader {

  public String parseDocumentXHTML(InputStream documentStream) throws TikaException, SAXException, IOException {
    ContentHandler handler = new ToXMLContentHandler();

    parse(handler, documentStream);
    return handler.toString();
  }

  public String parseDocumentPlainText(InputStream documentStream) throws TikaException, SAXException, IOException {
    ContentHandler handler = new BodyContentHandler(-1);

    parse(handler, documentStream);
    return handler.toString();
  }

  private void parse(ContentHandler handler, InputStream documentStream) throws TikaException, SAXException, IOException {
    AutoDetectParser parser = new AutoDetectParser();
    Metadata metadata = new Metadata();
    parser.parse(documentStream, handler, metadata);
  }

}


text:
import { Markdown } from '../../../../common/Markdown';
import { useExtension } from '../../../api/useExtension';

export function EventsCodeSnippet() {
  const extension = useExtension()!;
  if (
    extension.eventarcChannel &&
    extension.allowedEventTypes &&
    extension.allowedEventTypes.length > 0
  ) {
    const eventsMd = `
   ### Create Custom Event Handlers

   This extension publishes events to the \`${
     extension.eventarcChannel
   }\` channel. You can create custom handlers that respond to events on this channel. For example:

     import { onCustomEventPublished } from "firebase-functions/v2/eventarc";

     export const eventhandler = onCustomEventPublished(
       "${extension.allowedEventTypes ? extension.allowedEventTypes[0] : ''}",
       (e) => {
           // Handle extension event here.
       });
     `;
    return <Markdown data-testid="events-code-snippet">{eventsMd}</Markdown>;
  }
  return null;
}


text:
#ifndef FileWriterBaseCallback_h
#define FileWriterBaseCallback_h

#include "wtf/RefCounted.h"

namespace WebCore {

class FileWriterBase;

class FileWriterBaseCallback : public RefCounted<FileWriterBaseCallback> {
public:
    virtual ~FileWriterBaseCallback() { }
    virtual bool handleEvent(FileWriterBase*) = 0;
};

} // namespace

#endif // FileWriterBaseCallback_h


text:
package com.addhen.spotify.ui.activity;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.NavUtils;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;

import butterknife.ButterKnife;

public abstract class BaseActivity extends AppCompatActivity {

    /**
     * Layout resource id
     */
    protected final int mLayout;

    /**
     * Menu resource id
     */
    protected final int mMenu;

    protected ActionBar mActionBar;

    public BaseActivity(int layout, int menu) {
        mLayout = layout;
        mMenu = menu;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (mLayout != 0) {
            setContentView(mLayout);
            ButterKnife.inject(this);
        }

        mActionBar = getSupportActionBar();
        if (mActionBar != null) {
            mActionBar.setDisplayHomeAsUpEnabled(true);
            mActionBar.setHomeButtonEnabled(true);
        }
    }

    /**
     * Sets an actionbar main and sub titles
     *
     * @param title    The main title for the action bar
     * @param subTitle The sub title for the action bar
     */
    protected void setActionBarTitle(String title, String subTitle) {
        if (mActionBar != null) {
            if (!TextUtils.isEmpty(title)) {
                mActionBar.setTitle(title);
            }
            mActionBar.setSubtitle(subTitle);
        }
    }

    protected void setSubTitle(@NonNull String subTitle) {
        setActionBarTitle(null, subTitle);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        if (mMenu != 0) {
            getMenuInflater().inflate(mMenu, menu);
        }
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                navigateUp();
                break;
        }
        return super.onOptionsItemSelected(item);
    }

    /**
     * Adds a {@link Fragment} to this activity's layout.
     *
     * @param containerViewId The container view where to add the fragment.
     * @param fragment        The fragment to be added.
     * @param tag             The tag for the fragment
     */
    protected void replaceFragment(int containerViewId, Fragment fragment, String tag) {
        android.app.FragmentTransaction fragmentTransaction = this.getFragmentManager()
                .beginTransaction();
        fragmentTransaction.replace(containerViewId, fragment, tag);
        fragmentTransaction.commit();
    }

    protected boolean navigateUp() {
        final Intent intent = getParentIntent();
        if (intent != null) {
            NavUtils.navigateUpTo(this, intent);
            return true;
        }
        return false;
    }

    protected Intent getParentIntent() {
        return NavUtils.getParentActivityIntent(this);
    }
}


text: * [API Reference](README.md#class-methods)


text:
#if defined(__x86_64__) || defined(_M_X64)
#ifndef X86_64
#define X86_64
#endif
#endif

#if defined(__i386__) || defined(_M_IX86)
#ifndef X86
#define X86
#endif
#endif

#ifdef _WIN32
#ifndef WIN32
#define WIN32
#endif
#endif

#ifdef _WIN64
#ifndef WIN64
#define WIN64
#endif
#endif

#ifdef BGBBTJ_DRV
#define BGBBTJ_API
#else

#ifdef WIN32
#ifdef BGBBTJ_DLL
#define BGBBTJ_API __declspec(dllexport)
#else
#define BGBBTJ_API __declspec(dllimport)
#endif
#else
#define BGBBTJ_API
#endif

#endif

#ifndef BOOL_T
#define BOOL_T
typedef unsigned char bool;
#endif

#ifndef BYTE_T
#define BYTE_T
typedef unsigned char byte;
#endif

#ifndef SBYTE_T
#define SBYTE_T
typedef signed char sbyte;
#endif

#ifndef U8_T
#define U8_T
typedef unsigned char u8;
#endif

#ifndef S8_T
#define S8_T
typedef signed char s8;
#endif

#ifndef PDLIB_INT_BITS_T
#define PDLIB_INT_BITS_T
typedef unsigned short u16;
typedef signed short s16;
typedef unsigned int u32;
typedef signed int s32;
typedef unsigned long long u64;
typedef signed long long s64;
#endif

#ifndef SNLINT_T
#define SNLINT_T
#ifdef X86_64
typedef s64 snlint;
typedef u64 unlint;
typedef s64 nlint;
#else
#ifdef X86
typedef s32 snlint;
typedef u32 unlint;
typedef u32 nlint;
#else
/* unknown, assume 64 bits for safety */
typedef s64 snlint;
typedef u64 unlint;
typedef s64 nlint;
#endif
#endif
#endif

#ifndef F32_T
#define F32_T
typedef float f32;
#endif

#ifndef F64_T
#define F64_T
typedef double f64;
#endif

#ifdef X86_64
#ifndef PTRBITS
#define PTRBITS	64
#endif
#ifndef PTRBITS_64
#define PTRBITS_64
#endif
#endif

#ifdef X86
#ifndef PTRBITS
#define PTRBITS	32
#endif
#ifndef PTRBITS_32
#define PTRBITS_32
#endif
#endif

#if !defined(LITTLEENDIAN) && !defined(BIGENDIAN)
#if defined(X86) || defined(X86_64)
#define LITTLEENDIAN
#endif
#endif

#ifndef true
#define true 1
#endif

#ifndef false
#define false 0
#endif


text:
<?php

$composer = __DIR__ . '/../vendor/autoload.php';
if (file_exists($composer)) {
    require_once $composer;
}


text:
set -euo pipefail
if [[ ! -d "${RUNFILES_DIR:-/dev/null}" && ! -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
  if [[ -f "$0.runfiles_manifest" ]]; then
    export RUNFILES_MANIFEST_FILE="$0.runfiles_manifest"
  elif [[ -f "$0.runfiles/MANIFEST" ]]; then
    export RUNFILES_MANIFEST_FILE="$0.runfiles/MANIFEST"
  elif [[ -f "$0.runfiles/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
    export RUNFILES_DIR="$0.runfiles"
  fi
fi
if [[ -f "${RUNFILES_DIR:-/dev/null}/bazel_tools/tools/bash/runfiles/runfiles.bash" ]]; then
  source "${RUNFILES_DIR}/bazel_tools/tools/bash/runfiles/runfiles.bash"
elif [[ -f "${RUNFILES_MANIFEST_FILE:-/dev/null}" ]]; then
  source "$(grep -m1 "^bazel_tools/tools/bash/runfiles/runfiles.bash " \
            "$RUNFILES_MANIFEST_FILE" | cut -d ' ' -f 2-)"
else
  echo >&2 "ERROR: cannot find @bazel_tools//tools/bash/runfiles:runfiles.bash"
  exit 1
fi
# --- end runfiles.bash initialization ---

source "$(rlocation "io_bazel/src/test/shell/unittest.bash")" \
  || { echo "Could not source unittest.bash" >&2; exit 1; }

function set_up() {
  tmp_TEST_TMPDIR=$TEST_TMPDIR
  TEST_TMPDIR=$TEST_TMPDIR/$TEST_name
  mkdir -p $TEST_TMPDIR
}

function tear_down() {
  TEST_TMPDIR=$tmp_TEST_TMPDIR
}

function test_1() {
  echo "Everything is okay in test_1"
}

function test_2() {
  echo "Everything is okay in test_2"
}

function test_timestamp() {
  local ts=$(timestamp)
  [[ $ts =~ ^[0-9]{13}$ ]] || fail "timestamp wan't valid: $ts"

  local time_diff=$(get_run_time 100000 223456)
  assert_equals $time_diff 123.456
}

function test_failure_message() {
  cd $TEST_TMPDIR
  cat > thing.sh <<EOF
#!/bin/bash
XML_OUTPUT_FILE=${TEST_TMPDIR}/dummy.xml
source "$(rlocation "io_bazel/src/test/shell/unittest.bash")"

function test_thing() {
  fail "I'm a failure with <>&\" escaped symbols"
}

run_suite "thing tests"
EOF
  chmod +x thing.sh
  ./thing.sh &> $TEST_log && fail "thing.sh should fail"
  expect_not_log "__fail: No such file or directory"
  assert_contains "message=\"I'm a failure with <>&" escaped symbols\"" ${TEST_TMPDIR}/dummy.xml
  assert_contains "I'm a failure with <>&\" escaped symbols" ${TEST_TMPDIR}/dummy.xml
  assert_contains 'errors="1"' ${TEST_TMPDIR}/dummy.xml
}

function test_no_failure_message() {
  cd $TEST_TMPDIR
  cat > thing.sh <<EOF
#!/bin/bash
XML_OUTPUT_FILE=${TEST_TMPDIR}/dummy.xml
source "$(rlocation "io_bazel/src/test/shell/unittest.bash")"

function test_thing() {
  TEST_passed=blorp
}

run_suite "thing tests"
EOF
  chmod +x thing.sh
  ./thing.sh &> $TEST_log && fail "thing.sh should fail"
  expect_not_log "__fail: No such file or directory"
  assert_contains "No failure message" ${TEST_TMPDIR}/dummy.xml
}

function test_errexit_prints_stack_trace() {
  cd $TEST_TMPDIR
  cat > thing.sh <<EOF
#!/bin/bash
XML_OUTPUT_FILE=${TEST_TMPDIR}/dummy.xml
source "$(rlocation "io_bazel/src/test/shell/unittest.bash")"

enable_errexit

function helper() {
  echo before
  false
  echo after
}

function test_thing() {
  helper
}

run_suite "thing tests"
EOF
  chmod +x thing.sh
  ./thing.sh &> $TEST_log && fail "thing.sh should fail"
  #cat $TEST_log

  # Make sure the full stack trace is there.
  expect_log "test_thing FAILED: terminated because this command returned a non-zero status:"
  expect_log "./thing.sh:[0-9]*: in call to helper"
  expect_log "./thing.sh:[0-9]*: in call to test_thing"
}

run_suite "unittests Tests"