How do I override the CSS styles in my template?

Question: When using a free/commercial Joomla template from Template Club X/Y/Z, what is the best way to include my own CSS styles?
Comment: Add a custom.css stylesheet.
if your template doesnt' pick it up automatically, you can add it in your head.php
usually the path is:
templates/templatename/tpls/blocks/head.php
Answer: Why use CSS overrides?
It's always a good idea to keep your CSS styles separate from the existing template styling, if you're using a pre-built Joomla template.

It's easier to maintain
Your changes will not be lost if you upgrade the template
You can easily copy/move the modifications to another template or another site.

How does CSS overrides work?
CSS means "Cascading Style Sheets", "Cascading" in this context meaning that because more than one stylesheet rule could apply to a particular piece of HTML, rule used is chosen by cascading down from the more general rules to the specific rule required (the most specific rule is chosen), or based on the order of the rules for any element (the last rule found is chosen).
As long as your customized CSS file is loaded after the default template CSS files, you can add your own styles to override specific elements as needed (there are some exceptions, more on that below).
General usage
To load a custom style sheet in the Joomla  tag, the following code can be added to the index.php file of your template (YOURDOMAIN.COM/templates/yourtemplate/index.php), right before the ending  tag in order to ensure your file is loaded last.
JHtml::_('stylesheet', JUri::root() . 'templates/' . $this->template . '/css/custom.css');

