text:
package de.linearbits.suda2;

/**
 * Abstract base class providing rudimentary timing methods
 *
 * @author Raffael Bild
 * @author Fabian Prasser
 */
public abstract class Timeable {

    /** Whether timing is enabled */
    private static final boolean ENABLED                    = false;

    /** Index */
    public static final int      TYPE_INT_SET_BITS          = 0;
    /** Index */
    public static final int      TYPE_INT_SET_HASH          = 1;
    /** Index */
    public static final int      TYPE_INT_SET_SMALL         = 2;
    /** Index */
    public static final int      TYPE_COUNT                 = 3;
    /** Index */
    public static final int      METHOD_PROJECTION          = 0;
    /** Index */
    public static final int      METHOD_COUNT               = 1;
    /** Index */
    public static final int      TYPE_METHOD_SPECIALROW     = 0;
    /** Index */
    public static final int      TYPE_METHOD_SUPPORTROW     = 1;
    /** Index */
    public static final int      TYPE_METHOD_INTERSECTION   = 2;
    /** Index */
    public static final int      TYPE_METHOD_COUNT          = 3;

    /** Data */
    public static long[]         instanceCount              = new long[TYPE_COUNT];
    /** Data */
    public static long[]         methodCallTime             = new long[METHOD_COUNT];
    /** Data */
    public static long[]         methodCallCount            = new long[METHOD_COUNT];
    /** Data */
    public static long[][]       typeMethodCallTime         = new long[TYPE_COUNT][TYPE_METHOD_COUNT];
    /** Data */
    public static long[][]       typeMethodCallCount        = new long[TYPE_COUNT][TYPE_METHOD_COUNT];
    /** Data */
    public static long[][][]     typeMethodSizeCountBuckets = new long[TYPE_COUNT][TYPE_METHOD_COUNT][7];
    /** Data */
    public static long[][][]     typeMethodSizeTimeBuckets  = new long[TYPE_COUNT][TYPE_METHOD_COUNT][7];

    /**
     * Timing overview
     */
    public static void printOverview() {
        System.out.println(" - Hash");
        printTypeMethodOverview("Intersection", TYPE_INT_SET_HASH, TYPE_METHOD_INTERSECTION);
        printTypeMethodOverview("SpecialRow", TYPE_INT_SET_HASH, TYPE_METHOD_SPECIALROW);
        System.out.println(" - Bits");
        printTypeMethodOverview("Intersection", TYPE_INT_SET_BITS, TYPE_METHOD_INTERSECTION);
        printTypeMethodOverview("SpecialRow", TYPE_INT_SET_BITS, TYPE_METHOD_SPECIALROW);
        System.out.println(" - Jump");
        printTypeMethodOverview("Intersection", TYPE_INT_SET_SMALL, TYPE_METHOD_INTERSECTION);
        printTypeMethodOverview("SpecialRow", TYPE_INT_SET_SMALL, TYPE_METHOD_SPECIALROW);
    }

    /**
     * Resets all timers
     */
    public static void reset() {
        instanceCount              = new long[TYPE_COUNT];
        methodCallTime             = new long[METHOD_COUNT];
        methodCallCount            = new long[METHOD_COUNT];
        typeMethodCallTime         = new long[TYPE_COUNT][TYPE_METHOD_COUNT];
        typeMethodCallCount        = new long[TYPE_COUNT][TYPE_METHOD_COUNT];
        typeMethodSizeCountBuckets = new long[TYPE_COUNT][TYPE_METHOD_COUNT][7];
        typeMethodSizeTimeBuckets  = new long[TYPE_COUNT][TYPE_METHOD_COUNT][7];
    }

    /**
     * Timing overview
     */
    private static void printTypeMethodOverview(String label, int type, int method) {
        double ops = typeMethodCallCount[type][method] == 0d ? 0d : typeMethodCallTime[type][method] / typeMethodCallCount[type][method];
        double tmTime = (int)(typeMethodCallTime[type][method] / 1000000d);
        System.out.println("   * " + label+ ": " + tmTime +" ms, " + typeMethodCallCount[type][method] + " ops (" + ops +" ns / op)");
    }

    /** Time stamp*/
    long time;

    /**
     * Returns the index of a bucket for a given size
     * @param size
     */
    private int getBucketIndex(int size) {
        if (size <= 10) return 0;
        else if (size <= 100) return 1;
        else if (size <= 1000) return 2;
        else if (size <= 10000) return 3;
        else if (size <= 100000) return 4;
        else if (size <= 1000000) return 5;
        else return 6;
    }

    /**
     * End timing of a method invocation
     * @param method
     */
    protected void endTiming(int method) {
        if (ENABLED) {
            methodCallTime[method] = System.nanoTime() - time;
            methodCallCount[method]++;
        }
    }

    /**
     * End timing of a method of a type with a given size
     * @param type
     * @param size
     */
    protected void endTiming(int type, int method, int size) {
        if (ENABLED) {
            long endTime = System.nanoTime() - time;
            typeMethodCallTime[type][method] += endTime;
            typeMethodCallCount[type][method]++;
            int bucket = getBucketIndex(size);
            typeMethodSizeCountBuckets[type][method][bucket]++;
            typeMethodSizeTimeBuckets[type][method][bucket] += endTime;
        }
    }

    /**
     * Track the creation of an instance
     * @param type
     */
    protected void instance(int type) {
        if (ENABLED) {
            instanceCount[type]++;
        }
    }

    /**
     * Start timing
     */
    protected void startTiming() {
        if (ENABLED) {
            time = System.nanoTime();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
require_relative 'link'

class Bukovina::Importers::LanguageLink < Bukovina::Importers::Link

   def import
      @attrs.each do |attrs|
         memory_attrs = attrs.delete( :memory )
         attrs[ :info ] = Memory.where( memory_attrs ).first

         self.class::TYPE.to_s.constantize.where( attrs ).first_or_create
         end ; end ; end


text:
package org.wildfly.extension.cassandra;

import org.jboss.as.controller.AttributeDefinition;
import org.jboss.as.controller.PersistentResourceDefinition;
import org.jboss.as.controller.ReloadRequiredRemoveStepHandler;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
 * @author Heiko Braun
 * @since 20/08/14
 */
public class RootDefinition extends PersistentResourceDefinition {
    public static final RootDefinition INSTANCE = new RootDefinition();

       private RootDefinition() {
           super(CassandraExtension.SUBSYSTEM_PATH,
                   CassandraExtension.getResourceDescriptionResolver(),
                   RootAdd.INSTANCE,
                   ReloadRequiredRemoveStepHandler.INSTANCE);
       }

       @Override
       public Collection<AttributeDefinition> getAttributes() {
           return Collections.emptySet();
       }

       @Override
       protected List<? extends PersistentResourceDefinition> getChildren() {
           return Arrays.asList(ClusterDefinition.INSTANCE);
       }
}


text:
<?php
/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] );
   Description: Renames a file or directory
*/

echo "*** Testing rename() for error conditions ***\n";
//Zero argument
var_dump( rename() );

// less than expected,1 argument
var_dump( rename(__FILE__) );

// more than expected no. of arguments
$context = stream_context_create();
$filename = __FILE__;
$new_filename = __FILE__.".tmp";
var_dump( rename($filename, $new_filename, $context, "extra_args") );

echo "Done\n";
?>


text:
<?php
	header("Content-Type: text/html; charset=utf-8");
	include 'common.php';

	if($_POST) {
		//check required fields
		if(!$_POST['SongID'] || !$_POST['PlayerDigitsID'] || !$_POST['Score'] || !$_POST['ArchivedDate']) {
			echo "Check required fields";
			exit();
		}

		// start db
		connectToDB();

		// clean input
		$safe_song_id = mysqli_real_escape_string($mysqli, $_POST['SongID']);
		$safe_player_digits_id = mysqli_real_escape_string($mysqli, $_POST['PlayerDigitsID']);
		$safe_score = mysqli_real_escape_string($mysqli, $_POST['Score']);
		$safe_date = mysqli_real_escape_string($mysqli, $_POST['ArchivedDate']);

		// get the id of this record, if it exists
		$get_score_id_query = "SELECT ID FROM Score WHERE SongID = '" . $safe_song_id . "' AND PlayerDigitsID = '" . $safe_player_digits_id . "'";
		$get_score_response = mysqli_query($mysqli, $get_score_id_query) or die(mysqli_error($mysqli));

		// check if the record already exists
		if(mysql_num_rows($get_score_response) != 0) {
			// update if it does
			$edit_score_query = "UPDATE Score SET Score = '" . $safe_score . "', ArchivedDate = '" . $safe_date . "' WHERE SongID = " . $safe_song_id . "AND PlayerDigitsID = " . $safe_player_digits_id;
			$edit_score_response = mysqli_query($mysqli, $edit_score_query) or die(mysqli_error($mysqli));

			mysqli_free_result($edit_score_response);

		} else {

			// insert our record if it doesn't
			$add_score_query = "INSERT INTO Score (SongID, PlayerDigitsID, Score, ArchivedDate) VALUES ('" . $safe_song_id . ", " . $safe_player_digits_id . ", " . $safe_score . ", " . $safe_date . "')";
			$add_score_response = mysqli_query($mysqli, $add_score_query) or die(mysqli_error($mysqli));

			// get id
			$score_id = mysqli_insert_id($mysqli);

			// echo records
			echo "Score $score_id added.";

			mysqli_free_result($add_score_response);
		}

		mysqli_close($mysqli);
	}

?>


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">

