What counts as a target for a spell?

There have already been several questions regarding what counts as a target for a spell; some, such as this Q/A, are regarding glyph of warding as it states:

The spell must target a single creature or an area…

And others, such as this Q/A, this Q/A, and this Q/A are regarding the Sorcerer’s Twinned Spell Metamagic which states:

When you cast a spell that targets only one creature and doesn’t have a range of self… To be eligible, a spell must be incapable of targeting more than one creature at the spell’s current level…

There was already this Q/A on “What qualifies for the target of a spell” but this was about worn and carried items/objects not what actually makes something a target.

Jeremy Crawford clarified in the 19/JAN/2017 Sage Advice segment of the Dragon Talk podcast that if a spell affected anything, then it targeted that thing. But now that this is unofficial, I am wondering how to interpret this usage of the word “targets”.

How do I know if a spell targeted something/somebody?

To show total category counts for on category in Magento admin on Category page?

I would like to show total category count for that category under Add Sub Category (before collapse/expand all links) button on the left side.

Total category count should considers subcategories also. e.g. if i m on Default Category(Root category) then it should cover from What’s New to Fitness Membership but not Gear(as this is not children) while calculating.

For category count, using below function which is working fine at the moment but i do not know how to add that dynamic text under “Add Sub Category“.

$  childrenCategories = $  this->getChildCategories($  category); 

Here $ category would be object.

enter image description here

What counts as a spellcasting focus for bards?

Inspired by this question: Can a multi-class spellcaster have one thing be two different focuses?

The PHB, on p54 says:

Spellcasting focus

You can use a musical instrument (found in chapter 5) as a spellcasting focus for your bard spells.

And yet on p53, the PHB in the introductory description of bards, gives examples of three bards:

Bard #1:

Humming as she traces her fingers over an ancient monument in a long-forgotten ruin, a half-elf in rugged leathers finds knowledge springing into her mind, conjured forth by the magic of her song—knowledge of the people who constructed the monument and the mythic saga it depicts.

Bard #2:

A stern human warrior bangs his sword rhythmically against his scale mail, setting the tempo for his war chant and exhorting his companions to bravery and heroism. The magic of his song fortifies and emboldens them.

Bard #3:

Laughing as she tunes her cittern, a gnome weaves her subtle magic over the assembled nobles, ensuring that her companions’ words will be well received.

In each example, the implication is that the bard is casting a spell, and the implication is that the action of the bard is central to the magic, and at least to my reading, that the voice, sword/mail, and instrument are spellcasting foci. Maybe it is meaningless fluff, or maybe the implication is that those are all spellcasting foci.

There are two parts to my question:

  • Is it reasonable to assume that RAW or at least RAI that the implication is that in the case of bards, they can use 1) their voice, 2) an improvised musical instrument, or 3) a bought musical instrument?

  • And if such an assumption isn’t RAW/RAI, what are the implications to allowing it as a house rule?

What counts a a magically propelled attack for the 2019 UA Artificer’s Arcane Armament feature?

The (May 2019 Unearthed Arcana) Artificer class gets a feature that works very much like the Extra Attack feature from several existing classes, but with some additional limitations (emphasis added):

Arcane Armament

Starting at 5th level, you can attack twice, rather than once, whenever you take the Attack action on your turn, but one of the attacks must be made with a magic weapon, the magic of which you use to propel the attack.

The requirement to attack with a magic weapon is clear enough, but the final clause highlighted in bold is less clear. Presumably most attacks with magic melee/thrown weapons would not qualify as “magically propelled”, but what about magic ranged weapons, like bows and crossbows? Are they propelling their arrows/bolts using magic and therefore eligible for use Arcane Armament? What if the magic weapon doesn’t grant a bonus to the attack/damage rolls, but rather has some other effect (e.g. a mundane bow with Arcane Weapon cast on it)? If these would all be eligible for Arcane Armament, is there any ranged magic weapon that wouldn’t be eligible?

In essence, what determines or not whether a particular magic weapon uses its magic to propel the attack? Is it just any ranged, non-thrown, magic weapon, or something more complex?

How to exclude replies from muted Twitter accounts in reply counts shown in TweetDeck?

On Twitter, I prefer to get rid of unpleasant replies by muting rather than blocking, as muted accounts don’t know they’re muted and also aren’t shown a “you are blocked” page to either complain or gloat about. However, on my end, the issue is that when a muted account replies to your tweet, it’s added to the reply count. For reasons of being somewhat neurotic, I don’t want to see any visual indication that muted accounts have replied to me, so I’d want their replies excluded from the reply count altogether – into the void they go.

