text:
import Route from 'ember-route';
import inject from 'ember-service/inject';
import { scheduleOnce } from 'ember-runloop';
import $ from 'jquery';

/**
 * The Fountainhead base route class contains handlers for targeted scrolling
 * including {{c-l 'resetController'}} (to clear sticky parameters),
 * {{c-l 'crossLinkFragmentOverride'}} (for History consumers using a cross link),
 * and {{c-l 'didTransition'}} (to update application hash tracker).
 * @class BaseRoute
 * @constructor
 * @extends Ember.Route
 */
export default Route.extend({
  fountainhead: inject(),

  // Properties
  // ---------------------------------------------------------------------------
  /**
   * Required for History consumers when cross linking to a different class _(Ember
   * strips hash from the {{c-l class='FHHref'}} component)_. When a cross link with
   * a property is clicked, the cross link will set this property to notify the route
   * that there is a fragment that should be observed on transition.
   * @property crossLinkFragmentOverride
   * @type {?string}
   * @protected
   * @default null
   */
  crossLinkFragmentOverride: null,

  // Hooks
  // ---------------------------------------------------------------------------
  /**
   * We don't want the `id` query param to be sticky. If it is, then if you
   * have an `id` scroll target for a class, navigate elsewhere and then click that
   * class again in the `api-nav`, the sticky query param will set the `id` to the
   * previous scroll target, 😣.
   *
   * The `resetController` hook is called anytime a route's model changes or the
   * route is exited, and is the recommended time to reset query param values on
   * a controller.
   * @method resetController
   * @param {Object}  controller
   * @param {Boolean} isExiting
   * @param {Object}  transition
   */
  resetController(controller, isExiting, transition) {
    controller.set('id', null);
  },

  // Actions
  // ---------------------------------------------------------------------------
  actions: {
    /**
     * On transition, handle resetting scroll position as well as updating
     * {{c-l class='Fountainhead'}} service that a transition has occurred so that
     * the new location can be checked for a scroll target hash.
     * @event didTransition
     */
    didTransition() {
      const crossLinkFragmentOverride = this.get('crossLinkFragmentOverride');
      // For all transitions, first scroll back to top, this handles when a user scrolls
      // down th page and then transitions without making any hash changes. If the url
      // includes a scroll target it will be passed to a page component and trigger a
      // scroll event
      $('.fh-page-in-page-wrapper').scrollTop(0);

      const sendFragment = () => {
        this.get('fountainhead').send('setFragmentId', location.hash.slice(1) || '');
      };

      const overrideHash = () => {
        history.replaceState(null, null, `${location.href}#${crossLinkFragmentOverride}`);
        sendFragment();
      };

      if (crossLinkFragmentOverride) {
        // A cross link was used with a scroll target hash. Ember will strip this
        // target from the URL. After render, handle overriding hash back to the
        // original target
        scheduleOnce('render', this, overrideHash);
        // Clear out override now that it has been handled
        this.set('crossLinkFragmentOverride', null);
      } else {
        // hashChange event does not fire on transitions, after render the URL will
        // be updated to new location. Send update to Fountainhead service notifying
        // change event
        scheduleOnce('render', this, sendFragment);
      }
    }
  }
});


text:
package mixcoin

import (
	"github.com/conformal/btcjson"
	"github.com/conformal/btcrpcclient"
	"github.com/conformal/btcutil"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/mock"
	"log"
	"testing"
)

func initializeMix(t *testing.T) *MockRpcClient {
	mockClient := new(MockRpcClient)

	newRpcClient = func(config *btcrpcclient.ConnConfig, ntfnHandlers *btcrpcclient.NotificationHandlers) RpcClient {
		log.Printf("creating mock rpc client")
		mockClient.newBlockHandler = ntfnHandlers.OnBlockConnected
		mockClient.recvTxHandler = ntfnHandlers.OnRecvTx
		return mockClient
	}

	mockClient.On("NotifyBlocks").Return(nil)
	mockClient.On("WalletPassphrase", mock.Anything, 7200).Return(nil)
	mockClient.On("ImportPrivKey", mock.Anything).Return(nil)

	log.Printf("starting server")

	StartMixcoinServer()

	return mockClient
}

func TestMix(t *testing.T) {
	mockClient := initializeMix(t)

	// send a chunk msg request
	mockClient.On("GetNewAddress").Return(mixAddr1, nil)
	mockClient.On("GetBestBlock").Return(blockHash1, int32(306328), nil)

	err := handleChunkRequest(chunkMsg1)

	assert.Nil(t, err)
	warrantLenGot := len(chunkMsg1.Warrant)
	warrantLenWant := len(exampleWarrant1)
	assert.Equal(t, warrantLenGot, warrantLenWant, "chunk msg should be signed")

	// block found
	unspentCall := mockClient.On("ListUnspentMinMaxAddresses", 0, 1, []btcutil.Address{mixAddr1})
	unspentCall.Return([]btcjson.ListUnspentResult{utxo1}, nil)

	mockClient.newBlockHandler(blockHash1, int32(306328))

	mockClient.AssertExpectations(t)
}

redpajama_set_name: RedPajamaGithub


text:
'use strict';

module.exports = function(app) {
	// Root routing
	var core = require('../../app/controllers/core.server.controller');
	app.route('/').get(core.index);

	// Envíos de email
	app.route('/presupuesto').post(core.sendMailPresupuesto);
	app.route('/contacto').post(core.sendMailContacto);

//	app.route('/imagen').post(core.uploadImage); Upload imagen - No funciona
};


text:
FROM eavatar/basebox

ADD overlayfs.tar /
ADD rabbitmq-run.sh /etc/service/rabbitmq/run

RUN  chmod +x /etc/service/rabbitmq/run

RUN echo rabbitmq:x:102:106::/data:/bin/sh >> /etc/passwd &&\
    echo rabbitmq:x:106: >> /etc/group

# Define environment variables.
ENV RABBITMQ_LOG_BASE /data/log
ENV RABBITMQ_MNESIA_BASE /data/mnesia

# Define mount points.
VOLUME ["/data/log", "/data/mnesia"]

# Define working directory.
WORKDIR /data

# Expose ports.
EXPOSE 5672 15672 4369


text:
Data generated using Databricks 7.3 :

