Function OnTimeoutPropose(height, round) : if height=hp ∧ round=roundp ∧ stepp=propose then broadcast <PREVOTE,hp,roundp,nil> stepp ← prevote
351828
function OnTimeoutPropose(){
    console.log("byllllogg timeout broadcastPrevote OnTimeoutPropose1:" + h_p + ":" + p_p + ":" + h_propose_timeout + ":" + p_propose_timeout + ":" + step_p);
    if(h_propose_timeout === h_p && p_propose_timeout === p_p && step_p === constants.BYZANTINE_PROPOSE){
        pushByzantinePrevote(h_propose_timeout, p_propose_timeout, null, address_p, 0);
        console.log("byllllogg timeout broadcastPrevote OnTimeoutPropose2:" + h_p + ":" + p_p + ":" + h_propose_timeout + ":" + p_propose_timeout + ": null");
        broadcastPrevote(h_propose_timeout, p_propose_timeout, null);
        step_p = constants.BYZANTINE_PREVOTE;
    }
    h_propose_timeout = -1;
    p_propose_timeout = -1;
    
    handleByzantine();
    
    // if proposer down
    // if(!assocByzantinePhase[h_p].phase[p_p].proposal || 
    //     typeof assocByzantinePhase[h_p].phase[p_p].proposal === 'undefined' || 
    //     Object.keys(assocByzantinePhase[h_p].phase[p_p].proposal).length === 0 ||
    //     !assocByzantinePhase[h_p].phase[p_p].proposal.idv ||
    //     typeof assocByzantinePhase[h_p].phase[p_p].proposal.idv === 'undefined'){
    //         console.log("byllllogg timeout startPhase OnTimeoutPropose:" + h_p + ":" + p_p + ":" + h_precommit_timeout + ":" + p_precommit_timeout);
    //     h_prevote_timeout   = -1;
    //     p_prevote_timeout   = -1;
    //     h_precommit_timeout = -1;
    //     p_precommit_timeout = -1; 
    //     startPhase(h_p, p_p+1);        
    // }
}
169453
function debounce(func, wait, immediate) {
    var timeout, args, context, timestamp, result;

    var later = function() {
      var last = +new Date - timestamp;

      if (last < wait && last >= 0) {
        timeout = setTimeout(later, wait - last);
      } else {
        timeout = null;
        if (!immediate) {
          result = func.apply(context, args);
          if (!timeout) context = args = null;
        }
      }
    };

    return function() {
      context = this;
      args = arguments;
      timestamp = +new Date;
      var callNow = immediate && !timeout;
      if (!timeout) timeout = setTimeout(later, wait);
      if (callNow) {
        result = func.apply(context, args);
        context = args = null;
      }

      return result;
    };
  }
965262
function Sample(cpu, thread, title, start, leafStackFrame,
                  opt_weight, opt_args) {
    tr.model.TimedEvent.call(this, start);

    this.title = title;
    this.cpu = cpu;
    this.thread = thread;
    this.leafStackFrame = leafStackFrame;
    this.weight = opt_weight;
    this.args = opt_args || {};
  }
642589
function(time, x, y) {
		if(time - _gestureCheckSpeedTime > 50) {
			var o = _posPoints.length > 2 ? _posPoints.shift() : {};
			o.x = x;
			o.y = y; 
			_posPoints.push(o);
			_gestureCheckSpeedTime = time;
		}
	}
863872
function(ev,args) {
      var target = Event.getTarget(ev);
      var column = this.datatable.getColumn(target);      
      var rowIndex = this.datatable.getTrIndex(target);
      if (column.key == 'delete') {
         if (confirm(msgs.confirmDeletion)) {
            var record = this.datatable.getRecord(target);
            if(this.editingNewRecord) {
               this.editingNewRecord = false;
            }
            else {
               this.itemRemovedEvt.fire( record );
            }
            this.datatable.deleteRow(target);
            this.hideSubform();
         }
      }
      else if(column.key == 'modify') {
         this.onClickModify(rowIndex);
      } 
      else {				
      	this.onCellClick(ev,rowIndex);
      }
   }
94388
def onresize(self, emitter, width, height):
        
        super(MyApp, self).onresize(emitter, width, height)
