text:
<?php

namespace Spiral\Documenters\ODM;

use Psr\Http\Message\ServerRequestInterface;
use Spiral\Documenters\Documenter;
use Spiral\Documenters\Exceptions\DocumenterException;
use Spiral\Documenters\VirtualDocumenter;
use Spiral\Files\FilesInterface;
use Spiral\Models\Reflections\ReflectionEntity;
use Spiral\ODM\Document;
use Spiral\ODM\Entities\Collection;
use Spiral\ODM\Entities\Compositor;
use Spiral\ODM\Entities\DocumentCursor;
use Spiral\ODM\Entities\SchemaBuilder;
use Spiral\ODM\Entities\Schemas\DocumentSchema;
use Spiral\ODM\Exceptions\CompositorException;
use Spiral\ODM\Exceptions\DefinitionException;
use Spiral\ODM\Exceptions\ODMException;
use Spiral\ODM\ODM;
use Spiral\Pagination\Exceptions\PaginationException;
use Spiral\Reactor\AbstractElement;
use Spiral\Reactor\ClassElement;

/**
 * Generate virtual documentation for ODM classes. Works just fine in PHPStorm.
 */
class ODMStormDocumenter extends VirtualDocumenter
{
    /**
     * @var SchemaBuilder
     */
    protected $builder = null;

    /**
     * @param Documenter     $documenter
     * @param FilesInterface $files
     * @param SchemaBuilder  $builder
     */
    public function __construct(
        Documenter $documenter,
        FilesInterface $files,
        SchemaBuilder $builder
    ) {
        parent::__construct($documenter, $files);
        $this->builder = $builder;
    }

    /**
     * Generates virtual documentation based on provided schema.
     */
    public function document()
    {
        foreach ($this->builder->getDocuments() as $document) {
            if ($document->isAbstract()) {
                continue;
            }

            //Render class and put it under entity name
            $this->addClass(
                $this->renderEntity($document), $document->getNamespaceName()
            );
        }

        //Let's add some uses to virtual namespace
        if (!empty($this->namespaces[$this->documenter->config()['namespace']])) {
            $namespace = $this->namespaces[$this->documenter->config()['namespace']];

            //Required uses
            $namespace->setUses([
                DocumentCursor::class,
                CompositorException::class,
                DefinitionException::class,
                ODMException::class,
                ServerRequestInterface::class,
                PaginationException::class
            ]);
        }
    }

    /**
     * {@inheritdoc}
     */
    protected function renderEntity(ReflectionEntity $entity)
    {
        if (!$entity instanceof DocumentSchema) {
            throw new DocumenterException("Unsupported entity type.");
        }

        $element = parent::renderEntity($entity);

        //Invalid methods
        if (!empty($entity->getFields()['_id'])) {
            $element->property('_id', '\\MongoId')->setAccess(AbstractElement::ACCESS_PUBLIC);
        }

        //Element Document must have defined create method
        $element->method(
            'create',
            ['@param array|\Traversable $fields', '@return ' . $entity->getShortName()],
            ['fields']
        )->setStatic(true)->parameter('fields')->setOptional(true, []);

        //Document has collection, let's clarify static methods
        if (!empty($entity->getCollection())) {
            $parent = $entity->getName();
            $return = $entity->getShortName();
            if ($entity->getParent(true) != $entity) {
                //Document parent (related to same collection)
                $parent = $entity->getParent(true)->getName();
                $return = $entity->getShortName() . '|\\' . $parent;
            }

            $find = $this->helper('collection', $parent)
                . '|' . $this->helper('cursor', $parent)
                . '|\\' . $parent . '[]';

            //Static collection methods
            $element->method(
                'find',
                [
                    '@param array $query',
                    '@return ' . $find
                ],
                ['query']
            )->setStatic(true)->parameter('query')->setOptional(true, [])->setType('array');

            $findOne = $element->method(
                'findOne', [
                '@param array $query',
                '@param array $sortBy',
                '@return ' . $return . '|null'
            ], ['query', 'sortBy']
            )->setStatic(true);

            $findOne->parameter('query')->setOptional(true, [])->setType('array');
            $findOne->parameter('sortBy')->setOptional(true, [])->setType('array');

            $element->method(
                'findByPK', ['@param mixed $mongoID', '@return ' . $return . '|null'], ['mongoID']
            )->setStatic(true);
        }

        //Composition (we only need to handle MANY compositions)
        foreach ($entity->getCompositions() as $name => $composition) {
            if ($composition['type'] == ODM::CMP_ONE) {
                continue;
            }

            //We are going to create helper compositor class
            $class = $composition['class'];
            $element->property(
                $name, '@var ' . $this->helper('compositor', $class) . '|\\' . $class . '[]'
            );

            $element->method('get' . ucfirst($name))->setComment(
                '@return ' . $this->helper('compositor', $class) . '|\\' . $class . '[]'
            );
        }

        //Aggregations
        foreach ($entity->getAggregations() as $name => $aggregation) {
            $aggregated = $this->builder->document($aggregation['class']);
            $parent = $aggregated->getParent(true)->getName();

            if ($aggregation['type'] == Document::ONE) {
                //Simple ONE aggregation
                $element->method($name, ['@return \\' . $parent]);
            } else {
                $find = $this->helper('collection', $parent)
                    . '|' . $this->helper('cursor', $parent)
                    . '|\\' . $parent . '[]';

                $element->method(
                    $name, ['@param array $query', '@return ' . $find], ['query']
                )->parameter('query')->setOptional(true, [])->setType('array');
            }
        }

        return $element;
    }

    /**
     * @param string $name
     * @return ClassElement
     */
    protected function renderCollection($name)
    {
        $element = new ClassElement($elementName = $this->createName($name, 'collection'));
        $element->cloneSchema(Collection::class)->setComment("Virtual Collection for {$name}.");

        $element->setParent('\\' . Collection::class)->setInterfaces([]);
        $this->cleanElement($element);

        //Mounting our class
        $element->replaceComments(
            'DocumentCursor',
            $this->helper('cursor', $name) . "|\\{$name}[]"
        );

        $element->replaceComments(Document::class, $name);
        $element->replaceComments("Document", '\\' . $name);
        $element->replaceComments("@return \$this", "@return \$this|{$elementName}|\\{$name}[]");

        return $element;
    }

    /**
     * @param string $name
     * @return ClassElement
     */
    protected function renderCursor($name)
    {
        $element = new ClassElement($elementName = $this->createName($name, 'cursor'));
        $element->cloneSchema(DocumentCursor::class)->setComment("Virtual Cursor for {$name}.");

        $element->setParent('\\' . DocumentCursor::class)->setInterfaces([]);
        $this->cleanElement($element);

        $element->replaceComments(Document::class, $name);
        $element->replaceComments("Document", '\\' . $name);
        $element->replaceComments("@return \$this", "@return \$this|{$elementName}|\\{$name}[]");

        return $element;
    }

    /**
     * @param string $name
     * @return ClassElement
     */
    protected function renderCompositor($name)
    {
        $element = new ClassElement($elementName = $this->createName($name, 'compositor'));
        $element->cloneSchema(Compositor::class)->setComment("Virtual Compositor for {$name}.");

        $element->setParent('\\' . Compositor::class)->setInterfaces([]);
        $this->cleanElement($element);
        $element->removeMethod('getParent');

        //Mounting our class
        $element->replaceComments(Document::class, $name);
        $element->replaceComments("Document", '\\' . $name);
        $element->replaceComments("@return \$this", "@return \$this|{$elementName}|\\{$name}[]");

        return $element;
    }

    /**
     * Remove unnesessary element methods.
     *
     * @param ClassElement $element
     */
    private function cleanElement(ClassElement $element)
    {
        foreach ($element->getProperties() as $property) {
            $element->removeProperty($property->getName());
        }

        foreach ($element->getConstants() as $constant => $value) {
            $element->removeConstant($constant);
        }

        foreach ($element->getMethods() as $method) {
            //Remove all static, protected or magic methods
            if (
                $method->isStatic()
                || $method->getAccess() != AbstractElement::ACCESS_PUBLIC
                || substr($method->getName(), 0, 2) == '__'
            ) {
                $element->removeMethod($method->getName());
            }

            $comment = join("\n", $method->getComment());
            if (strpos($comment, "Document") === false && strpos($comment, "\$this") === false) {
                //We don't need methods not related to retrieving documents
                $element->removeMethod($method->getName());
            }
        }
    }
}


text:
"""
# QScintilla editor
#
# Adapted from Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#
# API: http://pyqt.sourceforge.net/Docs/QScintilla2/classQsciScintilla.html
#
"""

import sys
import re
from PyQt5.QtCore import *  # noqa
from PyQt5.QtWidgets import *  # noqa

try:
    from PyQt5 import Qsci
    from PyQt5.Qsci import QsciScintilla
    HAVE_QSCI = True
except ImportError:
    HAVE_QSCI = False

if not HAVE_QSCI:
    # backup editor in case QScintilla is not available
    class Editor(QPlainTextEdit):
        def __init__(self, parent=None, language=None):
            QPlainTextEdit.__init__(self, parent)

        def setText(self, text):
            self.setPlainText(text)

        def text(self):
            return str(self.toPlainText()).encode('UTF-8')

        def __getattr__(self, name):
            return lambda: None

