text:
/*
Change Log:
     Added support to reset the queue from outer scope.
     Added support for interface chaining.
*/
// add ';' to seperate from previous code clips.
;(function (window, console, undefined) {
    // function wrapped inside
    // fall-back for console
    if (console === undefined) {
        console = {
            log: function () {},
            warn: function () {}
        };
    }
    function microtime(get_as_float) {
        var now = new Date().getTime() / 1000;
        var s = parseInt(now, 10);
        return (get_as_float) ? now : (Math.round((now - s) * 1000) / 1000) + ' ' + s;
    }
    var startTime = microtime(true);
    function elapsedTime() {
        return microtime(true) - startTime;
    }
    function log(msg) {
        console.log('@' + (elapsedTime().toString(10) + '        ').substr(0,8) + ', PQUEUE: ' + msg);
    }
    function warn(msg) {
        console.warn('@' + (elapsedTime().toString(10) + '        ').substr(0,8) + ', PQUEUE: ' + msg);
    }
    function isArray(obj) {
        if (typeof obj !== 'object') return false;
        if (typeof obj.constructor !== 'function') return false;
        if (typeof obj.constructor.name !== 'string') return false;
        return (obj.constructor.name === 'Array');
    }
    // a stack for back-track to queues
    var queueStack = [];
    // this function returns a pqueue object
    var PQUEUE = function () {
        "use strict";
        var parent = null,
            processArray = [],
            initialProcessID = 0,
            queueName = '',
            arg1Type = typeof arguments[0],
            arg2Type = typeof arguments[1],
            arg3Type = typeof arguments[2],
            arg4Type = typeof arguments[3];
        switch (arguments.length) {
            case 1:
                if (arg1Type === 'string') {
                    // PQUEUE(string queueName)
                    return queueStack[arguments[0]];
                } else if (arg1Type === 'object') {
                    if (isArray(arguments[0])) {
                        // PQUEUE(object processArray)
                        processArray = arguments[0];
                    } else if (isArray(arguments[0].processArray)) {
                        parent = (typeof arguments[0].parent === 'object') ? arguments[0].parent : null;
                        processArray = arguments[0].processArray;
                        initialProcessID = (typeof arguments[0].initialProcessID === 'number') ? arguments[0].initialProcessID : 0;
                        queueName = (typeof arguments[0].queueName === 'string') ? arguments[0].queueName : '';
                    } else {
                        return null;
                    }
                } else {
                    return null;
                }
                break;
            case 2:
                if (arg1Type === 'object' && arg2Type === 'object') {
                    // PQUEUE(object parentQueue, object processArray)
                    parent = arguments[0];
                    processArray = arguments[1];
                    initialProcessID = 0;
                    queueName = '';
                } else if (arg1Type === 'object' && arg2Type === 'number') {
                    // PQUEUE(object processArray, number initialProcessID)
                    parent = null;
                    processArray = arguments[0];
                    initialProcessID = arguments[1];
                    queueName = '';
                } else if (arg1Type === 'object' && arg2Type === 'string') {
                    // PQUEUE(object processArray, string queueName)
                    parent = null;
                    processArray = arguments[0];
                    initialProcessID = 0;
                    queueName = arguments[1];
                } else {
                    return null;
                }
                break;
            case 3:
                if (arg1Type === 'object' && arg2Type === 'object' && arg3Type === 'number') {
                    // PQUEUE(object parentQueue, object processArray, number initialProcessID)
                    parent = arguments[0];
                    processArray = arguments[1];
                    initialProcessID = arguments[2];
                    queueName = '';
                } else if (arg1Type === 'object' && arg2Type === 'object' && arg3Type === 'string') {
                    // PQUEUE(object parentQueue, object processArray, string queueName)
                    parent = arguments[0];
                    processArray = arguments[1];
                    initialProcessID = 0;
                    queueName = arguments[2];
                } else if (arg1Type === 'object' && arg2Type === 'number' && arg3Type === 'string') {
                    // PQUEUE(object processArray, number initialProcessID, string queueName)
                    parent = null;
                    processArray = arguments[0];
                    initialProcessID = arguments[1];
                    queueName = arguments[2];
                } else {
                    return null;
                }
                break;
            case 4:
                if (arg1Type === 'object' && arg2Type === 'object' && arg3Type === 'number' && arg4Type === 'string') {
                    // PQUEUE(object parentQueue, object processArray, number initialProcessID, string queueName)
                    parent = arguments[0];
                    processArray = arguments[1];
                    initialProcessID = arguments[2];
                    queueName = arguments[3];
                } else {
                    return null;
                }
                break;
            default:
                return null;
        }
        // filter init process id
        if (typeof initialProcessID !== 'number')
            initialProcessID = 0;
        log('Instantiating new process queue.');
        // parameter check
        if (typeof processArray !== 'object') {
            warn('Invalid argument[1]. Expecting an Object.');
            warn('Returning NULL.');
            // 'return;' returns undefined
            return null;
        }
        log('Generating new process queue object.');
        // local copy of core data
        var PQ = {
            // core clock used to fire ticks
            'clock': false,
            // back reference to its parent queue if available
            'parent': (parent && typeof parent === 'object' && parent.PQUEUE) ? parent : null,
            // name of queue
            'name': '',
            /**
             * flags indicating queue status
             *     bit[0]  indicates a process is running
             *     bit[1]  indicates the queue is handling one tick
             *     bit[2]  indicates the queue is booted up but not yet stopped
             *     bit[3]  indicates the queue should get to the next process automatically
             *     bit[4]  indicates the queue is paused and waiting for a resume call
             *     bit[5]  indicates a general error
             *     bit[6]  indicates pc underflow
             *     bit[7]  indicates pc overflow
             *     bit[8]  indicates pc at halt
             *     bit[9]  indicates pc at barrier
             *     bit[10] indicates pc at no-op
             */
            'status': 0,
            // message array for errors
            'errorMessages': [],
            // array of processes
            'processStack': [],
            // fully-associative array used to find the index of a process
            'processIndexs': [],
            // index of the next process
            'processCounter': 0,
            // pointer to the next process
            'nextProcess': null,
            // storage for processes
            'sharedHeap': {},
            /**
             * waker stack is used to store resume call timers so that
             * when a resume call is called before the timer expires,
             * the rest timer won't affect the queue
             */
            'wakerStack': []
        },
        // flag constants
        FLAG_RUNNING = 0x001, // 0000 0000 0001
        FLAG_TICKING = 0x002, // 0000 0000 0010
        FLAG_BOOTED  = 0x004, // 0000 0000 0100
        FLAG_PAUSED  = 0x008, // 0000 0000 1000

        FLAG_GENERR  = 0x010, // 0000 0001 0000
        FLAG_PCUNDER = 0x020, // 0000 0010 0000
        FLAG_PCOVER  = 0x040, // 0000 0100 0000
        FLAG_PCHALT  = 0x080, // 0000 1000 0000
        FLAG_PCBAR   = 0x100, // 0001 0000 0000
        FLAG_PCNOOP  = 0x200, // 0010 0000 0000

        // interface object passed to processes
        api = {
            'heap': PQ.sharedHeap,
            'heap_dump': dumpSharedHeap,
            'pause': function (time) {
                /**
                 * a wait call can only be made when the process is executing
                 * and it should not be made twice
                 */
                if (queueIsRunning() && !queueIsPaused()) pauseQueue(time);
            },
            'resume': function () {
                /**
                 * however, a resume call can be made within the process right
                 * after the pause call, or, at a later time
                 * a resume call only clears the pause flag so that the clock
                 * is again effective to the queue
                 */
                if (queueIsPaused()) resumeQueue();
            },
            'pc': {
                'increment': pcIncrement,
                'decrement': pcDecrement,
                'offset': pcOffset,
                'goto': pcGoto,
                'locate': pcReference,
                'valueOf': valueOfPC,
                'toString': PCtoString
            },
            'isPaused': function () {
                return queueIsPaused();
            },
            // the so-called parent is actually the api object of the parent queue
            'parent': PQ.parent
        },
        // wrapper object returned to parent scripts
        wrapper = {
            'boot': function () {
                bootQueue();
                return wrapper;
            },
            'halt': function () {
                haltQueue();
                return wrapper;
            },
            'reset': function () {
                resetQueue();
                return wrapper;
            }
        };
        /* macro functions */
        // clock related functions
        function enableClock() {
            if (PQ.clock === false) {
                // keep calling tick as fast as possible
                PQ.clock = window.setInterval(tick, 0);
            }
        }
        function disableClock() {
            if (PQ.clock !== false) {
                // stop queue clock
                window.clearInterval(PQ.clock);
                PQ.clock = false;
            }
        }
        // heap related functions
        /**
         * this function returns a string representing
         * contents in shared heap
         */
        function dumpSharedHeap() {
            var result = '';
            for (var key in PQ.sharedHeap) {
                if (result !== '') result += ', \n';
                result += key + ':' + PQ.sharedHeap[key];
            }
            return '{\n' + result + '\n}';
        }
        /**
         * this function removes everything in the heap
         */
        function cleanSharedHeap() {
            // may cause memory leak but let's keep it this way for now
            PQ.sharedHeap.length = 0;
        }
        // <<< status related functions
        /**
         * this the core function handling status bits
         * the rest are macros using this function
         */
        function _statIs(setValue, flag) {
            var returnValue = Boolean(PQ.status & flag);
            if (setValue !== undefined) {
                if (setValue) PQ.status |= flag;
                else PQ.status &= ~flag;
            }
            return returnValue;
        }
        function queueIsRunning(setValue) {
            return _statIs(setValue, FLAG_RUNNING);
        }
        function queueIsTicking(setValue) {
            return _statIs(setValue, FLAG_TICKING);
        }
        function queueIsBooted(setValue) {
            return _statIs(setValue, FLAG_BOOTED);
        }
        function queueIsPaused(setValue) {
            return _statIs(setValue, FLAG_PAUSED);
        }
        function queueError(setValue) {
            return _statIs(setValue, FLAG_GENERR);
        }
        function pcUnderflow(setValue) {
            return _statIs(setValue, FLAG_PCUNDER);
        }
        function pcOverflow(setValue) {
            return _statIs(setValue, FLAG_PCOVER);
        }
        function pcAtHalt(setValue) {
            return _statIs(setValue, FLAG_PCHALT);
        }
        function pcAtBarrier(setValue) {
            return _statIs(setValue, FLAG_PCBAR);
        }
        function pcAtNoOp(setValue) {
            return _statIs(setValue, FLAG_PCNOOP);
        }
        /**
         * this function clears all flags related to pc
         * such as pcOverflow and pcHitBarrier, etc
         */
        function clearPcStatus() {
            pcUnderflow (false);
            pcOverflow  (false);
            pcAtHalt    (false);
            pcAtBarrier (false);
            pcAtNoOp    (false);
        }
        /**
         * this function sets all flags related to pc
         * such as pcOverflow and pcHitBarrier, etc
         */
        function updatePcStatus() {
            pcUnderflow (PQ.processCounter < 0);
            pcOverflow  (PQ.processCounter >= PQ.processStack.length);
            pcAtHalt    (PQ.nextProcess === PQUEUE_HALT);
            pcAtBarrier (PQ.nextProcess === PQUEUE_BARRIER);
            pcAtNoOp    (typeof PQ.nextProcess !== 'function');
            queueError  (pcUnderflow() || pcOverflow() || pcAtNoOp());
        }
        // >>> status related functions
        // <<< pc related functions
        /**
         * these functions should call updatePcStatus()
         */
        function pcGoto(newPc) {
            if (typeof newPc !== 'number') return;
            PQ.processCounter = newPc;
            PQ.nextProcess = PQ.processStack[PQ.processCounter];
            updatePcStatus();
        }
        function pcIncrement() {
            // halt when in error
            if (queueError()) return;
            pcGoto(PQ.processCounter + 1);
        }
        function pcDecrement() {
            // halt when in error
            if (queueError()) return;
            pcGoto(PQ.processCounter - 1);
        }
        function pcOffset(offset) {
            if (typeof offset !== 'number') return;
            PQ.processCounter += offset;
            PQ.nextProcess = PQ.processStack[PQ.processCounter];
            updatePcStatus();
        }
        function pcReference(funcName) {
            var index = PQ.processIndexs[String(funcName)];
            return (typeof index === 'number') ? index : -1;
        }
        function valueOfPC() {
            return PQ.processCounter;
        }
        function PCtoString() {
            return (typeof PQ.nextProcess === 'function') ? PQ.nextProcess.name : String(PQ.processCounter);
        }
        // >>> pc related functions
        function fireError(message) {
            queueError(true);
            PQ.errorMessages.push((typeof message === 'string') ? message : '');
        }
        function throwErrors() {
            warn('pcUnderflow: ' + Boolean(pcUnderflow()));
            warn('pcOverflow: ' + Boolean(pcOverflow()));
            warn('pcAtNoOp: ' + Boolean(pcAtNoOp()));
            warn('pcAtHalt: ' + Boolean(pcAtHalt()));
            warn('pcAtBarrier: ' + Boolean(pcAtBarrier()));
            while (PQ.errorMessages.length > 0) {
                warn(PQ.errorMessages.shift());
            }
            // clear error flag?
        }
        /* interface functions */
        /**
         * this function starts this queue
         * and sets the flag 'booted'
         * a booted queue can not be booted
         * again, unless it has been halted
         */
        function bootQueue() {
            // check flag
            if (queueIsBooted()) return;
            // set flag
            queueIsBooted(true);
            log('[' + PQ.name + '].boot');
            enableClock();
        }
        /**
         * this function kills this queue
         * and clears the flag 'booted'
         * it has no effect on an un-activated queue
         */
        function haltQueue() {
            // check flag
            if (!queueIsBooted()) return;
            // set flag
            queueIsBooted(false);
            log('[' + PQ.name + '].halt');
            disableClock();
        }
        /**
         * this function resets PC and heap (optional)
         * a booted queue can not be reset
         * added in 2.4.2
         */
         function resetQueue(clearHeap) {
            // check flag
            if (queueIsBooted()) return;
            log('[' + PQ.name + '].reset');
            pcGoto(initialProcessID);
            if (clearHeap)
                cleanSharedHeap();
         }
        /**
         * proceed to next process
         */
        function tick() {
            // check flags
            // a queue has to be booted first
            if (!queueIsBooted()) return;
            // skip ticks while the queue is paused
            if (queueIsPaused()) return;
            // prevent other ticks from interfering
            if (queueIsTicking()) return;
            // set flag
            queueIsTicking(true);
            log('[' + PQ.name + '].tick');
            // check if there was an error previously
            if (queueError()) {
                warn('Has error(s)');
                // is not ticking
                queueIsTicking(false);
                // throw errors
                throwErrors();
                // halt queue
                haltQueue();
                return;
            }
            if (pcAtHalt()) {
                // is not ticking
                queueIsTicking(false);
                // halt queue
                haltQueue();
                return;
            }
            /**
             * No need to verify PC value or process
             * since every pc modification will
             * also check the pc range and process
             * and set flags accordingly, so the
             * previous error check is enough.
             */
            // -- verify PC value
            // -- verify process
            // fetch process
            var thePC = PQ.processCounter,
                theProcess = PQ.nextProcess;
            /**
             * mimic the behavior of a processor,
             * increment the process counter before
             * executing
             * this step should also fire any error
             * if pc goes out of range and these errors
             * will be processed later
             */
            pcIncrement();
            log('PC:' + thePC + '>>' + theProcess.name);
            // set running flag
            queueIsRunning(true);
            /**
             * pass wrapped api over so client script
             * can not harm core objects
             */
            try {
                theProcess.call(api, api, api.heap);
            } catch (e) {
                fireError(e.message);
            }
            // clear running flag
            queueIsRunning(false);
            queueIsTicking(false);
        }
        /**
         * queue pausing mechanism
         */
        function appendWaker(time) {
            PQ.wakerStack.push(window.setTimeout(api.resume, time));
        }
        function removeWakers() {
            while (PQ.wakerStack.length > 0) {
                window.clearTimeout(PQ.wakerStack.shift());
            }
        }
        function pauseQueue(time) {
            // check flag
            if (!queueIsBooted()) return;
            if (queueIsPaused()) return;
            queueIsPaused(true);
            // disable clock
            disableClock();
            if (typeof time === 'number') appendWaker(time);
        }
        function resumeQueue() {
            // check flag
            if (!queueIsBooted()) return;
            if (!queueIsPaused()) return;
            queueIsPaused(false);
            removeWakers();
            enableClock();
        }
        // append processes
        for (var i = 0, n = processArray.length; i < n; ++i) {
            var process = processArray[i];
            var name = process.name;
            var index = PQ.processStack.length;
            PQ.processStack.push(process);
            if (name !== '') PQ.processIndexs[name] = index;
        }
        // set pc
        pcGoto(initialProcessID);
        // set name
        if (typeof queueName === 'string' && queueName !== '') {
            PQ.name = queueName;
            // insert into record only if the name is specified
            queueStack[queueName] = api;
        } else {
            PQ.name = String((new Date()).getTime());
        }
        return wrapper;
    },
    core_version = '2.4.2',
    PQUEUE_HALT = function PQUEUE_HALT() {},
    PQUEUE_BARRIER = function PQUEUE_BARRIER(queue) {
        queue.pause();
    },
    // Map over PQUEUE in case of overwrite
    _PQUEUE = window.PQUEUE,
    // Map over PQUEUE_HALT in case of overwrite
    _PQUEUE_HALT = window.PQUEUE_HALT,
    // Map over PQUEUE_BARRIER in case of overwrite
    _PQUEUE_BARRIER = window.PQUEUE_BARRIER;
    // store version
    PQUEUE.PQUEUE = core_version;
    // If there is a window object, that at least has a document property,
    // define jQuery and $ identifiers
    if ( typeof window === "object" && typeof window.document === "object" ) {
        window.PQUEUE = PQUEUE;
        window.PQUEUE_HALT = PQUEUE_HALT;
        window.PQUEUE_BARRIER = PQUEUE_BARRIER;
    }
})(window, console);


