Handler for SMS status reports
963224
def _handleSmsStatusReport(self, notificationLine):
        
        self.log.debug('SMS status report received')
        cdsiMatch = self.CDSI_REGEX.match(notificationLine)
        if cdsiMatch:
            msgMemory = cdsiMatch.group(1)
            msgIndex = cdsiMatch.group(2)
            report = self.readStoredSms(msgIndex, msgMemory)
            self.deleteStoredSms(msgIndex)
            # Update sent SMS status if possible            
            if report.reference in self.sentSms:                
                self.sentSms[report.reference].report = report
            if self._smsStatusReportEvent:                
                # A sendSms() call is waiting for this response - notify waiting thread
                self._smsStatusReportEvent.set()
            else:
                # Nothing is waiting for this report directly - use callback
                self.smsStatusReportCallback(report)
1242916
def log_status (self, checked, in_progress, queue, duration, num_urls):
        """"""
        msg = _n("%2d thread active", "%2d threads active", in_progress) % \
          in_progress
        self.write(u"%s, " % msg)
        msg = _n("%5d link queued", "%5d links queued", queue) % queue
        self.write(u"%s, " % msg)
        msg = _n("%4d link", "%4d links", checked) % checked
        self.write(u"%s" % msg)
        msg = _n("%3d URL", "%3d URLs", num_urls) % num_urls
        self.write(u" in %s checked, " % msg)
        msg = _("runtime %s") % strformat.strduration_long(duration)
        self.writeln(msg)
        self.flush()
609212
public function deleteSMS($sms_id)
	{
		$data = array('id'=>$sms_id);
		$result = $this->execute('delete', $data);
		if(count(@$result['errors']))
			$this->_errors = $result['errors'];
		return @$result['status'];		
	}
336876
def _handle_status(self, msg):
        
        state = msg['content'].get('execution_state', '')
        msg_type = msg['parent_header'].get('msg_type', '')
        if state == 'starting':
            # This is needed to show the time a kernel
            # has been alive in each console.
            self.ipyclient.t0 = time.monotonic()
            self.ipyclient.timer.timeout.connect(self.ipyclient.show_time)
            self.ipyclient.timer.start(1000)

            # This handles restarts when the kernel dies
            # unexpectedly
            if not self._kernel_is_starting:
                self._kernel_is_starting = True
        elif state == 'idle' and msg_type == 'shutdown_request':
            # This handles restarts asked by the user
            if self.namespacebrowser is not None:
                self.set_namespace_view_settings()
                self.refresh_namespacebrowser()
            self.ipyclient.t0 = time.monotonic()
        else:
            super(NamepaceBrowserWidget, self)._handle_status(msg)
385553
def status(sec):
    
    if _meta_.prg_bar in ["on", "ON"]:
        syms = ["|", "/", "-", "\\"]
        for sym in syms:
            sys.stdout.write("\b{0}{1}{2}".format(_meta_.color["GREY"], sym,
                                                  _meta_.color["ENDC"]))
            sys.stdout.flush()
            time.sleep(float(sec))
1048824
def status_log(func, message, *args, **kwargs):
    """"""

    click.echo(message)
    log = func(*args, **kwargs)

    if log:
        out = []

        for line in log.split('\n'):
            if not line.startswith('#'):
                out.append(line)
        click.echo(black('\n'.join(out)))
641090
function NexmoErrorStatus(response) {
  MessagingServiceStatus.call(this, 'nexmo');

  // There was an error when attempting to send message
  this.state.message = response.messages[0].status + ': ' + response.messages[0]['error-text'];

  // See https://docs.nexmo.com/index.php/sms-api/send-message#response_code for details
  var statusCode = parseInt(response.messages[0].status);
  if (statusCode == 1) this.state.code = this.StatusCodes.LIMIT_EXCEEDED;
  else if (statusCode == 2) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 3) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 4) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 5) this.state.code = this.StatusCodes.SERVICE_DOWN;
  else if (statusCode == 6) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 7) this.state.code = this.StatusCodes.UNAUTHORIZED;
  else if (statusCode == 8) this.state.code = this.StatusCodes.UNAUTHORIZED;
  else if (statusCode == 9) this.state.code = this.StatusCodes.LIMIT_EXCEEDED;
  else if (statusCode == 11) this.state.code = this.StatusCodes.UNAUTHORIZED;
  else if (statusCode == 12) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 13) this.state.code = this.StatusCodes.SERVICE_DOWN;
  else if (statusCode == 14) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 15) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 16) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 19) this.state.code = this.StatusCodes.UNAUTHORIZED;
  else if (statusCode == 20) this.state.code = this.StatusCodes.DATA_REJECTED;
  else if (statusCode == 29) this.state.code = this.StatusCodes.UNAUTHORIZED;
  else this.state.code = this.StatusCodes.DEFAULT;
}
663376
protected void updatePageStatus() {
		if (this.status.isOK()) {
			setMessage(null, IMessageProvider.NONE);
		} else {
			switch (this.status.getSeverity()) {
			case IStatus.ERROR:
				setMessage(this.status.getMessage(), IMessageProvider.ERROR);
				break;
			case IStatus.INFO:
				setMessage(this.status.getMessage(), IMessageProvider.INFORMATION);
				break;
			case IStatus.WARNING:
				setMessage(this.status.getMessage(), IMessageProvider.WARNING);
				break;
			default:
				break;
			}
		}
		setPageComplete(this.status.isOK() || this.status.getSeverity() == IStatus.INFO);
	}