  <title>Qt 4.3: List of All Members for Q3TextEdit</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />

  	Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

List of All Members for Q3TextEdit

This is the complete list of members for Q3TextEdit, including inherited members.

flags AutoFormatting

enum AutoFormattingFlag

enum CursorAction

enum KeyboardAction

enum PaintDeviceMetric

enum RenderFlag

flags RenderFlags

enum ResizePolicy

enum ScrollBarMode

enum Shadow

enum Shape

enum StyleMask

enum VerticalAlignment

enum WordWrap

enum WrapPolicy

Q3TextEdit ( const QString &, const QString &, QWidget *, const char * )

Q3TextEdit ( QWidget *, const char * )

~Q3TextEdit ()

acceptDrops () const : bool

accessibleDescription () const : QString

accessibleName () const : QString

actionEvent ( QActionEvent * )

actions () const : QList<QAction *>

activateWindow ()

addAction ( QAction * )

addActions ( QList<QAction *> )

addChild ( QWidget *, int, int )

adjustSize ()

alignment () const : int

anchorAt ( const QPoint &, Qt::AnchorAttribute ) : QString

append ( const QString & )

autoFillBackground () const : bool

autoFormatting () const : AutoFormatting

backgroundRole () const : QPalette::ColorRole

baseSize () const : QSize

blockSignals ( bool ) : bool

bold () const : bool

bottomMargin () const : int

center ( int, int )

center ( int, int, float, float )

changeEvent ( QEvent * )

charAt ( const QPoint &, int * ) const : int

childAt ( int, int ) const : QWidget *

childAt ( const QPoint & ) const : QWidget *

childEvent ( QChildEvent * )

childX ( QWidget * ) : int

childY ( QWidget * ) : int

children () const : const QObjectList &

childrenRect () const : QRect

childrenRegion () const : QRegion

clear ()

clearFocus ()

clearMask ()

clearParagraphBackground ( int )

clicked ( int, int )

clipper () const : QWidget *

close () : bool

closeEvent ( QCloseEvent * )

color () const : QColor

connect ( const QObject *, const char *, const QObject *, const char *, Qt::ConnectionType ) : bool

connect ( const QObject *, const char *, const char *, Qt::ConnectionType ) const : bool

connectNotify ( const char * )

contentsContextMenuEvent ( QContextMenuEvent * )

contentsDragEnterEvent ( QDragEnterEvent * )

contentsDragLeaveEvent ( QDragLeaveEvent * )

contentsDragMoveEvent ( QDragMoveEvent * )

contentsDropEvent ( QDropEvent * )

contentsHeight () const : int

contentsMouseDoubleClickEvent ( QMouseEvent * )

contentsMouseMoveEvent ( QMouseEvent * )

contentsMousePressEvent ( QMouseEvent * )

contentsMouseReleaseEvent ( QMouseEvent * )

contentsMoving ( int, int )

contentsRect () const : QRect

contentsToViewport ( int, int, int &, int & ) const

contentsToViewport ( const QPoint & ) const : QPoint

contentsWheelEvent ( QWheelEvent * )

contentsWidth () const : int

contentsX () const : int

contentsY () const : int

context () const : QString

contextMenuEvent ( QContextMenuEvent * )

contextMenuPolicy () const : Qt::ContextMenuPolicy

copy ()

copyAvailable ( bool )

cornerWidget () const : QWidget *

create ( WId, bool, bool )

createPopupMenu ( const QPoint & ) : Q3PopupMenu *

createPopupMenu () : Q3PopupMenu *

currentAlignmentChanged ( int )

currentColorChanged ( const QColor & )

currentFont () const : QFont

currentFontChanged ( const QFont & )

currentVerticalAlignmentChanged ( Q3TextEdit::VerticalAlignment )

cursor () const : QCursor

cursorPositionChanged ( int, int )

customContextMenuRequested ( const QPoint & )

customEvent ( QEvent * )

cut ()

del ()

deleteLater ()

depth () const : int

destroy ( bool, bool )

destroyed ( QObject * )

disconnect ( const QObject *, const char *, const QObject *, const char * ) : bool

disconnect ( const char *, const QObject *, const char * ) : bool

disconnect ( const QObject *, const char * ) : bool

disconnectNotify ( const char * )

doKeyboardAction ( Q3TextEdit::KeyboardAction )

documentTitle () const : QString

doubleClicked ( int, int )

dragAutoScroll () const : bool

dragEnterEvent ( QDragEnterEvent * )

dragLeaveEvent ( QDragLeaveEvent * )

dragMoveEvent ( QDragMoveEvent * )

drawContents ( QPainter *, int, int, int, int )

drawContentsOffset ( QPainter *, int, int, int, int, int, int )

drawFrame ( QPainter * )

dropEvent ( QDropEvent * )

dumpObjectInfo ()

dumpObjectTree ()

dynamicPropertyNames () const : QList<QByteArray>

enableClipper ( bool )

ensureCursorVisible ()

ensurePolished () const

ensureVisible ( int, int )

ensureVisible ( int, int, int, int )

enterEvent ( QEvent * )

event ( QEvent * ) : bool

eventFilter ( QObject *, QEvent * ) : bool

family () const : QString

find ( const QString &, bool, bool, bool, int *, int * ) : bool

findChild ( const QString & ) const : T

findChildren ( const QString & ) const : QList<T>

findChildren ( const QRegExp & ) const : QList<T>

focusInEvent ( QFocusEvent * )

focusNextChild () : bool

focusNextPrevChild ( bool ) : bool

focusOutEvent ( QFocusEvent * )

focusPolicy () const : Qt::FocusPolicy

focusPreviousChild () : bool

focusProxy () const : QWidget *

focusWidget () const : QWidget *

font () const : QFont

fontInfo () const : QFontInfo

fontMetrics () const : QFontMetrics

foregroundRole () const : QPalette::ColorRole

frameChanged ()

frameGeometry () const : QRect

frameRect () const : QRect

frameShadow () const : Shadow

frameShape () const : Shape

frameSize () const : QSize

frameStyle () const : int

frameWidth () const : int

geometry () const : const QRect &

getContentsMargins ( int *, int *, int *, int * ) const

getCursorPosition ( int *, int * ) const

getDC () const : HDC

getSelection ( int *, int *, int *, int *, int ) const

grabKeyboard ()

grabMouse ()

grabMouse ( const QCursor & )

grabShortcut ( const QKeySequence &, Qt::ShortcutContext ) : int

hScrollBarMode () const : ScrollBarMode

hasEditFocus () const : bool

hasFocus () const : bool

hasMouseTracking () const : bool

hasSelectedText () const : bool

hasStaticBackground () const : bool

height () const : int

heightForWidth ( int ) const : int

heightMM () const : int

hide ()

hideEvent ( QHideEvent * )

horizontalScrollBar () const : QScrollBar *

horizontalSliderPressed ()

horizontalSliderReleased ()

inherits ( const char * ) const : bool

inputContext () : QInputContext *

inputMethodEvent ( QInputMethodEvent * )

inputMethodQuery ( Qt::InputMethodQuery ) const : QVariant

insert ( const QString &, uint )

insert ( const QString &, bool, bool, bool )

insertAction ( QAction *, QAction * )

insertActions ( QAction *, QList<QAction *> )

insertAt ( const QString &, int, int )

insertParagraph ( const QString &, int )

installEventFilter ( QObject * )

isActiveWindow () const : bool

isAncestorOf ( const QWidget * ) const : bool

isEnabled () const : bool

isEnabledTo ( QWidget * ) const : bool

isFullScreen () const : bool

isHidden () const : bool

isHorizontalSliderPressed () : bool

isMaximized () const : bool

isMinimized () const : bool

isModal () const : bool

isModified () const : bool

isOverwriteMode () const : bool

isReadOnly () const : bool

isRedoAvailable () const : bool

isUndoAvailable () const : bool

isUndoRedoEnabled () const : bool

isVerticalSliderPressed () : bool

isVisible () const : bool

isVisibleTo ( QWidget * ) const : bool

isWidgetType () const : bool

isWindow () const : bool

isWindowModified () const : bool

italic () const : bool

keyPressEvent ( QKeyEvent * )

keyReleaseEvent ( QKeyEvent * )

keyboardGrabber () : QWidget *

killTimer ( int )

layout () const : QLayout *

layoutDirection () const : Qt::LayoutDirection

leaveEvent ( QEvent * )

leftMargin () const : int

length () const : int

lineOfChar ( int, int ) : int

lineWidth () const : int

lines () const : int

linesOfParagraph ( int ) const : int

linkUnderline () const : bool

locale () const : QLocale

logicalDpiX () const : int

logicalDpiY () const : int

lower ()

macCGHandle () const : Qt::HANDLE

macEvent ( EventHandlerCallRef, EventRef ) : bool

macQDHandle () const : Qt::HANDLE

mapFrom ( QWidget *, const QPoint & ) const : QPoint

mapFromGlobal ( const QPoint & ) const : QPoint

mapFromParent ( const QPoint & ) const : QPoint

mapTo ( QWidget *, const QPoint & ) const : QPoint

mapToGlobal ( const QPoint & ) const : QPoint

mapToParent ( const QPoint & ) const : QPoint

margin () const : int

mask () const : QRegion

maximumHeight () const : int

maximumSize () const : QSize

maximumWidth () const : int

metaObject () const : const QMetaObject *

metric ( PaintDeviceMetric ) const : int

midLineWidth () const : int

mimeSourceFactory () const : Q3MimeSourceFactory *

minimumHeight () const : int

minimumSize () const : QSize

minimumSizeHint () const : QSize

minimumWidth () const : int

modificationChanged ( bool )

mouseDoubleClickEvent ( QMouseEvent * )

mouseGrabber () : QWidget *

mouseMoveEvent ( QMouseEvent * )

mousePressEvent ( QMouseEvent * )

mouseReleaseEvent ( QMouseEvent * )

move ( const QPoint & )

move ( int, int )

moveChild ( QWidget *, int, int )

moveCursor ( Q3TextEdit::CursorAction, bool )

moveEvent ( QMoveEvent * )

moveToThread ( QThread * )

nextInFocusChain () const : QWidget *

normalGeometry () const : QRect

numColors () const : int

objectName () const : QString

overrideWindowFlags ( Qt::WindowFlags )

paintEngine () const : QPaintEngine *

paintEvent ( QPaintEvent * )

paintingActive () const : bool

palette () const : const QPalette &

paper () const : QBrush

paragraphAt ( const QPoint & ) const : int

paragraphBackgroundColor ( int ) const : QColor

paragraphLength ( int ) const : int

paragraphRect ( int ) const : QRect

paragraphs () const : int

parent () const : QObject *

parentWidget () const : QWidget *

paste ()

pasteSubType ( const QByteArray & )

physicalDpiX () const : int

physicalDpiY () const : int

placeCursor ( const QPoint &, Q3TextCursor * )

pointSize () const : int

pos () const : QPoint

property ( const char * ) const : QVariant

qwsEvent ( QWSEvent * ) : bool

raise ()

receivers ( const char * ) const : int

rect () const : QRect

redo ()

redoAvailable ( bool )

releaseDC ( HDC ) const

releaseKeyboard ()

releaseMouse ()

releaseShortcut ( int )

removeAction ( QAction * )

removeChild ( QWidget * )

removeEventFilter ( QObject * )

removeParagraph ( int )

removeSelectedText ( int )

removeSelection ( int )

render ( QPaintDevice *, const QPoint &, const QRegion &, RenderFlags )

repaint ()

repaint ( int, int, int, int )

repaint ( const QRect & )

repaint ( const QRegion & )

repaintChanged ()

repaintContents ( int, int, int, int, bool )

repaintContents ( const QRect &, bool )

repaintContents ( bool )

resetInputContext ()

resize ( const QSize & )

resize ( int, int )

resizeContents ( int, int )

resizeEvent ( QResizeEvent * )

resizePolicy () const : ResizePolicy

restoreGeometry ( const QByteArray & ) : bool

returnPressed ()

rightMargin () const : int

saveGeometry () const : QByteArray

scroll ( int, int )

scroll ( int, int, const QRect & )

scrollBy ( int, int )

scrollToAnchor ( const QString & )

scrollToBottom ()

selectAll ( bool )

selectedText () const : QString

selectionChanged ()

sender () const : QObject *

setAcceptDrops ( bool )

setAccessibleDescription ( const QString & )

setAccessibleName ( const QString & )

setAlignment ( int )

setAttribute ( Qt::WidgetAttribute, bool )

setAutoFillBackground ( bool )

setAutoFormatting ( AutoFormatting )

setBackgroundRole ( QPalette::ColorRole )

setBaseSize ( const QSize & )

setBaseSize ( int, int )

setBold ( bool )

setColor ( const QColor & )

setContentsMargins ( int, int, int, int )

setContentsPos ( int, int )

setContextMenuPolicy ( Qt::ContextMenuPolicy )

setCornerWidget ( QWidget * )

setCurrentFont ( const QFont & )

setCursor ( const QCursor & )

setCursorPosition ( int, int )

setDisabled ( bool )

setDragAutoScroll ( bool )

setEditFocus ( bool )

setEnabled ( bool )

setFamily ( const QString & )

setFixedHeight ( int )

setFixedSize ( const QSize & )

setFixedSize ( int, int )

setFixedWidth ( int )

setFocus ( Qt::FocusReason )

setFocus ()

setFocusPolicy ( Qt::FocusPolicy )

setFocusProxy ( QWidget * )

setFont ( const QFont & )

setForegroundRole ( QPalette::ColorRole )

setFrameRect ( const QRect & )

setFrameShadow ( Shadow )

setFrameShape ( Shape )

setFrameStyle ( int )

setGeometry ( const QRect & )

setGeometry ( int, int, int, int )

setHBarGeometry ( QScrollBar &, int, int, int, int )

setHScrollBarMode ( ScrollBarMode )

setHidden ( bool )

setInputContext ( QInputContext * )

setItalic ( bool )

setLayout ( QLayout * )

setLayoutDirection ( Qt::LayoutDirection )

setLineWidth ( int )

setLinkUnderline ( bool )

setLocale ( const QLocale & )

setMargin ( int )

setMargins ( int, int, int, int )

setMask ( const QBitmap & )

setMask ( const QRegion & )

setMaximumHeight ( int )

setMaximumSize ( const QSize & )

setMaximumSize ( int, int )

setMaximumWidth ( int )

setMidLineWidth ( int )

setMimeSourceFactory ( Q3MimeSourceFactory * )

setMinimumHeight ( int )

setMinimumSize ( const QSize & )

setMinimumSize ( int, int )

setMinimumWidth ( int )

setModified ( bool )

setMouseTracking ( bool )

setObjectName ( const QString & )

setOverwriteMode ( bool )

setPalette ( const QPalette & )

setPaper ( const QBrush & )

setParagraphBackgroundColor ( int, const QColor & )

setParent ( QWidget * )

setParent ( QWidget *, Qt::WindowFlags )

setPointSize ( int )

setProperty ( const char *, const QVariant & ) : bool

setReadOnly ( bool )

setResizePolicy ( ResizePolicy )

setSelection ( int, int, int, int, int )

setSelectionAttributes ( int, const QColor &, bool )

setShortcutAutoRepeat ( int, bool )

setShortcutEnabled ( int, bool )

setSizeIncrement ( const QSize & )

setSizeIncrement ( int, int )

setSizePolicy ( QSizePolicy )

setSizePolicy ( QSizePolicy::Policy, QSizePolicy::Policy )

setStaticBackground ( bool )

setStatusTip ( const QString & )

setStyle ( QStyle * )

setStyleSheet ( Q3StyleSheet * )

setTabChangesFocus ( bool )

setTabOrder ( QWidget *, QWidget * )

setTabStopWidth ( int )

setText ( const QString & )

setText ( const QString &, const QString & )

setTextFormat ( Qt::TextFormat )

setToolTip ( const QString & )

setUnderline ( bool )

setUndoDepth ( int )

setUndoRedoEnabled ( bool )

setUpdatesEnabled ( bool )

setVBarGeometry ( QScrollBar &, int, int, int, int )

setVScrollBarMode ( ScrollBarMode )

setVerticalAlignment ( Q3TextEdit::VerticalAlignment )

setVisible ( bool )

setWhatsThis ( const QString & )

setWindowFlags ( Qt::WindowFlags )

setWindowIcon ( const QIcon & )

setWindowIconText ( const QString & )

setWindowModality ( Qt::WindowModality )

setWindowModified ( bool )

setWindowOpacity ( qreal )

setWindowRole ( const QString & )

setWindowState ( Qt::WindowStates )

setWindowSurface ( QWindowSurface * )

setWindowTitle ( const QString & )

setWordWrap ( Q3TextEdit::WordWrap )

setWrapColumnOrWidth ( int )

setWrapPolicy ( Q3TextEdit::WrapPolicy )

show ()

showEvent ( QShowEvent * )

showFullScreen ()

showMaximized ()

showMinimized ()

showNormal ()

signalsBlocked () const : bool

size () const : QSize

sizeHint () const : QSize

sizeIncrement () const : QSize

sizePolicy () const : QSizePolicy

stackUnder ( QWidget * )

startTimer ( int ) : int

staticMetaObject : const QMetaObject

statusTip () const : QString

style () const : QStyle *

styleSheet () const : Q3StyleSheet *

sync ()

syntaxHighlighter () const : Q3SyntaxHighlighter *

tabChangesFocus () const : bool

tabStopWidth () const : int

tabletEvent ( QTabletEvent * )

testAttribute ( Qt::WidgetAttribute ) const : bool

text () const : QString

text ( int ) const : QString

textChanged ()

textCursor () const : Q3TextCursor *

textFormat () const : Qt::TextFormat

thread () const : QThread *

timerEvent ( QTimerEvent * )

toolTip () const : QString

topMargin () const : int

tr ( const char *, const char *, int ) : QString

trUtf8 ( const char *, const char *, int ) : QString

underMouse () const : bool

underline () const : bool

undo ()

undoAvailable ( bool )

undoDepth () const : int

unsetCursor ()

unsetLayoutDirection ()

unsetLocale ()

update ()

update ( int, int, int, int )

update ( const QRect & )

update ( const QRegion & )

updateContents ( int, int, int, int )

updateContents ( const QRect & )

updateContents ()

updateGeometry ()

updateMicroFocus ()

updateScrollBars ()

updatesEnabled () const : bool

vScrollBarMode () const : ScrollBarMode

verticalAlignment () const : VerticalAlignment

verticalScrollBar () const : QScrollBar *

verticalSliderPressed ()

verticalSliderReleased ()

viewport () const : QWidget *

viewportPaintEvent ( QPaintEvent * )

viewportResizeEvent ( QResizeEvent * )

viewportSize ( int, int ) const : QSize

viewportToContents ( int, int, int &, int & ) const

viewportToContents ( const QPoint & ) const : QPoint

visibleHeight () const : int

visibleRegion () const : QRegion

visibleWidth () const : int

whatsThis () const : QString

wheelEvent ( QWheelEvent * )

width () const : int

widthMM () const : int

winEvent ( MSG *, long * ) : bool

winId () const : WId

window () const : QWidget *

windowFlags () const : Qt::WindowFlags

windowIcon () const : QIcon

windowIconText () const : QString

windowModality () const : Qt::WindowModality

windowOpacity () const : qreal

windowRole () const : QString

windowState () const : Qt::WindowStates

windowSurface () const : QWindowSurface *

windowTitle () const : QString

windowType () const : Qt::WindowType

wordWrap () const : WordWrap

wrapColumnOrWidth () const : int

wrapPolicy () const : WrapPolicy

x () const : int

x11Event ( XEvent * ) : bool

x11Info () const : const QX11Info &

x11PictureHandle () const : Qt::HANDLE

y () const : int

zoomIn ( int )

zoomIn ()

zoomOut ( int )

zoomOut ()

zoomTo ( int )

<address>

Copyright © 2008 Trolltech
Trademarks

Qt 4.3.5

</address>


text:
package org.traccar.protocol;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
import org.traccar.helper.BitUtil;
import org.traccar.helper.DateBuilder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Position;

import java.net.SocketAddress;
import java.nio.charset.StandardCharsets;

public class OigoProtocolDecoder extends BaseProtocolDecoder {

