Waiting for the user – Selecting the country with region filters

I'm tinkering with a model that allows the user to select a single country or several countries historically / culturally grouped together (for example, the UK).

We are just looking for comments and we wonder if anyone has ever seen anything in this way.

Drop-down list 1: region (worldwide, Europe, North America, South America, Southeast Asia, etc.)

Drowdown 2: Country (all, then list of appropriate countries according to drop-down menu 1)

The user first selects a region (eg Europe), then a country (eg Germany).

If Country = All, the search results will return all countries in the selected region (or all countries if region = whole world).

Changing Region changes the options in the Country list.

One of my problems is how to manage regions like the UK. By ignoring Brexit, the countries of the United Kingdom are also in the Europe region. The presence of a country in several regions is not a problem. The problem is that there are quite a few regions like this (UK, British Isles, Balkans, Caribbean, etc.). I can definitely see that users want results returned for "all UK countries".

Should I have a lot of areas? All countries, continents (EU, Africa, etc.), then these special subsets (UK, etc.)? Or would you go around the world, then in Continents + SpecialRegions (sorted in alphabetical order)?

If I'm 3 days away from a trip and I'm waiting for a day to book, will the greyhound ticket be much more expensive and does the web fare only work at the train station?

I need answers as soon as possible. It is very very urgent. I've tried to understand that. If I'm 3 days away from a trip and I'm waiting for a day to book, will the greyhound ticket be much more expensive and does the web fare only work at the train station?

conditional waiting – use of mutual information in Bayesian statistics

This question is about Bayesian statistics and active learning. I use the following notation:

  • $ x $ is an input variable
  • $ y $ is an output variable
  • $ theta $ are latent parameters
  • A model $ p (y | x, theta) $ is given
  • observed data $ D = {(x_i, y_i) } _ {i = 1} ^ n $ is given
  • a latent parameter model is given $ p ( theta | D) $