```
CREATE TABLE manual_testing.uppercase_columns(ALA BIGINT, KOTA BIGINT)
USING delta
PARTITIONED BY (ALA)
LOCATION 's3://starburst-alex/delta/manual_testing/uppercase_columns';

INSERT INTO manual_testing.uppercase_columns VALUES (1,1), (1,2), (2,11), (2,15), (3,25)
```


text:
var_templates_list=(
    PKG_CONFIG_PATH
)

accumulateRoles

for var in "${var_templates_list[@]}"; do
    mangleVarListGeneric ":" "$var" ${role_suffixes[@]+"${role_suffixes[@]}"}
done

export NIX_PKG_CONFIG_WRAPPER_FLAGS_SET_@suffixSalt@=1


text:
if __name__ == '__main__':
    n = int(input())
    student_marks = {}
    for _ in range(n):
        name, *line = input().split()
        scores = list(map(float, line))
        student_marks[name] = scores
    query_name = input()


text:
package com.rdkc.sensorlog;

import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import android.app.Dialog;
import android.app.Notification;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.IBinder;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import android.widget.Toast;

public class LoggingService extends Service implements SensorEventListener {

	public static final String GYRO_PREFIX = "gyro_";

	public static final String ACCEL_PREFIX = "accel_";

	@SuppressWarnings("unused")
	private final String TAG = "LoggingService";

	private static final int NOTIFICATION_ID = 1;
	private static final int SENSOR_INTERVAL = 500;

	// References to SensorManager and accelerometer
	private SensorManager mSensorManager;
	private Sensor mAccelerometer;
	private Sensor mGyroscope;

	private long lastUpdateAccel;
	private FileOutputStream fosAccel;
	private PrintWriter pwAccel;

	private long lastUpdateGyro;
	private FileOutputStream fosGyro;
	private PrintWriter pwGyro;

	private final DateFormat sd = new SimpleDateFormat("yyMMdd_HHmmss");

	// Filtering constant
	private final float mAlpha = 0.8f;

	// Arrays for storing filtered values
	private float[] mGravity = new float[3];
	private float[] mAccel = new float[3];

	private static boolean running = false;

	// https://groups.google.com/forum/#!topic/android-developers/jEvXMWgbgzE
	public static boolean isRunning() {
		return running;
	}

	@Override
	public void onCreate() {
		super.onCreate();

		// Get reference to SensorManager
		mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);

		// Get references to sensors
		if (null == (mAccelerometer = mSensorManager
				.getDefaultSensor(Sensor.TYPE_ACCELEROMETER))) {
			throw new RuntimeException("no accelerometer found");
		}
		if (null == (mGyroscope = mSensorManager
				.getDefaultSensor(Sensor.TYPE_GYROSCOPE_UNCALIBRATED))) {
			Log.w("No gyroscope found on device!", "warn");
			Toast.makeText(this, "No gyro on device!", Toast.LENGTH_LONG).show();
		}

		// Create a notification area notification so the user
		// can get back to the client UI
		final Intent notificationIntent = new Intent(getApplicationContext(),
				MainActivity.class);
		final PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
				notificationIntent, 0);

		final Notification notification = new NotificationCompat.Builder(
				getApplicationContext())
				.setSmallIcon(android.R.drawable.ic_menu_info_details)
				.setOngoing(true).setContentTitle("Sensor Logging")
				.setContentText("Go to SensorLog")
				.setContentIntent(pendingIntent)
				.build();

		// Put this Service in a foreground state, so it won't
		// readily be killed by the system
		startForeground(NOTIFICATION_ID, notification);
		Log.d("====== service created", "debug");

	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startid) {

		startRecording(ACCEL_PREFIX +sd.format(new Date()), GYRO_PREFIX +sd.format(new Date()));
		Log.d("====== service started", "debug");

		// Do not automatically restart this service if it is killed
		return this.START_NOT_STICKY;
	}

	@Override
	public void onDestroy() {

		stopRecording();
		Log.d("====== service stopped", "debug");
	}

	// Can't bind to this Service
	@Override
	public IBinder onBind(Intent intent) {
		return null;
	}

	protected void startRecording(String fileNameAccel, String fileNameGyro) {

		try {
			fosAccel = openFileOutput(fileNameAccel, MODE_PRIVATE);
			pwAccel = new PrintWriter(new BufferedWriter(
					new OutputStreamWriter(fosAccel)));
			mSensorManager.registerListener(this, mAccelerometer,
					SensorManager.SENSOR_DELAY_NORMAL);

			if(mGyroscope != null) {
				fosGyro = openFileOutput(fileNameGyro, MODE_PRIVATE);
				pwGyro = new PrintWriter(new BufferedWriter(
						new OutputStreamWriter(fosGyro)));
				mSensorManager.registerListener(this, mGyroscope,
						SensorManager.SENSOR_DELAY_NORMAL);
			}

			running = true;
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			stopSelf();
		}
	}

	protected void stopRecording() {
		pwAccel.close();

		if(mGyroscope != null) {
			pwGyro.close();
		}

		mSensorManager.unregisterListener(this);
		running = false;
	}

	// Process new reading
	@Override
	public void onSensorChanged(SensorEvent event) {
		if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
			processAccelEvent(event);
		}
		else if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE_UNCALIBRATED) {
			processGyroEvent(event);
		}
	}

	private void processAccelEvent(SensorEvent event) {
		long actualTime = System.currentTimeMillis();

		if (actualTime - lastUpdateAccel > SENSOR_INTERVAL) {

			lastUpdateAccel = actualTime;

			float rawX = event.values[0];
			float rawY = event.values[1];
			float rawZ = event.values[2];

			// Apply low-pass filter
			mGravity[0] = lowPass(rawX, mGravity[0]);
			mGravity[1] = lowPass(rawY, mGravity[1]);
			mGravity[2] = lowPass(rawZ, mGravity[2]);

			// Apply high-pass filter
			mAccel[0] = highPass(rawX, mGravity[0]);
			mAccel[1] = highPass(rawY, mGravity[1]);
			mAccel[2] = highPass(rawZ, mGravity[2]);

			pwAccel.println(actualTime + "," +
					String.valueOf(mAccel[0]) + "," +
					String.valueOf(mAccel[1]) + "," +
					String.valueOf(mAccel[2]));
		}
	}

	private void processGyroEvent(SensorEvent event) {
		long actualTime = System.currentTimeMillis();

		if (actualTime - lastUpdateGyro > SENSOR_INTERVAL) {

			lastUpdateGyro = actualTime;

			pwGyro.println(actualTime + "," +
					String.valueOf(event.values[0]) + "," +
					String.valueOf(event.values[1]) + "," +
					String.valueOf(event.values[2]) + "," +
					String.valueOf(event.values[3]) + "," +
					String.valueOf(event.values[4]) + "," +
					String.valueOf(event.values[5]));
		}
	}

	// Deemphasize transient forces
	private float lowPass(float current, float gravity) {
		return gravity * mAlpha + current * (1 - mAlpha);
	}

	// Deemphasize constant forces
	private float highPass(float current, float gravity) {
		return current - gravity;
	}

	@Override
	public void onAccuracyChanged(Sensor sensor, int accuracy) {
		// NA
	}
}


