magento2.3.1 – How to detect browser tab close event in jquery

How do I detect the browser event when the client closes the browser tab by clicking X in jquey?

I just want to show a popup to the client while closing the browser tab.

I have used the following code. But no luck




Even alert is also not displayed.
Please guide me to solve it.

udev – Reassign the BTN_STYLUS event to the standard keyboard key?

I am trying to use a VEIKK graphics tablet on Kubuntu 19. So far I have a satisfactory setup, but the only thing left is to remap the pen buttons. I feel like I have all the ingredients to make it, but I can't figure out how to put it all together.

evtest Identify the entry in question:

/dev/input/event3:  VEIKK S640 Pen

Running evtest in this post reports:

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x2feb product 0x1 version 0x100
Input device name: "VEIKK S640 Pen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
    Event code 331 (BTN_STYLUS)
    Event code 332 (BTN_STYLUS2)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value  15580
      Min        0
      Max    98304
      Resolution       1
    Event code 1 (ABS_Y)
      Value  13040
      Min        0
      Max    32768
      Resolution       1
    Event code 24 (ABS_PRESSURE)
      Value   1670
      Min        0
      Max     8192

And actually, when I press the pencil button, I see

Event: time 1586123903.365325, type 1 (EV_KEY), code 331 (BTN_STYLUS), value 1

followed later by

Event: time 1586123903.499328, type 1 (EV_KEY), code 331 (BTN_STYLUS), value 0

What I would like to do is simply replace these events generated with different events let's say

type 1 (EV_KEY), code 30 (KEY_A), value 1

for the first and similarly for the second, so pressing the pencil button is the same as pressing the a Down (and up) key on the keyboard.

There are several closely related questions on this site, this being probably the closest one, but the proposed solutions and the final solution are quite confusing. I've also prototyped by writing a python-evdev script to "filter" these events into something, but that comes with its own problems.

So is there a standard way to achieve this using udev?

GET – OMG Funnels Event |

Loader: imwarrior / Category: IM / Seeders: 1 / Leechers: 0 / Size: 6.05 GB / Snatched: 1 x times

OMG funnel event


The powerful replay of the Russell Brunson, Kotton, Joe Marfoglio OMG funnels is ready
What can we learn from the OMG Funnels Event?

1 – Welcome.
2 – Mike's ClickFunnels OTS configuration.
3 – Configuration of the Joe OTS members area.
3.1 – Search for a template and initial configuration of the members area.
3.2 – Add lessons to your members area.
3.3 – Video 3 Configuration of member access.
4 – OMG Funnels Event Webinar Replays.
4.1 – Webinar on the shoulder with Mike and Fletch.
4.2 – Over the shoulder with Mike and Joe.
4.3 – OMG QnA shoulder funnels with Mike Long.
4.4 – OMG Funnels Avalanche Hotseats.
5 – Russell Brunson.
And more.


applescript – Can I handle the "open" Apple event inside a bash shell script using the osascript command?

I use a bash script ( inside an application package (, which starts "java -jar myJarFile.jar" with additional JVM arguments (which works fine so far). My goal is to pass a filename as an argument to the application, too, every time the user opens a file via "open with …".

I tried to implement OpenFilesHandler in the Java application and copy an AppleScript-scpt-file into the package that calls without success.

The last thing I tried just to test all the possibilities was to call osascript inside bash


#test: set command line args
MY_TITLE="Launching myJavaJarApp"
ARGS_MSG="command line args: "

osascript <<-EndOfScript
    set arguments to ""
      on open theFiles
            repeat with anItem in theFiles
               set arguments to arguments & space & (quoted form of POSIX path of anItem)
            end repeat
      end open
    display dialog "$ARGS_MSG" & arguments with title "$MY_TITLE"     

It didn't work, the dialog box only indicates $ ARGS_MSG with no arguments, when I open a file with

It seems to me that setting the bash script to CFBundleExecutable "consumes" all AppleEvents.

Or is there some way?

design: event driven job scheduler architecture

I have a cron based job scheduler that triggers time based jobs. This was simple to think about and design because the event in this case is well defined (the event is time).

Now I want to create a generic event-based job scheduler that can trigger a job when any event occurs. Example of events: file tap, directory creation, Jira request creation, other job failure, etc. Basically the event could be anything.

I'm not sure how I go about designing this system, especially from the user's perspective. How will my users define the event, how will my system react to these events to start Job, etc.?

Recurring event every x hours in Google Calendar?

I need to create a one-hour event in Google Calendar that repeats every 124 hours, but there is only one option to repeat days.

I did some research, and it might be possible with some spreadsheet formulas, but I'm not entirely sure how. Any ideas?

online sharepoint: the value of the datetime field within a remote event sink will be minus one day

I have a datetime field that has a value = 03 April 2020 as follows: –

enter the image description here

But inside my remote event sink that is hosted within Azure, I have this code:

DateTime current = (DateTime)(i("ProjectLastUpdate"));
DateTime after = (DateTime.Parse(properties.ItemEventProperties.AfterProperties("ProjectLastUpdate").ToString()));

where the value I got for the current Y after will be 4/2/2020 12:00:00 AM instead of 4/3/2020 ...,, so why is the date one day before the correct date?

ubuntu: how to resolve a DegradedArray event when a drive has been permanently removed from RAID array?

When I installed my VPS a few months ago (Ubuntu 18.04), the default RAID configuration depended on 3 disks. I removed / dev / sdc from the array to create a new partition. The RAID array is now as follows:

~# mdadm -D /dev/md0
           Version : 1.2
     Creation Time : Sat Nov 16 19:46:26 2019
        Raid Level : raid1
        Array Size : 305152 (298.00 MiB 312.48 MB)
     Used Dev Size : 305152 (298.00 MiB 312.48 MB)
      Raid Devices : 3
     Total Devices : 2
       Persistence : Superblock is persistent

       Update Time : Mon Mar 30 00:00:03 2020
             State : clean, degraded
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

Consistency Policy : resync

              Name : 163-172-103-121:0
              UUID : b4acac7e:de2c1e5c:e43cc0ba:ad662e4a
            Events : 310

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       -       0        0        2      removed

As a result, the RAID array is still in sync on two disks, BUT I get a daily "DegradedArray Event" email.

And I didn't find the correct way to fix it, I mean mark RaidDevice 2 as permanently removed. And to be honest, I'm afraid of breaking something;)

Please let me know how to proceed.

Thank you !

Start web architecture design question. Two different roles (client = event creator) than the other (animator = event responder)

  • Thinking of having a database where the client can write an event
    to him on his authenticated page.

  • Then artists can see all events on their
    authenticated pages and add their name to "available artists"
    column in the database. From here, the customer can choose one that
    they want to come to your event and then the chef can see this on
    your side of the website.

Is this reliance on reading and writing to a database and using conditionals the best way to do it?

All opinions greatly appreciated.

office js – Outlook plugin event listeners

I am working on an Outlook JS plugin where I take the recipient email list (To, CC) and send it to a server and return whether or not an email is already in that user's database on a website .

Is there an event listener that fires when a user adds / edits / deletes an email address from / CC?