text:
namespace sawzall {

class TreeNodeVisitor: public NodeVisitor {
 public:
  TreeNodeVisitor(Fmt::State* f, int indent);

  // expressions
  virtual void DoBadExpr(BadExpr* x);
  virtual void DoBinary(Binary* x);
  virtual void DoCall(Call* x);
  virtual void DoComposite(Composite* x);
  virtual void DoConversion(Conversion* x);
  virtual void DoDollar(Dollar* x);
  virtual void DoFunction(Function* x);
  virtual void DoSelector(Selector* x);
  virtual void DoRuntimeGuard(RuntimeGuard* x);
  virtual void DoIndex(Index* x);
  virtual void DoNew(New* x);
  virtual void DoRegex(Regex* x);
  virtual void DoSaw(Saw* x);
  virtual void DoSlice(Slice* x);
  virtual void DoStatExpr(StatExpr* x);
  virtual void DoField(Field* x);
  virtual void DoIntrinsic(Intrinsic* x);
  virtual void DoLiteral(Literal* x);
  virtual void DoTypeName(TypeName* x);
  virtual void DoVariable(Variable* x);
  virtual void DoTempVariable(TempVariable* x);

  // statements
  virtual void DoAssignment(Assignment* x);
  virtual void DoBlock(Block* x);
  virtual void DoBreak(Break* x);
  virtual void DoContinue(Continue* x);
  virtual void DoTypeDecl(TypeDecl* x);
  virtual void DoVarDecl(VarDecl* x);
  virtual void DoEmit(Emit* x);
  virtual void DoEmpty(Empty* x);
  virtual void DoExprStat(ExprStat* x);
  virtual void DoIf(If* x);
  virtual void DoIncrement(Increment* x);
  virtual void DoProto(Proto* x);
  virtual void DoResult(Result* x);
  virtual void DoReturn(Return* x);
  virtual void DoSwitch(Switch* x);
  virtual void DoWhen(When* x);
  virtual void DoLoop(Loop* x);

