Is the homepage considered in_active_trail?

I’m learning Drupal 8, so still very new to it. I’m working on customizing the main menu. I’ve been able to add Twitter Bootstrap to my custom theme. I’ve made a custom menu–main.html.twig file.

I’m trying to change the “is-active” class to “active” using what Drupal has available. I see when I click to my About page that they About link is highlighted with the active link class. Great!

What I can’t seem to figure out is how do I get the Home page to get the active class too? It looks like it is being treated differently.

I tried adding a new page called Homepage, but that didn’t work either.

Here is my twig file, which i took pieces from another theme that use twitter bootstrap to try to compile it together.

{% import _self as menus %}  {#   We call a macro which calls itself to render the full tree.   @see http://twig.sensiolabs.org/doc/tags/macro.html #} {{ menus.menu_links(items, attributes, 0) }}  {% macro menu_links(items, attributes, menu_level) %}   {% import _self as menus %}   {% if items %}     <div class="collapse navbar-collapse" id="navbarSupportedContent">     {% if menu_level == 0 %}       <ul{{ attributes.addClass('nav navbar-nav mr-auto') }}>     {% else %}       <ul class="navbar-nav mr-auto dropdown-menu">     {% endif %}     {% for item in items %}     {%       set classes = [         menu_level ? 'dropdown-item' : 'nav-item',         item.is_expanded ? 'menu-item--expanded',         item.is_collapsed ? 'menu-item--collapsed',         item.in_active_trail ? 'active',         item.below ? 'dropdown',       ]     %}     <li{{ item.attributes.addClass(classes) }}>       {%           set link_classes = [             not menu_level ? 'nav-link',             item.in_active_trail ? 'active',             item.below ? 'dropdown-toggle',             item.url.getOption('attributes').class ? item.url.getOption('attributes').class | join(' '),           ]         %}         {% if item.below %}           {{ link(item.title, item.url, {'class': link_classes, 'data-toggle': 'dropdown', 'aria-expanded': 'false', 'aria-haspopup': 'true' }) }}           {{ menus.menu_links(item.below, attributes, menu_level + 1) }}         {% else %}           {{ link(item.title, item.url, {'class': link_classes}) }}         {% endif %}       </li>     {% endfor %}     </ul>   </div>   {% endif %} {% endmacro %} 

Update: I went into Views in my admin panel and edited the Frontpage. I noticed that it was not assigned to any menus. I changed that by adding it to the main menu. Looked at my homepage and the Home link is now highlighted as the active page.

So, what worked is adding it through the view page. What did not work was adding the homepage from the “menu” screen where you build the menu. Clearly the homepage is treated differently from other pages in the menu and if you add it via the menu panel, it is not considered as part of in_active_trail. I don’t totally understand so I am hoping that someone can explain this to me.

Now, my question is did i do this right?

Is fleeing from battle considered “acting under attack”?

A short movement is’nt enough to flee from battle, since the opponent can do a short movement AND an attack: “A character can also try to make a short move and take another (relatively simple) physical action, like make an attack” (p. 208)

So to completely flee from combat a long movement is required.

Page 227 of Cypher-system states that anything but moving grant an immediate extra attack from the opponent. But it is also specified that the character “is assumed to be moving slowly and carefully out of the fight”.

While this is surely true for a short movement, this is also valid for a long movement?

What is considered a class feature for a monster for the purpose of Change Shape?

It’s well understood that Spellcasting in a creature’s stat block is a class feature. For the purposes of Change Shape and similar abilities where the term “class features” has mechanical importance, are there any other class features in official monster stat blocks? The wording in Monster Manual implies that such things could exist, but do they, and if so how do we tell?

Example cases:

  • Kobold Scale Sorcerer’s Sorcery Points vs Sorcerer? Would a shape changed Couatl be able to sorcerize its innate spells?
  • Drow Shadowblade’s Shadow Step vs Shadow Monk?
  • Firenewt Warlock’s Imix’s Blessing vs Fiend Warlock’s Dark One’s Blessing?
  • Githzerai Anarch’s Psionic Defense and Unarmed Strike vs Monk? (I don’t think we’re in class feature any more.)
  • NPC Assassin’s Assassinate, Evasion, and Sneak Attack vs Assassin Rogue?

Why is the Psionic Artificer considered to be better than all other tier 1 classes?

The tier list over on GitP considers the Psionic Artificer to be “tier 0” and lists a few reasons explaining why. The primary justifications given for this (as seen here and here, and debated here) appear to be as follows:

  1. Due to a rule on page 232 of the Magic Item Compendium, Psionic Artificers can make pretty much anything that a regular Artificer can.
  2. The Spell-to-power Erudite puts all arcane and (with a little bit of tinkering) divine magic in the reach of Psionic Artificers. In line with the normal Artificer and Spell-to-power Erudite tricks, this also allows for exploits like access to a level 1 Haste spell/power.
  3. Dorjes can contain higher level powers than wands.
  4. Access to Psionics allows for some tricks that can not be obtained elsewhere, such as playing as a sandwich.

This is all well and good and certainly does a great deal to explain why the Psionic Artificer is superior to its non-Psionic equivalent. However, I do not see how this is sufficient to bump the class up a tier or explain why it is superior to the other tier 1 classes. For example, the Spell-to-power Erudite also has access to basically any psionic power and arcane or divine spell and therefore ought to be just as powerful and versatile as the Psionic Artificer. Furthermore, I’m of the belief that actual magic is almost always better than magic items. Is there some factor that I’ve overlooked?

Is a RecyclerView.Adapter considered as a controller or view in the MVC architecture?

In this Android app I’m creating I use a RecyclerView.Adapter and I’m supposed to follow the MVC architecture. I am confused about where the adapter should belong. It makes sense to consider it as a controller since it takes data from the model and binds it to the view. At the same it does not deal with any business logic code, so could it be considered as a view then?

Are Belavia flights out of Kaliningrad considered domestic or international

Since 2017 flights between Russia and Belarus are no longer considered domestic ones, i.e. there is passport control.

As of 2019, does this apply to all Russian airports?

I am planning to fly from Kaliningrad to Minsk on Belavia in June and wanted to confirm whether I will go through immigration to get a Russian exit stamp when doing so.

Multiple links from same domain (different pages) considered in score of backlinks?

Hi,

Let’s say there are multiple backlinks from different pages of same domain to different pages of other domain like below:

Website A: Page 1 ———–> Website B: Page 1

Website A: Page 2 ———–> Website B: Page 2

Do the pages of Website B pages will get backlinks authority equally or they don’t get much backlinks impact as they have multiple backlinks from same domain?

There were old school stories that Google ignores second link from same domain…..etc… So, please suggest on this.

Thank you.

Note: The question is NOT about content relevancy or domain authority score of the backlinks.

Why is the blank symbol not considered part of the input alphabet of a Turing machine?

Definitions of Turing machines are always explicit about the blank symbol not being part of the input alphabet.

I wonder what goes wrong when you would make it part of the input alphabet, because effectively the blank symbol already seems to be part of the input.

To explain that ‘seems’ in the last sentence, consider the following.

In the default setup, an infinite number of blank symbols appear on the right of the input. When the tape head moves over the first blank symbol, computation can just continue. as it doesn’t need to be an accept or reject state.

Now suppose the computation would subsequently write symbols from the input alphabet to the right of that first blank symbol, then return to the leftmost position while also returning to the start state. It would then ‘start over’ with a different tape. Effectively, it now starts with a different input, where there are input symbols to the right of the blank that weren’t there before. The input seems to effectively include the blank symbol. The further behavior of the machine could now also be different: after encountering the blank again, it will now encounter different symbols to the right.

Supposing this scenario is indeed possible, why wouldn’t you consider the blank symbol part of the input alphabet and why wouldn’t you allow including it as part of the ‘initial’ input?

Perhaps it is just a way to define the input such that it isn’t always infinite?

Would this system be considered decentralized or distributed?

I am currently working on a report regarding a matrix multiplication distribution system I have been working on. But after reading a lot of somewhat contradictory sources online I have become in doubt whether the network created by the system would classify as being decentralized or distributed.

As I have attempted to illustrate below it essentially uses a master/slave model but in addition masters may also serve as slaves for other master or themselves simultaneously. A master carries out jobs, which are equations that uses matrix multiplication, by partitioning them into tasks, that is a subset of the original equation. An example would be the equation: A*B*C*D*E*F, which could be partitioned into the following tasks: A*B, C*D and E*F. The tasks are then distributed and computed across the master’s slaves. Once the master has received the result from each tasks they may produce a final result, ending the job.

enter image description here

To my understanding a decentralized network is one which features multiple centers of communication in form “central nodes”. But, although I cannot find anyone specifying it, it seems to me that there cannot be any overlap in the nodes associated to the central nodes, which is the case in our network. At the same time it does not feel completely distributed either since each master is working in a centralized manner.

How would you classify it?

is having a `set-cookie: sessionid=xxxxxxx` in every response considered bad practice?

My Django application sets a set-cookie: sessionid=xxxx on every response. I can see the purpose of this: By setting the expire time, the time when the browser should drop the cookie can well be controlled, and set to an up to date value every request made.

Two things:

  • A security expert told me, that this is at least “un-normal” behaviour, noramlly the sessionid cookie should be set on login only, and the server would then just invalidate the cookie if it’s no longer valid
  • My current configuration is SESSION_EXPIRE_AT_BROWSER_CLOSE=True (https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-SESSION_EXPIRE_AT_BROWSER_CLOSE), so, the expire is no more a thing, right, and in theory, setting the cookie after login only would be ok.

But, I from my side see no downside on setting the header on every response – I mean, I pass it on to the server with every request already…?