views – Ajax call unknown on views_exposed_filters customized when the drop-down list is modified

I have two filters exposed as selected fields (county and district) using Hook_form_ID_alter.

I would like to change the district base #options on the county I have selected to display the related options.

But some how the Ajax that I wrote did not take effect, and instead have other errors that exceeded the download limit, as shown in the image.

enter description of image here

The code is written in the theme.module file, any suggestion is appreciated, thank you!

function ajaxReplaceDistrictOptions(&$form, FormStateInterface $form_state) {

    $district = (
       'City1' => (
         'district1' => 'district1',
         'district2' => 'district2',
         'district3' => 'district3',
       ),
       'City2' => (
         'district4' => 'district4',
         'district5' => 'district5',
         'district6' => 'district6',
       )
    );
    if ($selected_value = $form_state->getValue('field_store_address_county')){
        $selected_county = $form('field_store_address_county')('#options')($selected_value);
        $form('field_store_address_district')('#options') = $district($selected_county);
    }

    return $form('field_store_address_district');
}

function theme_form_views_exposed_form_alter (&$form, FormStateInterface $form_state, $form_id) {

    if($form('#id') == "views-exposed-form-s3-shop-map-shops-list" ){

        $county = (
          'County1' => 'County1',
          'County2' => 'County2',
          'County3' => 'County3',
        );

        $form("actions")("submit")("#value") = t('Confirm');

        $county_field = 'field_store_address_county';
        $form($county_field) = (
            '#type' => 'select',
            '#multiple' => FALSE,
            '#empty_option' => t('County'),
            '#options' => $county,
            '#ajax' => (
                'callback' => 'ajaxReplaceDistrictOptions',
                'wrapper' => 'district-list',
                'method' => 'replace',
                'effect' => 'fade',
            )
        );
        unset($form($county_field)('#size'));

        $district_field = 'field_store_address_district';
        $form($district_field) = (
            '#type' => 'select',
            '#multiple' => FALSE,
            '#empty_option' => t('District'),
            '#prefix' => '
', '#suffix' => '
', ); } }

Modified composite model / Foods, recipes and sub-recipes

I am having problems correctly implementing the composite model (to make it the most efficient).

Two entities are involved: Food and Recipes. They should be analyzed from a CSV file.
A basic food item would contain a letter (to indicate whether it is a food or a recipe – in this case f), a name, calories, fat , carbohydrates and protein. The recipe would contain the letter r and the name of the recipe.

I know the staple foods must be a matching sheet, and the recipe would be composite. However, the recipes in the CSV file may contain sub-recipes so that it has a name (of food) and a number (number of servings) of pairs. However, food can be a sub-recipe, which begs the question of how to make an optimal solution?

My first is to hold the composite List> to store its composites. What would be the easiest way to verify if we are dealing with a certain type of food and to provide CRUD-like functionality?

E.g. b, FoodName, 1, 2, 3, 4 (basic food) 
E.g. r, RecipeName, foodOneName, foodOneCount, foodTwoName, foodTwoCount, ...

Expiration of a Delta e-credit following a modified date

I am considering changing my Delta ticket from one flight in June to another this year. The new price will be lower than the old one, so I will be offered electronic credits. Now I believe the expiration of the Writings is 12 months? But the original tickets were issued more than 12 months ago (we plan ahead!), So this cannot mean the expiration of 12 months from that date!
Thank you

Airlines – How To Request A Refund Plus Fee For A Modified Flight Booked From A Third-Party Agent

In June 2017, I flew with my family and my mother-in-law from London Gatwick to Prague. I booked flights via BudgetAir with the airline SmartWings.

When we arrived in Gatwick for departure, we found that the outbound flights were later than those shown on our ticket. It wasn't a big deal and we waited then boarded and flew to Prague. We no longer thought about it at that time.

When we arrived at Prague airport for the return flight, we found that this flight service had not operated that day (Sunday) for several months. The airline had postponed the flight and we were not informed. We were not informed by SmatWings or by BudgetAir.

It was a Sunday and my wife and I both had work the next day, so we couldn't wait for the next available SmartWings flight that week. We decided to buy alternative return flights, but our only option was from London Southend, so we got a taxi transfer for our car to Gatwick.

BudgetAir has agreed to reimburse the cost of the original flights, but not other expenses incurred that day. I refused to declare that I wanted full compensation.

I tried to make a claim for it via SkyCop and after about 2 years they finally responded saying that it was unlikely that our claim would be successful.

The details of your case require it to be argued in a
location. Previous attempts at this location have failed, and we
firmly believe that this should not change in this case. Were
sorry, we have no better news for you. Your complaint will be closed at
this point. You can still file a separate claim with the company
get a refund for your fare or a refund for the fees you paid because of
flight disruption. But on our side, we cannot advance here.

I do not know what I should do here and what is my legal position. Should I contact BudgetAir or SmartWings again? Do I have a chance to get compensation for these additional expenses?

node.js – NodeJS route modified to call a function that recursively calls s3.ListObjects but not sure if it works correctly / could be simplified

Route before modification (calls s3.listObjects once so cannot retrieve> 1000 objects):

server.get('/v1/api/project/', (request, response, next) => {
  s3.listObjects({ Bucket: BUCKET, Prefix: '', Delimiter: "https://codereview.stackexchange.com/" }, (err, data) => {
    if (err) {
      console.error(err);
      response
        .status(err.statusCode ? err.statusCode : 500)
        .send(err.message);
      return;
    }
    if (data.CommonPrefixes) {
      const items = data.CommonPrefixes
        .map(r => r.Prefix)
        .map(prefix => prefix.split("https://codereview.stackexchange.com/")(0))
        .map(prefix => {
          return { prefix };
        });
      response.send({ items, count: items.length });
    }
  });
});

Route after modification and new function that I added to retrieve all the objects from the bucket s3:

server.get('/v1/api/project/', async(request, response, next) => {
  let allCommonPrefixes;
  try {
    allCommonPrefixes = await getAllCommonPrefixes({ Bucket: BUCKET, Prefix: '', Delimiter: "https://codereview.stackexchange.com/" });
  } catch(err) {
    console.error(err);
    response
        .status(err.statusCode ? err.statusCode : 500)
        .send(err.message);
    return;
  }
  if (allCommonPrefixes) {
    const items = allCommonPrefixes
        .map(r => r.Prefix)
        .map(prefix => prefix.split("https://codereview.stackexchange.com/")(0))
        .map(prefix => {
          return { prefix };
        });
    response.send({ items, count: items.length });
  }
});

async function getAllCommonPrefixes(params, allCommonPrefixes = ()) {
  try {
    await new Promise((resolve, reject) => {
      s3.listObjects(params, (err, data) => {
        if (err) {
          reject(err);
        }
        allCommonPrefixes.push(...data.CommonPrefixes);
        let contents = data.Contents;
        if (data.IsTruncated) {
          params.Marker = data.NextMarker ? data.NextMarker : contents(contents.length-1).Key;
          return getAllCommonPrefixes(params, allCommonPrefixes);
        }
        return allCommonPrefixes;
      });
    });
  } catch(err) {
    throw err;
  }
}

index – What is the reason to drop all indexes for a modified view in SQL Server?

This is a follow-up to the ALTER VIEW drop index of the View question.

The accepted answer indicates that ALTER VIEW will automatically delete all defined indexes.

This is somewhat counterintuitive to the way other similar operations happen:

  • it is natural to expect that related items such as permissions or indexes will be removed when
  • modifying a table does not delete any indexes (in fact, you need to delete items like indexes, constraints, etc.)

I wonder why having this default behavior in the first place (that is, there is an objective aspect like performance reduction in some cases due to the change in eyesight).

Question: What is the reason to drop all indexes for a modified view?

dnd 5e – Is there a way to detect modified memories?

In D&D 5E, is there a way to detect if someone has tampered with their memory using the Modify Memory spell?

In version 3.5E, you can resume this with Detect Magic. According to 3.5 SRD, Modify Memory has …

duration: Permanent

Because it’s a permanent spell,

Energy stays as long as the effect does. This means that the spell is vulnerable to dispel magic.

The above also means that Detecting Magic would capture the aura of enchantment magic that surrounds the victim of such a spell. So if you tamper with someone's memories, they would light up Detect Magic as Enchanted. Then, you launch a Spellcraft test, identify the spell and demolish it.

However, in 5E, Modify Memory has …

duration: Concentration, up to 1 minute

and the precise text

changed memories settle in at the end of the spell

This means the spell has ended and the target is no longer under the influence of magic. Thus, they should not appear as enchanted under Detect Magic.

Since Detect Magic does not work and …

A remove the curse or greater restoration the spell cast on the target restores the creature's true memory

Is there any real way to say that you should cast any of these spells on someone, apart from accidentally falling over the 10 minute span that has been changed and, knowing what is going on? Has actually passed, do you realize that their memories do not correspond to reality?

So, in short … apart from knowing the victim of the spell and the events that were so well falsified that you can personally verify that a memory is incorrect … is there any way to detect a victim Modify Memory?

How can I create a Blogger Emporio theme to display the "last modified date" of the messages

I have the Blogger emporio theme active on my blog, but I have tried various methods to add the last modification date to all my posts, but none of them worked correctly. Is there anyone with a detailed tutorial on how to do this?

Thanks in advance !!!

php – Insert the content of a page in another page with a modified variable

I am trying to use this simple code to insert the content of the page (1) into another page (2):

 post_content);
?>

So far so good. The inserted page (1), however, is html code that at one point contains

value=""

Is there a way to change the value of this variable in the code above, i.e. on page (2)?

Thank you!

Need some modified photos / photoshoped

Hi all

I need some edited photos / Photoshop deleted / changing background. Please contact me only if you can do it today and at the price you are looking for.

Payments via paypal only.

Thank you