(The CSS file can have any name, and does not have to be in the /css/ subfolder, but it's cleaner that way.)
It's also possible to add a normal <link> tag, but this is less flexible than the above mentioned option:
<link rel="stylesheet" href="/templates/mytemplate/css/custom.css" type="text/css" />

!Important
Some extensions might load their CSS styles after yours (or even add styles directly in the index.php file), thus overriding your overrides. This can usually be solved by adding !important to your styles, eg. h1{color:red!important;}
Usage in different frameworks
Now the fun part: Many template frameworks has though of the possibility that users would want to make changes to their templates, thus adding an easy way to include your CSS overrides. Here are some of the methods used:
RocketTheme Gantry 4
RocketTheme templates are powered by the Gantry Framework, and a customized CSS file will be loaded automatically if found. The CSS file must be placed in the /templates/yourtemplate/css/ folder, and the name must be YOURTEMPLATEFOLDER-custom.css.
Example: If you're using their free Afterburner 2 template, the default template directory is /templates/rt_afterburner2/. Add a file called rt_afterburner-custom.css (carefull with underscore and hyphen) to the /css/ subfolder, and it will be loaded automatically by the Gantry framework.
Shape 5
Shape 5 templates ship with an empty custom.css file in the /css/ subdirectory of your template. Simply add your styles to this file and they will be included in your layout.
Gavick Pro
Gavick Pro templates ship with an empty overrides.css file in the /css/ subdirectory. But note that this file is not loaded by default, you have to activate Override CSS in the Advanced Settings tab in the template settings.
Joomla Shine
Create a custom CSS file in the /css/ subfolder of your template e.g. custom.css and specify the file name at Extensions -> Templates -> [template name] -> SEO & System -> Custom CSS/JS File(s).
T3 Framework
Templates based on the T3 Framework may/may not include a custom.css file in the /css/ subfolder of your template (simply create it if it's not there), but when present, the file will be loaded after any other CSS file.
Warp Framework
Templates based on the Warp Framework automatically loads the custom.css file found in the /css/ subfolder. Additional CSS files can be loaded by adding
$this->warp->stylesheets->add('css:yourcssfile.css');

to the file /layouts/template.config.php.
Comment: Actually, the newer rocket themes use LESS. All you have to do is make a file in the LESS folder called template-custom.less and put your code in that. Then you can enjoy the tricks that LESS brings.

Warp 7 allows you to create your own "style" in the styles folder and you can actually stick a custom.css file in THAT folder (inside its own css folder). That way each style can have its own custom CSS. It also makes it stand up to template upgrades. Using the default custom.css file means it gets overwritten every time you upgrade the theme.
Comment: For general usage, I would suggest using `JHtml::_('stylesheet', 'path/to/file')` rather than `addStyleSheet` as already argued about on another answer :) Other than that, bloody good answer. Will definitely come in handy for people
Comment: `JHtml::_('stylesheet', JUri::root() . 'templates/' . $this->template . '/css/style.css');`
Comment: Great answer and very useful! Another option you might like to add for templates/frameworks that don't include provision for custom CSS files is the use of a third party extension such as CSSConfig http://extensions.joomla.org/extensions/style-a-design/templating/24523 which is designed for this exact purpose.
Comment: Thank you, @Lodder. I hope this info can be useful to people. Regarding your suggestion, I did read the debate. How can `JHtml::_` be used with `$this->template` ?
Answer: Joomla 3.5+ (Protostar template)
As of Joomla 3.5, you're able to create file called user.css and place it in:

templates/protostar/css/user.css

Note: the file name must be user.css

The protostar template will check if:

The file exists
The file size is > 0.

If both conditions are met, it will automatically import this file for you.
See the Pull Request on Github
Answer: Helix Framework (JoomShaper)
Another Joomla template framework, that facilitates the customization workflow.
Helix Framework templates provide as well an easy way to add your custom styles with 2 convenient methods.

In the template control panel in backend, there is a Custom CSS field. Here you can type your css, which will be added as a style element in the head section of your pages and as such, it will also take precedence over other external css files.
Of course this option is not the ideal, if you are planning to write a bunch of lines of css, therefore there is a second method.

As many other template frameworks, Helix also provides the ability to create your own custom.css file. Simply create it, and place it inside the css folder of the template. The template will parse it and will include it in the head section of your pages.
Answer: Johanpw has done a very good job with his answer on his own question... especially regarding the css overrides for many commercial templates.
I would only like to add my two cents here...
As Johanpw underlined, creating CSS overrides is the recommended practice. Keeping your custom CSS in a single file that you know it won't be deleted or overridden after an update is essential.
This is important to remember for all Joomla extensions. Don't try to change a module's or component's core css file. Instead, better try to create your own custom template.css file, load it last and in there create all your custom styles.
In cases where a commercial template does not provide a way to add a css override then you could use an extension like this: Add Custom CSS, which allows exactly this. To create your custom css override file and load it last.
Another option I often do in sites that I manage, is to modify the template and add my own link to my custom.css file, just before the closing head tag of the template. This is a minor, easy to remember and restore modification, that I am okay to deal with, when a template update arrives.
Answer: Gantry 5 (RocketTheme)
Gantry 5 is the latest version of the popular template framework and it provides a lot of new features and capabilities.
Regarding CSS overrides, there is a lot of flexibility and options.
Taking the Hydrogen Theme that is released as a standard Gantry 5 template, it provides a folder named custom.
This folder is provided for the user to place his custom files/overrides for the gantry framework/template (to not be confused with the Joomla template overrides, which remains in the template/html folder).
You can place in there you custom.css file. Then through Gantry Template Administration Panel, you can customize your template layouts and use a Custom CSS/JS Atom Particle (a new gantry 5 feature), to add your custom.css to the template. Gantry 5 provides also the so-called stream links, (like shortcuts), in order to easily link your custom.css file.
So from inside the Atom particle you would link it using:
gantry-theme://custom/thing.css

The gantry-theme:// shortcut, will always refer to the current gantry template folder.
Using this approach is an efficient way to add custom.css for specific template outlines of your gantry5 template.
A second approach, that works globally for the whole gantry template, is by adding a custom.scss file, inside:
template_directory/custom/scss/custom.scss

Doing so, gantry5 will always load and compile this scss file, and any css rules you have applied will override the template's default rules.
Inside the scss file you are perfectly fine either using SCSS or simply css. The compiler is able to compile both.


Can't log on to any site that has Captcha

Question: trying to login to my Bandcamp page,captcha is run by google,keeps denying me. Please help. Same with my yahoo mail. Ugh!
Comment: I can't answer your question. Stackexchange uses Goggle reCaptcha to block be from answering. I don't know how it works, but when I input the answer I have written -> post -> captcha -> blocked. OR once in a while it lets me do the captcha, but then stackexchange writes "Oops bot detection failed."
Answer: Have you tried having Tor browser use a new circuit, and so have a different exit relay? That helps, sometimes. Some sites just give CAPTCHAs to Tor users. And harder, even impossible, CAPTCHAs for exits that have recently given them lots of abuse. And some sites just block, instead of giving harder CAPTCHAs.
Some sites enable CloudFlare's option to access via a CloudFlare onion service. But otherwise, if you want to use Tor for sites that block Tor exits, you'll need use a proxy with Tor.
If you use Whonix, you can run a VPN in the workstation VM. Tor browser will still use the Tor SocksProxy. But you can remove the SocksProxy setting from Firefox, and it will then connect through the VPN.
Everything in the Whonix workstation VM can only connect via Tor, including the VPN client, so there's no risk of leakage. But it's still far less anonymous than Tor, so it's something that you do when there's no alternative.
Answer: There may be two reasons for it:

Java Script is restricted in your TOR browser
The site (or captcha provider) restrict TOR exit nodes.

For first cause, you can run TOR Browser and use another browser such as FireFox with proxy enabled inside FireFox. The proxy should point to TOR's socks proxy which is usually 127.0.0.1:9150. Here is a screen shot.

For the second cause, unfortunately there is not a direct way for passing. I mean if Google banned TOR exit nodes, you cannot connect through them. But there is an indirect way: Using VPN through TOR which will change your exit IP (to the VPN's) but keep your main IP address private (through TOR). I've described it more in my blog:

https://mstajbakhsh.ir/vpn-or-tor-this-is-the-problem/
https://mstajbakhsh.ir/socks-rocks-again/
https://mstajbakhsh.ir/socks-rocks-the-good-the-bad-and-the-ugly/


Tennis tiebreak in doubles

Question: What are the rules for a tiebreak in doubles tennis, particularly with service? What are the similarities and differences between a doubles tiebreak and a singles tiebreak?
Answer: In a doubles tie-break the first point is served by the player whose turn it is to serve. The following two points shall be served by the player (of the opposing team) due to serve next. After than (starting with the first team), each team's player whose turn it is to serve next, serves alternately for two consecutive points until the end of the tie-break.

TIE-BREAK GAME
During a tie-break game, points are scored "Zero", "1", "2", "3", etc. The first player/team to win seven points wins the "Game" and "Set", provided there is a margin of two points over the opponent(s). If necessary, the tie-break game shall continue until this margin is achieved.
The player whose turn it is to serve shall serve the first point of the tie-break game. The following two points shall be served by the opponent(s) (in doubles, the player of the opposing team due to serve next). After this, each player/team shall serve alternately for two consecutive points until the end of the tie-break game (in doubles, the rotation of service within each team shall continue in the same order as during that set).
The player/team whose turn it was to serve first in the tie-break game shall be
  the receiver in the first game of the following set.

One of the differences is that in doubles a match tie-break is normally used to replace the final set.

MATCH TIE-BREAK (SUPER TIE-BREAK)
When the score in a match is one set all, or two sets all in best of five sets
  matches, one tie-break game shall be played to decide the match. This tie-break
  game replaces the deciding final set.
  The player/team who first wins ten (or seven) points shall win this match tie-break and
  the match provided there is a margin of two points over the opponent(s).
Note: When using the match tie-break to replace the final set:
  • the original order of service continues. (Rules 5 and 14)
  • in doubles, the order of serving and receiving within the team may be altered,
  as in the beginning of each set. (Rules 14 and 15)
  • before the start of the match tie-break there shall be a 120 seconds set break.
  • balls should not be changed before the start of the match tie-break even if a
  ball change is due.

https://www.itftennis.com/media/298557/298557.pdf

Tennis tiebreak in doubles


Oven Jerky a Possibility?

Question: I was thinking a lot about comments on my posts that claimed that the oven would dry out foods meant to be cooked on a stove.  This got me thinking that I could make beef jerky in the oven.  Any tips, gotchas, or suggestions for oven jerky?
Comment: My mother has our family's beef jerky recipe, and it calls for sticking it in the oven. Unfortunately I don't have the recipe so I can't give you any pointers on how to go about doing it, but I know that it is possible. =)
Answer: I believe you will want to use the lowest setting on your oven and have the oven door propped open so the moisture has a place to go and to keep from cooking the meat.
Answer: You could do it as others have mentioned on the lowest setting, You want a temp around 150 degrees F (65 degrees C). When you do this prepare for drippings. Cut the meat about 50 to 75% thicker than you want the finished product. To thin will turn it into paper. We soak our meat in a soya sause, sugar, garlic & pepper brine. To add different flavor we will add a hot sauce and honey to make a sweet/hot flavor. Let the meat sit over night in the brine at the least. Stir it a few times to make sure it soaks evenly. you should use a metal screen to put the jerky on, it doesn't work well to lay it in a pan. it will just cook in the juices if you do. spray no stick on the screen it helps.
Good luck.
Comment: I will try this over the holiday break and report back.  Sounds delicious!
Comment: I have tried a few different soya sauces and find the best to be China Lilly. Don't add any salt, the sauce leaves it salty enough.
Comment: I am going to reply here and say that although this may not be exactly what jerky is (it is cooked, as well as dried), it has a very similar result both in flavor and texture.  I would suggest that everyone who is wondering whether this works great should try it out.
Answer: Since jerkey is just dried and salted/ mariated meat it actually isn't supposed to get cooked, so it would be jerkey-like.  But if you put thin strips of meat in the oven on it's lowest setting it would cook it slow enough and take out enough of the mositure to make something like jerky.

Oven Jerky a Possibility?


Are there any risks associated with SSH agent forwarding?

Question: I just realized that I need SSH agent forwarding in order to push to one Git server that then forwards the commits to Github.com. I never used SSH agent forwarding and don't understand the security implications of enabling this feature. Do I have to trust the remote server in order to allow SSH agent forwarding to it?
Comment: Here's what I found: https://heipei.github.io/2015/02/26/SSH-Agent-Forwarding-considered-harmful/
Comment: Duplicate of https://security.stackexchange.com/questions/9251/what-is-the-security-implications-of-enabling-ssh-onward-connections?
Comment: Not sure about that. This mentions "onward connections" (whatever it is) while I'm asking about SSH agent forwarding specifically.
Comment: See the approved answer. I think it answers your question.
Answer: Yes, you have to trust the remote server if you allow agent forwarding for this server (especially if you use the same key for more services). Doing so rogue root or evil admin with root access can impersonate you for authentication to other servers during the time you are connected to that server.
The state is still better than accessing the key permanently or stealing it from you, what could happen when you would copy your private key to the server, but this is still an issue, since there is no confirmation on your side, that you really want to do crypto with your key in agent.
Using separate key for github is probably good idea. And having middle-step-clone of your important repository on a server you don't trust is probably something you also don't want.
Comment: @student_at_work the question is about risks and they still apply 6 years later. The other answer does not go into any detail why agent forwarding would not be a security issue either. It still is.
Comment: This answer is for 2015, the other answer is for new client features. If the client is configured correctly, the use of agent forwarding is safe.
Comment: See my answer: "In the default configuration, ssh agent forwarding is still a security issue." There are workarounds, but in most cases agent forwarding is a security issue.
Answer: This question is a few years old and things have changed.
In the default configuration, ssh agent forwarding is still a security issue.
PuTTY and OpenSSH have added a lot of features regarding agent forwarding and depending on the client, the configuration and the operating system, agent forwarding is more secure, than using a password protected private key on the remote server.
This combination only works on Linux machines! (see notes about Windows, MacOS not tested).
If agent forwarding is used, the private keys must be protected with ssh-askpass or a fido2 token.
The recommended method is using PuTTY in combination with the OpenSSH agent. PuTTY is able to detect and mitigate spoofing attacks in recent versions.
When using PuTTY>=0.76, you should use Disable "trivial" authentication (SSH-2 only). This option can be found under "Connection -> SSH -> Auth". In older versions (>0.71) you can use the trust sigils to detect spoofing attacks.
Pageant (PuTTY's agent) should not be used, because it does not support fido2 tokens or ssh-askpass. This is where the OpenSSH agent comes in.
You only have to start the ssh agent (if it is not already started). When PuTTY is started, it can use the OpenSSH agent without further configuration.
With this setup, you have to confirm each usage of the private key and abusing or spoofing a forwarded agent is not possible.
Note:
Since Windows 10 it's possible to install the OpenSSH client as an extra, but this version is not compatible with PuTTY. The reason is, the Windows version uses named pipes and PuTTY only supports sockets.


Battery damaged?

Question: Could you please see the attached battery images and tell me if it is safe to continue using this battery or should I discard it?
Answer: If the battery cost less than the thing you're powering, then you should probably discard the battery.
If you're stubborn (or very strapped for cash) and the battery didn't catch fire when the original damage happened, then it might perform okay, but I'd say there's a moderate chance of fire, especially at high currents.
Check battery voltage with a multimeter, then come back and check it again after a few hours. You're looking for a high self-discharge rate, which would indicate the battery is internally shorted out.
If the battery voltage drops noticeably after a few hours (or even a day), then you should trash the battery.
The terminal voltage on a lithium battery only drops about a quarter of a volt from 80% to 20% state of charge, so anything more than a hundredth of a volt or two and I'd call that significant. Every hundredth is about 2.4 percent of total battery capacity in that range, so 0.02V is roughly 5% of battery capacity.
Answer: Assessing damage from a picture isn't going to tell you anything concrete.  If you're already considering discarding this battery, you might as well test its electrical properties (and physical properties) against an intact replacement.
At a minimum, you should check whether the damaged battery has more internal resistance (i.e. can't supply as much current), runs hotter, has more self-discharge, and/or has less capacity than an intact battery.
The safest thing to do is discard it.
Answer: I'm 14, please pardon me for any rookie sentences...
As far as my knowledge goes with Lithium Polymer batteries(not very far), they don't explode with a Hollywood style explosion, where flames go everywhere and everyone dies.
Instead, LiPo's start to smoke and the plastic cover on the outside layer of the LiPo will start to expand, when it cracks it releases hot steamy gas...
Judging by the damage, it looks like you dropped it... I don't this it's life threatening to use it... but I suggest you dispose it off, if you care about the electronics that are being powered by it...
Because the LiPo is 3 cell (11.1V) you can salvage working (undamaged) cells out. you will be able to use the undamaged cells for something else... you could also salvage the protective circuit (if the LiPo has it).
Comment: I would advise against harvesting undamaged cells. They may not explode with concussive force, but if they catch, there will be fire, and it will be too hot and burn too quickly to really put out. And lithium is not something to play with, since it reacts with oxygen. All it would take is nicking one of the cells as you try to extract it, and the whole thing would start to burn.

Just buy a new battery instead - it is cheaper than an ER visit, home insurance premiums, and reconstructive surgeries.

Battery damaged?


Haskell AND Lisp vs. Haskell OR Lisp

Question: I currently code with C, C++, and Python. I'm wanting to pick up a functional programming language, and right now I'm leaning toward Haskell. I do NOT want to start a "Haskell vs Lisp" war here; what I want to know is this: if I learn Haskell primarily for exposure to functional programming, what benefits, if any, will I gain from later learning Lisp?
Comment: And F# and Clojure.
Answer: I suggest learning both, Haskell first, then Common Lisp. My experience with Haskell was that the static typing seemed to be a restricting annoyance at first, but once I got used to it, I noticed that most of my type errors had logic errors hiding behind them. When you get to this point, and the next milestone, which is learning to think in types and define your own types as a means of expressing your solution, you'll be ready for Common Lisp.
With Common Lisp, you can add monads, currying, and everything you liked from Haskell, but you also get multiple inheritance like Frank Shearar mentioned, and generic functions with multiple dispatch, and an advanced exception handling system.
So why not just learn Common Lisp first? Coming from a procedural and OOP background, my experience has been that I didn't really understand functional programming until I had to use it exclusively. Once functional programming is comfortable, you can add the rest of the tools that Common Lisp makes available, and use whatever tool is best at the task at hand.
Comment: I think you nailed it - what makes Haskell and Smalltalk so useful for learning is their purity.
Comment: I agree with the *purity* makes learning a language a lot easier. I couldn't understand functional language itself with LISP because everything are possible in the language and I have too much imperative, OO background. But in Haskell, there is no such concepts which disrupt learning.
Comment: It's funny, I've had the opposite experience. I picked up the main points of functional programming through Scheme, my first language. I occasionally hack in Haskell and I inevitably find that I have to relearn 90%+ of the stuff that I knew whenever I leave Haskell for a while. That being said, Haskell is an incredibly rich language, with a huge amount to teach you (very forcibly.) Types Types Types Types! Follow the types!
Answer: AND please.
Haskell teaches you the purest of FP, as far as I'm aware at least, just like Smalltalk teaches the purest of OO. (I mention this not to suggest that OO and FP can't marry, but because both these languages are "gem" languages - a core idea taken to extremes.)
Lisp is really a family of languages, so I'll talk about Common Lisp because that's the particular member of the family I use.
Lisp will still have lots to teach you:

It's multiparadigm, so as dsimcha points out it'll show you how to integrate FP with other paradigms.
Lisp will teach you that "code-is-data, data-is-code", for example through its macros.
CLOS is a very interesting brand of OO, with multiple inheritance that works, and generic functions.
Answer: Learning Lisp later will allow you to customize Emacs which arguably is the most advanced text editor available.   You can't do that in Haskell.
Comment: [Sharpens his parentheses]
Comment: Actually, there is an Emacs-clone called Yi, which uses Haskell in exactly the same way as Emacs uses Lisp. In fact, compared to (GNU) Emacs, Yi is even purer, because its kernel is also written in Haskell, whereas Emacs kernels generally tend not to be written in Lisp. GNU Emacs' kernel is written in C, JEmacs' is written in Java, for example.
Comment: Maybe someone can write a text editor for it. I hear the Emacs operating system doesn't come with one. (I kid. I know you can get Viper mode. :)
Comment: @Jörg, if it is a partial reimplementation instead of a full clone of GNU Emacs or XEmacs, it is not the same thing.  Similar to comparing Word to Wordpad or Notepad.
Comment: @Thorbjørn Ravn Andersen: Yes, but not quite *that* bad. :)
Comment: can we down-vote for inciting to riot? j/k
Comment: @greyfade - let me guess, you are one of those greybeards which refuse to use any of the modern vi-clones because they are bloated with unnecessary things?
Comment: @frogstarr78, I didn't say "best", just "most advanced"...
Answer: Haskell and Lisp are two totally different beasts.
Haskell is kindof "pure functional programming in an ivory tower"
Lisp is kindof "code-is-data / data-is-code / make your own language constructs". You can manipulate your code in whatever way you can imagine.
They are very different. Both share the "functional programming" aspect, but that's really a tiny little common point compared to their differences. Just try them out and you will see how different they are!
Comment: +1: Good point. I know some Haskell and some Lisp. Even though I am not an expert in either of them, I think you are right that they are very different. In Haskell you do not have the idea of using data as code. In Lisp you do not have (AFAIK) pattern matching. Probably the list (!) of differences is longer.
Answer: The main benefit I see from learning Lisp is learning how to integrate FP into a real-world oriented multiparadigm language, rather than only learning it in the context of an academic language that emphasizes purity.
Comment: I guess you do want a "Haskell vs Lisp" war!
Comment: Haskell _is_ an academic language that emphasises purity... and lots of people use it in the real world. Smalltalk's in that camp too.
Comment: @Jon Harrop: Well, I do use Haskell in the real world (and it works really fine for certain applications), maybe I am one of the few (?)
Comment: Lots of people use Haskell in the real world?
Answer: I also come from a C/C++/Python background and have tried out FP a couple of times in the last few years.  Initially I looked at Haskell and couldn't make head or tail of it, then tried Ocaml but didn't get much further with that.  Finally I started hearing good things about Scala, tried it, and found it suited me very well (I had also done a bit of Java in the past), to the point that after a year of so of dabbling in Scala (and dispatching 161 Project Euler problems with it), Haskell seems to make much more sense.  In fact I just ordered a couple of books on Haskell and want to give it another go, although this is largely motivated by the existence of Scalaz.
So I found using a multi-paradigm language (ie Scala, but Lisp would probably fit the bill too) a good way into FP.  But if you're happy diving into Haskell (I wasn't), go for it.
Comment: Interesting that you got further with Scala than OCaml. How come?
Comment: @Jon: Good question; hard to say.  Maybe I just wasn't ready to "get into" functional at the time.  Maybe I just happened to find a Scala tutorial pitched at the right level.  Maybe Scala's C/C++/Java lineage just made it a bit less alien.  Given any rational bet these days would be on F# rather than Scala, I'll probably revisit the OCaml domain at some point, although since I dabble in this stuff just for the sheer joy of getting into a different "programming mindset" to my C++ dayjob, I have a perverse inclination to retry Haskell again next.
Comment: Smooth moving approach :)
Answer: I originally came from a C/C++/Ruby background and I used FP concepts in Ruby whenever I could. State just kinda hurt my brain. One of my buddies called me up one day, and he asked me to write something in Haskell (my first - and hopefully not last - Haskell job!). I quickly learned the language and I threw together something that worked. It wasn't beautiful or anything, but it worked.
I took a month break from Haskell because I didn't have anything to use it for. But when I decided I needed to write my own blog software, I used Haskell (https://symer.io). Haskell is really cool because you can break a problem into parts and implement these parts differently based on input. Haskell also handles failure extremely well through intelligent boxing of values. There are so many tools to work with these boxes that you simply forget they exist.
My experience with lisp (Scheme) was completely negative. Not only did the language lack these intelligent, simple tools, it felt as dangerously loose as Ruby or JavaScript. It was a horrible experience and it offers nothing new beyond Ruby or Python.
C++ can't hold a candle to Haskell, outside of memory management. Haskell is just as fast (if not faster), significantly more terse, and much more safe. But Haskell's safety never gets in the way.
TL;TR Haskell is a breath of fresh air, and Lisp is a slightly more functional Ruby.

