I am using a external theme but I have little knowledge of JS / jQuery. It uses this function to show images on hover:  $(document).ready(function() {       ....     FirstLoad();     .... });  function FirstLoad() {     ....      $('.showcase-list li a').on('mouseenter', function() {         $('#showcase-gallery').addClass('visible');         $('.showcase-list li a').addClass('disable');         $(this).removeClass('disable');          var aux = $(this).data('aux'),         preview = $('.showcase-img[data-aux="' + aux + '"]');            $('#showcase-gallery').find('.showcase-img').removeClass('active');         preview.addClass('active');     }).on('mouseleave', function() {         $('.showcase-list li a').removeClass('disable');         $('#showcase-gallery').removeClass('visible');         $('.showcase-img').removeClass('active');        });      .... }// End First Load   But I trying to paginate this gallery with Inifite Scroll JS which is going well except that function does not work on the newly paginated content. I suspect its because it does not load.   I have this code:  var $showcasegallery = $('#showcase-gallery').infiniteScroll({     path: '.gallery_next',     append: '.ajax-case-images' ,     loadOnScroll: false,     status: '.page-load-status',   });  var $showcaselist = $('.wrapper-case-links').infiniteScroll({     path: '.gallery_next',     append: '.ajax-case-links' ,     loadOnScroll: false,     status: '.page-load-status',   });   // load next page  var $viewMoreButton = $('.view-more-button'); $viewMoreButton.on( 'click', function() {   $showcaselist.infiniteScroll('loadNextPage'); $showcasegallery.infiniteScroll('loadNextPage');  });   This is working fine, but how can I make sure that other function reloads too on button click so that I can use this zoom function from the theme?
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
The whole multi-continent aspect of A Song of Ice and Fire seems to be getting out of hand. Do the other continents suffer those long winters?  Can the Others harm the other continents?  In The Lord of the Rings there were other realms than Middle-earth, but Middle-earth was still all of humanity and dwarf population and hobbits.  Sure there are stories like Romeo and Juliet where the only thing that matters is whether those 2 are going have a chance to love.  But in these fantasy / sci-fi stories there's usually danger of world domination by evil.  It's not usually just one continent is going to be a terrible (or impossible) place to live but other civilizations will flourish. Folland, "Real Analysis", Chapter 5.3, Exercise 36:     Let $\mathcal{X}$ be a separable Banach space and let $\mu$ be   counting measure on $\mathbf{N}$.  Suppose that   $\left\{x_n\right\}_1^\infty$ is a countable dense subset of the unit   ball of $\mathcal{X}$, and define $T \colon L^1(\mu) \to \mathcal{X}$   by $Tf = \sum_1^\infty f(n) x_n$.  (a)  $T$ is bounded.  (b)  $T$ is   surjective.   I have proved (a).  I would like help on (b).  Here are my ideas so far.    Say we want to show $y \in \mathcal{X}$ is in the image of $T$.  Reduce to the case $||y|| = 1$ and let $x_{n_m} \to y$.  My thought is to produce for each $N$ a function $f_N \in L^1(\mu)$ such that $||y - \sum_n^\infty f(n)x_n|| &lt; 1/N$ and also such that the $f_N$ converge in $L^1(\mu)$ to some $f \in L^1(\mu)$.  Then use the continuity of $T$ to conclude $T(f) = y$.    The way I have been setting up my inequalities is as follows. Pick $M_N$ such that for all $m &gt; M_N$, $||y - x_{n_m}|| &lt; 1/N$.  Then I want to define $f_N$ so that $$\sum_n^\infty f_N(n) = \sum_{m &gt; M_N}^\infty f_N(m) = 1, $$ hence $$||y - T(f_N)|| = ||\sum_{m &gt; M_N}^\infty f_N(m) y + \sum_n^\infty f_N(n)x_n|| \leq \sum_{m &gt; M_N}^\infty f_N(m) || y - x_{n_m} || &lt; \frac{1}{N}. $$  Presumably, if the $f_N$ are appropriately chosen, then I can find a dominating function and apply the Dominated Convergence Theorem to finish up.    However, getting all these hypotheses to hold simultaneously has been difficult.  In essence, the difficulty seems to be in requiring that the $f_N$ be "normalized" as well as possess a dominating function.  If this method is feasible, at least it seems to require a bit of analysis to show the desired series all converge.  Perhaps I am missing something cleaner.  If so, a simpler solution would be much appreciated.    -Thanks. What is accountsd and why does it want to use the "login" keychain? How to make itemize/enumerate/description environment robust to missing \item elements? Is there any way to make LaTeX tolerate empty itemize/enumerate (i.e. no \item)?  Specifically, I would welcome any package/elegant hack that would gracefully "cancel" a list if no elements are found (instead of firing up a Latex Error).  Before jumping to the obvious answer (which I expect would be something along the lines of "don't use itemize if you don't have items to put in" ;)) please consider my use-case:   I want to format remotely stored elements (say, bibliographic items), which I can only access as an XML file.  &lt;elems&gt;   &lt;bibelem&gt;&lt;title&gt;Cool result 1&lt;/title&gt;&lt;author&gt;joe&lt;/author&gt;&lt;/bibelem&gt;   &lt;bibelem&gt;&lt;title&gt;Cool result 2&lt;/title&gt;&lt;author&gt;jim&lt;/author&gt;&lt;/bibelem&gt; &lt;/elems&gt;  I have a python script that downloads/parses the XML and outputs its content in a file bib.tex as a list of Latex macros-decorated data  \BibElem{Cool result 1}{joe} \BibElem{Cool result 2}{jim}  Now, I want to grant the end-user complete control over the styling of her/his produced document, so the intended usage within Latex is something like  \documentclass{article} \begin{document}   \newcommand{\BibElem}[2]{\item {\em #1} by {#2}}   \begin{itemize}     \input{bib.tex}   \end{itemize} \end{document}    The rationale behind this design choice is that the user should be restricted as little as possible in her/his styling choices. For instance, the user may either want to display the bibelems within a list as shown in the example, or may prefer a fancy-formatted tabular. On the other hand, the user should design the latex document once, and should be able to run it regardless of the amount of data produced by the source.  Therefore, the python script cannot make any assumption regarding the context in which its latex product will be included, and it should be up to the user to deal with empty bibliographies, i.e. with empty lists. How could one possibly do that?  Update: Werner proposed a nice solution that redefines the list environment to make Latex oblivious of the fact he is currently in a list. However, this only seems to work if the empty list is the last list in the document, as revealed by the following mwa:    \documentclass{article} \makeatletter \newenvironment{myitemize}   {\itemize}   {\@newlistfalse\enditemize} \makeatother \begin{document}   % Empty Itemize   \begin{myitemize}   \end{myitemize}   % Next non-nested itemize environment (can be itemize/enumerate/description)    \begin{myitemize}     \item Arghh!   \end{myitemize} \end{document} How to find all subgroups of a direct product? I am wondering how do we find all subgroups of a direct product? Is there a method to find it?  For example, how can we find all the subgroups of $\mathbb{Z}_2\times\mathbb{Z}_2$?  There is the answer: $\{(0, 0), (1, 0)\}, \{(0, 0), (0, 1)\}, \{(0, 0), (1, 1)\}$, and the improper and trivial subgroup. But I do not know the method how to find it.   All I can think about is the following: since the order of $\mathbb{Z}_2\times\mathbb{Z}_2$ is $4$, the order of a subgroup of it can be $1,2$ or $4$.   If order is $1$, then it is trivial, and if order is $4$, it is proper. Then, the order of a subgroup is $2$. We know all the elements of   $\mathbb{Z}_2\times\mathbb{Z}_2$, so we try all the pairs.   Is that the method?   But what if we are given a bigger order product, such as $\mathbb{Z}_2\times\mathbb{Z}_8\times\mathbb{Z}_3\times\mathbb{Z}_9$? It looks very long to try all possibilities.   Can anyone help?  Thanks Shell Script for logging into a ssh server I tried writing a shell script which can do automatic login into a ssh server using password which is mentioned in the script. I have written the following code:  set timeout 30 /usr/bin/ssh -p 8484 root@172.31.72.103 expect  {    "root@172.31.72.103's password"     {       send "password\r"     } }   This code is not running properly, still it is asking for the password. Can somebody please help me in solving this Setting environment variables for latex and bibtex in .bashrc Possible Duplicate:          I recently started using TeX to write journal articles. I use TeX Live version 2009-10 on a laptop running Ubuntu 10.10 (64-bit). I edit and compile the tex files using vim and vim-latexsuite.   Currently for each journal article I have all associated tex, bib, eps, etc. files in individual folders. I would like to simplify my life a bit and have a dedicated folder containing a "master" bib file - And maybe another folder for my custom style files.   My problem is that can't figure out how I should define the PATH, and other environment variables in my .bashrc file to find the necessary support files (e.g., the .bib file). Which variables do I need to set? PATH? MANPATH? TEXINPUTS? BIBINPUTS? How to illuminate the darkness inside glass objects in Cycles? My model has a clear plastic (or glass) dome with objects inside.  The objects appear dark.  I've tried the glass shader with color 100% RGB, with very small IOR, and using just a refraction shader.    I know Cycles has problems with caustics, but I just want broad illumination to fall clean through the glass.  The light-to-column path can ignore refraction, but is blocked or tremendously attenuated. The camera-column path needs refraction, and seems to work fine anyway.  This demo image offers all optical paths of interest:   light upon object, seen directly light upon object, seen through glass (looks okay) light through glass onto object, seen directly. This is the shadow on the lit side of the column just below the glass tubing.  I expect full illumination, but there is shadow.  There is some light, but it's diffuse light from the floor. light through glass onto object, seen through glass. This     I did at one point try non-progressive rendering, and find extremely coarse light where there shouldn't be shadow, but this is not a practical way to make nice images. I've even tried cranking up certain sampling settings to many thousands, but still get bad noise though less, at the cost of long render times. I  would like to finish my creations sometime before "Star Trek, the Generation After the Next" becomes real life, if you know what I mean.  The next image is an example. I think Transmission in Sampling was 5000, but not sure.    I'm using Cycles in Blender 2.67 on a quad core Linux machine, 16GB RAM. Machine limits have never been a problem for 3D rendering.  Possibly, I screwed up some setting when I made my startup file, and just need to fix it. OTOH maybe this is just a limitation of path tracing, or of the way Cycles does it. If that's the case, what to real-world Blender artists do when they need to produce images on a budget and schedule?  What is the practical real-world fix? Why aren't these loops homotopic? Let $S^1 = \{z \in \mathbb{C} : |z| = 1\}$.  Take the loops $f,g : [0,1] \rightarrow S^1$, $f(t) = 1$, $g(t) = e^{2\pi it}$.  I know these represent different elements in $\pi_1(S^1, 1)$, but I don't see why $F(t,s) = e^{2\pi its}$ isn't a homotopy between $f$ and $g$. Run a program without administrative privileges in Windows 7 My account in Windows 7 is an administrator account. When I open the Run box (WinKey + R), I am warned, "This task will be created with administrative privileges."    Is there any way to run programs as myself, but without administrative privileges when logged in as an administrator? crisscross, dillydally, riffraff, etc Is Unicoins a April Fool’s Stunt? Is Unicoins a April Fool’s Stunt ? A friend of mine asked me to calculate the value of a perticular determinant, but after spending quite some time on it I'm unable to find a solution to it. The given determinant is:  $$         \begin{vmatrix}         0 &amp; 1 &amp; \cdots &amp;n-2&amp;n-1 \\         n-1 &amp; 0 &amp; \cdots &amp;n-3&amp;n-2 \\         \vdots &amp; \vdots &amp; \ddots &amp; \vdots &amp;\vdots\\         1 &amp; 2 &amp; \cdots &amp; n-1 &amp;0 \\         \end{vmatrix} $$  Also my friend is supposed to solve this determinant by more or less elementary methods, like elementary row operations, transpose... and no eigenvalues, nor adjoints.    First of all it seems like the value of the determinant is:  $$         \frac{1}{2n}\begin{vmatrix}         0 &amp; n &amp; \cdots &amp;n&amp;n \\         n &amp; 0 &amp; \cdots &amp;n&amp;n \\         \vdots &amp; \vdots &amp; \ddots &amp; \vdots &amp;\vdots\\         n &amp; n &amp; \cdots &amp; n &amp;0 \\         \end{vmatrix} $$  Anyway I tried adding all the rows to the last one and by taking $\frac{n(n-1)}{2}$ in front to have a row of 1s, but it didn't helped me much.  Then I tried to use the fact that:  $$         \begin{vmatrix}         A &amp; C \\         0 &amp; B \\         \end{vmatrix} = \det(A) \cdot \det(B) $$, where $A,B$ are square matrices. By subtracting the $(\frac{n}{2} + i)$-th column from the $i$-th ($i=0,1,2...$) and then adding the $i$-th row to the $(\frac{n}{2} + i)$-th row, one can obtain the wanted form, but again nothing more. Also this method pretty much fails when $n$ is odd.  My best attepmt was to notice that $A_{ij} + A_{ji} = n$ and using $\det(A^{T}) = \det(A)$, but unfortunatelly  $$\begin{vmatrix}         0 &amp; n &amp; \cdots &amp;n&amp;n \\         n &amp; 0 &amp; \cdots &amp;n&amp;n \\         \vdots &amp; \vdots &amp; \ddots &amp; \vdots &amp;\vdots\\         n &amp; n &amp; \cdots &amp; n &amp;0 \\         \end{vmatrix} \not = \begin{vmatrix}         0 &amp; 1 &amp; \cdots &amp;n-2&amp;n-1 \\         n-1 &amp; 0 &amp; \cdots &amp;n-3&amp;n-2 \\         \vdots &amp; \vdots &amp; \ddots &amp; \vdots &amp;\vdots\\         1 &amp; 2 &amp; \cdots &amp; n-1 &amp;0 \\         \end{vmatrix} + \left( \begin{vmatrix}         0 &amp; 1 &amp; \cdots &amp;n-2&amp;n-1 \\         n-1 &amp; 0 &amp; \cdots &amp;n-3&amp;n-2 \\         \vdots &amp; \vdots &amp; \ddots &amp; \vdots &amp;\vdots\\         1 &amp; 2 &amp; \cdots &amp; n-1 &amp;0 \\         \end{vmatrix}\right)^T$$ I tried to decompose the LHS by using the $n-$linearity of the determinants, by then one gets $2^n$ determinants on the RHS similar to the first one, but things are messy. Calculate Azimuth from polygon in GeoPandas Is there a simple way / ready-to-go function to calculate the azimuth of 2D-polygons in a GeoPandas DataFrame? My goal is to eventually compute azimuth angles of building footprints. Most of the functions I have found explicitly calculate the azimuth for a line, which is not what I am looking for. I have been thinking along the following lines to calculate the azimuth of a polygon using its normal vector (2 dimensions). Is my approach going into the right directions? I am a bit unsure how to adjust for the quadrants, also my results seem a bit odd. azimuth = 90 - math.degrees(math.atan2(normal[1], normal[0])) if azimuth &gt;= 360.0:     azimuth -= 360.0 elif azimuth &lt; 0.0:     azimuth += 360.0 How does this wiring work? I have a Trane XV90 and XL 14i. The wiring looks a little strange as in the picture bellow.                    _____________                   |           |   BK W2  W1   R  G  Y  B/C  YLO O     |___||   |__|  ||   |          |   |     ||   |_____>|----------|         |   |     ||_________>|other wire|         |   |     |           ------------         V   V     V     ---------------     |thermostat   |     ---------------  The R and G are jumpered together and the G wire is connected on the board  but is actually not connecting to the thermostat on the other end. So people told me that means the furnace fan is always on! (In my diagram above, I switched the location of Y and B/C to make diagram easier to draw. You can refer to the photo added below to see the details) My questions are the following  is the jumper between O and Y doing anything? I don't think I have heat pump I need to install Honeywell wifi thermostat and I am thinking of doing either one of the following:   remove jumper between R and G, and use G to connect B/C and then to thermostat C and put jumper between G and Y  leave jumper between R and G, and use G to connect B/C and then to thermostat C and put jumper between G and Y  remove jumper between R and G, connect G on control board to thermostat G, and finally have the spare wire to connect B/C and then thermostat C  leave jumper between R and G, does not connect G to thermostat,  and just use a spare wire to connect B/C on board to thermostat C   Can anyone comment on those plans? Thanks a lot! Suppose I wanted to travel to one of the recently discovered potentially Earth-like planets such as Kepler 186f that is 490 light years away. Assuming I had a powerful rocket and enough fuel, how long would it take me? Is there any gold standard for modeling irregularly spaced time series? Rm can't delete file Creating compressed GeoTIFF with QGIS Clipper tool? I have a geo-tiff created by Pix4D which is about 375 Mb in file size.   I have clipped it to a smaller area using Qgis 2.8(using Raster ‣ Extraction ‣ Clipper), and the output file is about 900 MB in size.  Why did the clipping process generate such a large file, when the source file was smaller?   How do I run the clipper tool so that it produces a smaller size? Proof that the nth root of a rational s/t is irrational unless s and t are perfect nth powers I'm trying to prove that $\sqrt[n]{\frac{s}{t}}$ is irrational unless both s and t are perfect nth powers. I have found plenty of proofs for nth root of an integer but cannot find anything for rationals. Also trying to work up from the proofs I have found is rather difficult.  My lecturer wants me to prove this using uniqueness of prime factorisation but I also have no idea where to start with that.   Any help is greatly appreciated.