why getClass() from superclass variable returns subclass class name?
Dynamic dispatch and binding
Resizing an iframe based on content I am working on an iGoogle-like application. Content from other applications (on other domains) is shown using iframes.   How do I resize the iframes to fit the height of the iframes' content?  I've tried to decipher the javascript Google uses but it's obfuscated, and searching the web has been fruitless so far.  Update: Please note that content is loaded from other domains, so the  applies. Scenario 1: A grimlock hits Alice with a Spiked Bone Club, dealing 5 bludgeoning damage, plus 2 piercing damage. Alice's HP was 12.   Using the optional Massive Damage rules on page 273 of the DMG, does this count as more than half the HP from a single source, or less than half, but twice?  Scenario 2: Assume the same grimlock hits Bob with the same attack, this time rolling 6 bludgeoning damage, plus 3 piercing damage. Bob's Max HP is 8, and he had 1 HP remaining before he was hit.  Using the Instant Death rules on page 197 of the PHB, does the character die, or are the two damage types tracked separately? Does the character have to make a death saving throw for the second part of the damage? mysterious error: \pdfendlink ended up in different nesting level than \pdfstartlink I ran into the "mysterious"  \pdfendlink ended up in different nesting level than \pdfstartlink   error.  According to , "this happens when hyperref is used under pdftex and a citation splits across a page boundary".  The given solution is to manual fix the citation to not split across the page boundary.  However, this workaround isn't feasible for me, as the documents are automatically generated on a server with no user interaction.  Is there any solution to the problem known, perhaps an experimental hyperref action or a patch to pdftex?  (Probably, one could use luatex to solve the problem, but for other reasons, luatex is not an option in this project.)  MWE:  \documentclass[%draft               ]{article} \usepackage{hyperref} \setlength{\textwidth}{3cm} \setlength{\textheight}{3cm}  \begin{document} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna \href{http://www.tug.org/errors}{aliquyam erat, sed diam voluptua.} \end{document} Same update keeps showing up everyday Is there an official rule that the minimum damage can't be negative? A slightly humorous thought occurred to me (a recovering rules lawyer) after reading .     "None of the answers actually specify that 0 is the minimum damage."   Logically it wouldn't make sense for an attack to apply negative damage or healing, except in specific cases like hitting a flame elemental with a fire attack. Ruling that you could do negative damage would lead to an exploit to avoid costs of healing. As such I highly doubt any DM would make such a ruling. I definitely wouldn't except for the most absurd and humorous of games were failure is the expected result not success.  Another possibility (as suggested by Secespitus) is that negative damage would reflect back on the attacker. This could be seen as punching a strongman so hard (or in just the wrong way) as to injure your own hand.  This would also play well in a failure is the only option game, and if there is a rule suggesting that it would be an appropriate answer to this question as well.  Take the case of a person with less than 8 Strength, no levels in monk, and does not have a tavern brawler.  Would they do -1(1 - 2) damage on unarmed strikes? If so what would the result of the negative damage be?   "Healing" the target because such a puny hit actually raises their fighting spirits and makes them more capable of fighting Reflective Damage, the attacker actually takes 1 point of damage, representing injury to his hand or other damage   I am curious to know if there is an official rule stating that the minimum damage an attack can do is 0 or is there something in the damage calculation that I am missing that would otherwise prevent negative damage? Can I travel to Germany from a country different from the one I got the visa from? How to find the best route through multiple points? I am using postgreSQL, postGIS and pgrouting. Now I am really confused on how am I going to find the shortest path between multiple points.   I know how to find it between two points through dijkstra but I am confused how to accomplish the same result with more than two points.   I have done some research and found this:    But still I did not understand if its the right way and how to install it. Is ∅ equivalent to {∅}? How can I do a line break (line continuation)? Sorry for the bad English. I'm trying to use the tikz-cd package to make commutative diagrams. My code  \documentclass{article} \usepackage[brazil]{babel} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} A \ar[r, "x"] &amp; B \end{tikzcd} \end{document}    The problem occurs when putting a name under the arrow, the syntax "x" is incompatible with the brazil option of the babel package. When exchanging brazil for english it works normally. I already tried using  \usepackage[main=brazil, english]{babel}, \usepackage[brazil, english]{babel} e  \usepackage[brazil, main=english]{babel}   But it did not work. I also tried to use  \usepackage[english, brazil]{babel} \usepackage{polyglossia} \setmainlanguage{brazil} \setotherlanguages{english}   And finally  \selectlanguage{english}   However, it only works if I remove the option brazil Using the expression "the same" for a previously mentioned item Proving the AM-GM inequality for 2 numbers $\sqrt{xy}\le\frac{x+y}2$ When is a CDATA section necessary within a script tag? Are CDATA tags ever necessary in script tags and if so when?  In other words, when and where is this:  &lt;script type="text/javascript"&gt; //&lt;![CDATA[ ...code... //]]&gt; &lt;/script&gt;   preferable to this:  &lt;script type="text/javascript"&gt; ...code... &lt;/script&gt; public static IQueryable&lt;TResult&gt; ApplySortFilter&lt;T, TResult&gt;(this IQueryable&lt;T&gt; query, string columnName)   where T : EntityObject {   var param = Expression.Parameter(typeof(T), "o");   var body = Expression.PropertyOrField(param,columnName);    var sortExpression = Expression.Lambda(body, param);   return query.OrderBy(sortExpression); }   Because the type for OrderBy is not inferred from sortExpression I need to specify it something like this at run time:  var sortExpression = Expression.Lambda&lt;T, TSortColumn&gt;(body, param);   Or  return query.OrderBy&lt;T, TSortColumn&gt;(sortExpression);   I don't think this is possible however as TSortColumn can only be determined during runtime.  Is there a way around this? How to animate morphing a rectangular plane into a sphere Plotting heat equation in a Manipulate expression Can we add Markdown support for tables? Plot Option Precedence while combining Plots with Show[] $_POST empty on utf-8 characters I updated to TeXLive 2017 and couldn't get newlfm.cls to work without errors.  Here is a minimal example:  \documentclass{newlfm} \begin{document} \begin{newlfm} \end{newlfm} \end{document}   LaTex is throwing undefined control sequence errors on \fancy@reset, \f@ncyolh, and \f@ncyorh.  What causes the errors?  What am I missing?