text:
@interface SQHoleAnimatedTransitioning : NSObject<UIViewControllerAnimatedTransitioning>

@property (nonatomic,assign) CGRect frame;

@end

redpajama_set_name: RedPajamaGithub


text:
<?php

	class Element {

		public $o_loaded_element_object;
		public $o_full_element_object;
		public $html_page;
		public $datastore;

		function __construct($o_element) {
			$this->o_loaded_element_object = $o_element;
			# set a reference to my oncology
			$this->datastore = new DataStore;
		}
		function _set_full_element($o_full_element){
			$this->o_full_element_object = array();
			foreach ($o_full_element as $key => $value) {
			    $this->o_full_element_object[$key] = $value;
			}
		}
/*
		function rebuild() {
			# render, and rebuild dependent items
		}
		*/

		/*
		function update() {
			# physical file storing of page; create new from render, or delete if unpublished

			$item_url = new ItemURL($this->o_loaded_item_object);

			if($this->o_loaded_item_object->published === "true")
			{
				# create any directories for the file if neccesary
				if($item_url->has_dirs()){
					# make dirs
					if(!file_exists(FLOT_CACHE_PATH.$item_url->dir_path()))
						mkdir(FLOT_CACHE_PATH.$item_url->dir_path());
				}

				# write the file itself
				$fu_FileUtility = new FileUtilities;
				if(!$fu_FileUtility->b_safely_write_file($item_url->writing_file_path(FLOT_CACHE_PATH), $this->html_page)){
					// writing failed, set published status to false
					$this->o_loaded_item_object->published = "false";
					$this->datastore->b_save_datastore("items");
				}

			}else{
				// the item is not marked as 'published' so we don't want it saved, or there to be a saved copy of the rendered webpage
				$this->delete();
			}
		}
		*/

		function render() {
			if($this->o_loaded_element_object->published === "false"){
				return '';
			}

			$template = urldecode($this->o_full_element_object['content_html']);

			//$template = preg_replace_callback("(\{{menu:(.*?)\}})is", "s_menu_replace", $template);

		    //$template = preg_replace($search, $replace, $template);

			# serve
			$this->html_page = $template;
			return $this->html_page;
		}

/*
		function save(){
			# re-render the page into internal memory
			$this->render();

			# persist the page to disk
			return $this->update();
		}
		*/

/*
		#
		# content generation
		#
		function make_header(){
			# spit out content type (settings? content type, or not to display)

			# keywords etc, generate if necessary

			# open graph stuff
		}
*/
		#
		# editing
		#
		function html_edit_form(){
			/*
			get the item id and oncology
			build the ui form based on oncology and retrieved item data
			*/

			$html_form = "";

			// get default item properties
			$s_id = urldecode($this->o_loaded_element_object->id);
			$s_title = urldecode($this->o_loaded_element_object->title);
			$b_published = urldecode($this->o_loaded_element_object->published);

			$s_value = urldecode($this->o_full_element_object['content_html']);

			$s_published_class = "";
			$s_unpublished_class = "";

			if($b_published === "true")
				$s_published_class = "disabled ";
			else
				$s_unpublished_class = "disabled ";

			# start button group
			$html_form .= '
';

			# end button group
			$html_form .= '
';

			# published toggle
			$html_form .= '
';
			$html_form .= ' save & publish';
			$html_form .= ' unpublish';
			$html_form .= '
';

			// delete button group
			$html_form .= '
';
			// delete
			$html_form .= ' delete';
			$html_form .= '
';

			$html_form .= '

';

			$html_form .= '
Elements can be made and edited in one place, but used throughout your site on multiple pages or put directly in the template. Copy paste the embed code below and flot will replace it with the entered content.
';

			$html_form .= '<form id="element_edit_form" role="form" method="post" action="index.php">';

			#
			# edit element
			#
			$html_form .= '
';

			# title
			$html_form .= '
';
			$html_form .= 'Title<input type="text" class="form-control" name="title" placeholder="page title" value="'.$s_title.'" id="item_edit_title">';
			$html_form .= '
';

			$html_form .= '
';

			//
			// oncology specific elements
			//

			$html_form .= '<textarea id="element_value" class="ckeditor" name="content_html">'.$s_value.'</textarea>
';

			// default types
			$html_form .= '
Embed
';
			$html_form .= '{{element:'.$s_id.'}}';

			$html_form .= '
';

			# hidden elements
			$html_form .= '<input id="published" type="hidden" name="published" value="'.$b_published .'">';
			$html_form .= '<input type="hidden" name="section" value="elements">';
			$html_form .= '<input type="hidden" name="element_id" value="'.$s_id.'">';

			# save
			$html_form .= '
';

			$html_form .= '<button type="submit" class="btn btn-success pull-right"> save</button>';
			$html_form .= '
';

			$html_form .= '</form>';

			$html_form .= '

			        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Select a picture to insert

			      	Click a file to select it, you can upload new files too. Once files are selected you can click "insert pictures" or choose a different picture size from the drop up menu on the same button.
';

				$o_FileBrowser = new FileBrowser("select");

				$html_form .= $o_FileBrowser->html_make_browser();

			$html_form .= '

			        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>

				        <button id="file_browser_insert_selected" onclick="insert_selected_pictures(\''.$this->datastore->settings->upload_dir.'\', \'medium\')" type="button" class="disabled btn btn-success">Insert picture(s)</button>
				        <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">

				          Toggle Dropdown
				        </button>

				        ';

				        foreach ($this->datastore->settings->thumb_sizes as $size) {
				        	$html_form .= '
datastore->settings->upload_dir.'\', \''.$size->name.'\');">'.$size->name.'
';
				        }
				        $html_form .= '
datastore->settings->upload_dir.'\', \'\');">original

';

			return $html_form;
		}
		function update_from_post(){
			$flot = new Flot();
			$ufUF = new UtilityFunctions;
			$flot->b_is_user_admin();

			$s_new_title = $ufUF->s_post_var("title", false);
			$s_new_value = $ufUF->s_post_var("content_html", false);

			# update date and set author
			$this->o_loaded_element_object->title = $s_new_title;
			$this->o_loaded_element_object->date_modified = date("d-m-Y");
			$this->o_loaded_element_object->author = $flot->s_current_user;
			$this->datastore->_set_element_data($this->o_loaded_element_object);
			$this->datastore->b_save_datastore("elements");

			$this->datastore->oa_individual_elements[$this->o_loaded_element_object->id] = array();

			$this->datastore->oa_individual_elements[$this->o_loaded_element_object->id]['content_html'] = $s_new_value;

			$this->_set_full_element($this->datastore->oa_individual_elements[$this->o_loaded_element_object->id]);

			// save full item, which we just edited directly
			$this->datastore->b_save_element($this->o_loaded_element_object->id);
		}
	}