    public OigoProtocolDecoder(Protocol protocol) {
        super(protocol);
    }

    public static final int MSG_AR_LOCATION = 0x00;
    public static final int MSG_AR_REMOTE_START = 0x10;

    public static final int MSG_ACKNOWLEDGEMENT = 0xE0;

    private Position decodeArMessage(Channel channel, SocketAddress remoteAddress, ByteBuf buf) {

        buf.skipBytes(1); // header
        buf.readUnsignedShort(); // length

        int type = buf.readUnsignedByte();

        int tag = buf.readUnsignedByte();

        DeviceSession deviceSession;
        switch (BitUtil.to(tag, 3)) {
            case 0:
                String imei = ByteBufUtil.hexDump(buf.readSlice(8)).substring(1);
                deviceSession = getDeviceSession(channel, remoteAddress, imei);
                break;
            case 1:
                buf.skipBytes(1);
                String meid = buf.readSlice(14).toString(StandardCharsets.US_ASCII);
                deviceSession = getDeviceSession(channel, remoteAddress, meid);
                break;
            default:
                deviceSession = getDeviceSession(channel, remoteAddress);
                break;
        }

        if (deviceSession == null || type != MSG_AR_LOCATION) {
            return null;
        }

        Position position = new Position(getProtocolName());
        position.setDeviceId(deviceSession.getDeviceId());

        position.set(Position.KEY_EVENT, buf.readUnsignedByte());

        int mask = buf.readInt();

        if (BitUtil.check(mask, 0)) {
            position.set(Position.KEY_INDEX, buf.readUnsignedShort());
        }

        if (BitUtil.check(mask, 1)) {
            int date = buf.readUnsignedByte();
            DateBuilder dateBuilder = new DateBuilder()
                    .setDate(BitUtil.between(date, 4, 8) + 2010, BitUtil.to(date, 4), buf.readUnsignedByte())
                    .setTime(buf.readUnsignedByte(), buf.readUnsignedByte(), buf.readUnsignedByte());
            position.setTime(dateBuilder.getDate());
        }

        if (BitUtil.check(mask, 2)) {
            buf.skipBytes(5); // device time
        }

        if (BitUtil.check(mask, 3)) {
            position.setLatitude(buf.readUnsignedInt() * 0.000001 - 90);
            position.setLongitude(buf.readUnsignedInt() * 0.000001 - 180.0);
        }

        if (BitUtil.check(mask, 4)) {
            int status = buf.readUnsignedByte();
            position.setValid(BitUtil.between(status, 4, 8) != 0);
            position.set(Position.KEY_SATELLITES, BitUtil.to(status, 4));
            position.set(Position.KEY_HDOP, buf.readUnsignedByte() * 0.1);
        }

        if (BitUtil.check(mask, 5)) {
            position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedByte()));
        }

        if (BitUtil.check(mask, 6)) {
            position.setCourse(buf.readUnsignedShort());
        }

        if (BitUtil.check(mask, 7)) {
            position.setAltitude(buf.readShort());
        }