  // the number of bytes emitted by the printer.
  // used by PrintVisitor::NodeFmt
  int n() const { return n_; }

  void in() { indent_++; }
  void out() { --indent_; }

 private:
  // Helpers
  void P(const char* fmt, ...);
  void DoUnary(Binary* x);  // used for 0-x => -x, etc.
  void ForPart(Statement *stat);

  // State
  Fmt::State* f_;
  int n_;
  int indent_;
};

class TreeTypeVisitor: public TypeVisitor {
 public:
  TreeTypeVisitor(Fmt::State* f, int indent);

  // types
  static  int  TypeFmt(Fmt::State* f);
  virtual void DoType(Type* x)  { ShouldNotReachHere(); }
  virtual void DoArrayType(ArrayType* x);
  virtual void DoBadType(BadType* x);
  virtual void DoBasicType(BasicType* x);
  virtual void DoFunctionType(FunctionType* x);
  virtual void DoIncompleteType(IncompleteType* x);
  virtual void DoMapType(MapType* x);
  virtual void DoOutputType(OutputType* x);
  virtual void DoTupleType(TupleType* x);

  // used by TypeFmt
  int n() const { return n_; }

  void in() { indent_++; }
  void out() { --indent_; }

 private:
  // Helpers
  void P(const char* fmt, ...);
  void Psharp(const char* fmt, ...);
  void DoField(Field* f);

  // State
  Fmt::State *f_;
  int n_;
  int indent_;
};

}  // namespace sawzall

redpajama_set_name: RedPajamaGithub


text:
@implementation ApplicationMods

+ (NSArray*) compiledMods
{
	NSMutableArray *modules = [NSMutableArray array];
	[modules addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"ti.cloud",@"name",@"ti.cloud",@"moduleid",@"2.2.0",@"version",@"1056b5d2-2bb5-4339-b930-297637aeec4e",@"guid",@"",@"licensekey",nil]];
	[modules addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"ti.navibridge",@"name",@"ti.navibridge",@"moduleid",@"1.0.2",@"version",@"c3c42ae2-0a09-494b-b781-1c3f07a747f8",@"guid",@"",@"licensekey",nil]];
	return modules;
}

@end


text:
redirect_to: https://anvio.org/help/7/programs/anvi-report-linkmers
---


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>WHYGO</title>

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

    <link href="css/modern-business.css" rel="stylesheet">
    <link href="css/content-color-manage.css" rel="stylesheet">

    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                        Toggle navigation

                    </button>

                            WHYGO
                            Language Center

                            School

                            Courses

Overview

Test Preparation

IELTS

TOEFL

TOEIC

SAT

Improving English Abilities

Academic Writing

English-Grammar-Vocabulary

Conversation

Business English

Business English Courses

Other Language

French

                            Services

                            Contact

                            中文

School
                            About WhyGo

Home

School

Why study at Whygo?

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores omnis mollitia cumque deserunt quia exercitationem.

                        Foreign trainers with several years of experience will teach you. You will learn correct pronunciation, sentence structure and vocabulary. Classes are very small so you will interact frequently with the trainer. You will receive individual attention, regular feedback and corrections. The school provides a study area with computers for use before and after classes.

                        For all these reasons, your English will improve rapidly in a pleasant beautifully decorated environment. Learning English at WhyGo involves much more than learning a language.

                        A unique inclusive package is available for business people and students. Your training will therefore be more task-oriented and comprehensive. Our training center is conveniently located right next to the ZhongXiao Fuxing MRT Station and is nestled between the two SOGO stores.

Whygo's trainers

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores omnis mollitia cumque deserunt quia exercitationem.

One of Whygo's outstanding features is the exceptional quality of its teaching staff. The center was founded by Canadian and American teachers with years of experience and highly-specialized skills who are keen on providing a superior quality of education. Its trainers include authors who have published numerous books on teaching Business English. Whygo trainers create and make use of their own teaching material. A contributing factor to the school's distinctive curriculum. Whygo also provides publishing and editing services for outside sources.

Advantages of studying with a Whygo trainer

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores omnis mollitia cumque deserunt quia exercitationem.

Studying English with a foreign trainer not only ensures learning correct pronunciation and sentence structure (syntax), but also provides valuable tips on how to adapt your communications and behaviors to the North American culture. This is particularly helpful for those wishing to do business with large corporations either in Taiwan or in a foreign country or for students wishing to study abroad.

If you are in business

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores omnis mollitia cumque deserunt quia exercitationem.

You will develop the skills to: speak and write correct business English, make presentations, conduct meetings and speak on the phone in a clear concise manner. You will also learn to write short direct e-mails and learn everyday vocabulary and local customs to be able to socialize comfortably in a North American environment.

If you are a student wishing to study abroad

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores omnis mollitia cumque deserunt quia exercitationem.

Whygo provides an exclusive package of specialized services to prepare for graduate school in a foreign country. This not only ensures your success on the entrance exams such as TOEFL, IELTS, GRE and GMAT, but also includes learning to write letters of presentation, resumes, essays and statements of purpose. Preparation for school interviews using correct pronunciation and syntax, as well as foreign culture preparation classes. All these extras contribute to your future success.

Our Customers

A unique inclusive package is available for business people and students. Your training will therefore be more task-oriented and comprehensive. Our training center is conveniently located right next to the ZhongXiao Fuxing MRT Station and is nestled between the two SOGO stores.

                        <address>

                                WHYGO Language center

                                外國語文中心

                        </address>

                            106台北市大安區
忠孝東路四段二號三樓

                            Phone:
(02) 2771-0088

                            Email:

                            info@whygo.com.tw

                            Hours:

                            Monday - Friday: 13:00 - 22:00

                            Saturday - Sunday: 12:00 - 21:00

Copyright © WHYGO Language Center 外國語文中心 2015


text:
% ProduceIeeeSaccadeTimes
%
% Plots the histograms of times at which the subject made any saccade in
% target and distractor trials, relative to the t=0 of the epoch.
% This plot was Figure 5 in DJ's 2011 IEEE/EMBS NE conference submission.
%
% Created 3/15/11 by DJ

%% Set up
subjects = [6 2 7];

% Load data
LoadAllEpochs; % alter this program to get stimulus-locked or saccade-locked analysis.