Haskell AND Lisp vs. Haskell OR Lisp


My server hostname doesn't work?

Question: I've got a raspberry pi running raspbian server edition. My problem is that the only way I can ssh into it with putty is through the static ip. My router doesn't recognize the hostname; it shows the mac address as the name. This causes the pi not to show my website online (I think). The only way I've gotten it to work is using my other linux server to forward using virtual hosts, and that has to use the ip address, too. However, now that I have my other server off, the website doesn't work and I can't ssh (or find it anywhere on the network) using the hostname.
Comment: How is the IP address for the RPi assigned?  Is it manually set on the Pi or is it getting the IP via DHCP? Or something else?
Comment: Is the IPv4 address of the RPi set in `/etc/network/interfaces` with `static` or `dhcp`?  If `static`, your router will never know the connection between the IPv4 address and hostname.  If you set the IPv4 through `dhcp`, the RPi will send what name it wants when it askes for a IPv4 number. So your router will know the connection between IPv4 and hostname.  If you want the same IPv4 address for your RPi, then config your router to set the IPv4 address to machines with the RPi MAC address.
Answer: For me, an update to the xbian-update package deleted most of the lines in my /etc/dhcp/dhclient.conf file. I am using XBian, which may differ slightly from base Raspbian.
I had to find an older version of that file and restore the content. Restoring that data (and rebooting my Pi) registered the hostname properly. My older version contained this data:
# Configuration file for /sbin/dhclient, which is included in Debian's
#   dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#   man page for more information about the syntax of this file
#   and a more comprehensive list of the parameters understood by
#   dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#   not leave anything out (like the domain name, for example), then
#   few changes must be made to this file, if any.
#

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

