My shortcuts often get broken because I move stuff around and unfortunately, the Windows link tracker can't keep up. Is there a way to programmatically (with Powershell) read and edit the properties of the shortcut? I would like to run a script that searches the whole hard drive (or wherever I specify) for a file that matches the target name and then update the shortcut with that new location assuming it is the right file.
I've found a nasty VBS way to do this, but I'm looking for a native PoSh procedure to edit the properties of a .LNK file.  The goal is to reach out to remote machines, duplicate an existing shortcut with most of the correct properties, and edit a couple of them.  If it would just be easier to write a new shortcut file, that would work too.
How to format table with long column head entries? AWK: Nested Conditional Subset of Rows I have a pretty specific question, and have been able to find lots on conditional subsetting using awk but none that lends enough explicit code for me to generalize to my situation. I have a file 'keys' and a file 'features'. The 'keys' table contains two variables, KEY and GROUP, toy example below.      KEY        GROUP     ---        -----     1          GROUP0     2          GROUP0     3          GROUP1     4          GROUP1     5          GROUP2     6          GROUP2     The file 'features' contains a list of features of widgets like so      ID          FEATURE      VALUE     --          -------      -----     A           num_user     10     A           KEY          4     B           num_user     2     B           KEY          2     B           battery      Large     C           num_user     10     C           KEY          15     D           num_user     2     D           KEY          2     D           battery      Small     E           num_user     2     E           KEY          7     E           battery      Small   I am trying to select all rows for an ID which has a value of 'KEY' that is in the 'KEY' column of 'keys' for a hardcoded list of 'GROUP' values. The desired result is      ID          FEATURE      VALUE     --          -------      -----     A           num_user     10     A           KEY          4     B           num_user     2     B           KEY          2     B           battery      Large     D           num_user     2     D           KEY          2     D           battery      Small   Any ideas? Is there a particular reason that using clone = obj *1 is avoided when "cloning" objects? What are the differences between "lay" and "lie"? Given that $a$~$\mathcal{N}(\mu, \Sigma)$ and $\mu$~$\mathcal{N}(0, \sigma^2 I)$, Is $p(a|\Sigma, \sigma)=\int p(a|\mu, \Sigma)p(\mu|\sigma)d\mu$ again a Normal distribution? And how to estimate the mean and variance respectively? Thanks a lot! What is this sand covered insect? I have found in a wooden house, in the mountains of central Spain this very curious insect:    I was wondering if that was its skin or whether it's decomposition or sand or saw-dust.  That particular region of Spain does have stink-bugs ... but this one doesn't look like anything I've seen before.  A google image search returns mostly arachnids ... but it seems to have only 6 legs. Toggle wireframe mode with hotkey Execution of a command locally after ssh tunneling I have a script file ./run_app.sh which contains of the following:  ssh -L 8888:localhost:8888 ubuntu@address ./run_website.sh   # it should be executed locally   but it tries to run the second line on the remote machine. Actually, I want to run it on my pc. Any idea? How to find $\partial\chi^2/\partial a$ where $\chi^2=\sum_{i=1}^N\dfrac{D(x_i)-a-b(x_i)^2}{\sigma_i^2}$?  My attempt: \begin{align} \dfrac{\partial}{\partial a}\sum_{i=1}^N\dfrac{D(x_i)-a-b(x_i)^2}{\sigma_i^2} &amp;= \dfrac{\partial}{\partial a}\sum_{i=1}^N\dfrac{D(x_i)-b(x_i)^2}{\sigma_i^2}-\sum_{i=1}^N\dfrac{-a}{\sigma_i^2}\\ &amp;=\sum_{i=1}^N\dfrac{D(x_i)-b(x_i)^2}{\sigma_i^2}-\dfrac{\partial}{\partial a}\sum_{i=1}^N\dfrac{-a}{\sigma_i^2}\\ &amp;=\sum_{i=1}^N\dfrac{D(x_i)-b(x_i)^2}{\sigma_i^2}-\dfrac{1}{\sigma_i^2}\cdot\dfrac{\partial}{\partial a}\sum_{i=1}^N-a\\ &amp;=\sum_{i=1}^N\dfrac{D(x_i)-b(x_i)^2}{\sigma_i^2}-\dfrac{1}{\sigma_i^2}\cdot\dfrac{\partial}{\partial a}a^N\\ &amp;=\sum_{i=1}^N\dfrac{D(x_i)-b(x_i)^2}{\sigma_i^2}-\dfrac{1}{\sigma_i^2}\cdot N\cdot a^{N-1}\\ \end{align}  Is this correct?  EDIT: As per the accepted answer, this is how I got my final partial derivative. \begin{align}             \dfrac{\partial}{\partial a}\sum_{i=1}^N\dfrac{D(x_i)-a-b(x_i)^2}{\sigma_i^2} &amp;= \dfrac{\partial}{\partial a}\Bigg[\sum_{i=1}^N\dfrac{D(x_i)-b(x_i)^2}{\sigma_i^2}-\sum_{i=1}^N\dfrac{-a}{\sigma_i^2}\Bigg]\\             &amp;=\dfrac{\partial}{\partial a}\Bigg[\sum_{i=1}^N\dfrac{D(x_i)-b(x_i)^2}{\sigma_i^2}\Bigg]-\dfrac{\partial}{\partial a}\Bigg[\sum_{i=1}^N\dfrac{-a}{\sigma_i^2}\Bigg]\\             &amp;= 0-\dfrac{\partial}{\partial a}\Bigg[\dfrac{-a}{\sigma_1^2}+\dfrac{-a}{\sigma_2^2}+\cdots+\dfrac{-a}{\sigma_N^2}\Bigg]\\             &amp;= -\Bigg[\dfrac{\partial}{\partial a}\Bigg[\dfrac{-a}{\sigma_1^2}\Bigg]+\dfrac{\partial}{\partial a}\Bigg[\dfrac{-a}{\sigma_2^2}\Bigg]+\cdots+\dfrac{\partial}{\partial a}\Bigg[\dfrac{-a}{\sigma_N^2}\Bigg]\Bigg]\\             &amp;= -\Bigg[\dfrac{-1}{\sigma_1^2}\cdot\dfrac{\partial}{\partial a}[a]+\dfrac{-1}{\sigma_1^2}\cdot\dfrac{\partial}{\partial a}[a]+\cdots+\dfrac{-1}{\sigma_N^2}\cdot\dfrac{\partial}{\partial a}[a]\Bigg]\\             &amp;= -\Bigg[\dfrac{-1}{\sigma_1^2}+\dfrac{-1}{\sigma_2^2}+\cdots+\dfrac{-1}{\sigma_N^2}\Bigg]\\             &amp;= \sum_{i=1}^{N}\dfrac{1}{\sigma_i^2}\\         \end{align} I'm using Xubuntu 14.04 64 bit. I know that question been asked a billion times, but all of them consist of editing following file:  /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla   That file does not exist on my system. I tried com.xubuntu.enable-hibernate.pkla but doesn't exist either, locate command doesn't find it. I am extremely poor in solving a problem quickly, which leaves me doing badly in olympiads and other contests. But, if I just don’t give up on a problem, no matter how much time it takes, I usually end up solving it. To have a future in mathematics or physics, is it necessary for me to excel at contests, because these days children excelling at contests have an advantage over those who don’t (not complete advantage, but advantage nonetheless)? Downloading all my questions with the answerer names I am writing several papers in which I use answers which I received in various StackExchange websites. Naturally I would like to acknowlege and thank the SE members that gave the useful answers. But there are many such answers, and each answer is relevant to a different paper.   So, I would like to download all the questions that I asked in the various SE websites, including the answerer names, to an Excel worksheet in which I can organize the questions by subject.  Is this possible? Show that if $ab$ has finite order $n$, then $ba$ also has order $n$. - Fraleigh p. 47 6.46. How can you get the "real" HttpContext within an ASP.NET MVC application? What's the intuition behind the identities $\cos(z)= \cosh(iz)$ and $\sin(z)=-i\sinh(iz)$? I'm trying to understand in an intuitive manner the relationship between the circular and hyperbolic functions in the complex plane, i.e.:  $$\cos(z)= \cosh(iz)$$ $$\sin(z)=-i\sinh(iz)$$  where $z$ is a complex number.  From a geometric point of view, what I understand is that cos is the composition of a rotation through $\frac{\pi}{2}$, followed by cosh, and sin is the composition of a rotation through $\frac{\pi}{2}$, followed by sinh, followed by a rotation through $-\frac{\pi}{2}$ (where sin, cos, sinh, cosh are defined as complex functions).  Where does this connection come from? Is there some way it can be visualized in terms of complex mappings? (I'm not asking for a proof of the identities, I already know one). Is it possible to get a list of most recently installed packages? Why is the mean function in Gaussian Process uninteresting? Android app should send edits to edit queue if necessary rather than rejecting them I edited a question, on Stack overflow and when submitting preview, got red bar telling me my account isn't allowed to make suggested edits.  On the Sandbox android question it works fine, but that is editing an answer to my question.   The message I receive is:     Account is not allowed to suggest edits   Are the rules for suggested edits different for Android app? What was the joke that Geordi told Data in TNG: "Encounter at Farpoint"? states:     Apparently at some point during this mission, Geordi La Forge told Data a joke, which the humorless android did not "get" until years later, when he activated his emotion chip during the events of Star Trek: Generations.    Is it known what the joke is? Can we prevent titles with an unnecessary tag in them?