610815
function OnTimeoutPrecommit(){
    console.log("byllllogg timeout startPhase OnTimeoutPrecommit 1:" + h_p + ":" + p_p + ":" + h_precommit_timeout + ":" + p_precommit_timeout);
    if(h_precommit_timeout === h_p && p_precommit_timeout === p_p){
        console.log("byllllogg timeout startPhase OnTimeoutPrecommit 2:" + h_p + ":" + p_p + ":" + h_precommit_timeout + ":" + p_precommit_timeout);
        startPhase(h_precommit_timeout, p_precommit_timeout+1);
    }
    h_precommit_timeout = -1;
    p_precommit_timeout = -1; 
}
1348891
function (showSignal, callback) {
        var timer = setTimeout(function () { callback(false); }, 30 * 1000);

        //TODO: that.stopListeningFor("RaiseYourHandReturn", listenHandler);
        //TODO:  var listenHandler = this.listenFor("RaiseYourHandReturn",  ... );

        //logger.log("RaiseYourHand: asking core to signal? " + showSignal);
        var token = this.sendMessage("RaiseYourHand", { _writeCoapUri: messages.raiseYourHandUrlGenerator(showSignal) }, null);
        this.listenFor("RaiseYourHandReturn", null, token, function () {
            clearTimeout(timer);
            callback(true);
        }, true);

    }
1090333
function(element, args) {
        if(!args)
            args = {};
        var refreshDelay = args.refreshDelay ? args.refreshDelay : 500;
        var ret = new $.Deferred();
        var elmHeight;

        if(element)
            elmHeight = element.height();
        if(elmHeight && elmHeight > 0) {
            ret.resolve(elmHeight);
        } else {
            setTimeout(function () {
                resolveElementHeight(element, args).then(function(heightData) {
                    ret.resolve(heightData);
                });
            }, refreshDelay);
        }

        return ret;
    }
1141353
function (width, height) {
            if (width !== this.backBufferCanvas.width || height !== this.backBufferCanvas.height) {
                this.canvas.width = this.backBufferCanvas.width = width;
                this.canvas.height = this.backBufferCanvas.height = height;
                this.currentScissor[0] = 0;
                this.currentScissor[1] = 0;
                this.currentScissor[2] = width;
                this.currentScissor[3] = height;
                // publish the corresponding event
                me.event.publish(me.event.CANVAS_ONRESIZE, [ width, height ]);
            }
            this.updateBounds();
        }
217485
function doubletap(position, element, done) {
                touchTypes.tap(position, element, function() {
                    setTimeout(function() {
                        touchTypes.tap(position, element, done);
                    }, 30);
                });
            }
301887
public void onWidthChange(String width) {

        int value = CmsClientStringUtil.parseInt(width);
        if ((m_croppingParam.getTargetWidth() == value) || (value == 0)) {
            // the value has not changed, ignore'0'
            return;
        }
        m_croppingParam.setTargetWidth(value);
        if (m_ratioLocked) {
            m_croppingParam.setTargetHeight((value * m_originalHeight) / m_originalWidth);
            m_formatForm.setHeightInput(m_croppingParam.getTargetHeight());
        }
        // in case the width and height parameter don't match the current format any longer, switch to user defined format
        if ((!m_currentFormat.isWidthEditable() || (m_ratioLocked && !m_currentFormat.isHeightEditable()))
            && hasUserFormatRestriction()) {
            m_formatForm.setFormatSelectValue(m_userFormatKey);
        } else {
            fireValueChangedEvent();
        }
    }
449479
function startFPSMonitor() {
        checkInit();
        var data = new Data();
        var w = new MonitorWidget("FPS", "", 2 /* HideMax */ | 1 /* HideMin */ | 4 /* HideMean */ | 32 /* RoundValues */);
        container.appendChild(w.element);
        var samples = [];
        var last = 0;
        function update(now) {
            var elapsed = (now - (last === 0 ? now : last)) / 1000;
            var fps = 1 / elapsed;
            if (fps !== Infinity) {
                if (samples.length === 64) {
                    samples.shift();
                }
                samples.push(fps);
                var sum = 0;
                for (var i = 0; i < samples.length; i++) {
                    sum += samples[i];
                }
                var mean = sum / samples.length;
                data.addSample(mean);
                w.addResult(data.calc());
            }
            last = now;
            requestAnimationFrame(update);
        }
        requestAnimationFrame(update);
    }
453639
private Timepoint roundToValidTime(Timepoint newSelection, int currentItemShowing) {
        switch(currentItemShowing) {
            case HOUR_INDEX:
                return mController.roundToNearest(newSelection, null);
            case MINUTE_INDEX:
                return mController.roundToNearest(newSelection, Timepoint.TYPE.HOUR);
            default:
                return mController.roundToNearest(newSelection, Timepoint.TYPE.MINUTE);
        }
    }
90695
function onResize() {
	if ( this.stdout.columns && this.stdout.rows ) {
		this.width = this.stdout.columns ;
		this.height = this.stdout.rows ;
	}

	this.emit( 'resize' , this.width , this.height ) ;
}
304535
function (width, height) {
            var cfg = this._cfg;
            cfg.width = width;
            cfg.height = height;
        }
325554
function translateHeight (value, time, dom) {
  util.css(dom, {
    height: value,
    transition: `height ${time}s`
  })
}