else:
    class Editor(QsciScintilla):
        ARROW_MARKER_NUM = 8

        def __init__(self, parent=None, language='Python'):
            super(Editor, self).__init__(parent)
            self.setIndentationsUseTabs(False)
            self.setIndentationWidth(4)

            # Set the default font
            font = QFont()
            font.setFamily('DejaVu Sans Mono')
            font.setFixedPitch(True)
            font.setPointSize(10)
            self.setFont(font)
            self.setMarginsFont(font)
            self.zoomIn()

            # Margin 0 is used for line numbers
            fontmetrics = QFontMetrics(font)
            self.setMarginsFont(font)
            self.setMarginWidth(0, fontmetrics.width("000") + 6)
            self.setMarginLineNumbers(0, True)
            self.setMarginsBackgroundColor(QColor("#cccccc"))

            self._marker = None
            # Clickable margin 1 for showing markers
            #self.setMarginSensitivity(1, True)
            #self.connect(self,
            #    SIGNAL('marginClicked(int, int, Qt::KeyboardModifiers)'),
            #    self.on_margin_clicked)
            self.markerDefine(QsciScintilla.RightArrow, self.ARROW_MARKER_NUM)
            self.setMarkerBackgroundColor(QColor("#ee1111"),
                                          self.ARROW_MARKER_NUM)

            # Brace matching: enable for a brace immediately before or after
            # the current position
            #
            self.setBraceMatching(QsciScintilla.SloppyBraceMatch)

            # Current line visible with special background color
            self.setCaretLineVisible(True)
            self.setCaretLineBackgroundColor(QColor("#ffe4e4"))

            # Set Python lexer
            # Set style for Python comments (style number 1) to a fixed-width
            # courier.
            #
            lexer = getattr(Qsci, 'QsciLexer' + language)()
            lexer.setDefaultFont(font)
            self.setLexer(lexer)
            self.SendScintilla(QsciScintilla.SCI_STYLESETFONT, 1, 'Courier')

            # Don't want to see the horizontal scrollbar at all
            # Use raw message to Scintilla here (all messages are documented
            # here: http://www.scintilla.org/ScintillaDoc.html)
            self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)

            self.setWrapMode(QsciScintilla.WrapWord)

            self.setEolMode(QsciScintilla.EolUnix)
            # not too small
            #self.setMinimumSize(600, 450)

        def set_marker(self, line):
            self.clear_marker()
            self.markerAdd(line, self.ARROW_MARKER_NUM)
            self._marker = line

        def clear_marker(self):
            if self._marker is not None:
                self.markerDelete(self._marker, self.ARROW_MARKER_NUM)

        #def on_margin_clicked(self, nmargin, nline, modifiers):
            ## Toggle marker for the line the margin was clicked on
            #if self.markersAtLine(nline) != 0:
                #self.markerDelete(nline, self.ARROW_MARKER_NUM)
            #else:
                #self.markerAdd(nline, self.ARROW_MARKER_NUM)

        def wheelEvent(self, ev):
            # Use ctrl+wheel to zoom in/out
            if Qt.ControlModifier & ev.modifiers():
                if ev.delta() > 0:
                    self.zoomIn()
                else:
                    self.zoomOut()
            else:
                return super(Editor, self).wheelEvent(ev)

        def keyPressEvent(self, ev):
            if int(Qt.ControlModifier & ev.modifiers()) > 0:
                if ev.key() == Qt.Key_Slash:
                    self.comment(True)
                    return
                elif ev.key() == Qt.Key_Question:
                    self.comment(False)
                    return
                elif (ev.key() == Qt.Key_Z and
                      Qt.ShiftModifier & ev.modifiers()):
                    self.redo()
                    return
                elif ev.key() == Qt.Key_Q:
                    sys.exit(0)
            return super(Editor, self).keyPressEvent(ev)

        def text(self):
            return str(super(Editor, self).text()).encode('UTF-8')

        def comment(self, comment=True):
            sel = self.getSelection()[:]
            text = self.text()
            lines = text.split('\n')
            if sel[0] == -1:
                # toggle for just this line
                row, col = self.getCursorPosition()
                line = lines[row]
                self.setSelection(row, 0, row, len(line))
                if comment:
                    line = '#' + line
                else:
                    line = line.replace("#", "", 1)
                self.replaceSelectedText(line)
                self.setCursorPosition(row, col+(1 if col > 0 else 0))
            else:
                block = lines[sel[0]:sel[2]]
                # make sure all lines have #
                new = []
                if comment:
                    for line in block:
                        new.append('#' + line)
                else:
                    for line in block:
                        if line.strip() == '':
                            new.append(line)
                            continue
                        if re.match(r'\s*\#', line) is None:
                            return
                        new.append(line.replace('#', '', 1))
                self.setSelection(sel[0], 0, sel[2], 0)
                self.replaceSelectedText('\n'.join(new) + '\n')
                #shift = 1 if comment else -1
                self.setSelection(sel[0], max(0, sel[1]), sel[2], sel[3])

if __name__ == "__main__":
    app = QApplication(sys.argv)
    editor = Editor()
    editor.show()
    editor.setText(open(sys.argv[0]).read())
    editor.resize(800, 800)
    app.exec_()

redpajama_set_name: RedPajamaGithub


text:
#include "aws_get_request.hpp"

#include <boost/lexical_cast.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>

AwsGetRequest::AwsGetRequest(Auth auth, std::string region, std::string service)
	: auth(auth),
		region(region),
		service(service),
		host(service + "." + region + ".amazonaws.com:80"),
		uri(std::string().append("http://").append(host).append("/"))
{
}

web::http::http_request AwsGetRequest::getSignedHttpRequest(std::string safe_uri) {
	boost::posix_time::ptime time = boost::posix_time::second_clock::universal_time();
	web::http::http_request http_request;
	web::http::uri_builder uri_builder;

	uri_builder.set_path("/");
	uri_builder.set_query(safe_uri);

	web::http::client::http_client http_client(uri);

	http_request.set_method(web::http::methods::GET);
	http_request.set_request_uri(uri_builder.to_uri());
	http_request.headers().add<std::string>("host", host);

	http_request = this->auth.signRequestInQuery(time, http_request, region, service);

	http_request.headers().remove("host");

	return http_request;
}


text:
package com.ibm.ws.massive.resources;

import java.util.Collection;

import com.ibm.ws.massive.LoginInfo;
import com.ibm.ws.massive.LoginInfoEntry;
import com.ibm.ws.massive.RepositoryBackendException;
import com.ibm.ws.massive.RepositoryException;

public class ToolResource extends ProductRelatedResource {

    /*
     * ----------------------------------------------------------------------------------------------------
     * STATIC HELPER METHODS
     * ----------------------------------------------------------------------------------------------------
     */

    /**
     *
     * @param userId
     * @param password
     * @param apiKey
     * @throws RepositoryBackendException
     */
    public static Collection<ToolResource> getAllTools(LoginInfo loginInfo) throws RepositoryBackendException {
        return MassiveResource.getAllResources(Type.TOOL, loginInfo);
    }

    /**
     * Get all products with a given license type
     *
     * @param License type
     * @param userId
     * @param password
     * @param apiKey
     * @throws RepositoryException
     */
    public static Collection<ToolResource> getAllTools(LicenseType licenseType, LoginInfo loginInfo) throws RepositoryBackendException {
        return MassiveResource.getAllResources(licenseType, Type.TOOL, loginInfo);
    }

    /**
     *
     * @param userId
     * @param password
     * @param apiKey
     * @param id
     * @return
     * @throws RepositoryBackendException
     */
    public static ToolResource getTool(LoginInfoEntry loginInfoResource, String id) throws RepositoryBackendException, RepositoryBadDataException {
        return getResource(loginInfoResource, id);
    }

    /*
     * ----------------------------------------------------------------------------------------------------
     * INSTANCE METHODS
     * ----------------------------------------------------------------------------------------------------
     */
    public ToolResource(LoginInfoEntry loginInfoResource) {
        super(loginInfoResource);
        setType(Type.TOOL);
    }

}


text:
function Calendar(identifier) {
    var calendar = $(identifier);
    calendar.fullCalendar({
        header: {
            left: '',
            center: '',
            right: '',
        },
        columnFormat: 'ddd',
        hiddenDays: [0, 6], // Hide weekends
        defaultDate: '2014-06-12',
        defaultView: 'agendaWeek',
        minTime: '08:00:00',
        maxTime: '20:00:00',
        height: 'auto',
        allDaySlot: false,
        editable: false,
        eventTextColor: 'white',
        events: [],
        eventClick: function(calEvent, jsEvent, view) {
            offset = table.row( function ( _, data ) {
                return data[0] == calEvent.id.substring(0, 9);
            }).node().offsetTop
            $('.dataTables_scrollBody').animate({
                scrollTop: offset
            }, 500);
        },
        eventMouseover: function(calEvent, jsEvent) {
            calEvent.oldz = $(this).css('z-index');
            $(this).css('z-index', 10000);
        },
        eventMouseout: function(calEvent, jsEvent) {
            $(this).css('z-index', calEvent.oldz || 1);
        },
        eventRender: function(event, element, view) {
            tooltipClass = event.startHr > 10 ? 'tooltiptext-top' : 'tooltiptext-bot';
            element.addClass('tooltip');
            element.append('' + event.tooltip + '');
            element.css('overflow', 'visible');
        }
    });

    function getColor(course_code) {
        scales = {
            buff: chroma.scale(['4f5355', 'cfb36a']).mode('lab'),
            redyell: chroma.scale(['6B0C00', 'D4D454']),
            earth: chroma.scale(['6B0C00', 'BAA86D', '4E6C33']),
            earth2: chroma.scale(['6B0C00', '378B76']).mode('hsl'),
            purple: chroma.scale(['6B0C00', '2C1773']).mode('hsl').padding(-0.05),
        }

        function hashCode(str) {
            var hash = 5381, i, chr;
            if (str.length === 0) return hash;
            for (i = 0; i < str.length; i++) {
                chr   = str.charCodeAt(i);
                hash  = ((hash << 5) - hash) + chr;
                hash  = hash % 104729
            }
            return hash;
        }

        hash = hashCode(course_code);
        percent = Math.abs((hash % 1000) / 1000); // percent is between 0 and 1
        // create a color scale
        scale = scales.buff;
        // get the color from it
        color = scale(percent).hex();
        return color;
    }

    /*
    * Creates calendar events for a given section.
    */
    function createCalendarEvents(section, color) {
        color = color || '#999';//getColor(id);
        tooltip = getParentCourseCode(section) + '
(' + section.room + ')';
        bitDays = {
            1: '09',
            2: '10',
            4: '11',
            8: '12',
            16: '13',
        };
        var ret = [];
        for (bit in bitDays) {
            if (bit & section.days) {
                dayString = '2014-06-' + bitDays[bit];
                startString = zeroPad(Math.floor(section.start / 60), 2) + ':' + zeroPad(section.start % 60, 2)
                endString = zeroPad(Math.floor(section.end / 60), 2) + ':' + zeroPad(section.end % 60, 2)
                var newEvent = {
                    title: getParentCourseCode(section),
                    start: dayString + 'T' + startString,
                    end: dayString + 'T' + endString,
                    color: color,
                    startHr: section.start / 60,
                    tooltip: tooltip,
                }
                var id = calendar.fullCalendar('renderEvent', newEvent, true);
                ret.push(id);
            }
        }
        return ret;
    }

    function removeEvents(section) {
        calendar.fullCalendar('removeEvents', section);
    }

    this.addSection = (section) => createCalendarEvents(section);
    this.removeSection = (section) => removeEvents(section);
    this.ghostSection = (section) => createCalendarEvents(section, '#AAA');
    this.clear = () => removeEvents();
}


