magento getProductCollection adds a random order and excludes a product ID only from the output

I want to obtain a random product from the identification of the category that is working, but I want to exclude a particular product identification from outside and show the output in random order

Below is my code, help me with the way I can get a random order and exclude product identification

$cateinstance = $objectManager->create('MagentoCatalogModelCategoryFactory');
$cateid = $allcatsmain;
$allcategoryproduct = $cateinstance->create()->load($cateid)->getProductCollection()->setPageSize(4)->addAttributeToSelect('*');

movement – Pathfinding: higher order splines

In this document, Amit explains that splines can be used to achieve movement in a found path.

In the image below, he explains that "blue roads use splines, dark blue being low order splines and light blue being a higher order spline."

What exactly are high order splines? How to achieve the light blue movement?

enter the description of the image here

dnd 3.5e – For a creature's natural attacks, is it possible to change the order of attacks?

If you can

First, the harpoonment already comes with a free bite attack, so you wouldn't even need to perform a full attack. But according to written rules, a full attack would give you a second bite attack (possibly against a lower CA for the poison of the first bite).

The question comes down two two things. Whether or not you can change the order of your attacks, as well as whether or not you can stagger on the target between attacks.

For the first one, although I can't find any source material that says, I do think I can change the order. The reason why the source material does not need to say it is because it also did not specify that there is an order at all. A creature simply has certain attacks, they must appear in an order in the brief description of the creatures in the books, but when obtaining natural attacks they do not have an inherent order.

Take, for example, a creature created by applying some templates that give natural attacks. The template does not specify where in the order the attacks come from because there is no order. And in some cases, you can even change the order in which the templates are applied.

For the second, I found this:

Free action
Free actions consume a very small amount of time and effort. You can perform one or more free actions while performing another action normally. However, there are reasonable limits on what you can really do for free.

So, yes, you can take a free action between your attacks to attract your target.

How to migrate records of customized options from product from magento 1.7 to magento 2.x in the product edition order, invoice, shipping and credit note?

I am looking for custom option records to migrate products from magento 1.7 to magento 2.x
I have migrated all data from magento 1.7 to magento 2.2.6 but custom options are not shown.

Magento 2: event to change the order collection

Here are two orders that I received through the rest API
enter the description of the image here

How can I catch an event, observer to change the value in the API?

php – How to place a web page out of order?

I would like to know if there is any way to put my website out of order, I explain, what I want is that when you enter any address of my site redirect to another page where the announcement will be said says that it is offline

terms – Order custom taxonomy hierarchy

I have some custom taxonomy for the regions.

It would commonly look like this.

USA (parent)
- Arizona (child 1)
- - Phoenix (child 2)

however, there will be cases in which it will only be like

- Arizona


- Wales

and maybe even alone


In my for loop I get the taxonomy data as $location = get_the_terms( $id, 'listings_region' );

and then in the html / php I can simply write $location(0)->name and then I get the name of the first object in the array.

However, I have noticed that the taxonomy does not return in the correct hierarchy, but alphabetically.

When I eco & # 39;

'; print_r($location); echo '

& # 39;, I get the matrix and (0) it would be Arizona and (1) it would be USA. UU.

How can I recover the taxonomy matrix in the correct order so that (0) is ideally always the father, (1) is the first child, etc.?

Thanks in advance.

The check of an array is ordered efficiently in any order

Here is my code, it works fine, I just wonder if there is something that makes it even better.

   public static boolean isSorted(int() arr)
      int n = arr.length;
      int i = 0;
      while (arr(i) == arr(i + 1))  //  same elements at the beginning

      if (arr(i) < arr(i + 1))      //  candidate for ascending, non-decreasing

         for (; i < n - 1; i++)
            if (arr(i) > arr(i + 1))
               return false;

         return true;

      else                          //  candidate for descending, non-increasing

         for (; i < n - 1; i++)
            if (arr(i) < arr(i + 1))
               return false;

         return true;

It works fine, I just avoided any kind or other method.

Food and drink: order a cup of tea in Australia and order an extra cup

When ordering a pot of Tea in Australia In a cafe, is it okay to order two cups? Usually, a cup of tea is served with a single cup.

I like to drink tea, but I only drink one cup and I realized that a cup of tea usually contains 2 to 3 cups, and especially when traveling with someone it is cheaper to order a cup of tea.

The reason I ask this is because I have received several reactions:

  • Some waitresses frown or make a face when I ask for another cup.
  • In a cafe, the waitresses asked me if I wanted another cup.
  • Once the waitresses said "I can get you a cup, but that teapot is only for one person", while in reality the teapot had enough tea for two cups.
  • Once after ordering a cup, the waitresses didn't bring one or maybe they forgot about it.

I usually have the first reaction.