% Make plot
Figure;
GetEyeAverages(subjects,[0 1 0 1 0 1]);


text:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.schmince" android:versionCode="2" android:versionName="2.0">
    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
    <uses-feature android:glEsVersion="0x00020000"
                  android:required="true"/>
    <application android:allowBackup="true" android:icon="@drawable/ic_launcher"
                 android:label="Schmince">
        <activity android:name=".SchminceActivity"
                  android:configChanges="orientation|keyboardHidden|screenSize"
                  android:label="Schmince">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>


text:
<?php

namespace Gifty;

use Gifty\Interfaces\ErrorResponseInterface;

/**
 * Class ErrorResponse
 * @package Gifty
 * @author Tadas Juozapaitis <kasp3rito@gmail.com>
 */
class ErrorResponse implements ErrorResponseInterface
{
    /** @var int */
    private $errorCode;
    /** @var string */
    private $errorDescription;

    public function __construct(array $data)
    {
        $this
            ->setErrorCode($data['error_code'])
            ->setErrorDescription($data['error_description']);
    }

    /**
     * {@inheritdoc}
     */
    public function getErrorCode()
    {
        return $this->errorCode;
    }

    /**
     * @param int $errorCode
     * @return $this
     */
    public function setErrorCode($errorCode)
    {
        $this->errorCode = $errorCode;

        return $this;
    }

    /**
     * {@inheritdoc}
     */
    public function getErrorDescription()
    {
        return $this->errorDescription;
    }

    /**
     * @param string $errorDescription
     * @return $this
     */
    public function setErrorDescription($errorDescription)
    {
        $this->errorDescription = $errorDescription;

        return $this;
    }
}


text:
module TWM
  #
  # The Whale Hotline API
  # http://hotline.whalemuseum.org/api
  #
  class Sightings
    attr_accessor :api

    def initialize(api)
      @api = api
      @api.create_session('http://hotline.whalemuseum.org')
    end

    # Retrieve Hotline sighting reports
    #
    # @param [Hash] params Optional params or filters:
    # @option params [String] species Get sighting reports for a species.
    # @option params [String] orca_type Get sighting reports for a type of orca.
    # @option params [String] orca_pod Get sighting reports for a pod of orca.
    # @option params [String] since Get sighting reports after this date.
    # @option params [String] until Get sighting reports before this date.
    # @option params [String] near Get sighting reports near a Lat/Lng point.
    # @option params [String] radius Get sighting reports within this distance of center point.
    #
    # @return [Integer] The count of sighting reports.
    #
    # @see http://hotline.whalemuseum.org/api
    #
    # @example
    #
    #   count = twm.sightings.count
    #   => 17000
    #
    #   count = twm.sightings.count(species: 'orca')
    #
    def count(params = {})
      @api.get("api/count.json", params)
    end

    # Retrieve a specific sighting report
    #
    # @param [String] id The ID of the sighting report to retrieve.
    #
    # @return [JSON] A sighting report object.
    #
    # @see http://hotline.whalemuseum.org/api
    #
    # @example
    #
    #   sighting = twm.sightings.find('52b158c0686f7438d8ac0600')
    #   sighting['species']
    #   => "orca"
    #
    def find(id)
      @api.get("api/#{id.to_s}.json")
    end

    # Retrieve Hotline sighting reports
    #
    # @param [Hash] params Optional params or filters:
    # @option params [String] species Get sighting reports for a species.
    # @option params [String] orca_type Get sighting reports for a type of orca.
    # @option params [String] orca_pod Get sighting reports for a pod of orca.
    # @option params [Integer] limit The number of sighting reports to return.
    # @option params [Integer] page The page number to return.
    # @option params [String] since Get sighting reports after this date.
    # @option params [String] until Get sighting reports before this date.
    # @option params [String] near Get sighting reports near a Lat/Lng point.
    # @option params [String] radius Get sighting reports within this distance of center point.
    #
    # @return [JSON] An array of matching sighting reports.
    #
    # @see http://hotline.whalemuseum.org/api
    #
    # @example
    #
    #   sightings = twm.sightings.search
    #   sightings.size
    #   => 17000
    #
    #   sightings = twm.sightings.search(species: 'orca', limit: 250)
    #
    def search(params = {})
      @api.get("api.json", params)
    end
  end
end


text:
package com.leonds.blog.console.service.impl;

import com.leonds.blog.console.service.TagService;
import com.leonds.blog.domain.entity.Tag;
import com.leonds.core.orm.Filters;
import com.leonds.core.orm.PersistenceManager;
import com.leonds.core.utils.CheckUtils;
import com.leonds.core.utils.MessageUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Leon
 */
@Service
public class TagServiceImpl implements TagService {

    @Autowired
    private PersistenceManager pm;

    @Override
    public Tag save(Tag tag) {
        CheckUtils.checkObject(tag);
        Tag tagOfName;
        if (StringUtils.isNotBlank(tag.getId())) {
            tagOfName = getByIdIsNotAndName(tag.getId(), tag.getName());
        } else {
            tagOfName = getByName(tag.getName());
        }
        CheckUtils.checkState(tagOfName == null, MessageUtils.get("tag.name.exists"));
        return pm.save(tag);
    }

    @Override
    public Tag getByName(String name) {
        return pm.findOne(Tag.class, Filters.and(Filters.eq("name", name)));
    }

    @Override
    public Tag getByIdIsNotAndName(String id, String name) {
        return pm.findOne(Tag.class, Filters.and(Filters.eq("name", name), Filters.neq("id", id)));
    }

    @Override
    public Tag getById(String id) {
        return pm.get(Tag.class, id);
    }

    @Override
    public void remove(List<String> ids) {
        if (ids != null && !ids.isEmpty()) {
            pm.remove(Tag.class, ids);
        }
    }

    @Override
    public List<Tag> getAll() {
        return pm.findAll(Tag.class);
    }
}


text:
{{adminUsers.moduleName}} administration

Basic Config

AFP

                            #
                            Name
                            Actions Create

                            {{afp.id}}
                            {{afp.name}}

                                Update

EPS

                            #
                            Name
                            Actions Create

                            {{eps.id}}
                            {{eps.name}}

                                Update

Project

                            #
                            Name
                            Actions Create

                            {{project.id}}
                            {{project.name}}

                                Update

Seniority

                            #
                            Name
                            Actions Create

                            {{seniority.id}}
                            {{seniority.name}}

                                Update

Skils

                            #
                            Name
                            Actions Create

                            {{skills.id}}
                            {{skills.name}}

                                Update

Param Tables

Social Security Email List

                                #
                                Name
                                Actions Create

                                {{socialSecurityEmail.id}}
                                {{socialSecurityEmail.name}}
                                Update

Master Tables

Birth Place

                                #	Name

                                {{birthPlace.id}}
                                {{birthPlace.name}}

Nationality

                            #	Country	Nationality

                            {{nationality.id}}
                            {{nationality.name}}
                            {{nationality.nationality}}

Document Type

                            #	Name

                            {{documentType.id}}
                            {{documentType.name}}

Marital Status

                            #	Name

                            {{maritalStatus.id}}
                            {{maritalStatus.name}}

Rh

                            #	Name

                            {{rh.id}}
                            {{rh.name}}

Scholarship

                            #	Name

                            {{scholarship.id}}
                            {{scholarship.name}}

    <insert-modal modal-name="{{adminUsers.modal.ModalHeader}}" record-id="{{adminUsers.modal.id}}"
                  record-name="{{adminUsers.modal.name}}">
    </insert-modal>


text:
/**
 * Package for demonstration simple lock.
 * @author Eugene Lazarev mailto(helycopternicht@rambler.ru)
 * @since 25.07.17
 */
package ru.elazarev.waitnotify.lock;