text:
package com.linkedin.thirdeye.datasource;

import com.linkedin.thirdeye.auth.IAuthManager;
import com.linkedin.thirdeye.datalayer.bao.AlertConfigManager;
import com.linkedin.thirdeye.datalayer.bao.AnomalyFunctionManager;
import com.linkedin.thirdeye.datalayer.bao.ApplicationManager;
import com.linkedin.thirdeye.datalayer.bao.ClassificationConfigManager;
import com.linkedin.thirdeye.datalayer.bao.ConfigManager;
import com.linkedin.thirdeye.datalayer.bao.DashboardConfigManager;
import com.linkedin.thirdeye.datalayer.bao.DataCompletenessConfigManager;
import com.linkedin.thirdeye.datalayer.bao.DatasetConfigManager;
import com.linkedin.thirdeye.datalayer.bao.DetectionStatusManager;
import com.linkedin.thirdeye.datalayer.bao.EntityToEntityMappingManager;
import com.linkedin.thirdeye.datalayer.bao.EventManager;
import com.linkedin.thirdeye.datalayer.bao.AutotuneConfigManager;
import com.linkedin.thirdeye.datalayer.bao.GroupedAnomalyResultsManager;
import com.linkedin.thirdeye.datalayer.bao.JobManager;
import com.linkedin.thirdeye.datalayer.bao.MergedAnomalyResultManager;
import com.linkedin.thirdeye.datalayer.bao.MetricConfigManager;
import com.linkedin.thirdeye.datalayer.bao.OnboardDatasetMetricManager;
import com.linkedin.thirdeye.datalayer.bao.OverrideConfigManager;
import com.linkedin.thirdeye.datalayer.bao.RawAnomalyResultManager;
import com.linkedin.thirdeye.datalayer.bao.TaskManager;
import com.linkedin.thirdeye.datalayer.bao.jdbc.AlertConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.AnomalyFunctionManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.ApplicationManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.ClassificationConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.ConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.DashboardConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.DataCompletenessConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.DatasetConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.DetectionStatusManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.EntityToEntityMappingManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.EventManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.AutotuneConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.GroupedAnomalyResultsManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.JobManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.MergedAnomalyResultManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.MetricConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.OnboardDatasetMetricManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.OverrideConfigManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.RawAnomalyResultManagerImpl;
import com.linkedin.thirdeye.datalayer.bao.jdbc.TaskManagerImpl;
import com.linkedin.thirdeye.datalayer.util.DaoProviderUtil;

/**
 * Singleton service registry for Data Access Objects (DAOs)
 */
public class DAORegistry {

  private static final DAORegistry INSTANCE = new DAORegistry();

  private IAuthManager authManager;

  /****************************************************************************
   * SINGLETON
   */

  public static DAORegistry getInstance() {
    return INSTANCE;
  }

  /**
   * **USE FOR TESTING ONLY**
   * Return a DAO registry for testing purpose, which may be performed in arbitrary order and
   * hence need independent registry for each test.
   *
   * @return an independent DAO registry to the global singleton registry.
   */
  public static DAORegistry getTestInstance() {
    return new DAORegistry();
  }

  /**
   * internal constructor.
   */
  private DAORegistry() {}

  /****************************************************************************
   * GETTERS/SETTERS
   */

  public AnomalyFunctionManager getAnomalyFunctionDAO() {
    return DaoProviderUtil.getInstance(AnomalyFunctionManagerImpl.class);
  }

  public AlertConfigManager getAlertConfigDAO() {
    return DaoProviderUtil.getInstance(AlertConfigManagerImpl.class);
  }

  public RawAnomalyResultManager getRawAnomalyResultDAO() {
    return DaoProviderUtil.getInstance(RawAnomalyResultManagerImpl.class);
  }

  public MergedAnomalyResultManager getMergedAnomalyResultDAO() {
    return DaoProviderUtil.getInstance(MergedAnomalyResultManagerImpl.class);
  }

  public JobManager getJobDAO() {
    return DaoProviderUtil.getInstance(JobManagerImpl.class);
  }

  public TaskManager getTaskDAO() {
    return DaoProviderUtil.getInstance(TaskManagerImpl.class);
  }

  public DatasetConfigManager getDatasetConfigDAO() {
    return DaoProviderUtil.getInstance(DatasetConfigManagerImpl.class);
  }

  public MetricConfigManager getMetricConfigDAO() {
    return DaoProviderUtil.getInstance(MetricConfigManagerImpl.class);
  }

  public DashboardConfigManager getDashboardConfigDAO() {
    return DaoProviderUtil.getInstance(DashboardConfigManagerImpl.class);
  }

  public OverrideConfigManager getOverrideConfigDAO() {
    return DaoProviderUtil.getInstance(OverrideConfigManagerImpl.class);
  }

  public DataCompletenessConfigManager getDataCompletenessConfigDAO() {
    return DaoProviderUtil.getInstance(DataCompletenessConfigManagerImpl.class);
  }

  public EventManager getEventDAO() {
    return DaoProviderUtil.getInstance(EventManagerImpl.class);
  }

  public DetectionStatusManager getDetectionStatusDAO() {
    return DaoProviderUtil.getInstance(DetectionStatusManagerImpl.class);
  }

  public AutotuneConfigManager getAutotuneConfigDAO() {
    return DaoProviderUtil.getInstance(AutotuneConfigManagerImpl.class);
  }

  public ClassificationConfigManager getClassificationConfigDAO() {
    return DaoProviderUtil.getInstance(ClassificationConfigManagerImpl.class);
  }

  public EntityToEntityMappingManager getEntityToEntityMappingDAO() {
    return DaoProviderUtil.getInstance(EntityToEntityMappingManagerImpl.class);
  }

  public GroupedAnomalyResultsManager getGroupedAnomalyResultsDAO() {
    return DaoProviderUtil.getInstance(GroupedAnomalyResultsManagerImpl.class);
  }

  public OnboardDatasetMetricManager getOnboardDatasetMetricDAO() {
    return DaoProviderUtil.getInstance(OnboardDatasetMetricManagerImpl.class);
  }

  public ConfigManager getConfigDAO() {
    return DaoProviderUtil.getInstance(ConfigManagerImpl.class);
  }

  public ApplicationManager getApplicationDAO() {
    return DaoProviderUtil.getInstance(ApplicationManagerImpl.class);
  }

  public IAuthManager getAuthManager() {
    return authManager;
  }

  public void setAuthManager(IAuthManager authManager) {
    this.authManager = authManager;
  }
}


text:
from django.conf.urls import include, url
from django.urls import reverse
from django.views.generic import TemplateView
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
from django.urls import path
from django.contrib.sitemaps.views import sitemap
from django.contrib.sitemaps import Sitemap

from . import apiv1, apiv2
from . import views
from .models import LastUpdated, Product

class ProductSitemap(Sitemap):
    changefreq = "monthly"
    priority = 0.5

    def items(self):
        return Product.objects.all()

    def lastmod(self, obj):
        return LastUpdated.objects.last_updated().update_date

    def location(self, obj):
        return reverse("product_related", kwargs={"nappi_code": obj.nappi_code})

admin.autodiscover()