text:
@import FBSnapshotTestCase;

@interface SnapFBSnapshotBase : FBSnapshotTestCase

@property (nonatomic, strong) UIViewController *sutBackingViewController;
@property (nonatomic, strong) UIView *sut;
@property (nonatomic, assign) BOOL recordAll;

- (void)snapshotVerifyView:(UIView*)view;

@end


text:
using SharpDX;
using SharpDX.DXGI;
using System;
using System.IO;

#if !NETFX_CORE
namespace HelixToolkit.Wpf.SharpDX
#else
#if CORE
namespace HelixToolkit.SharpDX.Core
#else
namespace HelixToolkit.UWP
#endif
#endif
{
    using Utilities;
    /// <summary>
    /// Texture model contains <see cref="TextureInfoLoader"/> and a Guid to identify specific texture.
    /// <see cref="TextureInfoLoader"/> is being called to load texture during GPU texture resource creation.
    /// <para>
    /// Helixtoolkit provides basic implementation for texture info loaders.
    /// </para>
    /// <para>
    /// User can provide own implementation for <see cref="TextureInfoLoader"/> for better texture resource/data management.
    /// </para>
    /// </summary>
    [System.ComponentModel.TypeConverter(typeof(StreamToTextureModelConverter))]
    public sealed class TextureModel
    {
        internal sealed class NullLoader : ITextureInfoLoader
        {
            public static readonly NullLoader Null = new NullLoader();

            public void Complete(Guid id, TextureInfo info, bool succeeded)
            {

            }

            public TextureInfo Load(Guid id)
            {
                return TextureInfo.Null;
            }
        }

        private sealed class StreamLoader : ITextureInfoLoader
        {
            private readonly TextureInfo info;
            private readonly bool autoClose;

            public StreamLoader(Stream stream, bool autoClose)
            {
                info = new TextureInfo(stream);
                this.autoClose = autoClose;
            }

            public void Complete(Guid id, TextureInfo info, bool succeeded)
            {
                if (autoClose)
                {
                    info.Texture?.Dispose();
                }
            }

            public TextureInfo Load(Guid id)
            {
                return info;
            }
        }

        private sealed class Color4ArrayLoader : ITextureInfoLoader
        {
            private readonly TextureInfo info;

            public Color4ArrayLoader(Color4[] data, int width)
            {
                info = new TextureInfo(data, width);
            }

            public Color4ArrayLoader(Color4[] data, int width, int height)
            {
                info = new TextureInfo(data, width, height);
            }

            public Color4ArrayLoader(Color4[] data, int width, int height, int depth)
            {
                info = new TextureInfo(data, width, height, depth);
            }

            public void Complete(Guid id, TextureInfo info, bool succeeded)
            {
            }

            public TextureInfo Load(Guid id)
            {
                return info;
            }
        }

        private sealed class ByteArrayLoader : ITextureInfoLoader
        {
            private readonly TextureInfo info;

            public ByteArrayLoader(byte[] data, Format pixelFormat, int width)
            {
                info = new TextureInfo(data, pixelFormat, width);
            }

            public ByteArrayLoader(byte[] data, Format pixelFormat, int width, int height)
            {
                info = new TextureInfo(data, pixelFormat, width, height);
            }

            public ByteArrayLoader(byte[] data, Format pixelFormat, int width, int height, int depth)
            {
                info = new TextureInfo(data, pixelFormat, width, height, depth);
            }

            public void Complete(Guid id, TextureInfo info, bool succeeded)
            {
            }

            public TextureInfo Load(Guid id)
            {
                return info;
            }
        }

        private sealed class RawDataLoader : ITextureInfoLoader
        {
            private readonly TextureInfo info;

            public RawDataLoader(IntPtr data, Format pixelFormat, int width)
            {
                info = new TextureInfo(data, pixelFormat, width);
            }

            public RawDataLoader(IntPtr data, Format pixelFormat, int width, int height)
            {
                info = new TextureInfo(data, pixelFormat, width, height);
            }

            public RawDataLoader(IntPtr data, Format pixelFormat, int width, int height, int depth)
            {
                info = new TextureInfo(data, pixelFormat, width, height, depth);
            }

            public void Complete(Guid id, TextureInfo info, bool succeeded)
            {
            }

            public TextureInfo Load(Guid id)
            {
                return info;
            }
        }

        /// <summary>
        /// Gets or sets the texture model repository.
        /// Repository is used to load texture from file path.
        /// <para>
        /// You can customize the repository to provider your own implementation. Helixtoolkit will ask repository to load texture on-demand.
        /// </para>
        /// </summary>
        /// <value>
        /// The texture model repository.
        /// </value>
        public static ITextureModelRepository TextureModelRepository { set; get; } = new TextureModelRepository();
        /// <summary>
        /// Gets the unique identifier.
        /// </summary>
        /// <value>
        /// The unique identifier.
        /// </value>
        public Guid Guid
        {
            get;
        }
        /// <summary>
        /// Gets the tag.
        /// </summary>
        /// <value>
        /// The tag.
        /// </value>
        public object Tag
        {
            get;
        }
        /// <summary>
        /// Gets the texture information loader.
        /// </summary>
        /// <value>
        /// The texture information loader.
        /// </value>
        public ITextureInfoLoader TextureInfoLoader
        {
            get;
        } = NullLoader.Null;

        /// <summary>
        /// Provides interface for user defined texture loader.
        /// HelixToolkit will call <see cref="ITextureInfoLoader.Load(Guid)"/> to start loading content into GPU.
        /// HelixToolkit will call <see cref="ITextureInfoLoader.Complete(Guid, TextureInfo, bool)"/> once content has been loaded into GPU.
        /// </summary>
        /// <param name="contentId">The content identifier.</param>
        /// <param name="loader">The loader.</param>
        public TextureModel(Guid contentId, ITextureInfoLoader loader)
        {
            Guid = contentId;
            TextureInfoLoader = loader ?? NullLoader.Null;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="stream">The compressed texture stream. Supports Jpg, Bmp, Png, Tiff, DDS, Wmp</param>
        /// <param name="autoCloseStream">Close the stream after being uploaded into GPU.
        /// Use with caution since the stream cannot be re-used after being closed.</param>
        public TextureModel(Stream stream, bool autoCloseStream = false)
            : this(Guid.NewGuid(), new StreamLoader(stream, autoCloseStream))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="colorArray">The color array.</param>
        /// <param name="width">The width.</param>
        /// <exception cref="ArgumentException">Width = {width} does not equal to the Color Array Length {colorArray.Length}</exception>
        public TextureModel(Color4[] colorArray, int width)
            : this(Guid.NewGuid(), new Color4ArrayLoader(colorArray, width))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="colorArray">The color array.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <exception cref="ArgumentException">Width * Height = {width * height} does not equal to the Color Array Length {colorArray.Length}</exception>
        public TextureModel(Color4[] colorArray, int width, int height)
            : this(Guid.NewGuid(), new Color4ArrayLoader(colorArray, width, height))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="colorArray">The color array.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="depth">The depth.</param>
        /// <exception cref="ArgumentException">Width * Height * Depth = {width * height * depth} does not equal to the Color Array Length {colorArray.Length}</exception>
        public TextureModel(Color4[] colorArray, int width, int height, int depth)
            : this(Guid.NewGuid(), new Color4ArrayLoader(colorArray, width, height, depth))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="data">The image data.</param>
        /// <param name="pixelFormat">The image pixel format.</param>
        /// <param name="width">The width.</param>
        /// <exception cref="ArgumentException">Width = {width} does not correspond to the Data Array Length {data.Length}</exception>
        public TextureModel(byte[] data, Format pixelFormat, int width)
            : this(Guid.NewGuid(), new ByteArrayLoader(data, pixelFormat, width))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="data">The image data.</param>
        /// <param name="pixelFormat">The image pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <exception cref="ArgumentException">Width * Height = {width * height} does not correspond to the Data Array Length {data.Length}</exception>
        public TextureModel(byte[] data, Format pixelFormat, int width, int height)
            : this(Guid.NewGuid(), new ByteArrayLoader(data, pixelFormat, width, height))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="data">The image data.</param>
        /// <param name="pixelFormat">The image pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="depth">The depth.</param>
        /// <exception cref="ArgumentException">Width * Height * Depth = {width * height * depth} does not correspond to the Data Array Length {data.Length}</exception>
        public TextureModel(byte[] data, Format pixelFormat, int width, int height, int depth)
            : this(Guid.NewGuid(), new ByteArrayLoader(data, pixelFormat, width, height, depth))
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="data">The image data.</param>
        /// <param name="pixelFormat">The image pixel format.</param>
        /// <param name="width">The width.</param>
        /// <exception cref="ArgumentException">Width = {width} does not correspond to the Data Length</exception>
        public TextureModel(IntPtr data, Format pixelFormat, int width)
            : this(Guid.NewGuid(), new RawDataLoader(data, pixelFormat, width))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="data">The image data.</param>
        /// <param name="pixelFormat">The image pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <exception cref="ArgumentException">Width * Height = {width * height} does not correspond to the Data Length</exception>
        public TextureModel(IntPtr data, Format pixelFormat, int width, int height)
            : this(Guid.NewGuid(), new RawDataLoader(data, pixelFormat, width, height))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="data">The image data.</param>
        /// <param name="pixelFormat">The image pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="depth">The depth.</param>
        /// <exception cref="ArgumentException">Width * Height * Depth = {width * height * depth} does not correspond to the Data Length</exception>
        public TextureModel(IntPtr data, Format pixelFormat, int width, int height, int depth)
            : this(Guid.NewGuid(), new RawDataLoader(data, pixelFormat, width, height, depth))
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="TextureModel"/> class.
        /// </summary>
        /// <param name="textureFile">The texture file.</param>
        public TextureModel(string textureFile)
            : this(Guid.NewGuid(), new TextureFileLoader(textureFile))
        {

        }
        /// <summary>
        /// Creates texture model from specified stream.
        /// </summary>
        /// <param name="stream">The stream.</param>
        /// <returns></returns>
        public static TextureModel Create(Stream stream)
        {
            return TextureModelRepository != null ?
                TextureModelRepository.Create(stream) : new TextureModel(stream);
        }
        /// <summary>
        /// Creates texture model from specified texture path.
        /// </summary>
        /// <param name="texturePath">The texture path.</param>
        /// <returns></returns>
        public static TextureModel Create(string texturePath)
        {
            return TextureModelRepository != null ?
               TextureModelRepository.Create(texturePath) : new TextureModel(texturePath);
        }
        /// <summary>
        /// Loads the texture info.
        /// </summary>
        /// <returns></returns>
        public TextureInfo Load()
        {
            return TextureInfoLoader.Load(Guid);
        }
        /// <summary>
        /// Completes loading
        /// </summary>
        /// <param name="info">The information.</param>
        /// <param name="succ">if set to <c>true</c> [succ].</param>
        public void Complete(TextureInfo info, bool succ)
        {
            TextureInfoLoader.Complete(Guid, info, succ);
        }
        /// <summary>
        /// Performs an implicit conversion from <see cref="Stream"/> to <see cref="TextureModel"/>.
        /// </summary>
        /// <param name="stream">The stream.</param>
        /// <returns>
        /// The result of the conversion.
        /// </returns>
        public static implicit operator TextureModel(Stream stream)
        {
            return TextureModelRepository != null ?
                TextureModelRepository.Create(stream) : new TextureModel(stream);
        }
    }

    public enum TextureDataType
    {
        None,
        Stream,
        ByteArray,
        Color4,
        RawPointer,
    }

    /// <summary>
    /// Stream texture data.
    /// </summary>
    public sealed class TextureInfo
    {
        private static readonly byte[] emptyBytes = new byte[0];
        private static readonly Color4[] emptyColor4 = new Color4[0];

        public static TextureInfo Null
        {
            get;
        } = new TextureInfo();

        public TextureDataType DataType
        {
            get;
        } = TextureDataType.None;

        /// <summary>
        /// The texture stream
        /// </summary>
        public Stream Texture
        {
            get;
        } = Stream.Null;
        /// <summary>
        /// Gets the texture raw bytes.
        /// </summary>
        /// <value>
        /// The texture raw.
        /// </value>
        public byte[] TextureRaw
        {
            get;
        } = emptyBytes;
        /// <summary>
        /// Gets the color4 array.
        /// </summary>
        /// <value>
        /// The color4 array.
        /// </value>
        public Color4[] Color4Array
        {
            get;
        } = emptyColor4;
        /// <summary>
        /// Gets the raw pointer.
        /// </summary>
        /// <value>
        /// The raw pointer.
        /// </value>
        public IntPtr RawPointer
        {
            get;
        } = IntPtr.Zero;

        /// <summary>
        /// Whether the texture is a compressed data format, such as Jepg, Png, DDS.
        /// Set <see cref="IsCompressed"/>= false for such as Color4[] array content.
        /// </summary>
        public bool IsCompressed
        {
            get;
        }
        /// <summary>
        /// The pixel format. Only used by non-compressed texture data.
        /// </summary>
        public Format PixelFormat
        {
            get;
        }
        /// <summary>
        /// The texture width. Only used by non-compressed texture data.
        /// </summary>
        public int Width
        {
            get;
        }
        /// <summary>
        /// The height. Only used by non-compressed texture data.
        /// </summary>
        public int Height
        {
            get;
        }

        public int Depth
        {
            get;
        }
        /// <summary>
        /// The generate mip maps automatically after being loaded.
        /// </summary>
        public bool GenerateMipMaps
        {
            get;
        }
        /// <summary>
        /// Gets the texture dimension.
        /// </summary>
        /// <value>
        /// The dimension.
        /// </value>
        public int Dimension
        {
            get;
        }
        /// <summary>
        /// Gets the tag.
        /// </summary>
        /// <value>
        /// The tag.
        /// </value>
        public object Tag
        {
            get;
        }

        private TextureInfo()
        {
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a compressed texture stream
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentNullException">Texture cannot be null.</exception>
        public TextureInfo(Stream texture, bool generateMipMaps = true)
        {
            Texture = texture ?? throw new ArgumentNullException("Texture cannot be null.");
            DataType = TextureDataType.Stream;
            IsCompressed = true;
            GenerateMipMaps = generateMipMaps;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 1D texture stream
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentNullException">Texture cannot be null.</exception>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(Stream texture, Format pixelFormat, int width, bool generateMipMaps = true)
        {
            Texture = texture ?? throw new ArgumentNullException("Texture cannot be null.");
            Width = width == 0 ? throw new ArgumentException("Height cannot be zero.") : width;
            DataType = TextureDataType.Stream;
            IsCompressed = false;
            PixelFormat = pixelFormat;
            GenerateMipMaps = generateMipMaps;
            Dimension = 1;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 2D texture stream
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(Stream texture, Format pixelFormat, int width, int height, bool generateMipMaps = true)
            : this(texture, pixelFormat, width, generateMipMaps)
        {
            Height = height == 0 ? throw new ArgumentException("Height cannot be zero.") : height;
            Dimension = 2;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 3D texture stream
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="depth">The depth.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentOutOfRangeException">Depth cannot be zero.</exception>
        public TextureInfo(Stream texture, Format pixelFormat, int width, int height, int depth, bool generateMipMaps = true)
            : this(texture, pixelFormat, width, height, generateMipMaps)
        {
            Depth = depth == 0 ? throw new ArgumentOutOfRangeException("Depth cannot be zero.") : depth;
            Dimension = 3;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 1D texture data
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentNullException">Texture cannot be null.</exception>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(byte[] texture, Format pixelFormat, int width, bool generateMipMaps = true)
        {
            TextureRaw = texture ?? throw new ArgumentNullException("Texture cannot be null.");
            Width = width == 0 ? throw new ArgumentException("Height cannot be zero.") : width;
            DataType = TextureDataType.ByteArray;
            IsCompressed = false;
            PixelFormat = pixelFormat;
            GenerateMipMaps = generateMipMaps;
            Dimension = 1;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 2D texture data
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(byte[] texture, Format pixelFormat, int width, int height, bool generateMipMaps = true)
            : this(texture, pixelFormat, width, generateMipMaps)
        {
            Height = height == 0 ? throw new ArgumentException("Height cannot be zero.") : height;
            Dimension = 2;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 3D texture data
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="depth">The depth.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentOutOfRangeException">Depth cannot be zero.</exception>
        public TextureInfo(byte[] texture, Format pixelFormat, int width, int height, int depth, bool generateMipMaps = true)
            : this(texture, pixelFormat, width, height, generateMipMaps)
        {
            Depth = depth == 0 ? throw new ArgumentOutOfRangeException("Depth cannot be zero.") : depth;
            Dimension = 3;
        }

        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 1D color4 data
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentNullException">Texture cannot be null.</exception>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(Color4[] texture, bool generateMipMaps = true)
        {
            Color4Array = texture ?? throw new ArgumentNullException("Texture cannot be null.");
            Width = texture.Length;
            DataType = TextureDataType.Color4;
            IsCompressed = false;
            GenerateMipMaps = generateMipMaps;
            Dimension = 1;
            PixelFormat = Format.R32G32B32A32_Float;
        }

        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 1D color4 data
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="width">The width.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentNullException">Texture cannot be null.</exception>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(Color4[] texture, int width, bool generateMipMaps = true)
            : this(texture, generateMipMaps)
        {
            Width = width == 0 ? throw new ArgumentException("Height cannot be zero.") : width;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 2D color4 data
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(Color4[] texture, int width, int height, bool generateMipMaps = true)
            : this(texture, width, generateMipMaps)
        {
            Height = height == 0 ? throw new ArgumentException("Height cannot be zero.") : height;
            Dimension = 2;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 3D color4 data
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="depth">The depth.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentOutOfRangeException">Depth cannot be zero.</exception>
        public TextureInfo(Color4[] texture, int width, int height, int depth, bool generateMipMaps = true)
            : this(texture, width, height, generateMipMaps)
        {
            Depth = depth == 0 ? throw new ArgumentOutOfRangeException("Depth cannot be zero.") : depth;
            Dimension = 3;
        }

        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 1D texture raw pointer
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentNullException">Texture cannot be null.</exception>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(IntPtr texture, Format pixelFormat, int width, bool generateMipMaps = true)
        {
            RawPointer = texture == IntPtr.Zero ? throw new ArgumentNullException("Texture cannot be null.") : texture;
            Width = width == 0 ? throw new ArgumentException("Height cannot be zero.") : width;
            DataType = TextureDataType.RawPointer;
            IsCompressed = false;
            PixelFormat = pixelFormat;
            GenerateMipMaps = generateMipMaps;
            Dimension = 1;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 2D texture raw pointer
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentException">Height cannot be zero.</exception>
        public TextureInfo(IntPtr texture, Format pixelFormat, int width, int height, bool generateMipMaps = true)
            : this(texture, pixelFormat, width, generateMipMaps)
        {
            Height = height == 0 ? throw new ArgumentException("Height cannot be zero.") : height;
            Dimension = 2;
        }
        /// <summary>
        /// Create <see cref="TextureInfo"/> with a non-compressed 3D texture raw pointer
        /// </summary>
        /// <param name="texture">The texture.</param>
        /// <param name="pixelFormat">The pixel format.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="depth">The depth.</param>
        /// <param name="generateMipMaps">if set to <c>true</c> [generate mip maps].</param>
        /// <exception cref="ArgumentOutOfRangeException">Depth cannot be zero.</exception>
        public TextureInfo(IntPtr texture, Format pixelFormat, int width, int height, int depth, bool generateMipMaps = true)
            : this(texture, pixelFormat, width, height, generateMipMaps)
        {
            Depth = depth == 0 ? throw new ArgumentOutOfRangeException("Depth cannot be zero.") : depth;
            Dimension = 3;
        }
    }
}


text:
from kivy.properties import NumericProperty, ListProperty, BooleanProperty
from kivy_soil.hover_behavior import HoverBehavior
from kivy.uix.progressbar import ProgressBar
from kivy.core.window import Window
from kivy.uix.image import Image
from kivy.metrics import cm
from kivy.clock import Clock

class SliderProgressBar(HoverBehavior, ProgressBar):
    '''Progress bar for playback bar'''
    callback = None
    do_callback_on_move = False
    source_circle = 'data/circle.png'
    circle_size = ListProperty([int(cm(0.3)), int(cm(0.3))])
    circle_color = ListProperty([1, 1, 1, 0.2])
    touching = BooleanProperty(False)
    value2 = NumericProperty(50.0)

    def __init__(self, **kwargs):
        super(SliderProgressBar, self).__init__(**kwargs)
        self.circle = Image(
            source=self.source_circle, opacity=0, size=self.circle_size)
        Clock.schedule_once(self.add_circle, 0)

    def add_circle(self, *args):
        self.add_widget(self.circle)
        Window.bind(mouse_pos=self.on_mouse_move)

    def on_mouse_move(self, _, pos):
        if self.circle.opacity:
            self.move_circle_to_progress()

    def on_hovering(self, _, value):
        if value:
            self.circle.opacity = 1
        elif not self.touching:
            self.circle.opacity = 0

    def on_touching(self, _, value):
        if not value and not self.hovering:
            self.circle.opacity = 0

    def move_circle_to_progress(self, *args):
        '''Moves circle to progress bar current value'''
        chalf = self.circle_size[0] * 0.5
        if not self.value:
            x_new = self.x - chalf
        else:
            x_new = self.x + (self.width / self.max * self.value) - chalf
        self.circle.pos = (x_new, self.y + self.height * 0.5 - chalf)

    def on_value(self, _, value):
        self.move_circle_to_progress()

    def on_value2(self, _, value):
        '''Calls self.move_circle_to_progress if it is not being dragged by
        touch already, otherwise sets value from touch position'''
        if not self.touching:
            self.value = value

    def update_value_from_touch(self, touch):
        tx = touch.pos[0]
        if self.touching:
            val = ((tx - self.x) / self.width) * self.max
            if val < 0.0:
                val = 0.0
            elif val > self.max:
                val = self.max
            self.value = val

    def on_touch_down(self, touch):
        '''Starts dragging bar value with touch'''
        if touch.button in ('scrollup', 'scrolldown', 'right'):
            return False
        if self.collide_point(*touch.pos):
            touch.grab(self)
            self.grab_hover()
            self.touching = True
            self.update_value_from_touch(touch)
            return True

    def on_touch_up(self, touch):
        '''Stops dragging bar value with touch and calls self.on_seeking()
        with new value argument'''
        if touch.button in ('scrollup', 'scrolldown', 'right'):
            return False
        if self.touching:
            touch.ungrab(self)
            self.ungrab_hover()
            self.touching = False
            self.update_value_from_touch(touch)
            if self.callback:
                self.callback(self.value)
            return True

    def on_touch_move(self, touch):
        '''Updates progress value from touch position'''
        if self.touching:
            self.update_value_from_touch(touch)
            if self.callback and self.do_callback_on_move:
                self.callback(self.value)
            return True


text:
package Logica;

import java.sql.Date;
import java.util.ArrayList;

/**
 * Clase que contiene información propia de una
 * reserva
 * @author LEIDY
 * @version 1.0
 * @updated 24-sep.-2015 7:55:06 a. m.
 */
public class Reserva {

	/**
	 * Atributo de la servicio de cabania que se va a reservar
	 */
	private Cabania cabania;
	/**
	 * Atributo de la servicio de camping que se va a reservar
	 */
	private Camping camping;
	/**
	 * Atributo de  la canitdad de personas que se encontraran en la cabania
	 */
	private int cantidadPersonas;
	/**
	 * Atributo del estado en el que se encuentra actualmente la
	 * reserva
	 */
	private EstadoReserva estadoReserva;

	private Date fechaSolicitud;
	/**
	 * Persona que realiza la reserva
	 */
	private Persona persona;
	/**
	 * Atributo que permitira tener la URL o dirección de ruta
	 * especificada en donde se encuentre almacenado un escaner del
	 * recibo de pago realizado
	 */
	private String reciboPago;
	/**
	 * Atributo  del valor total de la reserva de acuerdo a la cantidad
	 *  de personas y tipo de usuario
	 */
	private double valorReserva;
	private TipoServicio tipoServicio;
	private int idReserva;

	public Reserva(Cabania cabania, int cantidadPersonas,
				   Date fechaSolicitud, Persona persona, String reciboPago) {

		this.cabania = cabania;
		this.cantidadPersonas = cantidadPersonas;
		this.fechaSolicitud = fechaSolicitud;
		this.persona = persona;
		this.reciboPago = reciboPago;
		this.tipoServicio = TipoServicio.CABANIA;
	}

	public Reserva(Camping camping, int cantidadPersonas, EstadoReserva estadoReserva,
				   Date fechaSolicitud, Persona persona, String reciboPago) {

		this.camping = camping;
		this.cantidadPersonas = cantidadPersonas;
		this.estadoReserva = estadoReserva;
		this.fechaSolicitud = fechaSolicitud;
		this.persona = persona;
		this.reciboPago = reciboPago;
		this.valorReserva = calcularValorReserva(this.cantidadPersonas,(double)90000);
		this.tipoServicio = TipoServicio.CAMPING;

	}

	public Reserva(int cantidadPersonas, EstadoReserva estadoReserva, Date fechaSolicitud, Persona persona) {
		this.cantidadPersonas = cantidadPersonas;
		this.estadoReserva = estadoReserva;
		this.fechaSolicitud = fechaSolicitud;
		this.persona = persona;
		this.valorReserva = calcularValorReserva(this.cantidadPersonas,90000);
	}

	public Reserva(int cantidadPersonas, EstadoReserva estadoReserva, Date fechaSolicitud,
				   TipoServicio tipoServicio,Persona persona) {
		this.cantidadPersonas = cantidadPersonas;
		this.estadoReserva = estadoReserva;
		this.fechaSolicitud = fechaSolicitud;
		this.persona = persona;
		if(persona.getTipoUsuario().toString().equalsIgnoreCase("Afiliado")){
			this.valorReserva = calcularValorReserva(this.cantidadPersonas,90000);
		}
		else{
			this.valorReserva = calcularValorReserva(this.cantidadPersonas,160000);
		}

		this.tipoServicio = tipoServicio;
	}

	public Reserva(int cantidadPersonas, EstadoReserva estadoReserva, Date fechaSolicitud, TipoServicio tipoServicio) {
		this.cantidadPersonas = cantidadPersonas;
		this.estadoReserva = estadoReserva;
		this.fechaSolicitud = fechaSolicitud;
		this.valorReserva = calcularValorReserva(this.cantidadPersonas,(double)90000);
		this.tipoServicio = tipoServicio;
	}

	public Reserva() {

	}

	public double calcularValorReserva(int cantidadPersonas, double valorReserva){
		return (double) valorReserva*cantidadPersonas;
	}

	public int getCantidadPersonas() {
		return cantidadPersonas;
	}

	public void setCantidadPersonas(int cantidadPersonas) {
		this.cantidadPersonas = cantidadPersonas;
	}

	public EstadoReserva getEstadoReserva() {
		return estadoReserva;
	}

	public void setEstadoReserva(EstadoReserva estadoReserva) {
		this.estadoReserva = estadoReserva;
	}

	public Date getFechaSolicitud() {
		return fechaSolicitud;
	}

	public void setFechaSolicitud(Date fechaSolicitud) {
		this.fechaSolicitud = fechaSolicitud;
	}

	public Persona getPersona() {
		return persona;
	}

	public void setPersona(Persona persona) {
		this.persona = persona;
	}

	public String getReciboPago() {
		return reciboPago;
	}

	public void setReciboPago(String reciboPago) {
		this.reciboPago = reciboPago;
	}

	public double getValorReserva() {
		return valorReserva;
	}

	public void setValorReserva(double valorReserva) {
		this.valorReserva = valorReserva;
	}

	public Cabania getCabania() {
		return cabania;
	}

	public void setCabania(Cabania cabania) {
		this.cabania = cabania;
	}

	public Camping getCamping() {
		return camping;
	}

	public void setCamping(Camping camping) {
		this.camping = camping;
	}

	public TipoServicio getTipoServicio() {
		return tipoServicio;
	}

	public void setTipoServicio(TipoServicio tipoServicio) {
		this.tipoServicio = tipoServicio;
	}

	public int getIdReserva() {
		return idReserva;
	}

	public void setIdReserva(int idReserva) {
		this.idReserva = idReserva;
	}

}


text:
package fr.jmini.asciidoctorj.converter.mockcode;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

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

import org.asciidoctor.ast.Table;
import org.junit.Test;

import fr.jmini.asciidoctorj.converter.code.CodeTestingUtility;

public class MockCodeGeneratorTableTest {

    @Test
    public void testTable() throws Exception {
        Table mockTable = createMock();

        MockCodeGenerator generator = new MockCodeGenerator();
        StringBuilder sb = new StringBuilder();
        generator.createTableCode(sb, mockTable);
        CodeTestingUtility.testGeneratedCode(sb.toString(), this.getClass());
    }

    // tag::generated-code[]
    public Table createMock() {
        Table mockTable1 = mock(Table.class);
        when(mockTable1.getId()).thenReturn(null);
        when(mockTable1.getNodeName()).thenReturn(null);
        when(mockTable1.getParent()).thenReturn(null);
        when(mockTable1.getContext()).thenReturn(null);
        when(mockTable1.getDocument()).thenReturn(null);
        when(mockTable1.isInline()).thenReturn(false);
        when(mockTable1.isBlock()).thenReturn(false);
        Map<String, Object> map1 = new HashMap<>();
        map1.put("colcount", 2L);
        map1.put("rowcount", 1L);
        map1.put("style", "table");
        map1.put("tablepcwidth", 100L);
        when(mockTable1.getAttributes()).thenReturn(map1);
        when(mockTable1.getRoles()).thenReturn(Collections.emptyList());
        when(mockTable1.isReftext()).thenReturn(false);
        when(mockTable1.getReftext()).thenReturn(null);
        when(mockTable1.getCaption()).thenReturn(null);
        when(mockTable1.getTitle()).thenReturn(null);
        when(mockTable1.getStyle()).thenReturn(null);
        when(mockTable1.getLevel()).thenReturn(0);
        when(mockTable1.getContentModel()).thenReturn(null);
        when(mockTable1.getSourceLocation()).thenReturn(null);
        when(mockTable1.getSubstitutions()).thenReturn(Collections.emptyList());
        when(mockTable1.getBlocks()).thenReturn(Collections.emptyList());
        when(mockTable1.hasHeaderOption()).thenReturn(true);
        when(mockTable1.getColumns()).thenReturn(Collections.emptyList());
        when(mockTable1.getHeader()).thenReturn(Collections.emptyList());
        when(mockTable1.getFooter()).thenReturn(Collections.emptyList());
        when(mockTable1.getBody()).thenReturn(Collections.emptyList());
        when(mockTable1.getFrame()).thenReturn("my-frame");
        when(mockTable1.getGrid()).thenReturn("my-grid");
        return mockTable1;
    }
    // end::generated-code[]
}


text:
package org.ops4j.pax.exam.spi.intern;

import static org.ops4j.pax.exam.Constants.PROBE_EXECUTABLE;
import static org.ops4j.pax.tinybundles.core.TinyBundles.bundle;
import static org.ops4j.pax.tinybundles.core.TinyBundles.withClassicBuilder;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

import org.ops4j.pax.exam.TestContainerException;
import org.ops4j.pax.exam.TestProbeBuilder;
import org.ops4j.pax.exam.TestProbeProvider;
import org.ops4j.pax.exam.spi.ContentCollector;
import org.ops4j.pax.tinybundles.core.TinyBundle;
import org.ops4j.store.Store;
import org.osgi.framework.Constants;

/**
 * Default implementation allows you to dynamically create a probe from current classpath.
 *
 * @author Toni Menzel
 * @since Dec 2, 2009
 */
public class TestProbeBuilderImpl implements TestProbeBuilder {

    private final List<Class<?>> anchors;
    private final Properties extraProperties;
    private final Set<String> ignorePackages = new HashSet<String>();
    private File tempDir;
    private final Store<InputStream> store;

    public TestProbeBuilderImpl(File tempDir, Store<InputStream> store) throws IOException {
        this.anchors = new ArrayList<Class<?>>();
        this.tempDir = tempDir;
        this.store = store;
        extraProperties = new Properties();
    }

    @Override
    public void addTest(Class<?> clazz) {
        addAnchor(clazz);
    }

    public TestProbeBuilder addAnchor(Class<?> clazz) {
        anchors.add(clazz);
        return this;
    }

    @Override
    public TestProbeBuilder setHeader(String key, String value) {
        extraProperties.put(key, value);
        return this;
    }

    // when your testclass contains clutter in non-test methods,
    // bnd generates too many impports.
    // This makes packages optional.
    @Override
    public TestProbeBuilder ignorePackageOf(Class<?>... classes) {
        for (Class<?> c : classes) {
            ignorePackages.add(c.getPackage().getName());
        }

        return this;
    }

    @Override
    public TestProbeProvider build() {
        try {
            TinyBundle bundle = prepareProbeBundle(createExtraIgnores());
            return new DefaultTestProbeProvider(store,
                store.store(bundle.build(withClassicBuilder())));

        }
        catch (IOException e) {
            throw new TestContainerException(e);
        }
    }

    private TinyBundle prepareProbeBundle(Properties p) throws IOException {
        TinyBundle bundle = bundle(store).set(Constants.DYNAMICIMPORT_PACKAGE, "*");

        bundle.set(PROBE_EXECUTABLE, "");
        bundle.set(Constants.BUNDLE_SYMBOLICNAME, "");
        bundle.set(Constants.BUNDLE_MANIFESTVERSION, "2");
        for (Object key : extraProperties.keySet()) {
            bundle.set((String) key, (String) extraProperties.get(key));
        }
        for (Object key : p.keySet()) {
            bundle.set((String) key, (String) p.get(key));
        }

        Map<String, URL> map = collectResources();
        for (String item : map.keySet()) {
            bundle.add(item, map.get(item));
        }
        return bundle;
    }

    private Map<String, URL> collectResources() throws IOException {
        ContentCollector collector = selectCollector();
        Map<String, URL> map = new HashMap<String, URL>();
        collector.collect(map);
        return map;
    }

    static String convertClassToPath(Class<?> c) {
        return c.getName().replace(".", File.separator) + ".class";
    }

    /**
     * @param clazz
     *            to find the root classes folder for.
     *
     * @return A File instance being the exact folder on disk or null, if it hasn't been found.
     *
     * @throws java.io.IOException
     *             if a problem occurs (method crawls folders on disk..)
     */
    public static File findClassesFolder(Class<?> clazz) throws IOException {
        ClassLoader classLoader = clazz.getClassLoader();
        String clazzPath = convertClassToPath(clazz);
        URL url = classLoader.getResource(clazzPath);
        if (url == null || !"file".equals(url.getProtocol())) {
            return null;
        }
        else {
            try {
                File file = new File(url.toURI());
                String fullPath = file.getCanonicalPath();
                String parentDirPath = fullPath
                    .substring(0, fullPath.length() - clazzPath.length());
                return new File(parentDirPath);
            }
            catch (URISyntaxException e) {
                // this should not happen as the uri was obtained from getResource
                throw new TestContainerException(e);
            }
        }
    }

    private ContentCollector selectCollector() throws IOException {
        File root = findClassesFolder(anchors.get(0));

        if (root != null) {
            return new CompositeCollector(new CollectFromBase(root), new CollectFromItems(anchors));
        }
        else {
            return new CollectFromItems(anchors);
        }
    }

    private Properties createExtraIgnores() {
        Properties properties = new Properties();
        StringBuilder sb = new StringBuilder();
        for (String p : ignorePackages) {
            if (sb.length() > 0) {
                sb.append(",");
            }
            sb.append(p);
        }
        properties.put("Ignore-Package", sb.toString());
        return properties;
    }

    @Override
    public File getTempDir() {
        return tempDir;
    }

    @Override
    public void setTempDir(File tempDir) {
        this.tempDir = tempDir;
    }
}


text:
<!--
Autor: Felipe Uriel Infante Martínez
Script que verifica el inicio de sesión, de no encontrarlo activo, envía a login.
Fecha: 27/06/16
-->

<?php
  session_start();
  if (isset($_SESSION['usuario_correo'])) {
    $correo = $_SESSION['usuario_correo'];
  } else {
    header('Location: ../../index.html');
  }
 ?>


text:
package sk.mmap;

public interface IAllocObject {
}