?>


text:
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/*
    Created on : 01/10/2017, 16:26:13
    Author     : rafael
*/

.well-cusom {
  min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    margin-top: 20px;
    background-color: rgba(245,245,245,0.75);
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}


text:
from __future__ import print_function
import itertools
import os
import numpy as np
import sys
from datetime import date, datetime
from time import time

from .jpllib import SpiceKernel
from .timelib import Timescale, julian_date

today = date.today

try:
    from fcntl import LOCK_EX, LOCK_UN, lockf
except:
    lockf = None

try:
    from urllib.parse import urlparse
    from urllib.request import urlopen
except:
    from urlparse import urlparse
    from urllib2 import urlopen

def _filename_of(url):
    """Return the last path component of a url."""
    return urlparse(url).path.split('/')[-1]

class Loader(object):
    """Download files to a directory where Skyfield can use them.

    A default `Loader` that saves data files in the current working
    directory can be imported directly from the Skyfield API::

        from skyfield.api import load

    But users can also create a `Loader` of their own, if there is
    another directory they want data files saved to::

        from skyfield.api import Loader
        load = Loader('~/skyfield-data')

    If the ``verbose`` option is switched to ``False``, then no progress
    bar is printed to the screen each time a file is downloaded.

    """
    def __init__(self, directory, verbose=True):
        self.directory = directory
        self.urls = FILE_URLS
        self.verbose = verbose
        if not os.path.exists(self.directory):
            os.makedirs(directory)

    def path_of(self, filename):
        return os.path.join(self.directory, filename)

    def __call__(self, filename):
        """Open the given file, downloading it first if necessary."""
        url, parser = self.urls.get(filename, (None, None))
        if url is not None:
            # TODO: they should be able to turn download off
            expiration_date, data = parser(load(url, self.directory,
                                                verbose=self.verbose))
            if expiration_date < today():
                # TODO: just fail if they turn download off
                # TODO: unless they don't care about recency
                for n in itertools.count(1):
                    prefix, suffix = filename.rsplit('.', 1)
                    backup_name = '{0}.old{1}.{2}'.format(prefix, n, suffix)
                    if not os.path.exists(backup_name):
                        break
                os.rename(self.path_of(filename), self.path_of(backup_name))
                expiration_date, data = parser(load(url, self.directory,
                                                    verbose=self.verbose))
            return data
        return load(filename, self.directory, verbose=self.verbose)

    def timescale(self, delta_t=None):
        if delta_t is not None:
            # TODO: Can this use inf and -inf instead?
            delta_t_recent = np.array(((-1e99, 1e99), (delta_t, delta_t)))
        else:
            data = self('deltat.data')
            preds = self('deltat.preds')
            data_end_time = data[0, -1]
            i = np.searchsorted(preds[0], data_end_time, side='right')
            delta_t_recent = np.concatenate([data, preds[:,i:]], axis=1)
        leap_dates, leap_offsets = self('Leap_Second.dat')
        return Timescale(delta_t_recent, leap_dates, leap_offsets)

def parse_deltat_data(text):
    """Parse the United States Naval Observatory ``deltat.data`` file.

    Each line file gives the date and the value of Delta T::

    2016  2  1  68.1577

    This function returns a 2xN array of raw Julian dates and matching
    Delta T values.

    """
    array = np.loadtxt(text)
    year, month, day = array[-1,:3].astype(int)
    expiration_date = date(year + 1, month, day)
    year, month, day, delta_t = array.T
    data = np.array((julian_date(year, month, day), delta_t))
    return expiration_date, data

def parse_deltat_preds(text):
    """Parse the United States Naval Observatory ``deltat.preds`` file.

    Each line gives a floating point year, the value of Delta T, and one
    or two other fields::

    2015.75      67.97               0.210         0.02

    This function returns a 2xN array of raw Julian dates and matching
    Delta T values.

    """
    year_float, delta_t = np.loadtxt(text, skiprows=3, usecols=[0, 1]).T
    year = year_float.astype(int)
    month = 1 + (year_float * 12.0).astype(int) % 12
    expiration_date = date(year[0] + 1, month[0], 1)
    data = np.array((julian_date(year, month, 1), delta_t))
    return expiration_date, data

def parse_leap_seconds(text):
    """Parse the IERS file ``Leap_Second.dat``.

    The leap dates array can be searched with::

        index = np.searchsorted(leap_dates, jd, 'right')

    The resulting index allows (TAI - UTC) to be fetched with::

        offset = leap_offsets[index]

    """
    lines = iter(text)
    for line in lines:
        if line.startswith(b'#  File expires on'):
            break
    else:
        raise ValueError('Leap_Second.dat is missing its expiration date')
    line = line.decode('ascii')
    dt = datetime.strptime(line, '#  File expires on %d %B %Y\n')
    expiration_date = dt.date()
    mjd, day, month, year, offsets = np.loadtxt(lines).T
    leap_dates = np.ndarray(len(mjd) + 2)
    leap_dates[0] = '-inf'
    leap_dates[1:-1] = mjd + 2400000.5
    leap_dates[-1] = 'inf'
    leap_offsets = np.ndarray(len(mjd) + 2)
    leap_offsets[0] = leap_offsets[1] = offsets[0]
    leap_offsets[2:] = offsets
    return expiration_date, (leap_dates, leap_offsets)

