How to prevent wireshark translating macsec protocol into the original protocol

I am trying macsec between computers. Currently, the encryption mode is disabled, the state of the exchanges is categorized as “protected” by macsec.

I got a Wireshark capture from ubuntu to understand the difference between the two.

When doing a ping through the macsec interfaces from a peer to the other and looking at the capture I get these results:

  • Ubuntu, Wireshark displays the macsec packet (ping request) and the ICMP frame (ping reply).
  • Windows, Wireshark displays both reply and request as ICMP protocol (the 802.1AE tag is still in the packet).

Where can I force Wireshark to display macsec protocol instead of ICMP?

Edit : When the encryption mode is on, windows display macsec packet as it is because he doesn’t know what’s inside.

i18n l10n – Translating Menu Item Programmatically?

I have been trying to translate menu items programmatically but upon saving it just adds the english field value to all my translations.
Below is the code I am trying to execute:

 if ($entity->hasTranslation($language->getId())) {
      //For update
      $entity->removeTranslation($language->getId());
    }
    try {
      $entity->addTranslation($language->getId(), ('title' => 'abcd'))->save();
    } catch (EntityStorageException $e) {
      Drupal::logger('Menu-Translation')->error($e->getMessage());
      Drupal::messenger()->addError(t('Failed to add translation for ' . $language->getName()));
    }

I am debugging and I think the issue lies in the line :

$entity->addTranslation($language->getId(), ('title' => 'abcd'))->save();

Any help would be appreciated. Thankyou.

I will translate 500 words or more from english to german or german to english for $5

I will translate 500 words or more from english to german or german to english

Are you looking for a professional German <-> English translation with a quick turnaround?My name is Patrick, and I am a native German working as a freelance translator for well over 4 years full-time now besides working on my Bachelor’s degree in Chemistry. I have over 20 years of language experience and have completed nearly 4000 orders for clients worldwide so far.How this gig works:- Contact me and send me the details of your project along with your work files.- Let me know when you would like to have it back.- Leave everything else to me!When booking this gig, you can expect:- Professional translation work- German native with 20 years of Experience in English- Over 4 years of full-time translation experience- Systematic workflow due to my science background- Fast communication with me directly- NO outsourcing- 100% satisfactionNothing is too technical for my translation ability. I have worked on all kinds of topics in every different grade of complexity imaginable in the past.Thanks, and I look forward to working with you!

.

8 – Always keep admin UI in English when translating content

How can I prevent the admin UI switching to a foreign language every time I translate a piece of content?

i.e. I’m editing a Menu item and I’ve clicked the Translate tab.
I click ‘Add’ in the German row to add a translation.

However the link always begins /de, which means all the UI labels change as well – to get back to English I have to manually remove it from the address bar and (it seems) do so every single time.

Is there any way to turn this off?

I tried going to Detection and Selection (/admin/config/regional/language/detection) and checking ‘Account Administation pages’, or checking ‘User’ and promoting it to the top of the list, but this didn’t seem to make any difference to the button URL or the form output.

algorithms – Translating the in-order index of a node in a complete, balanced binary tree into the level-order index

Consider the topmost part of a complete, balanced binary tree of all 64-bit numbers, exemplified here.
As highlighted by the lack of a 7*2^64/8 term it is not necessarily full, but it is always complete. The nodes are stored in numerical order (in-order) in a list of which I know the size, and I have the index (call it the in-order index) of a node in that sorted list.

I’m trying to get the index (call it level-order index) of that same node if the array was stored according to the breadth-first traversal order (level-order) of the tree instead. In the example, the tree root would have level-order index 0 and in-order index 3.

What I’ve found already is that the level-order index consists of two parts:

  • A base part which is the amount of nodes contained in the full tree above the level in which the node resides.
  • An offset part which is the amount of nodes to the left of this node in the level in which it is contained.

Summed together, they produce the level-order index.

I’ve been able to solve this for the full tree case, as then the level at which a node is contained is the number of times its in-order index + 1 is divisible by 2. However, for the general case in which the tree is not necessarily full, how would that base part be calculated from the in-order index?

Of course, it is possible by iterating the tree programmatically, but since the exact layout and contents of the entire tree are known simply from the amount of nodes that it contains, I was wondering whether a mathematical relation between these two indices holds. Does anyone have an idea?

complexity theory – Are there more succint algorithm for translating NFA’s to DFA’s?

When translating an NFA to its deterministic equivalent, we get an exponential blowup due to the powerset construction method. I tried to search but couldn’t find an appropriate question regarding this question:

I was wondering if there are algorithms that are better, even if it’s just a tiny bit, for translating NFAs to DFAs?

unity – Translating object 2’s movement on object 1

I am moving Object 1 with the translation of the object 2. That is, it should not copy the object 2’s position, but instead moving in the same direction/angle as the object 2 is moving. I am stuck at this point where I must add a certain offset if the object is moving Left/Right/Up/Down, since it may be positive/negative floating value. So how do I add an offset to object 1’s position?

The problem with the below code is that the object2 comes in position of object1 and then translates which is not what I want.

    public Vector3 offsetPosition;

    public Transform Object2;

    // Update is called once per frame
    void Update () {
        offsetPosition = Object2.transform.position - this.transform.position;
        this.transform.position = new Vector3 (Object2.transform.position.x, this.transform.position.y, Object2.transform.position.z) - new Vector3 (offsetPosition.x * 0.02f, 0, offsetPosition.z * 0.02f);
    }

Translating ACF field value as string with WPML

I have created repeater field with ACF with fields:

  1. Movie name
  2. description
  3. Award (which is Radio button with choices: 1. Award, 2. Award, Grand Prix)

I im displaying this with:

<?php $award = get_sub_field('award'); ?>
<?php _e($award, 'Themestring'); ?>

And everything is working fine except WPML does not recognize that as a string for String translation.
Any suggestion?

procedural generation – Translating conditions (“If A has B, then true”) into objects that satisfy them (“A has B”)

I have a system where I’m sifting through a large number and variety of objects in my game, looking for objects that match an arbitrary search criteria that can be simple or complex.

For example, suppose a Foo has three integer properties, A, B, and C. I might search the list of Foo objects three times. First, I want to find a Foo where A>5. Second, I might want to find a Foo where A<B or B=8. Third, I might want to find a Foo where A=2, B=6, C>A, and C<B. The point is that I could arbitrarily pass any of a very wide set of conditions into the search.

Now here’s my problem. In all cases, if I can’t find an item that matches these criteria, I want to create a new Foo that does match, and add it to the list of Foo objects.

The thing I’m wrestling with is figuring out an underlying system of representing conditions that allows me to then create an item that directly matches those conditions. So far I’ve got two ideas, neither of which I’m a fan of:

  • Repeatedly generate random Foo objects across the span of possible properties, until applying the criteria to one of them results in true. Given the possible permutations involved, this feels like an absolute performance nightmare, and would probably require a ton of caching logic to track what possibility spaces have already been tried.
  • Establish a list of individual conditions with isolated variables (such as a GreaterThan condition with the referenced property that indicates whether the property is A, B, or C; and the target value) and create a corresponding declaration (Make (property) a random value between (targetValue) and (propertyMax)). Not only is this incredibly tedious, but I’m also not really confident I understand how it would work, particularly in C# but more generally also. This feels like self-reading code and that’s something I have no experience with.

My question is, basically, what designs and techniques can I use to address this sort of issue – the need to create objects that match criteria, when those criteria could be arbitrary? Surely this has come up in other projects. What kinds of constraints or frameworks are applied to make this doable?