urlpatterns = [
    url(r'^$', TemplateView.as_view(template_name="index.html"), name="home"),
    path(r"related/<str:nappi_code>/", views.ProductView.as_view(), name="product_related"),
    path("admin/", admin.site.urls),

    url(r"^api/related$", views.RelatedProductsView.as_view(), name="api_related_products"),
    url(r"^api/detail$", views.ProductDetailView.as_view(), name="api_product_detail"),
    url(r"^api/search/by_product$", views.SearchByProductView.as_view(), name="api_search_by_product"),
    url(r"^api/search/by_ingredient$", views.SearchByIngredientView.as_view(), name="api_search_by_ingredient"),
    url(r"^api/search$", views.SearchView.as_view(), name="api_search"),
    url(r"^api/search-lite$", views.SearchLiteView.as_view(), name="api_search_lite"),
    url(r"^api/dump$", views.DumpView.as_view(), name="api_dump"),

    url(r"^api/v1/related$", views.RelatedProductsView.as_view(), name="api1_related_products"),
    url(r"^api/v1/detail$", views.ProductDetailView.as_view(), name="api1_product_detail"),
    url(r"^api/v1/search/by_product$", views.SearchByProductView.as_view(), name="api1_search_by_product"),
    url(r"^api/v1/search/by_ingredient$", views.SearchByIngredientView.as_view(), name="api1_search_by_ingredient"),
    url(r"^api/v1/search$", views.SearchView.as_view(), name="api1_search"),
    url(r"^api/v1/search-lite$", views.SearchLiteView.as_view(), name="api1_search_lite"),
    url(r"^api/v1/dump$", views.DumpView.as_view(), name="api1_dump"),

    url(r"^api/v2/related$", views.V2RelatedProductsView.as_view(), name="api2_related_products"),
    url(r"^api/v2/detail$", views.V2ProductDetailView.as_view(), name="api2_product_detail"),
    url(r"^api/v2/search/by_product$", views.V2SearchByProduct.as_view(), name="api2_search_by_product"),
    url(r"^api/v2/search$", views.V2SearchView.as_view(), name="api2_search"),
    url(r"^api/v2/search-lite$", views.V2SearchLiteView.as_view(), name="api2_search_lite"),
    url(r"^api/v2/last-updated$", views.LastUpdatedView.as_view(), name="api2_last_updated"),

    # currently still using v1 methods since there hasn't been a change
    url(r"^api/v2/dump$", views.DumpView.as_view(), name="api2_dump"),
    url(r"^api/v2/search/by_ingredient$", views.SearchByIngredientView.as_view(), name="api2_search_by_ingredient"),

    # API V3 - using some old api calls as they haven't changed
    url(r"^api/v3/related$", views.V2RelatedProductsView.as_view(), name="api3_related_products"),
    url(r"^api/v3/detail$", views.V3ProductDetailView.as_view(), name="api3_product_detail"),
    url(r"^api/v3/search/by_product$", views.V2SearchByProduct.as_view(), name="api3_search_by_product"),
    url(r"^api/v3/search$", views.V2SearchView.as_view(), name="api3_search"),
    url(r"^api/v3/search-lite$", views.V2SearchLiteView.as_view(), name="api3_search_lite"),
    url(r"^api/v3/last-updated$", views.LastUpdatedView.as_view(), name="api3_last_updated"),

    # currently still using v1 methods since there hasn't been a change
    url(r"^api/v3/dump$", views.DumpView.as_view(), name="api3_dump"),
    url(r"^api/v3/search/by_ingredient$", views.SearchByIngredientView.as_view(), name="api3_search_by_ingredient"),

    path('sitemap.xml', sitemap, {'sitemaps': {"Products": ProductSitemap}}, name='django.contrib.sitemaps.views.sitemap')
]

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)


text:
<?xml version="1.0" encoding="UTF-8"?>

	<!--
		Copyright "TBD", Metron Aviation & CSSI. All rights reserved. This
		computer Software was developed with the sponsorship of the U.S.
		Government under Contract No. DTFAWA-10-D-00033, which has a copyright
		license in accordance with AMS 3.5-13.(c)(1).
	-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>gov.faa.ang.swac</groupId>
		<artifactId>swac-parent</artifactId>
		<version>2.7.1-SNAPSHOT</version>
	</parent>
	<artifactId>swac-datalayer</artifactId>
	<packaging>jar</packaging>
	<name>SWAC Data Layer</name>
	<dependencies>
		<dependency>
			<groupId>gov.faa.ang.swac</groupId>
			<artifactId>swac-timestamp</artifactId>
		</dependency>
		<dependency>
    		<groupId>com.h2database</groupId>
    		<artifactId>h2</artifactId>
    		<version>1.3.164</version>
		</dependency>
<!-- 		<dependency> -->
<!-- 			<groupId>com.oracle</groupId> -->
<!-- 			<artifactId>ojdbc6</artifactId> -->
<!-- 			<version>11.2.0.3</version> -->
<!-- 		</dependency> -->
		<!--
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.31</version>
		</dependency>
		 -->
		<!--
		<dependency>
			<groupId>org.mariadb.jdbc</groupId>
			<artifactId>mariadb-java-client</artifactId>
			<version>1.1.7</version>
		</dependency>
		-->
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>


text:
package h;
import java.util.Arrays;
import java.util.List;

import smetana.core.__ptr__;

//2 elhfawlitxj3187hf4lyyku80

public interface gvplugin_library_t extends __ptr__ {
	public static List<String> DEFINITION = Arrays.asList(
"typedef struct",
"{",
"char *packagename",
"gvplugin_api_t *apis",
"}",
"gvplugin_library_t");
}

// typedef struct {
// 	char *packagename;    /* used when this plugin is builtin and has
// 					no pathname */
// 	gvplugin_api_t *apis;
//     } gvplugin_library_t;


text:
/*global tau */
/*jslint unparam: true */
(function(tau) {
	var page,
		list,
		listHelper = [],
		i, len;

	if (tau.support.shape.circle) {
		document.addEventListener("pagebeforeshow", function (e) {
			page = e.target;
			list = page.querySelectorAll(".ui-listview");
			if (list) {
				len = list.length;
				for (i = 0; i < len; i++) {
					listHelper[i] = tau.helper.SnapListStyle.create(list[i], {animate: "scale"});
				}
			}
		});

		document.addEventListener("pagebeforehide", function (e) {
			len = listHelper.length;
			if (len) {
				for (i = 0; i < len; i++) {
					listHelper[i].destroy();
				}
				listHelper = [];
			}
		});
	}
}(tau));


text:
package com.datastax.driver.core.exceptions;

import com.datastax.driver.core.DataType;
import com.google.common.reflect.TypeToken;

/**
 * Thrown when a suitable {@link com.datastax.driver.core.TypeCodec} cannot be found by
 * {@link com.datastax.driver.core.CodecRegistry} instances.
 */
@SuppressWarnings("serial")
public class CodecNotFoundException extends DriverException {

    private final DataType cqlType;

    private final TypeToken<?> javaType;

    public CodecNotFoundException(String msg, DataType cqlType, TypeToken<?> javaType) {
        this(msg, null, cqlType, javaType);
    }

    public CodecNotFoundException(Throwable cause, DataType cqlType, TypeToken<?> javaType) {
        this(null, cause, cqlType, javaType);
    }

    private CodecNotFoundException(String msg, Throwable cause, DataType cqlType, TypeToken<?>javaType) {
        super(msg, cause);
        this.cqlType = cqlType;
        this.javaType = javaType;
    }

    public DataType getCqlType() {
        return cqlType;
    }

    public TypeToken<?> getJavaType() {
        return javaType;
    }

    @Override
    public CodecNotFoundException copy() {
        return new CodecNotFoundException(getMessage(), getCause(), getCqlType(), getJavaType());
    }
}


text:
package com.wuman.android.auth.oauth2.implicit;

import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.UrlEncodedParser;
import com.google.api.client.util.Key;
import com.google.api.client.util.Preconditions;
import com.google.api.client.util.escape.CharEscapers;

import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;

public class ImplicitResponseUrl extends GenericUrl {

    /** Access token issued by the authorization server. */
    @Key("access_token")
    private String accessToken;

    /**
     * Token type (as specified in Access Token
     * Types).
     */
    @Key("token_type")
    private String tokenType;

    /**
     * Lifetime in seconds of the access token (for example 3600 for an hour) or
     * {@code null} for none.
     */
    @Key("expires_in")
    private Long expiresInSeconds;

    /**
     * Scope of the access token as specified in Access Token
     * Scope or {@code null} for none.
     */
    @Key
    private String scope;

    /**
     * State parameter matching the state parameter in the authorization request
     * or {@code null} for none.
     */
    @Key
    private String state;

    /**
     * Error code ({@code "invalid_request"}, {@code "unauthorized_client"},
     * {@code "access_denied"}, {@code "unsupported_response_type"},
     * {@code "invalid_scope"}, {@code "server_error"},
     * {@code "temporarily_unavailable"}, or an extension error code as
     * specified in Defining Additional
     * Error Codes) or {@code null} for none.
     */
    @Key
    private String error;

    /**
     * Human-readable text providing additional information used to assist the
     * client developer in understanding the error that occurred or {@code null}
     * for none.
     */
    @Key("error_description")
    private String errorDescription;

    /**
     * URI identifying a human-readable web page with information about the
     * error used to provide the client developer with additional information
     * about the error or {@code null} for none.
     */
    @Key("error_uri")
    private String errorUri;

    ImplicitResponseUrl() {
        super();
    }

    public ImplicitResponseUrl(String encodedUrl) {
        this(toURI(encodedUrl));
    }

    ImplicitResponseUrl(URI uri) {
        this(uri.getScheme(),
                uri.getHost(),
                uri.getPort(),
                uri.getRawPath(),
                uri.getRawFragment(),
                uri.getRawQuery(),
                uri.getRawUserInfo());
    }

    ImplicitResponseUrl(URL url) {
        this(url.getProtocol(),
                url.getHost(),
                url.getPort(),
                url.getPath(),
                url.getRef(),
                url.getQuery(),
                url.getUserInfo());
    }

    private ImplicitResponseUrl(String scheme, String host, int port, String path, String fragment,
            String query, String userInfo) {
        setScheme(scheme);
        setHost(host);
        setPort(port);
        setPathParts(toPathParts(path));
        setFragment(fragment != null ? CharEscapers.decodeUri(fragment) : null);
        if (fragment != null) {
            UrlEncodedParser.parse(fragment, this);
        }
        // no need for query parameters
        setUserInfo(userInfo != null ? CharEscapers.decodeUri(userInfo) : null);
    }

    /** Returns the access token issued by the authorization server. */
    public final String getAccessToken() {
        return accessToken;
    }

    /**
     * Sets the access token issued by the authorization server.
     *

     * Overriding is only supported for the purpose of calling the super
     * implementation and changing the return type, but nothing else.
     *

     */
    public ImplicitResponseUrl setAccessToken(String accessToken) {
        this.accessToken = Preconditions.checkNotNull(accessToken);
        return this;
    }