text:
namespace ui {

// Event flags currently supported. It is OK to add values to the middle of
// this list and/or reorder it, but make sure you also touch the various other
// enums/constants that want to stay in sync with this. For example,
// KeyEventFlags and MouseEventFlags should not overlap EventFlags.
using EventFlags = int;
// Used to denote no flags explicitly
constexpr EventFlags EF_NONE = 0;

// Universally applicable status bits.
constexpr EventFlags EF_IS_SYNTHESIZED = 1 << 0;

// Modifier key state.
constexpr EventFlags EF_SHIFT_DOWN = 1 << 1;
constexpr EventFlags EF_CONTROL_DOWN = 1 << 2;
constexpr EventFlags EF_ALT_DOWN = 1 << 3;
// GUI Key (e.g. Command on OS X keyboards, Search on Chromebook keyboards,
// Windows on MS-oriented keyboards)
constexpr EventFlags EF_COMMAND_DOWN = 1 << 4;
// Function key.
constexpr EventFlags EF_FUNCTION_DOWN = 1 << 5;
constexpr EventFlags EF_ALTGR_DOWN = 1 << 6;
constexpr EventFlags EF_MOD3_DOWN = 1 << 7;

// Other keyboard states.
constexpr EventFlags EF_NUM_LOCK_ON = 1 << 8;
constexpr EventFlags EF_CAPS_LOCK_ON = 1 << 9;
constexpr EventFlags EF_SCROLL_LOCK_ON = 1 << 10;

// Mouse buttons.
constexpr EventFlags EF_LEFT_MOUSE_BUTTON = 1 << 11;
constexpr EventFlags EF_MIDDLE_MOUSE_BUTTON = 1 << 12;
constexpr EventFlags EF_RIGHT_MOUSE_BUTTON = 1 << 13;
constexpr EventFlags EF_BACK_MOUSE_BUTTON = 1 << 14;
constexpr EventFlags EF_FORWARD_MOUSE_BUTTON = 1 << 15;
constexpr EventFlags EF_MOUSE_BUTTON =
    EF_LEFT_MOUSE_BUTTON | EF_MIDDLE_MOUSE_BUTTON | EF_RIGHT_MOUSE_BUTTON |
    EF_BACK_MOUSE_BUTTON | EF_FORWARD_MOUSE_BUTTON;

// An artificial value used to bridge platform differences.
// Many commands on Mac as Cmd+Key are the counterparts of
// Ctrl+Key on other platforms.
#if BUILDFLAG(IS_APPLE)
constexpr EventFlags EF_PLATFORM_ACCELERATOR = EF_COMMAND_DOWN;
#else
constexpr EventFlags EF_PLATFORM_ACCELERATOR = EF_CONTROL_DOWN;
#endif

// Flags specific to key events.
// WARNING: If you add or remove values make sure traits for serializing these
// values are updated.
using KeyEventFlags = EventFlags;
// Key event fabricated by the underlying IME without a user action. (Linux X11
// only)
constexpr KeyEventFlags EF_IME_FABRICATED_KEY = 1 << 16;
constexpr KeyEventFlags EF_IS_REPEAT = 1 << 17;
// Do not remap; the event was created with the desired final values.
constexpr KeyEventFlags EF_FINAL = 1 << 18;
// Windows extended key (see WM_KEYDOWN doc)
constexpr KeyEventFlags EF_IS_EXTENDED_KEY = 1 << 19;
// Event was generated by a stylus button
constexpr KeyEventFlags EF_IS_STYLUS_BUTTON = 1 << 20;
constexpr KeyEventFlags EF_MAX_KEY_EVENT_FLAGS_VALUE = (1 << 21) - 1;

// Flags specific to mouse events.
using MouseEventFlags = EventFlags;
constexpr MouseEventFlags EF_IS_DOUBLE_CLICK = 1 << 16;
constexpr MouseEventFlags EF_IS_TRIPLE_CLICK = 1 << 17;
constexpr MouseEventFlags EF_IS_NON_CLIENT = 1 << 18;
// Indicates this mouse event is generated from an unconsumed touch/gesture
// event.
constexpr MouseEventFlags EF_FROM_TOUCH = 1 << 19;
// Indicates this event was generated from touch accessibility mode.
constexpr MouseEventFlags EF_TOUCH_ACCESSIBILITY = 1 << 20;
// Indicates this mouse event is generated because the cursor was just hidden.
// This can be used to update hover state.
constexpr MouseEventFlags EF_CURSOR_HIDE = 1 << 21;
// Indicates this mouse event is from high precision touchpad and will come with
// a high precision delta.
constexpr MouseEventFlags EF_PRECISION_SCROLLING_DELTA = 1 << 22;
// Indicates this mouse event is generated when users is requesting to scroll by
// pages.
constexpr MouseEventFlags EF_SCROLL_BY_PAGE = 1 << 23;
// Indicates this mouse event is unadjusted mouse events that has unadjusted
// movement delta, i.e. is from WM_INPUT on Windows.
constexpr MouseEventFlags EF_UNADJUSTED_MOUSE = 1 << 24;
// Indicates this mouse event should not trigger mouse warping (which moves the
// mouse to another display when the mouse hits the window boundaries).
constexpr MouseEventFlags EF_NOT_SUITABLE_FOR_MOUSE_WARPING = 1 << 25;

// Result of dispatching an event.
enum EventResult {
  ER_UNHANDLED = 0,      // The event hasn't been handled. The event can be
                         // propagated to other handlers.
  ER_HANDLED = 1 << 0,   // The event has already been handled, but it can
                         // still be propagated to other handlers.
  ER_CONSUMED = 1 << 1,  // The event has been handled, and it should not be
                         // propagated to other handlers.
  ER_DISABLE_SYNC_HANDLING =
      1 << 2,  // The event shouldn't be handled synchronously. This
               // happens if the event is being handled
               // asynchronously, or if the event is invalid and
               // shouldn't be handled at all.
};

// Phase of the event dispatch.
enum EventPhase {
  EP_PREDISPATCH,
  EP_PRETARGET,
  EP_TARGET,
  EP_POSTTARGET,
  EP_POSTDISPATCH
};

// Phase information used for a ScrollEvent. ScrollEventPhase is for scroll
// stream from user gesture, EventMomentumPhase is for inertia scroll stream
// after user gesture.
enum class ScrollEventPhase {
  // Event has no phase information. eg. the Event is not in a scroll stream.
  kNone,

  // Event is the beginning of a scroll event stream.
  kBegan,

  // Event is a scroll event with phase information.
  kUpdate,

  // Event is the end of the current scroll event stream.
  kEnd,
};

// Momentum phase information used for a ScrollEvent.
enum class EventMomentumPhase {
  // Event is a non-momentum update to an event stream already begun.
  NONE,

  // Event is the beginning of an event stream that may result in momentum.
  // BEGAN vs MAY_BEGIN:
  // - BEGAN means we already know the inertia scroll stream must happen after
  //   BEGAN event. On Windows touchpad, we sent this when receive the first
  //   inertia scroll event or Direct Manipulation state change to INERTIA.
  // - MAY_BEGIN means the inertia scroll stream may happen after MAY_BEGIN
  //   event. On Mac, we send this when receive releaseTouches, but we do not
  //   know the inertia scroll stream will happen or not at that time.
  BEGAN,

  // Event maybe the beginning of an event stream that may result in momentum.
  // This state used on Mac.
  MAY_BEGIN,

  // Event is an update while in a momentum phase. A "begin" event for the
  // momentum phase portion of an event stream uses this also, but the scroll
  // offsets will be zero.
  INERTIAL_UPDATE,

  // Event marks the end of the current event stream. Note that this is also set
  // for events that are not a "stream", but indicate both the start and end of
  // the event (e.g. a mouse wheel tick).
  END,

  // EventMomentumPhase can only be BLOCKED when ScrollEventPhase is kEnd. Event
  // marks the end of the current event stream, when there will be no inertia
  // scrolling after the user gesture. ScrollEventPhase must simultaneously be
  // kEnd because that is when it is determined if an event stream that results
  // in momentum will begin or not. This phase is only used on Windows.
  BLOCKED,
};

enum EventDeviceId {
  // Device ID for Touch, Mouse and Key Events.
  ED_UNKNOWN_DEVICE = -1,
  // Device ID for events injected through a remote connection (like CRD).
  ED_REMOTE_INPUT_DEVICE = -2,
};

// Pointing device type.
enum class EventPointerType : int {
  kUnknown,
  kMouse,
  kPen,
  kTouch,
  kEraser,
  kMaxValue = kEraser,
};

// Device type for gesture events.
enum class GestureDeviceType : int {
  DEVICE_UNKNOWN = 0,
  DEVICE_TOUCHPAD,
  DEVICE_TOUCHSCREEN,
};

}  // namespace ui

#endif  // UI_EVENTS_EVENT_CONSTANTS_H_


text:
require 'teth/minitest'

class TokenTest < Teth::Minitest
  def test_contract_deployed
    assert_equal false, contract.address.nil?
  end

  def test_issue_balance
    assert_equal 0, contract.getBalance(bob)
    contract.issue bob, 100
    assert_equal 100, contract.getBalance(bob)
  end

  def test_issue_exception
    assert_raises(TransactionFailed) do
      contract.issue bob, 100, sender: eve_privkey
    end
    assert_equal 0, contract.getBalance(bob)
  end

  def test_token_transfer
    contract.issue bob, 100
    contract.transfer carol, 90, sender: bob_privkey
    assert_equal 90, contract.getBalance(carol)

    assert_raises(TransactionFailed) { contract.transfer carol, 90, sender: bob_privkey }
  end
end


text:
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package io.flutter.plugins.googlemobileads;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.mockito.ArgumentCaptor.forClass;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import android.app.Activity;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdValue;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.LoadAdError;
import com.google.android.gms.ads.ResponseInfo;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.platform.PlatformView;
import io.flutter.plugins.googlemobileads.FlutterAd.FlutterLoadAdError;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.robolectric.RobolectricTestRunner;