Is there a way to subtract or otherwise exclude replies from muted accounts from your tweets’ reply counts?

I’m looking for a solution that specifically works with TweetDeck in Firefox. I know you can do some nifty things through coding in Tampermonkey and the likes, but I’m not a coder so I don’t know how to approach this, if it’s even possible.

My apologies if this is the wrong place to ask this, but I wasn’t sure where else to do so.

Dynamically adjusting thread pool sizes and http connection counts [on hold]

I am working on a transaction interface API where we are setting hardcoded thread pool sizes and connection counts, which we adjust by running manual stress tests and measuring how many transactions go through per second, and tweaking those by hand until we get acceptable numbers.

This got me thinking there should be a way for the application to do it itself based on certain parameters but not sure how to go about it. What are some approaches to automate this process?

This is a Spring based web API if that is relevant.

How to apply Memory Allocation? (eg. malloc, calloc, free) This C Program counts the amount of words in a list?

Considering the code provided by @David C. Rankin in this previous answer:


How do you optimise this code to include Memory Allocation for much larger text files? With this code below it will complete for small .txt files.

However, what is the best way to set memory allocation to this code so that C (Programming Language) does not run out of memory. Is it best to use linked lists?

/**  * C program to count occurrences of all words in a file.  */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <limits.h>  #define MAX_WORD     50     /* max word size */ #define MAX_WORDS   512     /* max number of words */  #ifndef PATH_MAX #define PATH_MAX   2048     /* max path (defined for Linux in limits.h) */ #endif  typedef struct {            /* use a struct to hold */     char word[MAX_WORD];    /* lowercase word, and */     int cap, count;         /* if it appeast capitalized, and its count */ } words_t;  char *strlwr (char *str)    /* no need for unsigned char */ {     char *p = str;      while (*p) {         *p = tolower(*p);         p++;     }      return str; }  int main (void) {      FILE *fptr;     char path[PATH_MAX], word[MAX_WORD];     size_t i, len, index = 0;      /* Array of struct of distinct words, initialized all zero */     words_t words[MAX_WORDS] = {{ .word = "" }};      /* Input file path */     printf ("Enter file path: ");     if (scanf ("%s", path) != 1) {  /* validate every input */         fputs ("error: invalid file path or cancellation.\n", stderr);         return 1;     }      fptr = fopen (path, "r");   /* open file */     if (fptr == NULL) {         /* validate file open */         fputs ( "Unable to open file.\n"                 "Please check you have read privileges.\n", stderr);         exit (EXIT_FAILURE);     }      while (index < MAX_WORDS &&                 /* protect array bounds  */             fscanf (fptr, "%s", word) == 1) {   /* while valid word read */         int iscap = 0, isunique = 1;    /* is captial, is unique flags */          if (isupper (*word))            /* is the word uppercase */             iscap = 1;          /* remove all trailing punctuation characters */         len = strlen (word);                    /* get length */         while (len && ispunct(word[len - 1]))   /* only if len > 0 */             word[--len] = 0;          strlwr (word);                  /* convert word to lowercase */          /* check if word exits in list of all distinct words */         for (i = 0; i < index; i++) {             if (strcmp(words[i].word, word) == 0) {                 isunique = 0;               /* set unique flag zero */                 if (iscap)                  /* if capital flag set */                     words[i].cap = iscap;   /* set capital flag in struct */                 words[i].count++;           /* increment word count */                 break;                      /* bail - done */             }         }         if (isunique) { /* if unique, add to array, increment index */             memcpy (words[index].word, word, len + 1);  /* have len */             if (iscap)                      /* if cap flag set */                 words[index].cap = iscap;   /* set capital flag in struct */             words[index++].count++;         /* increment count & index */         }     }     fclose (fptr);  /* close file */      /*      * Print occurrences of all words in file.      */     puts ("\nOccurrences of all distinct words with Cap in file:");     for (i = 0; i < index; i++) {         if (words[i].cap) {             strcpy (word, words[i].word);             *word = toupper (*word);             /*              * %-15s prints string in 15 character width.              * - is used to print string left align inside              * 15 character width space.              */             printf("%-15s %d\n", word, words[i].count);         }     }      return 0; } 

Example Use/Output

Using your posted input

$   ./bin/unique_words_with_cap Enter file path: dat/girljumped.txt  Occurrences of all distinct words with Cap in file: Any             7 One             4 Some            10 The             6 A               13