The Devil's Tongue trait from SCAG states:  Devil's Tongue. You know the vicious mockery cantrip. When you reach 3rd level, you can cast the charm person spell as a 2nd-level spell once with this trait. When you reach 5th level, you can cast the enthrall spell once with this trait. You must finish a long rest to cast these spells once again with this trait. Charisma is your spellcasting ability for them. [...]  It's pretty clear that the trait enables the Tiefling to cast the two later spells from the trait once per long rest without using spell slots (due to it saying with this trait, instead of with a spell slot). My Question My question is, could the Tiefling, who is also a Sorcerer, cast them using spell slots during the rest of the adventuring day? Questions I am not asking  I'm not asking &quot;Can I cast a spell that isn't on my class' spell list?&quot;.  The general rule is that characters only have access to spells on their spell lists. The Devil's Tongue trait adds a specific rule that says you can cast this spell with this trait (which means you have access to it despite it not necessarily being on your class' spell list). This question is the next logical step, given that you have access to this spell from  can you also cast it using your class' spell slots?   I'm also not asking &quot;Do I have to use spell slots to cast these spells?&quot;  As mentioned in my question I regard this as obvious that you can
A 10th level Drow warlock (for instance) has the following Drow Magic racial trait (PHB p. 24), in addition to its warlock spellcasting abilities:  You know the dancing lights cantrip. When you reach 3rd level, you can cast the faerie fire spell once per day. When you reach 5th level, you can also cast the darkness spell once per day. Charisma is your spellcasting ability for these spells.  Can the Drow warlock cast faerie fire (which is not on the warlock spell list) using a warlock spell slot? Can it cast darkness (which is on the warlock spell list) using a warlock spell slot?  The  says this about the Magic Initiate feat:  If you’re a spellcaster, can you pick your own class when you gain the Magic Initiate feat? Yes, the feat doesn’t say you can’t. For example, if you’re a wizard and gain the Magic Initiate feat, you can choose wizard and thereby learn two more wizard cantrips and another 1st-level wizard spell. If you have spell slots, can you use them to cast the 1st-level spell you learn with the Magic Initiate feat? Yes, but only if the class you pick for the feat is one of your classes. For example, if you pick sorcerer and you are a sorcerer, the Spellcasting feature for that class tells you that you can use your spell slots to cast the sorcerer spells you know, so you can use your spell slots to cast the 1st-level sorcerer spell you learn from Magic Initiate. Similarly, if you are a wizard and pick that class for the feat, you learn a 1st-level wizard spell, which you could add to your spellbook and subsequently prepare.  But this specifically requires you to pick the feat for one of your classes to be able to cast the spell learnt using your class spell slots, and does not seem directly applicable. A Warlock can use warlock Pact Magic spell slots to cast spells learnt from levels of another spellcasting class, per the multiclass spellcasting rules (PHB p. 164):  If you have both the Spellcasting class feature and the Pact Magic class feature from the warlock class, you can use the spell slots you gain from the Pact Magic feature to cast spells you know or have prepared from classes with the Spellcasting class feature, and you can use the spell slots you gain from the Spellcasting class feature to cast warlock spells you know.  Similarly, if the warlock has learnt the invocation Mask of Many Faces (PHB p. 112)...  You can cast disguise self at will, without expending a spell slot.  ...Can the warlock cast disguise self using a spell slot, e.g. to decrease the chance it can be dispelled?
A generic list of anonymous class In C# 3.0 you can create anonymous class with the following syntax  var o = new { Id = 1, Name = "Foo" };   Is there a way to add these anonymous class to a generic list?  Example:  var o = new { Id = 1, Name = "Foo" }; var o1 = new { Id = 2, Name = "Bar" };  List&lt;var&gt; list = new List&lt;var&gt;(); list.Add(o); list.Add(o1);   Another Example:  List&lt;var&gt; list = new List&lt;var&gt;();  while (....) {     ....     list.Add(new {Id = x, Name = y});     .... } Faithful group actions for singleton group or for empty set Let $G$ be a group, possibly a singleton. Let $M$ be a set, possibly empty. Let $\mu: M \times G \to M$ be a right group action. Let $1_G$ be the identity of $G$.  I understand 's second definition of faithful as follows:     $\mu$ is faithful if for each $g \in G$ such that $g \ne 1_G$, there exists $x \in M$ such that $\mu(x,g) \ne x$. $\tag{1}$   Later  says if $\mu$ is free and $M$ is a non-empty set, then $\mu$ is faithful.  Question: Given the idea that we can have $M$ as an empty set, I would like to clarify: Are these correct?   If $G$ is a singleton, then every action $\mu$ is faithful, whether or not $M$ is empty. If $G$ is not a singleton, but $M$ is empty, then every action $\mu$ is not faithful. I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur.  Collection was modified; enumeration operation may not execute  Below is the code. This is a WCF server in a Windows service. The method NotifySubscribers() is called by the service whenever there is a data event (at random intervals, but not very often - about 800 times per day). When a Windows Forms client subscribes, the subscriber ID is added to the subscribers dictionary, and when the client unsubscribes, it is deleted from the dictionary. The error happens when (or after) a client unsubscribes. It appears that the next time the NotifySubscribers() method is called, the foreach() loop fails with the error in the subject line. The method writes the error into the application log as shown in the code below. When a debugger is attached and a client unsubscribes, the code executes fine. Do you see a problem with this code? Do I need to make the dictionary thread-safe? [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class SubscriptionServer : ISubscriptionServer {     private static IDictionary&lt;Guid, Subscriber&gt; subscribers;      public SubscriptionServer()     {                     subscribers = new Dictionary&lt;Guid, Subscriber&gt;();     }      public void NotifySubscribers(DataRecord sr)     {         foreach(Subscriber s in subscribers.Values)         {             try             {                 s.Callback.SignalData(sr);             }             catch (Exception e)             {                 DCS.WriteToApplicationLog(e.Message,                    System.Diagnostics.EventLogEntryType.Error);                  UnsubscribeEvent(s.ClientId);             }         }     }          public Guid SubscribeEvent(string clientDescription)     {         Subscriber subscriber = new Subscriber();         subscriber.Callback = OperationContext.Current.                 GetCallbackChannel&lt;IDCSCallback&gt;();          subscribers.Add(subscriber.ClientId, subscriber);                  return subscriber.ClientId;     }      public void UnsubscribeEvent(Guid clientId)     {         try         {             subscribers.Remove(clientId);         }         catch(Exception e)         {             System.Diagnostics.Debug.WriteLine(&quot;Unsubscribe Error &quot; +                      e.Message);         }     } } How can I check if a word is contained in another string using PHP? In Harry Potter, what kind of home life do those born to a wizard and a Muggle have? Let $\{x_n\}$ and $\{y_n\}$ be sequences of real numbers which converge to $\ell$ and $m$ respectively. Show that  $$\lim_{n\to \infty} \frac{1}{n}\sum_{k=1}^{n}x_ky_{n+1-k}=\ell m$$  This is a problem I found in a book, it seemed to be routine, but now I can't solve it.  What I tried :     Let us take some $\epsilon&gt;0$. Now after a stage $N$, both $|x_n-\ell|&lt;\epsilon$ and $|y_n-m|&lt;\epsilon$. Now I wanted to break the sum $$\left|\frac{1}{n}\sum_{k=1}^{n}x_ky_{n+1-k}-\ell m\right|$$in two parts, one upto $N$, and other one for $N+1$ to $n$. Now we need this to be arbitrarily small. But here I am lost. I don't know how to proceed anymore. Because when I take $x_i's$ to make up a finite sum, then the $y_j's$ are there too with $j$ very large. I think this is the main idea, but unable to do anything further. Can someone help me? Thanks. Are there rules for falling in water vs. diving vs. just jumping in for various depths of water? Just realized that in DMing 5e I have unconsciously used a falling-in-water rule-of-thumb that I inherited from somewhere (maybe 2e or AD&amp;D or maybe even Pathfinder). The ruling I've been using is as follows:   No damage for 20 feet of falling. Half-damage next 20 feet. Normal damage beyond that.   Realizing there should be a Strength (Athletics) for "swimming" (in context, "diving") to take even less damage with a proper dive in sufficiently deep water, I started to look for specifics on that. Am I just missing it somewhere? (Also didn't find it searching this stack.)  Are there clear 5e rules for both jumping and diving in water of various depths? I'm trying to answer the following question from the book :  Let $X_1,X_2,\dots$ be a sequence of sub-gaussian random variables, which are not necessarily independent. Show that   $E\bigg[ \max_i \frac{|X_i|}{\sqrt{1 + \log i}} \bigg] \le CK$,  where $K = \max_i \|X_i\|_{\psi_2}$. Deduce that for ever $N \ge 2$ we have   $E\bigg[ \max_{i \le N} |X_i| \bigg] \le CK \sqrt{\log N}$.  I've tried to figure out what is the distribution of the maximum of Gaussians, but I'm reaching only inequalities that that don't help me answer the question.   I've also seen a similar question .  Does anyone have a clue or something to start with in order to answer this question?  Thanks! How to set the close-laptop-lid-action? How to open a new Terminal with shell prompt and running multiple commands in Command Line? I want to Open a new Terminal in from within terminal.  It should have Shell prompt as well as already run few commands.  How to do it ? The main effect will be non-significant if the interaction is significant? Best way to list files in Java, sorted by Date Modified? I want to get a list of files in a directory, but I want to sort it such that the oldest files are first.  My solution was to call File.listFiles and just resort the list based on File.lastModified, but I was wondering if there was a better way.  Edit: My current solution, as suggested, is to use an anonymous Comparator:  File[] files = directory.listFiles();  Arrays.sort(files, new Comparator&lt;File&gt;(){     public int compare(File f1, File f2)     {         return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified());     } }); If a black body is a perfect absorber, why does it emit anything? I'm trying to start understanding quantum mechanics, and the first thing I've come across that needs to be understood are black bodies. But I've hit a roadblock at the very first paragraphs. :( According to :     A black body (also, blackbody) is an idealized physical body that absorbs all incident electromagnetic radiation, regardless of frequency or angle of incidence.   OK, that's nice. It's an object that absorbs (takes in itself and stores/annihilates forever) any electromagnetic radiation that happens to hit it. An object that always looks totally black, no matter under what light you view it. Good. But then it follows with:     A black body in thermal equilibrium (that is, at a constant temperature) emits electromagnetic radiation called black-body radiation.   Say what? Which part of "absorbs" does this go with? How can it absorb anything if it just spits it right back out, even if modified? That's not a black body, that's a pretty white body if you ask me. Or a colored one, depending on how it transforms the incoming waves.  What am I missing here? Regression with only categorical variables Is it possible to conduct a regression if all dependent and independent variables are categorical variables? Two "if"s in a row command to display time (duration) in human readable form I spent 3 hours trying to write a command to format a time (duration) expressed as a floating number (in seconds) in a nice form as follows:  if the time is &lt; 60 write as a float with 3 decimals (i.e. milliseconds)  else let h,m,s be the hours, minutes and seconds corresponding to the time      if h=0 then write as m:ss (ss always with 2 digits, m can have only 1)      else write h:mm:ss (mm and ss with 2 digits, h can have only 1)   So 1.25678 gives 1.256, 125.35 gives 2:05, 18249 (which equals to 5*3600+4*60+9) gives 5:04:09.  I tried several packages for the comparison/formatting. No success. Can someone help me ? Thanks ! Why is charge of the electron negative? How do I figure the dice and bonuses for attack rolls and damage rolls? I'm building my character, a Half-Elf Ranger, and I'm a little confused about how to work out the attack bonus and the damage bonus.  So, please tell me if I've got this right:   I'm proficient with a longbow. That means my attack roll is 1d20 + prof bonus + Dex modifier. The damage roll however is 1d8 + Dex modifier.   I'm just a little confused about working out the numbers (without even going into spells and when to roll for attack, etc.) How to convert standard IP address format string to hex and long? Does anyone know how to get the IP address in decimal or hex from standard IP address format string ("xxx.xxx.xxx.xxx")?  I've tried to use the inet_addr() function but didn't get the right result.  I tested it on "84.52.184.224"  the function returned 3770168404 which is not correct (the correct result is 1412741344).  Thanks! UK Train - Can I board at a different station