On Windows 7 I created a symbolic link to an executable using:  mklink Test.exe C:\Path\to\source.exe   But when I try to run it by double clicking on it, i get the "open with" dialog.  Running it from a command window works. The path is right.   Is there any way a symbolic link will be treated like the file it points to (e.g. executable or batch scripts)?
When trying to execute a symbolic link which points to an exe file (on Windows 7), the "Open with" windows appears. When renaming it to a ".exe" file, it says "The specified path does not exist. Check the path, and then try again.".  Symlinks to other destinations seem to work fine.  So is there any way to execute a symlink?  EDIT: In the command prompt, I execute the following and the MyProgram.exe runs both times.  However, if I double-click on the symbolic link in Windows Explorer it fails with the above error message.  C:\Temp&gt;mklink SomeProgram.exe MyProgram.exe symbolic link created for Backup.exe &lt;&lt;===&gt;&gt; Backup-1.0.1.exe  C:\Temp&gt;SomeProgram.exe  C:\Temp&gt;del SomeProgram.exe  C:\Temp&gt;mklink SomeProgram.exe C:\Temp\MyProgram.exe symbolic link created for Backup.exe &lt;&lt;===&gt;&gt; C:\Temp\Backup-1.0.1.exe  C:\Temp&gt;SomeProgram.exe
Java method dispatch with null argument Why does it (apparently) make a difference whether I pass null as an argument directly, or pass an Object that I assigned the value null?  Object testVal = null; test.foo(testVal);    // dispatched to foo(Object) // test.foo(null);    // compilation problem -&gt; "The method foo(String) is ambiguous"     public void foo(String arg) { // More-specific     System.out.println("foo(String)"); }  public void foo(Object arg) { // Generic     System.out.println("foo(Object)"); }   In other words, why is the (commented-out) second call to foo(...) not dispatched to foo(Object)?  Update: I use Java 1.6. I could compile Hemal's code without problems, but mine still doesn't compile. The only difference I see is that Hemal's methods are static while mine are not. But I really don't see why this should make a difference...?  Update 2: Solved. I had another method foo(Runnable) in my class, so the dispatcher couldn't unambiguously select the single most specific method. (See my comment in Hemal's second answer.) Thanks everyone for your help. Nature of the quantum degeneracy pressure It is commonly known that it is the electron degeneracy pressure that prevents the collapse of a white dwarf into a neutron star, and it is not the electromagnetic force. However, it is also widely accepted that all the forces in the universe are just manifestations of the four elementary forces in the universe. So can the degeneracy pressure, caused due to Pauli's Exclusion principle, be shown to be due to one of these forces? I have read some other questions in SE , , and they do not answer my question fully.  In one of the links, the degeneracy pressure is described as an 'entropic force', but as far as I understand, all entropic forces can be explained by the underlying fundamental forces. If the degeneracy pressure is something that is fundamentally different from the other forces, why isn't it classified as a separate force? Javascript close alert box I want to be able to close an alert box automatically using Javascript after a certain amount of time or on a specific event (i.e. onkeypress).  From my research, it doesn't look like that's possible with the built-in alert() function.  Is there a way to override it and have control over the dialog box that it opens?  Also, I don't want an override that shows a hidden div as the alert.  I need an actual dialog box. How to modify an invalid '/etc/sudoers' file? Minecraft Vanilla 1.9 crash with problematic frame ig8icd64.dll Change default saving folder How do I use subprocess.Popen to connect multiple processes by pipes? How do I execute the following shell command using the Python  module?  echo "input data" | awk -f script.awk | sort &gt; outfile.txt   The input data will come from a string, so I don't actually need echo.  I've got this far, can anyone explain how I get it to pipe through sort too?  p_awk = subprocess.Popen(["awk","-f","script.awk"],                           stdin=subprocess.PIPE,                           stdout=file("outfile.txt", "w")) p_awk.communicate( "input data" )   UPDATE:  Note that while the accepted answer below doesn't actually answer the question as asked, I believe S.Lott is right and it's better to avoid having to solve that problem in the first place! Why are there hexagonal holes in my donut? I'm currently making a donut using blender gurus tutorial. I have no idea why, but there are holes in my icing. Does anyone know what could be causing it? Thanks for any help. How does Azkaban's management work? Do badges get calculated in real time, or do they get calculated by an external service? How long does it take for a badge to be awarded, once its requirements are met?  Does Stack Overflow use any external services to do things, like maintenance, e-mailing or badge calculation? In my ~/.bashrc file reside two definitions:   commandA, which is an alias to a longer path commandB, which is an alias to a Bash script   I want to process the same file with these two commands, so I wrote the following Bash script:    #!/bin/bash  for file in "$@"     do     commandA $file     commandB $file done   Even after logging out of my session and logging back in, Bash prompts me with command not found errors for both commands when I run this script.  What am I doing wrong? How can I break an align environment for a paragraph? I would like to have two displayed equations, broken by a short paragraph, but with aligned equal signs (as if using the align environment).  Is there some way to "break" the align environment temporarily? How to cleanly launch a GUI app via the Terminal? Some GUI apps launch cleanly via the Terminal command line, but some don't, and they cause the Terminal to wait for the app to terminate. Even then, some don't "release" the command line.  The mysterious ampersand &amp; suffix seems to cause the terminal to put the process into the background (but I'm not sure what happens there).  Is there a way to launch an app via the Terminal so that there is no "hang on" effect, just like launching something via Alt+F2?  I'd like to have the command line available again immediately, without something still in the background and printing in the terminal. 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? Prove that $\sum_{k=0}^{m}\frac{\binom{m}{k}}{\binom{n}{k}}=\frac{n+1}{n+1-m}$ Prove that $\sum_{k=0}^{m}\dfrac{\binom{m}{k}}{\binom{n}{k}}=\dfrac{n+1}{n+1-m}$.  We know, n > m. From the right side. we have $\dfrac{n+1}{n+1-m}=\dfrac{1}{1-\dfrac{m}{n+1}}$. since n > m. $0&lt;\dfrac{m}{n+1}&lt;1$. Then $\dfrac{1}{1-\dfrac{m}{n+1}}=1+\dfrac{m}{n+1}+(\dfrac{m}{n+1})^2+...$ I don't know what to do next? Did I choose the right path? I know that the derivative of the inverse function of $f(x)$ is $g'(y) = \frac{1}{f'(x)}$ But how to derive the formula for the second derivative of g(y) knowing that $\left[\frac{1}{f(x)}\right]' = -\frac{f'(x)}{(f(x))^2}$ ?  I just started studying this chapter, so please try to be as simple as possible ;-) Thank you. What's the difference between Invoke() and BeginInvoke() Just wondering what the difference between BeginInvoke() and Invoke() are?   Mainly what each one would be used for.  EDIT: What is the difference between creating a threading object and calling invoke on that and just calling BeginInvoke() on a delegate? or are they the same thing? Mysql resolving 127.0.0.1 to hostname Add time restriction in ArcGIS Network Analyst Is a semigroup with unique right identity and left inverse a group? We know that a semigroup with a right identity and right inverse for all elements is a group (e.g. see ). Symmetrically, also a left identity together with a left inverse implies a group. We also know that a semigroup with a right identity and a left inverse is NOT necessarily a group (see ). My questions are:   in a semigroup, is the existence of a UNIQUE right identity together with the existence of a left inverse enough to have a group? in a semigroup, is the existence of a right identity together with the existence of a UNIQUE left inverse enough to have a group?   I think both these claims are false,  ut haven't found a counter-example so far.