def load(filename, directory='.', autodownload=True, verbose=True):
    """Load the given file, possibly downloading it if it is not present."""
    if '/' in filename:
        url = filename
        filename = url.split('/')[-1]
        cls = None
    elif filename.endswith('.bsp'):
        url = url_for(filename)
        cls = SpiceKernel
    else:
        raise ValueError('Skyfield does not recognize that file extension')
    if directory == '.':
        path = filename
    else:
        directory = os.path.expanduser(directory)
        path = os.path.join(directory, filename)
    if not os.path.exists(path):
        if not autodownload:
            raise IOError('you specified autodownload=False but the file'
                          ' does not exist: {0}'.format(path))
        download(url, path, verbose=verbose)
    return open(path, 'rb') if (cls is None) else cls(path)

def url_for(filename):
    """Given a recognized filename, return its URL."""
    if filename.endswith('.bsp'):
        if filename.startswith('de'):
            return 'ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/' + filename
        elif filename.startswith('jup'):
            return ('http://naif.jpl.nasa.gov/pub/naif/generic_kernels'
                    '/spk/satellites/' + filename)
    raise ValueError('Skyfield does not know where to download {!r} from'
                     .format(filename))

def download(url, path, verbose=None, blocksize=128*1024):
    """Download a file from a URL, possibly displaying a progress bar.

    Saves the output to the file named by `path`.  If the URL cannot be
    downloaded or the file cannot be written, an IOError is raised.

    Normally, if the standard error output is a terminal, then a
    progress bar is displayed to keep the user entertained.  Specify
    `verbose=True` or `verbose=False` to control this behavior.

    """
    tempname = path + '.download'
    try:
        connection = urlopen(url)
    except Exception as e:
        raise IOError('cannot get {0} because {1}'.format(url, e))
    if verbose is None:
        verbose = sys.stderr.isatty()
    if verbose:
        bar = ProgressBar(path)
        content_length = int(connection.headers.get('content-length', -1))

    # Python open() provides no way to achieve O_CREAT without also
    # truncating the file, which would ruin the work of another process
    # that is trying to download the same file at the same time.  So:

    flags = getattr(os, 'O_BINARY', 0) | os.O_CREAT | os.O_RDWR
    fd = os.open(tempname, flags)
    with os.fdopen(fd, 'wb') as w:
        try:
            if lockf is not None:
                fd = w.fileno()
                lockf(fd, LOCK_EX)           # only one download at a time
                if os.path.exists(path): # did someone else finish first?
                    if os.path.exists(tempname):
                        os.unlink(tempname)
                    return
            w.seek(0)
            length = 0
            while True:
                data = connection.read(blocksize)
                if not data:
                    break
                w.write(data)
                length += len(data)
                if verbose:
                    bar.report(length, content_length)
            w.flush()
            if lockf is not None:
                # On Unix, rename while still protected by the lock.
                try:
                    os.rename(tempname, path)
                except Exception as e:
                    raise IOError('error renaming {0} to {1} - {2}'.format(
                        tempname, path, e))
        except Exception as e:
            raise IOError('error getting {0} - {1}'.format(url, e))
        finally:
            if lockf is not None:
                lockf(fd, LOCK_UN)
    if lockf is None:
        # On Windows, rename here because the file needs to be closed first.
        try:
            os.rename(tempname, path)
        except Exception as e:
            raise IOError('error renaming {0} to {1} - {2}'.format(
                tempname, path, e))