    /**
     * Returns the token type (as specified in Access Token
     * Types).
     */
    public final String getTokenType() {
        return tokenType;
    }

    /**
     * Sets the token type (as specified in Access Token
     * Types).
     *

     * Overriding is only supported for the purpose of calling the super
     * implementation and changing the return type, but nothing else.
     *

     */
    public ImplicitResponseUrl setTokenType(String tokenType) {
        this.tokenType = Preconditions.checkNotNull(tokenType);
        return this;
    }

    /**
     * Returns the lifetime in seconds of the access token (for example 3600 for
     * an hour) or {@code null} for none.
     */
    public final Long getExpiresInSeconds() {
        return expiresInSeconds;
    }

    /**
     * Sets the lifetime in seconds of the access token (for example 3600 for an
     * hour) or {@code null} for none.
     *

     * Overriding is only supported for the purpose of calling the super
     * implementation and changing the return type, but nothing else.
     *

     */
    public ImplicitResponseUrl setExpiresInSeconds(Long expiresInSeconds) {
        this.expiresInSeconds = expiresInSeconds;
        return this;
    }

    /**
     * Returns the scope of the access token or {@code null} for none.
     */
    public final String getScope() {
        return scope;
    }

    /**
     * Sets the scope of the access token or {@code null} for none.
     *

     * Overriding is only supported for the purpose of calling the super
     * implementation and changing the return type, but nothing else.
     *

     */
    public ImplicitResponseUrl setScope(String scope) {
        this.scope = scope;
        return this;
    }

    /**
     * Returns the state parameter matching the state parameter in the
     * authorization request or {@code null} for none.
     */
    public final String getState() {
        return state;
    }

    /**
     * Sets the state parameter matching the state parameter in the
     * authorization request or {@code null} for none.
     *

     * Overriding is only supported for the purpose of calling the super
     * implementation and changing the return type, but nothing else.
     *

     */
    public ImplicitResponseUrl setState(String state) {
        this.state = state;
        return this;
    }

    /**
     * Returns the error code ({@code "invalid_request"},
     * {@code "unauthorized_client"}, {@code "access_denied"},
     * {@code "unsupported_response_type"}, {@code "invalid_scope"},
     * {@code "server_error"}, {@code "temporarily_unavailable"}, or an
     * extension error code as specified in Defining Additional
     * Error Codes) or {@code null} for none.
     */
    public final String getError() {
        return error;
    }

    /**
     * Sets the error code ({@code "invalid_request"},
     * {@code "unauthorized_client"}, {@code "access_denied"},
     * {@code "unsupported_response_type"}, {@code "invalid_scope"},
     * {@code "server_error"}, {@code "temporarily_unavailable"}, or an
     * extension error code as specified in Defining Additional
     * Error Codes) or {@code null} for none.
     *

     * Overriding is only supported for the purpose of calling the super
     * implementation and changing the return type, but nothing else.
     *

     */
    public ImplicitResponseUrl setError(String error) {
        this.error = error;
        return this;
    }

    /**
     * Returns the human-readable text providing additional information used to
     * assist the client developer in understanding the error that occurred or
     * {@code null} for none.
     */
    public final String getErrorDescription() {
        return errorDescription;
    }

    /**
     * Sets the human-readable text providing additional information used to
     * assist the client developer in understanding the error that occurred or
     * {@code null} for none.
     *

     * Overriding is only supported for the purpose of calling the super
     * implementation and changing the return type, but nothing else.
     *

     */
    public ImplicitResponseUrl setErrorDescription(String errorDescription) {
        this.errorDescription = errorDescription;
        return this;
    }

    /**
     * Returns the URI identifying a human-readable web page with information
     * about the error used to provide the client developer with additional
     * information about the error or {@code null} for none.
     */
    public final String getErrorUri() {
        return errorUri;
    }

    /**
     * Sets the URI identifying a human-readable web page with information about
     * the error used to provide the client developer with additional
     * information about the error or {@code null} for none.
     *

     * Overriding is only supported for the purpose of calling the super
     * implementation and changing the return type, but nothing else.
     *

     */
    public ImplicitResponseUrl setErrorUri(String errorUri) {
        this.errorUri = errorUri;
        return this;
    }

    @Override
    public ImplicitResponseUrl set(String fieldName, Object value) {
        return (ImplicitResponseUrl) super.set(fieldName, value);
    }

    @Override
    public ImplicitResponseUrl clone() {
        return (ImplicitResponseUrl) super.clone();
    }

    /**
     * Returns the URI for the given encoded URL.
     *

     * Any {@link URISyntaxException} is wrapped in an
     * {@link IllegalArgumentException}.
     *

     *
     * @param encodedUrl encoded URL
     * @return URI
     */
    private static URI toURI(String encodedUrl) {
        try {
            return new URI(encodedUrl);
        } catch (URISyntaxException e) {
            throw new IllegalArgumentException(e);
        }
    }

}


text:
<TITLE>Review for South Park: Bigger, Longer and Uncut (1999)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

South Park: Bigger, Longer and Uncut (1999)

reviewed by
Chuck Dowling

South Park:Bigger, Longer & Uncut (1999)
***** out of *****

Cast: Trey Parker, Matt Stone, Mary Kay Bergman, Isaac Hayes, numerous
cameo voices
Written by: Trey Parker, Matt Stone and Pam Brady
Directed by: Trey Parker
Running Time: 80 minutes
Date Reviewed: July 8, 1999

I guess I should start out by saying that I am a huge fan of the
animated series "South Park" which runs on Comedy Central.  I've
followed it since it's debut, and while it has had it's occasional ups
and
downs, overall it provides more laughs than any other show on
television,
cable or otherwise.  I should also point out that just because I'm a
huge
fan of the series didn't automatically guarantee this movie a high
rating.
There have been other shows that I have been a major supporter of that
didn't do much for me in their big screen outings (Twin Peaks:Fire Walk
With Me comes to mind immediately).

While South Park:Bigger, Longer & Uncut runs about four times as long as
an
episode of the television series, it never once wears out it's welcome
or
becomes tiresome.  As the story goes, the four main characters (Stan,
Kyle,
Cartman, and Kenny) sneak into their local multiplex to see the new
R-rated
Terrance and Phillip movie Asses of Fire.  When they emerge, they have
discovered even worse language than they use on a daily basis (thanks to
an
extremely profane yet irresistibly catchy musical number from Terrance &

Phillip).  This enrages their parents who blame Canada (Terrance and
Phillip are Canadian you see) and war is soon declared on our neighbors
to
the north.

What's encouraging about South Park:Bigger, Longer & Uncut is that isn't

just an R-rated version of the hit show.  Series creators Trey Parker
and
Matt Stone could have very easily made just another episode for the big
screen, but instead they've given us a movie with social commentary
about
hypocrisy, censorship, and (gasp!) parental responsibility.  Yes you've
read correctly... this movie has a message.  Don't let that scare you
off
though, there are more laughs in this film than you'd think would be
possible.

Parker and Stone hit a number of "sacred" targets in their film, but as
they've said in interviews "We're equal opportunity offenders".  No
single
organization or racial group is targeted more than another.  And what
makes
the potentially dangerous comedy work so well is because it is so absurd
in
it's presentation.  The situations which the laughs come from are so
outlandish that I personally can't see any of them as being offensive.
Sure the language is harsh, but if you've seen any R-rated movie before
there shouldn't be anything here that would shock you.

However, I don't advise you take your kids either.  It is definitely not

for youngsters unless you, as a parent, explain to your kids about "foul

language" and why it's not always appropriate in the REAL world.
Curiously, I think that many of the ideas and situations in this film
are
far "worse" than anything in Trey Parker's Orgazmo, which the MPAA rated

NC-17.  Why that film is rated NC-17 and this one is rated R goes to
show
the randomness of the current ratings board.

Surprisingly, it would to be hard to classify South Park:Bigger, Longer
&
Uncut as either a comedy or a musical.  Normally I abhor musicals, but
when
they are this funny and the songs are as memorable, I can overlook my
feelings.  And I have to give credit where credit is due.  I've taken a
couple of harsh shots lately at Marc Shaiman and his overblown scores in

films like Patch Adams and The Out of Towners.  In this case, the music
he
has written (along with Trey Parker, mind you) fits perfectly.  Mocking
all
different types of musical numbers from Disney animation to the grand,
sweeping musicals of the 60s to Les Miserables, everything works.  The
soundtrack album is a must have.  On a sidenote: I would have loved to
sit
it on the recording sessions to see the chorus singing some of the
extremely filthy lyrics they have to sing in this film.

South Park:Bigger, Longer & Uncut is a great time at the movies if you
love
the series, or if you just love to laugh.  Sure the animation is crude
and
you may say the humor is even cruder, but a lot of the comedy here
requires
a good bit of intelligence to "get".  Those of us who do get it have
something great to enjoy.  [R]

The Jacksonville Film Journal -- Film Reviews by Chuck Dowling
URL:http://users.southeast.net/~chuckd21/
Email:chuckd21@leading.net

© 1999 of The Jacksonville Film Journal.  No reviews may be reprinted
without permission.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
int main() try
{
	int fd = open("test_file", O_RDWR);
	void* map = mmap(nullptr, 1024, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);

	std::vector<char> buf(1024);
	std::iota(buf.begin(), buf.end(), 0);

	// disk full or access after EOF are reported as exceptions
	sig::try_signal([&]{
		std::memcpy(map, buf.data(), buf.size());
	});

	munmap(map, 1024);
	close(fd);
	return 0;
}
catch (std::exception const& e)
{
	fprintf(stderr, "exited with exception: %s\n", e.what());
	return 1;
}


text:
<title>
JsonCpp - JSON data format manipulation library
</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">

      JsonCpp project page

      JsonCpp home page

Main Page

Related Pages

Namespaces

Classes

Files

File List

File Members

src

lib_json