        if (BitUtil.check(mask, 8)) {
            position.set(Position.KEY_RSSI, buf.readUnsignedByte());
        }

        if (BitUtil.check(mask, 9)) {
            position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.001);
        }

        if (BitUtil.check(mask, 10)) {
            position.set(Position.KEY_BATTERY, buf.readUnsignedShort() * 0.001);
        }

        if (BitUtil.check(mask, 11)) {
            buf.skipBytes(2); // gpio
        }

        if (BitUtil.check(mask, 12)) {
            position.set(Position.KEY_ODOMETER, buf.readUnsignedInt() * 1000);
        }

        if (BitUtil.check(mask, 13)) {
            buf.skipBytes(6); // software version
        }

        if (BitUtil.check(mask, 14)) {
            buf.skipBytes(5); // hardware version
        }

        if (BitUtil.check(mask, 15)) {
            buf.readUnsignedShort(); // device config
        }

        return position;
    }

    private double convertCoordinate(long value) {
        boolean negative = value < 0;
        value = Math.abs(value);
        double minutes = (value % 100000) * 0.001;
        value /= 100000;
        double degrees = value + minutes / 60;
        return negative ? -degrees : degrees;
    }

    private Position decodeMgMessage(Channel channel, SocketAddress remoteAddress, ByteBuf buf) {

        buf.readUnsignedByte(); // tag
        int flags = buf.getUnsignedByte(buf.readerIndex());

        DeviceSession deviceSession;
        if (BitUtil.check(flags, 6)) {
            buf.readUnsignedByte(); // flags
            deviceSession = getDeviceSession(channel, remoteAddress);
        } else {
            String imei = ByteBufUtil.hexDump(buf.readSlice(8)).substring(1);
            deviceSession = getDeviceSession(channel, remoteAddress, imei);
        }

        if (deviceSession == null) {
            return null;
        }

        Position position = new Position(getProtocolName());
        position.setDeviceId(deviceSession.getDeviceId());

        buf.skipBytes(8); // imsi

        int date = buf.readUnsignedShort();

        DateBuilder dateBuilder = new DateBuilder()
                .setDate(2010 + BitUtil.from(date, 12), BitUtil.between(date, 8, 12), BitUtil.to(date, 8))
                .setTime(buf.readUnsignedByte(), buf.readUnsignedByte(), 0);

        position.setValid(true);
        position.setLatitude(convertCoordinate(buf.readInt()));
        position.setLongitude(convertCoordinate(buf.readInt()));

        position.setAltitude(UnitsConverter.metersFromFeet(buf.readShort()));
        position.setCourse(buf.readUnsignedShort());
        position.setSpeed(UnitsConverter.knotsFromMph(buf.readUnsignedByte()));

        position.set(Position.KEY_POWER, buf.readUnsignedByte() * 0.1);
        position.set(Position.PREFIX_IO + 1, buf.readUnsignedByte());

        dateBuilder.setSecond(buf.readUnsignedByte());
        position.setTime(dateBuilder.getDate());

        position.set(Position.KEY_RSSI, buf.readUnsignedByte());

        int index = buf.readUnsignedByte();

        position.set(Position.KEY_VERSION_FW, buf.readUnsignedByte());
        position.set(Position.KEY_SATELLITES, buf.readUnsignedByte());
        position.set(Position.KEY_ODOMETER, (long) (buf.readUnsignedInt() * 1609.34));

        if (channel != null && BitUtil.check(flags, 7)) {
            ByteBuf response = Unpooled.buffer();
            response.writeByte(MSG_ACKNOWLEDGEMENT);
            response.writeByte(index);
            response.writeByte(0x00);
            channel.writeAndFlush(new NetworkMessage(response, remoteAddress));
        }

        return position;
    }

    @Override
    protected Object decode(
            Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {

        ByteBuf buf = (ByteBuf) msg;

        if (buf.getUnsignedByte(buf.readerIndex()) == 0x7e) {
            return decodeArMessage(channel, remoteAddress, buf);
        } else {
            return decodeMgMessage(channel, remoteAddress, buf);
        }
    }

}


text:
package launchpad_s_plus;

/**
 * Contains the simplified methods needed to send Virtual MIDI messages
 *
 * @author Helion
 */
public class DefaultMIDI {
	/**
	 * Sends the default MIDI message based on the given parameters
	 *
	 * @param value
	 *            MIDI location
	 * @param velocity
	 *            MIDI velocity
	 */
	public static void sendMessage(int value, int velocity) {
        SetupProcess.defaultChannels[1].noteOn(value, velocity);
	}
}


text:
'use strict';

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var Option = _react2['default'].createClass({
	displayName: 'Option',

	propTypes: {
		className: _react2['default'].PropTypes.string, // className (based on mouse position)
		isDisabled: _react2['default'].PropTypes.bool, // the option is disabled
		isFocused: _react2['default'].PropTypes.bool, // the option is focused
		isSelected: _react2['default'].PropTypes.bool, // the option is selected
		onSelect: _react2['default'].PropTypes.func, // method to handle click on option element
		onFocus: _react2['default'].PropTypes.func, // method to handle mouseEnter on option element
		onUnfocus: _react2['default'].PropTypes.func, // method to handle mouseLeave on option element
		option: _react2['default'].PropTypes.object.isRequired },
	// object that is base for that option
	blockEvent: function blockEvent(event) {
		event.preventDefault();
		event.stopPropagation();
		if (event.target.tagName !== 'A' || !('href' in event.target)) {
			return;
		}
		if (event.target.target) {
			window.open(event.target.href, event.target.target);
		} else {
			window.location.href = event.target.href;
		}
	},
	handleMouseDown: function handleMouseDown(event) {
		event.preventDefault();
		event.stopPropagation();
		this.props.onSelect(this.props.option, event);
	},
	handleMouseEnter: function handleMouseEnter(event) {
		this.props.onFocus(this.props.option, event);
	},
	handleMouseMove: function handleMouseMove(event) {
		if (this.props.focused) return;
		this.props.onFocus(this.props.option, event);
	},
	render: function render() {
		var option = this.props.option;

		var className = (0, _classnames2['default'])(this.props.className, option.className);
		var inputValue = typeof this.props.children == 'string' ? this.props.children : this.props.children.props.children;
        var label = option.create ? this.props.addLabelText.replace('{label}', inputValue) : inputValue;

		return option.disabled ? _react2['default'].createElement(
			'div',
			{ className: className,
				onMouseDown: this.blockEvent,
				onClick: this.blockEvent },
			label
		) : _react2['default'].createElement(
			'div',
			{ className: className,
				style: option.style,
				onMouseDown: this.handleMouseDown,
				onMouseEnter: this.handleMouseEnter,
				onMouseMove: this.handleMouseMove,
				title: option.title },
			label
		);
	}
});

module.exports = Option;


text: var songModule = angular.module('song', ['core']);


text:
<?php
	defined('ARI_FRAMEWORK_LOADED') or die('Direct Access to this location is not allowed.');
?>

<?php
	$data = $specificQuestion->getDataFromXml($statistics->Question->QuestionVersion->Data);
	$xData = $specificQuestion->getDataFromXml($statistics->Data);
	$selIdList = array();
	if (!empty($xData))
	{
		foreach ($xData as $dataItem)
		{
			$selIdList[] = $dataItem['hidQueId'];
		}
	}
?>

		<?php AriQuizWebHelper::displayResValue('Label.NumberPos'); ?>
		<?php AriQuizWebHelper::displayResValue('Label.User'); ?>
		<?php AriQuizWebHelper::displayResValue('Label.Correct'); ?>
		<?php AriQuizWebHelper::displayResValue('Label.Answer'); ?>

<?php
$i = 0;
foreach ($data as $dataItem)
{
?>

		<?php echo (++$i); ?>.
		<?php if (in_array($dataItem['hidQueId'], $selIdList)) { ?><?php }; ?>
		<?php if (!empty($dataItem['cbCorrect'])) { ?><?php }; ?>
		<?php echo $dataItem['tbxAnswer']; ?>

<?php
}
?>


text:
package com.fishercoder;

import com.fishercoder.solutions._1170;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.Assert.assertArrayEquals;

public class _1170Test {
    private static _1170.Solution1 solution1;
    private static _1170.Solution2 solution2;
    private static String[] queries;
    private static String[] words;

    @BeforeClass
    public static void setup() {
        solution1 = new _1170.Solution1();
        solution2 = new _1170.Solution2();
    }

    @Test
    public void test1() {
        queries = new String[]{"cbd"};
        words = new String[]{"zaaaz"};
        assertArrayEquals(new int[]{1}, solution1.numSmallerByFrequency(queries, words));
    }

    @Test
    public void test2() {
        queries = new String[]{"bbb", "cc"};
        words = new String[]{"a", "aa", "aaa", "aaaa"};
        assertArrayEquals(new int[]{1, 2}, solution1.numSmallerByFrequency(queries, words));
    }

    @Test
    public void test3() {
        queries = new String[]{"cbd"};
        words = new String[]{"zaaaz"};
        assertArrayEquals(new int[]{1}, solution2.numSmallerByFrequency(queries, words));
    }

    @Test
    public void test4() {
        queries = new String[]{"bbb", "cc"};
        words = new String[]{"a", "aa", "aaa", "aaaa"};
        assertArrayEquals(new int[]{1, 2}, solution2.numSmallerByFrequency(queries, words));
    }

}


text:
@extends('master')

@section('title', 'Welcome To YouLearn')

@section('content')

    @include('contents.play')

@endsection


text:
"use strict";

/**
 * Module dependencies.
 */

var _ = require("lodash")
  , inquirer = require("inquirer")
  , EventEmitter = require("events").EventEmitter
  , VantageUtil = require("./util")
  ;