#send host-name "andare.fugue.com";
send host-name = gethostname();
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-name-servers, domain-search, host-name,
    dhcp6.name-servers, dhcp6.domain-search,
    netbios-name-servers, netbios-scope, interface-mtu,
    rfc3442-classless-static-routes, ntp-servers;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#select-timeout 5;
#initial-interval 2;
#media "-link0 -link1 -link2", "link0 link1";
#reject 184.108.40.206;

#alias {
#  interface "eth0";
#  fixed-address 18.104.22.168;
#  option subnet-mask 255.255.255.255;
#}

#lease {
#  interface "eth0";
#  fixed-address 184.108.40.206;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 126.96.36.199;
#  option routers 126.96.36.199;
#  option domain-name-servers 127.0.0.1;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
#}
initial-interval 1;
reboot 4;
script "/etc/xbian-udhcpc/dhclient-script-xbian";

My newer version only had those last three lines. I noticed the data that the questioner posted had lines similar to my backup file, yet lacked the last three lines.
Comment: It happened again - an update overwrote this file. I have about 50 candidate packages, so I'll try to keep a closer watch whenever I update my system. (I have a feeling it's `xbian-update`, though.)
Comment: It happened again, but I still had a list of nine or so packages that may have overwritten the file. But, then I confirmed `xbian-update` causes the overwrite with `apt-get install --reinstall xbian-update`.
Comment: The XBian developers have now [fixed this](https://github.com/xbianonpi/xbian/issues/657).
Answer: Check /etc/dhcp/dhclient.conf and make sure the line that begins with 'sendhostname' is not commented out.
Comment: http://pastebin.com/PNPdcBCb
Comment: Try changing the send host-name = gethostname(); line to the actual hostname you want -
e.g.
`send host-name = "raspberrypi.local.net";`
Comment: Hang on. When you said 'static ip', do you mean the router has the reserved an IP address for the RasPi ? Or do you mean you have set a static IP on the Pi itself ?
Answer: I would suggest setting up a real DNS server at some point, as it will simplify DNS resolution. Then you just point your router to your internal DNS server as one of it's WAN DNS servers (make it the first one in the list)
You can try what Lawrence says, or if there is a way in your router to specify static DNS resolutions, as there is in DD-WRT you could try that.
Answer: Some routers only use the netbios hostname and this is published to all Windows machines.
On Debian you can
sudo apt-get install samba

and if your /etc/hostname is set correctly this will show up in the network without a restart.
This works for RaspberryPi, BeagleboneBlack and as far as I can remember also with Ubuntu.
ping should now work.

My server hostname doesn't work?


Can human survive falling from 30,000 ft without a chute?

Question: If someone falls 30,000 feet without a parachute; what are the chances of survival if they landed in the water?
Comment: There are alternatives to parachutes which would slow ones descent.
Comment: I don't think it matters that 5000 or 30000 feet... As you descend the air will become more and more dense which will slow you down... Afaik. it is survivable, with severe injuries.
Answer: Summary: A fall from "any height" may be survivable, depending on what you hit, but with an expectation of severe injuries. A water impact at terminal velocity will in all likelyhood result in immediate death.
The Serbian Flight attendant Vesna Vulović holds the Guiness World Record for surviving a fall without a parchute with an estimated fall height 10,160 metres. However, some doubts have been cast on the accuracy of the record, with claims that the fall was actually only several hundred meters. Vulovic was found partly in the wreckage of the plane, so it can be discussed whether she had a truly "free fall" for the purposes of this question. However, several other persons have been known to survive completely "free" falls from great heights. Although it is hard to verify the exact altitudes, the WW2 aviators Alan Magee, Nicholas Alkemade and Ivan Chisov are reported to have survived falls of about 6700 m, 5500 m and 7000 m, respectively.
The exact altitudes are in any case not necessarily of interest, as it can be assumed that all persons falling from a height of more than about 500 meters will reach terminal velocity, the velocity where air resistance prevents the fall speed from increasing, before hitting the ground. As such, above a certain height, other factors become determining for the survivability of a fall. As has been demonstrated by the listed examples, it is clearly possible to survive a fall at terminal velocity. However, this requires favorable conditions at the site of impact, and will likely result in severe injuries.
Due to the flat surface and the surface tension of water, it is hard to imagine an unprotected impact with water being survivable at terminal velocity. The best chances for survival will likely be in areas with foliage, snow and/or a hilly landscape allowing the kinetic energy to be dissipated through rolling downhill. Of the listed aviators above, Nicholas Alkemade appears to have been the least injured. About him, it is reported that

His fall was broken by pine trees and a soft snow cover on the ground.
  He was able to move his arms and legs and suffered only a sprained leg
Answer: To put it simply... NOT GOOD!!!

US Coast Guard rescue swimmers will not do a free fall deployment from above 200 ft (actually, I think it is less, I cannot remember right now) into water, this is too dangerous.

I personally think you'd be better off trying to find about fifteen feet of soft snow to land in! In reading trying to find additional information with which to answer this question, I stumbled upon someone who said they knew of a pilot in Vietnam who's 'chute didn't open when he ejected. He survived with "only" broken bones and a ruptured spleen. I have included a link that I hope is helpful!

https://physics.stackexchange.com/questions/9059/jumping-into-water
Comment: @BeyondProgrammer It's surprisingly little difference.
Comment: isnt falling into water safer compared to concrete-pavement ?
Comment: @BeyondProgrammer Sure, it _is_ safer, but, it is still going to feel about like hitting a concrete block if you're coming from 30,000 feet!


What is the difference between a 180° V4 and a true boxer motor?

Question: Reading this thread which talks about V4 motors, I am wondering what exactly is the difference between a 180° V4 motor you'd find in a Subaru and a true boxer (or horizontally opposed) flat 4 cylinder?
Answer: tl;dr: In common usage, there isn't a difference.  The Subaru flat-4 is a boxer.
Here's a lovely picture that I found on the Manchester Subaru site (I'm not a customer but I'm always encouraged when a dealer is willing to provide useful technical material!):

As you can see from that picture, the pistons are moving in pairs: the two in the rear are in and the two in the front are out.  This is where the boxer gets its name: the pistons look like they're punching each other.
Getting into the technical details (see the great Wikipedia entry on flat engines):

True boxers have each crankpin controlling only one piston/cylinder
  while the 180° engines, which superficially appear very similar, share
  crankpins. The 180° engine, which may be thought of as a type of V
  engine, is quite uncommon as it has all of the disadvantages of a flat
  engine, and few of the advantages.

You have to look closely at the image above but you can see that the pistons are not sharing crank pins.  In the image below we can see a true 180 degree V6 (on the left with shared crank pins) compared to a boxer flat-6 (on the right with individual crank pins as in the Subaru).
"Moteurs à Plat - V à 180° vs. Boxer" by Frank Lente - http://de.wikipedia.org/wiki/Datei:Boxermotor.png. Licensed under CC BY-SA 3.0 via Wikimedia Commons.
As stated in the article, however, the 180 degree V4 is quite uncommon due to its technical limitations.  Note those arrows in the left-hand diagram: instead of having opposing pistons box each other (somewhat cancelling vibration), they would be reinforcing each other.  This would cause a truly distressing torque of the whole engine around the vertical axis, with the direction changing every half rotation of the crankshaft.
As the 180 degree V4 with shared crank pins is so uncommon, the flat-4 boxer effectively  takes its place in terms of "what would you do if you need to increase the angle to 180 degrees?" Therefore, in the common usage we consider a 180 degree V4 and a flat-4 to be effectively the same thing.
Comment: Slight nitpick, but the images you have in the bottom are 180° V6 and flat-6 designs.
Answer: I would like to add that only TWO companies in the world manufacture boxer engines: Subaru and a German brand.   The reason is that they are complex to manufacture.  Also, Subaru uses a chain to time their overhead valves, most companies prefer belts to time.
The two most common types of piston arrangement are vee configuration and inline configuration.  Vee is the very best, IMO.
Comment: Do these two companies include Honda with their motorcycle-installed flat-6, and Lycoming and Continental with lines of aviation flat-4s, flat-6s and flat-8s?
Answer: The difference in a 180° crank and a "normal" engine crankshaft (cross-plane) is the position of the rod journals.
On a cross-plane crank, the crank pins are 90° from each other but in a 180°, or flat plane crank, the pins are 180° from each other.  In other words, on a flat-plane crank, the rod journals are all on the same plane, so the crank looks like it is for an inline engine.  Ferrari, Lambo and most exotics use a flat plane crank while most American V#s use a cross-plane crank.
A standard 4 cylinder crank is a simple example of a flat-plane crank. Both the Subaru and VW Beetle air cooled are flat-planes, or 180° cranks, and are "boxers".
Yamaha went to a cross-plane in their R1 4 cylinder to smooth the engine.
So, basically, any crank with the rod journals at 180° is a flat-plane, or 180° crank, whether it is a "boxer" or not.
Comment: Welcome to Motor Vehicle Maintenance & Repair!  Could you expand this to explain what makes an engine a boxer?  Nice explanation on the 180 degree cranks though!
Answer: A boxer engine has one crank pin per cylinder where a 180° (Flat 4,6,8...) V# has two cylinders per crank pin.


Heat integro - differential equation

Question: In the heat equation:
$$\partial u(x,t)=D\partial_{xx}u(x,t)$$
the diffusion coefficient $D$ is in general a constant or a given function of $u(x,t)$ in the nonlinear equation. Suppose I have a diffusion coefficient depending on the integral of $u(x,t)$. In this case I have:
$$\partial_t u(x,t)=\left[\int_{-L}^L u(x,t)dx\right]\partial_{xx}u(x,t)$$
If the $IC$ and $BC$ are:
$$u(0,x)=u_0(x)$$
$$u(L,t)=u_L$$
$$\partial_x u(x,t)=f(t)\mid_{x=L}$$
how can I solve this equation?
Thanks.
Answer: There is a simple way to manage this equation using a Fourier series. We assume a boundary at $0$ and $L$ and that exists the Fourier series for the solution
$$
   u(x,t)=\sum_{n=-\infty}^{\infty}u_n(t)e^{i\frac{2\pi n}{L}x}
$$
then you note that
$$
   D(t)=\int_{-L}^L u(s,t)ds=\int_{-L}^L\sum_{n=-\infty}^{\infty}u_n(t)e^{i\frac{2\pi n}{L}x}=2L u_0(t)
$$
and you are left with the following set of ordinary equations
$$
   \partial_t u_n(t)=-4\pi^2n^2u_0(t)u_n(t).
$$
This yields $\partial u_0(t)=0$ and so, $u_0=constant=D_0$ and so for $n\ne 0$,
$$
  u_n(t)=e^{-4\pi^2n^2D_0t}u_n(0).
$$
Answer: Apart from your question, let me say that a heat equation with non-constant conductivity would rather be
$\frac{\partial u}{\partial t} = \frac{\partial }{\partial x}(D \frac{\partial u}{\partial x})$.
Comment: @Thibaut Demaerel: Yes. It's true. How can this help to solve this equation?
Comment: Which equation do you want to solve, yours or the more realistic heat equation given in this answer? They don't produce the same solution in general (given the same IC and BC).
Comment: I would like to solve my equation
Answer: Well, I think that
$$
D(t)=\int_{-L}^L u(s,t)ds,
$$
thus, both equations are the same ($\partial_x (D(t) \partial_x u)=D(t) \partial_x ^2 u$).
I have some questions:
1) ¿Both BC concern the same point x=L?
2) You will need some hypotheses on the initial data. I mean, positiveness, positive mean or something that ensures that $D(t)>0$ at least for short times $t<\tilde{t}$. If these hypotheses does not exist then you can take an odd initial data and the appropriate BC to have a steady solution. For instance, $u(x,t)=sin(x)$ with $L=\pi$ would be a steady solution corresponding to $u_L=0$ and $f(t)=1$, isn't it?.
Anyway, I think that the usual framework should work as long as you have the appropriate hypotheses to close the problem and the rights estimates for $D(t)$.
Comment: 1) Both BC concern the same point L
2) Because we are speaking about temperature, all the initial data are definite positive.
Comment: Mmm I'm not sure whether you can solve the classical heat equation with both BC at the same point...
Answer: I wonder if this can be solved using a Feynman-Kac type argument.
Let $X_{t,s}(a)$ be a path labeled at the time $t$ (i.e. $X_{t,t}(a)=a$) going back to $s$.  Let $X_{t,s}(a)$ satisfy the following stochastic equation:
$$
{\rm{d}}X_{t,s}(a) =\sqrt{2\sigma(u(X_{t,s}(a),s))}\ \hat{{\rm{d}}} W_s
$$
where $W_s$ is a 1-dimensional Wiener process and $\hat{{\rm{d}}}$ indicates that this is a backwards Ito differential $\sigma$ is some arbitrary smooth function of $u$.  Then, the following is true:
$\textbf{Claim:}$  A function $u(x,t)$ is a solution to the equation
$$
\partial_t u = \sigma(u) \triangle u
$$
if and only if the pair $(u,X)$ satisfies the following stochastic system:
$$
{\rm{d}}X_{t,s}(a) =\sqrt{2\sigma(u(X_{t,s}(a),s))}\ \hat{{\rm{d}}} W_s
$$
$$
u(x,t)= \mathbb{E}\left[u_0(X_{t,0}(a))\right]
$$
where the expectation is taken over Brownian motions.
Here I am assuming we are solving the heat equation on the real line with no boundary conditions but it is straight-forward to incorporate boundaries. Of course, you can choose $\sigma$ (with some technical conditions).  I hope this helps.