/** Tests for {@link FlutterBannerAd}. */
@RunWith(RobolectricTestRunner.class)
public class FlutterBannerAdTest {

  private AdInstanceManager mockManager;
  private AdView mockAdView;
  private AdRequest mockAdRequest;
  private AdSize adSize;

  // The system under test.
  private FlutterBannerAd flutterBannerAd;

  @Before
  public void setup() {
    mockManager = spy(new AdInstanceManager(mock(MethodChannel.class)));
    doReturn(mock(Activity.class)).when(mockManager).getActivity();
    final FlutterAdRequest mockFlutterRequest = mock(FlutterAdRequest.class);
    mockAdRequest = mock(AdRequest.class);
    final FlutterAdSize mockFlutterAdSize = mock(FlutterAdSize.class);
    adSize = new AdSize(1, 2);
    when(mockFlutterRequest.asAdRequest(anyString())).thenReturn(mockAdRequest);
    when(mockFlutterAdSize.getAdSize()).thenReturn(adSize);
    BannerAdCreator bannerAdCreator = mock(BannerAdCreator.class);
    mockAdView = mock(AdView.class);
    doReturn(mockAdView).when(bannerAdCreator).createAdView();
    flutterBannerAd =
        new FlutterBannerAd(
            1, mockManager, "testId", mockFlutterRequest, mockFlutterAdSize, bannerAdCreator);
  }

  @Test
  public void failedToLoad() {
    final LoadAdError loadError = mock(LoadAdError.class);
    doReturn(1).when(loadError).getCode();
    doReturn("2").when(loadError).getDomain();
    doReturn("3").when(loadError).getMessage();
    doReturn(null).when(loadError).getResponseInfo();
    doAnswer(
            new Answer() {
              @Override
              public Object answer(InvocationOnMock invocation) throws Throwable {
                AdListener listener = invocation.getArgument(0);
                listener.onAdFailedToLoad(loadError);
                return null;
              }
            })
        .when(mockAdView)
        .setAdListener(any(AdListener.class));

    flutterBannerAd.load();
    verify(mockAdView).loadAd(eq(mockAdRequest));
    verify(mockAdView).setAdListener(any(AdListener.class));
    verify(mockAdView).setAdUnitId(eq("testId"));
    verify(mockAdView).setAdSize(adSize);
    FlutterLoadAdError expectedError = new FlutterLoadAdError(loadError);
    verify(mockManager).onAdFailedToLoad(eq(1), eq(expectedError));
  }

  @Test
  public void loadWithListenerCallbacks() {
    doAnswer(
            new Answer() {
              @Override
              public Object answer(InvocationOnMock invocation) throws Throwable {
                AdListener listener = invocation.getArgument(0);
                listener.onAdLoaded();
                listener.onAdImpression();
                listener.onAdClicked();
                listener.onAdClosed();
                listener.onAdOpened();
                return null;
              }
            })
        .when(mockAdView)
        .setAdListener(any(AdListener.class));

    final ResponseInfo responseInfo = mock(ResponseInfo.class);
    doReturn(responseInfo).when(mockAdView).getResponseInfo();

    final AdValue adValue = mock(AdValue.class);
    doReturn(1).when(adValue).getPrecisionType();
    doReturn("Dollars").when(adValue).getCurrencyCode();
    doReturn(1000L).when(adValue).getValueMicros();
    doAnswer(
            new Answer() {
              @Override
              public Object answer(InvocationOnMock invocation) {
                FlutterPaidEventListener listener = invocation.getArgument(0);
                listener.onPaidEvent(adValue);
                return null;
              }
            })
        .when(mockAdView)
        .setOnPaidEventListener(any(FlutterPaidEventListener.class));

    flutterBannerAd.load();

    verify(mockAdView).loadAd(eq(mockAdRequest));
    verify(mockAdView).setAdListener(any(AdListener.class));
    verify(mockAdView).setAdUnitId(eq("testId"));
    verify(mockAdView).setAdSize(adSize);
    verify(mockManager).onAdLoaded(eq(1), eq(responseInfo));
    verify(mockManager).onAdImpression(eq(1));
    verify(mockManager).onAdClicked(eq(1));
    verify(mockManager).onAdClosed(eq(1));
    verify(mockManager).onAdOpened(eq(1));
    assertEquals(flutterBannerAd.getPlatformView().getView(), mockAdView);
    verify(mockAdView).setOnPaidEventListener(any(FlutterPaidEventListener.class));
    final ArgumentCaptor<FlutterAdValue> adValueCaptor = forClass(FlutterAdValue.class);
    verify(mockManager).onPaidEvent(eq(flutterBannerAd), adValueCaptor.capture());
    assertEquals(adValueCaptor.getValue().currencyCode, "Dollars");
    assertEquals(adValueCaptor.getValue().precisionType, 1);
    assertEquals(adValueCaptor.getValue().valueMicros, 1000L);
  }

  @Test
  public void dispose() {
    flutterBannerAd.load();

    assertEquals(flutterBannerAd.getPlatformView().getView(), mockAdView);
    PlatformView platformView = flutterBannerAd.getPlatformView();
    assertNotNull(platformView);

    flutterBannerAd.dispose();
    verify(mockAdView).destroy();
    assertNull(flutterBannerAd.getPlatformView());
    // Check that the platform view still retains a reference to the view until
    // dispose is called on it.
    assertNotNull(platformView.getView());
    platformView.dispose();
    assertNull(platformView.getView());
  }
}


text:
import {useAmpContext} from './context';
import {useLayoutEffect} from './index';

/**
 * Notifies Resources (if present) of a rerender in the component.
 * Every functional component **must** use this helper.
 */
export function useResourcesNotify() {
  const {notify} = useAmpContext();
  useLayoutEffect(() => {
    if (notify) {
      notify();
    }
  });
}


text:
<?php

namespace AppBundle\Admin;

use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Form\FormMapper;

class EventAdmin extends Admin
{
    protected $baseRouteName = "admin_event";
    protected $baseRoutePattern = "event";

    protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
            ->add('title', 'text')
            ->add('text', 'text')
            ->add('author', 'entity', array(
                'class' => 'AppBundle:User',
                'property' => 'email',
            ))
            ->add('eventDate', 'timestamp_date')
            ->add('tags', 'tags', array('required' => false))
            ->add('image', 'sonata_media_type', array(
                 'provider' => 'sonata.media.provider.image',
                 'context'  => 'default',
                 'required' => false,
            ))
            ;
    }

    protected function configureDatagridFilters(DatagridMapper $datagridMapper)
    {
        $datagridMapper
            ->add('title')
            ->add('author', null, array(), 'entity', array('property' => 'email', 'placeholder' => 'any author'))
            ->add('eventDate', null, array(), 'timestamp_date');
    }

    protected function configureListFields(ListMapper $listMapper)
    {
        $listMapper
            ->add('id')
            ->addIdentifier('title')
            ->add('author', null, array('associated_property' => 'email'))
            ->add('createdAt', 'date', array(
                'pattern' => 'dd.MM.yyyy',
            ))
            ->add('deletedAt', 'date', array(
                'pattern' => 'dd.MM.yyyy',
            ))
            ->add('eventDate', 'date', array(
                'pattern' => 'dd.MM.yyyy',
            ))
            ->add('tags', 'array')
            ;
    }

    public function createQuery($context = 'list')
    {
        $query = parent::createQuery($context);

        $query->select('e')
            ->from('AppBundle:Event', 'e')
            ->where('e INSTANCE OF AppBundle:Event');

        return $query;
    }
}


text:
from time import sleep