Namespaces |
Typedefs |
Enumerations |
Functions

json_tool.h File Reference

#include <clocale>

Go to the source code of this file.

Namespaces

  	Json

 	JSON (JavaScript Object Notation).

Typedefs

typedef char 	Json::UIntToStringBuffer[uintToStringBufferSize]

Enumerations

enum  	{ Json::uintToStringBufferSize = 3 * sizeof(LargestUInt) + 1
 }

Functions

static char 	Json::getDecimalPoint ()

static JSONCPP_STRING 	Json::codePointToUTF8 (unsigned int cp)

 	Converts a unicode code-point to UTF-8.  More...

static bool 	Json::isControlCharacter (char ch)

 	Returns true if ch is a control character (in range [1,31]).  More...

static void 	Json::uintToString (LargestUInt value, char *&current)

 	Converts an unsigned integer to string.  More...

static void 	Json::fixNumericLocale (char *begin, char *end)

 	Change ',' to '.  More...

static void 	Json::fixNumericLocaleInput (char *begin, char *end)


text:
import cv2

class Camera:
	def __init__(self, device):
		self.capture = cv2.VideoCapture(device=device)

	def isReady(self):
		return self.capture.isOpened()

	def getFrame(self):
		return self.capture.read()[1]


text:
<?php
/**
 *
 */

namespace Mvc5\Request\Error;

use Mvc5\Http\Error;

use const Mvc5\ERROR;

