managing metadata about .lnk files i have some folders/files in Recent items of windows.what i want to do is i want to know real path of all the files/folders of .lnk shortcuts present in Recent Items.I want result like this. Local path      : C:\Program Files (x86)\Windows Live\Mail\wlmail.exe  My code is given  /*  * To change this license header, choose License Headers in Project Properties.  * To change this template file, choose Tools | Templates  * and open the template in the editor.  */ package sir.aimal;  import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.LinkOption; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.BasicFileAttributeView; import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.FileTime; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date;  /**  *  * @author zeeshan  */ public class SirAimal  {       public static void main(String[] args) throws IOException     {         String user=System.getProperty("user.name");         String path="C:\\Users\\"+user+"\\AppData\\Roaming\\Microsoft\\Windows\\Recent\\";          File directory = new File(path);         File[] fList = directory.listFiles();          for (int i=0;i&lt;fList.length;i++)         {             String filename=fList[i].getName();             String actualfilename=filename.replace(".lnk", "");              Path p = Paths.get(path+filename);               BasicFileAttributes view= Files.getFileAttributeView(p, BasicFileAttributeView.class).readAttributes();             FileTime fileTime=view.creationTime();             System.out.println(actualfilename+"\t\t"+new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format((fileTime.toMillis())));           }      }   }
Windows shortcut (.lnk) parser in Java? I'm currently using Win32ShellFolderManager2 and ShellFolder.getLinkLocation to resolve windows shortcuts in Java. Unfortunately, if the Java program is running as a service under Vista, getLinkLocation, this does not work. Specifically, I get an exception stating "Could not get shell folder ID list".  Searching the web does turn up mentions of this error message, but always in connection with JFileChooser. I'm not using JFileChooser, I just need to resolve a .lnk file to its destination.  Does anyone know of a 3rd-party parser for .lnk files written in Java I could use?  I've since found unofficial documentation for the .lnk format , but I'd rather not have to do the work if anyone has done it before, since the format is rather scary.
Square bracket notation for dimensions and units: usage and conventions One of the most useful tools in  is the use of square brackets around some physical quantity $q$ to denote its dimension as  $$[q].$$  However, the precise meaning of this symbol varies from source to source; there are a few possible interpretations and few strict guidelines. What conventions are there, who uses them, and when am I obliged to follow them? How to assign many variables the same value in a smart way? Is the product of two Gaussian random variables also a Gaussian? Say I have $X \sim \mathcal N(a, b)$ and $Y\sim \mathcal N(c, d)$.  Is $XY$ also normally distributed?  Is the answer any different if we know that $X$ and $Y$ are independent? How do I apply a gradient across multiple objects in Illustrator? I have two separate objects that I have applied gradient fill to.  The gradient fill seems to only apply to the objects as individuals. I tried grouping the shapes, but that doesn't seem to change the gradient.    How do I get one gradient to cover all my shapes? I've been studying about the command line and learned that | (pipeline) is meant to redirect the output from a command to the input of another one. So why does the command ls | file doesn't work?  file input is one of more filenames, like file filename1 filename2  ls output is a list of directories and files on a folder, so I thought ls | file was supposed to show the file type of every file on a folder.  When I use it however, the output is:      Usage: file [-bcEhikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type]         [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...     file -C [-m magicfiles]     file [--help]   As there was some error with the usage of the file command How to avoiding losing your current browsers websites when being redirected by wireless login pages set only lower bound of a limit for ggplot Analyzing limits problem Calculus (tell me where I'm wrong). I came accross: $$\lim_{x \to\ 0}\frac{x\cos x - \log (1 + x)}{x^{2}}$$  I tried the following please tell me where I 'm wrong:  $$\lim_{x \to\ 0}\frac{x\cos x - \log (1 + x)}{x^{2}} $$  $$\text{(Dividing by }x)$$   $$=\displaystyle\lim_{x \to\ 0}\dfrac{ \cos x - \dfrac{\log (1 + x)}{x}}{x} $$  $$=\lim_{x \to\ 0}\frac{\cos x - 1}{x} $$  $$=\lim_{x \to\ 0}\frac{-2\sin^{2} \dfrac{x}{2}}{x} $$  $$=\lim_{x \to\ 0}\frac{-2x\sin^{2}\dfrac{x}{2}}{(\dfrac{x}{2})^{2}\times 4} $$ $$\lim_{x \to\ 0}\dfrac{-x}{2}=0$$ But Answer given is $\dfrac{1}{2}$  Please Help. Inspired by , say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links to a solution in pseudo code, but I'd like to see some real world stuff.  [1][2][3][4] [5][6][7][8] [9][0][1][2] [3][4][5][6]   Becomes:  [3][9][5][1] [4][0][6][2] [5][1][7][3] [6][2][8][4]   Update: Nick's answer is the most straightforward, but is there a way to do it better than n^2? What if the matrix was 10000x10000? What makes a spell being cast considered to be a {class} spell? My understanding is that when a spell is known or prepared via one of your class features, or if you cast it via a class feature, it's considered a "class spell" (sorcerer spell, cleric spell, etc.) for you. If you cast it via some method outside your class (items, etc.), it isn't considered a spell from your class.  For clarity, some class features care about whether or not a spell is a 'class' spell (emphasis mine):    Wild Magic Surge for Wild Magic sorcerers can only trigger "[...] immediately after you cast a sorcerer spell [...]". Overchannel for School of Evocation wizards can only be used "when you cast a wizard spell [...]" Empowered Evocation for School of Evocation wizards can also only be used on "[...] any wizard evocation spell you cast". Rod of the pact keeper gives a bonus "[...] to the saving throw DCs of your warlock spells".   Contrast with a feature like Blessed Healer for Life Domain clerics that just use the language of "When you cast a spell [...]", and you'll see why I believe there's an important distinction as to whether or not a spell instance is a 'class' spell.  However, comments on  made me question where my understanding of what makes a spell instance a 'class' spell comes from, and I'm not sure of a concise spot that explains it. What are the rules that govern what is or is not considered a class spell when cast?   Of particular concern is whether or not a spell is, in all instances, a class spell once you've obtained it from your class. For example, if you were a wizard that had magic missile both prepared and in your spellbook, would any instance of magic missile you cast be considered a wizard spell, even if it was cast by way of, say, a wand of magic missile? How to update libavcodec on ubuntu 14.04? On Ubuntu 14.04.5 I just upgraded firefox to version 50.0; now there is a message on some pages which reads:   libavcodec may be vulnerable or is not supported, and should be updated to play videos   So how can I update libavcodec?  A simple   sudo apt-get install libavcodec   gives the following output:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package libavcodec   So maybe I don't have libavcodec installed in the first place? So why do I get this message...? How to set a short password on Ubuntu? Display top tags & percentiles from additional Stack Exchange sites on Careers Are the "top tags &amp; percentiles" from Stack Exchange sites other than Stack Overflow displayed in the Careers site?  If not can they be added?  If they are, then what are the requirements for them being displayed in the Careers site? Where to place 'only' Proving $f(x,y,z)=\big(\frac{x}{a+x+y+z}, \frac{y}{a+x+y+z}, \frac{z}{a+x+y+z} \big)$ is injective Let $a\in \mathbb{R}$, $a\neq 0$, and $E=\{(x,y,z)\in \mathbb{R}^3:a+x+y+z\neq 0\}$ and $f:E\rightarrow \mathbb{R}^3$ defined by $$ f(x,y,z)=\big(\frac{x}{a+x+y+z}, \frac{y}{a+x+y+z}, \frac{z}{a+x+y+z} \big) $$ Show that $f$ is injective.    I've been trying to prove it directly by showing that if $f(x_1,y_1,z_1)=f(x_2,y_2,z_2)\Rightarrow$ $x_1=x_2, y_1=y_2,z_1=z_2$. But I get a system of equations which I'm find difficult to deal with. Any help would be greatly appreciated. How to calulate mosfet response time with load? I would like to calculate the response time of a PMOS circuit and of the circuit  Could you tell me how to do it?    I'm using this transitor.   I tried to use the rise time of the PMOS to find it can switch (and i don't know if that's the good way), but I don't now the results with the load. CL en RL. I assume CL at t=0ms is equal to 0V. I tried to use dv/dt, but I failed VIN1 = 28V. VCMD is a command  Thanks.  edit: I made a mistake. The Zener is also connected to the source. Sorry I know what anti-matter is and how when it collides with matter both are annihilated. However, what about anti-photons? Are there such things as anti-photons?  I initially thought the idea preposterous. However I am curious because, if anti-photons don't exist, then anti-matter could theoretically transfer its energy to normal matter - through the mechanism of light. Is it right? Why does a 95% Confidence Interval (CI) not imply a 95% chance of containing the mean? It seems that through various related questions here, there is consensus that the "95%" part of what we call a "95% confidence interval" refers to the fact that if we were to exactly replicate our sampling and CI-computation procedures  many times, 95% of thusly computed CIs would contain the population mean. It also seems to be the consensus that this definition does not permit one to conclude from a single 95%CI that there is a 95% chance that the mean falls somewhere within the CI. However, I don't understand how the former doesn't imply the latter insofar as, having imagined many CIs 95% of which contain the population mean, shouldn't our uncertainty (with regards to whether our actually-computed CI contains the population mean or not) force us to use the base-rate of the imagined cases (95%) as our estimate of the probability that our actual case contains the CI?   I've seen posts argue along the lines of "the actually-computed CI either contains the population mean or it doesn't, so its probability is either 1 or 0", but this seems to imply a strange definition of probability that is dependent on unknown states (i.e. a friend flips fair coin, hides the result, and I am disallowed from saying there is a 50% chance that it's heads).  Surely I'm wrong, but I don't see where my logic has gone awry... Why is it called Area 51? According to : "We like the little aliens."  This seems well targeted to appeal to the Stack Overflow / Server Fault / Super User audience, but way off the mark if the goal is to "make the Internet a better place to get expert answers to your questions."    There are experts who aren't interested in or focused on technology oriented topics.  Little aliens are unlikely to be something that someone interested in organizing a site on gardening would gravitate too.  No, I'm not suggesting that no one interested in gardening would be bother to look at a site with little aliens, but won't it be likely that the sort of mass appeal to to a very broad cross section of the internet will be lacking? Cloth collision with an object