class Adafruit_CharLCD(object):

    # commands
    LCD_CLEARDISPLAY        = 0x01
    LCD_RETURNHOME          = 0x02
    LCD_ENTRYMODESET        = 0x04
    LCD_DISPLAYCONTROL      = 0x08
    LCD_CURSORSHIFT         = 0x10
    LCD_FUNCTIONSET         = 0x20
    LCD_SETCGRAMADDR        = 0x40
    LCD_SETDDRAMADDR        = 0x80

    # flags for display entry mode
    LCD_ENTRYRIGHT          = 0x00
    LCD_ENTRYLEFT           = 0x02
    LCD_ENTRYSHIFTINCREMENT = 0x01
    LCD_ENTRYSHIFTDECREMENT = 0x00

    # flags for display on/off control
    LCD_DISPLAYON           = 0x04
    LCD_DISPLAYOFF          = 0x00
    LCD_CURSORON            = 0x02
    LCD_CURSOROFF           = 0x00
    LCD_BLINKON             = 0x01
    LCD_BLINKOFF            = 0x00

    # flags for display/cursor shift
    LCD_DISPLAYMOVE         = 0x08
    LCD_CURSORMOVE          = 0x00

    # flags for display/cursor shift
    LCD_DISPLAYMOVE         = 0x08
    LCD_CURSORMOVE          = 0x00
    LCD_MOVERIGHT           = 0x04
    LCD_MOVELEFT            = 0x00

    # flags for function set
    LCD_8BITMODE            = 0x10
    LCD_4BITMODE            = 0x00
    LCD_2LINE               = 0x08
    LCD_1LINE               = 0x00
    LCD_5x10DOTS            = 0x04
    LCD_5x8DOTS             = 0x00

    def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, 21, 22], GPIO=None):
        # Emulate the old behavior of using RPi.GPIO if we haven't been given
        # an explicit GPIO interface to use
        if not GPIO:
            import RPi.GPIO as GPIO
            GPIO.setwarnings(False)
        self.GPIO = GPIO
        self.pin_rs = pin_rs
        self.pin_e = pin_e
        self.pins_db = pins_db

        self.GPIO.setmode(GPIO.BCM)
        self.GPIO.setup(self.pin_e, GPIO.OUT)
        self.GPIO.setup(self.pin_rs, GPIO.OUT)

        for pin in self.pins_db:
            self.GPIO.setup(pin, GPIO.OUT)

        self.write4bits(0x33)  # initialization
        self.write4bits(0x32)  # initialization
        self.write4bits(0x28)  # 2 line 5x7 matrix
        self.write4bits(0x0C)  # turn cursor off 0x0E to enable cursor
        self.write4bits(0x06)  # shift cursor right

        self.displaycontrol = self.LCD_DISPLAYON | self.LCD_CURSOROFF | self.LCD_BLINKOFF

        self.displayfunction = self.LCD_4BITMODE | self.LCD_1LINE | self.LCD_5x8DOTS
        self.displayfunction |= self.LCD_2LINE

        # Initialize to default text direction (for romance languages)
        self.displaymode = self.LCD_ENTRYLEFT | self.LCD_ENTRYSHIFTDECREMENT
        self.write4bits(self.LCD_ENTRYMODESET | self.displaymode)  # set the entry mode

        self.clear()

    def begin(self, cols, lines):
        if (lines > 1):
            self.numlines = lines
            self.displayfunction |= self.LCD_2LINE

    def home(self):
        self.write4bits(self.LCD_RETURNHOME)  # set cursor position to zero
        self.delayMicroseconds(3000)  # this command takes a long time!

    def clear(self):
        self.write4bits(self.LCD_CLEARDISPLAY)  # command to clear display
        self.delayMicroseconds(3000)  # 3000 microsecond sleep, clearing the display takes a long time

    def setCursor(self, col, row):
        self.row_offsets = [0x00, 0x40, 0x14, 0x54]
        if row > self.numlines:
            row = self.numlines - 1  # we count rows starting w/0
        self.write4bits(self.LCD_SETDDRAMADDR | (col + self.row_offsets[row]))

    def noDisplay(self):
        """ Turn the display off (quickly) """
        self.displaycontrol &= ~self.LCD_DISPLAYON
        self.write4bits(self.LCD_DISPLAYCONTROL | self.displaycontrol)

    def display(self):
        """ Turn the display on (quickly) """
        self.displaycontrol |= self.LCD_DISPLAYON
        self.write4bits(self.LCD_DISPLAYCONTROL | self.displaycontrol)

    def noCursor(self):
        """ Turns the underline cursor off """
        self.displaycontrol &= ~self.LCD_CURSORON
        self.write4bits(self.LCD_DISPLAYCONTROL | self.displaycontrol)

    def cursor(self):
        """ Turns the underline cursor on """
        self.displaycontrol |= self.LCD_CURSORON
        self.write4bits(self.LCD_DISPLAYCONTROL | self.displaycontrol)

    def noBlink(self):
        """ Turn the blinking cursor off """
        self.displaycontrol &= ~self.LCD_BLINKON
        self.write4bits(self.LCD_DISPLAYCONTROL | self.displaycontrol)

    def blink(self):
        """ Turn the blinking cursor on """
        self.displaycontrol |= self.LCD_BLINKON
        self.write4bits(self.LCD_DISPLAYCONTROL | self.displaycontrol)

    def DisplayLeft(self):
        """ These commands scroll the display without changing the RAM """
        self.write4bits(self.LCD_CURSORSHIFT | self.LCD_DISPLAYMOVE | self.LCD_MOVELEFT)

    def scrollDisplayRight(self):
        """ These commands scroll the display without changing the RAM """
        self.write4bits(self.LCD_CURSORSHIFT | self.LCD_DISPLAYMOVE | self.LCD_MOVERIGHT)

    def leftToRight(self):
        """ This is for text that flows Left to Right """
        self.displaymode |= self.LCD_ENTRYLEFT
        self.write4bits(self.LCD_ENTRYMODESET | self.displaymode)

    def rightToLeft(self):
        """ This is for text that flows Right to Left """
        self.displaymode &= ~self.LCD_ENTRYLEFT
        self.write4bits(self.LCD_ENTRYMODESET | self.displaymode)

    def autoscroll(self):
        """ This will 'right justify' text from the cursor """
        self.displaymode |= self.LCD_ENTRYSHIFTINCREMENT
        self.write4bits(self.LCD_ENTRYMODESET | self.displaymode)

    def noAutoscroll(self):
        """ This will 'left justify' text from the cursor """
        self.displaymode &= ~self.LCD_ENTRYSHIFTINCREMENT
        self.write4bits(self.LCD_ENTRYMODESET | self.displaymode)

    def write4bits(self, bits, char_mode=False):
        """ Send command to LCD """
        self.delayMicroseconds(1000)  # 1000 microsecond sleep
        bits = bin(bits)[2:].zfill(8)
        self.GPIO.output(self.pin_rs, char_mode)
        for pin in self.pins_db:
            self.GPIO.output(pin, False)
        for i in range(4):
            if bits[i] == "1":
                self.GPIO.output(self.pins_db[::-1][i], True)
        self.pulseEnable()
        for pin in self.pins_db:
            self.GPIO.output(pin, False)
        for i in range(4, 8):
            if bits[i] == "1":
                self.GPIO.output(self.pins_db[::-1][i-4], True)
        self.pulseEnable()

    def delayMicroseconds(self, microseconds):
        seconds = microseconds / float(1000000)  # divide microseconds by 1 million for seconds
        sleep(seconds)

    def pulseEnable(self):
        self.GPIO.output(self.pin_e, False)
        self.delayMicroseconds(1)       # 1 microsecond pause - enable pulse must be > 450ns
        self.GPIO.output(self.pin_e, True)
        self.delayMicroseconds(1)       # 1 microsecond pause - enable pulse must be > 450ns
        self.GPIO.output(self.pin_e, False)
        self.delayMicroseconds(1)       # commands need > 37us to settle

    def message(self, text):
        """ Send string to LCD. Newline wraps to second line"""
        for char in text:
            if char == '\n':
                self.write4bits(0xC0)  # next line
            else:
                self.write4bits(ord(char), True)

if __name__ == '__main__':
    lcd = Adafruit_CharLCD()
    lcd.clear()
    lcd.message("  Adafruit 16x2\n  Standard LCD")


text:
package net.jsunit.model;

import java.util.ArrayList;
import java.util.List;

public class TestPageResult extends AbstractResult {

    private final String testPageName;
    private List<TestCaseResult> testCaseResults = new ArrayList<TestCaseResult>();

    public TestPageResult(String testPageName) {
        this.testPageName = testPageName;
    }

    public void addTestCaseResult(TestCaseResult testCaseResult) {
        testCaseResults.add(testCaseResult);
    }

    public String getTestPageName() {
        return testPageName;
    }

    public List<TestCaseResult> getTestCaseResults() {
        return testCaseResults;
    }

    protected List<? extends Result> getChildren() {
        return testCaseResults;
    }

}