Heat integro - differential equation


Why do strong acids dissociate (almost) fully on a molecular level?

Question: In the Brønsted-Lowry theory, strong acids $\ce{HA}$ dissociate using water and react into hydronium ions and the conjugate bases $\ce{A-}$. However I never understood in the strong acids case what stops the products of the reaction(ions) into reforming chemical bonds (why the reaction is one-way) and what enables them when the reagents aren't strong acids. How is this explained macrocosmically and microscopically?
Answer: Deprotonation is always a reversible reaction. Hence why, even strong acids, have $\mathrm{p}K_\mathrm{a}$ values (which rely on the presence of equilibria).


Yoga movements combinable with resistence training

Question: I am looking for yoga poses such as glute bridge which I can use weights and resistance bands to make them more challenging. Any advice will be appreciated.
Answer: Your imagination is your only limitation here. I'm not a hardcore yoga guy, but here are some videos of clients of mine doing movements that have some replication in yoga.
Weighted Bridge: https://www.youtube.com/watch?v=QlEzW_bs0jA
Crawling Downward Dog with Push-up: https://www.youtube.com/watch?v=pxWwDXiQ3ss
Single Leg Lean Over: https://www.youtube.com/watch?v=0n8pmUCZr-8
Answer: What is your motivation is for adding resistance to yoga poses? I think of it this way: Asana yoga is a wonderful tradition going back a couple hundred years.  The poses you see today have been selected organically over the passage of time, with the input and collective wisdom of countless practitioners.  The practice fits together in a cohesive way.
Weight lifting probably doesn't go back as far as yoga, but it goes back to at least the fifties.  The lifts people do in the gyms have also been selected by the input of countless people in gyms around the world.  Of course, you will see some people doing stupid stuff at the gym, but if you are intelligent, then you can put together a well designed program from the classic lifts.
My view is that yoga and weight lifting are each valid systems on their own, but they don't mix very well, like Thai food and Italian food don't go together. When you try to combine yoga and weight lifting, you will end up with a whole that is less than the parts.
For example, I once went to a yoga class where we did stuff like the warrior pose II with a dumbell in each hand. What muscle were they trying to strengthen?  Is it the middle delt? If so, there are classic lifts that are vastly more effective at working the middle delt.  In my opinion, the class would have been better if we had done an hour of yoga, and followed it with a half hour of weight lifting.  They would get better results.
In other words, if you want to do yoga, then do it for the spiritual, communal, mental reasons that it was created.  If you want to get stronger, then learn from the people who have been doing it for years: weight lifters.
Comment: @Andy  You are right that stretching can be more effective with resistance.  However, Yoga is not the same as stretching.  Stretching is done, or should be done inside the functional range of movement. By contrast, in yoga, most of the poses take joints to the end range of movement, and then push further. Look for example, at the Warrior Pose; the hip of the back (straight) leg is at the very end range of movement.  Look at the Upward Dog; most people extend their lumbar spine to its limit.  This is not how a knowledgable trainer would stretch a client in the modern era.
Comment: Yoga will increase your range of motion, but not your functional range of motion.  In other words, as you suggest, yoga will not keep you strong over your newfound range of motion.  For example, if you were in the Warrior Pose, and somebody tossed a bad of potatoes to you, you would not be a strong position to catch the potatoes.   Yoga is a wonderful system for mental, spiritual, communal reasons.  But it is not an effective way to prepare your body for something like a contact sport.
Comment: Thanks. There are some yoga movement patterns such as glute bridge (Setu Bandha) are incredible for resistance training. I am looking for yoga movement patterns to incorporate my resistance training routine. I already do squats, glute bridges, deadlifts. My purpose is not muscle hypertrophy my purpose is using healthy movement patterns on resistance training because there is so much more(body oxygenation(control pause), breathing) than hypertrophy.  Yoga poses with bodyweight posses do not as effective as yoga posses with resistance training.
Comment: I have not done Yoga myself, but I understand that it consist of stretches (and breathing/meditation)? According to flexibility expert jujimufu: stretches with a light resistance are more effective than static stretches: https://www.youtube.com/watch?v=WFydcAts408 For this reason I think it might be a good idea to add some light resistance to Yoga poses.
Comment: @Chris. Does that mean that range of motion is increased? If so is it not important to get strong over this newfound range of motion? I worry that Yoga may get me flexible but not strong over the entire range of motion. I think this may be dangerous. When one is striking a pose one is control over the environment. In real life there may be external forces that are larger than I anticipated. Just as an easy example: assume a kickboxer throws a high kick. Then he not only need the flexibility to do this but also full range of motion strength in case his opponent grabs his leg and starts pulling.


Wrapping photos to an equirectangular projection in Hugin

