I was just woundring what is the prefered way of skipping the behavior that the browser changes the location when clicking on a link element (A) with inline code.   &lt;a href="javascript:void(0)"&gt;void(0)&lt;/a&gt; // I have always used this one   Or   &lt;a href="javascript:;"&gt;:;&lt;/a&gt; // This one is simple and now a days my favourite   Or   &lt;a href="#"&gt;#&lt;/a&gt; // Scroll to the top   Or how do you do, and WHY? What is best practies?
The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.?    function myJsFunc() {     alert("myJsFunc"); } &lt;a href="#" onclick="myJsFunc();"&gt;Run JavaScript Code&lt;/a&gt;     or    function myJsFunc() {     alert("myJsFunc"); }  &lt;a href="javascript:void(0)" onclick="myJsFunc();"&gt;Run JavaScript Code&lt;/a&gt;
Clip for each feature I want to clip a polyline feature class by a polygon feature class (buffers created from points). Several polygons overlap, so I want to get each polygon feature clipped with each polyline feature.  Using the Clip_analysis tool, I get the orange lines:   whereas I want the following red lines:    In a python script, I tried the following code to clip every polyline with each polygon:          temp = arcpy.ValidateTableName("clip_temp")     bufferCursor = arcpy.SearchCursor(buffer)     n = 0     for pRow in bufferCursor:         arcpy.AddMessage(n)         feat = pRow.Shape         arcpy.Clip_analysis(inputPolylineLayer, feat, temp, "#")         if n == 0:             arcpy.Copy_management(temp, clip)         else:             arcpy.Append_management(temp, clip)         n=n+1   But the execution is very very slow and it crashes before finishing.  I also tried the Intersect_analysis tool but I didn't get the right geometries:   Do you have any idea of a better methods to do it? Effect of space time relativity on the age of the universe? So we all heard about the twins paradox to explain einstein's time space relativity.  Wikipedia Quote :" In physics, the twin paradox is a thought experiment in special relativity involving identical twins, one of whom makes a journey into space in a high-speed rocket and returns home to find that the twin who remained on Earth has aged more. This result appears puzzling because each twin sees the other twin as traveling, and so, according to a naive application of time dilation, each should paradoxically find the other to have aged more slowly. "  So what if the universe has been travelling at varying speeds (increasing or descreasing), wouldn't this effect our measurements on age of the universe? Change paper size in mid-document My document should be letterpaper and my attachments should be a4paper. I had high hopes for the \newgeometry command from the geometry package, but the documentation says      \newgeometry is almost similar to   \geometry except that \newgeometry   disables all the options specified in   the preamble and skips the   papersize-related options: landscape,   portrait and paper size options (such   as papersize, paper=a4paper and so   forth).   Any help is appreciated! I want to start an Xorg server (which should only feature a minimal xterm terminal emulator from a newly created &quot;pristine&quot; tty). I have thought this to be as simple as issuing a xinit or maybe a startx however both have failed me. Therefore the question: How to manually run/init/start a Xorg server on a different VT/TTY? here the Longer background story to the question at hand: This is the backgroud and what I have tried already: Looking at man openvt I was able to run a shell on a newly created tty (or vt, cannot tell precisly the different vt&lt;&gt;tty) like this:  $&gt; sudo openvt -s /bin/bash  the -s of causes the direct switch to that new tty/vt on that new tty I wanted to manually start a Xorg server which according to man xinit should start with a minimal xterm application. On the new shell on the switched to tty I (created via openvt) I hence issues this command:  $&gt; su -c 'xinit xterm -display :4 -- :4' - mahr &amp;&gt;/tmp/output  and I receive this output $&gt; cat /tmp/output X.Org X Server 1.19.6 Release Date: 2017-12-20 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.4.0-148-generic x86_64 Ubuntu Current Operating System: Linux scitech 4.15.0-70-generic #79-Ubuntu SMP Tue Nov 12 10:36:11 UTC 2019 x86_64 Kernel command line: BOOT_IMAGE=/vmlinuz-4.15.0-70-generic root=/dev/mapper/ubuntu--vg-root ro Build Date: 03 June 2019  08:10:35AM xorg-server 2:1.19.6-1ubuntu4.3 (For technical support please see http://www.ubuntu.com/support)  Current version of pixman: 0.34.0     Before reporting problems, check http://wiki.x.org     to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting,     (++) from command line, (!!) notice, (II) informational,     (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: &quot;/home/mahr/.local/share/xorg/Xorg.4.log&quot;, Time: Thu Nov 28 10:57:53 2019 (==) Using system config directory &quot;/usr/share/X11/xorg.conf.d&quot; (EE)  Fatal server error: (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied) (EE)  (EE)  Please consult the The X.Org Foundation support       at http://wiki.x.org  for help.  (EE) Please also check the log file at &quot;/home/mahr/.local/share/xorg/Xorg.4.log&quot; for additional information. (EE)  (EE) Server terminated with error (1). Closing log file.  Session terminated, terminating shell...xinit: giving up xinit: unable to connect to X server: Connection refused xinit: unexpected signal 2  ...terminated. At work today, I came across the volatile keyword in Java. Not being very familiar with it, I found . Given the detail in which that article explains the keyword in question, do you ever use it or could you ever see a case in which you could use this keyword in the correct manner? Why is Linux reporting "free" memory strangely? Show that if $\sup\big\{\sum\lvert\, f(a)\rvert\big\}  0\}$ is countable. Let $f:A \to \mathbb R$ and suppose that $$ \sup\Big\{\sum_{a\in F}\lvert\, f(a)\rvert :  F\text{ is finite subset of }A\Big\} &lt; \infty $$ then the set $\{ a \in A : f(a) &gt; 0\}$ is countable.  My try: Define these element of ${ a ∈ A : f(a) &gt; 0}$, then $∑_{n=1}^\infty\lvert\, f(a_n)\rvert$ is determined, regardless of the method of arrangement. Git is automatically merging changes from a different branch to master on StackOverflow, I asked a . There are many good answers but I can not accept just one of it. I would prefer to create my own answer where I summarize all answers. Is that allowed? Show the post's comments on the "Suggested Edits" review interface Sci-fi novel involving living forever through teleporter copies Regex for quoted string with escaping quotes How do I get the substring " It's big \"problem  " using a regular expression?  s = ' function(){  return " It\'s big \"problem  ";  }'; From  (emphasis mine):     Neutron degeneracy is a stellar application of the Pauli Exclusion Principle, as is electron degeneracy. No two neutrons can occupy identical states, even under the pressure of a collapsing star of several solar masses. For stellar masses less than about 1.44 solar masses (the Chandrasekhar limit), the energy from the gravitational collapse is not sufficient to produce the neutrons of a neutron star, so the collapse is halted by electron degeneracy to form white dwarfs. Above 1.44 solar masses, enough energy is available from the gravitational collapse to force the combination of electrons and protons to form neutrons. As the star contracts further, all the lowest neutron energy levels are filled and the neutrons are forced into higher and higher energy levels, filling the lowest unoccupied energy levels. This creates an effective pressure which prevents further gravitational collapse, forming a neutron star. However, for masses greater than 2 to 3 solar masses, even neutron degeneracy can't prevent further collapse and it continues toward the black hole state.   How then, can they collapse, without violating the Pauli Exclusion Principle? At a certain point does it no longer apply? Quick question: what is the compiler flag to allow g++ to spawn multiple instances of itself in order to compile large projects quicker (for example 4 source files at a time for a multi-core CPU)? Common screen resolution? I'm developing a web application which is quite information heavy. This means that every pixel available in the screen for display helps a lot, to avoid the UI looking too cluttered and to display relevant data.  I was wondering: which is the "common" screen resolution? Years ago it was something like 1024&times;768, but nowadays it must be something much higher. I can't rely on what I use as I'm a developer and I probably have bigger screens and resolution than the average Joe user.  So, where can I find the currently recommended resolution for webapps? How should an educational institute woo good faculty? What steps must an educational institution wanting to recruit good faculty take? There is a cycle in the academia:    Good doctorates from top universities invariably join other top universities as faculty members.  Good students aspire to study in top universities under excellent faculty members.   Suppose a new educational institution or department springs up and desires to set up a top-quality group, how does it break into this cycle? I suppose this could take some years, but is money-power the only thing that could be wielded by the institute to achieve its end? I am trying to install Wordpress on Lubuntu. I followed the instructions . Including PHP Apache and MySQL setups. Apache and MySQL appear to be running fine.  However, when I go to http://localhost/blog/, I get the following error:     Neither /etc/wordpress/config-localhost.php nor /etc/wordpress/config-localhost.php could be found.   Ensure one of them exists, is readable by the webserver and contains the right password/username. What does var prime = num != 1; mean? We know that if you (using Polyjuice), take the form of someone who had been injured, you assume that injured form (e.g. Barty/Moody). If you are injured, presumably you would be uninjured while under Polyjuice. My question is, is this in real-time? That is, if you take a Polyjuice, and while you're still under its effects, the person being transformed into gets injured (or even dies), will that injury be transferred onto you? And conversely, if you get injured while in someone else's body, will that transfer over to your real body after the Polyjuice wears off, will it disappear, or will it go to the person you turned into? A problem regarding to Schur's lemma Let $\rho: G \to GL_n(\mathbb{C})$ be an irreducible representation, and $g\in Z(G)$. Show $\rho(g)$ is a scalar multiple of the identity matrix $I$.   I think I have it, here is my solution:  Since $\rho(g) \in Hom_G(\mathbb{C}, \mathbb{C})$ and $\rho$ is irreducible, consider a nonzero eigenvalue of $\rho(g)$, say $\lambda$, we have $\rho(g) -\lambda $ is a zero map by Schur's lemma, as the map contains a non-trivial kernel (i.e. the eigenvectors associated to $\lambda$ are in the kernel).  But I didn't use the condition that  $g\in Z(G)$, so are there something wrong with my solution?