final class ViewModel
    extends \Mvc5\ViewModel
    implements ErrorModel
{
    /**
     *
     */
    use Config\ErrorModel;

    /**
     *
     */
    const TEMPLATE = 'error';

    /**
     * @param Error $error
     * @param string $template
     */
    function __construct(Error $error, string $template = null)
    {
        parent::__construct($template, [ERROR => $error]);
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Multimedia Search</title>
<meta name="keywords" content="automobile ontology, semantic web, multimedia ontology, automobile manufactuers, audi, bmw, DTC, monorail," />
<meta name="description" content="Automobile Ontology as part of Semantic Web Course Cirriculum" />
<link href="themes/5/js-image-slider.css" rel="stylesheet" type="text/css" />

    <link href="generic.css" rel="stylesheet" type="text/css" />
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css">

  <link href="video-js.css" rel="stylesheet" type="text/css">

<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />

				<link href="magiczoom/magiczoom.css" rel="stylesheet" type="text/css" media="screen"/>

	<link rel="stylesheet" type="text/css" href="engine1/style.css" />

Close

Automobile Ontology Graph

Click on the Ontology items to explore

   	Credits || Copyright © 2013 AutomobileOntology.

Home

Multimedia Search

SPARQL Endpoint

Ontology Tour

Credits

Select From Here and Get Your Query FulFill

	<form name="formName1">
  <select name="text" onChange="dosubmit()">
  <option id="a1">Select From Here</option>
  <option id="a2">Pulsar_220</option>
  <option id="a3">Apache_RTR</option>
  <option id="a4">Tug_Boat</option>
  <option id="a5">Civilian_ship</option>
  <option id="a6">Carrier_Ship</option>
  <option id="a7">Maersk_Line</option>
  <option id="a8">Dhow_Ship</option>
  <option id="a9">Desert_Car</option>
  <option id="a10">Range_Rover_Evoque</option>
  <option id="a11">Subaru_Forester</option>
  <option id="a12">Evo_x_rs_Road</option>
  <option id="a13">Lancer_Evolution</option>
  <option id="a14">Nissan_Leaf</option>
  <option id="a15">Airways_Fighter</option>
  <option id="a16">Cessna_Citation_cj4</option>
  <option id="a17">Fighter_Plane</option>
  <option id="a18">Electric_car</option>
  <option id="a19">Government_Bus</option>
  <option id="a20">Red_Dtc</option>
  <option id="a21">Metro</option>
  <option id="a22">Kolkata_Metro</option>
  <option id="a23">Delhi_Metro</option>
  <option id="a24">Military_Ship</option>
  <option id="a25">Uss_Arizona</option>
  <option id="a26">Hms_Hood</option>
  <option id="a27">Mono_Rail</option>
  <option id="a28">Kuala_lumpur_Mono_Rail</option>
  <option id="a29">Mumbai_Mono_Rail</option>
  <option id="a30">Personal_Car</option>
  <option id="a31">Honda_Civic</option>
  <option id="a32">Hyundai_Accent</option>
  <option id="a33">Maruti_Alto</option>
  <option id="a34">Maruti_Suzuki_Swift</option>
  <option id="a35">Passenger_Plane</option>
  <option id="a36">Air_India</option>
  <option id="a37">Private_Bus</option>
  <option id="a38">Volvo_bus</option>
  <option id="a39">Space_shuttle</option>
  <option id="a40">Discovery_Space_Shuttle</option>
  <option id="a41">Apollo_Space_Shuttle</option>
  <option id="a42">Sports_Car</option>
  <option id="a43">Bmw_M3</option>
  <option id="a44">Bmw_x3</option>
  <option id="a45">A7_Sportback</option>
  <option id="a46">Aston_Martin_db9</option>
  <option id="a47">Bmw_z4</option>
  <option id="a48">Bmw_750</option>
  <option id="a49">Audi_r8_grand_am</option>
  <option id="a50">Porsche_911sc</option>
  <option id="a51">Fiat_x1_9</option>
  <option id="a52">Audi_r8</option>
  <option id="a53">Bmw_z1</option>
  <option id="a54">Taxi</option>
  <option id="a55">Innova</option>
  <option id="a56">Indica</option>
  <option id="a57">Truck_Transportation</option>
  <option id="a58">Amw_Truck</option>
  <option id="a59">Bike</option>
</select>
</form>

	 <form action="" method="get" onsubmit="return checkForm(this)" name="formName2">
     <input type="text" name="Keywords" size="50" id="field">

<input type="submit" value="Get" style="position:relative; width: 80px; height: 30px;" onclick=""/>

<input type="reset" value="Reset" style="position:relative; width: 70px; height: 30px;" id="reset"/>
</form>

 Video

 <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="320" height="200"
      poster="images/logo1.png"
      data-setup="{}">
    <source src="Video/---Ghost Ryderz Show at CET -u0026 VIT with the Pulsar 200NS_2.mp4" type='video/mp4' />

    <track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track>
    <track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track>
  </video>

 <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="320" height="200"
      poster="images/logo1.png"
      data-setup="{}">
    <source src="Video/2013.mp4" type='video/mp4' />

    <track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track>
    <track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track>
  </video>

 <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="320" height="200"
      poster="images/logo1.png"
      data-setup="{}">
    <source src="Video/CARS 2 movie trailer official 2011 - YouTube.mp4" type='video/mp4' />

    <track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track>
    <track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track>
  </video>

 <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="320" height="200"
      poster="images/logo1.png"
      data-setup="{}">
    <source src="Video/CARS 2 movie trailer official 2011 - YouTube.mp4" type='video/mp4' />

    <track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track>
    <track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track>
  </video>

 Images Show

Website Slideshow Maker by WOWSlider.com v4.8


text:
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="/assets/js/jquery.waypoints.min.js"></script>
<script src="/assets/js/shortcuts/sticky.min.js"></script>
<script src="/assets/js/shortcuts/inview.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/force-js/0.1.1/force.min.js"></script>
<script type="text/javascript">
force.bindHashes();
jQuery(document).ready(function(e) {
  var $stickymenu = $('.waypoint')

  var sticky = new Waypoint.Sticky({
    element: $stickymenu,
    stuckClass: 'fixed-l w-100-l top-0'
  });

  {% assign sections = site.collections | where: 'primary_section', true  %}
  {% for section in sections  %}

  var inview = new Waypoint.Inview({
    element: $('#{{ section.label }}')[0],
    enter: function(direction) {
      console.log('Enter triggered with direction ' + direction)
      $('#menu .{{ section.label }} a').addClass('white')
    },
    exited: function(direction) {
      console.log('Exit triggered with direction ' + direction)
      $('#menu .{{ section.label }} a').removeClass('white').addClass('white-40')
    }
  })

  {% endfor %}

});

</script>


text:
ActiveRecord::Schema.define(version: 20141203124424) do

  create_table "jsonforem_categories", force: true do |t|
    t.string   "title"
    t.string   "description"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "jsonforem_forums", force: true do |t|
    t.string   "title"
    t.string   "description"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "jsonforem_categories_id"
  end

  add_index "jsonforem_forums", ["jsonforem_categories_id"], name: "index_jsonforem_forums_on_jsonforem_categories_id"

  create_table "jsonforem_posts", force: true do |t|
    t.string   "title"
    t.text     "content"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "jsonforem_topics_id"
    t.integer  "jsonforem_posts_id"
    t.integer  "user_id"
  end

  add_index "jsonforem_posts", ["jsonforem_posts_id"], name: "index_jsonforem_posts_on_jsonforem_posts_id"
  add_index "jsonforem_posts", ["jsonforem_topics_id"], name: "index_jsonforem_posts_on_jsonforem_topics_id"

  create_table "jsonforem_topics", force: true do |t|
    t.string   "title"
    t.string   "description"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "jsonforem_forums_id"
  end

  add_index "jsonforem_topics", ["jsonforem_forums_id"], name: "index_jsonforem_topics_on_jsonforem_forums_id"

  create_table "users", force: true do |t|
    t.string   "name"
    t.string   "email"
    t.string   "password"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

end


text:
package com.equalize.xpi.util.converter;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import javax.xml.bind.DatatypeConverter;

public class ConversionBase64Encode {
	private final byte[] content;

	public ConversionBase64Encode(byte[] content) {
		this.content = content;
	}

	public String encode(boolean compress, String filename) throws IOException {
		byte[] bytes;
		if(compress) {
			// Zip the content
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			ZipOutputStream	zos = new ZipOutputStream(baos);
			zos.putNextEntry(new ZipEntry(filename));
			zos.write(this.content);
			zos.closeEntry();
			zos.close();
			bytes = baos.toByteArray();
		} else {
			bytes = this.content;
		}
		return DatatypeConverter.printBase64Binary(bytes);
	}

	public String encode() throws IOException {
		return encode(false, "");
	}
}


text:
<?php

/**
 * The "configs" collection of methods.
 * Typical usage is:
 *  <code>
 *   $servicemanagementService = new Google_Service_ServiceManagement(...);
 *   $configs = $servicemanagementService->configs;
 *  </code>
 */
class Google_Service_ServiceManagement_Resource_ServicesConfigs extends Google_Service_Resource
{
  /**
   * Creates a new service configuration (version) for a managed service. This
   * method only stores the service configuration. To roll out the service
   * configuration to backend systems please call CreateServiceRollout.
   *
   * Only the 100 most recent service configurations and ones referenced by
   * existing rollouts are kept for each service. The rest will be deleted
   * eventually. (configs.create)
   *
   * @param string $serviceName The name of the service.  See the [overview
   * ](/service-management/overview) for naming requirements.  For example:
   * `example.googleapis.com`.
   * @param Google_Service_ServiceManagement_Service $postBody
   * @param array $optParams Optional parameters.
   * @return Google_Service_ServiceManagement_Service
   */
  public function create($serviceName, Google_Service_ServiceManagement_Service $postBody, $optParams = array())
  {
    $params = array('serviceName' => $serviceName, 'postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('create', array($params), "Google_Service_ServiceManagement_Service");
  }
  /**
   * Gets a service configuration (version) for a managed service. (configs.get)
   *
   * @param string $serviceName The name of the service.  See the [overview
   * ](/service-management/overview) for naming requirements.  For example:
   * `example.googleapis.com`.
   * @param string $configId The id of the service configuration resource.
   *
   * This field must be specified for the server to return all fields, including
   * `SourceInfo`.
   * @param array $optParams Optional parameters.
   *
   * @opt_param string view Specifies which parts of the Service Config should be
   * returned in the response.
   * @return Google_Service_ServiceManagement_Service
   */
  public function get($serviceName, $configId, $optParams = array())
  {
    $params = array('serviceName' => $serviceName, 'configId' => $configId);
    $params = array_merge($params, $optParams);
    return $this->call('get', array($params), "Google_Service_ServiceManagement_Service");
  }
  /**
   * Lists the history of the service configuration for a managed service, from
   * the newest to the oldest. (configs.listServicesConfigs)
   *
   * @param string $serviceName The name of the service.  See the [overview
   * ](/service-management/overview) for naming requirements.  For example:
   * `example.googleapis.com`.
   * @param array $optParams Optional parameters.
   *
   * @opt_param string pageToken The token of the page to retrieve.
   * @opt_param int pageSize The max number of items to include in the response
   * list.
   * @return Google_Service_ServiceManagement_ListServiceConfigsResponse
   */
  public function listServicesConfigs($serviceName, $optParams = array())
  {
    $params = array('serviceName' => $serviceName);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Google_Service_ServiceManagement_ListServiceConfigsResponse");
  }
  /**
   * Creates a new service configuration (version) for a managed service based on
   * user-supplied configuration source files (for example: OpenAPI
   * Specification). This method stores the source configurations as well as the
   * generated service configuration. To rollout the service configuration to
   * other services, please call CreateServiceRollout.
   *
   * Only the 100 most recent configuration sources and ones referenced by
   * existing service configurtions are kept for each service. The rest will be
   * deleted eventually.
   *
   * Operation (configs.submit)
   *
   * @param string $serviceName The name of the service.  See the [overview
   * ](/service-management/overview) for naming requirements.  For example:
   * `example.googleapis.com`.
   * @param Google_Service_ServiceManagement_SubmitConfigSourceRequest $postBody
   * @param array $optParams Optional parameters.
   * @return Google_Service_ServiceManagement_Operation
   */
  public function submit($serviceName, Google_Service_ServiceManagement_SubmitConfigSourceRequest $postBody, $optParams = array())
  {
    $params = array('serviceName' => $serviceName, 'postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('submit', array($params), "Google_Service_ServiceManagement_Operation");
  }
}


text:
/*
 * For comments regarding functions please see the header file.
 */

#include "guichan/keyinput.hpp"

namespace gcn
{
    KeyInput::KeyInput(const Key& key, unsigned int type)
            :mKey(key),
             mType(type),
             mShiftPressed(false),
             mControlPressed(false),
             mAltPressed(false),
             mMetaPressed(false),
             mNumericPad(false)
    {

    }

    void KeyInput::setType(unsigned int type)
    {
        mType = type;
    }

    int KeyInput::getType() const
    {
        return mType;
    }

    void KeyInput::setKey(const Key& key)
    {
        mKey = key;
    }

    const Key& KeyInput::getKey() const
    {
        return mKey;
    }

    bool KeyInput::isShiftPressed() const
    {
        return mShiftPressed;
    }

    void KeyInput::setShiftPressed(bool pressed)
    {
        mShiftPressed = pressed;
    }

    bool KeyInput::isControlPressed() const
    {
        return mControlPressed;
    }

    void KeyInput::setControlPressed(bool pressed)
    {
        mControlPressed = pressed;
    }

    bool KeyInput::isAltPressed() const
    {
        return mAltPressed;
    }

    void KeyInput::setAltPressed(bool pressed)
    {
        mAltPressed = pressed;
    }

    bool KeyInput::isMetaPressed() const
    {
        return mMetaPressed;
    }

    void KeyInput::setMetaPressed(bool pressed)
    {
        mMetaPressed = pressed;
    }

    bool KeyInput::isNumericPad() const
    {
        return mNumericPad;
    }

    void KeyInput::setNumericPad(bool numpad)
    {
        mNumericPad = numpad;
    }
}


text:
package net.smart_eapp.photo;

import java.io.InputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

import net.smart_eapp.ActionItem;
import net.smart_eapp.BookStarter;
import net.smart_eapp.QuickAction;
import net.smart_eapp.R;
import net.smart_eapp.ScaleImageView;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.Display;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class PageActivity extends Activity {
	private final static int REQUEST_SHOW_INDEX = 10;
	int mPosition = 0;
	int mCount;
	PhotoViewPager mDragable;
	RelativeLayout mTopMenu;
	View mActionMenu;
	QuickAction mActionBar;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.photo_page_activity);

		mActionMenu = findViewById(R.id_photo_page_fragment.title);
		mDragable = (PhotoViewPager) findViewById(R.id_photo_page_fragment.dragable);
		mPosition = getIntent().getExtras().getInt(BookStarter.INTENT_PAGE);
		mCount = BookStarter.getBook().getPageCount();

		PhotoAdapter adapter = new PhotoAdapter(this);
		mDragable.setAdapter(adapter);
		mDragable.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
			@Override
			public void onPageSelected(int position) {
				mPosition = position;
				settingMenu(position);
				// 2ページ前、後を優先的に削除する
				for (int i = 0; i < mDragable.getChildCount(); i++) {
					View v = mDragable.getChildAt(i);
					int viewPosition = (Integer) v.getTag();
					ScaleImageView image = (ScaleImageView) v.findViewById(R.id_photo_page_adapter.image);
					if (viewPosition <= mPosition - 2 || viewPosition >= mPosition + 2) {
						destroyView(v);
					} else {
						if (image.getDrawable() == null) {
							mDragable.removeViewAt(i);
							View view = createView(v, position);
							mDragable.addView(view, i);
						}
					}
				}
			}

			@Override
			public void onPageScrolled(int arg0, float arg1, int arg2) {
			}

			@Override
			public void onPageScrollStateChanged(int arg0) {
			}
		});
		mDragable.setCurrentItem(mPosition);
		settingMenu(mPosition);
		mDragable.getAdapter().notifyDataSetChanged();
		mTopMenu = (RelativeLayout) findViewById(R.id_photo_page_fragment.top);
	}

	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
		if (mActionBar != null) {
			mActionBar.close();
		}
	}

	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		switch (requestCode) {
		case REQUEST_SHOW_INDEX:
			if (resultCode == RESULT_OK) {
				int page = data.getIntExtra(BookStarter.INTENT_PAGE, 0);
				moveToScreen(page);
			}
		}
	}

	@Override
	protected void onDestroy() {
		for (int i = 0; i < mDragable.getChildCount(); i++) {
			View v = mDragable.getChildAt(i);
			destroyView(v);
		}
		super.onDestroy();
	}

	class PhotoAdapter extends PagerAdapter {

		public PhotoAdapter(Context context) {

		}

		@Override
		public void destroyItem(View collection, int position, Object view) {
			destroyView((View) view);
			((PhotoViewPager) collection).removeView((FrameLayout) view);
		}

		@Override
		public void finishUpdate(View arg0) {
		}

		@Override
		public int getCount() {
			return mCount;
		}

		@Override
		public Object instantiateItem(View collection, int position) {
			View v = createView(collection, position);
			((PhotoViewPager) collection).addView(v);
			return v;
		}

		@Override
		public boolean isViewFromObject(View arg0, Object arg1) {
			return arg0 == ((FrameLayout) arg1);
		}

		@Override
		public void restoreState(Parcelable arg0, ClassLoader arg1) {
		}

		@Override
		public Parcelable saveState() {
			return null;
		}

		@Override
		public void startUpdate(View arg0) {

		}
	}

	public void settingMenu(int position) {
		TextView title = (TextView) findViewById(R.id_photo_page_fragment.title);
		title.setText(String.valueOf(position + 1) + "/" + String.valueOf(mCount) + "▼");
		title.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				openActionBar();
			}
		});
		ImageView left = (ImageView) findViewById(R.id_photo_page_fragment.left_image);
		if (position == 0) {
			left.setImageResource(R.drawable.left_disable);
		} else {
			left.setImageResource(R.drawable.left_selector);
			left.setOnClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {
					boolean isPending = false;
					try {
						Field field = mDragable.getClass().getSuperclass().getDeclaredField("mPopulatePending");
						field.setAccessible(true);
						isPending = field.getBoolean(mDragable);
					} catch (Exception e) {
						e.printStackTrace();
					}
					if (!isPending) {
						snapToScreen(mPosition - 1);
					}
				}
			});
		}
		ImageView right = (ImageView) findViewById(R.id_photo_page_fragment.right_image);
		if (position >= mCount - 1) {
			right.setImageResource(R.drawable.right_disable);
		} else {
			right.setImageResource(R.drawable.right_selector);
			right.setOnClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {
					boolean isPending = false;
					try {
						Field field = mDragable.getClass().getSuperclass().getDeclaredField("mPopulatePending");
						field.setAccessible(true);
						isPending = field.getBoolean(mDragable);
					} catch (Exception e) {
						e.printStackTrace();
					}
					if (!isPending) {
						snapToScreen(mPosition + 1);
					}
				}
			});
		}
	}

	public View createView(View collection, int position) {
		LayoutInflater inflater = LayoutInflater.from(this);
		View view = inflater.inflate(R.layout.photo_page_adapter, null);
		final ScaleImageView image = (ScaleImageView) view.findViewById(R.id_photo_page_adapter.image);
		image.setBackgroundColor(Color.parseColor(BookStarter.getBook().getPageBackground()));
		image.addSingleTapConfirmedListener(new ScaleImageView.SingleTapEvent() {
			@Override
			public void doEvent() {
				if (mTopMenu.getVisibility() == View.VISIBLE) {
					mTopMenu.setVisibility(View.GONE);
				} else {
					mTopMenu.setVisibility(View.VISIBLE);
				}
			}
		});

		image.addEdgeEventListener(new ScaleImageView.EdgeEvent() {
			@Override
			public void onRelease() {
				mDragable.setLeft(false);
			}

			@Override
			public void onEdge() {
				mDragable.setLeft(true);
			}
		}, new ScaleImageView.EdgeEvent() {
			@Override
			public void onRelease() {
				mDragable.setRight(false);
			}

			@Override
			public void onEdge() {
				mDragable.setRight(true);
			}
		});

		try {

			WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
			Display disp = wm.getDefaultDisplay();
			int width = disp.getWidth();

			InputStream is = BookStarter.getBook().getPageImage(position + 1);
			Bitmap bm = BitmapFactory.decodeStream(is);
			float scale = ((float) width / (float) bm.getWidth());

			Matrix matrix = new Matrix();
			matrix.postScale(scale, scale);

			Bitmap resultBitmap = Bitmap.createBitmap((int) (bm.getWidth() * scale), (int) (bm.getHeight() * scale),
					Bitmap.Config.ARGB_8888);
			Canvas canvas = new Canvas(resultBitmap);
			BitmapDrawable drawable = new BitmapDrawable(bm);
			drawable.setBounds(0, 0, (int) (bm.getWidth() * scale), (int) (bm.getHeight() * scale));
			drawable.draw(canvas);
			bm.recycle();
			image.setImageBitmap(resultBitmap);

		} catch (Exception e) {
			e.printStackTrace();
		}

		view.setTag(position);
		return view;
	}

	public void destroyView(View view) {
		ScaleImageView image = (ScaleImageView) ((FrameLayout) view).findViewById(R.id_photo_page_adapter.image);
		Drawable d = image.getDrawable();
		if (d instanceof BitmapDrawable) {
			BitmapDrawable bitmapDrawable = (BitmapDrawable) d;
			Bitmap bitmap = bitmapDrawable.getBitmap();
			bitmap.recycle();
		}
		image.setImageDrawable(null);
	}

	public void moveToScreen(int position) {
		try {
			Field field = mDragable.getClass().getSuperclass().getDeclaredField("mPopulatePending");
			field.setAccessible(true);
			field.setBoolean(mDragable, true);
			Method method = mDragable
					.getClass()
					.getSuperclass()
					.getDeclaredMethod("setCurrentItemInternal",
							new Class[] { int.class, boolean.class, boolean.class });
			method.setAccessible(true);
			method.invoke(mDragable, new Object[] { position, false, true });
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void snapToScreen(int position) {
		try {
			Field field = mDragable.getClass().getSuperclass().getDeclaredField("mPopulatePending");
			field.setAccessible(true);
			field.setBoolean(mDragable, true);
			Method method = mDragable
					.getClass()
					.getSuperclass()
					.getDeclaredMethod("setCurrentItemInternal",
							new Class[] { int.class, boolean.class, boolean.class });
			method.setAccessible(true);
			method.invoke(mDragable, new Object[] { position, true, true });
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void openActionBar() {
		if (mTopMenu.getVisibility() == View.GONE) {
			mTopMenu.setVisibility(View.VISIBLE);
		}

		mActionBar = new QuickAction(mActionMenu);
		ActionItem item1 = new ActionItem();
		item1.setTitle(getString(R.string.photo_show_index));
		item1.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(PageActivity.this, PageListActivity.class);
				startActivityForResult(intent, REQUEST_SHOW_INDEX);
				mActionBar.close();
			}
		});
		ActionItem item2 = new ActionItem();
		item2.setTitle(getString(R.string.photo_move_top));
		item2.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				moveToScreen(0);
				mActionBar.close();
			}
		});
		mActionBar.addActionItem(item1);
		mActionBar.addActionItem(item2);
		mActionBar.show();
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_MENU) {
			openActionBar();
		}
		return super.onKeyDown(keyCode, event);
	}
}


