## Display total count of items next to users (created by)

I have a list where contributors in the organization can submit their resolutions as a results of their troubleshooting process. I want to display the top 10 contributors with the total count of contribution submissions next to their names in a web part:

Example: Top 10 Contributors: 1. createdbyname1 (12) 2. createdbyname2 (10) 3. createdbyname3 (8) etc.

## Context

The Eldritch Knight in my game is looking for ways to make the spell magic circle be used quickly in battle, since casting it takes one minute. He came up with casting glyph of warding on his armor, choosing the Spell Glyph option. So when needed, he could trigger the glyph for quick use of the stored spell. If I understand the glyph spell correctly, this would work, but it would also greatly limit his mobility:

When you cast this spell, you inscribe a glyph that later unleashes a magical effect. You inscribe it either on a surface (such as a table or a section of floor or wall) or within an object that can be closed (such as a book, a scroll, or a treasure chest) to conceal the glyph. The glyph can cover an area no larger than 10 feet in diameter. If you choose an object, that object must remain in its place; if the object is moved more than 10 feet from where you cast this spell, the glyph is broken, and the spell ends without being triggered. […]

(emphasis mine)

Since mobility is quite useful in combat, he’s now thinking of casting the glyph on some small object, which he then places inside the party’s Bag of Holding:

This bag has an interior space considerably larger than its outside dimensions, roughly 2 feet in diameter at the mouth and 4 feet deep. […]

## Question

With this interaction, would he be able to use an action to retreive the item from the bag and then (for example) use Action Surge to trigger the glyph, instantly casting a stored spell (magic circle in this case)?

We’re curious about how to interpret this by RAW, if possible.

## Does ki count as magic for the purpose of an antimagic field, or is it only fluff?

I was verifying whether my fighter’s Sun Blade would in fact be a useless hilt in an antimagic field (AMF) and came across this question on a few other sites, and it piqued my interest.

My first instinct is that “no, monks can still use ki effects in an AMF because they’re just awesomely in control of their bodies” … but then I thought about the monks that nobody plays. I can’t see a monk being able to cast burning hands or any other Way of the Four Elements spells in an AMF.

## Antimagic Field (PHB, p. 213)

A 10-foot-radius invisible sphere of antimagic surrounds you. This area is divorced from the magical energy that suffuses the multiverse. Within the sphere, spells can’t be cast, summoned creatures disappear, and even magic items become mundane. Until the spell ends, the sphere moves with you, centered on you. Spells and other magical effects, except those created by an artifact or a deity, are suppressed in the sphere and can’t protrude into it. A slot expended to cast a suppressed spell is consumed. While an effect is suppressed, it doesn’t function, but the time it spends suppressed counts against its duration.

Targeted Effects. Spells and other magical effects, such as magic missile and charm person, that target a creature or an object in the sphere have no effect on that target.

Argument for ki abilities being negated by AMF:

## The Magic of Ki (PHB, p. 76)

Monks make careful study of a magical energy that most monastic traditions call ki. This energy is an element of the magic that suffuses the multiverse-specifically, the element that flows through living bodies. Monks harness this power within themselves to create magical effects and exceed their bodies’ physical capabilities, and some of their special attacks can hinder the flow of ki in their opponents. Using this energy, monks channel uncanny speed and strength into their unarmed strikes. As they gain experience, their martial training and their mastery of ki gives them more power over their bodies and the bodies of their foes.

Argument against ki abilities being negated by AMF:

## Ki-Empowered Strikes (PHB, p. 79)

Starting at 6th level, your unarmed strikes count as magical for the purpose of overcoming resistance and immunity to nonmagical attacks and damage.

It specifically doesn’t say that being Ki-Empowered is magical, leading me to believe that it isn’t magical. Therefore, it wouldn’t be negated in an AMF.

## Way of the Four Elements (PHB, p. 80)

You follow a monastic tradition that teaches you to harness the elements. When you focus your ki, you can align yourself with the forces of creation and bend the four elements to your will, using them as an extension of your body…

Again, it doesn’t say anything about interacting with the Weave or making a genuinely magical effect. That said, it also doesn’t say that the element needs to be present for it to be manipulated (thinking of Avatar: The Last Airbender imprisonment methods for different benders). As such, you’re still creating the elements from nothing.

That being said, there’s plenty of flip-flopping through the disciplines as to whether something duplicates the effect of a spell being cast or whether the monk is actually casting a spell.

## Do temporary hit points count as part of the HP for resisting certain magical effects?

Temporary hit points in Dungeons & Dragons are a mechanic that allows “a buffer against damage” (PHB 198). There are a few spells of note that can affect a character based on how many hit points they currently have, most notably sleep, power word stun, and power word kill.

Does temporary HP count towards the HP total for determining resistance for these effects?

## How to count this Conditional Probability

How do you count to get the values in the table?

## Would getting a natural 20 with a penalty still count as a critical hit?

Since rolling a number up to 20 with modifiers (an example 17 + 3) is not counted as a critical hit, what happens in the following case?