var ui = {

  /**
   * Sets intial variables and registers
   * listeners. This is called once in a
   * process thread regardless of how many
   * instances of Vantage have been generated.
   *
   * @api private
   */

  _init: function() {

    var self = this;

    // Attached vantage instance. The UI can
    // only attach to one instance of Vantage
    // at a time, and directs all events to that
    // instance.
    this.parent = void 0;

    // Hook to reference active inquirer prompt.
    this._activePrompt = void 0;

    // Fail-safe to ensure there is no double
    // prompt in odd situations.
    this._midPrompt = false;

    // Handle for inquirer's prompt.
    this.inquirer = inquirer;

    // Whether a prompt is currently in cancel mode.
    this._cancelled = false;

    // Middleware for piping stdout through.
    this._pipeFn = void 0;

    // Hook in to steal inquirer's keypress.
    inquirer.prompt.prompts.input.prototype.onKeypress = function(e) {
      self.emit("client_keypress", e);
      return self._keypressHandler(e, this);
    };

    // Extend the render function to steal the active prompt object,
    // as inquirer doesn't expose it and we need it.
    (function(render){
      inquirer.prompt.prompts.input.prototype.render = function() {
        self._activePrompt = this;
        return render.call(this);
      };
    })(inquirer.prompt.prompts.input.prototype.render);
  },

  /**
   * Creates an inquirer prompt on the TTY.
   *
   * @param {Object} options
   * @param {Function} cb
   * @api public
   */

  prompt: function(options, cb) {
    var self = this;
    options = options || {};
    if (!this.parent) { return; }
    if (options.delimiter) {
      this.setDelimiter(options.delimiter);
    }
    if (options.message) {
      this.setDelimiter(options.message);
    }
    if (self._midPrompt) {
      console.log("Prompt called when mid prompt...");
      throw new Error("UI Prompt called when already mid prompt.");
    }
    self._midPrompt = true;
    try {
      inquirer.prompt(options, function(result) {
        self._midPrompt = false;
        cb(result);
      });
    } catch(e) {
      console.log("Vantage Prompt error:", e);
    }
  },

  /**
   * Returns a boolean as to whether user
   * is mid another pr ompt.
   *
   * @return {Boolean}
   * @api public
   */

  midPrompt: function() {
    return (
      (this._midPrompt && this.parent) ? true : false
    );
  },

  /**
   * Sets the temporarily delimiter based
   * on the delimiter provided by another
   * vantage server to this instance's client
   * upon the establishment of a session.
   *
   * @param {String} str
   * @api public
   */

  setDelimiter: function(str) {
    if (!this.parent) { return; }
    str = String(str).trim() + " ";
    this._lastDelimiter = str;
    inquirer.prompt.prompts.password.prototype.prefix = function(){
      return str;
    };
    inquirer.prompt.prompts.input.prototype.prefix = function(){
      return str;
    };
  },

  /**
   * Event handler for keypresses - deals with command history
   * and tabbed auto-completion.
   *
   * @param {Event} e
   * @param {Prompt} prompt
   * @api private
   */

  _keypressHandler: function(e, prompt) {
    if (!this.parent) { return; }
    this._activePrompt = prompt;
    var key = (e.key || {}).name;
    var value = (prompt) ? String(prompt.rl.line).trim() : void 0;
    this.emit("vantage_ui_keypress", { key: key, value: value });
  },

  /**
   * Refreshes active prompt.
   *
   * @return {UI}
   * @api public
   */

  refresh: function() {
    if (!this.parent) { return false; }
    if (!this._activePrompt) { return false; }
    if (!this._midPrompt) { return false; }
    this._activePrompt.clean();
    this._midPrompt = false;
    this._cancelled = true;
    if (this._activePrompt.status !== "answered") { // huh?
      this._activePrompt.status = "answered";
      this._activePrompt.done();
    }
    this._cancelled = false;
    this.parent._prompt();
    return this;
  },

  /**
   * Pauses active prompt, returning
   * the value of what had been typed so far.
   *
   * @return {String} val
   * @api public
   */

  pause: function() {
    if (!this.parent) { return false; }
    if (!this._activePrompt) { return false; }
    if (!this._midPrompt) { return false; }
    var val = this._activePrompt.rl.line;
    this._midPrompt = false;
    this._cancelled = true;
    this._activePrompt.clean();
    this._activePrompt.status = "answered";
    this._activePrompt.done();
    return val;
  },

  /**
   * Resumes active prompt, accepting
   * a string, which will fill the prompt
   * with that text and put the cursor at
   * the end.
   *
   * @param {String} val
   * @api public
   */

  resume: function(val) {
    if (!this.parent) { return this; }
    val = val || "";
    if (!this._activePrompt) { return this; }
    if (this._midPrompt) { return this; }
    this.parent._prompt();
    this._activePrompt.rl.line = val;
    this._activePrompt.rl.cursor = val.length;
    this._activePrompt.cacheCursorPos();
    this._activePrompt.clean().render().write( this._activePrompt.rl.line );
    this._activePrompt.restoreCursorPos();
    return this;
  },

  /**
   * Logs the current delimiter and typed data.
   *
   * @return {UI}
   * @api public
   */

  imprint: function(str) {
    if (!this.parent) { return this; }
    var val = this._activePrompt.rl.line;
    var delimiter = this._lastDelimiter || "";
    this.log(delimiter + val);
    return this;
  },

  /**
   * Redraws the inquirer prompt with a new string.
   *
   * @param {String} str
   * @return {UI}
   * @api private
   */

  redraw: function(str) {
    if (!this.parent) { return this; }
    this._activePrompt.rl.line = str;
    this._activePrompt.rl.cursor = str.length;
    this._activePrompt.cacheCursorPos();
    this._activePrompt.clean().render().write( this._activePrompt.rl.line );
    this._activePrompt.restoreCursorPos();
    return this;
  },

  /**
   * Attaches TTY prompt to a given Vantage instance.
   *
   * @param {Vantage} vantage
   * @return {UI}
   * @api public
   */

  attach: function(vantage) {
    this.parent = vantage;
    this.refresh();
    this.parent._prompt();
    return this;
  },

  /**
   * Receives and runs logging through
   * a piped function is one is provided
   * through ui.pipe(). Pauses any active
   * prompts, logs the data and then if
   * paused, resumes the prompt.
   *
   * @return {UI}
   * @api public
   */

  log: function() {
    var args = VantageUtil.fixArgsForApply(arguments);
    args = (_.isFunction(this._pipeFn))
      ? this._pipeFn.call(this, args)
      : args;
    if (args === "") {
      return this;
    }
    args = VantageUtil.fixArgsForApply(args);
    if (this.midPrompt()) {
      var data = this.pause();
      console.log.apply(console.log, args);
      if (typeof data !== "undefined" && data !== false) {
        this.resume(data);
      } else {
        console.log("Log got back 'false' as data. This shouldn't happen.", data);
      }
    } else {
      console.log.apply(console.log, args);
    }
    return this;
  },

  /**
   * Detaches UI from a given Vantage instance.
   *
   * @param {Vantage} vantage
   * @return {UI}
   * @api public
   */

  detach: function(vantage) {
    if (vantage === this.parent) {
      this.parent = void 0;
    }
    return this;
  }
};

/**
 * Make UI an EventEmitter.
 */

_.assign(ui, EventEmitter.prototype);

/**
 * Expose `ui`.
 *
 * Modifying global? WTF?!? Yes. It is evil.
 * However node.js prompts are also quite
 * evil in a way. Nothing prevents dual prompts
 * between applications in the same terminal,
 * and inquirer doesn't catch or deal with this, so
 * if you want to start two independent instances of
 * vantage, you need to know that prompt listeners
 * have already been initiated, and that you can
 * only attach the tty to one vantage instance
 * at a time.
 * When you fire inqurier twice, you get a double-prompt,
 * where every keypress fires twice and it's just a
 * total mess. So forgive me.
 */

global.__vantage = global.__vantage || {};
global.__vantage.ui = global.__vantage.ui || {
  exists: false,
  exports: void 0
};

if (!global.__vantage.ui.exists) {
  global.__vantage.ui.exists = true;
  global.__vantage.ui.exports = ui;
  module.exports = exports = ui;
  ui._init();
} else {
  module.exports = global.__vantage.ui.exports;
}


text:
Provides a convention for modelling user interactions as use case classes. A
use case class represents and is named after something a user does with your
application `SignUp`, `RequestResetPasswordEmail` etc.

Attributes are whitelisted and coerced into an expected type using Virtus. An
attribute will either be the specified type or nil.

Take a look at the [code itself](https://github.com/stevehodgkiss/interaction/blob/master/lib/interaction.rb) for full details of the API provided.

## A simple example

```ruby
class SignUp
  include Interaction
  include ActiveModel::Validations
  include Interaction::ValidationHelpers

  # Virtus
  attribute :email, String
  attribute :password, String

  # ActiveModel validations
  validates :email, :password, presence: true

  attr_reader :user

  def perform
    validate!
    create_user
    deliver_welcome_email
  end

  private

  def create_user
    @user = User.create(attributes)
    failure! unless @user.persisted?
  end

  def deliver_welcome_email
    # ...
  end
end

sign_up = SignUp.perform(username: 'john', password: 'j0hn')
sign_up.success?
# => true
sign_up.user
# => #<User id:...>
```


text:
{% extends "base.html" %}
{% load i18n %}

{% block header %}

To Be Musician

{% endblock %}

{% block main %}

    <form action="{% url 'search' %}" method="get" class="search-form">

            {% trans "Keyword" %}:
            <input type="search" name="q" placeholder="{% trans "Song, artist, album..." %}" class="input-find">

        <input class="button" type="submit" value="search">
    </form>

{% endblock %}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/modules/AsyncTask.iml" filepath="$PROJECT_DIR$/.idea/modules/AsyncTask.iml" />
      <module fileurl="file://$PROJECT_DIR$/.idea/modules/AsyncTask_main.iml" filepath="$PROJECT_DIR$/.idea/modules/AsyncTask_main.iml" group="AsyncTask" />
      <module fileurl="file://$PROJECT_DIR$/.idea/modules/AsyncTask_test.iml" filepath="$PROJECT_DIR$/.idea/modules/AsyncTask_test.iml" group="AsyncTask" />
    </modules>
  </component>
</project>


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.06.09 at 07:38:30 AM COT
//

package com.ericsson.cep.wsdl;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

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

 * <complexType name="EnvioSMSResponseType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="idTransaccion" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="codigoError" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="mensajeError" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EnvioSMSResponseType", propOrder = {
    "idTransaccion",
    "codigoError",
    "mensajeError"
})
public class EnvioSMSResponseType {

    @XmlElement(required = true)
    protected String idTransaccion;
    @XmlElement(required = true)
    protected String codigoError;
    @XmlElement(required = true)
    protected String mensajeError;

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

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

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

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

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

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

}


text:
.breakpoint-action-block-header {
    margin-bottom: 3px;
}

.breakpoint-action-append-button,
.breakpoint-action-remove-button {
    border: 1px solid rgb(170, 170, 170);
    border-radius: 10px;
    background-size: 16px 16px;
    background-origin: border-box;
    width: 16px;
    height: 16px;
    float: right;
    margin-left: 2px;
    margin-top: 2px;
}

.breakpoint-action-append-button:active,
.breakpoint-action-remove-button:active {
    -webkit-filter: brightness(50%);
}

.breakpoint-action-append-button {
    background-image: url(../Images/BreakpointActionAdd.svg), linear-gradient(to bottom, rgb(250, 250, 250), rgb(200, 200, 200));
}

.breakpoint-action-remove-button {
    background-image: url(../Images/BreakpointActionRemove.svg), linear-gradient(to bottom, rgb(250, 250, 250), rgb(200, 200, 200));
}

.breakpoint-action-block-body {
    margin: 1px 2px 6px 2px;
    padding: 8px;
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgb(190, 190, 190);
    background-color: rgba(222, 222, 222, 0.95);
    box-shadow: inset 0 0 2px rgb(200, 200, 200);
}

.breakpoint-action-block-body > input {
    width: 100%;
}

.breakpoint-action-eval-editor {
    padding: 4px 0 2px 0;
    -webkit-appearance: textfield;
    border: 1px solid rgb(200, 200, 200);
    background: white;
}

