Why is power transmission carried out at low current high voltage?
High Voltage Powerlines - clarification of energy loss
How to redirect output of an entire shell script within the script itself? Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself? Redirecting the output of a single command is easy, but I want something more like this: #!/bin/sh if [ ! -t 0 ]; then     # redirect all of my output to a file here fi  # rest of script...  Meaning: if the script is run non-interactively (for example, cron), save off the output of everything to a file.  If run interactively from a shell, let the output go to stdout as usual. I want to do this for a script normally run by the FreeBSD periodic utility.  It's part of the daily run, which I don't normally care to see every day in email, so I don't have it sent.  However, if something inside this one particular script fails, that's important to me and I'd like to be able to capture and email the output of this one part of the daily jobs. Update: Joshua's answer is spot-on, but I also wanted to save and restore stdout and stderr around the entire script, which is done like this: # save stdout and stderr to file  # descriptors 3 and 4,  # then redirect them to &quot;foo&quot; exec 3&gt;&amp;1 4&gt;&amp;2 &gt;foo 2&gt;&amp;1  # ...  # restore stdout and stderr exec 1&gt;&amp;3 2&gt;&amp;4 Get OS-level system information I'm currently building a Java app that could end up being run on many different platforms, but primarily variants of Solaris, Linux and Windows.  Has anyone been able to successfully extract information such as the current disk space used, CPU utilisation and memory used in the underlying OS? What about just what the Java app itself is consuming?  Preferrably I'd like to get this information without using JNI. How to properly indent PHP/HTML mixed code? hard self collision: make particles occupy space Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); &lt;script type="text/javascript" src="starterkit/jquery.js"&gt;&lt;/script&gt;  &lt;form class="item" id="aaa"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt; &lt;form class="item" id="bbb"&gt;   &lt;input class="title"&gt;&lt;/input&gt; &lt;/form&gt;     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form. Is it possible to make abstract classes in Python? Stack Exchange iOS app nearing beta We're getting very close to releasing our iOS app on the App Store.  Since the , we have taken on hundreds of users, fixed a lot of bugs, and we have approached feature completion for v1.0.  We're still working on finishing touches and fixing crashes - but there aren't too many of those these days.  We believe we'll have this out in .    Current Alpha Testers:  We want to extend to you a huge thank you for using our app and giving us feedback.  We've made a ton of improvements that filtered through  here on meta.  We're pretty greedy, though, and we want more of your feedback as we get close to beta.  If you've been using the app, please leave an answer to tell us how you think we've done so far.  Don't go easy on us - we want to get this as right as we can before hitting the App Store.  You might even consider telling us how many stars you would give us if we were in the store.  Also, we created a room called  for more casual discussion about the app.  Everyone Else:  The alpha will continue in the interim, and we still .  The invitations are sent out once a week (usually), so if you don't get an invite right away, don't panic.  We'll get to you.  Bugs or feature requests should be reported here on meta and tagged .  Update, 5/1/2014    As of today, the app is submitted for review.  A great big thanks to all our alpha testers!  Your feedback has been invaluable and has truly helped us make the app much better than it would have been without you.  So what now?  Well, we intend to keep the alpha test group around, except now we're considering it the "beta channel".  It's still important to us, particularly since the update cycle through the AppStore is slow.  We'll still roll out updates in the same way that we have been.  We will also from time ask for targeted feedback on specific features.  And, lastly, if you're just now getting here and wished you had signed up for the alpha, feel free to sign up now anyway.  The form is still there, and we may still let in additional users to the beta channel depending on what our "active users" count looks like. Figure reference \ref{fig:result} renders as ?? in PDF How to sum data.frame column values? Difference of $R^2$ between OLS with individual dummies to panel fixed effect model? Based on my understanding, panel fixed effect model is equivalent to OLS with individual dummies. However, when I ran the two models in R, the $R^2$ from the two models were quite different: 0.8 for OLS with individual dummies and 0.06 for fixed effect model.  Is it the case that in fixed effect model, the fixed effects (individual dummies) are excluded from the calculation of $R^2$? Lines appear on the texture in render I am trying to learn Blender. While trying to render a subdivided plane with an image texture applied to it, the subdivision edges are not removed in the rendered result.  Kindly, advise, why these edges appear in the render. How to prevent system applications (like the Software Center) from asking for password? Nginx installation error in Ubuntu 16.04 :~$ sudo apt-get remove nginx* && sudo apt-get install nginx-full*  Reading package lists... Done Building dependency tree        Reading state information... Done  After this operation, 5,579 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 nginx-full-dbg amd64 1.10.0-0ubuntu0.16.04.1 [3,789 kB] Fetched 3,789 kB in 33s (112 kB/s)                                              Selecting previously unselected package nginx-common. (Reading database ... 189767 files and directories currently installed.) Preparing to unpack .../nginx-common_1.10.0-0ubuntu0.16.04.1_all.deb ... Unpacking nginx-common (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full. Preparing to unpack .../nginx-full_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full-dbg. Preparing to unpack .../nginx-full-dbg_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full-dbg (1.10.0-0ubuntu0.16.04.1) ... Processing triggers for ufw (0.35-0ubuntu1) ... Rules updated for profile 'Apache Full' Rules updated for profile 'Nginx HTTP'  Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for man-db (2.7.5-1) ... Setting up nginx-common (1.10.0-0ubuntu0.16.04.1) ... Setting up nginx-full (1.10.0-0ubuntu0.16.04.1) ... Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.  invoke-rc.d: initscript nginx, action "start" failed.  dpkg: error processing package nginx-full (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of nginx-full-dbg:  nginx-full-dbg depends on nginx-full (= 1.10.0-0ubuntu0.16.04.1); however:   Package nginx-full is not configured yet.  dpkg: error processing package nginx-full-dbg (--configure):   dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                            Errors were encountered while processing:  nginx-full   nginx-full-dbg  E: Sub-process /usr/bin/dpkg returned an error code (1) What is the difference between the dashed and solid attack bars? I was flipping through my Pokemon list to see which kind of attacks they had, and I notice there was a small different between the attacks. Some attacks contained a dashed blue bar where as others contained a solid blue bar.   What is the difference and significance between the two? Motivation for Ramanujan's mysterious $\pi$ formula The following formula for $\pi$ was discovered by Ramanujan: $$\frac1{\pi} = \frac{2\sqrt{2}}{9801} \sum_{k=0}^\infty \frac{(4k)!(1103+26390k)}{(k!)^4 396^{4k}}\!$$   Does anyone know how it works, or what the motivation for it is? Why can't an enum value be fully qualified in a switch statement? My request is simple: Many times, there will be a question where some people feel like it should be closed. At the same time, I'll feel like it's a perfectly legit question, and it should therefore NOT be closed. Right now, I have to wait till it gets enough close votes (which it always does for some reason, as soon as 1 or 2 people vote to close, e/o else decides to vote as well) and then vote to re-open. How about, as soon as there's one vote to close, there should be an option to counter the close vote, something like "vote not to close" or whatever. This would then bring the "Vote to close" number down by one. Only when the vote to close outnumbers the vote not to close by 5, that's when a question is indeed closed. Any thoughts? Would a fast interstellar spaceship benefit from an aerodynamic shape? Some (generous) assumptions:   We have a spaceship that can reach a reasonable fraction of light speed. The ship is able to withstand the high energies of matter impacting at that speed.   Given the amount of matter in inter-stellar space, at high speed, would it encounter enough of it and frequently enough that an aerodynamic shape would significantly reduce its drag (and thus save fuel)? Unless I missed something key during Descent 1/2, how is it that the Borg are once again a collective? How to specify font size less than 10pt (or more than 12pt)?