Must call when epoll is available
501465
private static Class<? extends ServerChannel> epollServerChannelType() {
    try {
      Class<? extends ServerChannel> serverSocketChannel =
          Class
              .forName("io.netty.channel.epoll.EpollServerSocketChannel")
              .asSubclass(ServerChannel.class);
      return serverSocketChannel;
    } catch (ClassNotFoundException e) {
      throw new RuntimeException("Cannot load EpollServerSocketChannel", e);
    }
  }
608716
function online() {
    repl._flushing = true;

    if (timer) {
      clearTimeout(timer);
    }

    timer = setTimeout(flushHistory, kDebounceHistoryMS);
  }
986617
function (testDone) {
        $assertEveryCalledOnce ($async (function (mkay1, mkay2) { var testSecondCall = false
            var callMeLater = function () {
                if (testSecondCall) {
                    mkay2 ()
                    testDone () }
                else {
                    mkay1 ()
                    testSecondCall = true
                    callMeLater.postpone () } } // should be postponed again
            callMeLater.postpone ()
            callMeLater.postpone () })) }
960903
def from_epoll_events(cls, epoll_events):
        
        self = cls()
        if epoll_events & select.EPOLLIN:
            self |= EVENT_READ
        if epoll_events & select.EPOLLOUT:
            self |= EVENT_WRITE
        # Treat EPOLLHUP specially, as both 'read and write ready' so that on
        # the outside this can be interpreted as EOF
        if epoll_events & select.EPOLLHUP:
            self |= EVENT_READ | EVENT_WRITE
        return self
348899
private void notifyAdditionalOnScrollStateChangedListener(RecyclerView recyclerView, int newState) {
        if (mAdditionalOnScrollListener != null) {
            mAdditionalOnScrollListener.onScrollStateChanged(recyclerView, newState);
        }
    }
1083687
private void onFinish() {
        if (planRequired && state.getTestSet().getPlan() == null) {
            throw new ParserException("Missing TAP Plan.");
        }
        parseDiagnostics();

        while (!states.isEmpty() && state.getIndentationLevel() > baseIndentation) {
            state = states.pop();
        }
    }
387389
def kpl_on(self, address, group):
        """"""
        addr = Address(address)
        device = self.plm.devices[addr.id]
        device.states[group].on()
449456
public boolean makeCalls(long now) {
    if (now < nextDispatchTime)
      return true;

    // we make calls in a loop until all pending calls are drained
    // if any call hits an error - we stop
    while (!pendingCalls.isEmpty()) {

      TBase call = pendingCalls.get(0);
      try {
        // initialize the client/transport unless already done
        init();

        // make one thrift call
        dispatchCall(call);

        // if we made a call successfully, reset any retry state
        nextDispatchTime = -1;
        numRetries = 0;
        currentRetryInterval = retryIntervalStart;

        pendingCalls.remove(0);

      } catch (TException e) {
        boolean logged = false;
        if (e instanceof TTransportException) {
          TTransportException tte = (TTransportException) e;
          Throwable cause =  tte.getCause();
          if (cause != null && cause instanceof SocketTimeoutException) {
            // Got a socket timeout while waiting for a response from the
            // client. The session is stuck.
            logged = true;
            LOG.error("Call to session: " + handle + " for call: " +
              call.getClass().getName() + ", numRetry: " + numRetries +
              "(retryCountMax=" + retryCountMax + ")" +
              " failed with SocketTimeoutException, will retry it");
          }
        }
        if (!logged) {
          LOG.warn("Call to session: " + handle + " for call: " +
            call.getClass().getName() + ", numRetry: " + numRetries +
            "(retryCountMax=" + retryCountMax + ")" +
            " failed with TException", e);
        }

        // close the transport/client on any exception
        // will be reopened on next try
        close();

        if (numRetries > retryCountMax)
          return false;

        numRetries++;
        nextDispatchTime = now + currentRetryInterval;
        currentRetryInterval *= retryIntervalFactor;

        // no more calls for now
        return true;
      }
    }

    close();

    return true;
  }
1160358
@ObjectiveCName("toggleCallMuteWithCallId:")
    public void toggleCallMute(long callId) {
        if (modules.getCallsModule().getCall(callId).getIsAudioEnabled().get()) {
            modules.getCallsModule().muteCall(callId);
        } else {
            modules.getCallsModule().unmuteCall(callId);
        }
    }
275152
function select(start, end, allDay) {
		currentView.select(start, end, allDay===undefined ? true : allDay);
	}
