How to get location of the element after it was clicked? I have HTML element(span) the changes it's location.When I click HTML element(span) I need to get the HTML element(span)'s location.  Here is html:  &lt;span class="btnFlyout" id="btn4" style="width: 52px; cursor: pointer; border: 1px solid rgb(240, 240, 240);"                                                                          onmouseover="HoverButton('btn4', null)"                                                                          onmouseout="LeaveButton('btn4', '')"                                                                          onclick="OpenFlyout('cell4', 4, event)"&gt;   &lt;span class="txtFlyout" style="left: 4px;"&gt; measure &lt;/span&gt;     &lt;img class="arrowFlyout" src="../stdicons/icon_menuarrow.gif" style="left: 32px;" width="16px" height="16px" hspace="2" vspace="2"&gt;   &lt;/span&gt;   Here is onclick event:    function OpenFlyout(xpos, tbItemIndex, e)   {    }   How can I get HTML element(span) location in OpenFlyout function?
Retrieve the position (X,Y) of an HTML element relative to the browser window I want to know how to get the X and Y position of HTML elements such as img and div in JavaScript relative to the browser window.
Do I need to enable the publishing features to change a Team Site's master page? When building a SharePoint 2010 site, we have a root Publishing site that has been branded up using a custom Master Page.  We'd now like to add some Team Sites below the publishing site, and have our branding and other look and feel changes applied there too, and for that we need to change the "System Master" setting of the Team Site.  The "Master page" options in the site settings are only available if I've enabled the Publishing features in the team site, but I'd rather not do this if I can avoid it.  Ideally, this should be enabled as soon as a new team site is created, without the site owner having to change the site settings. Tracking the questions you've recently viewed or visited On your user profile page there are six (6) tabs; stats, activity, reputation, favorites, prefs and accounts.  I would like to see in a new tab, maybe named 50 latest viewed questions, which would contain the 50 latest viewed questions.  This would help when I want to follow a question but don't want to bookmark it or add it to my favorites list.   Sometimes, or a few hours later, I can't even find it again. I think this would be good for when you're viewing questions at work and want to check it up at home but can't because it's not in the same browser history. Forward an invocation of a variadic function in C In C, is it possible to forward the invocation of a variadic function? As in,  int my_printf(char *fmt, ...) {     fprintf(stderr, "Calling printf with fmt %s", fmt);     return SOMEHOW_INVOKE_LIBC_PRINTF; }   Forwarding the invocation in the manner above obviously isn't strictly necessary in this case (since you could log invocations in other ways, or use vfprintf), but the codebase I'm working on requires the wrapper to do some actual work, and doesn't have (and can't have added) a helper function akin to vfprintf.  [Update: there seems to be some confusion based on the answers that have been supplied so far. To phrase the question another way: in general, can you wrap some arbitrary variadic function without modifying that function's definition.] How do I bind the tmux prefix to a Super? I find even Ctrl+b to be very emacs like but I understand the point. I'm wondering if I could bind it to a single keypress of a key I don't other wise use? namely Super_L (also known as the left windows key. for why I say Super_L start xev in a terminal and press that key) As a mod when should I vote to close content that is not flagged? I know mods are supposed to step in to quickly close seriously problematic posts and otherwise allow the community to vote to close a post.  But what about when there are four close votes on a question, and I personally feel the question should be closed but isn't worthy of mod super-mega closing? Should I cast the final vote like a normal user (even though it's technically binding) or should I sit back and wait  for the community?  For me the problem is complicated because on UX.SE we hover close to the point where there's not enough high-rep activity to quickly close posts and I was one of those high rep users that used to VtC.  Should I always treat my mod close vote as binding and reserve it for extreme situations, or should I treat my close vote as "normal" when it's the fifth and final vote anyway? Can I use SPI for asynchronous serial output? I need a second serial async output channel on the MSP430G2553 and would like to use the SPI USCI to do this.  Is the USCI SPI baud rate stable enough to do this at 300 baud, 2400 baud or 9600 baud? I am currently using the 8 MHz clock.  Is there any other option that can save me from bit-banging?  My current thinking for 300 bd Tx is as follows:   set prescaler to 26666 LSB first load byte into Txbuf load 0x7F into Txbuf to generate stop and start bits repeat 2-3 send final stop bits 0xFF   It might also be possible to send ten bits of data on other members of the MSP430 family that contains a SPI.  Thanks for your responses. What's the value of $\sum\limits_{k=1}^{\infty}\frac{k^2}{k!}$? For some series, it is easy to say whether it is convergent or not by the "convergence test", e.g., ratio test. However, it is nontrivial to calculate the value of the sum when the series converges. The question is motivated from the simple exercise to determining whether the series $\sum\limits_{k=1}^{\infty}\frac{k^2}{k!}$ is convergent. One may immediately get that it is convergent by the ratio test. So here is my question:     What's the value of $$\sum_{k=1}^{\infty}\frac{k^2}{k!}?$$ Zooming in to inspect texture details in 3D view clips some closer faces like shown in the image. It's not the camera view so changing camera settings doesn't help.   Where can the distance to the clipping plane be adjusted? Is there a safe way to determine how powerful an opponent is? The definition of "Lie group" typically restricts to a smooth manifold.  If we instead define a "Lie group" to be a topological manifold such that multiplication and inversion are continuous, is the manifold necessarily smooth?  Is the smooth structure unique if we want a smooth Lie group?  I believe the answer is yes, since a connected Lie group structure is determined by the Lie algebra, but my search attempts failed. Indian CGPA to US GPA system How can I model the mechanics of an army battlefield scene? TL;DR;  I want to model a strategic battlefield fight for my players to command and participate. I'm seeking advice on how to model it mechanically so that it is exciting for the players.  Background  The final scene of Act II of my campaign is envisioned to be a big battle between the army of the Big Bad and the allied forces gathered by my players. The full set of Act II runs with the players gaining the allegiance of the different factions to support them on the fight.  Now, in terms of that final scene, I'm struggling to decide how to DM the fight. In games and movies the action is made epic by having cinematic scenes of the fight happening with cuts to our heroes doing their amazing things, be it just plowing through dozens of enemies in quick succession or fighting the big ugly overpowered monster that is otherwise cause havoc among the army. I want that feeling  The set up will involve an army of several thousand enemies agains the different forces gathered by my players. Depending on what they've done during the second act, they'll have more or less support with a minimum number of regiments belonging to several faction (i.e. the silver guard of Wizardwight).  Intended way of DMing the scenario.  What I've come up with is to have the players be military leaders. Draw the map of the battlefield and have them manage the battlefield strategically and tactically, distributing the units and, somehow, enabling a dice based mechanism to evaluate how well each unit is doing. This will transform the tabletop into something similar to Warhammer Fantasy. They can choose to join a particular place of the battlefield to help either together or separately.  I have absolutely no idea on how to model this mechanically (as far as I know D&amp;D 5e does not cover this kind of fights).  Question:  What are good ways to mechanically model this kind of strategic army combat? Should I switch to a different system just for this scene or can I model this with D&amp;D 5e?  Notes on level: At this point I expect my players to range between level 9-12 and for the party to be between 3 and 4 players (this is not a limitation of the campaign, more like the players I'm running the campaign with). Why is the Night's Watch so depleted at the start of ASOIAF? At the start of AGOT, the total number of the Night's Watch is said to be less than a thousand. During Aegon's conquest, the Watch numbered ten thousand men. Out of the nineteen castles on the wall, only three are manned today. Castle black itself is once said to have housed 5000.   This rapid deterioration doesn't make sense to me from a world-building perspective. The NW have continued to maintain themselves pretty well for nigh on 8000 years (if the tales can be believed that is, Sam Tarly finds no written evidence of Lord Commanders earlier than #673, which suggests that 8000 years may be an inflated 'legendary' number).   Whereas in the real world, one of the oldest and most venerable institutions, the Catholic Church, has been around for less than 2000 years and has been administered by ~200 popes. The Night's Watch has had a few rocky years, sure, but for it to maintain itself so well for so long and then deteriorate only in the last 300 years seems strange to me.   The NW has two purposes. The ostensible one of defending against the Others, and the (arguably much more real, at least at the start of AGOT) purpose of serving as a dumping ground for the 'losers' of Westeros. By 'losers', I mean the people on the losing side of various wars and political battles, as well as criminals and n-th sons of noble houses with nothing to inherit.  I am currently reading through Fire and Blood, and was struck by one chapter, where an armed revolt of members of the Faith were defeated by Maegor, and 2000 brothers were forced to take the black. Those sorts of numbers don't exist in the recent histories it seems.   One would expect that after Robert's Rebellion, there would be a surfeit of defeated Targaryen loyalists who were forced to take the black, but apart from a smattering of named characters (including Ser Alliser Thorne), there seem to be hardly any Night's watch recruits from recent wars.  Given the way the Night's watch is continually bolstered by the losers of wars and by criminals and other people who elsewise have nothing going for them, why, at the start of AGOT, is the force so depleted? Workflow for converting LaTeX into Open Office / MS Word Format I often have to write up reports based on the analysis of some data. I use R to analyse the data and export tables, figures, and text. This is then included into a LaTeX document either using input or Sweave ().  However, when I collaborate with others, I sometimes need to provide a document in Open Office / MS Word format.  Question:  Thus, assume the simplest scenario   I have a LaTeX document with text, tables, and figures I need to export this reliably into Open Office or MS Word format: this includes mathematical formulas, table formatting, and quality figures) I don't need to go back from MS Word to LaTeX   What is a reliable, efficient, and preferably free process?  Initial Thoughts:   Export to HTML,  LaTeX - LyX - ODF Use odfWeave  that deals with some specific issues associated with LaTeX to Open Office conversion    I was hoping that there is an expert out there who has worked out a good system already. $Q_8$ is isomorphic to a subgroup of $S_8$, but not isomorphic to a subgroup of $S_n$ for $n\leq 7$. Question is to prove that :     $Q_8$ is isomorphic to a subgroup of $S_8$, but not isomorphic to a subgroup of $S_n$ for $n\leq 7$.   I see that $Q_8$ is isomorphic to subgroup of $S_8$ by left multiplication action.  Hint given was to prove that stabilizer of any point contains $\{\pm 1\}$.  To prove Cayley's theorem, stating any group is isomorphic to a subgroup of $S_n$ we take action of given group on a set $A$ having same cardinality.  with that motivation I want to check if there is a Isomorphism then there is a map from $G\times A \rightarrow A$. i.e., $G$ gives a permutation group $S_A$.  I tried in same manner. Suppose $Q_8$ is isomorphic to subgroup of $S_n$ with $n\leq 7$  then it should come from a group action of $Q_8$ on a set of cardinality atmost 7.   Suppose $Q_8$ acts on a set $A$ with possible cardinality at most 7.  $stab(a)=\{g\in Q_8 : g.a=g \forall a\in A \}$  $cl(a)=\{g.a : g\in Q_8\}$  I know number of elements in class of $a$ equals to index of stabilizer.  As $cl(a)=\{g.a : g\in Q_8\}\in A$ i.e., $cl(a)\subseteq A$ and as $|A|\leq 7$ i see that $|cl(a)|\leq 7$.  But, $|cl(a)|=|Q_8:stab(a)|$ for any element $a\in A$.  So, $|Q_8:stab(a)|=|cl(a)|\leq 7$ for all $a\in A$.   So, $stab(a)$ should be non trivial subgroup of $Q_8$ if not then $|Q_8:stab(a)|=8$  non trivial subgroup (proper) of $Q_8$ contains $\{\pm1\}$.  So, In the worst case, $\{\pm 1\}\subseteq stab(a)$ for all $a\in A$.  As $Ker(\eta)=\cap_{a\in A}stab(a)$ (where $\eta$ is the action of $Q_8$ on $A$)   we see that $\{\pm 1\}\subseteq Ket(\eta)$ which means that $Ker(\eta)$ is non trivial.  thus there is no isomorphism (coming from $\eta$) between $Q_8$ and any subgroup of $S_7$.  I would be thankful if someone can check whether my approach is correct or if there is any other simple possible way.  P.S : Usually what i do to see whether two groups are isomorphic or not is to check for cardinality, abelian property, no of elements with same order and so on. But I was having no idea when i fail in all these ways. With this Group actions i could see possibility for getting a precise conclusion on Isomorphisms.I would like to Thank Mr. Jyrki Lahtonen (a user of Math.SE) who made me to get used to Group actions.  P.S $2$: If any thing is wrong in my idea, it is entirely my fault, and if anything is correct in this whole credit should go to Mr. Jyrki Lahtonen Calculate total miles traveled from vectors of lat / lon How to prevent negative comments/downvoted being deleted by re-posting answers Is it possible in Ruby to get a reference to methods of an object ( I would like to know if this can be done without procs/lambdas ) , for example , consider the following code :   class X   def initialize     @map = {}     setup_map   end    private   def setup_map     # @map["a"] = get reference to a method     # @map["b"] = get reference to b method     # @map["c"] = get referebce to c method   end    public   def call(a)     @map["a"](a) if a > 10     @map["b"](a) if a > 20     @map["c"](a) if a > 30   end    def a(arg)      puts "a was called with #{arg}"   end    def b(arg)      puts "b was called with #{arg}"   end    def c(arg)     puts "c was called with #{arg}"   end end   Is it possible to do such thing ? I would like to avoid procs/lambdas because I want to be able to change the behaviour of A,B,C by subclassing . K&R Exercise 1.16 - Limitation on line length Evaluate the sum: $\sum\limits_{n=0}^{\infty} \frac1{F_{(2^n)}}$ Evaluate the sum:  $$\sum_{n=0}^{\infty} \frac{1}{F_{(2^n)}}$$  where $F_{m}$ is the $m$-th term of the Fibonacci sequence. I need some support here. Thanks.