467035
function CheckDevAck() {
        self.Debug (3,"Waiting Acknowledgment Response %d/%d", self.retry, smsc.opts.retry);
        smsc.GetFrom (CheckDevAckCB, smscmd.phone)
    }
447530
def getStatusMsg(self):
        

        if 'status' in self._response.keys():
            if (self._response['status'] is not None) and ('msg' in self._response['status'].keys()) and (self._response['status']['msg'] is not None):
                return self._response['status']['msg']
            else:
                return ''
1368831
async def handler(event):
    """"""
    await asyncio.wait([
        event.delete(),
        event.respond(OFFTOPIC[event.chat_id], reply_to=event.reply_to_msg_id)
    ])
177553
def status(self, message, *args, **kwargs):
    """"""
    if self.isEnabledFor(GNUPG_STATUS_LEVEL):
        self._log(GNUPG_STATUS_LEVEL, message, args, **kwargs)
399119
function handler(notification) {
        debug('summoner received a mention notification!');
        return notification.getUser()
            .then((user) => {
                debug(`summoner responding to summons by ${user.name}`);
                const index = Math.floor(Math.random() * messages.length);
                const message = messages[index].replace(/%(\w+)%/g, (_, key) => {
                    let value = user[key];
                    if (key === 'name' && !value) {
                        value = user.username;
                    }
                    value = value || `%${key}%`;
                    if (typeof value !== 'string') {
                        value = `%${key}%`;
                    }
                    return value;
                });
                debug(`summoner replying with: ${message}`);
                return forum.Post.reply(notification.topicId, notification.postId, message);
            }).catch((err) => {
                forum.emit('error', err);
                return Promise.reject(err);
            });
    }
1322957
def _report_status(self):
        
        for listener in self._status_listeners:
            try:
                listener.new_cast_status(self.status)
            except Exception:  # pylint: disable=broad-except
                self.logger.exception(
                    "Exception thrown when calling cast status listener")
922417
async def message_handler(self, event):
        """"""

        # Note that message_handler is called when a Telegram update occurs
        # and an event is created. Telegram may not always send information
        # about the ``.sender`` or the ``.chat``, so if you *really* want it
        # you should use ``get_chat()`` and ``get_sender()`` while working
        # with events. Since they are methods, you know they may make an API
        # call, which can be expensive.
        chat = await event.get_chat()
        if event.is_group:
            if event.out:
                sprint('>> sent "{}" to chat {}'.format(
                    event.text, get_display_name(chat)
                ))
            else:
                sprint('<< {} @ {} sent "{}"'.format(
                    get_display_name(await event.get_sender()),
                    get_display_name(chat),
                    event.text
                ))
        else:
            if event.out:
                sprint('>> "{}" to user {}'.format(
                    event.text, get_display_name(chat)
                ))
            else:
                sprint('<< {} sent "{}"'.format(
                    get_display_name(chat), event.text
                ))
408673
function ResponseCB (response) {
        console.log ("### Single SMS CallBack --> Status=%j", response);

        if (response.status === 0) {
            var batch = require('../sample/SmsCommand-batch');
            smscontrol.ProcessBatch (BatchCB, phonenumber, password, batch);
        }

        if (response.status < 0) {
              console.log ("Single SMS Test Fail");
              setTimeout (process.exit, 1000);
        }
    }
669974
def report_device_status(self, mode):
        
        if mode == 5:    # Request for terminal status.
            self.write_process_input(ctrl.CSI + "0n")
        elif mode == 6:  # Request for cursor position.
            x = self.cursor.x + 1
            y = self.cursor.y + 1

            # "Origin mode (DECOM) selects line numbering."
            if mo.DECOM in self.mode:
                y -= self.margins.top
            self.write_process_input(ctrl.CSI + "{0};{1}R".format(y, x))