If I roll a natural 20 and because of penalties end up with a total of less than 20 (an example 20 – 3) does it still count as a critical hit? Or in this case would it resemble the natural 1 with positive modifiers taking you out of critical error?

## Open,read, count rows in google spreadsheet and update the count in email using c# winform application

I’m doing an automation right now. Details are given below:

1. Open google spreadsheet, the sheet will have 2 columns and n number of rows. Each row has will have value 1, 2 and 3.

2. Count of 1,2 and 3 has to be updated in the table

3. The table has to be sent in email

Till now, I’ve completed mail stuff and other design works.

I’m totally new to this and I’m in need of complete help in completing this project.

I need code of working and counting the values of 1,2 and 3 and updating the same in a table

I’ll be ready to provide any kind of input

## Count compound words with an ambiguous decomposition

I have a set of words $$D$$, and I make compound words by concatenating a fixed number $$n$$ of words from $$D$$ (repetitions are allowed). Let’s call such words $$n$$-compounds. I want to know how many distinct compound words can be formed, and how many $$n$$-compounds can be formed in $$a$$ ways for each value of $$a$$. For example, if $$D$$ is {hell, hello, open, pen} and $$n=2$$, the compound word hellopen can be formed as hell + open or hello + pen, so there are 16 distinct pairs of words in $$D$$, but only 15 distinct 2-compound words over $$D$$.

Formally, let $$\mathscr A$$ be a finite alphabet of size $$\ge 2$$, $$D$$ a finite set of words of length $$\ge 2$$ over $$\mathscr A$$, and $$n \ge 2$$ an integer. The set of valid $$n$$-compound word is $$C = \{ u_1 \ldots u_n \mid (u_1, \ldots, u_n) \in D^n \}$$. Let’s call ambiguity of a word $$w$$ the number of $$n$$-tuples $$(u_1, \ldots, u_n) \in D^n$$ such that $$u_1 \ldots u_n = w$$. (So an ambiguity of 0 means that the word is not in $$C$$, an ambiguity of 1 means that the word can be decomposed uniquely, and larger ambiguities mean words that can be formed in multiple ways.)

I would like to calculate the number of distinct compound words, i.e. the size of $$C$$. I’m also interested in the number of words with ambiguity $$a$$ for each value of $$a$$, and especially the number of unambiguous compounds ($$a=1$$). This can obviously be done by enumerating all $$|D|^n$$ combinations and storing their multiplicity in a multiset structure, but that has a huge memory and time cost. Is there a better way? I have a feeling it would help to build a set of prefixes and suffixes, but I can’t figure out how to chain those together.

If the exact calculation is impractical, I would be satisfied with an estimate. How can I sample my dictionary to get a reliable estimate? Also, if there’s a method that works well except in some pathological cases, and it’s possible to avoid those pathological cases by removing a few words from $$D$$, that’s still fine for my application.

I am specifically interested in the following practical use case: $$D$$ is a set of a few thousand common English words (all lowercase), and $$n$$ is about 3 to 8. The application is the generation of “correct horse battery staple” style passwords: how much bias is introduced if you don’t put spaces between words?

## Magento 2 help validate function to count bundle product child items of an order

I’m trying to write a function that takes an order object, and returns an array of sku => qty (key-value) showing how many of each sku was sold/shipped.

The tricky part is, magento formats line items differently on configurable and bundle products.

Example:

Line1: name shirt-X2, type bundle, ordered 2, shipped 2. Line2: name shirt, type simple, ordered 4, shipped 0. // <-- my problem 

I’ve written this code:

/**  * @param \Magento\Sales\Model\Order $order * @return array */ public function getOrderData($  order) {     $result = []; foreach ($  order->getAllItems() as $item) { if ($  item->getProductType() != 'simple') {             continue;         }         $sku =$  item->getSku();         $orderedReal =$  item->getQtyOrdered();         $orderedB =$  item->getQtyOrdered() - $item->getQtyRefunded() -$  item->getQtyCanceled();         $orderedB = max(round($  orderedB, 8), 0);         $invoicedB =$  item->getQtyOrdered() - $item->getQtyInvoiced() -$  item->getQtyCanceled();         $invoicedB = max(round($  invoicedB, 8), 0);         $shippedReal = 0;$  isShipped = false;         if ($item->getParentItem()) {$  parent = $item->getParentItem(); if ($  parent->getQtyOrdered() > 0 && $parent->getQtyOrdered() ==$  parent->getQtyShipped()) {                 $isShipped = true; } } else { if ($  item->getQtyOrdered() > 0 && $item->getQtyOrdered() ==$  item->getQtyShipped()) {                 $isShipped = true; } } if ($  isShipped) {             $shippedReal =$  orderedReal;         }         $result[] = [ 'sku' =>$  sku,             'invoiced' => $invoicedB, 'ordered' =>$  orderedB,             'shipped' => $shippedReal ]; } return$  result; } 

Is this function valid, or could it be improved ? Any help is appreciated.

Thanks