Question: In Hugin, I want my panoramic photos to be warped around a sphere, so the output is an equirectangular stitched image. However, when I align them, they appear in the preview as a connected strip, warping around the sphere, but leaving black space at the top and the bottom. I think I need an equirectangular projection with Hfov and Vfov of 360 and 180 degrees, respectively. Obviously I've tried to match these settings in the projection tab. I've tried to scale the images, crop the canvas and a lot of other stuff. The result is always wrong so at this point I have no idea what to do.
Answer: You don't have sufficient scene coverage for an equirectangular. 360x180 coverage means you took enough photos and stitched to cover the entire sphere. If you didn't point your camera straight up and straight down at any point to take a member image, you have no coverage of the zenith (top) and nadir (bottom) of the sphere, which is why those areas are black when you try to reproject.
Just to give you an idea, an 18-55 kit lens, @18mm, requires roughly 30-40 images (about 4-5 rows of 5-6 images each) with enough overlap for stitching to cover a sphere. It's much more shooting than most beginner pano shooters realize.
Reprojecting a pano does not create missing data. Stretching/warping a cylindrical pano with less than 180° vertical coverage just gets you weird zenith/nadir seams.
You could try resizing your pano to a 2x1 rectangle and pretending it's an equirectangular when you bring it into Hugin (set lens type to equirectangular and HFOV to 360), but I doubt you'll like what you get.
Comment: Of course, if most of the missing scene is just blue sky and green grass, for example, you'd be better off just painting it in than stretching the image, probably.
Comment: @junkyardsparkle: the Photoshop [content-aware fill is your best friend when it comes to filling in missing bits of panoramas](https://youtu.be/NH0aEp1oDOI?t=4m3s). :) The patch tool is probably your second-best friend. But neither one is going to be of great assistance w/equirectangulars if there are too many features, because it's all supposed to meet up at the zenith/nadir _seamlessly_. Better luck can be had mapping out to cube faces, and patching/painting the top/bottom faces, but it's a lot of work.


What is the effect of this expanding universe on the energy density of it?

Question: We know that our universe is expanding i.e.  volume of the universe is getting larger with time with total energy being conserved. My question is whether the energy density is getting smaller with time.
If this is true then what is the effect of this phenomenon on all the celestial bodies?
Comment: Total energy is not conserved. The conservation of energy does not apply on cosmological scales.
Comment: If I may: We don't know the volume of the universe is getting larger. The volume of the universe is much, much more likely than not, infinite. And I mean literally infinite (I have to say that due to the bewildering existence of 'multiple types of infinities' in theoretical astrophysics.
Comment: @WhitePrime That may well be true, but if you take any sufficiently large region and "anchor" its boundaries to the average trajectory of matter near them, it will be found to be expanding.
Answer: I am no expert and I am sure there will be a more rigorous answer later, but here my 2 cents:
It appears to me that the term "energy" and energy conservation becomes a bit more complicated in general relativity and cosmology, taking into account more abstract forms as the energy of the gravitational field or space curvature. As you seem to be more interested in the implications I just want to focus on the common forms of energy, i.e., radiation, matter and dark energy.
For a given expanding volume of space only the energy from matter (dark and normal) is dilutes as expected. You could say that with respect to expansion its energy is conserved. This means its energy density decreases with $\sim a(t)^{-3}$, where a is the scale factor (or just the diameter) of the universe.
Radiation additionally looses energy via cosmological red-shift, so its energy density decreases even faster with  $\sim a(t)^{-4}$.
Finally you have the dark energy density. What makes it special is, that its density does not depend on $a(t)$. One can think of it as the energy associated with space itself. So if the universe expands new space and dark energy "appears" and its density stays constant.
So over time the average (matter and radiation) energy density decrease and approaches the energy of empty space itself (or vacuum energy).
Note, however, that this is only true for the average densities. In regions of space, that are held together by gravity, as our local group, the matter density will not decrease. On the contrary, these region are still contraction due to gravity.
So to answer your question on the effect on all the celestial bodies:
Those which are gravitationally bound, won't notice much but others will drift apart never to see each other again.
Comment: Three points on conservation of energy: (1) It's an observed fact, not a primitive logical consequence of reality. It may or may not be true in all times and places and situations.  (2) As far as we know, energy conservation is a consequence of time symmetry by Noether's theorem. In an expanding spacetime, time symmetry probably does not hold, so energy conservation probably doesn't either. (3) Besides all of the energies mentiond, there is the global energy of space-time itself. Calculating that is non-trivial, but some have argued persuasively that changes in it balance gains in dark energy.
Answer: The experts say that as fast as the universe expands the increased space fills instantly with countless trillions of virtual particles which arrive from nowhere. Not only does this contravene the 1st Law of Thermodynamics (mass/energy can neither be created nor destroyed),but there is a discrepancy of 40 orders of magnitude (yes,40 orders of magnitude!) between the vacuum energy density required by Quantum Mechanics and cosmological observations. It has no effect on celestial bodies, though it should have, which is where the conflict with cosmological observations comes in. Supposedly, the 1st Law of Thermodynamics doesn't apply on a cosmological scale.
Comment: The first sentence doesn't make any sense, and could use some backing up.
Comment: Why does the 40 orders of magnitude confllct between  the alleged vacuum energy density and the results of cosmological observations not matter, and why is nobody willing to explain it? If there were a 40-orders-of-magnitude discrepancy between your official wages and your take-home pay, would you then hold the view that it doesn't matter?


weight loss metabolism boost and muscle gain

Question: It's been 2 years since I worked out I've gained a significant  amount of weight, approximately  60 pounds I weight 240 I'm 19, 5'9. The last time I worked out I max benched 2 plates and a 25, now I'm struggling with a 35. Along with that I've tried all diets imaginable but nothing I even went as far as fasting. Myetablolism is ridiculously  slow and I really want to get in shape and loose this fat bcs I know for a fact the muscle I used to have is gone. Any help with the weightless muscle gain and metabolism boost will be appreciated .
Answer: There's nothing wrong with your metabolism, and it's not something you train. The difference between someone with a "slow" and a "fast" metabolism is very small.
You need to diet properly.
If you're gaining weight, or not losing weight, it's simply because you eat too much. Again, you can't train your metabolism to work faster. You have to control your caloric intake.
As far as weightless muscle gain goes, this is more likely to be doable if you're a beginner, and becomes harder to accomplish as you build more muscle.
I have a hard time taking you seriously when you say

I've tried all diets imaginable but nothing

To anyone here, this is going to sound like crap. Fact of the matter is, diet is how you control your weight gain/loss. Working out simply controls how your body deals with the added/removed weight.
I suggest you try a ketogenic diet. Entering ketosis isn't the easiest feat, but if you do it, you'll lose weight at a pretty decent rate.
Comment: @AhmedAbdullah - Weight gain is one simple thing; you consume more calories than you spend. Start counting calories.
Comment: I've tried fasting, low carb diet, detox, and literally i barely eat I work two jobs to help provide for my family and i literally live on coffee and a meal a day. I just haven't gotten anywhere. I walk almost 5 miles easy everyday, I just don't know what to do anymore and my doctor is not helping he prescribed pills but I won't go down that route.
Comment: Even if you only have coffee and one meal a day, if it is of the wrong sort it can completely ruin the diet for the day. There are many fast food meals that can add up to be well over 2000 calories in one sitting.


Do I really have to pull the engine to remove broken spark plugs?

Question: I broke 2 spark plugs in my Buick lesabre 3800. The plug is broken at the top of the nut. The porcelain is all broken off in the socket. Took it to a mechanic and was told he would have to take the entire engine out in order to extract them. Right or wrong? Btw it's plug number 2 and 4 on the back end.
Comment: The GM 3800 motor has very accessible spark plugs and pretty much everything else. You may as well pull the engine to get at the oil dipstick.
Comment: Welcome to the site.  Cheers!
Comment: If the plug comes out without issue, and the new ones go in the same, find yourself a new mechanic. In fact, even if there is a more serious problem, the mechanic should have spelled out EXACTLY why he needed to pull the motor to fix it. You did the right thing questioning them in the first place, I'd be very hesitant about ever going back.
Answer: Sounds to me like the plug is still in the head as normal, just with the porcelain and electrode snapped on the top end (where the ignition line attaches). If that's the case, it should be really easy to handle, you just need the exact right tool.
You may need to take the manifold off to open up your workspace, but you should be able to access it with a proper spark plug socket or if the nut's damaged (stripped) you could use an easy-out type socket (Irwin makes some).
Regardless of the case, it's extremely unlikely that you ever need to pull a motor to get the plug out. If you could post a pic it'd be much easier to give a perfect answer, but I'd never pay a mechanic that wants to pull the motor for that?
Comment: I'm inclined to agree, but with two notes.  First, I'd use compressed air to force out whatever broken ceramic (or dirt) might be lurking there so it doesn't fall into the hole when the plug is removed.  Second, it may depend on *why* the plugs were broken on removal.  If it's because they were cross-threaded at installation and/or grossly overtorqued, this might become a major job.
Comment: @Edward I absolutely agree! :)
Answer: If the electrode pulled out of the plug you may be able to use an epoxy to pull out the rest of the porcelain. If not you'd have to smash it and get it out of the ground strap. Then you may be able to use an extractor kit on the ground strap.
I'm pretty sure you don't have to pull the engine to remove the head. But the lower intake etc... would have to come off.
Either way it's time consuming and all straight up labor.
Comment: Yeah, that's a major PITA, without a doubt.
Comment: Thanks guys. I wish I could upload a picture but I was barley able to reach around with the ratchet lol I didn't think I had to have the motor pulled out.I guess it's just a mechanic being a mechanic


