Send pulse to kick the cash drawer
350225
def cashdraw(self, pin):
        
        if pin == 2:
            self._raw(CD_KICK_2)
        elif pin == 5:
            self._raw(CD_KICK_5)
        else:
            raise CashDrawerError()
1037764
async function sendTransaction (tx, options = {}) {
  const { waitMined, verify } = R.merge(this.Chain.defaults, options)
  // Verify transaction before broadcast
  if (this.verifyTxBeforeSend || verify) {
    const { validation, tx: txObject, txType } = await this.unpackAndVerify(tx)
    if (validation.length) {
      throw Object.assign(Error('Transaction verification error'), {
        code: 'TX_VERIFICATION_ERROR',
        errorData: { validation, tx: txObject, txType },
        txHash: tx
      })
    }
  }

  try {
    const { txHash } = await this.api.postTransaction({ tx })
    return waitMined ? { ...(await this.poll(txHash, options)), rawTx: tx } : { hash: txHash, rawTx: tx }
  } catch (e) {
    throw Object.assign(
      (new Error(e.message)),
      {
        rawTx: tx,
        verifyTx: () => this.unpackAndVerify(tx)
      }
    )
  }
}
695980
def _on_click(self):
        """"""
        if callable(self.__callback):
            self.__callback((self.bold, self.italic, self.underline, self.overstrike))
67136
def _run_interactive(self):
        
        self.term.connect()
        self._show_available_transactions()

        while True:
            trxn_type = self._user_input('\nEnter transaction to send: ')
        
            trxn = ''
            data = ''
            if trxn_type == 'e':
                trxn = Transaction('echo', self.card, self.term)
                trxn.trace()
        
            elif trxn_type == 'b':
                trxn = Transaction('balance', self.card, self.term)
                trxn.set_PIN(self._user_input('Enter PIN: '))
                trxn.trace()
        
            elif trxn_type == 'p':
                default_amount = 20000
                amount = self._user_input('Enter transaction amount ({} by default): '.format(default_amount))
                if not amount:
                    amount = default_amount

                trxn = Transaction('purchase', self.card, self.term)
                trxn.set_PIN(self._user_input('Enter PIN: '))
                trxn.set_amount(amount)
                trxn.trace()

            elif trxn_type == 'q':
                break

            else:
                print('Unknown transaction. Available transactions are:')
                self._show_available_transactions()
                continue
                
            self.term.send(trxn.get_data(), show_trace=verbosity)
            data = self.term.recv(show_trace=verbosity)
        
            IsoMessage = ISO8583(data[2:], IsoSpec1987BPC())
            IsoMessage.Print()
        
        self.term.close()
495021
def up(self, n=1, interval=0, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.k.tap_key(self.k.up_key, n, interval)
        self.delay(post_dl)
825427
def press(self):
    """"""
    self._lutron.send(Lutron.OP_EXECUTE, Keypad._CMD_TYPE, self._keypad.id,
                      self.component_number, Button._ACTION_PRESS)
674353
function onLoad() {
    if (!buttonStartStuff)       buttonStartStuff       = document.getElementById("button-start-stuff")
    if (!buttonClearOutput)      buttonClearOutput      = document.getElementById("button-clear-output")
    if (!outputElement)          outputElement          = document.getElementById("output")

    buttonStartStuff.addEventListener("click", function() {
        lastClickTime = new Date().toString()
        if (db) db.transaction(addClick)

        openTheOtherDatabase()

        if (!started) {
            buttonStartStuff.value = "stop stuff"
            startStuff()
        }
        else {
            buttonStartStuff.value = "start stuff"
            stopStuff()
        }
        started = !started
    })

    buttonClearOutput.addEventListener("click", function() {
        outputElement.innerHTML = ""
    })

    openTheDatabase()
}
1285818
function(amount) {
      for (var i = 0; i < this.series_.length; ++i)
        this.series_[i].shiftTimestampsForward(amount);
    }
1341904
public void flush() {
    if (eventLoop.inEventLoop()) {
      pending++;
      if (pending >= maxPending) {
        pending = 0;
        channel.flush();
      }
    }
    if (woken == 0 && WOKEN.compareAndSet(this, 0, 1)) {
      woken = 1;
      eventLoop.execute(wakeup);
    }
  }
550682
function sendHeartbeat() {
    _.forOwn(_this.socks, function (sock) {
      sock.write('hb');
    });
    setTimeout(sendHeartbeat, _this.heartbeatFreq);
  }
1032312
private ItemStack handleShiftClick(MalisisInventory inventory, MalisisSlot slot)
	{
		ItemStack itemStack = transferSlotOutOfInventory(inventory, slot);

		//replace what's left of the item back into the slot
		slot.setItemStack(itemStack);
		slot.onSlotChanged();
		return itemStack;
	}
347079
function(amount) {
      for (var sI = 0; sI < this.slices.length; sI++)
        this.slices[sI].start = (this.slices[sI].start + amount);
      for (var id in this.counters)
        this.counters[id].shiftTimestampsForward(amount);
    }
1296981
private void fireOnRollbackTransaction(ChannelEvent e) {
        List<EventListener> listeners = changes.getListenerList(AMQP);
        for (EventListener listener : listeners) {
            ChannelListener amqpListener = (ChannelListener)listener;
            amqpListener.onRollback(e);
        }
    }
553543
function startHeartbeats () {
    _isMaster = true
    if (_hearbeatInterval) return
    debug('starting heartbeats')
    _sendHeartbeat()
    _hearbeatInterval = setInterval(_sendHeartbeat, HEARTBEAT_INTERVAL)
  }
1070136
def _start(self):
        """"""

        # TODO : make an update method instead

        last_call = 42
        while self._focus:
            sleep(1 / 100)

            mouse = pygame.mouse.get_pos()
            last_value = self.get()
            self.value_px = mouse[0]

            # we do not need to do anything when it the same value
            if self.get() == last_value:
                continue

            if last_call + self.interval / 1000 < time():
                last_call = time()
                self.func(self.get())
185296
def OnDeactivateCard(self, card):
        """"""
        SimpleSCardAppEventObserver.OnActivateCard(self, card)
        self.feedbacktext.SetLabel('Deactivated card: ' + repr(card))
376189
def triggerHapticPulse(self, unControllerDeviceIndex, unAxisId, usDurationMicroSec):
        

        fn = self.function_table.triggerHapticPulse
        fn(unControllerDeviceIndex, unAxisId, usDurationMicroSec)