.breakpoint-action-eval-editor > .CodeMirror {
    width: 336px; /* NOTE: Fixed value, manually tuned to .edit-breakpoint-popover-content.wide width */
    height: auto;
}

.breakpoint-action-eval-editor > .CodeMirror-scroll {
    width: 336px; /* NOTE: Fixed value, manually tuned to .edit-breakpoint-popover-content.wide width */
    overflow: hidden;
}


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CategoryId** | **int32** | category_id integer | [default to null]
**GroupId** | **int32** | group_id integer | [default to null]
**Name** | **string** | name string | [default to null]
**Published** | **bool** | published boolean | [default to null]
**Types** | **[]int32** | types array | [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
"""
Base class for DarwinLog tests.
"""

# System imports
from __future__ import print_function

import json
import platform
import re
import sys
import threading

# lldb imports
import lldb
from lldb import SBProcess, SBTarget

from lldbsuite.test import decorators
from lldbsuite.test import lldbtest
from lldbsuite.test import lldbtest_config
from lldbsuite.test import lldbutil

def expand_darwinlog_command(command):
    return "plugin structured-data darwin-log " + command

def expand_darwinlog_settings_set_command(command):
    return "settings set plugin.structured-data.darwin-log." + command

class DarwinLogTestBase(lldbtest.TestBase):
    """Base class for DarwinLog test cases that are pexpect-based."""
    NO_DEBUG_INFO_TESTCASE = True

    CONTINUE_REGEX = re.compile(r"Process \d+ resuming")

    def setUp(self):
        # Call super's setUp().
        super(DarwinLogTestBase, self).setUp()

        # Until other systems support this, exit
        # early if we're not macOS version 10.12
        # or greater.
        version = platform.mac_ver()[0].split('.')
        if ((int(version[0]) == 10) and (int(version[1]) < 12) or
                (int(version[0]) < 10)):
            self.skipTest("DarwinLog tests currently require macOS 10.12+")
            return

        self.child = None
        self.child_prompt = '(lldb) '
        self.strict_sources = False
        self.enable_process_monitor_logging = False

    def run_lldb_to_breakpoint(self, exe, source_file, line,
                               enable_command=None, settings_commands=None):

        import pexpect
        # Set self.child_prompt, which is "(lldb) ".
        prompt = self.child_prompt

        # So that the child gets torn down after the test.
        self.child = pexpect.spawn('%s %s %s' % (lldbtest_config.lldbExec,
                                                 self.lldbOption, exe))
        child = self.child

        # Turn on logging for what the child sends back.
        if self.TraceOn():
            child.logfile_read = sys.stdout

        if self.enable_process_monitor_logging:
            if platform.system() == 'Darwin':
                self.runCmd(
                    "settings set target.process.extra-startup-command "
                    "QSetLogging:bitmask=LOG_DARWIN_LOG;")
                self.expect_prompt()

        # Run the enable command if we have one.
        if enable_command is not None:
            self.runCmd(enable_command)
            self.expect_prompt()

        # Disable showing of source lines at our breakpoint.
        # This is necessary for the logging tests, because the very
        # text we want to match for output from the running inferior
        # will show up in the source as well.  We don't want the source
        # output to erroneously make a match with our expected output.
        self.runCmd("settings set stop-line-count-before 0")
        self.expect_prompt()
        self.runCmd("settings set stop-line-count-after 0")
        self.expect_prompt()

        # While we're debugging, turn on packet logging.
        self.runCmd("log enable -f /tmp/packets.log gdb-remote packets")
        self.expect_prompt()

        # Prevent mirroring of NSLog/os_log content to stderr.  We want log
        # messages to come exclusively through our log channel.
        self.runCmd(
            "settings set target.env-vars IDE_DISABLED_OS_ACTIVITY_DT_MODE=1")
        self.expect_prompt()

        # Run any darwin-log settings commands now, before we enable logging.
        if settings_commands is not None:
            for setting_command in settings_commands:
                self.runCmd(
                    expand_darwinlog_settings_set_command(setting_command))
                self.expect_prompt()

        # Set breakpoint right before the os_log() macros.  We don't
        # set it on the os_log*() calls because these are a number of
        # nested-scoped calls that will cause the debugger to stop
        # multiple times on the same line.  That is difficult to match
        # os_log() content by since it is non-deterministic what the
        # ordering between stops and log lines will be.  This is why
        # we stop before, and then have the process run in a sleep
        # afterwards, so we get the log messages while the target
        # process is "running" (sleeping).
        child.sendline('breakpoint set -f %s -l %d' % (source_file, line))
        child.expect_exact(prompt)

        # Now run to the breakpoint that we just set.
        child.sendline('run')
        child.expect_exact(prompt)

        # Ensure we stopped at a breakpoint.
        self.runCmd("thread list")
        self.expect(re.compile(r"stop reason = breakpoint"))

        # Now we're ready to check if DarwinLog is available.
        if not self.darwin_log_available():
            self.skipTest("DarwinLog not available")

    def runCmd(self, cmd):
        self.child.sendline(cmd)

    def expect_prompt(self, exactly=True):
        self.expect(self.child_prompt, exactly=exactly)

    def expect(self, pattern, exactly=False, *args, **kwargs):
        if exactly:
            return self.child.expect_exact(pattern, *args, **kwargs)
        return self.child.expect(pattern, *args, **kwargs)

    def darwin_log_available(self):
        self.runCmd("plugin structured-data darwin-log status")
        self.expect(re.compile(r"Availability: ([\S]+)"))
        return self.child.match is not None and (
            self.child.match.group(1) == "available")

    def do_test(self, enable_options, expect_regexes=None,
                settings_commands=None):
        """Test that a single fall-through reject rule rejects all logging."""
        self.build(dictionary=self.d)
        self.setTearDownCleanup(dictionary=self.d)

        # Build the darwin-log enable command.
        enable_cmd = expand_darwinlog_command('enable')
        if enable_options is not None and len(enable_options) > 0:
            enable_cmd += ' ' + ' '.join(enable_options)

        exe = self.getBuildArtifact(self.exe_name)
        self.run_lldb_to_breakpoint(exe, self.source, self.line,
                                    enable_command=enable_cmd,
                                    settings_commands=settings_commands)
        self.expect_prompt()

        # Now go.
        self.runCmd("process continue")
        self.expect(self.CONTINUE_REGEX)

        if expect_regexes is None:
            # Expect matching a log line or program exit.
            # Test methods determine which ones are valid.
            expect_regexes = (
                [re.compile(r"source-log-([^-]+)-(\S+)"),
                 re.compile(r"exited with status")
                 ])
        self.expect(expect_regexes)

def remove_add_mode_entry(log_entries):
    """libtrace creates an "Add Mode:..." message when logging is enabled.
    Strip this out of results since our test subjects don't create it."""
    return [entry for entry in log_entries
            if "message" in entry and
            not entry["message"].startswith("Add Mode:")]

class DarwinLogEventBasedTestBase(lldbtest.TestBase):
    """Base class for event-based DarwinLog tests."""
    NO_DEBUG_INFO_TESTCASE = True

    class EventListenerThread(threading.Thread):

        def __init__(self, listener, process, trace_on, max_entry_count):
            super(
                DarwinLogEventBasedTestBase.EventListenerThread,
                self).__init__()
            self.process = process
            self.listener = listener
            self.trace_on = trace_on
            self.max_entry_count = max_entry_count
            self.exception = None
            self.structured_data_event_count = 0
            self.wait_seconds = 2
            self.max_timeout_count = 4
            self.log_entries = []

        def handle_structured_data_event(self, event):
            structured_data = SBProcess.GetStructuredDataFromEvent(event)
            if not structured_data.IsValid():
                if self.trace_on:
                    print("invalid structured data")
                return

            # Track that we received a valid structured data event.
            self.structured_data_event_count += 1

            # Grab the individual log entries from the JSON.
            stream = lldb.SBStream()
            structured_data.GetAsJSON(stream)
            dict = json.loads(stream.GetData())
            self.log_entries.extend(dict["events"])
            if self.trace_on:
                print("Structured data (raw):", stream.GetData())

            # Print the pretty-printed version.
            if self.trace_on:
                stream.Clear()
                structured_data.PrettyPrint(stream)
                print("Structured data (pretty print):",
                      stream.GetData())

        def done(self, timeout_count):
            """Returns True when we're done listening for events."""
            # See if we should consider the number of events retrieved.
            if self.max_entry_count is not None:
                if len(self.log_entries) >= self.max_entry_count:
                    # We've received the max threshold of events expected,
                    # we can exit here.
                    if self.trace_on:
                        print("Event listener thread exiting due to max "
                              "expected log entry count being reached.")
                    return True

            # If our event timeout count has exceeded our maximum timeout count,
            # we're done.
            if timeout_count >= self.max_timeout_count:
                if self.trace_on:
                    print("Event listener thread exiting due to max number of "
                          "WaitForEvent() timeouts being reached.")
                return True

            # If our process is dead, we're done.
            if not self.process.is_alive:
                if self.trace_on:
                    print("Event listener thread exiting due to test inferior "
                          "exiting.")
                return True

            # We're not done.
            return False

        def run(self):
            event = lldb.SBEvent()
            try:
                timeout_count = 0

                # Wait up to 4 times for the event to arrive.
                while not self.done(timeout_count):
                    if self.trace_on:
                        print("Calling wait for event...")
                    if self.listener.WaitForEvent(self.wait_seconds, event):
                        while event.IsValid():
                            # Check if it's a process event.
                            if SBProcess.EventIsStructuredDataEvent(event):
                                self.handle_structured_data_event(event)
                            else:
                                if self.trace_on:
                                    print("ignoring unexpected event:",
                                          lldbutil.get_description(event))
                            # Grab the next event, if there is one.
                            event.Clear()
                            if not self.listener.GetNextEvent(event):
                                if self.trace_on:
                                    print("listener has no more events "
                                          "available at this time")
                    else:
                        if self.trace_on:
                            print("timeout occurred waiting for event...")
                        timeout_count += 1
                self.listener.Clear()
            except Exception as e:
                self.exception = e

    def setUp(self):
        # Call super's setUp().
        super(DarwinLogEventBasedTestBase, self).setUp()

        # Until other systems support this, exit
        # early if we're not macOS version 10.12
        # or greater.
        version = platform.mac_ver()[0].split('.')
        if ((int(version[0]) == 10) and (int(version[1]) < 12) or
                (int(version[0]) < 10)):
            self.skipTest("DarwinLog tests currently require macOS 10.12+")
            return

        # Source filename.
        self.source = 'main.c'

        # Output filename.
        self.exe_name = 'a.out'
        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}

        # Locate breakpoint.
        self.line = lldbtest.line_number(self.source, '// break here')

        # Enable debugserver logging of the darwin log collection
        # mechanism.
        self.runCmd("settings set target.process.extra-startup-command "
                    "QSetLogging:bitmask=LOG_DARWIN_LOG;")

    def darwin_log_available(self):
        match = self.match("plugin structured-data darwin-log status",
                           patterns=[r"Availability: ([\S]+)"])
        return match is not None and (match.group(1) == "available")

    def do_test(self, enable_options, settings_commands=None,
                run_enable_after_breakpoint=False, max_entry_count=None):
        """Runs the test inferior, returning collected events.

        This method runs the test inferior to the first breakpoint hit.
        It then adds a listener for structured data events, and collects
        all events from that point forward until end of execution of the
        test inferior.  It then returns those events.

        @return
            A list of structured data events received, in the order they
            were received.
        """
        self.build(dictionary=self.d)
        self.setTearDownCleanup(dictionary=self.d)

        exe = self.getBuildArtifact(self.exe_name)

        # Create a target by the debugger.
        target = self.dbg.CreateTarget(exe)
        self.assertTrue(target, lldbtest.VALID_TARGET)

        # Run the darwin-log settings commands.
        if settings_commands is not None:
            for setting_command in settings_commands:
                self.runCmd(
                    expand_darwinlog_settings_set_command(setting_command))

        # Build the darwin-log enable command.
        enable_cmd = expand_darwinlog_command("enable")
        if enable_options is not None and len(enable_options) > 0:
            enable_cmd += ' ' + ' '.join(enable_options)

        # Run the darwin-log enable command now if we are not supposed
        # to do it at the first breakpoint.  This tests the start-up
        # code, which has the benefit of being able to set os_log-related
        # environment variables.
        if not run_enable_after_breakpoint:
            self.runCmd(enable_cmd)

        # Create the breakpoint.
        breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
        self.assertIsNotNone(breakpoint)
        self.assertTrue(breakpoint.IsValid())
        self.assertEqual(1, breakpoint.GetNumLocations(),
                         "Should have found one breakpoint")

        # Enable packet logging.
        # self.runCmd("log enable -f /tmp/packets.log gdb-remote packets")
        # self.runCmd("log enable lldb process")

        # Launch the process - doesn't stop at entry.
        process = target.LaunchSimple(None, None, self.getBuildDir())
        self.assertIsNotNone(process, lldbtest.PROCESS_IS_VALID)

        # Keep track of whether we're tracing output.
        trace_on = self.TraceOn()

        # Get the next thread that stops.
        from lldbsuite.test.lldbutil import get_stopped_thread
        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)

        self.assertIsNotNone(thread, "There should be a thread stopped "
                             "due to breakpoint")

        # The process should be stopped at this point.
        self.expect("process status", lldbtest.PROCESS_STOPPED,
                    patterns=['Process .* stopped'])

        # The stop reason of the thread should be breakpoint.
        self.expect("thread list", lldbtest.STOPPED_DUE_TO_BREAKPOINT,
                    substrs=['stopped', 'stop reason = breakpoint'])

        # And our one and only breakpoint should have been hit.
        self.assertEquals(breakpoint.GetHitCount(), 1)

        # Check if DarwinLog is available.  This check cannot be done
        # until after the process has started, as the feature availability
        # comes through the stub.  The stub isn't running until
        # the target process is running.  So this is really the earliest
        # we can check.
        if not self.darwin_log_available():
            self.skipTest("DarwinLog not available")

        # Now setup the structured data listener.
        #
        # Grab the broadcaster for the process.  We'll be attaching our
        # listener to it.
        broadcaster = process.GetBroadcaster()
        self.assertIsNotNone(broadcaster)

        listener = lldb.SBListener("SBStructuredData listener")
        self.assertIsNotNone(listener)

        rc = broadcaster.AddListener(
            listener, lldb.SBProcess.eBroadcastBitStructuredData)
        self.assertTrue(rc, "Successfully add listener to process broadcaster")

        # Start the listening thread to retrieve the events.
        # Bump up max entry count for the potentially included Add Mode:
        # entry.
        if max_entry_count is not None:
            max_entry_count += 1
        event_thread = self.EventListenerThread(listener, process, trace_on,
                                                max_entry_count)
        event_thread.start()

        # Continue the test inferior.  We should get any events after this.
        process.Continue()

        # Wait until the event thread terminates.
        # print("main thread now waiting for event thread to receive events.")
        event_thread.join()

        # If the process is still alive, we kill it here.
        if process.is_alive:
            process.Kill()

        # Fail on any exceptions that occurred during event execution.
        if event_thread.exception is not None:
            # Re-raise it here so it shows up as a test error.
            raise event_thread

        # Return the collected logging events.
        return remove_add_mode_entry(event_thread.log_entries)