Active learning describes a problem where new points $ x $ can be freely chosen and meets $ y $ are given by an oracle. Each of these interactions provides new data $ D = cup (x, y) $ and leads to a new posterior parameters $ p ( theta | D & #); $.
The goal is to choose $ x $ as efficiently as possible, to maximize information gain.

This notation is used in the Bayesian Active Learning study for learning classification and preferences. From this paper comes also my question. If you want to know more, it's all at the beginning, basically the first two equations. You will find them on page 3.

Query points are chosen to improve the estimation of latent parameters. This leads to an optimization problem, which maximizes the expected decrease in posterior entropy:

$ argmax_x left (H ( theta | D) – mathbb {E} _ {y sim p (y | x, D)} (H ( theta | D cup (x, y))) right $

The authors now explain that it is a potential problem. The entropy is calculated for the latent parameters $ theta $, depending on their posterior probability. This is expensive in calculation.

The objective of the initial problem is the measurement of mutual information between the latent parameters and the result of the query. This can be written as:

$ argmax_x I ( theta, y | x, D) $

The mutual information of two random variables is symmetric: $ I (x; y) = I (y; x) $. This allows you to rewrite the problem as:

$ argmax_x I (y, theta | x, D) = argmax_x left (H (y | x, D) – mathbb {E} _ { theta simp ( theta | D)} (H (y | x, theta)) right) $

Now, this supposedly corrects the computation problem: entropies are now calculated on $ y $which is usually in a much smaller space than $ theta $.

Which finally brings me to my question:

I do not understand how mutual information is used here. It seems to me that the two terms of the last equation are identical.

The first term is the entropy of $ y $, given the data seen so far $ D $ and the new entry $ x $, $ H (y | x, D) $. But that is as much information as we have. Is not it the later entropy of $ y $after the request?

When you write the formulas for entropy, it is also the same thing:
We only have one model $ p (y | x, theta) $. So, to calculate the entropy on $ y $we have to go through the latent parameters. As far as I know, the two terms are identical:

$ H (y | x, D) = mathbb {E} _ { theta simp ( theta | D)} ( mathbb {E} _ {y sim p (y | x, theta)} (-log ; p (y | x, theta))) = mathbb {E} _ { theta simp ( theta | D)} (H (y | x, theta)) $

Proposed solution:

I've been thinking about this, and I think the rewritten version of the optimization problem is missing an update from $ theta $. The second term entropy calculates the expected entropy of y, from samples of $ theta $ from the current belief $ p ( theta | D) $. This does not really correspond to the idea of ​​mutual information: how much do you know of it after seeing the new $ theta $.

I have rewritten it below, using $ theta $ to indicate the updated belief. This is the expected entropy of y, based on the expected new latent parameters, on the expected result of y, on the expected current parameters. Sorry, it will be horribly nested:

$ mathbb {E} _ { theta simp ( theta | D)} ( mathbb {E} _ {y simp (y | x, theta)} ( mathbb {E} _ { theta # p ( theta | x, y, D)} (H (y | x, theta))))) $

This new version makes a lot of sense to me, but I do not know if it's okay. Especially as the authors say about their newly derived version (last paragraph on page 3):

As well $ theta $ is now only conditioned to $ D $so only $ O (1) $ posterior
updates are needed

Well, if my derivation is correct, it does not seem to be true. On the contrary, it is still an integral part of the subsequent update of $ theta $. Can any one explain how to properly use mutual information here?

Release of the Google Meet Android app with message "Expiry of the waiting period to join the meeting"

When I try to join a meeting, the application waits about 5 seconds, then I leave the message with the message "the timeout to join the meeting has expired", why? and how to prevent it?

Waiting wp script – plugin add_action and add_menu_page

I'm using this code to create a menu for my plugin. It works well.

My question is: what's the difference between including a php page and queuing scripts / styles in a foo_admin_enqueue_scripts reminder and including them in reminders add_menu_page / add_submenu_page?

function foo_admin_menu(){

    $menu = add_menu_page('Player manager', 'Foo Audio Player', FOO_CAPABILITY, 'foo_settings', 'foo_settings_page', 'dashicons-playlist-audio');

    $submenu = add_submenu_page('foo_settings', __('Foo Audio Player', FOO_TEXTDOMAIN), __('Settings', FOO_TEXTDOMAIN), FOO_CAPABILITY, 'foo_settings', 'foo_settings_page');   
    $submenu2 = add_submenu_page('foo_settings', __('Foo Audio Player', FOO_TEXTDOMAIN), __('Player manager', FOO_TEXTDOMAIN), FOO_CAPABILITY, 'foo_player_manager', 'foo_player_manager_page');    

    add_action( 'load-' . $menu, 'foo_admin_enqueue_scripts' );
    add_action( 'load-' . $submenu, 'foo_admin_enqueue_scripts' );
    add_action( 'load-' . $submenu2, 'foo_admin_enqueue_scripts' );

}

function foo_settings_page(){

    //1. include php page and script here?

    include("settings.php");

    wp_enqueue_script('enqueue something here')

}

function foo_player_manager_page(){

    ...

}

function foo_admin_enqueue_scripts() {

    //2. or include php page and script here?

    wp_enqueue_script('jquery');
    wp_enqueue_media();

    wp_enqueue_style('foo', plugins_url('/css/admin.css', __FILE__));   
    wp_enqueue_script('foo', plugins_url('/js/admin.js', __FILE__), array('jquery'));

}

database – Locking an item waiting for human approval

I am working on adding approval workflows around our system, which manages CRUD operations for our business component.
Until now, I used an optimistic locking strategy to handle competitive race conditions when two users were trying to edit the same item. The user whose application is registered first wins and the other user must retry with the new value.
However, this will not work very well once we have started to require approvals because an approval workflow may take several days and must require the approval of 4 to 5 people. If I serialize the approved requests (in the order in which they were approved) and apply them one by one using optimistic locking, the user who lost the race will not be happy because he jumped so many obstacles for nothing.
One strategy is to use a pessimistic lock and lock the item before entering the approval workflow. However, this seems problematic for two reasons:

  1. An item can potentially be locked for several days, causing
    frustration to other users. (I could work around this problem by defining a
    wait time for locking, and do locking at attribute level to minimize
    friction.)
  2. Bulk Edit is another of our use cases.
    potentially check if hundreds of articles have locks applied on
    them, which can increase latency and reduce performance.

Most of the questions I've seen on this forum relate to the use of two tables (one is the actual table and the other pending changes), but nothing about the management locks. for example: process pending and approval
Conversely, there are questions about locking, but without tedious approval process. For example: do I have to lock the lines of my Cloud database while editing by a user

I guess this problem should be quite common given the number of systems that use approvals to limit data modification. What are some common ways to solve this problem?

Thank you!

5th dnd – What can players do while waiting for a troll to regenerate?

When do player characters leave the turn-based action (ie, the order of initiative) if they are in an area? hostile?

You enter a turn-based action when you have to follow the time * closely. You leave him as soon as you do not need this close follow-up.

Turn-based time tracking dominates combat, but can also be used for chases (DMG 252), complex traps (DMG 121), or even tense social scenes.

However, this is not an absolute rule and, as you can see, it would be unusual to stay in turn after the monster has been shot down. This would indicate the characters a bit.

You may want to end the game, turn-based, with an end to the effect of "The troll will collapse into a stream of blood", then allow the party to start discussing its next actions – leave the area, search for loot, etc. after a short interval (~ 6 seconds), interrupt them; "You hear a groan and the trolls shake, then start to get up!"

At this point, you can either restart the initiative to see who reacts to the resuscitation troll, or continue with players B and C. The first choice is the closest to the rules, but the second choice may be more accurate.

The next time the troll is shot, continue the fight or do the same trick.

Waiting for the user – What is the best action of the "Add to cart" button?

In which situation should I choose each alternative bellows?

After clicking on the "Add to cart" button:

1. Keep on the current page, create an animation on the "Add to Cart" button to indicate that the product has been added and display a bubble-shaped message on the mini-cart in the header.

enter the description of the image here

2. Keep on the current page, scroll the screen to frequently buy together and show a message informing that the product has been added to the cart.

enter the description of the image here

3. Open a modal with continuing to buy and go to the control buttons and frequently bought together.

enter the description of the image here

4. Go to an intermediate page like do Amazon.

enter the description of the image here

5. Redirect to cart and the guarantee that has a button continue to buy there.

Ps: I have already read Should I display the Cart page after the user has clicked on "Add to cart" in the list? and What is the best add-to-cart feed in ecommerce??

Waiting for the user – What should happen after clicking the "Add to cart" button?

When I read the information on e-commerce additions to the Web and here on Stack Overflow, I noticed that this is a very common question, but it's hard to make a decision given that nowhere do we compare all the alternatives and do not show why we decide. each strategy.

My question is:

In which situation should I choose each alternative bellows?

After clicking on the "Add to cart" button:

1. Keep on the current page, create an animation on the "Add to Cart" button to indicate that the product has been added and display a bubble-shaped message on the mini-cart in the header.

enter the description of the image here

2. Keep on the current page, scroll the screen to frequently buy together and show a message informing that the product has been added to the cart.

enter the description of the image here

3. Open a modal with continuing to buy and go to the control buttons and frequently bought together.

enter the description of the image here

4. Go to an intermediate page like do Amazon.

enter the description of the image here

5. Redirect to cart and the guarantee that has a button continue to buy there.

Ps: I have already read Should I display the Cart page after the user has clicked on "Add to cart" in the list? and What is the best add-to-cart feed in ecommerce??

I know everyone has their own good reason and an interesting conversion and would be great if you can list the advantages and disadvantages of each argue about your suggestion for use.

Waiting for the user – Click on the "Add to Cart" button. And after?

When I read the information on e-commerce additions to the Web and here on Stack Overflow, I noticed that this is a very common question, but it's hard to make a decision given that nowhere do we compare all the alternatives and do not show why. each strategy.

My question is:

In which situation should I choose each alternative bellows?

After clicking on the "Add to cart" button:

1. Keep on the current page, create an animation on the "Add to cart" button to indicate that the product has been added and display a bubble message on the mini-cart header

enter the description of the image here

2. Keep on the current page, scroll the screen to frequently buy together and show a message informing that the product has been added to the cart.

enter the description of the image here

3. Open a modal with continuing to buy and go to the control buttons and frequently bought together.

enter the description of the image here

4. Go to an intermediate page like do Amazon.

enter the description of the image here

5. Redirect to cart and the guarantee that has a button continue to buy there.

Ps: I have already read Should I display the Cart page after the user has clicked on "Add to cart" in the list? and What is the best add-to-cart feed in ecommerce??

I know everyone has their own good reason and an interesting conversion and would be great if you can list the advantages and disadvantages of each argue about your suggestion for use.