text:
function display_title(node_title, title_id) {
	//this method has been done because without using foreign objects (not supported by all browsers)
	//vg provides no way of wrapping a text within a object so I use tspan to go to a new line..
	if (node_title == undefined)
		node_title = ("Unknown Title")
	var node = d3.select("#" + title_id)
	node.text("");

	var words = node_title.split(" ") ;
	var length = node_title.length ;
	var line_count = 1 ;
	var temp_text = "" ;
	var line_space = 15 ;
	var offset = (30 - (line_space * (line_count - 1))) / 2 ;

	node.append("tspan").text("") ;

	for (var i = 0; i < length; i++) {
		if (words[i] != undefined) {
			old_text = temp_text ;
			temp_text = temp_text + ' ' + words[i] ;
			element = d3.selectAll("#" + title_id + " tspan") ;
			last = element.size() - 1 ;

			//SD/ Write the text in the last tspan
			d3.select(element[0][last]).text(temp_text.trim()).attr("x", $("#" + title_id).attr("x")).attr("dy", line_space) ;
			d3.select(element[0][0]).attr("dy", offset) ;

			//SD/ If necessary, write a new line
			//SD/ The last substraction (value 95) is the thumbnail image
			if (document.getElementById(title_id).getBBox().width > $("#" + title_id).attr("width") - 95) {
				//SD/ Update data before new line
				line_count++ ;
				offset = (30 - (line_space * (line_count - 1))) / 2 ;
				d3.select(element[0][last]).text(old_text.trim()) ;

				//SD/ Write the new line with last word
				temp_text = words[i] ;
				node.append("tspan").text(temp_text).attr("x", $("#" + title_id).attr("x"));

				//SD/ Redistribute line position depending on line quantity
				$("#" + title_id + " tspan").each(function( index ) {
					$( this ).attr("dy", line_space) ;
				});
				d3.select(element[0][0]).attr("dy", offset) ;
			}
		}

	}

	//if (temp_text.length > 1) {
	//	node.append("tspan").text(temp_text.trim()).attr("x", $("#" + title_id).attr("x")).attr("dy", "15");
	//}
}

function zoom_in(d,ref_id, rect_id, min_x, max_x, min_y, max_y,display_class) {
	shift_rect(ref_id, rect_id, min_x, max_x, min_y, max_y, display_class);
	$("." + display_class).each(function() {
		$("#" + this.id).show();
	});

	$("#image" + d.id).hide() ;
	d3.selectAll("." + display_class).moveToFront(true);
}

function mouseout(d, display_class) {
	$("." + display_class).each(function() {
		$("#" + this.id).hide();
		$("#image" + d.id).show() ;
});

}

d3.selection.prototype.moveToFront = function(redraw_parent) {
	if (redraw_parent == true)
		return this.each(function() {
			this.parentNode.parentNode.appendChild(this.parentNode);
		});
	else
		return this.each(function() {
			this.parentNode.appendChild(this);
		});

};

d3.selection.prototype.moveToBack = function() {
	return this.each(function() {
		// Unfortunately, prependChild() doesn't exist:
		// http://blogs.adobe.com/cantrell/archives/2011/11/adding-prependchild-to-element.html
		this.parentNode.insertBefore(this, this.parentNode.firstChild);
	});
};
function shift_rect(ref_id, rect_id, min_x, max_x, min_y, max_y, class_name) {
	// min_y document.getElementById("rec_graph").style.marginTop  and deduct px
	// max_y : height of rect + height of video

  	ref_node = $("#"+ref_id);
  	rect_node = $("#"+rect_id);

	var node_position = ref_node.position()
	var rect_position = rect_node.position()

	var left = parseFloat(node_position['left'])

	var top = parseFloat(node_position['top'])

	var rect_x = parseFloat(rect_node.attr("x"))

	var rect_y = parseFloat(rect_node.attr("y"))

	var rect_width = parseFloat(rect_node.attr("width"))

	var rect_height = parseFloat(rect_node.attr("height"))

	var shift_x = 0;

	var shift_y = 0;

	if (node_position != undefined) {
		// assumes that the rect inside the node, have the same center position
		//this means that the rectangle relative position to the center node is: -half/rectangle width

		absolute_position_x = left + rect_x
		absolute_position_y = top + rect_y
		if (absolute_position_x < min_x) {
			//make it start at the edge of the node instead of it's center,
			//like this it is shifted inside the svg but the parent node hidden on popup
			shift_x = Math.abs(absolute_position_x)

		} else if (absolute_position_x + rect_width > max_x) {

			shift_x = max_x - (absolute_position_x + rect_width) - 10

		}

		if (absolute_position_y + rect_height > max_y) {

			shift_y = max_y - (absolute_position_y + rect_height)

		}
		else if (absolute_position_y < min_y) {

			shift_y = Math.abs(min_y - absolute_position_y)

		}

	}

	shift_elements([shift_x, shift_y],class_name)
}

 function shift_elements(shift, class_name){
  	$("." + class_name).each(function() {
  		new_x = parseFloat($("#" + this.id).attr('x')) + shift[0]
  		new_y = parseFloat($("#" + this.id).attr('y')) + shift[1]

  		$("#" + this.id).attr({"x": new_x , "y": new_y});
  	});
 }


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE259_Hard_Coded_Password__w32_wchar_t_52c.c
Label Definition File: CWE259_Hard_Coded_Password__w32.label.xml
Template File: sources-sink-52c.tmpl.c
*/
/*
 * @description
 * CWE: 259 Use of Hard-coded Password
 * BadSource:  Use a hardcoded password
 * GoodSource: Read the password from the console
 * Sink:
 *    BadSink : Authenticate the user using LogonUserW()
 * Flow Variant: 52 Data flow: data passed as an argument from one function to another to another in three different source files
 *
 * */

#include "std_testcase.h"

#include <wchar.h>

#define PASSWORD L"ABCD1234!"

#include <windows.h>
#pragma comment(lib, "advapi32.lib")

/* all the sinks are the same, we just want to know where the hit originated if a tool flags one */

#ifndef OMITBAD

void CWE259_Hard_Coded_Password__w32_wchar_t_52c_badSink(wchar_t * password)
{
    {
        HANDLE pHandle;
        wchar_t * username = L"User";
        wchar_t * domain = L"Domain";
        /* POTENTIAL FLAW: Attempt to login user with password from the source (which may be hardcoded) */
        if (LogonUserW(
                    username,
                    domain,
                    password,
                    LOGON32_LOGON_NETWORK,
                    LOGON32_PROVIDER_DEFAULT,
                    &pHandle) != 0)
        {
            printLine("User logged in successfully.");
            CloseHandle(pHandle);
        }
        else
        {
            printLine("Unable to login.");
        }
    }
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodG2B uses the GoodSource with the BadSink */
void CWE259_Hard_Coded_Password__w32_wchar_t_52c_goodG2BSink(wchar_t * password)
{
    {
        HANDLE pHandle;
        wchar_t * username = L"User";
        wchar_t * domain = L"Domain";
        /* POTENTIAL FLAW: Attempt to login user with password from the source (which may be hardcoded) */
        if (LogonUserW(
                    username,
                    domain,
                    password,
                    LOGON32_LOGON_NETWORK,
                    LOGON32_PROVIDER_DEFAULT,
                    &pHandle) != 0)
        {
            printLine("User logged in successfully.");
            CloseHandle(pHandle);
        }
        else
        {
            printLine("Unable to login.");
        }
    }
}

#endif /* OMITGOOD */


text:
class Other::Outlet
  include Other::Abstract
  include Mongoid::Timestamps

  field :bank_id, type: String #银行
  field :region_code, type: String #地区
  field :outlet_type, type: String #类型,ATM or 柜台
  field :name, type: String # 名称
  field :address, type: String #地址
  field :phone_number, type: String #电话
  field :working_time, type: String #营业时间
  field :atm_function, type: String #ATM的功能
  field :map_url, type: String #地图url
  field :url, type: String #抓取的url
  field :state, type: Integer #数据状态  '0,ok  100,待更新  99,抓取错误'

  belongs_to :bank, :class_name => "Other::Bank"
  belongs_to :region, :class_name => "Other::Region"

  scope :rows, lambda { where(:state => 0) }
  scope :atms, lambda { rows.where(:outlet_type => 'atm') }
  scope :counters, lambda { rows.where(:outlet_type => 'out') }
  scope :wrongs, lambda { where(address: /\.\.\.$/) }

  class << self

  end
end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Creative - Start Bootstrap Theme</title>

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

    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>

    <link href="vendor/magnific-popup/magnific-popup.css" rel="stylesheet">

    <link href="css/creative.min.css" rel="stylesheet">

                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation Menu
                </button>
                Start Bootstrap

                        About

                        Services

                        Portfolio

                        Contact

Ship anything anywhere!

Start Bootstrap can help you build better websites using the Bootstrap CSS framework! Just download your template and start going, no strings attached!

                Find Out More

We've got what you need!

Start Bootstrap has everything you need to get your new website up and running in no time! All of the templates and themes on Start Bootstrap are open source, free to download, and easy to use. No strings attached!

                    Get Started!

At Your Service

Sturdy Templates

Our templates are updated regularly so they don't break.

Ready to Ship

You can use this theme as is, or you can make changes!

Up to Date

We update dependencies to keep things fresh.

Made with Love

You have to make your websites with love these days!

                                    Category

                                    Project Name

                                    Category

                                    Project Name

                                    Category

                                    Project Name

                                    Category

                                    Project Name

                                    Category

                                    Project Name

                                    Category

                                    Project Name

Free Download at Start Bootstrap!

                Download Now!

Let's Get In Touch!

Ready to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible!

123-456-6789

feedback@startbootstrap.com