text:
class RemoveActiveAdmin < ActiveRecord::Migration
  def change
    drop_table :active_admin_comments
  end
end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Galery</title>

    <link href="bootstrap-3.2.0/css/bootstrap.min.css" rel="stylesheet">

    <link href="dashboard.css" rel="stylesheet">

    <link rel="stylesheet" href="assets/plugins/font-awesome-4.2.0/css/font-awesome.min.css">

    <link href="assets/css/simple-sidebar.css" rel="stylesheet">

     <link href="assets/general.css" rel="stylesheet">

<link type="text/css" rel="stylesheet" href="assets/plugins/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css"></link>

<link rel="stylesheet" href="assets/plugins/Gallery-master/css/blueimp-gallery.css">
<link rel="stylesheet" href="assets/plugins/Gallery-master/css/blueimp-gallery-indicator.css">
<link rel="stylesheet" href="assets/plugins/Gallery-master/css/blueimp-gallery-video.css">

          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            Toggle navigation

          </button>
          Template21
          Admin Panel

 Dashboard

	           21

						      404 page not found ! in index page.

						      Warning! Mail was not send.

						      Well done! You successfully read this important alert message.

						      Heads up! This alert needs your attention, but it's not super important.

						      Warning! Better check yourself, you're not looking too good.

						      404 page not found ! Change a few things up and try submitting again.

 Help

 My Profile

 My settings

  My Mail 21

 Logout

Hello, Zaz

	                             Online

  Dashboard

 Grid & Panels

 Tables

 Forms

 Form Validator & Wizard

 Chart & Graph

 Maps

	                              UI ELEMENTS

 icons & Buttons

 images

 Typography

 slider

 Notifications

 Drag & Drop & Sortable

 Group list

 Modals

 Tabs & Wizards & Accordion

	                              COMPONENTS

 Calendar

 Mailbox

 Mail Compose

 Mail Detail

 Chat

 Galery

 Blog

 File Manager

	                              PAGES

 Blank Page

 404 Page

 Login

 Register

  Galery

Dashboard

Galery

Carousel image gallery

    ‹
    ›

Carousel video gallery

    ‹
    ›

Lightbox image gallery

    ‹
    ›
    ×


text:
Movies

Series

            <form>

                     RATING
                    <input class="form-control"
                           type="number"
                           placeholder="Raiting (0-10)"
                           id="filterRaiting"
                           min="0"
                           max="10"
                           step="0.1"
                           ng-model="models.filterRaiting">

                <button class="btn btn-block btn-primary" ng-click="seriesCtrl.filterSeries(models.filterRaiting)">Filter</button>
            </form>

                        Name
                        Rating

                        {{series.title}}
                        {{series.imdbRating}}

                        No result


text:
ONEIDA Ltd. declared a 10 % stock dividend , payable Dec . 15 to stock of record Nov . 17 . The Oneida , N.Y., maker of consumer , food-service and industrial products also declared a quarterly cash dividend of 12 cents a share , with the same payable and record dates . The cash dividend paid on the common stock also will apply to the new shares , the company said . The move rewards shareholders and should improve the stock 's liquidity , Oneida said . The company has about 8.8 million shares outstanding . In New York Stock Exchange composite trading yesterday , Oneida 's shares closed at $ 18.375 a share , unchanged .

