Notify user about open issues
424439
def issues_notifications(user):
    ''''''
    notifications = []

    # Only fetch required fields for notification serialization
    # Greatly improve performances and memory usage
    qs = issues_for(user).only('id', 'title', 'created', 'subject')

    # Do not dereference subject (so it's a DBRef)
    # Also improve performances and memory usage
    for issue in qs.no_dereference():
        notifications.append((issue.created, {
            'id': issue.id,
            'title': issue.title,
            'subject': {
                'id': issue.subject['_ref'].id,
                'type': issue.subject['_cls'].lower(),
            }
        }))

    return notifications
923636
function show_notification(msg, type, reload_page, timeout){
    // defaults to false
    reload_page = reload_page || false;
    timeout = timeout || 3000;

    $('#notify_message').removeClass();
    $('#notify_message').addClass('notify_message-' + type);
    $('#notify_message').html(msg);
    $('#notify_message').slideDown(600).delay(timeout).slideUp(600, function(){
        if(reload_page === true){
            location.reload();
        }
    });
}
565250
function notifyDevtools(msg) {
    Object.keys(ports).forEach(function(portId_) {
        ports[portId_].postMessage(msg);
    });
}
236282
def toast(self, text):
        '''
        '''
        if self.notify:
            self.notify.update(Config.APPNAME, text, Config.NAME)
            self.notify.show()
1239627
public void onOpened() {
        if (LOG.isDebugEnabled())
            LOG.debug("onOpened()");

        ConnectionState event = null;
        synchronized (this) {
            if (this.state == ConnectionState.OPEN) {
                // already opened
                return;
            }

            if (this.state != ConnectionState.CONNECTED) {
                LOG.debug("Unable to open, not in CONNECTED state: {}", this.state);
                return;
            }

            this.state = ConnectionState.OPEN;
            this.inputAvailable = true;
            this.outputAvailable = true;
            event = this.state;
        }
        notifyStateListeners(event);
    }
1343195
private void notifyWidgetsOfOpen() {

        for (Map.Entry<String, I_CmsFormField> fieldEntry : m_form.getFields().entrySet()) {
            fieldEntry.getValue().getWidget().setAutoHideParent(this);
        }
    }
1338241
function checkUpdate () {
  var pkg = require("./package.json");
  require("update-notifier")({
    packageName:    pkg.name,
    packageVersion: pkg.version
  }).notify();
}
619943
function notify () {
  debug('run checker')
  debug(`ELINT_DISABLE_UPDATE_NOTIFIER: ${process.env.ELINT_DISABLE_UPDATE_NOTIFIER}`)

  if (process.env.ELINT_DISABLE_UPDATE_NOTIFIER === 'true') {
    return Promise.resolve(null)
  }

  return checker().then(result => {
    if (!result || !result.name || !result.latest || !result.current) {
      return null
    }

    conf.update(result.name)

    return report(result)
  })
}
1060700
def _notify(self, title, message, expected_action=None):
        
        if self.editor is None:
            return
        inital_value = self.editor.save_on_focus_out
        self.editor.save_on_focus_out = False
        self._flg_notify = True
        dlg_type = (QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
        expected_action = (
            lambda *x: None) if not expected_action else expected_action
        if (self._auto_reload or QtWidgets.QMessageBox.question(
                self.editor, title, message, dlg_type,
                QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.Yes):
            expected_action(self.editor.file.path)
        self._update_mtime()
        self.editor.save_on_focus_out = inital_value
152401
def on_open(self, ws):
        """"""
        def keep_alive(interval):
            while True:
                time.sleep(interval)
                self.ping()

        start_new_thread(keep_alive, (self.keep_alive_interval, ))
1093173
function openIssue(e) {
  require('../lib/node.js')
    .github('pauldijou/open-issue')
    .title('Unexpected error')
    .labels('bug', 'fatal')
    .append('The following error occured:')
    .appendCode(parseError(e))
    .append('You can also add custom infos if necessary...')
    .open();
}
337443
def alert(self, msg):
        """"""
        if self.event_callback is not None:
            try:
                self.event_callback(msg)
            except Exception as exception:  # pylint: disable=broad-except
                _LOGGER.exception(exception)

        if self.persistence:
            self.persistence.need_save = True
825692
function () {

                // Restart button click handler
                var restartBtnClicked = function () {
                    HealthLogger.sendAnalyticsData(
                        autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_RESTART,
                        "autoUpdate",
                        "installNotification",
                        "installNow ",
                        "click"
                    );
                    detachUpdateBarBtnHandlers();
                    initiateUpdateProcess(statusObj.installerPath, statusObj.logFilePath, statusObj.installStatusFilePath);
                };

                // Later button click handler
                var laterBtnClicked = function () {
                    HealthLogger.sendAnalyticsData(
                        autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_COMPLETE_USER_CLICK_LATER,
                        "autoUpdate",
                        "installNotification",
                        "cancel",
                        "click"
                    );
                    detachUpdateBarBtnHandlers();
                    setUpdateStateInJSON('updateInitiatedInPrevSession', false);
                };

                //attaching UpdateBar handlers
                UpdateInfoBar.on(UpdateInfoBar.RESTART_BTN_CLICKED, restartBtnClicked);
                UpdateInfoBar.on(UpdateInfoBar.LATER_BTN_CLICKED, laterBtnClicked);

                UpdateInfoBar.showUpdateBar({
                    title: Strings.DOWNLOAD_COMPLETE,
                    description: Strings.CLICK_RESTART_TO_UPDATE,
                    needButtons: true
                });

                setUpdateStateInJSON("autoUpdateInProgress", false);
                HealthLogger.sendAnalyticsData(
                    autoUpdateEventNames.AUTOUPDATE_DOWNLOADCOMPLETE_UPDATE_BAR_RENDERED,
                    "autoUpdate",
                    "installNotification",
                    "render",
                    ""
                );
            }
149386
private void requestNotification() {
        AndPermission.with(this)
            .notification()
            .permission()
            .rationale(new NotifyRationale())
            .onGranted(new Action<Void>() {
                @Override
                public void onAction(Void data) {
                    toast(R.string.successfully);
                }
            })
            .onDenied(new Action<Void>() {
                @Override
                public void onAction(Void data) {
                    toast(R.string.failure);
                }
            })
            .start();
    }
771500
def _fix_alert_poster(self, state, shard):
        '''
        
        '''
        recp = recipient.Broadcast(AlertPoster.protocol_id, shard)
        state.alerter.update_recipients(recp)
648222
def is_notifying(cls, user_or_email, instance):
        """"""
        return super(InstanceEvent, cls).is_notifying(user_or_email,
                                                      object_id=instance.pk)
518802
public void onReceiveStatus(CmsWorkflowResponse brokenResources) {

        if (brokenResources.isSuccess()) {
            succeed();
            hide();
            CmsNotification.get().send(
                CmsNotification.Type.NORMAL,
                org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_DONE_0));

        } else {
            m_failureMessage = brokenResources.getMessage();
            m_state = State.failure;
            m_brokenLinksPanel.setEntries(brokenResources.getResources(), brokenResources.getAvailableActions());
            setPanel(PANEL_BROKEN_LINKS);
        }
    }