How to get file list using system variable %LOCALAPPDATA%?
How do I get %LocalAppData% in c#?
When I am at my desk and my laptop is in its docking station I want to ensure that it uses its wired connection and not my wireless network. I am hoping/guessing that the preference in connection is based on the order of the listed connections in the Network and Sharing Center. I could just switch the wireless off but I'd prefer to not have to go through the trouble. What is economics like for ordinary people in the Star Trek universe? I've read a lot about PCA, including various tutorials and questions (such as , , , and ).   The geometric problem that PCA is trying to optimize is clear to me: PCA tries to find the first principal component by minimizing the reconstruction (projection) error, which simultaneously maximizes the variance of the projected data.    When I first read that, I immediately thought of something like linear regression; maybe you can solve it using gradient descent if needed.  However, then my mind was blown when I read that the optimization problem is solved by using linear algebra and finding eigenvectors and eigenvalues. I simply do not understand how this use of linear algebra comes into play.  So my question is: How can PCA turn from a geometric optimization problem to a linear algebra problem? Can someone provide an intuitive explanation?  I am not looking for an answer like  that says "When you solve the mathematical problem of PCA, it ends up being equivalent to finding the eigenvalues and eigenvectors of the covariance matrix." Please explain why eigenvectors come out to be the principal components and why the eigenvalues come out to be variance of the data projected onto them  I am a software engineer and not a mathematician, by the way.  Note: the figure above was taken and modified from . What are the advantages of using the optical viewfinder over live preview to take photos on a DSLR? Forgive this novice question, I am basically a complete newbie to photography.  Really, all I've ever used for most my of short life have been point-and-shoots; I've only recently started to pick up some curiosity.  Anyway, from what I've gathered, reading through many of the  questions, most serious photographers use the optical viewfinder as their primary tool to determine what makes a good shot.  Live-preview isn't used much at all; it seems its help is to primarily set up the shot.  Reading a Wikipedia article seems to confirm this view, adding that      [l]ive preview in DSLRs does not typically serve as their principal means of framing and previewing before taking a photograph, with this function still being mainly performed with optical viewfinder. While initially largely a novelty feature, live-preview functionality has become more common on DSLR cameras...    My questions are:   What are the myriad advantages of using the viewfinder over live preview, what does it help one accomplish in achieving the goals of photography? What are some interesting ways serious photographers use live preview to take better shots they might have otherwise missed? Can I change my flight dates after I get my Schengen visa? I am an Indian student in the UK. If I already had a single entry Schengen visa and I apply again to the French embassy, will I be issued with multiple-entry?  If I get the visa, but due to a problem, I cannot travel on the intended dates(ones I mentioned on visa form) and decide to travel a month later, will it cause a problem when I travel next. And if I dont exactly follow the itenary that I submitted with my visa application?  As far as dates are concerned. I mean this: Suppose my visa is valid for May-August. When I applied for this visa, my itenary and hotel bookings were for June. But now I decide to travel instead in July. Will there be a problem if I did not take the journey for which I initially applied the visa and take a different journey later instead For which $n≥2$ does there exist $\sigma\in A_n$ with $|\sigma| &gt; n$? I have a proof that I'd like to be verified. My proof that there exists $\sigma\in A_n$ with $|\sigma| &gt; n$ if and only if $n\geq 8$: For $n&lt;8$, one can manually verify for each $n$ that there is no $\sigma\in A_n$ with order greater than $n$. Suppose $n\geq 8$. Case 1: $n$ is even and $3\not\mid n$. Then the permutation $(1,2,3)(4,\dots,n)$ is even and has order $\operatorname{lcm}(3,n-3)=3n-9\geq n+16-9\geq n + 7$. Case 2: $n$ is even and $3\mid n$. Then $n\geq 12$, so $n-2\geq 8$ is even and is not divisible by 3. Applying Case 1, we see that $(1,2,3)(4,\dots,n-2)\in A_n$ has order at least $n+5$. Case 3: $n$ is odd. Then apply one of the previous two cases with $n-1$ to get an even permutation with order at least $n+4$. $\blacksquare$ Is my proof correct? It doesn't seem very elegant. Is there some slicker proof? 1) Up until now, during practical work sessions, I always used these formulas for uncertainty propagation:  if $C = A+B$  or  $C = A-B$ $$\Delta C = \Delta A + \Delta B$$ if $C = AB$ or $C = \frac{A}{B}$ $$\frac{\Delta C}{C} = \frac{\Delta A}{A}  + \frac{\Delta B}{B}$$ if $C = A^m$ $$\frac{\Delta C}{C} = |m|\frac{\Delta A}{A}$$   These formulas are derived from the expression for the differential of a function of multiple variables:  if $C = f(A,B)$ $$ dC = \frac{\partial C}{\partial A}dA + \frac{\partial C}{\partial B}dB \Rightarrow \Delta C = \frac{\partial C}{\partial A}\Delta A + \frac{\partial C}{\partial B}\Delta B$$  and I think that makes sense because the value C is just a function of two variables that happen to be measurements.  2) But this morning, I was told that this is wrong and I should actually use these instead:  if $C = A+B$  or  $C = A-B$ $$(\Delta C)^2 = (\Delta A)^2 + (\Delta B)^2$$ if $C = AB$ or $C = \frac{A}{B}$ $$\left(\frac{\Delta C}{C}\right)^2 = \left(\frac{\Delta A}{A}\right)^2  + \left(\frac{\Delta B}{B}\right)^2$$  which are apparently derived from a general formula:  $$(\Delta C)^2  = \left(\frac{\partial C}{\partial x_1}\Delta x_1\right)^2 + \left(\frac{\partial C}{\partial x_2}\Delta x_2\right)^2 +   \hspace{0.3cm}...$$  or   $$\Delta C  = \sqrt{\left(\frac{\partial C}{\partial x_1}\Delta x_1\right)^2 + \left(\frac{\partial C}{\partial x_2}\Delta x_2\right)^2 +   \hspace{0.3cm}...}$$  3) So:   Why is this formula better?  Where does it come from? What does it actually represent? (Do I recognize the shape of a norm in that last formula?)  What is wrong with the formula of the differential?   I'm asking a lot, but the propagation of uncertainty always confused the ship out of me. What is an idiom/slang for "someone who pretends to be good when they're not"? This is not from real life, but from a movie on my local TV. A character in the movie is really bad, but when she talks with others, she pretends to be an innocent/ good woman. I want to know how to describe this kind of person. I want to run a script to simply change the current working directory:  #!/bin/bash cd web/www/project   But, after I run it, the current pwd remains unchanged! How can I do that? Why would Mystique's DNA allow for Sentinels that can duplicate mutant powers? The future Sentinels in  are clearly shown adapting to powers thrown at them by copying them. Isn't that what Rogue's DNA would allow for, not Mystique's? Mystique can just change appearance, not copy powers ... right? So why would study of her mutant genes allow for the abilities of the future Sentinels? Is it possible to call a function whose name is stored in a string in vbscript? How do I invoke a Java method when given the method name as a string? Separability over intersection of intermediate fields Let $E\mathop{/}F$ be a finite-degree normal extension of fields. Let $K$ and $L$ be intermediate fields (that is, $F\subseteq K\subseteq E$ and $F\subseteq L\subseteq E$) such that $E$ is separable over both $K$ and $L$. Show that $E$ is separable over $K\cap L$.   So I was thinking that if $f=\min_{K\cap L}(\alpha)$. Then $\min_{K}(\alpha)$ divides $f$. But if $f$ has repeated roots then I don't see what goes wrong.   Thanks! Working with a huge file. Illustrator is super slow. What can I do to ease the load? The size of the file is 168mb and it's nearly impossible to work on the file because every action takes like five minutes or so to complete. The artwork is of a scene filled with characters and I so far outlined the entire thing with a brush and afterwards expanded all the strokes thinking it would help ease the load. However, the file is still way too big. Is there something I can do to make it easier to work on the file?  Edit: I flattened transparency and got it reduced to 33mb. Huge difference, but would like it even smaller if possible. Calculating roundness/compactness of polygon? I am trying to find ways to quantitatively describe the shapes of various polygons. For my project, these polygons represent lakes, rivers, lagoons, and parks. So they can be almost any shape. One easy metric is to calculate perimeter vs. area, which is at best an only slightly useful metric. But I would also very much like to be able to say something about the 'roundness' of a polygon. Or how 'compact' the shape is on a map.  The only way I can think of doing this easily is to calculate the area of each polygon in relation to a bounding box for that polygon (which I already have). But this seems like a poor solution.  So now I am thinking of something more like this - take the centroid of the polygon, add on a series of buffers of increasing areas (say 50%, 100%, 150%), then compare how much overlap there is between each buffer and the original polygon. A perfect circle will have perfect overlap at 100%, and I can use the 50% and 150% buffers to judge how much and in what way each polygon differs.  But even that feels cumbersome, and like a poor workaround for what somebody else has probably already figured out far better.  For reference, at a minimum I will need to be able to look at the resulting indices for the shape of various polygons, and be able to make an educated guess as to their source (River? Reservoir with dendritic shape? Lake/Lagoon? Park?) Triangle Inequality for norm integral $\|f\|_1=(\int_a^b [|f|^2+|f'|^2]\mathsf dx)^{1/2}$. Define $C_1^1[a,b]$ to be the space of continuously differentiable functions on $[a,b]$, with norm $$\|f\|_1=\left(\int_a^b[|f|^2+|f'|^2]\mathsf dx\right)^{1/2}.$$ Show that this is a proper definition of a norm. Is this normed space complete?  I'm stuck on the triangle inequality part. I'm having a hard time showing that $$\|f+g\|_1\leq \|f\|_1+\|g\|_1.$$ Any hints or solutions are greatly appreciated. In a Poisson model, what is the difference between using time as a covariate or an offset? I recently discovered how to model exposures over time using the log of (e.g.) time as an offset in a Poisson regression.  I understood that the offset corresponds to having time as covariate with coefficient 1.  I'd like to better understand the difference between using time as an offset or as a normal covariate (therefore estimating the coefficient). In which situation should I want to use one method or the other?  UPGRADE: I don't know if it is interesting, but I ran a validation of the two methods using randomly split data repeated 500 times and I noticed that using the offset method leads to a larger test error. Origin of the term "fun fact" Where does the term "fun fact" originate?-- namely, not with the compositional meaning but rather with the idiomatic usage to introduce some sort of unusual, esoteric, absurd or otherwise "controversial" fact? When I click on 'Business Data Connectivity Services' link on 'Manage Service Application' page of Central Administration, I get the following error : "The load balancer is not provisioned. Verify the load balancer was provisioned successfully before retrieving endpoint addresses. " I got a solution from  link, but as per instruction I am unable to install the hotfix for SharePoint 2013. Is there any solution available for this problem? Thanks in advance Why girth of Petersen Graph is five? (Proof) I want to know, what is the mathematical proof that shows the shortest cycle in Petersen Graph has length five?