Notification icons are not being displayed on the status bar

You can see that I have notifications in WhatsApp and Messages app but the notifications icons are not visible on the status bar. I have searched through the settings but couldn’t find a way.

Device = Oppo F9
Version = 8.1 Oreo

picture

Count the status messages in a column VBA

Can someone review my code and provide feedback. For context in column A will be a status message of “OK” or “NOK” and this little function just counts the number of times this appear so I can update a label in another procedure. Not too sure if this is the most efficient way of doing this because looping will create delay going row by row if the data set is very large.

Function UploadStatus(ByRef WS As Worksheet, ByVal StartRow As Long, ByVal EndRow As Long, Optional ByVal strMsg As String) As String
Dim OK As Long
Dim NOK As Long
Dim i As Long
Dim uploadMsg As String
 
If StartRow = 0 And EndRow = 0 Then Exit Function
With WS
    For i = StartRow To EndRow
        If .Range("A" & i).value = "OK" Then
            OK = OK + 1
        Else
            If .Range("A" & i).value <> vbNullString Then
                NOK = NOK + 1
            End If
        End If
    Next i
End With
 
If OK < 2 Then
    uploadMsg = OK & " OK row, "
Else
    uploadMsg = OK & " OK rows, "
End If
 
If NOK < 2 Then
    uploadMsg = uploadMsg & NOK & " NOK row"
Else
    uploadMsg = uploadMsg & NOK & " NOK rows"
End If
If strMsg <> vbNullString Then
    UploadStatus = strMsg & " " & uploadMsg
Else
    UploadStatus = uploadMsg
End If
End Function

WordPress add page under admin submenu and retaining the active status of the parent submenu page in the menu

I have added a page in the admin menu(pxmag-menu) and a submenu(pxmag-plans). There is another page(pxmag-plans-edit) set under the submenu(pxmag-plans) as the parent page.

public function __construct()
{
    require('pxMagAdminPlans.class.php');
    $this->admPlanObj= new pxMagAdminPlans();

    add_action('admin_menu', array($this, 'add_plan_admin_menu'));
}

public function add_plan_admin_menu()
{
    add_menu_page(__('Dashboard', 'textdomain'), get_bloginfo('name'), 'manage_options', 'pxmag-menu', array($this, 'pxmag_dash'), 'dashicons-welcome-view-site', 6);
        
    add_submenu_page('pxmag-menu', __('Subscription Plans', 'textdomain'), 'Plans', 'manage_options', 'pxmag-plans', array($this->admPlanObj, 'plan_admin_menu_page'));
    add_submenu_page('pxmag-plans', __('Add/edit Plans', 'textdomain'), 'Add/edit plans', 'manage_options', 'pxmag-plans-edit', array($this->admPlanObj, 'plan_admin_menu_edit'));
}

All the menu and submenu pages load fine.

But, when I open this page(pxmag-plans-edit), the menu selection in the WordPress admin shows nothing as current item, whereas the pxmag-plans is supposed to be the current selection.

(It is supposed to work like: when I click ‘Posts > Categories‘ and subsequently open the ‘edit category‘ page, the ‘Posts > Categories‘ option in menu keeps selected).

What is going wrong? What is the correct process?

MySQL Server Status CPU/Load Formula

Are there any variables and formula that can help me calculate CPU/Load value of MySQL ?

hooks – woocommerce_order_status_changed doesn’t fire when I change Order Status from Woocommerce Dashboard

I updated Woocommerce to 4.7.0 and woocommerce_order_status_changed hook doesn’t fire anymore. It has been working before perfectly.

Now when I go to the Dashboard, Woocommerce -> Orders -> Select Order -> Change Status (dropdown) -> Save.
The hook doesn’t fire / run the necessary function at all.

We have many custom statuses, so we need to handle these from code by this hook.

How can I catch the status changes of an order from this version?

hard drive – Encrypting Disk stuck on “Status: Checking”

I have a Mac mini with 2 disk, and I wanted to encrypt the second (non-boot) disk. I used Finder’s right click > Encrypt to start the encryption process. However, it seems to be stuck.

