text:
function Inspector(controller) {

    var data = {
        controller: null,
        elements: { },
        torrents: [ ]
    },

    needsExtraInfo = function (torrents) {
        var i, id, tor;

        for (i = 0; tor = torrents[i]; i++)
            if (!tor.hasExtraInfo())
                return true;

        return false;
    },

    refreshTorrents = function () {
        var fields,
            ids = $.map(data.torrents.slice(0), function (t) {return t.getId();});

        if (ids && ids.length)
        {
            fields = ['id'].concat(Torrent.Fields.StatsExtra);

            if (needsExtraInfo(data.torrents))
                $.merge(fields, Torrent.Fields.InfoExtra);

            data.controller.updateTorrents(ids, fields);
        }
    },

    onTabClicked = function (ev) {
        var tab = ev.currentTarget;

        if (isMobileDevice)
            ev.stopPropagation();

        // select this tab and deselect the others
        $(tab).addClass('selected').siblings().removeClass('selected');

        // show this tab and hide the others
        $('#' + tab.id.replace('tab','page')).show().siblings('.inspector-page').hide();

        updateInspector();
    },

    updateInspector = function () {
        var e = data.elements,
            torrents = data.torrents,
            name;

        // update the name, which is shown on all the pages
        if (!torrents || !torrents.length)
            name = 'No Selection';
        else if(torrents.length === 1)
            name = torrents[0].getName();
        else
            name = '' + torrents.length+' Transfers Selected';
        setInnerHTML(e.name_lb, name || na);

        // update the visible page
        if ($(e.info_page).is(':visible'))
            updateInfoPage();
        else if ($(e.peers_page).is(':visible'))
            updatePeersPage();
        else if ($(e.trackers_page).is(':visible'))
            updateTrackersPage();
        else if ($(e.files_page).is(':visible'))
            updateFilesPage();
    },

    /****
    *****  GENERAL INFO PAGE
    ****/

    accumulateString = function (oldVal, newVal) {
        if (!oldVal || !oldVal.length)
            return newVal;
        if (oldVal === newVal)
            return newVal;
        return 'Mixed';
    },

    updateInfoPage = function () {
        var torrents = data.torrents,
            e = data.elements,
            fmt = Transmission.fmt,
            none = 'None',
            mixed = 'Mixed',
            unknown = 'Unknown',
            isMixed, allPaused, allFinished,
            str,
            baseline, it, s, i, t,
            sizeWhenDone = 0,
            leftUntilDone = 0,
            available = 0,
            haveVerified = 0,
            haveUnverified = 0,
            verifiedPieces = 0,
            stateString,
            latest,
            pieces,
            size,
            pieceSize,
            creator, mixed_creator,
            date, mixed_date,
            v, u, f, d, pct,
            now = Date.now();

        //
        //  state_lb
        //

        if(torrents.length <1)
            str = none;
        else {
            isMixed = false;
            allPaused = true;
            allFinished = true;

            baseline = torrents[0].getStatus();
            for(i=0; t=torrents[i]; ++i) {
                it = t.getStatus();
                if(it != baseline)
                    isMixed = true;
                if(!t.isStopped())
                    allPaused = allFinished = false;
                if(!t.isFinished())
                    allFinished = false;
            }
            if( isMixed )
                str = mixed;
            else if( allFinished )
                str = 'Finished';
            else if( allPaused )
                str = 'Paused';
            else
                str = torrents[0].getStateString();
        }
        setInnerHTML(e.state_lb, str);
        stateString = str;

        //
        //  have_lb
        //

        if(torrents.length < 1)
            str = none;
        else {
            baseline = torrents[0].getStatus();
            for(i=0; t=torrents[i]; ++i) {
                if(!t.needsMetaData()) {
                    haveUnverified += t.getHaveUnchecked();
                    v = t.getHaveValid();
                    haveVerified += v;
                    if(t.getPieceSize())
                        verifiedPieces += v / t.getPieceSize();
                    sizeWhenDone += t.getSizeWhenDone();
                    leftUntilDone += t.getLeftUntilDone();
                    available += (t.getHave()) + t.getDesiredAvailable();
                }
            }

            d = 100.0 * ( sizeWhenDone ? ( sizeWhenDone - leftUntilDone ) / sizeWhenDone : 1 );
            str = fmt.percentString( d );

            if( !haveUnverified && !leftUntilDone )
                str = fmt.size(haveVerified) + ' (100%)';
            else if( !haveUnverified )
                str = fmt.size(haveVerified) + ' of ' + fmt.size(sizeWhenDone) + ' (' + str +'%)';
            else
                str = fmt.size(haveVerified) + ' of ' + fmt.size(sizeWhenDone) + ' (' + str +'%), ' + fmt.size(haveUnverified) + ' Unverified';
        }
        setInnerHTML(e.have_lb, str);

        //
        //  availability_lb
        //

        if(torrents.length < 1)
            str = none;
        else if( sizeWhenDone == 0 )
            str = none;
        else
            str = '' + fmt.percentString( ( 100.0 * available ) / sizeWhenDone ) +  '%';
        setInnerHTML(e.availability_lb, str);

        //
        //  downloaded_lb
        //

        if(torrents.length < 1)
            str = none;
        else {
            d = f = 0;
            for(i=0; t=torrents[i]; ++i) {
                d = t.getDownloadedEver();
                f = t.getFailedEver();
            }
            if(f)
                str = fmt.size(d) + ' (' + fmt.size(f) + ' corrupt)';
            else
                str = fmt.size(d);
        }
        setInnerHTML(e.downloaded_lb, str);

        //
        //  uploaded_lb
        //

        if(torrents.length < 1)
            str = none;
        else {
            d = u = 0;
            for(i=0; t=torrents[i]; ++i) {
                d = t.getDownloadedEver();
                u = t.getUploadedEver();
            }
            str = fmt.size(u) + ' (Ratio: ' + fmt.ratioString( Math.ratio(u,d))+')';
        }
        setInnerHTML(e.uploaded_lb, str);

        //
        // running time
        //

        if(torrents.length < 1)
            str = none;
        else {
            allPaused = true;
            baseline = torrents[0].getStartDate();
            for(i=0; t=torrents[i]; ++i) {
                if(baseline != t.getStartDate())
                    baseline = 0;
                if(!t.isStopped())
                    allPaused = false;
            }
            if(allPaused)
                str = stateString; // paused || finished
            else if(!baseline)
                str = mixed;
            else
                str = fmt.timeInterval(now/1000 - baseline);
        }
        setInnerHTML(e.running_time_lb, str);

        //
        // remaining time
        //

        str = '';
        if(torrents.length < 1)
            str = none;
        else {
            baseline = torrents[0].getETA();
            for(i=0; t=torrents[i]; ++i) {
                if(baseline != t.getETA()) {
                    str = mixed;
                    break;
                }
            }
        }
        if(!str.length) {
            if(baseline < 0)
                str = unknown;
            else
                str = fmt.timeInterval(baseline);
        }
        setInnerHTML(e.remaining_time_lb, str);

        //
        // last activity
        //

        latest = -1;
        if(torrents.length < 1)
            str = none;
        else {
            baseline = torrents[0].getLastActivity();
            for(i=0; t=torrents[i]; ++i) {
                d = t.getLastActivity();
                if(latest < d)
                    latest = d;
            }
            d = now/1000 - latest; // seconds since last activity
            if(d < 0)
                str = none;
            else if(d < 5)
                str = 'Active now';
            else
                str = fmt.timeInterval(d) + ' ago';
        }
        setInnerHTML(e.last_activity_lb, str);

        //
        // error
        //

        if(torrents.length < 1)
            str = none;
        else {
            str = torrents[0].getErrorString();
            for(i=0; t=torrents[i]; ++i) {
                if(str != t.getErrorString()) {
                    str = mixed;
                    break;
                }
            }
        }
        setInnerHTML(e.error_lb, str || none);

        //
        // size
        //

        if(torrents.length < 1)
            str = none;
        else {
            pieces = 0;
            size = 0;
            pieceSize = torrents[0].getPieceSize();
            for(i=0; t=torrents[i]; ++i) {
                pieces += t.getPieceCount();
                size += t.getTotalSize();
                if(pieceSize != t.getPieceSize())
                    pieceSize = 0;
            }
            if(!size)
                str = none;
            else if(pieceSize > 0)
                str = fmt.size(size) + ' (' + pieces.toStringWithCommas() + ' pieces @ ' + fmt.mem(pieceSize) + ')';
            else
                str = fmt.size(size) + ' (' + pieces.toStringWithCommas() + ' pieces)';
        }
        setInnerHTML(e.size_lb, str);

        //
        //  hash
        //

        if(torrents.length < 1)
            str = none;
        else {
            str = torrents[0].getHashString();
            for(i=0; t=torrents[i]; ++i) {
                if(str != t.getHashString()) {
                    str = mixed;
                    break;
                }
            }
        }
        setInnerHTML(e.hash_lb, str);

        //
        //  privacy
        //

        if(torrents.length < 1)
            str = none;
        else {
            baseline = torrents[0].getPrivateFlag();
            str = baseline ? 'Private to this tracker -- DHT and PEX disabled' : 'Public torrent';
            for(i=0; t=torrents[i]; ++i) {
                if(baseline != t.getPrivateFlag()) {
                    str = mixed;
                    break;
                }
            }
        }
        setInnerHTML(e.privacy_lb, str);

        //
        //  comment
        //

        if(torrents.length < 1)
            str = none;
        else {
            str = torrents[0].getComment();
            for(i=0; t=torrents[i]; ++i) {
                if(str != t.getComment()) {
                    str = mixed;
                    break;
                }
            }
        }
        if(!str)
            str = none;
        setInnerHTML(e.comment_lb, str.replace(/(https?|ftp):\/\/([\w\-]+(\.[\w\-]+)*(\.[a-z]{2,4})?)(\d{1,5})?(\/([^<>\s]*))?/g, '$&'));

        //
        //  origin
        //

        if(torrents.length < 1)
            str = none;
        else {
            mixed_creator = false;
            mixed_date = false;
            creator = torrents[0].getCreator();
            date = torrents[0].getDateCreated();
            for(i=0; t=torrents[i]; ++i) {
                if(creator != t.getCreator())
                    mixed_creator = true;
                if(date != t.getDateCreated())
                    mixed_date = true;
            }
            if(mixed_creator && mixed_date)
                str = mixed;
            else if(mixed_date && creator.length)
                str = 'Created by ' + creator;
            else if(mixed_creator && date)
                str = 'Created on ' + (new Date(date*1000)).toDateString();
            else
                str = 'Created by ' + creator + ' on ' + (new Date(date*1000)).toDateString();
        }
        setInnerHTML(e.origin_lb, str);

        //
        //  foldername
        //

        if(torrents.length < 1)
            str = none;
        else {
            str = torrents[0].getDownloadDir();
            for(i=0; t=torrents[i]; ++i) {
                if(str != t.getDownloadDir()) {
                    str = mixed;
                    break;
                }
            }
        }
        setInnerHTML(e.foldername_lb, str);
    },

    /****
    *****  FILES PAGE
    ****/

    changeFileCommand = function(rows, command) {
        var torrentId = data.file_torrent.getId();
        var rowIndices = $.map(rows.slice(0),function (row) {return row.getIndex();});
        data.controller.changeFileCommand(torrentId, rowIndices, command);
    },

    selectAllFiles = function() {
        changeFileCommand([], 'files-wanted');
    },

    deselectAllFiles = function() {
        changeFileCommand([], 'files-unwanted');
    },

    onFileWantedToggled = function(ev, row, want) {
        changeFileCommand([row], want?'files-wanted':'files-unwanted');
    },

    onFilePriorityToggled = function(ev, row, priority) {
        var command;
        switch(priority) {
            case -1: command = 'priority-low'; break;
            case  1: command = 'priority-high'; break;
            default: command = 'priority-normal'; break;
        }
        changeFileCommand([row], command);
    },

    clearFileList = function() {
        $(data.elements.file_list).empty();
        delete data.file_torrent;
        delete data.file_rows;
    },

    updateFilesPage = function() {
        var i, n, sel, row, tor, fragment,
            file_list = data.elements.file_list,
            torrents = data.torrents;

        if (torrents.length !== 1) {
            clearFileList();
            return;
        }

        // build the file list
        tor = torrents[0];

        clearFileList();
        data.file_torrent = tor;
        n = tor.getFileCount();
        data.file_rows = [];
        fragment = document.createDocumentFragment();

        for (i=0; i<n; ++i) {
            row = data.file_rows[i] = new FileRow(tor, i);
            fragment.appendChild(row.getElement());
                    $(row).bind('wantedToggled',onFileWantedToggled);
                    $(row).bind('priorityToggled',onFilePriorityToggled);
        }

        file_list.appendChild(fragment);
    },

    /****
    *****  PEERS PAGE
    ****/

    updatePeersPage = function() {
        var i, k, tor, peers, peer, parity,
            html = [],
            fmt = Transmission.fmt,
            peers_list = data.elements.peers_list,
            torrents = data.torrents;

        for (k=0; tor=torrents[k]; ++k)
        {
            peers = tor.getPeers();
            html.push('
');
            if (torrents.length > 1) {
                html.push('
', tor.getName(), '
');
            }
            if (!peers || !peers.length) {
                html.push('

'); // firefox won't paint the top border if the div is empty
                continue;
            }
            html.push('
',
                   '
',
                   '	',
                   'Up	',
                   'Down	',
                   '%	',
                   'Status	',
                   'Address	',
                   'Client	',
                   '
');
            for (i=0; peer=peers[i]; ++i) {
                parity = (i%2) ? 'odd' : 'even';
                html.push('
',
                       '', (peer.isEncrypted ? '
'
                                                 : '
'), '
', '	',
                       '', (peer.rateToPeer ? fmt.speedBps(peer.rateToPeer) : ''), '	',
                       '', (peer.rateToClient ? fmt.speedBps(peer.rateToClient) : ''), '	',
                       '', Math.floor(peer.progress*100), '%', '	',
                       '', fmt.peerStatus(peer.flagStr), '	',
                       '', peer.address, '	',
                       '', peer.clientName, '	',
                       '
');
            }
            html.push('

');
        }

        setInnerHTML(peers_list, html.join(''));
    },

    /****
    *****  TRACKERS PAGE
    ****/

    getAnnounceState = function(tracker) {
        var timeUntilAnnounce, s = '';
        switch (tracker.announceState) {
            case Torrent._TrackerActive:
                s = 'Announce in progress';
                break;
            case Torrent._TrackerWaiting:
                timeUntilAnnounce = tracker.nextAnnounceTime - ((new Date()).getTime() / 1000);
                if (timeUntilAnnounce < 0) {
                    timeUntilAnnounce = 0;
                }
                s = 'Next announce in ' + Transmission.fmt.timeInterval(timeUntilAnnounce);
                break;
            case Torrent._TrackerQueued:
                s = 'Announce is queued';
                break;
            case Torrent._TrackerInactive:
                s = tracker.isBackup ?
                    'Tracker will be used as a backup' :
                    'Announce not scheduled';
                break;
            default:
                s = 'unknown announce state: ' + tracker.announceState;
        }
        return s;
    },

    lastAnnounceStatus = function(tracker) {

        var lastAnnounceLabel = 'Last Announce',
            lastAnnounce = [ 'N/A' ],
        lastAnnounceTime;

        if (tracker.hasAnnounced) {
            lastAnnounceTime = Transmission.fmt.timestamp(tracker.lastAnnounceTime);
            if (tracker.lastAnnounceSucceeded) {
                lastAnnounce = [ lastAnnounceTime, ' (got ',  Transmission.fmt.plural(tracker.lastAnnouncePeerCount, 'peer'), ')' ];
            } else {
                lastAnnounceLabel = 'Announce error';
                lastAnnounce = [ (tracker.lastAnnounceResult ? (tracker.lastAnnounceResult + ' - ') : ''), lastAnnounceTime ];
            }
        }
        return { 'label':lastAnnounceLabel, 'value':lastAnnounce.join('') };
    },

    lastScrapeStatus = function(tracker) {

        var lastScrapeLabel = 'Last Scrape',
            lastScrape = 'N/A',
        lastScrapeTime;

        if (tracker.hasScraped) {
            lastScrapeTime = Transmission.fmt.timestamp(tracker.lastScrapeTime);
            if (tracker.lastScrapeSucceeded) {
                lastScrape = lastScrapeTime;
            } else {
                lastScrapeLabel = 'Scrape error';
                lastScrape = (tracker.lastScrapeResult ? tracker.lastScrapeResult + ' - ' : '') + lastScrapeTime;
            }
        }
        return {'label':lastScrapeLabel, 'value':lastScrape};
    },

    updateTrackersPage = function() {
        var i, j, tier, tracker, trackers, tor,
            html, parity, lastAnnounceStatusHash,
            announceState, lastScrapeStatusHash,
            na = 'N/A',
            trackers_list = data.elements.trackers_list,
            torrents = data.torrents;

        // By building up the HTML as as string, then have the browser
        // turn this into a DOM tree, this is a fast operation.
        html = [];
        for (i=0; tor=torrents[i]; ++i)
        {
            html.push ('
');

            if (torrents.length > 1)
                html.push('
', tor.getName(), '
');

            tier = -1;
            trackers = tor.getTrackers();
            for (j=0; tracker=trackers[j]; ++j)
            {
                if (tier != tracker.tier)
                {
                    if (tier !== -1) // close previous tier
                        html.push('

');

                    tier = tracker.tier;

                    html.push('
',
                          'Tier ', tier, '
',
                          '
');
                }

                // Display construction
                lastAnnounceStatusHash = lastAnnounceStatus(tracker);
                announceState = getAnnounceState(tracker);
                lastScrapeStatusHash = lastScrapeStatus(tracker);
                parity = (j%2) ? 'odd' : 'even';
                html.push('

',
                      tracker.host, '
',
                      '
',
                      '
', lastAnnounceStatusHash['label'], ': ', lastAnnounceStatusHash['value'], '
',
                      '
', announceState, '
',
                      '
', lastScrapeStatusHash['label'], ': ', lastScrapeStatusHash['value'], '
',
                      '

',
                      '
Seeders:	', (tracker.seederCount > -1 ? tracker.seederCount : na), '
',
                      '
Leechers:	', (tracker.leecherCount > -1 ? tracker.leecherCount : na), '
',
                      '
Downloads:	', (tracker.downloadCount > -1 ? tracker.downloadCount : na), '
',
                      '

');
            }
            if (tier !== -1) // close last tier
                    html.push('

');

            html.push('
'); // inspector_group
        }

        setInnerHTML(trackers_list, html.join(''));
    },

    initialize = function (controller) {

        var ti = '#torrent_inspector_';

        data.controller = controller;

        $('.inspector-tab').click(onTabClicked);

        data.elements.info_page      = $('#inspector-page-info')[0];
        data.elements.files_page     = $('#inspector-page-files')[0];
        data.elements.peers_page     = $('#inspector-page-peers')[0];
        data.elements.trackers_page  = $('#inspector-page-trackers')[0];

        data.elements.file_list      = $('#inspector_file_list')[0];
        data.elements.peers_list     = $('#inspector_peers_list')[0];
        data.elements.trackers_list  = $('#inspector_trackers_list')[0];

	data.elements.have_lb           = $('#inspector-info-have')[0];
	data.elements.availability_lb   = $('#inspector-info-availability')[0];
	data.elements.downloaded_lb     = $('#inspector-info-downloaded')[0];
	data.elements.uploaded_lb       = $('#inspector-info-uploaded')[0];
	data.elements.state_lb          = $('#inspector-info-state')[0];
	data.elements.running_time_lb   = $('#inspector-info-running-time')[0];
	data.elements.remaining_time_lb = $('#inspector-info-remaining-time')[0];
	data.elements.last_activity_lb  = $('#inspector-info-last-activity')[0];
	data.elements.error_lb          = $('#inspector-info-error')[0];
	data.elements.size_lb           = $('#inspector-info-size')[0];
	data.elements.foldername_lb     = $('#inspector-info-location')[0];
	data.elements.hash_lb           = $('#inspector-info-hash')[0];
	data.elements.privacy_lb        = $('#inspector-info-privacy')[0];
	data.elements.origin_lb         = $('#inspector-info-origin')[0];
	data.elements.comment_lb        = $('#inspector-info-comment')[0];
        data.elements.name_lb           = $('#torrent_inspector_name')[0];

        // file page's buttons
        $('#select-all-files').click(selectAllFiles);
        $('#deselect-all-files').click(deselectAllFiles);

        // force initial 'N/A' updates on all the pages
        updateInspector();
        updateInfoPage();
        updatePeersPage();
        updateTrackersPage();
        updateFilesPage();
    };

    /****
    *****  PUBLIC FUNCTIONS
    ****/

    this.setTorrents = function (torrents) {
        var d = data;

        // update the inspector when a selected torrent's data changes.
        $(d.torrents).unbind('dataChanged.inspector');
        $(torrents).bind('dataChanged.inspector', $.proxy(updateInspector,this));
        d.torrents = torrents;

        // periodically ask for updates to the inspector's torrents
        clearInterval(d.refreshInterval);
        d.refreshInterval = setInterval($.proxy(refreshTorrents,this), 2000);
        refreshTorrents();

        // refresh the inspector's UI
        updateInspector();
    };

    initialize (controller);
};


text:
void interface_init(void);
bool interface_clickDown(int x, int y);
void interface_clickHeld(int x, int y);
void interface_clickUp(int x, int y);
bool interface_keyPressed(unsigned char key, int x, int y);
void interface_update(float deltaTime);
void interface_render(void);
void interface_reshapeWindow(int width, int height);
#endif

redpajama_set_name: RedPajamaGithub


text:
% Template for NIME 2017
%
% Modified by Cumhur Erkut on <2016-10-11 Tue>
% Modified by Edgar Berdahl on 5 November 2014
% Modified by Baptiste Caramiaux on 25 November 2013
% Modified by Kyogu Lee on 7 October 2012
% Modified by Georg Essl on 7 November 2011
%
% Based on "sig-alternate.tex" V1.9 April 2009
% This file should be compiled with "nime-alternate.cls"

\documentclass{nime-alternate}

\begin{document}
%
% --- Author Metadata here ---
\conferenceinfo{NIME'17,}{May 15-19, 2017, Aalborg University Copenhagen, Denmark.}

\title{NIME Proceedings Template for LaTeX}

%
% You need the command \numberofauthors to handle the 'placement
% and alignment' of the authors beneath the title.
%
% For aesthetic reasons, we recommend 'three authors at a time'
% i.e. three 'name/affiliation blocks' be placed beneath the title.
%
% NOTE: You are NOT restricted in how many 'rows' of
% "name/affiliations" may appear. We just ask that you restrict
% the number of 'columns' to three.
%
% Because of the available 'opening page real-estate'
% we ask you to refrain from putting more than six authors
% (two rows with three columns) beneath the article title.
% More than six makes the first-page appear very cluttered indeed.
%
% Use the \alignauthor commands to handle the names
% and affiliations for an 'aesthetic maximum' of six authors.
% Add names, affiliations, addresses for
% the seventh etc. author(s) as the argument for the
% \additionalauthors command.
% These 'additional authors' will be output/set for you
% without further effort on your part as the last section in
% the body of your article BEFORE References or any Appendices.

\numberofauthors{8} %  in this sample file, there are a *total*
% of EIGHT authors. SIX appear on the 'first-page' (for formatting
% reasons) and the remaining two appear in the \additionalauthors section.
%
\author{
% You can go ahead and credit any number of authors here,
% e.g. one 'row of three' or two rows (consisting of one row of three
% and a second row of one, two or three).
%
% The command \alignauthor (no curly braces needed) should
% precede each author name, affiliation/snail-mail address and
% e-mail address. Additionally, tag each line of
% affiliation/address with \affaddr, and tag the
% e-mail address with \email.
%
% 1st. author
\alignauthor
Ben Trovato\titlenote{Dr.~Trovato insisted his name be first.}\\
       \affaddr{Institute for Clarity in Documentation}\\
       \affaddr{1932 Wallamaloo Lane}\\
       \affaddr{Wallamaloo, New Zealand}\\
       \email{trovato@corporation.com}
% 2nd. author
\alignauthor
G.K.M. Tobin\titlenote{The secretary disavows
any knowledge of this author's actions.}\\
       \affaddr{Institute for Clarity in Documentation}\\
       \affaddr{P.O. Box 1212}\\
       \affaddr{Dublin, Ohio 43017-6221}\\
       \email{webmaster@marysville-ohio.com}
% 3rd. author
\alignauthor Lars Th{\o}rv{\"a}ld\titlenote{This author is the
one who did all the really hard work.}\\
       \affaddr{The Th{\o}rv{\"a}ld Group}\\
       \affaddr{1 Th{\o}rv{\"a}ld Circle}\\
       \affaddr{Hekla, Iceland}\\
       \email{larst@affiliation.org}
\and  % use '\and' if you need 'another row' of author names
% 4th. author
\alignauthor Lawrence P. Leipuner\\
       \affaddr{Brookhaven Laboratories}\\
       \affaddr{Brookhaven National Lab}\\
       \affaddr{P.O. Box 5000}\\
       \email{lleipuner@researchlabs.org}
% 5th. author
\alignauthor Sean Fogarty\\
       \affaddr{NASA Ames Research Center}\\
       \affaddr{Moffett Field}\\
       \affaddr{California 94035}\\
       \email{fogartys@amesres.org}
% 6th. author
\alignauthor Charles Palmer\\
       \affaddr{Palmer Research Laboratories}\\
       \affaddr{8600 Datapoint Drive}\\
       \affaddr{San Antonio, Texas 78229}\\
       \email{cpalmer@prl.com}
}
% There's nothing stopping you putting the seventh, eighth, etc.
% author on the opening page (as the 'third row') but we ask,
% for aesthetic reasons that you place these 'additional authors'
% in the \additional authors block, viz.
\additionalauthors{Additional authors: John Smith (The Th{\o}rv{\"a}ld Group,
email: {\texttt{jsmith@affiliation.org}}) and Julius P.~Kumquat
(K. Consortium, email: {\texttt{jpkumquat@consortium.net}}).}
\date{30 July 1999}
% Just remember to make sure that the TOTAL number of authors
% is the number that will appear on the first page PLUS the
% number that will appear in the \additionalauthors section.

\maketitle
\begin{abstract}
This paper provides a sample of a \LaTeX\ document for the NIME conference series. It conforms,
somewhat loosely, to the formatting guidelines for
ACM SIG Proceedings. It is an {\em alternate} style which produces
a {\em tighter-looking} paper and was designed in response to
concerns expressed, by authors, over page-budgets.
It complements the document \textit{Author's (Alternate) Guide to
Preparing ACM SIG Proceedings Using \LaTeX$2_\epsilon$\ and Bib\TeX}.
This source file has been written with the intention of being
compiled under \LaTeX$2_\epsilon$\ and BibTeX.

To make best use of this sample document, run it through \LaTeX\
and BibTeX, and compare this source code with your compiled PDF file. A compiled PDF version is available to help you with the `look and feel.'  \textbf{The paper submitted to the NIME conference must be stored in an \underline{A4}-sized PDF file, so North Americans should take care not to inadvertently generate \underline{letter} paper-sized PDF files.}  This paper template should prevent that from happening if the \texttt{pdflatex} program is used to generate the PDF file.

The abstract should preferably be between 100 and 200 words.
\end{abstract}

\keywords{NIME, proceedings, \LaTeX, template}

\acmclassification1998{See \url{http://www.acm.org/about/class/1998/} to obtain categories and subject descriptors for classifying this paper. An example follows:

H.5.5 [Information Interfaces and Presentation] Sound and Music Computing, H.5.2 [Information Interfaces and Presentation] User Interfaces---Haptic I/O, I.2.9 [Artificial Intelligence] Robotics---Propelling mechanisms.

\textbf{The new requirements for classifying the papers at the time of submission are detailed.  It is strongly recommended that authors view the submission form prior to starting to write the paper.  See the file \texttt{ScientificProgramSubmissionFormPreview.pdf} for a preview.  (Do \emph{not} create a dummy submission to view the submission form.)}}

\section{Introduction}
The \textit{proceedings} are the records of a conference.
ACM seeks to give these conference by-products a uniform,
high-quality appearance.  To do this, ACM has some rigid
requirements for the format of the proceedings documents: there
is a specified format (balanced  double columns), a specified
set of fonts (Arial or Helvetica and Times Roman) in
certain specified sizes (for instance, 9 point for body copy).

The good news is, with only a handful of manual
settings,\footnote{Two of these, the {\texttt{\char'134 numberofauthors}}
and {\texttt{\char'134 alignauthor}} commands, you have
already used; another, {\texttt{\char'134 balancecolumns}}, will
be used in your very last run of \LaTeX\ to ensure
balanced column heights on the last page.} the \LaTeX\ document
class file handles all of this for you.

The remainder of this document is concerned with showing, in
the context of an ``actual'' document, the \LaTeX\ commands
specifically available for denoting the structure of a
proceedings paper, rather than with giving rigorous descriptions
or explanations of such commands.

\section{The {\secit Body} of The Paper}
Typically, the body of a paper is organized
into a hierarchical structure, with numbered or unnumbered
headings for sections, subsections, sub-subsections, and even
smaller sections.  The command \texttt{{\char'134}section} that
precedes this paragraph is part of such a
hierarchy.\footnote{This is the second footnote.  It
starts a series of three footnotes that add nothing
informational, but just give an idea of how footnotes work
and look. It is a wordy one, just so you see
how a longish one plays out.} \LaTeX\ handles the numbering
and placement of these headings for you, when you use
the appropriate heading commands around the titles
of the headings.  If you want a sub-subsection or
smaller part to be unnumbered in your output, simply append an
asterisk to the command name.  Examples of both
numbered and unnumbered headings will appear throughout the
balance of this sample document.

Because the entire article is contained in
the \textbf{document} environment, you can indicate the
start of a new paragraph with a blank line in your
input file; that is why this sentence forms a separate paragraph.

\subsection{Type Changes and {\subsecit Special} Characters}
We have already seen several typeface changes in this sample.  You
can indicate italicized words or phrases in your text with
the command \texttt{{\char'134}textit}; emboldening with the
command \texttt{{\char'134}textbf}
and typewriter-style (for instance, for computer code) with
\texttt{{\char'134}texttt}.  But remember, you do not
have to indicate typestyle changes when such changes are
part of the \textit{structural} elements of your
article; for instance, the heading of this subsection will
be in a sans serif\footnote{A third footnote, here.
Let's make this a rather short one to
see how it looks.} typeface, but that is handled by the
document class file. Take care with the use
of\footnote{A fourth, and last, footnote.}
the curly braces in typeface changes; they mark
the beginning and end of
the text that is to be in the different typeface.

You can use whatever symbols, accented characters, or
non-English characters you need anywhere in your document;
you can find a complete list of what is
available in the \textit{\LaTeX\
User's Guide} \cite{Lamport:LaTeX}.

\subsection{Tables}
Because tables cannot be split across pages, the best
placement for them is typically the top of the page
nearest their initial cite.  To
ensure this proper ``floating'' placement of tables, use the
environment \textbf{table} to enclose the table's contents and
the table caption.  The contents of the table itself must go
in the \textbf{tabular} environment, to
be aligned properly in rows and columns, with the desired
horizontal and vertical rules.  Again, detailed instructions
on \textbf{tabular} material
is found in the \textit{\LaTeX\ User's Guide}.

Immediately following this sentence is the point at which
Table~\ref{tab:frequency} is included in the input file; compare the
placement of the table here with the table in the printed
dvi output of this document.

To get correct numbering of tables, please use the \textbf{label} command inside the \textbf{table} environment and a corresponding \textbf{ref} in the text.

\begin{table}
\centering
\caption{Frequency of Special Characters}
\begin{tabular}{|c|c|l|} \hline
Non-English or Math&Frequency&Comments\\ \hline
\O & 1 in 1,000& For Swedish names\\ \hline
$\pi$ & 1 in 5& Common in math\\ \hline
\$ & 4 in 5 & Used in business\\ \hline
$\Psi^2_1$ & 1 in 40,000& Unexplained usage\\
\hline\end{tabular}
\label{tab:frequency}
\end{table}

To set a wider table, which takes up the whole width of
the page's live area, use the environment
\textbf{table*} to enclose the table's contents and
the table caption.  As with a single-column table, this wide
table will ``float" to a location deemed more desirable.
Immediately following this sentence is the point at which
Table 2 is included in the input file; again, it is
instructive to compare the placement of the
table here with the table in the printed dvi
output of this document.

\begin{table*}[htbp]
\centering
\caption{Some Typical Commands}
\begin{tabular}{|c|c|l|} \hline
Command&A Number&Comments\\ \hline
\texttt{{\char'134}alignauthor} & 100& Author alignment\\ \hline
\texttt{{\char'134}numberofauthors}& 200& Author enumeration\\ \hline
\texttt{{\char'134}table}& 300 & For tables\\ \hline
\texttt{{\char'134}table*}& 400& For wider tables\\ \hline\end{tabular}
\end{table*}
% end the environment with {table*}, NOTE not {table}!

\subsection{Figures}
Like tables, figures cannot be split across pages; the best placement for them is typically the top or the bottom of the page nearest their initial cite. To ensure this proper ``floating'' placement of figures, use the environment \textbf{figure} to enclose the figure and its caption. Optionally, for small figures that you want to place inline with the text, you can use the \textbf{htbp} options to \textbf{figure} to see whether there is space for placing it inline with the text.

This sample document contains examples of \textbf{.pdf} (Figure~\ref{fig:BlockDiagram1}) and \textbf{.jpg} files to be displayable with \LaTeX. More details on each of these is found in the \textit{Author's Guide}.

\begin{figure}[htbp]
	\centering
		\includegraphics[width=1\columnwidth]{BlockDiagram1}
	\caption{A sample image in PDF format.}
	\label{fig:BlockDiagram1}
\end{figure}

As was the case with tables, you may want a figure that spans two columns (Figure~~\ref{fig:BlockDiagram2}). To do this, and still to ensure proper ``floating'' placement of tables, use the environment \textbf{figure*} to enclose the figure and its caption. And don't forget to end the environment with {figure*}, not {figure}!

\begin{figure*}[htbp]
	\centering
		\includegraphics[width=1\textwidth]{BlockDiagram2}
	\caption{A sample black and white graphic (.jpg format) that needs to span two columns of text.}
	\label{fig:BlockDiagram2}
\end{figure*}

\subsection{Math Equations}
You may want to display math equations in three distinct styles:
inline, numbered or non-numbered display.  Each of
the three are discussed in the next sections.

\subsubsection{Inline (In-text) Equations}
A formula that appears in the running text is called an
inline or in-text formula.  It is produced by the
\textbf{math} environment, which can be
invoked with the usual \texttt{{\char'134}begin. . .{\char'134}end}
construction or with the short form \texttt{\$. . .\$}. You
can use any of the symbols and structures,
from $\alpha$ to $\omega$, available in
\LaTeX \cite{Lamport:LaTeX}; this section will simply show a
few examples of in-text equations in context. Notice how
this equation: \begin{math}\lim_{n\rightarrow \infty}x=0\end{math},
set here in in-line math style, looks slightly different when
set in display style.  (See next section).

\subsubsection{Display Equations}
A numbered display equation -- one set off by vertical space
from the text and centered horizontally -- is produced
by the \textbf{equation} environment. An unnumbered display
equation is produced by the \textbf{displaymath} environment.

Again, in either environment, you can use any of the symbols
and structures available in \LaTeX; this section will just
give a couple of examples of display equations in context.
First, consider the equation, shown as an inline equation above:
\begin{equation}\lim_{n\rightarrow \infty}x=0\end{equation}
Notice how it is formatted somewhat differently in
the \textbf{displaymath}
environment.  Now, we'll enter an unnumbered equation:
\begin{displaymath}\sum_{i=0}^{\infty} x + 1\end{displaymath}
and follow it with another numbered equation:
\begin{equation}\sum_{i=0}^{\infty}x_i=\int_{0}^{\pi+2} f\end{equation}
just to demonstrate \LaTeX's able handling of numbering.

\subsection{Theorem-like Constructs}
Other common constructs that may occur in your article are
the forms for logical constructs like theorems, axioms,
corollaries and proofs.  There are
two forms, one produced by the
command \texttt{{\char'134}newtheorem} and the
other by the command \texttt{{\char'134}newdef}; perhaps
the clearest and easiest way to distinguish them is
to compare the two in the output of this sample document:

This uses the \textbf{theorem} environment, created by
the\linebreak\texttt{{\char'134}newtheorem} command:
\newtheorem{theorem}{Theorem}
\begin{theorem}
Let $f$ be continuous on $[a,b]$.  If $G$ is
an antiderivative for $f$ on $[a,b]$, then
\begin{displaymath}\int^b_af(t)dt = G(b) - G(a).\end{displaymath}
\end{theorem}

The other uses the \textbf{definition} environment, created
by the \texttt{{\char'134}newdef} command:
\newdef{definition}{Definition}
\begin{definition}
If $z$ is irrational, then by $e^z$ we mean the
unique number which has
logarithm $z$: \begin{displaymath}{\log e^z = z}\end{displaymath}
\end{definition}

Two lists of constructs that use one of these
forms is given in the
\textit{Author's  Guidelines}.

There is one other similar construct environment, which is
already set up
for you; i.e. you must \textit{not} use
a \texttt{{\char'134}newdef} command to
create it: the \textbf{proof} environment.  Here
is a example of its use:
\begin{proof}
Suppose on the contrary there exists a real number $L$ such that
\begin{displaymath}
\lim_{x\rightarrow\infty} \frac{f(x)}{g(x)} = L.
\end{displaymath}
Then
\begin{displaymath}
l=\lim_{x\rightarrow c} f(x)
= \lim_{x\rightarrow c}
\left[ g{x} \cdot \frac{f(x)}{g(x)} \right ]
= \lim_{x\rightarrow c} g(x) \cdot \lim_{x\rightarrow c}
\frac{f(x)}{g(x)} = 0,
\end{displaymath}
which contradicts our assumption that $l\neq 0$.
\end{proof}

Complete rules about using these environments and using the
two different creation commands are in the
\textit{Author's Guide}; please consult it for more
detailed instructions.  If you need to use another construct,
not listed therein, which you want to have the same
formatting as the Theorem
or the Definition \cite{salas:calculus} shown above,
use the \texttt{{\char'134}newtheorem} or the
\texttt{{\char'134}newdef} command,
respectively, to create it.

\subsection{A {\secit Caveat} for the \TeX\ Expert}
Because you have just been given permission to
use the \texttt{{\char'134}newdef} command to create a
new form, you might think you can
use \TeX's \texttt{{\char'134}def} to create a
new command: \textit{Please refrain from doing this!}
Remember that your \LaTeX\ source code is primarily intended
to create camera-ready copy, but may be converted
to other forms -- e.g. HTML. If you inadvertently omit
some or all of the \texttt{{\char'134}def}s recompilation will
be, to say the least, problematic.

\subsection{Citations}
Citations to articles \cite{bowman:reasoning,
clark:pct, braams:babel, herlihy:methodology},
conference proceedings \cite{clark:pct} or
books \cite{salas:calculus, Lamport:LaTeX} listed
in the Bibliography section of your
article will occur throughout the text of your article.
You should use BibTeX to automatically produce this bibliography;
you simply need to insert one of several citation commands with
a key of the item cited in the proper location in
the \texttt{.tex} file \cite{Lamport:LaTeX}.
The key is a short reference you invent to uniquely
identify each work; in this sample document, the key is
the first author's surname and a
word from the title.  This identifying key is included
with each item in the \texttt{.bib} file for your article.

The details of the construction of the \texttt{.bib} file
are beyond the scope of this sample document, but more
information can be found in the \textit{Author's Guide},
and exhaustive details in the \textit{\LaTeX\ User's
Guide} \cite{Lamport:LaTeX} and in various online source.\footnote{See e.g. \url{http://www.bibtex.org/}.}

This article shows only the plainest form
of the citation command, using \texttt{{\char'134}cite}.
This is what is stipulated in the SIGS style specifications.
No other citation format is endorsed or supported.

\subsection{Links}

Links to URLs can be included using the \texttt{{\char'134}url} command. This will generate a clickable link like this: \url{http://www.nime2017.org}.

\section{Conclusions}
This paragraph will end the body of this sample document.
Remember that you might still have Acknowledgments or
Appendices; brief samples of these
follow.  There is still the Bibliography to deal with; and
we will make a disclaimer about that here: with the exception
of the reference to the \LaTeX\ book, the citations in
this paper are to articles which have nothing to
do with the present subject and are used as
examples only.
%\end{document}  % This is where a 'short' article might terminate

%ACKNOWLEDGMENTS are optional
\section{Acknowledgments}
This section is optional; it is a location for you
to acknowledge grants, funding, editing assistance and
what have you.  In the present case, for example, the
authors would like to thank Gerald Murray of ACM for
his help in codifying this \textit{Author's Guide}
and the \textbf{.cls} and \textbf{.tex} files that it describes.

%
% The following two commands are all you need in the
% initial runs of your .tex file to
% produce the bibliography for the citations in your paper.
\bibliographystyle{abbrv}
\bibliography{nime-references}  % sigproc.bib is the name of the Bibliography in this case
% You must have a proper ".bib" file
%  and remember to run:
% latex bibtex latex latex
% to resolve all references
%
% ACM needs 'a single self-contained file'!
%
%APPENDICES are optional
\appendix
%Appendix A
\section{Headings in Appendices}
The rules about hierarchical headings discussed above for
the body of the article are different in the appendices.
In the \textbf{appendix} environment, the command
\textbf{section} is used to
indicate the start of each Appendix, with alphabetic order
designation (i.e. the first is A, the second B, etc.) and
a title (if you include one).  So, if you need
hierarchical structure
\textit{within} an Appendix, start with \textbf{subsection} as the
highest level. Here is an outline of the body of this
document in Appendix-appropriate form:
\subsection{Introduction}
\subsection{The Body of the Paper}
\subsubsection{Type Changes and  Special Characters}
\subsubsection{Math Equations}
\paragraph{Inline (In-text) Equations}
\paragraph{Display Equations}
\subsubsection{Citations}
\subsubsection{Tables}
\subsubsection{Figures}
\subsubsection{Theorem-like Constructs}
\subsubsection*{A Caveat for the \TeX\ Expert}
\subsection{Conclusions}
\subsection{Acknowledgments}
\subsection{Additional Authors}
This section is inserted by \LaTeX; you do not insert it.
You just add the names and information in the
\texttt{{\char'134}additionalauthors} command at the start
of the document.
\subsection{References}
Generated by bibtex from your ~.bib file.  Run latex,
then bibtex, then latex twice (to resolve references)
to create the ~.bbl file.  Insert that ~.bbl file into
the .tex source file and comment out
the command \texttt{{\char'134}thebibliography}.

% This next section command marks the start of
% Appendix B, and does not continue the present hierarchy
\section{More Help for the Hardy}
The sig-alternate.cls file itself is chock-full of succinct
and helpful comments.  If you consider yourself a moderately
experienced to expert user of \LaTeX, you may find reading
it useful but please remember not to change it.

%%% Place this command where you want to balance the columns on the last page.
%\balancecolumns

% That's all folks!
\end{document}


text:
package energy.usef.core.factory;

import energy.usef.core.constant.USEFConstants;
import energy.usef.core.controller.IncomingMessageController;
import energy.usef.core.controller.error.OutgoingErrorMessageController;
import energy.usef.core.data.xml.bean.message.Message;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Controller class factory builder.
 */
public class ControllerClassFactoryBuilder {
    private static final Logger LOGGER = LoggerFactory.getLogger(ControllerClassFactoryBuilder.class);

    private static ControllerClassFactoryBuilder builder;
    private static ControllerClassFactory<OutgoingErrorMessageController<Message>> outgoingErrorMessageControllerFactory;
    private static ControllerClassFactory<IncomingMessageController<Message>> incomingMessageControllerFactory;

    private ControllerClassFactoryBuilder() {

    }

    /**
     * This method returns the builder to create Controllers.
     *
     * @return {@link ControllerClassFactoryBuilder}
     */
    public static ControllerClassFactoryBuilder getBuilder() {
        if (builder == null) {
            builder = new ControllerClassFactoryBuilder();
        }
        return builder;
    }

    /**
     * Gets OutgoingErrorMessageControllerFactory instance.
     *
     * @return OutgoingErrorMessageControllerFactory
     */
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public final ControllerClassFactory<OutgoingErrorMessageController<Message>> getOutgoingErrorMessageControllerFactory() {
        if (outgoingErrorMessageControllerFactory == null) {
            outgoingErrorMessageControllerFactory = new ControllerClassFactory(OutgoingErrorMessageController.class,
                    USEFConstants.BASE_PACKAGE, USEFConstants.OUTGOING_ERROR_MESSAGE_CONTROLLER_PACKAGE_PATTERN);
            LOGGER.debug("Created OutgoingErrorMessageControllerFactory");
        }
        return outgoingErrorMessageControllerFactory;
    }

    /**
     * Gets IncomingMessageControllerFactory instance.
     *
     * @return IncomingMessageControllerFactory
     */
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public final ControllerClassFactory<IncomingMessageController<Message>> getIncomingMessageControllerFactory() {
        if (incomingMessageControllerFactory == null) {
            incomingMessageControllerFactory = new ControllerClassFactory(IncomingMessageController.class,
                    USEFConstants.BASE_PACKAGE, USEFConstants.INCOMING_MESSAGE_CONTROLLER_PACKAGE_PATTERN);
            LOGGER.debug("Created IncomingMessageControllerFactoryFactory");
        }
        return incomingMessageControllerFactory;
    }

}


text:
.class abstract Lcom/samsung/android/settings/guide/GuiderBase;
.super Ljava/lang/Object;
.source "GuiderBase.java"

# instance fields
.field private mActivityRef:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference",
            "<",
            "Landroid/app/Activity;",
            ">;"
        }
    .end annotation
.end field

.field private mFragmentRef:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference",
            "<",
            "Landroid/app/Fragment;",
            ">;"
        }
    .end annotation
.end field

.field protected mHelpDialog:Lcom/samsung/android/settings/helpdialog/TwHelpAnimatedDialog;

.field private mIsSwitcherOn:Z

# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 3

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mIsSwitcherOn:Z

    if-nez p1, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string/jumbo v1, "Expecting not null"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mActivityRef:Ljava/lang/ref/WeakReference;

    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-virtual {p1}, Landroid/app/Activity;->getFragmentManager()Landroid/app/FragmentManager;

    move-result-object v1

    const-string/jumbo v2, "GuideFragment"

    invoke-virtual {v1, v2}, Landroid/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroid/app/Fragment;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mFragmentRef:Ljava/lang/ref/WeakReference;

    return-void
.end method

# virtual methods
.method public finish()V
    .locals 4

    iget-object v1, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mHelpDialog:Lcom/samsung/android/settings/helpdialog/TwHelpAnimatedDialog;

    if-eqz v1, :cond_0

    :try_start_0
    iget-object v1, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mHelpDialog:Lcom/samsung/android/settings/helpdialog/TwHelpAnimatedDialog;

    invoke-virtual {v1}, Lcom/samsung/android/settings/helpdialog/TwHelpAnimatedDialog;->dismiss()V

    const/4 v1, 0x0

    iput-object v1, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mHelpDialog:Lcom/samsung/android/settings/helpdialog/TwHelpAnimatedDialog;
    :try_end_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    return-void

    :catch_0
    move-exception v0

    const-string/jumbo v1, "GuiderBaseClass"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v3, "IllegalArgumentException "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method getActivity()Landroid/app/Activity;
    .locals 2

    const/4 v0, 0x0

    iget-object v1, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mActivityRef:Ljava/lang/ref/WeakReference;

    if-eqz v1, :cond_0

    iget-object v0, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mActivityRef:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    :cond_0
    return-object v0
.end method

.method getFragment()Landroid/app/Fragment;
    .locals 2

    const/4 v0, 0x0

    iget-object v1, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mFragmentRef:Ljava/lang/ref/WeakReference;

    if-eqz v1, :cond_0

    iget-object v0, p0, Lcom/samsung/android/settings/guide/GuiderBase;->mFragmentRef:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/Fragment;

    :cond_0
    return-object v0
.end method


text:
#ifndef COIN_SOTRANSFORMMANIP_H
#define COIN_SOTRANSFORMMANIP_H

#include <Inventor/nodes/SoTransform.h>
#include <Inventor/tools/SbLazyPimplPtr.h>
#ifndef COIN_INTERNAL
#include <Inventor/draggers/SoDragger.h>
#endif // !COIN_INTERNAL

class SoChildList;
class SoDragger;
class SoFieldSensor;
class SoPath;
class SoSensor;
class SoTransformManipP;

class COIN_DLL_API SoTransformManip : public SoTransform {
  typedef SoTransform inherited;

  SO_NODE_HEADER(SoTransformManip);

public:
  static void initClass(void);
  SoTransformManip(void);

  SoDragger * getDragger(void);
  SbBool replaceNode(SoPath * p);
  SbBool replaceManip(SoPath * p, SoTransform * newone) const;

  virtual void doAction(SoAction * action);
  virtual void callback(SoCallbackAction * action);
  virtual void GLRender(SoGLRenderAction * action);
  virtual void getBoundingBox(SoGetBoundingBoxAction * action);
  virtual void getMatrix(SoGetMatrixAction * action);
  virtual void handleEvent(SoHandleEventAction * action);
  virtual void pick(SoPickAction * action);
  virtual void search(SoSearchAction * action);

  virtual SoChildList * getChildren(void) const;

protected:
  virtual ~SoTransformManip(void);

  void setDragger(SoDragger * newdragger);

  virtual void copyContents(const SoFieldContainer * fromfc,
                            SbBool copyconnections);

  static void transferFieldValues(const SoTransform * from, SoTransform * to);
  static void valueChangedCB(void * f, SoDragger * d);
  static void fieldSensorCB(void * f, SoSensor * d);

  SoFieldSensor * rotateFieldSensor;
  SoFieldSensor * translFieldSensor;
  SoFieldSensor * scaleFieldSensor;
  SoFieldSensor * centerFieldSensor;
  SoFieldSensor * scaleOrientFieldSensor;
  SoChildList * children;

  void attachSensors(const SbBool onoff);

private:
  SbLazyPimplPtr<SoTransformManipP> pimpl;

  // NOT IMPLEMENTED:
  SoTransformManip(const SoTransformManip & rhs);
  SoTransformManip & operator = (const SoTransformManip & rhs);
}; // SoTransformManip

#endif // !COIN_SOTRANSFORMMANIP_H


text:
namespace NetOffice.DeveloperToolbox.ToolboxControls.RegistryEditor
{
    partial class ChangeNameDialog
    {
        /// <summary>
        /// Erforderliche Designervariable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Verwendete Ressourcen bereinigen.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Vom Windows Form-Designer generierter Code

        /// <summary>
        /// Erforderliche Methode für die Designerunterstützung.
        /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
        /// </summary>
        private void InitializeComponent()
        {
            this.changeNameControl1 = new NetOffice.DeveloperToolbox.ToolboxControls.RegistryEditor.ChangeNameControl();
            this.SuspendLayout();
            //
            // changeNameControl1
            //
            this.changeNameControl1.BackColor = System.Drawing.Color.LightSteelBlue;
            this.changeNameControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.changeNameControl1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.changeNameControl1.Location = new System.Drawing.Point(9, 9);
            this.changeNameControl1.Name = "changeNameControl1";
            this.changeNameControl1.Size = new System.Drawing.Size(349, 148);
            this.changeNameControl1.TabIndex = 0;
            this.changeNameControl1.Close += new System.EventHandler(this.changeNameControl1_Close);
            //
            // ChangeNameDialog
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.LightSteelBlue;
            this.ClientSize = new System.Drawing.Size(367, 166);
            this.Controls.Add(this.changeNameControl1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "ChangeNameDialog";
            this.Padding = new System.Windows.Forms.Padding(9);
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "Edit Name";
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ChangeNameDialog_KeyDown);
            this.ResumeLayout(false);

        }

        #endregion

        private ChangeNameControl changeNameControl1;

    }
}


text:
package com.azure.spring.cloud.autoconfigure.aad.implementation.webapp;

import com.azure.spring.cloud.autoconfigure.aad.properties.AadAuthenticationProperties;
import net.minidev.json.JSONArray;
import org.junit.jupiter.api.Test;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.security.oauth2.core.oidc.OidcIdToken;

import java.util.Collections;
import java.util.HashSet;
import java.util.Set;

import static com.azure.spring.cloud.autoconfigure.aad.implementation.constants.AadJwtClaimNames.ROLES;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

class AadIdTokenRolesExtractionTests {

    private AadOAuth2UserService getUserService() {
        return new AadOAuth2UserService(mock(AadAuthenticationProperties.class), new RestTemplateBuilder());
    }

    @Test
    void testNoRolesClaim() {
        OidcIdToken idToken = mock(OidcIdToken.class);
        when(idToken.getClaim(ROLES)).thenReturn(null);
        Set<String> authorityStrings = getUserService().extractRolesFromIdToken(idToken);
        assertThat(authorityStrings).hasSize(0);
    }

    @Test
    void testRolesClaimAsList() {
        OidcIdToken idToken = mock(OidcIdToken.class);
        JSONArray rolesClaim = new JSONArray().appendElement("Admin");
        when(idToken.getClaim(ROLES)).thenReturn(rolesClaim);
        Set<String> authorityStrings = getUserService().extractRolesFromIdToken(idToken);
        assertThat(authorityStrings).hasSize(1);
    }

    @Test
    void testRolesClaimIllegal() {
        OidcIdToken idToken = mock(OidcIdToken.class);
        Set<String> rolesClaim = new HashSet<>(Collections.singletonList("Admin"));
        when(idToken.getClaim(ROLES)).thenReturn(rolesClaim);
        Set<String> authorityStrings = getUserService().extractRolesFromIdToken(idToken);
        assertThat(authorityStrings).hasSize(0);
    }
}


text:
class PrefService;

namespace arc {
class ArcBridgeService;
}  // namespace arc

namespace content {
class BrowserContext;
}  // namespace content

namespace user_prefs {
class PrefRegistrySyncable;
}  // namespace user_prefs

// Declares shareable ARC app specific preferences, that keep information
// about app attributes (name, package, activity) and its state. This
// information is used to pre-create non-ready app items while ARC bridge
// service is not ready to provide information about available ARC apps.
class ArcAppListPrefs : public KeyedService,
                        public arc::AppHost,
                        public arc::ArcBridgeService::Observer {
 public:
  struct AppInfo {
    AppInfo(const std::string& name,
            const std::string& package,
            const std::string& activity,
            bool ready);

    std::string name;
    std::string package;
    std::string activity;
    bool ready;
  };

  class Observer {
   public:
    // Notifies an observer that new app is registered.
    virtual void OnAppRegistered(const std::string& app_id,
                                 const AppInfo& app_info) = 0;
    // Notifies an observer that app ready state has been changed.
    virtual void OnAppReadyChanged(const std::string& id, bool ready) = 0;
    // Notifies an observer that app was removed.
    virtual void OnAppRemoved(const std::string& id) = 0;
    // Notifies an observer that app icon has been installed or updated.
    virtual void OnAppIconUpdated(const std::string& id,
                                  ui::ScaleFactor scale_factor) = 0;
    // Notifies an observer that the name of an app has changed.
    virtual void OnAppNameUpdated(const std::string& id,
                                  const std::string& name) = 0;

   protected:
    virtual ~Observer() {}
  };

  static ArcAppListPrefs* Create(const base::FilePath& base_path,
                                 PrefService* prefs);

  // Convenience function to get the ArcAppListPrefs for a BrowserContext.
  static ArcAppListPrefs* Get(content::BrowserContext* context);

  // Constructs unique id based on package and activity information. This id
  // is safe to use at file paths and as preference keys.
  static std::string GetAppId(const std::string& package,
                              const std::string& activity);

  // It is called from chrome/browser/prefs/browser_prefs.cc.
  static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);

  ~ArcAppListPrefs() override;

  // Returns a list of all app ids, including ready and non-ready apps.
  std::vector<std::string> GetAppIds() const;

  // Extracts attributes of an app based on its id. Returns NULL if the app is
  // not found.
  scoped_ptr<AppInfo> GetApp(const std::string& app_id) const;

  // Constructs path to app local data.
  base::FilePath GetAppPath(const std::string& app_id) const;

  // Constructs path to app icon for specific scale factor.
  base::FilePath GetIconPath(const std::string& app_id,
                             ui::ScaleFactor scale_factor) const;

  // Requests to load an app icon for specific scale factor. If the app or Arc
  // bridge service is not ready, then defer this request until the app gets
  // available. Once new icon is installed notifies an observer
  // OnAppIconUpdated.
  void RequestIcon(const std::string& app_id, ui::ScaleFactor scale_factor);

  // Returns true if app is registered.
  bool IsRegistered(const std::string& app_id) const;

  void AddObserver(Observer* observer);
  void RemoveObserver(Observer* observer);

 private:
  // See the Create methods.
  ArcAppListPrefs(const base::FilePath& base_path, PrefService* prefs);

  // arc::ArcBridgeService::Observer:
  void OnStateChanged(arc::ArcBridgeService::State state) override;
  void OnAppInstanceReady() override;

  // arc::AppHost:
  void OnAppListRefreshed(mojo::Array<arc::AppInfoPtr> apps) override;
  void OnAppAdded(arc::AppInfoPtr app) override;
  void OnPackageRemoved(const mojo::String& package) override;
  void OnAppIcon(const mojo::String& package,
                 const mojo::String& activity,
                 arc::ScaleFactor scale_factor,
                 mojo::Array<uint8_t> icon_png_data) override;

  void AddApp(const arc::AppInfo& app);
  void RemoveApp(const std::string& app_id);
  void DisableAllApps();

  // Installs an icon to file system in the special folder of the profile
  // directory.
  void InstallIcon(const std::string& app_id,
                   ui::ScaleFactor scale_factor,
                   const std::vector<uint8_t>& contentPng);
  void OnIconInstalled(const std::string& app_id,
                       ui::ScaleFactor scale_factor,
                       bool install_succeed);

  // Owned by the BrowserContext.
  PrefService* prefs_;

  // Unowned pointer. arc::ArcBridgeService exists during whole user session
  // and owned by arc::ArcServiceManager.
  arc::ArcBridgeService* const bridge_service_;

  // List of observers.
  base::ObserverList<Observer> observer_list_;
  // Keeps root folder where ARC app icons for different scale factor are
  // stored.
  base::FilePath base_path_;
  // Contains set of ARC apps that are currently ready.
  std::set<std::string> ready_apps_;
  // Keeps deferred icon load requests. Each app may contain several requests
  // for different scale factor. Scale factor is defined by specific bit
  // position.
  std::map<std::string, uint32_t> request_icon_deferred_;

  mojo::Binding<arc::AppHost> binding_;

  base::WeakPtrFactory<ArcAppListPrefs> weak_ptr_factory_;

  DISALLOW_COPY_AND_ASSIGN(ArcAppListPrefs);
};

#endif  // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_LIST_PREFS_H_


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('yats', '0004_tickets_participants_seen'),
    ]

    operations = [
        migrations.AddField(
            model_name='userprofile',
            name='jabber',
            field=models.CharField(blank=True, max_length=255, null=True),
        ),
    ]


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Monnina macrocarpa Chodat

### Remarks
null


text:
package org.summerframework.core.text.normalization;

import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.summerframework.util.DurationUtils;

import java.util.Locale;

/**
 * TextNormalizer Tester.
 */
public class TextNormalizerTest {
    private static final Logger log = LoggerFactory.getLogger(TextNormalizerTest.class);

    @Test
    public void testNormalizeWithEnglish() {
        StringNormalizer normalizer = new StringNormalizer("/META-INF/normalize/url/");
        String expected;
        String actual;
        expected = "AAAAAACEEEEIIIIDNOOOOOOUUUUY";
        actual = normalizer.normalize("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ", Locale.ENGLISH);
        Assert.assertEquals(expected, actual);
        expected = "AaGgGgKkOoOoGgNnAaOo";
        actual = normalizer.normalize("ǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǰDZDzdzǴǵǶǷǸǹǺǻǼǽǾǿ", Locale.ENGLISH);
        Assert.assertEquals(expected, actual);
    }

    @Test
    public void testNormalizeWithCzech() {
        StringNormalizer normalizer = new StringNormalizer("/META-INF/normalize/url/");
        Locale cs_CZ = new Locale("cs", "CZ");
        long time = System.currentTimeMillis();
        int count = 10000;
        for (int i = 0; i < count; i++) {
            normalizer.normalize("Český fájl s velmi dlouhým názvem a šuper čuper češtinou.txt", cs_CZ);
        }
        if (log.isDebugEnabled()) {
            time = System.currentTimeMillis() - time;
            log.debug("It took " + DurationUtils.milliDuration(time) + " to normalize text " + count + " times");
        }
        String expected = "scrzyaieeuuSCRZYAEEUUDdTtNnOo";
        String actual = normalizer.normalize("ščřžýáíéěúůŠČŘŽÝÁÉĚÚŮĎŇňÓó");
        Assert.assertEquals(expected, actual);
    }
}


text:
module WorldCat
  module Discovery

    # == Properties mapped from RDF data
    #
    # RDF properties are mapped via an ORM style mapping.
    #
    # [name] RDF predicate: http:/schema.org/name; returns: String
    # [parts] RDF predicate: http://schema.org/hasPart; returns: Enumerable of WorldCat::Discovery::Bib objects

    class Series < Spira::Base

      property :name, :predicate => SCHEMA_NAME, :type => XSD.string
      property :creator, :predicate => SCHEMA_CREATOR, :type => 'Person'
      has_many :parts, :predicate => SCHEMA_HAS_PART, :type => 'Bib'

    end
  end
end


text:
layout: page
description: "Um blog para javascriptear sua vida"
---

{% for post in paginator.posts %}

            {{ post.title }}

        {% if post.subtitle %}

            {{ post.subtitle }}

        {% endif %}

Publicado por {% if post.author %}{{ post.author }}{% else %}{{ site.title }}{% endif %}
 <date>{{ post.date | localize: ":dateformat" }}</date>

{% endfor %}

{% if paginator.total_pages > 1 %}

    {% if paginator.previous_page %}

        ← Recentes

    {% endif %}
    {% if paginator.next_page %}

        Anteriores →

    {% endif %}

{% endif %}


text:
package ly.stealth.mesos.mirrormaker

import org.apache.log4j.Logger
import org.apache.mesos.Protos.Offer
import scala.beans.BeanProperty
import scala.collection.JavaConverters._
import scala.collection.mutable.ListBuffer

object States {
  val Added = "Added"
  val Starting = "Starting"
  val Running = "Running"
  val Stopped = "Stopped"
  val Finished = "Finished"
}

case class TaskData(id: String, slaveId: String, executorId: String, attributes: Map[String, String],
                    cpus: Double, mem: Double)

case class Server(id: Long,
                  requestTemplate: RequestTemplate,
                  var state: String,
                  var taskData: Option[TaskData])

class Cluster {

  private val logger = Logger.getLogger(this.getClass)

  @BeanProperty val servers = ListBuffer.empty[Server]

  private def nextSeq: Long = servers.sortBy(_.id).lastOption.map(_.id + 1).getOrElse(1)

  def addRequest(requestTemplate: RequestTemplate): Unit = {
    val id = requestTemplate.id.getOrElse(nextSeq)
    if (servers.exists(_.id == id))
      throw new IllegalArgumentException(s"Server with id=$id already exists")

    servers += Server(id, requestTemplate, States.Added, None)
  }

  def applicableRequest(resourceOffer: ResourceOffer): Option[Server] = {
    servers.filter(s => s.state == States.Stopped || s.state == States.Added).find {
      server => resourceOffer.matches(server.requestTemplate)
    }
  }

  def getServerByTaskId(taskId: String): Option[Server] = {
    servers.find(
      server => server.taskData.exists(_.id == taskId)
    )
  }

  def getServer(id: Long): Option[Server] = {
    servers.find(
      server => server.id == id
    )
  }

  def serverStarting(server: Server, taskData: TaskData): Unit = {
    server.taskData = Some(taskData)
    changeServerStatus(server, States.Starting)
  }

  def deleteServer(server: Server): Unit = {
    val index = servers.indexWhere(_.id == server.id)
    if (index != -1) servers.remove(index)
  }

  /**
   * Added -> Running
   * Starting -> Running | Stopped
   * Stopped -> Starting
   * Running -> Stopped | Finished
   */
  def changeServerStatus(server: Server, newState: String): Unit = {
    val currentState = server.state
    logger.info(s"Changing server (id=${server.id}) state: $currentState -> $newState")

    def stateTransition(allowedTargetStates: Seq[String]): Unit = {
      require(allowedTargetStates.contains(newState), "Unexpected server (id=${server.id}) state transition $currentState -> $newState")
      server.state = newState
    }

    currentState match {
      case States.Added =>
        stateTransition(Seq(States.Starting))
      case States.Starting =>
        stateTransition(Seq(States.Running, States.Stopped))
      case States.Stopped =>
        stateTransition(Seq(States.Starting))
      case States.Running =>
        stateTransition(Seq(States.Stopped, States.Finished))
    }
  }

  def fullStatus =
    s"""
        |Cluster State:
        |-Added:    ${servers.filter(_.state == States.Added).mkString}
        |-Starting: ${servers.filter(_.state == States.Starting).mkString}
        |-Running:  ${servers.filter(_.state == States.Running).mkString}
        |-Stopped:  ${servers.filter(_.state == States.Stopped).mkString}
        |-Finished: ${servers.filter(_.state == States.Finished).mkString}
        |-Total:    ${servers.size}
    """.stripMargin

  def shortStatus = "Cluster State: Added(%d), Starting (%d), Running(%d), Stopped(%d), Finished(%d). Total(%d)"
    .format(servers.count(_.state == States.Added), servers.count(_.state == States.Starting),
      servers.count(_.state == States.Running), servers.count(_.state == States.Stopped),
      servers.count(_.state == States.Finished), servers.size)
}

object ResourceOffer {
  def fromMesosOffer(offer: Offer): ResourceOffer = {
    val offerResources = offer.getResourcesList.asScala.toList.map(res => res.getName -> res).toMap

    val cpus = offerResources.get("cpus").map(_.getScalar.getValue)
    val mem = offerResources.get("mem").map(_.getScalar.getValue)

    ResourceOffer(cpus, mem)
  }
}

case class ResourceOffer(cpus: Option[Double], mem: Option[Double]) {

  def matches(rt: RequestTemplate): Boolean =
    cpus.exists(_ > rt.cpus) && mem.exists(_ > rt.mem)

}

case class RequestTemplate(id: Option[Long],
                           cpus: Double, mem: Double)


text:
package mg
import (
	"github.com/cloudfoundry/cli/plugin"
	"github.com/ArthurHlt/plugin-cf-manifest-generator/mg/manifest"
	"fmt"
	"bufio"
	"os"
	"strconv"
	"errors"
)

type StepTimeout struct {
	Step
}
const DEFAULT_TIMEOUT = "80"
func NewStepTimeout(cliConnection plugin.CliConnection, appManifest *manifest.Manifest) *StepTimeout {
	stepTimeout := new(StepTimeout)
	stepTimeout.appManifest = appManifest
	stepTimeout.cliConnection = cliConnection
	return stepTimeout
}

func (s *StepTimeout) Run() error {
	reader := bufio.NewReader(os.Stdin)
	for true {
		fmt.Print(fmt.Sprintf("How much time your app have to start <%s> (in seconds) ? ", DEFAULT_TIMEOUT))
		timeoutBytes, _, err := reader.ReadLine()
		if err != nil {
			return err
		}
		timeoutString := string(timeoutBytes)
		if (timeoutString == "") {
			timeoutString = DEFAULT_TIMEOUT
		}
		timeout, err := s.getTimeout(timeoutString)
		if err != nil {
			showError(err)
			continue
		}
		s.appManifest.Timeout(session.AppName, timeout)
		break
	}
	return nil
}
func (s *StepTimeout) getTimeout(timeoutString string) (int, error) {
	timeout, err := strconv.Atoi(timeoutString)
	if err != nil {
		return 0, errors.New("It's not a valid number.")
	}
	if timeout <= 0 {
		return 0, errors.New("You can't pass a number under or equal to 0.")
	}
	return timeout, nil
}


text:
jQuery *Long Click* Event
=========================
*Press & hold mouse/touch "long click" special event for [jQuery 1.4.x][jquery]*.
Inspired by similar events on touch-sensitive devices.

Using *Long Click*:
-------------------

### `.click( duration, handler )`
* Simply supply `duration` to the well-known [`.click`][jquery-click] method and you have a *long click*.
* This method is a shortcut for `.bind("longclick", handler)`.
* Returns *[jQuery][jquery-jquery]*.

### or `.longclick( [ duration ], [ handler ] )`
* If supplied, optional custom `duration` is used for target element(s).
* This method is a shortcut for `.click(duration, handler)` when at least `handler` is supplied and for `.trigger("longclick")` if called without arguments.
* Returns *[jQuery][jquery-jquery]*.

Parameter `duration`:
---------------------

* For how long (in milliseconds) mouse button must be pressed down (or touched) stationery to qualify as a *long click*.
* False value results in using the configured default.
* Default `duration` is **500** and is stored in `jQuery.longclick.duration` variable.

Event `"longclick"`:
--------------------

* Works with standard [`live`][jquery-live], [`bind`][jquery-bind], [`unbind`][jquery-unbind] and [`trigger`][jquery-trigger] event methods as one would expect.

Requirements:
-------------

1. Mighty [jQuery 1.4.x][jquery]:

    `<script src='http://code.jquery.com/jquery-latest.min.js' type='text/javascript'></script>`

2. and **[`jquery.longclick-min.js` (~1 kB)][download-min]**:

    `<script src='jquery.longclick-min.js' type='text/javascript'></script>`

License:
--------

Free for use in all personal or commercial projects under both [MIT][license-mit] and [GPL][license-gpl] licenses.

Fair Warning:
-------------

**Under intensive loving development**. v0.x works just fine, but is very "fluid" API-wise.
Till v1.0.

---
Copyright (c) 2010 [Petr Vostřel][pisi]
» Check out my other jQuery plugin [Reel][reel] for 360° image projection

[license-mit]: /pisi/Longclick/raw/master/MIT-LICENSE.txt
[license-gpl]: /pisi/Longclick/raw/master/GPL-LICENSE.txt
[jquery]: http://www.jquery.com/
[jquery-jquery]: http://docs.jquery.com/Types#jQuery
[jquery-live]: http://api.jquery.com/live/
[jquery-bind]: http://api.jquery.com/bind/
[jquery-unbind]: http://api.jquery.com/unbind/
[jquery-trigger]: http://api.jquery.com/trigger/
[jquery-click]: http://api.jquery.com/click/
[pisi]: http://petr.vostrel.cz/
[reel]: http://jquery.vostrel.cz/reel
[download-min]: http://github.com/pisi/Longclick/raw/master/jquery.longclick-min.js


text:
require 'rspec'
require 'slacken'
require 'unindent'

require 'helpers/document_component_dsl'

def fixture(name)
  File.read(File.join(__dir__, 'fixtures', name))
end

RSpec.configure do |c|
  c.include Slacken::Helpers::DocumentComponentDsl, dsl: true
end


text:
<!DOCTYPE html>

<title>Edugate | Profile Teacher</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,400italic,700,900,300">
    <link type="text/css" rel="stylesheet" href="assets/font/font-icon/font-awesome-4.4.0/css/font-awesome.css">
    <link type="text/css" rel="stylesheet" href="assets/font/font-icon/font-svg/css/Glyphter.css">

    <link type="text/css" rel="stylesheet" href="assets/libs/animate/animate.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/bootstrap-3.3.5/css/bootstrap.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/owl-carousel-2.0/assets/owl.carousel.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/selectbox/css/jquery.selectbox.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/fancybox/css/jquery.fancybox.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/fancybox/css/jquery.fancybox-buttons.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/media-element/build/mediaelementplayer.min.css">

    <link type="text/css" rel="stylesheet" href="#" id="color-skins">

hello.shinway@gmail.com

+84 909 015 345

loginregister

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

Home

Home page 01

Home page 02

Home page 03

Courses

courses

course detail

events

event detail

gallery

gallery 3 column

gallery 4 column

gallery masonry

pages

categories

profile teacher

about us

login

register

404 page

FAQ page

News

news list

news grid

news grid nonsidebar

news masonry

news detail

Contact

                            <form><input type="text" placeholder="Search" class="searchbox"/>
                                <button type="submit" class="searchbutton fa fa-search"></button>
                            </form>

profile

Home

profile

Subscribe Edugate to learn new creative skill

                                <button class="btn btn-green btn-bold">SUBSCRIBE NOW</button>

barry join

Barry Join

Vice Head Teacher

Dalmatian hello amazing the rmore flung as thanks a manta dealt to under emu some the and one baldbe dear sobbingly save and spitefully less. There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believabl.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean eu tellus ipsum. Nunc maximus sapien ac dui vulputate tincidunt. Morbi luctus nisi vel suscipit volutpat. Donec vitae auctor nisl. Ut malesuada felis in erat rutrum ultrices.

Fusce iaculis ornare nunc rutrum ornare.

Proin ut placerat enim, vel venenatis urna.

Phasellus sed diam tincidunt mauris malesuada mattis et in nisl.

Quisque massa eros, molestie at mi eget, aliquam tristique eros.

Certificates

barry join's key skill

online marketing

online marketing

branding

branding

creativity

creativity

Courses

                                                id
                                                course name
                                                duration
                                                timeline

                                                ED1
                                                Sport Exercise Sciences
                                                2 months
                                                01/01/2016 -  02/15/2016

                                                ED1
                                                Learning Website Optimization With Bootstrap
                                                2 months
                                                01/01/2016 -  02/15/2016

                                                ED1
                                                Skeching Custom Item Prize Design
                                                2 months
                                                01/01/2016 -  02/15/2016

                                                ED1
                                                Learning Website Optimization With Bootstrap
                                                2 months
                                                01/01/2016 -  02/15/2016

                                                ED1
                                                Learning Viral Web Design Projects
                                                2 months
                                                01/01/2016 -  02/15/2016

                                                ED1
                                                Email Marketing Strategy With MailChimp
                                                2 months
                                                01/01/2016 -  02/15/2016

                                                ED1
                                                Social Media Network & Marketing
                                                2 months
                                                01/01/2016 -  02/15/2016

BECOME AN INSTRUCTOR

Join thousand of instructors and earn money hassle free!

                    <button onclick="window.location.href='contact.html'" class="btn btn-blue btn-bold">GET STARTED NOW</button>

EDUGATE

Edugate is a great start for an education personnel or organization to start the online business with 1 Click.

hello@edugate.com

P: 3333 222 1111

99 Barnard St - Suite 111

United States - GA 22222

USEFUL LINKS

Teachers

Courses

Support

Why Edugate

Social Media

Site Map

Company

Latest Courses

Partners

Blog Post

Help Topic

Policies

GALLERY

<img src="assets/images/gallery/gallery-08.jpg"
                                                                                alt="" class="img-responsive"/>

                                    View more

MAILING

Sign up for our mailing list to get latest updates and offers.

                                    <form action="http://swlabs.co/edugate/index.html">

<input type="text" placeholder="Email address" class="form-control form-email-widget"/><input type="submit" value="✓" class="btn btn-email"/>

                                    </form>

We respect your privacy

HOME

COURSES

ABOUT

PAGES

NEWS

CONTACT

@ SWLABS

setting color


text:
using namespace clang;

namespace {

/// \brief Numbers things which need to correspond across multiple TUs.
/// Typically these are things like static locals, lambdas, or blocks.
class MicrosoftNumberingContext : public MangleNumberingContext {
public:
  unsigned getManglingNumber(const VarDecl *VD,
                             unsigned MSLocalManglingNumber) override {
    return MSLocalManglingNumber;
  }

  unsigned getManglingNumber(const TagDecl *TD,
                             unsigned MSLocalManglingNumber) override {
    return MSLocalManglingNumber;
  }
};

class MicrosoftCXXABI : public CXXABI {
  ASTContext &Context;
public:
  MicrosoftCXXABI(ASTContext &Ctx) : Context(Ctx) { }

  std::pair<uint64_t, unsigned>
  getMemberPointerWidthAndAlign(const MemberPointerType *MPT) const override;

  CallingConv getDefaultMethodCallConv(bool isVariadic) const override {
    if (!isVariadic &&
        Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
      return CC_X86ThisCall;
    return CC_C;
  }

  bool isNearlyEmpty(const CXXRecordDecl *RD) const override {
    // FIXME: Audit the corners
    if (!RD->isDynamicClass())
      return false;

    const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);

    // In the Microsoft ABI, classes can have one or two vtable pointers.
    CharUnits PointerSize =
      Context.toCharUnitsFromBits(Context.getTargetInfo().getPointerWidth(0));
    return Layout.getNonVirtualSize() == PointerSize ||
      Layout.getNonVirtualSize() == PointerSize * 2;
  }

  MangleNumberingContext *createMangleNumberingContext() const override {
    return new MicrosoftNumberingContext();
  }
};
}

// getNumBases() seems to only give us the number of direct bases, and not the
// total.  This function tells us if we inherit from anybody that uses MI, or if
// we have a non-primary base class, which uses the multiple inheritance model.
static bool usesMultipleInheritanceModel(const CXXRecordDecl *RD) {
  while (RD->getNumBases() > 0) {
    if (RD->getNumBases() > 1)
      return true;
    assert(RD->getNumBases() == 1);
    const CXXRecordDecl *Base =
        RD->bases_begin()->getType()->getAsCXXRecordDecl();
    if (RD->isPolymorphic() && !Base->isPolymorphic())
      return true;
    RD = Base;
  }
  return false;
}

MSInheritanceAttr::Spelling CXXRecordDecl::calculateInheritanceModel() const {
  if (!hasDefinition() || isParsingBaseSpecifiers())
    return MSInheritanceAttr::Keyword_unspecified_inheritance;
  if (getNumVBases() > 0)
    return MSInheritanceAttr::Keyword_virtual_inheritance;
  if (usesMultipleInheritanceModel(this))
    return MSInheritanceAttr::Keyword_multiple_inheritance;
  return MSInheritanceAttr::Keyword_single_inheritance;
}

MSInheritanceAttr::Spelling
CXXRecordDecl::getMSInheritanceModel() const {
  MSInheritanceAttr *IA = getAttr<MSInheritanceAttr>();
  assert(IA && "Expected MSInheritanceAttr on the CXXRecordDecl!");
  return IA->getSemanticSpelling();
}

MSVtorDispAttr::Mode CXXRecordDecl::getMSVtorDispMode() const {
  if (MSVtorDispAttr *VDA = getAttr<MSVtorDispAttr>())
    return VDA->getVtorDispMode();
  return MSVtorDispAttr::Mode(getASTContext().getLangOpts().VtorDispMode);
}

// Returns the number of pointer and integer slots used to represent a member
// pointer in the MS C++ ABI.
//
// Member function pointers have the following general form;  however, fields
// are dropped as permitted (under the MSVC interpretation) by the inheritance
// model of the actual class.
//
//   struct {
//     // A pointer to the member function to call.  If the member function is
//     // virtual, this will be a thunk that forwards to the appropriate vftable
//     // slot.
//     void *FunctionPointerOrVirtualThunk;
//
//     // An offset to add to the address of the vbtable pointer after (possibly)
//     // selecting the virtual base but before resolving and calling the function.
//     // Only needed if the class has any virtual bases or bases at a non-zero
//     // offset.
//     int NonVirtualBaseAdjustment;
//
//     // The offset of the vb-table pointer within the object.  Only needed for
//     // incomplete types.
//     int VBPtrOffset;
//
//     // An offset within the vb-table that selects the virtual base containing
//     // the member.  Loading from this offset produces a new offset that is
//     // added to the address of the vb-table pointer to produce the base.
//     int VirtualBaseAdjustmentOffset;
//   };
static std::pair<unsigned, unsigned>
getMSMemberPointerSlots(const MemberPointerType *MPT) {
  const CXXRecordDecl *RD = MPT->getMostRecentCXXRecordDecl();
  MSInheritanceAttr::Spelling Inheritance = RD->getMSInheritanceModel();
  unsigned Ptrs = 0;
  unsigned Ints = 0;
  if (MPT->isMemberFunctionPointer())
    Ptrs = 1;
  else
    Ints = 1;
  if (MSInheritanceAttr::hasNVOffsetField(MPT->isMemberFunctionPointer(),
                                          Inheritance))
    Ints++;
  if (MSInheritanceAttr::hasVBPtrOffsetField(Inheritance))
    Ints++;
  if (MSInheritanceAttr::hasVBTableOffsetField(Inheritance))
    Ints++;
  return std::make_pair(Ptrs, Ints);
}

std::pair<uint64_t, unsigned> MicrosoftCXXABI::getMemberPointerWidthAndAlign(
    const MemberPointerType *MPT) const {
  const TargetInfo &Target = Context.getTargetInfo();
  assert(Target.getTriple().getArch() == llvm::Triple::x86 ||
         Target.getTriple().getArch() == llvm::Triple::x86_64);
  unsigned Ptrs, Ints;
  std::tie(Ptrs, Ints) = getMSMemberPointerSlots(MPT);
  // The nominal struct is laid out with pointers followed by ints and aligned
  // to a pointer width if any are present and an int width otherwise.
  unsigned PtrSize = Target.getPointerWidth(0);
  unsigned IntSize = Target.getIntWidth();
  uint64_t Width = Ptrs * PtrSize + Ints * IntSize;
  unsigned Align;

  // When MSVC does x86_32 record layout, it aligns aggregate member pointers to
  // 8 bytes.  However, __alignof usually returns 4 for data memptrs and 8 for
  // function memptrs.
  if (Ptrs + Ints > 1 && Target.getTriple().getArch() == llvm::Triple::x86)
    Align = 8 * 8;
  else if (Ptrs)
    Align = Target.getPointerAlign(0);
  else
    Align = Target.getIntAlign();

  if (Target.getTriple().getArch() == llvm::Triple::x86_64)
    Width = llvm::RoundUpToAlignment(Width, Align);
  return std::make_pair(Width, Align);
}

CXXABI *clang::CreateMicrosoftCXXABI(ASTContext &Ctx) {
  return new MicrosoftCXXABI(Ctx);
}


text:
/** @author Jia Pan */

#ifndef FCL_CONSERVATIVE_ADVANCEMENT_H
#define FCL_CONSERVATIVE_ADVANCEMENT_H

#include "fcl/geometry/collision_geometry.h"
#include "fcl/narrowphase/continuous_collision_request.h"
#include "fcl/narrowphase/continuous_collision_result.h"

namespace fcl
{

namespace detail
{

template<typename NarrowPhaseSolver>
struct ConservativeAdvancementFunctionMatrix
{
  using S = typename NarrowPhaseSolver::S;

  using ConservativeAdvancementFunc
      = S (*)(const CollisionGeometry<S>* o1,
              const MotionBase<S>* motion1,
              const CollisionGeometry<S>* o2,
              const MotionBase<S>* motion2,
              const NarrowPhaseSolver* nsolver,
              const ContinuousCollisionRequest<S>& request,
              ContinuousCollisionResult<S>& result);

  ConservativeAdvancementFunc conservative_advancement_matrix[NODE_COUNT][NODE_COUNT];

  ConservativeAdvancementFunctionMatrix();
};

} // namespace detail
} // namespace fcl

#include "fcl/narrowphase/detail/conservative_advancement_func_matrix-inl.h"

#endif


text:
SolarSystem::SolarSystem()
{

#if defined(PLATFORM_OSX)
	int mercuryTextureID = TextureLoader::LoadTexture("Textures/planets/mercury.jpg");
	int venusTextureID = TextureLoader::LoadTexture("Textures/planets/venus.jpg");
	int earthTextureID = TextureLoader::LoadTexture("Textures/planets/earth.jpg");
	int marsTextureID = TextureLoader::LoadTexture("Textures/planets/mars.jpg");
	int jupiterTextureID = TextureLoader::LoadTexture("Textures/planets/jupiter.jpg");
	int saturnTextureID = TextureLoader::LoadTexture("Textures/planets/saturn.jpg");
	int uranusTextureID = TextureLoader::LoadTexture("Textures/planets/uranus.jpg");
	int neptuneTextureID = TextureLoader::LoadTexture("Textures/planets/neptune.jpg");
	int plutoTextureID = TextureLoader::LoadTexture("Textures/planets/pluto.jpg");
	int sunTextureID = TextureLoader::LoadTexture("Textures/planets/sun.jpg");
#else
	int mercuryTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/mercury.jpg");
	int venusTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/venus.jpg");
	int earthTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/earth.jpg");
	int marsTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/mars.jpg");
	int jupiterTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/jupiter.jpg");
	int saturnTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/saturn.jpg");
	int uranusTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/uranus.jpg");
	int neptuneTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/neptune.jpg");
	int plutoTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/pluto.jpg");
	int sunTextureID = TextureLoader::LoadTexture("../Assets/Textures/planets/sun.jpg");
#endif

	vec3 offset = vec3(4.0f);

	// this is the real order of the planets, DO NOT CHANGE!
	// the mass (3rd argument) is relatively correct, DO NOT CHANGE!
	Planet* mercury = new Planet(vec3(10.0f), mercuryTextureID, 20.0f);
	Planet* venus = new Planet(mercury->GetPosition() + offset, venusTextureID, 40.0f);
	Planet* earth = new Planet(venus->GetPosition() + offset, earthTextureID, 50.0f);
	Planet* mars = new Planet(earth->GetPosition() + offset, marsTextureID, 30.0f);
	Planet* jupiter = new Planet(mars->GetPosition() + offset, jupiterTextureID, 90.0f);
	Planet* saturn = new Planet(jupiter->GetPosition() + offset, saturnTextureID, 80.0f);
	Planet* uranus = new Planet(saturn->GetPosition() + offset, uranusTextureID, 60.0f);
	Planet* neptune = new Planet(uranus->GetPosition() + offset, neptuneTextureID, 70.0f);
	Planet* pluto = new Planet(neptune->GetPosition() + offset, plutoTextureID, 10.0f);

	sun = new SphereModel(sunTextureID);
	sun->SetMass(10000.0f);
	sun->SetScaling(vec3(5));
	//sun->SetRadius(10);

	mPlanets.push_back(mercury);
	mPlanets.push_back(venus);
	mPlanets.push_back(earth);
	mPlanets.push_back(mars);
	mPlanets.push_back(jupiter);
	mPlanets.push_back(saturn);
	mPlanets.push_back(uranus);
	mPlanets.push_back(neptune);
	mPlanets.push_back(pluto);
}

SolarSystem::~SolarSystem() {
	for (std::vector<Planet*>::iterator it = mPlanets.begin(); it != mPlanets.end(); ++it)
	{
		delete *it;
	}
	mPlanets.resize(0);
	delete sun;
}

void SolarSystem::Update(float dt) {

	for (Planet* p : mPlanets) {
		p->Update(dt);
	}
	sun->Update(dt);

}

void SolarSystem::Draw() {
	for (Planet* p : mPlanets) {
		p->Draw();
	}
	sun->Draw();
}


text:
package replicant.spy;

import java.util.HashMap;
import org.testng.annotations.Test;
import replicant.AbstractReplicantTest;
import replicant.ChannelAddress;
import static org.testng.Assert.*;

public class UnsubscribeCompletedEventTest
  extends AbstractReplicantTest
{
  @Test
  public void basicOperation()
  {
    final ChannelAddress address = new ChannelAddress( 1, 2 );
    final UnsubscribeCompletedEvent event = new UnsubscribeCompletedEvent( 23, "Rose", address );

    assertEquals( event.getSchemaId(), 23 );
    assertEquals( event.getSchemaName(), "Rose" );
    assertEquals( event.getAddress(), address );

    final HashMap<String, Object> data = new HashMap<>();
    event.toMap( data );

    assertEquals( data.get( "type" ), "Connector.UnsubscribeCompleted" );
    assertEquals( data.get( "schema.id" ), 23 );
    assertEquals( data.get( "schema.name" ), "Rose" );
    assertEquals( data.get( "channel.systemId" ), 1 );
    assertEquals( data.get( "channel.channelId" ), 2 );
    assertEquals( data.get( "channel.id" ), address.getId() );
    assertEquals( data.size(), 6 );
  }
}