text:
<!DOCTYPE html>

  <link href='http://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css' />
  <meta charset="UTF-8">
  <link type="text/css" rel="stylesheet" href="../stylesheets/blog-stylesheet.css" />
  <title> Michael Avtonomoff </title>

Michael Avtonomoff

    <trow>

        Home

        Projects

        Blog

        About Me

    </trow>

Blog Entries

  17. Cultural Blog - Conflict

  16. Big O Complexity and Notation

  15. Cheat Sheet: Hashes, Arrays, Strings,  Integers

  14. Cultural Blog - Affirmation and Stereotype Threat

  13. Ruby Hashes vs Javascript Objects

  12. Stereotype Threat

  11. Technical Blog: Object-Oriented Programming vs Functional Programming

  10. Cultural Blog: Pairing and Feedback

  9. Classes and Your Bear RPG

  8. The Scourge of Legacy Software

  7. Enumerable Methods

  6. Peer Pairing and You

  5. Thinking Styles and Mindsets

  4. Arrays and Hashes in Ruby

  3. CSS Design

  2. Chef's Kitchen

  1. Gitty With Git

  GitHub


text:
package org.apache.geode.cache30;

import java.util.Properties;

import org.apache.geode.cache.Declarable;
import org.apache.geode.cache.TransactionEvent;
import org.apache.geode.cache.TransactionWriter;
import org.apache.geode.cache.TransactionWriterException;

public class TestTransactionWriter implements TransactionWriter, Declarable {

  @Override
  public void beforeCommit(TransactionEvent event) throws TransactionWriterException {
    // TODO Auto-generated method stub

  }

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

  }

  @Override
  public void init(Properties props) {
    // TODO Auto-generated method stub

  }

}


text:
using System;
using System.Collections.Generic;
using Azure.Core;

namespace Azure.ResourceManager.MachineLearning.Models
{
    /// <summary> Column transformer parameters. </summary>
    public partial class ColumnTransformer
    {
        /// <summary> Initializes a new instance of ColumnTransformer. </summary>
        public ColumnTransformer()
        {
            Fields = new ChangeTrackingList<string>();
        }

        /// <summary> Initializes a new instance of ColumnTransformer. </summary>
        /// <param name="fields"> Fields to apply transformer logic on. </param>
        /// <param name="parameters">
        /// Different properties to be passed to transformer.
        /// Input expected is dictionary of key,value pairs in JSON format.
        /// </param>
        internal ColumnTransformer(IList<string> fields, BinaryData parameters)
        {
            Fields = fields;
            Parameters = parameters;
        }

        /// <summary> Fields to apply transformer logic on. </summary>
        public IList<string> Fields { get; set; }
        /// <summary>
        /// Different properties to be passed to transformer.
        /// Input expected is dictionary of key,value pairs in JSON format.
        /// <para>
        /// To assign an object to this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
        /// </para>
        /// <para>
        /// To assign an already formated json string to this property use <see cref="BinaryData.FromString(string)"/>.
        /// </para>
        /// <para>
        /// Examples:
        /// <list type="bullet">
        /// <item>
        /// <term>BinaryData.FromObjectAsJson("foo")</term>
        /// <description>Creates a payload of "foo".</description>
        /// </item>
        /// <item>
        /// <term>BinaryData.FromString("\"foo\"")</term>
        /// <description>Creates a payload of "foo".</description>
        /// </item>
        /// <item>
        /// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
        /// <description>Creates a payload of { "key": "value" }.</description>
        /// </item>
        /// <item>
        /// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
        /// <description>Creates a payload of { "key": "value" }.</description>
        /// </item>
        /// </list>
        /// </para>
        /// </summary>
        public BinaryData Parameters { get; set; }
    }
}


text:
<?php
namespace jk204\SIMalliance\ASN1;

use FG\ASN1\Universal\Sequence;

class peGSMAccess extends Sequence
{

}


text:
class RemoveMiqLicenseModelsAndTable < ActiveRecord::Migration[4.2]
  def up
    drop_table :miq_license_contents
  end

  def down
    create_table :miq_license_contents do |t|
      t.text     :contents
      t.boolean  :active
      t.datetime :created_on
      t.datetime :updated_on
    end
  end
end