696712
function(inXhr) {
		if (inXhr.onload) {
			inXhr.onload = null;
		}
		if (inXhr.onreadystatechange) {
			inXhr.onreadystatechange = null;
		}
		if (inXhr.abort) {
			inXhr.abort();
		}
	}
1006669
private void notifyAdditionalOnScrollStateChangedListener(AbsListView view, int scrollState) {
        if (mAdditionalOnScrollListener != null) {
            mAdditionalOnScrollListener.onScrollStateChanged(view, scrollState);
        }
    }
561816
private function _call()
    {

        // Time this
        $t = new Timer('apcaccess Extension');

        // Deal with calling it
        try {
            $result = $this->_CallExt->exec('apcaccess');
        } catch (Exception $e) {
            // messed up somehow
            Errors::add('apcaccess Extension', $e->getMessage());
            $this->_res = false;

            // Don't bother going any further
            return false;
        }

        // Store them here
        $this->_res = [];

        // Get name
        if (preg_match('/^UPSNAME\s+:\s+(.+)$/m', $result, $m)) {
            $this->_res['name'] = $m[1];
        }

        // Get model
        if (preg_match('/^MODEL\s+:\s+(.+)$/m', $result, $m)) {
            $this->_res['model'] = $m[1];
        }

        // Get battery voltage
        if (preg_match('/^BATTV\s+:\s+(\d+\.\d+)/m', $result, $m)) {
            $this->_res['volts'] = $m[1];
        }

        // Get charge percentage, and get it cool
        if (preg_match('/^BCHARGE\s+:\s+(\d+(?:\.\d+)?)/m', $result, $m)) {
            $charge = (int) $m[1];
            $this->_res['charge'] = '
					<div class="bar_chart">
						<div class="bar_inner" style="width: '.(int) $charge.'%;">
							<div class="bar_text">
								'.($charge ? $charge.'%' : '?').'
							</div>
						</div>
					</div>
			';
        }

        // Get time remaning
        if (preg_match('/^TIMELEFT\s+:\s+([\d\.]+)/m', $result, $m)) {
            $this->_res['time_left'] = Common::secondsConvert($m[1] * 60);
        }

        // Get status
        if (preg_match('/^STATUS\s+:\s+([A-Z]+)/m', $result, $m)) {
            $this->_res['status'] = $m[1] == 'ONBATT' ? 'On Battery' : ucfirst(strtolower($m[1]));
        }

        // Load percentage looking cool
        if (preg_match('/^LOADPCT\s+:\s+(\d+\.\d+)/m', $result, $m)) {
            $load = (int) $m[1];
            $this->_res['load'] = '
					<div class="bar_chart">
						<div class="bar_inner" style="width: '.(int) $load.'%;">
							<div class="bar_text">
								'.($load ? $load.'%' : '?').'
							</div>
						</div>
					</div>
			';
        }

        // Attempt getting wattage
        if (isset($load) && preg_match('/^NOMPOWER\s+:\s+(\d+)/m', $result, $m)) {
            $watts = (int) $m['1'];
            $this->_res['watts_used'] = $load * round($watts / 100);
        } else {
            $this->_res['watts_used'] = false;
        }

        // Apparent success
        return true;
    }
1270166
function getCall(channel, path, options) {
  var deadline;
  var host;
  var parent;
  var propagate_flags;
  var credentials;
  if (options) {
    deadline = options.deadline;
    host = options.host;
    parent = options.parent ? options.parent.call : undefined;
    propagate_flags = options.propagate_flags;
    credentials = options.credentials;
  }
  if (deadline === undefined) {
    deadline = Infinity;
  }
  var call = channel.createCall(path, deadline, host,
                                parent, propagate_flags);
  if (credentials) {
    call.setCredentials(credentials);
  }
  return call;
}
640951
function onAnchorUpdate(newX, newY) {
         // since the callback is called before setting the new value
         // manually update the anchor point (required for updateBoundsPos)
         this.anchorPoint.setMuted(newX, newY); // then call updateBouds

         this.updateBoundsPos(this.pos.x, this.pos.y);
       }
461007
void modify(AbstractEpollChannel ch) throws IOException {
        assert inEventLoop();
        Native.epollCtlMod(epollFd.intValue(), ch.socket.intValue(), ch.flags);
    }
429286
private boolean allowedToPoll(final String bucket) {
        Long bucketLastPollTimestamp = lastPollTimestamps.get(bucket);
        return bucketLastPollTimestamp == null || ((System.nanoTime() - bucketLastPollTimestamp) >= pollFloorNs);
    }