class ProgressBar(object):
    def __init__(self, path):
        self.filename = os.path.basename(path)
        self.t0 = 0

    def report(self, bytes_so_far, bytes_total):
        if bytes_total < 0:
            return
        percent = 100 * bytes_so_far // bytes_total
        if (percent != 100) and (time() - self.t0 < 0.5):
            return
        self.t0 = time()
        bar = '#' * (percent // 3)
        print('\r[{0:33}] {1:3}% {2}'.format(bar, percent, self.filename),
              end='\n' if (percent == 100) else '', file=sys.stderr)
        sys.stderr.flush()

FILE_URLS = dict((_filename_of(url), (url, parser)) for url, parser in (
    ('http://maia.usno.navy.mil/ser7/deltat.data', parse_deltat_data),
    ('http://maia.usno.navy.mil/ser7/deltat.preds', parse_deltat_preds),
    ('https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat',
     parse_leap_seconds),
    ))


text:
bindall-standalone
==================

Allow to permanently mutate an object's method so it context `this` will always be bound to this object.

Allow to avoid the non-unbindable listeners registered via `emitter.on(foo, this.bar.bind(this));`.

## Installation
`npm install bindall-standalone --save`

Then just `var bindAll = require('bindall-standalone')`. Works with require() e.g. node.js, browserify or component(1).

## API
### `bindAll(object, *methods);`

Mutates all methods from `object`, passed as a list of strings (such as `'foo', 'bar'`) so they always will be called with the context bound to the `object`.

### `bindAll(object);`
Bind **ALL** methods available on the object.

## Usage

### Basic example

```
var bindAll = require('bindall-standalone');

var object = {
    foo: 10,
    bar: function() {
        return this.foo;
    }
};

object.bar(); // 10

var func = object.bar;
func(); // undefined

bindAll(object, 'bar');
var func = object.bar;
func(); // 10
```

### Real-world example

```
var bindAll = require('bindall-standalone');

var Foo = function() {
    bindAll(this, 'onReady');

    // mediator.on('ready', this.onReady.bind(this)); // Never going to be unbinded !
    mediator.on('ready', this.onReady); // No need for explicit 'bind' now !
};

Foo.prototype.onReady = function() {
    // mediator.off('ready', this.onReady.bind(this)); // That is sad, bro
    mediator.off('ready', this.onReady); // Properly unbinded !
};

```

## What is this
It used to be a standalone version of underscore's `_.bindAll()` function for IE9+ browsers.
But since bindAll goal is to provide a quick way to bind/unbind methods, and only that, I updated it to use a quicker, more compatible `bind` function.

See the [underscore source](http://underscorejs.org/docs/underscore.html) for reference.

Basically, it avoids this use case:

```
mediator.on('foo', this.bar.bind(this));
mediator.off('foo', this.bar.bind(this));
// will never be unbinded because this.bar.bind(this) != this.bar.bind(this)
```

## Under the hood
Since bindAll's only goal is to bind a method to its object context, the bind function can be written as:

```
function bind(func, context) {
  return function() {
    return func.apply(context, arguments);
  };
}
```

No need for the modern `bind` function, no need for a polyfill.
And it's a lot faster ! Check this [jsPerf case](http://jsperf.com/native-bind-vs-fast-bind).

## Caveats
There is one significant thing to know: by binding a method on it's object context, it creates an instance-level method.
Check this [article](http://freshbrewedcode.com/jimcowart/2013/02/12/getting-into-context-binds/) and this [fiddle](http://jsfiddle.net/ayamflow/8WKvU/) for more info.


text:
package ch.frostnova.app.util;

import java.util.Map;

public final class StringUtil {

    private StringUtil(){
    }

    /**
     * Replace all placeholders (format: ${key})in a given string with replacements in the provided map (key/replace-with)-
     * @param s input string
     * @param replacements replacements
     * @return resulting string
     */
    public static String replaceAll(String s, final Map<String, String> replacements) {
        if (s == null || replacements==null) {
            return s;
        }
        for (final String key : replacements.keySet()) {
            s = s.replace("${" + key + "}", replacements.get(key));
        }
        return s;
    }
}


text:
require_dependency "renalware/pd"

module Renalware
  module PD
    class RegimesController < BaseController
      include Renalware::Concerns::PatientCasting
      include Renalware::Concerns::PatientVisibility
      include Renalware::Concerns::Pageable

      def index
        regimes = regime_type_class
          .for_patient(pd_patient)
          .with_bags
          .ordered
          .page(page).per(per_page)

        authorize regimes

        render locals: {
          patient: pd_patient,
          regimes: regimes,
          pd_type_string: pd_type_string
        }
      end

      def capd_regimes
        @capd_regimes ||= CAPDRegime.for_patient(pd_patient).with_bags.ordered.page(1).per(5)
      end

      def apd_regimes
        @apd_regimes ||= APDRegime.for_patient(pd_patient).with_bags.ordered.page(1).per(5)
      end

      def new
        regime = cloned_last_known_regime_of_type || pd_patient.pd_regimes.new(type: regime_type)
        authorize regime
        render_new(regime)
      end

      def create
        authorize Regime, :create?
        result = CreateRegime.new(patient: pd_patient)
                             .call(by: current_user, params: pd_regime_params)

        if result.success?
          redirect_to patient_pd_dashboard_path(pd_patient), notice: success_msg_for("PD regime")
        else
          flash.now[:error] = failed_msg_for("PD Regime")
          render_new(result.object)
        end
      end

      def edit
        render_edit(pd_regime)
      end

      def update
        result = ReviseRegime.new(pd_regime).call(by: current_user, params: pd_regime_params)

        if result.success?
          redirect_to patient_pd_dashboard_path(pd_patient),
                      notice: success_msg_for("PD regime")
        else
          flash.now[:error] = failed_msg_for("PD regime")
          render_edit(result.object)
        end
      end

      def show
        render :show, locals: {
          regime: pd_regime,
          patient: pd_patient
        }
      end

      private

      def render_edit(regime)
        render :edit, locals: { regime: regime, patient: pd_patient }
      end

      def render_new(regime)
        render :new, locals: { regime: regime, patient: pd_patient }
      end

      def regime_type
        params[:type] ? "Renalware::#{params[:type]}" : nil
      end

      def regime_type_class
        @regime_type_class ||= regime_type.constantize
      end

      def pd_type_string
        regime_type_class.new.pd_type.upcase # CAPD or APD
      end

      def cloned_last_known_regime_of_type
        regime = patient.pd_regimes
                        .order(start_date: :desc, created_at: :desc)
                        .where(type: regime_type).first
        regime&.start_date = Time.zone.today
        regime&.deep_dup
      end

      def pd_regime_params
        params.require(:pd_regime).permit(
          :start_date, :end_date, :treatment, :assistance_type, :type,
          :add_hd, :tidal_full_drain_every_three_cycles,
          :tidal_indicator, :tidal_percentage, :no_cycles_per_apd,
          :apd_machine_pac, :dwell_time, :therapy_time, :fill_volume, :delivery_interval,
          :system_id, :last_fill_volume, :additional_manual_exchange_volume,
          :exchanges_done_by, :exchanges_done_by_if_other, :exchanges_done_by_notes,
          bags_attributes: [
            :id, :regime_id, :bag_type_id, :volume, :role, :capd_overnight_bag, :per_week,
            :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday, :_destroy
          ]
        )
      end

      def pd_regime
        @pd_regime ||= Regime.find(params[:id]).tap { |reg| authorize reg }
      end
    end
  end
end


text:
<!--

This is a simple code demonstrating how to run an animation in HTML5.

The MIT License (MIT)

Copyright (c) 2016

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Animation</title>
<style>
/* Make sure we span the full viewport within the browser window */
*      { width:100%; height:100%; margin:0; padding:0; }
/* Prevent the scrollbars from appearing */
canvas { display:block; }
</style>
</head>
<body>
<canvas id="gfx" width="100%" height="100%"/>
<script type="text/javascript" src="ua.js"></script>
<script type="text/javascript">
// This will draw a frame of the animation with a dot spinning along an ellipse.
// The dot will make a full spin in one second.
function frame(){
  // Get the nadle on the HTML5 canvas element
  var canvas = document.getElementById("gfx");
  // Check if HTML5 2D graphics is supported
  if(canvas.getContext){
     // Get the 2D graphics context
     var gfx = canvas.getContext("2d");
     // Make sure we've got the same width for the window & HTML5 canvas
     var width  = gfx.canvas.width  = window.innerWidth;
     var height = gfx.canvas.height = window.innerHeight;
     // Clear screen
     gfx.clearRect(0, 0, width, height);
     // Make the position depending on the moment within one second
     var now = new Date().getTime() % 1000;
     // Turn that time moment into an angle
     var angle = 2 * Math.PI * now / 1000.0;
     // Drow the dot
     gfx.arc(
       (1 + Math.sin(angle)) * width / 2,  // Calculate dot's X position
       (1 + Math.cos(angle)) * height / 2, // Calculate dot's Y position
       20,                                 // Radius of the dot
       0,                                  // Start angle
       2 * Math.PI,                        // Stop angle (full angle)
       false                               // Clockwise
     );
     // Fill the dot
     gfx.fill();
  }
}
// Trigger the animation with help of the animating script included earlier
uaAnimate(frame);
</script>
</body>
</html>


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>on_checkout (ActiveRecord::ConnectionAdapters::JdbcAdapter::ConnectionPoolCallbacks)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" />

# File lib/active_record/connection_adapters/jdbc_adapter.rb, line 443
        def on_checkout
          # default implementation does nothing
        end


text:
namespace google {
namespace protobuf {
  namespace io {
    class Printer;             // printer.h
  }
}

namespace protobuf {
namespace compiler {
namespace cpp {

class EnumGenerator;           // enum.h
class ExtensionGenerator;      // extension.h

class MessageGenerator {
 public:
  // See generator.cc for the meaning of dllexport_decl.
  MessageGenerator(const Descriptor* descriptor, int index_in_file_messages,
                   const Options& options, SCCAnalyzer* scc_analyzer);
  ~MessageGenerator();

  // Append the two types of nested generators to the corresponding vector.
  void AddGenerators(std::vector<EnumGenerator*>* enum_generators,
                     std::vector<ExtensionGenerator*>* extension_generators);

  // Header stuff.

  // Return names for forward declarations of this class and all its nested
  // types. A given key in {class,enum}_names will map from a class name to the
  // descriptor that was responsible for its inclusion in the map. This can be
  // used to associate the descriptor with the code generated for it.
  void FillMessageForwardDeclarations(
      std::map<string, const Descriptor*>* class_names);

  // Generate definitions for this class and all its nested types.
  void GenerateClassDefinition(io::Printer* printer);

  // Generate definitions of inline methods (placed at the end of the header
  // file).
  void GenerateInlineMethods(io::Printer* printer);

  // Source file stuff.

  // Generate extra fields
  void GenerateExtraDefaultFields(io::Printer* printer);

  // Generates code that creates default instances for fields.
  void GenerateFieldDefaultInstances(io::Printer* printer);

  // Generates code that initializes the message's default instance.  This
  // is separate from allocating because all default instances must be
  // allocated before any can be initialized.
  void GenerateDefaultInstanceInitializer(io::Printer* printer);

  // Generate all non-inline methods for this class.
  void GenerateClassMethods(io::Printer* printer);

  // Generate source file code that should go outside any namespace.
  void GenerateSourceInProto2Namespace(io::Printer* printer);

 private:
  // Generate declarations and definitions of accessors for fields.
  void GenerateFieldAccessorDeclarations(io::Printer* printer);
  void GenerateFieldAccessorDefinitions(io::Printer* printer);

  // Generate the table-driven parsing array.  Returns the number of entries
  // generated.
  size_t GenerateParseOffsets(io::Printer* printer);
  size_t GenerateParseAuxTable(io::Printer* printer);
  // Generates a ParseTable entry.  Returns whether the proto uses table-driven
  // parsing.
  bool GenerateParseTable(io::Printer* printer, size_t offset,
                          size_t aux_offset);

  // Generate the field offsets array.  Returns the a pair of the total numer
  // of entries generated and the index of the first has_bit entry.
  std::pair<size_t, size_t> GenerateOffsets(io::Printer* printer);
  void GenerateSchema(io::Printer* printer, int offset, int has_offset);
  // For each field generates a table entry describing the field for the
  // table driven serializer.
  int GenerateFieldMetadata(io::Printer* printer);

  // Generate constructors and destructor.
  void GenerateStructors(io::Printer* printer);

  // The compiler typically generates multiple copies of each constructor and
  // destructor: http://gcc.gnu.org/bugs.html#nonbugs_cxx
  // Placing common code in a separate method reduces the generated code size.
  //
  // Generate the shared constructor code.
  void GenerateSharedConstructorCode(io::Printer* printer);
  // Generate the shared destructor code.
  void GenerateSharedDestructorCode(io::Printer* printer);
  // Generate the arena-specific destructor code.
  void GenerateArenaDestructorCode(io::Printer* printer);

  // Helper for GenerateClear and others.  Optionally emits a condition that
  // assumes the existence of the cached_has_bits variable, and returns true if
  // the condition was printed.
  bool MaybeGenerateOptionalFieldCondition(io::Printer* printer,
                                           const FieldDescriptor* field,
                                           int expected_has_bits_index);

  // Generate standard Message methods.
  void GenerateClear(io::Printer* printer);
  void GenerateOneofClear(io::Printer* printer);
  void GenerateMergeFromCodedStream(io::Printer* printer);
  void GenerateSerializeWithCachedSizes(io::Printer* printer);
  void GenerateSerializeWithCachedSizesToArray(io::Printer* printer);
  void GenerateSerializeWithCachedSizesBody(io::Printer* printer,
                                            bool to_array);
  void GenerateByteSize(io::Printer* printer);
  void GenerateMergeFrom(io::Printer* printer);
  void GenerateCopyFrom(io::Printer* printer);
  void GenerateSwap(io::Printer* printer);
  void GenerateIsInitialized(io::Printer* printer);

  // Helpers for GenerateSerializeWithCachedSizes().
  //
  // cached_has_bit_index maintains that:
  //   cached_has_bits = _has_bits_[cached_has_bit_index]
  // for cached_has_bit_index >= 0
  void GenerateSerializeOneField(io::Printer* printer,
                                 const FieldDescriptor* field,
                                 bool unbounded,
                                 int cached_has_bits_index);
  // Generate a switch statement to serialize 2+ fields from the same oneof.
  // Or, if fields.size() == 1, just call GenerateSerializeOneField().
  void GenerateSerializeOneofFields(
      io::Printer* printer, const std::vector<const FieldDescriptor*>& fields,
      bool to_array);
  void GenerateSerializeOneExtensionRange(
      io::Printer* printer, const Descriptor::ExtensionRange* range,
      bool unbounded);

  // Generates has_foo() functions and variables for singular field has-bits.
  void GenerateSingularFieldHasBits(const FieldDescriptor* field,
                                    std::map<string, string> vars,
                                    io::Printer* printer);
  // Generates has_foo() functions and variables for oneof field has-bits.
  void GenerateOneofHasBits(io::Printer* printer);
  // Generates has_foo_bar() functions for oneof members.
  void GenerateOneofMemberHasBits(const FieldDescriptor* field,
                                  const std::map<string, string>& vars,
                                  io::Printer* printer);
  // Generates the clear_foo() method for a field.
  void GenerateFieldClear(const FieldDescriptor* field,
                          const std::map<string, string>& vars,
                          bool is_inline,
                          io::Printer* printer);

  void GenerateConstructorBody(io::Printer* printer,
                               std::vector<bool> already_processed,
                               bool copy_constructor) const;

  size_t HasBitsSize() const;
  std::vector<uint32> RequiredFieldsBitMask() const;

  const Descriptor* descriptor_;
  int index_in_file_messages_;
  string classname_;
  Options options_;
  FieldGeneratorMap field_generators_;
  // optimized_order_ is the order we layout the message's fields in the class.
  // This is reused to initialize the fields in-order for cache efficiency.
  //
  // optimized_order_ excludes oneof fields and weak fields.
  std::vector<const FieldDescriptor *> optimized_order_;
  std::vector<int> has_bit_indices_;
  int max_has_bit_index_;
  std::unique_ptr<std::unique_ptr<EnumGenerator> []> enum_generators_;
  std::unique_ptr<std::unique_ptr<ExtensionGenerator> []> extension_generators_;
  int num_required_fields_;
  int num_weak_fields_;
  // table_driven_ indicates the generated message uses table-driven parsing.
  bool table_driven_;

  std::unique_ptr<MessageLayoutHelper> message_layout_helper_;

  SCCAnalyzer* scc_analyzer_;
  string scc_name_;

  friend class FileGenerator;
  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
};

}  // namespace cpp
}  // namespace compiler
}  // namespace protobuf

}  // namespace google
#endif  // GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_H__


text:
describe("Seven Inch", function(){
  var mobile;
  var userAgent;

  beforeEach(function() {
    mobile    = null;
    userAgent = null;
  });

  describe("Nexus 7", function() {

    beforeEach(function() {
      userAgent = "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19";
      mobile = new isMobile.Class(userAgent);
    });

    it("should be a Seven Inch device", function() {
      expect(mobile.seven_inch).toBe(true);
    });

    it("should not be an Apple device", function() {
      expect(mobile.apple.device).not.toBe(true);
    });

    it("should be a mobile device", function() {
      expect(mobile.any).toBe(true);
    });

  });

});


text:
import React, { Component } from "react";
import "./App.css";

import Shartan from "./Shartan";
import { SettGenerator } from "./SettGenerator";
import { ColorMap } from "./ColorMap";
import { SettInterpolator } from "./SettInterpolator";
import { Sett } from "./Sett";
import { easeCubicInOut } from "d3-ease";
import {
  FacebookShareButton,
  LinkedinShareButton,
  TwitterShareButton,
  WhatsappShareButton,
  PinterestShareButton
} from "react-share";
import {
  FacebookIcon,
  TwitterIcon,
  WhatsappIcon,
  LinkedinIcon,
  PinterestIcon
} from "react-share";

class App extends Component {
  constructor() {
    super();

    const colorMap = new ColorMap();
    this.settGen = new SettGenerator(colorMap);
    this.settInterp = new SettInterpolator(colorMap);
    const sett = this.settGen.settFrom(`${new Date().toISOString()}`);

    this.handleSettChange = this.handleSettChange.bind(this);
    this.handleShartanClick = this.handleShartanClick.bind(this);

    this.state = {
      sett: sett.toString(),
      share: {
        title: "Sham Tartan",
        description:
          "A Sham (pretend, unofficial) Tartan from http://shartan.houseofmoran.com/",
        url: "http://shartan.houseofmoran.com/",
        preview: "http://shartan.houseofmoran.com/preview.png",
        media: "http://shartan.houseofmoran.com/preview.png"
      }
    };
  }

  handleSettChange(event) {
    this.setState({ sett: event.target.value });
  }

  handleShartanClick() {
    const startDate = new Date();
    const transitionDuration = 1 * 1000;
    const targetDate = new Date();
    targetDate.setTime(startDate.getTime() + transitionDuration);
    const target = this.settGen.settFrom(`${targetDate.toISOString()}`);

    const transitionFn = this.settInterp.asFunction(
      Sett.parse(this.state.sett),
      target
    );
    const ease = easeCubicInOut;

    const updateStateFn = () => {
      const currentDate = new Date();
      if (currentDate < targetDate) {
        const t =
          (currentDate.getTime() - startDate.getTime()) / transitionDuration;
        this.setState({
          sett: transitionFn(ease(t)).toString()
        });
        requestAnimationFrame(updateStateFn);
      } else {
        this.setState({
          sett: transitionFn(1.0).toString()
        });
      }
    };
    updateStateFn();
  }

  render() {
    return (

        <Shartan
          sett={this.state.sett}
          width={400}
          onClick={this.handleShartanClick}
        />
        <input
          style={{ position: "absolute", top: 10, left: 10, zIndex: 1 }}
          type="text"
          value={this.state.sett}
          onChange={this.handleSettChange}
        />

          <FacebookShareButton {...this.state.share}>
            <FacebookIcon size={32} round={true} />
          </FacebookShareButton>
          <TwitterShareButton {...this.state.share}>
            <TwitterIcon size={32} round={true} />
          </TwitterShareButton>
          <PinterestShareButton {...this.state.share}>
            <PinterestIcon size={32} round={true} />
          </PinterestShareButton>
          <WhatsappShareButton {...this.state.share}>
            <WhatsappIcon size={32} round={true} />
          </WhatsappShareButton>
          <LinkedinShareButton {...this.state.share}>
            <LinkedinIcon size={32} round={true} />
          </LinkedinShareButton>

    );
  }
}

export default App;


text:
//-----------------------------------------------------------------------
// <copyright file="ScriptPresenter.cs" company="none">
// Copyright (c) kenny-nelson All Rights Reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Dodai.Bridges
{
    using System;
    using System.Diagnostics.Contracts;
    using Dodai.Services;

    /// <summary>
    /// スクリプトプレゼンタークラスです。
    /// </summary>
    public sealed class ScriptPresenter : Presenter, IScriptPresenter
    {
        private readonly ScriptBridge scriptBridge;
        private readonly Script script;

        /// <summary>
        /// コンストラクタです。
        /// </summary>
        /// <param name="scriptBridge">使用するスクリプトブリッジを渡します。</param>
        public ScriptPresenter(ScriptBridge scriptBridge)
            : base(Enum.GetName(typeof(PresenterKind), PresenterKind.Script))
        {
            Contract.Assume(scriptBridge != null);
            this.scriptBridge = scriptBridge;
            this.script = new Script();
            this.scriptBridge.SetScript(this.script);
        }

        internal ScriptBridge Bridge
        {
            get
            {
                return this.scriptBridge;
            }
        }

        internal Script Script
        {
            get
            {
                return this.script;
            }
        }

        /// <summary>
        /// 文字列からスクリプトを実行します。
        /// </summary>
        /// <param name="expression">実行するスクリプト式です。</param>
        /// <returns>実行成功ならば真を返します。</returns>
        public bool ExecuteFromString(string expression)
        {
            this.script.Logger.Clear();
            return this.scriptBridge.Execute(expression);
        }

        /// <summary>
        /// ファイルからスクリプトを実行します。
        /// </summary>
        /// <param name="fileName">実行するファイル名です。</param>
        /// <returns>実行成功ならば真を返します。</returns>
        public bool ExecuteFromFile(string fileName)
        {
            this.script.Logger.Clear();
            return this.scriptBridge.ExecuteFromFile(fileName);
        }

        /// <summary>
        /// 廃棄します。内部処理
        /// </summary>
        protected override void DisposeInternal()
        {
        }
    }
}


text:
import pyaf.ForecastEngine as autof
import pyaf.Bench.TS_datasets as tsds

import pyaf.Bench.GenericBenchmark as tBench
import warnings

#%matplotlib inline

tester1 = tBench.cGeneric_Tester(tsds.load_MWH_datsets() , "MWH_BENCH");
with warnings.catch_warnings():
    warnings.simplefilter("error")
    # tester1.testSignals('plastics')
    # tester1.testAllSignals()
    tester1.run_multiprocessed();


text:
/// <reference path="../typings/EightBittr.d.ts" />

import { Scrollability } from "./Constants";
import { FullScreenPokemon } from "./FullScreenPokemon";
import { ICharacter, IGrass, IPlayer, IThing } from "./IFullScreenPokemon";

/**
 * Maintenance functions used by FullScreenPokemon instances.
 */
export class Maintenance<TEightBittr extends FullScreenPokemon> extends EightBittr.Component<TEightBittr> {
    /**
     * Generic maintenance Function for a group of Things. For each Thing, if
     * it isn't alive, it's removed from the group.
     *
     * @param things   A group of Things to maintain.
     */
    public maintainGeneric(things: IThing[]): void {
        for (let i: number = 0; i < things.length; i += 1) {
            if (!things[i].alive) {
                this.EightBitter.utilities.arrayDeleteThing(things[i], things, i);
                i -= 1;
            }
        }
    }

    /**
     * Maintenance for all active Characters. Walking, grass maintenance, alive
     * checking, and quadrant maintenance are performed.
     *
     * @param characters   The Characters group of Things.
     */
    public maintainCharacters(characters: ICharacter[]): void {
        for (let i: number = 0; i < characters.length; i += 1) {
            const character: ICharacter = characters[i];
            this.EightBitter.physics.shiftCharacter(character);

            if (character.shouldWalk && !this.EightBitter.MenuGrapher.getActiveMenu()) {
                character.onWalkingStart(character, character.direction);
                character.shouldWalk = false;
            }

            if (character.grass) {
                this.maintainCharacterGrass(character, character.grass);
            }

            if (!character.alive && !character.outerOk) {
                this.EightBitter.utilities.arrayDeleteThing(character, characters, i);
                i -= 1;
                continue;
            }

            for (let j: number = 0; j < 4; j += 1) {
                character.bordering[j] = undefined;
            }

            this.EightBitter.QuadsKeeper.determineThingQuadrants(character);
            this.EightBitter.ThingHitter.checkHitsForThing(character as any);
        }
    }

    /**
     * Maintenance for a Character visually in grass. The shadow is updated to
     * move or be deleted as needed.
     *
     * @param thing   A Character in grass.
     * @param other   Grass that thing is in.
     */
    public maintainCharacterGrass(thing: ICharacter, other: IGrass): void {
        // If thing is no longer in grass, delete the shadow and stop
        if (!this.EightBitter.physics.isThingWithinGrass(thing, other)) {
            this.EightBitter.physics.killNormal(thing.shadow);
            thing.canvas.height = thing.height * this.EightBitter.unitsize;
            this.EightBitter.PixelDrawer.setThingSprite(thing);

            delete thing.shadow;
            delete thing.grass;
            return;
        }

        // Keep the shadow in sync with thing in position and visuals.
        this.EightBitter.physics.setLeft(thing.shadow, thing.left);
        this.EightBitter.physics.setTop(thing.shadow, thing.top);

        if (thing.shadow.className !== thing.className) {
            this.EightBitter.graphics.setClass(thing.shadow, thing.className);
        }
    }

    /**
     * Maintenance for a Player. The screen is scrolled according to the global
     * MapScreener.scrollability.
     *
     * @param player   An in-game Player Thing.
     */
    public maintainPlayer(player: IPlayer): void {
        if (!player || !player.alive) {
            return;
        }

        switch (this.EightBitter.MapScreener.variables.scrollability) {
            case Scrollability.Horizontal:
                this.EightBitter.scrolling.scrollWindow(this.EightBitter.scrolling.getHorizontalScrollAmount());
                return;

            case Scrollability.Vertical:
                this.EightBitter.scrolling.scrollWindow(0, this.EightBitter.scrolling.getVerticalScrollAmount());
                return;

            case Scrollability.Both:
                this.EightBitter.scrolling.scrollWindow(
                    this.EightBitter.scrolling.getHorizontalScrollAmount(),
                    this.EightBitter.scrolling.getVerticalScrollAmount());
                return;

            default:
                return;
        }
    }
}


text:
package view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTabbedPane;
import java.awt.Component;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.border.LineBorder;
import java.awt.Color;
import org.eclipse.wb.swing.FocusTraversalOnArray;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;

public class TelaBalconista extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	private JTable table;
	private JTextField textField_1;
	private JTable table_1;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelaBalconista frame = new TelaBalconista();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public TelaBalconista() {
		setTitle("Balconista");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 800, 600);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		setResizable(false);

		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(5, 5, 774, 551);
		contentPane.add(tabbedPane);

		JPanel panel = new JPanel();
		tabbedPane.addTab("Busca de cliente", null, panel, null);
		panel.setLayout(null);

		JLabel lblNome = new JLabel("Nome: ");
		lblNome.setBounds(206, 9, 50, 14);
		panel.add(lblNome);

		textField = new JTextField();
		textField.setBounds(266, 6, 206, 20);
		panel.add(textField);
		textField.setColumns(25);

		JButton btnBuscar = new JButton("Buscar");
		btnBuscar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				//Obtém o nome do cliente do textField e pesquisa no banco.
				//Joga os valores obtidos na tabela
			}
		});
		btnBuscar.setBounds(482, 5, 80, 23);
		panel.add(btnBuscar);

		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
		scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		scrollPane.setBounds(10, 57, 750, 400);
		panel.add(scrollPane);

		table = new JTable(){
			public boolean isCellEditable(int row, int column){
		        return false;
		      }
		};
		scrollPane.setViewportView(table);
		table.setBorder(null);
		table.setModel(new DefaultTableModel(
			new Object[][] {
				},
			new String[] {
				"C\u00F3digoCliente", "Nome", "Endere\u00E7o", "Telefone", "E-mail"
			}
		));
		table.getColumnModel().getColumn(0).setPreferredWidth(100);
		table.getColumnModel().getColumn(1).setPreferredWidth(200);
		table.getColumnModel().getColumn(2).setPreferredWidth(150);
		table.getColumnModel().getColumn(3).setPreferredWidth(150);
		table.getColumnModel().getColumn(4).setPreferredWidth(150);

		JButton btnSelecionarCliente = new JButton("Selecionar Cliente");
		btnSelecionarCliente.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				//Vendas.cliente recebe o cliente selecionado
			}
		});
		btnSelecionarCliente.setBounds(300, 477, 140, 23);
		panel.add(btnSelecionarCliente);

		JButton btnCadastrarCliente = new JButton("Cadastrar Cliente");
		btnCadastrarCliente.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				new CadastroCliente();
				CadastroCliente.main(null);
			}
		});
		btnCadastrarCliente.setBounds(620, 5, 140, 23);
		panel.add(btnCadastrarCliente);

		JPanel panel_1 = new JPanel();
		tabbedPane.addTab("Busca de produto", null, panel_1, null);
		panel_1.setLayout(null);

		JLabel label = new JLabel("Nome: ");
		label.setBounds(206, 9, 50, 14);
		panel_1.add(label);

		textField_1 = new JTextField();
		textField_1.setBounds(266, 6, 206, 20);
		textField_1.setColumns(25);
		panel_1.add(textField_1);

		JButton button = new JButton("Buscar");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				//Obtém o nome do produto do textField e pesquisa no banco.
				//Joga os valores obtidos na tabela
			}
		});
		button.setBounds(482, 5, 80, 23);
		panel_1.add(button);

		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
		scrollPane_1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		scrollPane_1.setBounds(10, 57, 749, 400);
		panel_1.add(scrollPane_1);

		table_1 = new JTable(){
			public boolean isCellEditable(int row, int column){
		        return false;
		      }
		};
		scrollPane_1.setViewportView(table_1);
		table_1.setModel(new DefaultTableModel(
			new Object[][] {},
			new String[] {
				"C\u00F3digo", "Nome", "Marca", "Valor", "Descri\u00E7\u00E3o"
			}
		));
		table_1.getColumnModel().getColumn(0).setPreferredWidth(120);
		table_1.getColumnModel().getColumn(1).setPreferredWidth(150);
		table_1.getColumnModel().getColumn(2).setPreferredWidth(150);
		table_1.getColumnModel().getColumn(3).setPreferredWidth(100);
		table_1.getColumnModel().getColumn(4).setPreferredWidth(200);
		table_1.setBorder(null);

		JButton button_1 = new JButton("Adicionar ao pedido");
		button_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				//Instancia um novo item de pedido do produto selecionado e adiciona à lista em Vendas
			}
		});
		button_1.setBounds(222, 478, 195, 23);
		panel_1.add(button_1);

		JButton btnFinalizarPedido = new JButton("Finalizar pedido");
		btnFinalizarPedido.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				//Finaliza o objeto Vendas e prepara para uso pelo caixa
			}
		});
		btnFinalizarPedido.setBounds(558, 478, 145, 23);
		panel_1.add(btnFinalizarPedido);

	}
}