Causal Relations                 with events defined as verb or nouns (Mirza's work):

      event 1
      relation
      event 2

      204
      reward
      caused
      improve

Cause and effect redefined as event,subject pairs

      cause (event,subj)
      relation
      effect (event, subj)

      204
      ( reward, move )
      caused
      ( improve, liquidity )

Incoming edges (causes in this document found as effects in older documents)
None found
Outgoing edges (effects in this document found as causes in more recent documents)
None found


text:
#ifndef _HID_Utilities_External_h_
#define _HID_Utilities_External_h_

// ==================================

#ifdef __cplusplus
extern "C" {
#endif

// ==================================

//includes

#include <stdio.h>

// ==================================

// Device and Element Interfaces

enum HIDElementTypeMask
{
	kHIDElementTypeInput				= 1 << 1,
	kHIDElementTypeOutput            	= 1 << 2,
	kHIDElementTypeFeature           	= 1 << 3,
	kHIDElementTypeCollection        	= 1 << 4,
	kHIDElementTypeIO					= kHIDElementTypeInput | kHIDElementTypeOutput | kHIDElementTypeFeature,
	kHIDElementTypeAll					= kHIDElementTypeIO | kHIDElementTypeCollection
};
typedef enum HIDElementTypeMask HIDElementTypeMask;

struct recElement
{
    unsigned long type;						// the type defined by IOHIDElementType in IOHIDKeys.h
    long usagePage;							// usage page from IOUSBHIDParser.h which defines general usage
    long usage;								// usage within above page from IOUSBHIDParser.h which defines specific usage
    void * cookie;							// unique value (within device of specific vendorID and productID) which identifies element, will NOT change
    long min;								// reported min value possible
    long max;								// reported max value possible
    long scaledMin;							// reported scaled min value possible
    long scaledMax;							// reported scaled max value possible
    long size;								// size in bits of data return from element
    unsigned char relative;						// are reports relative to last report (deltas)
    unsigned char wrapping;						// does element wrap around (one value higher than max is min)
    unsigned char nonLinear;						// are the values reported non-linear relative to element movement
    unsigned char preferredState;					// does element have a preferred state (such as a button)
    unsigned char nullState;						// does element have null state
    long units;								// units value is reported in (not used very often)
    long unitExp;							// exponent for units (also not used very often)
    char name[256];							// name of element (c string)

// runtime variables
    long initialCenter; 					// center value at start up
    unsigned char  hasCenter; 				// whether or not to use center for calibration
    long minReport; 						// min returned value
    long maxReport; 						// max returned value (calibrate call)
    long userMin; 							// user set value to scale to (scale call)
    long userMax;

	struct recElement * pPrevious;			// previous element (NULL at list head)
    struct recElement * pChild;				// next child (only of collections)
    struct recElement * pSibling;			// next sibling (for elements and collections)

};
typedef struct recElement recElement;
typedef recElement* pRecElement;

struct recDevice
{
    void * interface;						// interface to device, NULL = no interface
    void * queue;							// device queue, NULL = no queue
    char transport[256];					// device transport (c string)
    long vendorID;							// id for device vendor, unique across all devices
    long productID;							// id for particular product, unique across all of a vendors devices
    long version;							// version of product
    char manufacturer[256];					// name of manufacturer
    char product[256];						// name of product
    char serial[256];						// serial number of specific product, can be assumed unique across specific product or specific vendor (not used often)
    long locID;								// long representing location in USB (or other I/O) chain which device is pluged into, can identify specific device on machine
    long usage;								// usage page from IOUSBHID Parser.h which defines general usage
    long usagePage;							// usage within above page from IOUSBHID Parser.h which defines specific usage
    long totalElements;						// number of total elements (should be total of all elements on device including collections) (calculated, not reported by device)
	long features;							// number of elements of type kIOHIDElementTypeFeature
	long inputs;							// number of elements of type kIOHIDElementTypeInput_Misc or kIOHIDElementTypeInput_Button or kIOHIDElementTypeInput_Axis or kIOHIDElementTypeInput_ScanCodes
	long outputs;							// number of elements of type kIOHIDElementTypeOutput
	long collections;						// number of elements of type kIOHIDElementTypeCollection
    long axis;								// number of axis (calculated, not reported by device)
    long buttons;							// number of buttons (calculated, not reported by device)
    long hats;								// number of hat switches (calculated, not reported by device)
    long sliders;							// number of sliders (calculated, not reported by device)
    long dials;								// number of dials (calculated, not reported by device)
    long wheels;							// number of wheels (calculated, not reported by device)
    recElement* pListElements; 				// head of linked list of elements
    struct recDevice* pNext; 				// next device
};
typedef struct recDevice recDevice;
typedef recDevice* pRecDevice;

// ==================================

// builds list of devices with elements (allocates memory and captures devices)
// in which the devices could be of different types/usages
// list is allocated internally within HID Utilites and can be accessed via accessor functions
// structures within list are considered flat and user accessable, but not user modifiable
// can be called again to rebuild list to account for new devices (will do the right thing in case of disposing existing list)
// usagePage, usage are each a numDeviceTypes sized array of matching usage and usage pages
// returns true if succesful
Boolean HIDBuildMultiDeviceList (UInt32 *pUsagePage, UInt32 *pUsage, UInt32 numDeviceTypes);

// same as above but this uses a single usagePage and usage
Boolean HIDBuildDeviceList (UInt32 usagePage, UInt32 usage);

// updates the current device list for any new/removed devices
// if this is called before HIDBuildDeviceList the it functions like HIDBuildMultiDeviceList
// usagePage, usage are each a numDeviceTypes sized array of matching usage and usage pages
// returns true if successful which means if any device were added or removed (the device config changed)
Boolean HIDUpdateDeviceList (UInt32 *pUsagePage, UInt32 *pUsage, UInt32 numDeviceTypes);

// release list built by above function
// MUST be called prior to application exit to properly release devices
// if not called (or app crashes) devices can be recovered by pluging into different location in USB chain
void HIDReleaseDeviceList (void);

// does a device list exist
unsigned char HIDHaveDeviceList (void);

// how many HID devices have been found
// returns 0 if no device list exist
unsigned long HIDCountDevices (void);

// how many elements does a specific device have
// returns 0 if device is invalid or NULL
// uses mask of HIDElementTypeMask to restrict element found
// use kHIDElementTypeIO to get non-collection elements
unsigned long HIDCountDeviceElements (pRecDevice pDevice, HIDElementTypeMask typeMask);

// get the first device in the device list
// returns NULL if no list exists
pRecDevice HIDGetFirstDevice (void);

// get next device in list given current device as parameter
// returns NULL if end of list
pRecDevice HIDGetNextDevice (pRecDevice pDevice);

// get the first element of device passed in as parameter
// returns NULL if no list exists or device does not exists or is NULL
// uses mask of HIDElementTypeMask to restrict element found
// use kHIDElementTypeIO to get previous HIDGetFirstDeviceElement functionality
pRecElement HIDGetFirstDeviceElement (pRecDevice pDevice, HIDElementTypeMask typeMask);

// get next element of given device in list given current element as parameter
// will walk down each collection then to next element or collection (depthwise traverse)
// returns NULL if end of list
// uses mask of HIDElementTypeMask to restrict element found
// use kHIDElementTypeIO to get previous HIDGetNextDeviceElement functionality
pRecElement HIDGetNextDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);

// get previous element of given device in list given current element as parameter
// this walks directly up the tree to the top element and does not search at each level
// returns NULL if beginning of list
// uses mask of HIDElementTypeMask to restrict element found
// use kHIDElementTypeIO to get non-collection elements
pRecElement HIDGetPreviousDeviceElement (pRecElement pElement, HIDElementTypeMask typeMask);

// returns C string type name given a type enumeration passed in as parameter (see IOHIDKeys.h)
// returns empty string for invlid types
void HIDGetTypeName (unsigned long type, char * cstrName);

// returns C string usage given usage page and usage passed in as parameters (see IOUSBHIDParser.h)
// returns usage page and usage values in string form for unknown values
void HIDGetUsageName (long valueUsagePage, long valueUsage, char * cstrName);

// ==================================

// Element Event Queue and Value Interfaces

enum
{
    kDefaultUserMin = 0,					// default user min and max used for scaling
    kDefaultUserMax = 255
};

enum
{
    kDeviceQueueSize = 50	// this is wired kernel memory so should be set to as small as possible
							// but should account for the maximum possible events in the queue
							// USB updates will likely occur at 100 Hz so one must account for this rate of
							// if states change quickly (updates are only posted on state changes)
};

// ==================================

// queues specific element, performing any device queue set up required
unsigned long  HIDQueueElement (pRecDevice pDevice, pRecElement pElement);

// adds all elements to queue, performing any device queue set up required
unsigned long  HIDQueueDevice (pRecDevice pDevice);

// removes element for queue, if last element in queue will release queue and device
unsigned long  HIDDequeueElement (pRecDevice pDevice, pRecElement pElement);

// completely removes all elements from queue and releases queue and device
unsigned long  HIDDequeueDevice (pRecDevice pDevice);

// returns true if an event is avialable for the element and fills out *pHIDEvent structure, returns false otherwise
// pHIDEvent is a poiner to a IOHIDEventStruct, using void here for compatibility, users can cast a required
unsigned char HIDGetEvent (pRecDevice pDevice, void * pHIDEvent);

// returns current value for element, creating device interface as required, polling element
// Note: this DOES NOT release the inteface so applications must properly release devices via ReleaseHIDDeviceList
long HIDGetElementValue (pRecDevice pDevice, pRecElement pElement);

// returns calibrated value given raw value passed in
// calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values
long HIDCalibrateValue (long value, pRecElement pElement);

// returns scaled value given raw value passed in
// scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values
long HIDScaleValue (long value, pRecElement pElement);

// ==================================

// Conguration and Save Interfaces

enum
{
    kPercentMove = 10 // precent of overall range a element must move to register
};

struct recSaveHID
{
    long actionCookie;
    // device
		// need to add serial number when I have a test case
    long vendorID;
    long productID;
    long locID;
    long usage;
    long usagePage;
    // elements
    long usagePageE;
    long usageE;
	long minReport;
	long maxReport;
    void * cookie;
};
typedef struct recSaveHID recSaveHID;
typedef recSaveHID * pRecSaveHID;

// polls single device's elements for a change greater than kPercentMove.  Times out after given time
// returns 1 and pointer to element if found
// returns 0 and NULL for both parameters if not found
unsigned char HIDConfigureSingleDeviceAction (pRecDevice pDevice, pRecElement * ppElement, float timeout);

// polls all devices and elements for a change greater than kPercentMove.  Times out after given time
// returns true and pointer to device and element if found
// returns false and NULL for both parameters if not found
unsigned char HIDConfigureAction (pRecDevice * ppDevice, pRecElement * ppElement, float timeout);

// -- These are routines to use if the applcationwants HID Utilities to do the file handling --
// Note: the FILE * is a MachO posix FILE and will not likely work directly with MW MSL FILE * type.

// take input records, save required info
// assume file is open and at correct position.
void HIDSaveElementConfig (FILE * fileRef, pRecDevice pDevice, pRecElement pElement, long actionCookie);

// takes a file, reads one record (assume file position is correct and file is open)
// search for matching device
// return pDevice, pElement and cookie for action
long HIDRestoreElementConfig (FILE * fileRef, pRecDevice * ppDevice, pRecElement * ppElement);

// -- These are routines to use if the client wants to use their own file handling --

// Set up a config record for saving
// takes an input records, returns record user can save as they want
// Note: the save rec must be pre-allocated by the calling app and will be filled out
void HIDSetElementConfig (pRecSaveHID pConfigRec, pRecDevice pDevice, pRecElement pElement, long actionCookie);

// Get matching element from config record
// takes a pre-allocated and filled out config record
// search for matching device
// return pDevice, pElement and cookie for action
long HIDGetElementConfig (pRecSaveHID pConfigRec, pRecDevice * ppDevice, pRecElement * ppElement);

// ==================================

#ifdef __cplusplus
}
#endif

#endif // _HID_Utilities_External_h_


text:
require 'net/http'
require 'time'

module RuboCop
  # Common methods and behaviors for dealing with remote config files.
  class RemoteConfig
    CACHE_LIFETIME = 24 * 60 * 60

    def initialize(url, base_dir)
      @uri = URI.parse(url)
      @base_dir = base_dir
    end

    def file
      return cache_path unless cache_path_expired?

      request do |response|
        next if response.is_a?(Net::HTTPNotModified)
        next if response.is_a?(SocketError)
        open cache_path, 'w' do |io|
          io.write response.body
        end
      end

      cache_path
    end

    private

    def request(uri = @uri, limit = 10, &block)
      raise ArgumentError, 'HTTP redirect too deep' if limit.zero?

      http = Net::HTTP.new(uri.hostname, uri.port)
      http.use_ssl = true if uri.instance_of? URI::HTTPS

      request = Net::HTTP::Get.new(uri.request_uri)
      if cache_path_exists?
        request['If-Modified-Since'] = File.stat(cache_path).mtime.rfc2822
      end

      handle_response(http.request(request), limit, &block)
    rescue SocketError => err
      handle_response(err, limit, &block)
    end

    def handle_response(response, limit, &block)
      case response
      when Net::HTTPSuccess, Net::HTTPNotModified, SocketError
        yield response
      when Net::HTTPRedirection
        request(URI.parse(response['location']), limit - 1, &block)
      else
        response.error!
      end
    end

    def cache_path
      File.expand_path(".rubocop-#{cache_name_from_uri}", @base_dir)
    end

    def cache_path_exists?
      @cache_path_exists ||= File.exist?(cache_path)
    end

    def cache_path_expired?
      return true unless cache_path_exists?

      @cache_path_expired ||= begin
        file_age = (Time.now - File.stat(cache_path).mtime).to_f
        (file_age / CACHE_LIFETIME) > 1
      end
    end

    def cache_name_from_uri
      uri = @uri.clone
      uri.query = nil
      uri.to_s.gsub!(/[^0-9A-Za-z]/, '-')
    end
  end
end