diskutil cs list outputs:

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 51...
    =========================================================
    Name:         Macintosh HD
    Status:       Offline
    Size:         0 B (0 B)
    Free Space:   -none-
    |
    +-< Physical Volume 8F...
        ----------------------------------------------------
        Index:    0
        Disk:     disk1s2
        Status:   Checking
        Size:     998999998464 B (999.0 GB)

and diskutil cs info 51... outputs:

Core Storage Properties:
   Role:                       Physical Volume (PV)
   UUID:                       8F...
   Parent LVG UUID:            51...
   Device Identifier:          disk1s2
   PV Size:                    998999998464 B
   PV Status:                  Checking

It has been stuck on “Checking” for quite a while, and looking at Activity Monitor shows no processes using CPU or Disk, leading me to believe it has gotten stuck. How can I move forward and get my disk out of this situation?

Edit:
Checking the Console, I keep seeing the message debugPortal: kCoreStorageGetGroupSparseState invalid lvg uuid pop up every second.

Edit 2:
The disk has now disappeared from the Finder and Disk Utility, however it still appears in diskutil and diskutil cs, though no diskutil cs commands work, they just say the UUID is invalid.

grub2 – dpkg: unrecoverable fatal error, aborting: unable to flush updated status of ‘libgs9-common’: Read-only file system

I reinstalled my Ubuntu 20.04 but faced a fatal error Executing 'grub-install /dev/sda2 which stopped the installation but after removing the installation flash drive I was somehow able to boot in the new os without the glub. Now when log in to my new desktop and try updating or installing an application I get the following error: I am a novice to Ubuntu and Linux ecosystem and I will be very glad and grateful for your help here. Thank you

sudo dpkg --configure -a
Setting up memtest86+ (5.01-3.1ubuntu2.1) ...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-54-generic
Found linux image: /boot/vmlinuz-5.4.0-42-generic
Found initrd image: /boot/initrd.img-5.4.0-42-generic
rmdir: failed to remove '/var/lib/os-prober/mount': Read-only file system
rmdir: failed to remove '/var/lib/os-prober/mount': Read-only file system
rm: cannot remove '/tmp/os-prober.1xo388/raided-map': Read-only file system
rm: cannot remove '/tmp/os-prober.1xo388/mounted-map': Read-only file system
rm: cannot remove '/tmp/os-prober.1xo388/dmraid-map': Read-only file system
rm: cannot remove '/tmp/os-prober.1xo388/swaps-map': Read-only file system
/usr/sbin/grub-mkconfig: 296: echo: echo: I/O error
debconf: DbDriver "config": could not write /var/cache/debconf/config.dat-new: Read-only file system
dpkg: error processing package memtest86+ (--configure):
 installed memtest86+ package post-installation script subprocess returned error exit status 1
Setting up libgs9-common (9.50~dfsg-5ubuntu4.2) ...
dpkg: unrecoverable fatal error, aborting:
 unable to flush updated status of 'libgs9-common': Read-only file system```

mongodb – Notification for host failure and health status

I set up a mongodb cluster with replica sets for high availability. My configuration seems to work well, as the database can operate even if I turn off some of my hosts.

My question is: How can I find out that a host failed or get the health status of the cluster? I wish to have something like a dashboard or a “health status”. My current solution is to connect to the cluster and query the replication state once in a while.

Can anybody recommend a tool which reports failover per email or provides a kind of dashboard where I can see the cluster health?

I already searched for solutions and found solutions like this:
Percona Monitoring and Management but it considers performance metrics rather than failover related information.

Thank you for your help.

Preserving the order of status bar icons between restarts

Is there any way to preserve the order of icons on status bar between restarts of the system? I know I can reorder them manually using Command key and mouse drag and drop, but this order is not preserved between the restarts. The order seems to be according to the order the apps managed to load on system start, but this isn’t always the same.

sharepoint online – How can I delete a list item if it keeps the same status after 7 days?

Stack Exchange Network


Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange