MySQL event scheduler waiting on empty queue since server restarted 12 days ago

I noticed a process on the server which has been running for more than 12 days, which I think coincides with the last time MySQL was restarted.

mysql> SHOW FULL PROCESSLIST;  +---------+-----------------+-----------+------+---------+---------+------------------------+-----------------------+ | Id      | User            | Host      | db   | Command | Time    | State                  | Info                  | +---------+-----------------+-----------+------+---------+---------+------------------------+-----------------------+ |       5 | event_scheduler | localhost | NULL | Daemon  | 1098372 | Waiting on empty queue | NULL                  | | 1774483 | root            | localhost | NULL | Query   |       0 | starting               | SHOW FULL PROCESSLIST | +---------+-----------------+-----------+------+---------+---------+------------------------+-----------------------+ 2 rows in set (0.00 sec) 

There are no events, and I haven’t attempted to created any.

mysql> SELECT * FROM information_schema.EVENTS;  Empty set (0.00 sec) 

This is actively using up to 8% of my server’s CPU.

Is there a way of determining what this is, or why it was started? Will this try to run every time I restart MySQL? If so, what is it ‘waiting’ for and do I need to tweak my configuration at all to prevent this?

MySQL 8.0.21

Conditionally enqueue a stylesheet based off of a javascript click event

I would like to use a different ccs file based on a javascript click event. The user will have a choice of color themes by clicking one of the colored buttons on the screen. I originally have it working by providing the linked css with an id that can be targeted with javascript. The link is in the HTML head tag of course. In WordPress though we enqueue the css file in the functions.php file and so I am not sure how to give the css file an ID to target it with the javascript. If anyone can help me out or point me in the right direction I will really appreciate it. I am open to all possibilities and I thank you all in advance. if you need me to elaborate more feel free to let me know.

facebook customer chat for website – button click event help need

Dear friends, I need a help. I am facing a problem;

I have setup facebook customerchat in my site. It appear at the bottom-right corner of the page. When clicked on the green round button it open.

View attachment 255988
# I wish to add another option on it, so that I can also open this chat clicking another button/ image/ text also. Suppose see the attchment, if I click on "Chat with us" or the female face image, it will open the customer chat same way.

Optional:
Also can I add…

facebook customer chat for website – button click event help need

Distributed predicate computation on event stream

My question is actually a request for papers, articles, texts or books on the problem that I’m trying to solve on my work.

I’m working on a program that computes a predicate value (true or false) for a given object in a distributed system in which there is a stream of events that can change the object’s attributes and, consequentially, the predicate value. Whenever the predicate value changes, the program must send a notification about this change.

For example, consider that there is an object A which has an attribute called name and consider that there is a predicate P which is true when the object’s name is equal to Jhon. Each event in the stream has a timestamp and a value for the attribute name. So consider the following sequence of events:

e1 = { name: Jhon, timestamp: 1 } e2 = { name: Jhon, timestamp: 2 } e3 = { name: Peter, timestamp: 3 } e4 = { name: Doug, timestamp: 4 } e5 = { name: Jhon, timestamp: 5 } 

Now, the events don’t necessarily show up in the stream in the correct order and, even worst, there are multiple computers parallelly processing this stream of events. However, for simplicity, I’ll go further in this example considering only one computer.

If the events arrive and are processed in the order described above, then the notifications sent should be:

P(A) = true when e1 arrives P(A) = false when e3 arrives P(A) = true when e5 arrives. 

That is the correct sequence of notifications. Now, imagine that the computer receives the events in the following order:

e1, e5, e2, e4, e3 

A naive algorithm which doesn’t consider the event’s timestamp would send an incorrect sequence of notifications:

P(A) = true when e1 arrives P(A) = false when e4 arrives 

The algorithm that I’m working on considers the timestamps and infers when a notification should have been sent but was not. So when e3 arrives it will notice that the notification P(A) = true for e5 was not sent. This feels a bit like reinventing the wheel, though I’m not aware of any reading about this problem. I would like some references to this problem or to something similar, like some papers dealing with this kind of problem.

The real problem is quite more complex since it involves storing the predicate $ \times$ object state in a database that works as a shared state between the computers processing the stream and I’m talking about thousands of events arriving per second so it’s not possible to keep all events stored in some database.

Compute duration of an event based on consecutive values in another column

I need to compute the sum of durations of multiple events based on consecutive values in another column.

             ts             | w ----------------------------+---  2020-07-27 15:40:04.045+00 | t  2020-07-27 15:41:04.045+00 | t  2020-07-27 15:41:14.045+00 | f  2020-07-27 15:42:14.045+00 | t  2020-07-27 15:43:14.045+00 | t 

The event is considered being active as long as the column w has a consecutive value of true.

The duration of the first event would be 60 seconds. '2020-07-27 15:41:04.045+00' - 2020-07-27 15:40:04.045+00. The second event has the same duration. The sum of both would be 120 seconds.

What would be the best/most performant approach to computing these values? The longest time range we’ll be looking at will probably be half a year involving about 30 million rows.

I wrote a custom aggregate function that computes the duration but it takes about 16 seconds for only 1.5 million rows.

 Aggregate  (cost=444090.03..444090.04 rows=1 width=4) (actual time=16290.826..16290.828 rows=1 loops=1)    ->  Seq Scan on discriminator0  (cost=0.00..57289.03 rows=1547203 width=9) (actual time=0.016..1723.178 rows=1547229 loops=1)  Planning Time: 0.196 ms  JIT:    Functions: 3    Options: Inlining false, Optimization false, Expressions true, Deforming true    Timing: Generation 0.889 ms, Inlining 0.000 ms, Optimization 0.508 ms, Emission 6.472 ms, Total 7.870 ms  Execution Time: 16291.836 ms 

I’m new to SQL and basically just got this working through trial and error, so I’m sure there is room for improvement. Maybe even a whole different approach. Here’s a fiddle with the aggregate function.

I’m not sure if i should include the code because it’s quite long

Add post meta data date to event

I created a post metabox that uses the datepicker to pick a date value. I got as far as adding the metabox and getting the datepicker to work but other than that im struggling to get the data saved to the post. This is my code in my functions.php:

//Add date picker css function admin_styles() {     if ( 'events' === get_current_screen()->id ) {         wp_enqueue_style( 'jquery-ui-smoothness', // wrapped for brevity             '//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css', [], null );     } } add_action('admin_print_styles', 'admin_styles'); //Activate function function admin_scripts() {     if ( 'events' === get_current_screen()->id ) {         wp_enqueue_script( 'admin', get_template_directory_uri() .'/js/admin.js', [ 'jquery-ui-datepicker' ] );     } } add_action( 'admin_enqueue_scripts', 'admin_scripts' );  //Add date meta-boxes  function post_date_field($  post) {    echo '<input type="text" id="jquery-datepicker" name="entry_post_date" value="' . get_post_meta( $  post->ID, 'entry_post_date', true ) . '">'; } function post_date_meta_box() {   add_meta_box('entry_post_date', 'Date', 'post_date_field', 'events', 'side', 'high'); } add_action('add_meta_boxes', 'post_date_meta_box');  //Save Data function save_date_meta_box($  post_id){     global $  post;     if( $  post->post_type == "events"){         if (isset($  _POST)){             update_post_meta( $  post_id, 'entry_post_date', strip_tags( $  _POST['entry_post_date'] ) );         }     } } 

After publishing or updating the post I dont think the date value is saved

GTM – Bad Event Tracking Code – Pageview Hit must precede event

I’m having trouble finding a GTM error. The error states that Google Tag Manager isn’t receiving the URL/page-name in Google’s Behavior->Landing Pages report before it receives an event.

I’m not sure how to find the offending page and of course, Google can’t tell me the offending page, so trying to use Google’s Tag Assistant would mean testing every single page on the website.

The error appears to be happening on all of the major browsers, so it doesn’t seem to be browser specific.

I tried to lookup one session by matching the session duration with user sessions. The session begins at 11:58 pm and ends at 12:04 am. However, when I use Google’s Tag Assistant, it doesn’t show any errors.

enter image description here

If this were the problem page, it would appear that GTM looses the page name when the session wraps over the midnight hour, but this seems improbable.

enter image description here

How can I properly identify the offending page without using Google Tag Assistant on every single page?

What counts as a “specific goal, event, or activity” for the Divination spell?

The divination spell states:

Similar to augury but more powerful, a divination spell can provide you with a useful piece of advice in reply to a question concerning a specific goal, event, or activity that is to occur within 1 week.

I’m not sure what limitations the language about “a specific goal, event, or activity” imposes. The immediate motivation for this comes from a Kingmaker campaign that I’m currently running. After an attack on their capital, my players came up with the idea of casting divination once a week to ask “Will anything attack our kingdom this week?”

I’m trying to figure out if this is specific enough, and if not, what would be specific enough. On one hand, it’s not a specific event – they aren’t expecting any particular attack. On the other hand, it’s arguably a specific goal – keeping their citizens safe from large-scale threats.

Also, I expect my players to use divination many times during this campaign, so I’d like to know how this language limits the spell beyond this one case.

Customized Event Planning Mirror Booth

Our Factory
Shenzhen Eagle Technology Co., Ltd established in 2017, is a professional digital manufacturer and exporter that concentrate with its unique design and patent of mirror me booth, mirror booth, beauty mirror booth, mirror photo booth, selfie mirror, events photo booth, magic mirror booth etc.
Our products passed TUV international quality standards: CE, RoHS, FCC. In 2018, we provided services for 110 new customers whose come from 15 different countries and got their good confidence with us. Hope to build win-win cooperation with you in the future.
Own a powerful energetic team with 24 hours professional customers supporters. Have 22 years experience engineer lead R&D department. Quickly make client鈥檚 requirements and idea to real products. Every year keep develop more than 4 new styles to keep leader market requirements.
For control quality process, work with China high level suppliers. Own completed production lines: CNC, Laser cutting, Diamond pushed, laser dotting, SMD, aging test. Have completed quality control system, every machine passed 48 hours aging test before packing, control throughout all quality stages to guarantee total customer satisfaction. Main raw material suppliers are come from Fortune 500 companies. As a result of our high quality and outstanding customer service, we have built global sales network it reaches Euro, North America, South America, Australia, Middle East, South Asia.
Welcome to visit our company and looking forward to our cooperation!
Operation Philosophy: Quality is not an act, it is a habit.
Company Mission: Picture your Happiest Memories.
Our Product
Mirror me booth, photo booth
Product Application
The magic mirror is perfect for any event: Cencerts, brithday parties, weddings, retirement, graduation, fundraisers, school dances, opening ceremony and so much more.It’s also use in nomarl business actitivt: 5 star hotel,Jewelry shop, make up stores, clother shop…..all stores that you want show your unique style.
Our Certificate
Company SGS: 18722362_P+T, 18722363_P+T, Product: TUV: CE, ROHS. FCC, patent, utility model, appearance
Production Market
In 2018, we provided services for 110 new customers whose come from 15 different countries and got their good confidence with us. Hope to build win-win cooperation with you in the future.
Our Service
Own a powerful energetic team with 24 hours professional customers supporters. Have 22 years experience engineer lead R&D department. Quickly make client鈥檚 requirements and idea to real products. Every year keep develop more than 4 new styles to keep leader market requirements.Customized Event Planning Mirror Booth
website:http://www.eagle-groups.com/