Local account lockout via Group Policy

Question: Is it possible to set an Account Lockout Threshold via Group Policy but have it only apply to local accounts on member workstations and not to domain logins?
Comment: No. As @DSkowronski points out below, group policies apply to domains, and have no effect on local accounts. You'll have to apply a local policy on each workstation.
Comment: @RandolphWest: User Configuration group policy settings don't apply to local accounts, but the Account Lockout Threshold is a Computer Configuration policy.  It does affect local accounts.
Answer: I don't have now domain to test, but I think that if you apply setting locally (for example via secpol.msc) you will change this only to that machine. Of course if it's not Domain Controller.
Comment: Typically you can't do that, because the domain group policy settings override the local settings.
Answer: Yes, this is possible.
The Account Lockout Policy for domain users is defined by the settings in either the Default Domain Policy or the Default Domain Controllers Policy object.  The documentation is unclear (see here and compare to here) as to which of these contain the domain user settings by default, and does not describe how the settings for user accounts are located in non-default configurations.  It may depend upon the version of Windows Server.  In any case, we can easily avoid depending on the exact behaviour.
Your member workstations should already be located in one or more OUs.  If you create a group policy object and apply it to those OUs, the Account Lockout Policy settings in that GPO will take precedence over the settings in the Default Domain Policy object (if any).  The Default Domain Controllers Policy object only applies to the Domain Controllers OU so they will not affect your member servers in any case.
Provided that you don't apply your GPO to the root of the domain, the Domain Controllers OU, or at the Site level, it definitely won't affect domain user accounts, even if those accounts are logging into the servers in question.  (It should be possible to apply the GPO at the root of the domain and make it work, but the details are a bit complicated so I don't recommend trying it.)
Comment: Very interesting.
Comment: It's pretty much bog standard group policy, except for the uncertainty about just what rules apply to domain users.  In fact, I suspect that part is simple, too: domain user ALP is *probably* determined by whatever group policy settings are being applied to the domain controller processing the logon attempts.  But the documentation suggests otherwise, hence the cautious approach.
Answer: You could change local Account Lockout Threshold using group policy by pushing startup script with "NET ACCOUNTS /LOCKOUTDURATION:XX" command (where XX is in minutes), but that would only have short term effect. When local computer is joined to a domain, it is obtaining security policy from the domain's policy or from the policy of any organizational unit that it is member of.
When you modify the security settings on your local computer using the local security policy (which NET ACCOUNTS command does), then you are directly modifying the settings on your computer. Therefore, the settings take effect immediately, but this may only be temporary. The settings will actually remain in effect on your local computer until the next refresh of Domain Group Policy security settings, when the security settings that are received from Group Policy will override your local settings wherever there are conflicts. The security settings are refreshed every 90 minutes on a workstation or server and every 5 minutes on a domain controller. The settings are also refreshed every 16 hours, whether or not there are any changes
http://technet.microsoft.com/en-us/library/cc739442%28v=ws.10%29.aspx
Comment: This doesn't answer the question.

Local account lockout via Group Policy


How many polynucleotides are there in one molecule of DNA?

Question: I always thought that a molecule of DNA was made of two polynucleotides each making up one strand of the molecule... Is that right?
Comment: @MartinKlvana Being more assertive, stating `i have given you the right answer` or making an [argument from authority](https://en.wikipedia.org/wiki/Argument_from_authority) by appealing to your experience is not how you convince anyone of anything. On the other hand, Mark pointed to a post offering evidence of authors clearly defining a molecule of DNA as being made of two strands. If you disagree with this terminology and think that most authors use the term differently , please respectfully suggest your own answer at the linked post.
Comment: @Mark `This post seems to contradict your claim` would be better than `No, you're wrong`. Martinklvana would probably had reacted differently if your opposition was made in less absolute terms. Note that when dealing with questions of terminology, it is better not go into absolute certainty as different authors may use the same word differently.
Comment: No, you're wrong. One molecule of DNA is made of two polynucleotides. You should have a look at this: https://biology.stackexchange.com/questions/66343/is-a-dna-molecule-a-single-strand-of-polynucleotide-or-two-of-them-linked-togeth .
Comment: One polynucleotide: one molecule of DNA. One DNA "strand": one polynucleotide: one molecule of DNA. Two DNA "strands": two polynucleotides: two molecules of DNA.
Comment: Look, i have been working with computational models of DNA molecules since 2009. i look at and analyze structure, dynamics, and energy of DNA molecules daily. i have given you the right answer. What you do with it is up to you.
Answer: In general, it is right since with the term DNA you commonly refer to the double-stranded DNA. However, you need to be aware that DNA may exist in different forms.
Single-stranded DNA (ssDNA), for example, is composed of only one strand of DNA, so one chain of nucleotides or one polynucleotide molecule.
Double-stranded DNA (dsDNA) is the common form of DNA found in cells and it is composed of two polynucleotide molecules.
Triple-stranded DNA (tsDNA ?) also exist, which of course, is composed of 3 polynucleotide molecules.
Answer: The term molecule was coined by chemists to describe small entities in which the atoms are joined by covalent bonds. When one is talking about large biological entities involving non-covalent bonds (proteins, nucleic acids) the strict definition often conflicts with the way one conceptualizes these entities, and this has led to common usage that may strictly be regarded as incorrect. However the definition of a molecule is of no real concern to molecular biologists and few people care that the situation is ambiguous.
Definition of Molecule (Wikipedia)

A molecule is an electrically neutral group of two or more atoms held together by chemical bonds

By this definition double-stranded DNA consists of two molecules, and haemoglobin consists of four molecules (or perhaps eight, if one regards the haem as a separate molecule).
Use of Molecule to refer to multistrand Nucleic Acids and Proteins
Because we are often concerned with the functions of a double-stranded nucleic acid or a multi-subunit protein in its entirety, one finds them referred to as molecules by quite reputable sources. For example:
Encyclopedia Britannica

Each hemoglobin molecule is made up of four heme groups surrounding a globin group, forming a tetrahedral structure.

Protein Data Bank: Molecule of the Month

DNA is arguably one of the most beautiful molecules in living cells. Its graceful helix is pleasing to the eye. DNA is also one of the most familiar molecules, the central icon of molecular biology, easily recognized by everyone.

Conclusion
It would be better to spend one's energies on more important and intellectually interesting topics concerning nucleic acids and proteins then whether only their individual strands or subunits are truly molecules.
Answer: There are four ways to answer a question (Anguttara Nikaya); a counter-question is one of them.
When water changes its state from gas to liquid to ice does the number of water molecules in the system increase, decrease, or remain the same?
The answer is: The number of water molecules in the system remains the same. (Note: The three states of water differ by spatial arrangement of water molecules and by the number of "hydrogen bonds" between the molecules.)
Now, let's replace "water" with "deoxyribonucleic acid" (DNA) . . .
When DNA changes its state from dissociated to associated does the number of DNA molecules in the system increase, decrease, or remain the same?
The answer is: The number of DNA molecules in the system remains the same. (Note: The two states of DNA differ by spatial arrangement of DNA molecules and by the number of "hydrogen bonds" between the molecules---cf. water.)
The "water" analogy goes even further: The process of dissociation of DNA molecules is called "melting."

i melt DNA (computationally) for a living. Seriously. No kidding.
Comment: As you are working as a chemist (physical biochemist or whatever) you are correct. In a chemical sense the single covalently bonded chain is a molecule. However, it occurs to me that there may be a practical as well as psychological explanation for people thinking of dsDNA or multi-subunit proteins as molecules. This is the osmotic affect of these molecules. I am ashamed to admit not being certain of this, but if osmotic pressure is related to molarity, then don't these multi-chain species act as molecules? (This would indicate the equation needs restating rather than the definition.)


How do I measure the current power consumption?

Question: Is it possible to measure (with software, like PowerTOP) the Pi's current power consumption, on my Raspberry Pi?
Comment: "On" your Pi... as I think you mean, or "of" your Pi, which others think you mean?
Comment: @user59377 - whilst I have up voted your comment, due to its call for clarification... I believe that the OP actually wants to measure the consumption using software running on the Pi - so "on" is correct, and "of" is not.
Comment: I find it amazing that none of the 4 answers here actually showed any results to substantiate their claims that `powertop` was inaccurate or not useful. To be clear: I am not arguing that it is (I haven't tried it yet), but dismissal without substantiation certainly  isn't *best practice*.
Answer: Your best bet is to use a USB voltmeter/ammeter between your USB power source and the Pi.

In addition, you will require:

a USB micro to USB 'A' convertor from the power source to the USB
voltmeter;
a USB 'A' to USB micro cable from the USB voltmeter to the Pi.

There are many different types ranging from $1 to $5, depending if you want a single display, a dual display, as pictured, or up to a quad display that also shows power (Watts) and charge (Coulombs)
Comment: This solution is superior to the one proposed in the accepted answer ` wall outlet power meter ` because it factors out the power supply unit efficiency, which is probably not constant over the working range.
Comment: @Vorac - please feel free to upvote my answer, if you feel that it is a superior solution. :-)
Answer: No. You cannot accurately measure the power consumption of your Raspberry Pi by just software. There needs to be some hardware in place in order to do this and devices rarely have this by default.
The easiest option would be to use a wall outlet power meter or usage monitor. You can buy these for $10-$20 at a local store.
Without such hardware, the best you can get are estimations.
Comment: [PowerTOP](http://en.wikipedia.org/wiki/PowerTOP) gives you an estimation, not a real measurement. The estimations are intended for comparison when you want to try different power saving features out. For laptops [PowerTOP](http://en.wikipedia.org/wiki/PowerTOP) can make better estimations by doing measurements on your battery level and performing calculations. That is something you cannot do on a PC or Raspberry Pi. Read more about it [here](http://en.wikipedia.org/wiki/PowerTOP).
Comment: `The easiest option would be to use a wall outlet power meter or usage monitor.` That's fine if you want to know how much power your setup is *using*, but not if you want to know how much power your Pi is *actually getting*. Power adapters and even USB cables can waste significant power. I've read of USB cables dropping a whole Watt or Volt (I can't remember which was said, but they'd be about the same in some conditions).
Comment: i have outlet power meter, but i'm too lazy :D...and for devices with intel cpu i can use powertop. So my idea was to use something like powertop, but for arm ;)
Comment: I tried using my outlet meter, and it's accuracy was too low. It reported a constant 2 watts, even when the PI was off.
Answer: Whilst you can't directly monitor the power consumption you can obtain information about the operating voltage of the: core (default), sdram_c, sdram_i, and sdram_p (see here for more details).
vcgencmd measure_volts <id>

e.g. To check the core voltage:
pi$ vcgencmd measure_volts
volt=1.2000V

Comment: **Power = V x I** Voltage measurements alone are useless for power measurement.
Comment: As @Seamus said, under normal operation voltages will be _constant_. So voltage measurement is only useful for detecting poor cables, bad charger, malfunctioning circuits on the PI, or stress tests (high load, high temperature), etc. You need the current (amps) or power (watts)
Comment: Thanks for answer, i wonder why this doesn't work with the new user and works only with `pi` as user, *any idea* ?
Comment: @VinodSrivastav i don't have one here but check pi's groups and add relevant ones to your user (`usermod -aG  `), don't forget to logout and login for the changes to take effect.
Answer:
Q: Is it possible to measure (with software, like PowerTOP) the Pi's current power consumption, on my Raspberry Pi?

You can't actually measure power with software; that would be like attempting to measure time with a spoon. PowerTOP doesn't measure power - it only identifies software entities that utilize system resources which the clever people at Intel know cause more power to be consumed by the CPU.
Power, or in this case Electrical Power is a measure of the energy transferred/consumed per unit of time. The unit of measure for power is called a watt, and it's defined by the product of voltage and current. For the dc/time-invariant case:
P = V × I
And so - to measure the RPi's power consumption, we must measure the physical quantities of voltage and current at its input terminals. Neither of these can be measured by software; these measurements must be done with an instrument or transducer that converts a physical quantity to data that the software can read and use to make the calculations.
Off-the-shelf Power Measurement
There are a huge number of USB gadgets that measure current, voltage and power. A quick Internet search reveals many of these, mostly available from the usual suspects. If it's important to get software involved, at least one of these devices has a Bluetooth interface that may be used to fetch readings from the device for recording measurements. Otherwise, they mostly all display the data on a small screen.

DIY measurement
This will require more effort - and more software.
Let's start with measuring voltage: The analog input of an "Analog-to-Digital Converter" (ADC) may be wired to the power input - or anywhere on the 5V dc bus to serve as a voltmeter. The voltage readings are (typically) transferred to the CPU for processing via a serial port - SPI or I2C. This is reasonably straightforward, and there are many hardware and software examples available online.
Measuring voltage is "non-invasive" in that it only requires a wiring connection from the ADC analog input to an existing contact on the RPi. Current measurement is a different animal... current flows, and if you want to measure the flow, you must break the connection coming into the board, and insert your ammeter there. Yeah - a bit messy. Perhaps the cleanest way to do this is with a USB breakout board - this one would work

Now that we've got a point to insert the ammeter, we must choose the type of ammeter to use. We'll limit ourselves here to two alternatives, although there are others:

a current shunt

a Hall Effect sensor

What are the primary specifications to consider in selecting an ammeter?

For a Raspberry Pi, a measurement range of 0-5 Amps will be sufficient
The current sensor should not cause a significant voltage drop

With respect to current shunt vs Hall Effect, one trade-off is that the current shunt (a small resistance) will reduce the voltage delivered to the RPi, whereas the Hall Effect device will be (almost) too small to measure.
Allegro Microsystems' ACS712 uses Hall Effect technology to measure current over a claimed range of 0 - 50 amps with an effective series resistance of only 1.2x10-3. It may also be purchased as a sensor module from various vendors, similar to the picture below:

Perhaps a more salient consideration in choosing the voltmeter and ammeter is the integration effort. Texas Instruments' INA260 measures current with an integrated shunt resistor, and will also serve as a voltmeter. Both voltage and current readings are transferred over a single I2C interface. DIY power measurement could scarcely be any easier - and coding examples are available from numerous sources. The INA260 is said to measure 0-15 Amps, with a shunt resistance of 2x10-3. This equates to a voltage drop of approximately 2 mV at the RPi input terminals - only 800V more than the Hall Effect device.

The INA260 is also available as a sensor module to simplify hardware integration:
Answer: Use a multimeter in series with a bench top power supply, or look at the bench power supply itself if it has a built-in ammeter.
Measuring the whole setup (with power supply) won't give you an accurate reading of the Raspberry Pi's actual usage since you will also be measuring inefficiencies in the power supply you use.
Comment: Measuring with the power supply would however be an accurate representation of the costs associated with the usage. It depends on the goal whether you want to measure before or after the power supply.


What were the findings of the Acts Seminar?

Question: The Seminar on Acts of the Apostles sat for ten years until 2011, examining the Acts of the Apostles. What were its main findings and how were they arrived at?
Comment: [Is this on topic?](http://meta.christianity.stackexchange.com/q/6065/30)
Comment: **Mod notice:** _‹some comments removed›_ Please keep discussion about the topicality of this post on the [relevant meta post](http://meta.christianity.stackexchange.com/q/6065/30). Splitting the discussion between there and comments isn't helping.
Answer: The Acts Seminar was one of several seminars set up by The Westar Institute as "large-scale, collaborative research projects" on various topics in early Christian history. Fellows attending and voting at the Seminars are academics in theology, Bible studies and cognate fields.  The voting system was based on traditional scholarly practice, whereby each member of the Seminar assigned a colour to his or her response to a question after full discussion, as described by the institute's Wikipedia page:

RED: This information is virtually certain; it is supported by a preponderance of the evidence and is accepted as historical.
PINK: This information is not certain but is probably reliable; it fits well with evidence that is verifiable and so is regarded as
  borderline historical.
GRAY: This information is possible but unreliable; it is not a clear fabrication but lacks supporting evidence and so is regarded as
  dubious.
BLACK: This information is improbable; it does not fit verifiable evidence or seems to be a fabrication and is regarded as
  nonhistorical.

As described by the Seminar summary report, the goal was to go through the canonical Acts of the Apostles from beginning to end and evaluate it for historical accuracy.  The Seminar announced that its principal findings were:

The use of Acts as a source for history has long needed critical
  reassessment.
Acts was written in the early decades of the second century.
The author of Acts used the letters of Paul as sources.
Except for the letters of Paul, no other historically reliable
  source can be identified for Acts.
Acts can no longer be considered an independent source for the life
  and mission of Paul.
Contrary to Acts 1-7, Jerusalem was not the birthplace of
  Christianity.
Acts constructs its story on the model of epic and related
  literature.
The author of Acts created names for characters as storytelling
  devices.
Acts constructs its story to fit ideological goals.
Acts is a primary historical source for second century
   Christianity.

"The Seminar has not found a core historical story of Christian beginnings in Acts", which is "not to say that Acts is totally unhistorical but to observe that it is less helpful in the historical reconstruction of Christian beginnings than previously assumed."
The full report of the Seminar is published as  Acts and Christian Beginnings: The Acts Seminar Report (Polebridge Press, 2013), edited by Dennis E. Smith, Joseph B. Tyson.
Comment: 50% of this post is copy and paste from the seminar's site with no indication that it isn't your own material. That's not okay — and this is something we've pointed out before on your posts. Copy & pasting any content  and posting it with your name  under it and no credits or formatting  to indicate a citation is plagiarism. Don't do that.
Comment: Did they address whether the author claimed to be a companion of Paul or not? (The "we" passages are often cited as evidence, but I've seen arguments that they don't actually mean that.) Do they regard it as the work of a single author/redactor? If so, is it the same person as the Gospel of Luke? Regarding 6, what did they say *was* the birthplace of Christianity?
Comment: @Mr.Bultitude I will be ordering a copy of the final report and when I have received and read this I will be able to answer these questions.  Sorry I can't do so just yet.
Comment: Another question, regarding number 3: which of the Pauline epistles are considered to have been used as sources? Did it include the Pastorals? What about Hebrews?
Comment: Hi @Mr.Bultitude That's an interesting question, too much to answer in a short comment. If you could ask it as a question in its own right, I'll try to do it justice.  Please state whether you want the view of the Acts Seminar or of scholars more broadly.