How to move my installed raspbian from 16 GB to 32 GB memory card?

Question: I was using a 16 GB micro sd card with raspberry pi4. Now I need to expand my memory . This is why I want to move the installed raspbian from 16 gb to 32 gb. How am I supposed to do that?
Answer: Raspbian includes a "SD Card Copier" on the tools menu. That will copy just the used part of your 16GB SDCard to your 32GB SDCard and give you a bootable clone.
It's been there since 2016 and there's some docs at: https://www.raspberrypi.org/blog/another-update-raspbian/
Comment: It will do that for you automatically.
Comment: can I use the whole #@ GB then?
Comment: Yes this is a great option if you have another bootable RPi to work with.
Answer: Easy..
Get a cloning program like Apple-Pi Baker for Mac, Win32 Disk Imager or Windows freebies maybe.
Make an image of your SD card you want to expand.  This will make an ISO file that is a clone of that disk.
Insert the blank 32gb SD into a reader, and select in the baker program, and then it will write the image of the 16GB card to the new 32GB card.
You can keep the 16GB for backup or repurpose it.
If you like the Linux command line version, look up a duplicate post of how to run a 'dd' command line... or use one of the GUI based SD cloning tools.
https://unix.stackexchange.com/questions/144172/full-dd-copy-from-hdd-to-hdd
It's a little tricky at first, but try not to mix up your disks, as you don't want to accidentally make your 16GB a target.   dd might let you do directly though, so you won't need to dump the image to another storage.  You might find a GUI program that has this function.
This might help
Comment: All this only copies the 16GB card to a 32GB card, but does **not** expand the final image to the full 32GB!
Comment: Try using 'sudo raspi-config' in the terminal on the 32gb SD boot up,  go to Advanced Options and there (option A1) you can expand the file system.  Hope that helps.


How to find miRNA binding sites on a specific gene?

Question: I am trying to find miRNAs that bind to the 3'UTR of a specific gene. What is the best way of doing that (that is, with a good scoring analysis that is most commonly used by researchers in this area)? I would also like to know the other possible methods if there are multiple ways of doing this.
Comment: Good question here
Comment: Did you get the answer that you wanted ?
Comment: Bioinformatic part of your answer may be better that is why i did not give full credit. For those who also would like to know more about tools for finding miRNA target site they could check this article. It is really good: http://journal.frontiersin.org/Journal/10.3389/fgene.2014.00023/full
Thanks for reminding me of the question by the way.
Comment: @user1445 I don't understand what you mean? Do you want to have details of these bioinformatics tools? If you are asking that then I would consider the question as broad. As you can see that it takes an entire article to explain these things.
Answer: There are some tools for predicting the binding:

TargetScan (based on seed match [primary], extra pairing, sequence context 1 — nucleotide composition around the site etc [secondary])
miRanda (based on hybridization stability and seed match[primary] and sequence context [secondary])
PicTar (adds a layer of evolutionary conservation criteria)

1 Context means the position of the target site in the 3'UTR and the surrounding nucleotide composition (which is also considered an indirect metric of secondary structure)
miRanda and TargetScan also have classes called conserved and non-conserved targets. miRanda reports miRSVR scores and TargetScan reports context scores but these measures are based on few experimental results and may not always be meaningful. miRSVR is based on change in target expression upon miRNA overexpression/knockdown. It also uses metrics for target site context. Context+ score of TargetScan includes many metrics which include target abundance and conservation along with the regular context scoring. Some of these metrics may be more useful than the others. But scores based just on miRNA OE/KD experiments can be misleading- especially if target expression is quantified just at the RNA level. Target abundance also varies between different cell types. For more details on these metrics refer to the papers corresponding to these tools.
There are some experimental procedures for target determination which mainly involve Protein-RNA crosslinking followed by immunoprecipitation of Ago and subsequent quantification by RNA sequencing. See HITS-CLIP and PAR-CLIP. These techniques do not really find the targets. All they do is to correlate the levels of miRNA and their predicted targets attached to Ago (you won't exactly know if the ternary mRNA-miRNA-Ago complex really formed or not).
CLASH is a more recent technique which tries to address this issue by ligating mRNA with miRNA. This way you can capture the miRNA-mRNA interaction. However, I am a little skeptical of CLASH; I myself was working on this principle some time back and faced this one challenge. CLASH roughly involves the following steps:

Crosslink protein-RNA
Immunoprecipitate Ago
Use RNAse to digest unbound regions of mRNA (and make it small enough for a short read sequencing experiment)
Ligate miRNA and mRNA bound to Ago using RNA ligase
Degrade Ago using protease
Sequence the miRNA-mRNA ligated pair

My doubt was how would miRNA and mRNA be ligated when the footprint of Ago is bigger than an miRNA (reported ~50-60 nt in HITS-CLIP and PAR-CLIP). When the RNA is nuclease protected then how can it be accessible to ligase. When I was thinking about it then I thought that a partial protein degradation was necessary (after RNAse step and before ligase step) to give some space for ligase to act. Eventually I did not work on it further. Three years later CLASH paper was published and I was happy that someone made it work. But the ligase issue was not addressed (It seems to have worked but I don't know how!!).
To test the predictions you can use a reporter assay (such as GFP or Luciferase) with the 3'UTR cloned downstream of the reporter. These can have artifacts too. Overexpressing the miRNA should be avoided and seed mutations should be done to ascertain the targetability.
Another technique to determine a target mRNA is to mask its predicted miRNA binding site and see the effect on the expression. This has been done in zebrafish using morpholinos complementary to target sites but not on other models AFAIK. This seems to me as an elegant assay- no overexpression and you can precisely determine the target site.
Answer: I would thoroughly check the literature on the UTR you are interested in, a lot of this has already been done for many  genomic regions since nextgen seq began.
You will want to first off use computational prediction algorithms to help guide you in getting a good Candidate list of miRNAs
The interaction between a miRNA and its target mRNAs is usually studied by co-transfection of a reporter expression vector containing the 3'-UTR region of the mRNA and an inhibitory or precursor molecule for the miRNA.
But, this does not measure the direct and physical interaction between a miRNA and a specific mRNA. To more specifically measure binding you will need to do a ElectroMobility Shift Assay.
Here's a commercial tool which will work well if your just trying to identify it.
http://www.activemotif.com/catalog/905/lightswitch-synthetic-mirna-target-reporter-collection
I don't think there are any other very effective/easy methods.
I guess you could do something like hybridize it, run the hyb on a gel, pop out the band and seq it
Comment: Thank you for the answer but my question was actually a lot more simpler. For the time being i am just looking for a good candidate list of miRNAs. I have found a website (http://www.microrna.org/microrna/home.do) for this and it is based on mirSVR score. Is this a good way of picking candidate miRNA's? Are there other ways of finding candidate miRNA's that are based on different scoring algorithm?
Comment: I thought you wrote specific gene?
Comment: yes "For the time being i am just looking for a good candidate list of miRNAs for a specific gene (the gene of my choice)". So, i want to choose a specific gene in the database and i want that database to show me a list of mirna's that can bind to that gene's 3'UTR . Also, I want to see the accountability of mirna binding via a scoring method such as mirSVR. I have so far found only mirSVR and the mentioned website but are there other ways and what is the best way to search for that in the literature? sorry if i am not maintaining correct terminology, i am relatively new in this.


Need feedback on the usability of this text input design

Question: Any concerns about the usability of the text input design below? This is inspired by Material Design, but with a border around the whole input. The designer is trying to minimize clutter by displaying the label inside the input while avoiding the usability problems of placeholder text.

Link to video showing the animation
Comment: Till it is for the web, I'd suggest against using labels as placeholders.
Answer: This is called an "Adaptive Placeholders" and it's a good alternative

In this pattern, labels are placed within the form field as placeholders until the field becomes active and the user moves the input focus into the field. At that point, the placeholder label moves to the top of the field. As a result, the adaptive placeholder (also known as the float label) is always visible, either in the center of the form field, or above the text that the user entered.

It's a clever way of dealing with placeholders as it:

Saves space (very usefull for mobile device)
Serves as a memory aid for users while typing

However, unless you want to keep the design very minimalistic or you have space constraint it is better to keep the label outside the input - and with a hint.
Source: https://www.nngroup.com/articles/form-design-placeholders/
Comment: Yes, but so does the article also specify that the label should move to the top of the field (not stay inside the field). Also, the same article specifies that placing label text inside the field hampers usability as fields with text in them are less usable.
Comment: I have seen some instances that move the label outside the input container. That of course does not do as well at keeping the design "clean". My main concern is probably the fact that the label gets so small, and if it is too hard to read, then it is no better than normal placeholder and its harmful demands on the user's memory. Thanks for your replies.
Answer: This other question asks about the benefits of having border-bottom only inputs. The Material design interaction makes sense, within its own rationale, with the bottom border only input.
In your case it is not quite the same as the Label ends up as a kind of placeholder. In my opinion it is strange because:

The label doesn't act as label in the beginning. It acts as a placeholder, which is not exactly the same.
The label doesn't act as label in the end. It acts as a placeholder that for some reason didn't disappear when text was entered.

Leaving aside the rationale this might bring some confusion like:

The user doesn't want First name to be part of his input to be send
The user is not able to know if the page is not working correctly or he has some plugin causing an incompatibility

My point is that instead of looking like a different approach it might look like there is something broken. My suggestion is to be careful and test how do users receive such interaction.


Wireless Security System deadbolts with door handle that locks - how to disable door locks

Question: We installed a wireless security system to eliminate keys for entry into the home.  This works well for the dead bolt, but the door handle has the lever on the inside to turn and lock.  To enter, you have to have a key.  What is the best solution without tearing up the door handle lock for future owners?
Answer: I would simply leave it, and not use that lock.  That way if your wireless deadbolt breaks, or you need some extra privacy, you can still lock the house.
Failing that, just shove something in the hole in the frame so you cant engage the lock.  Easy to reverse if needed.
Comment: There's alot to be said for"just don't lock it" -- least effort easiest reversal. If you're worried that guests migh be "helpful",  duct tape over the inner control is a simple "don't touch" indicator. Not elegant, but...
Answer: The simplest solution is to go out and buy a non-locking handleset -- since you are't using it for security, the only concern is that it have a good weather-resistant finish, so it should be cheap(ish).
The existing handleset could be modified not to be lockable -- I've done it -- but I have a bit of trouble recommending that for the average individual when replacement is so affordable.


What attributes of a bridge camera are most important for astrophotography?

Question: I am planning to take a bridge camera, which apart from the usual personal events usage would be used for astrophotography. I have seen the models and most of them have decent zoom to start off with. What other factors/ features of the bridge camera should be considered?
Comment: Again? Why is everyone wanting to do astro all of a sudden? At least there's no shortage of duplicates...
Comment: @fkraiem Because it's midwinter in the northern hemisphere - longest nights as well as likelihood of clear nights.
Answer: "More Zoom" really isn't much of a feature to consider when using a bridge camera for astrophotography. The small sensors and narrow apertures at maximum "zoom" found in bridge cameras pretty much preclude using them for long focal length astro work. By the time you've exposed long enough to capture a usable amount of light, the stars have rotated halfway across the field of view at longer focal lengths.
Normally the way to combat this is to place the camera on an equatorial tracking mount that moves to counteract the Earth's motion and keeps the camera pointed at the same point in the sky while also preventing the the stars near the edge of the frame from rotating around the center. But a good equatorial tracking mount can cost an appreciable percentage of the price of most bridge cameras.
In general bridge cameras aren't particularly well suited to astrophotography. The areas where they are most capable is for wide field work. The following things are most helpful:

Sensor size. The larger the sensor (or more specifically the size of the pixels on the sensor), the higher the full well capacity before the pixel well reaches full saturation. The higher the full well capacity, the brighter the exposure before you start blowing all of the stars out as pure white instead of the various colors they are. The increased dynamic range allowed by larger pixels also allows for a better signal-to-noise ratio. This allows your images to look cleaner and less grainy. Most bridge camera have relatively small sensors because it allows them to have more "zoom" with a smaller lens.
Maximum aperture. The larger the lens' maximum aperture (the lower the f-number), the shorter the exposure times you can use to get the same amount of light into the camera OR the more light you can allow into the camera in the same amount of time. This is important because the Earth is rotating beneath the sky. Exposing for very long means stars begin appearing as blur trails instead of fixed points. The maximum exposure length before motion blur appears is based on the field of view you are capturing. The wider the field of view, the longer the maximum exposure
before stars begin to trail. The narrower the field of view (the longer the focal length - the more you "zoom"), the shorter the maximum exposure time before stars begin to trail. Tracking mounts are a way to extend exposure times, but the good ones are very expensive.
Maximum usable ISO. The higher ISO you can use, the shorter you can expose. For why this is important, see directly above.
RAW file capability. The significantly more information contained in a raw image file compared to a compressed JPEG created from that raw information is critical to doing astrophotography. Cameras aren't very good at processing shots of the night sky. Post-processing applications can produce much better final results when the raw image data, rather than an in-camera produced jpeg, is used.
Maximum exposure time. Due to the small sensor found in bridge cameras, many of them limit the longest exposure to times as short as 30 seconds or less, sometimes a LOT less. Many of them also decrease the maximum exposure time as the ISO setting is increased. They do this to prevent the user from making excessively noisy images.
Low geometric distortion lens. This is not a particularly strong suit of most bridge cameras, particularly those with a lot of "zoom". To make a lens with such varied focal lengths, designs have to be compromised and one of the things that is often traded for a wide focal length range is the amount of geometric distortion that is tolerated. A bridge camera with less "zoom" will usually demonstrate less geometric distortion than a bridge camera with a "superzoom" lens.

One way astrophotographers increase the quality of their images is to do what is known as 'image stacking'. Several (sometimes hundreds) of discrete frames are combined to increase image quality and reduce the effects of noise and shooting at high ISO. To do image stacking well the camera needs to move with the sky for each successive exposure (There's that pesky need for an expensive tracking mount again!). In the absence of a tracking mount, stacked images can be aligned with the differences in field of view resulting in cropping the edges of frames to include only the parts of the field of view that is included in all of the shots. For stacking to work, though, the stars need to be the same distance apart in every frame. The 'warping' or 'stretching' caused by geometric distortion makes stacking very difficult to do and less effective.
In the end you really should consider whether a bridge camera is the best choice for your intended usage. Astrophotography is a very demanding type of photography with regard to the technical capabilities of the equipment. It can be a rabbit hole of ever increasing spending to get better gear that never ends, but everyone has to start somewhere. For most, though, an interchangeable lens camera with an APS-C or larger sensor is probably a much better place to start than a bridge camera. Even entry level DSLRs that cost about the same as many bridge cameras will be much better for astro work.
For further reading:
What lens characteristics are important in star photography?
Longer exposure & lower ISO or shorter exposure & higher ISO - what gives better results when photographing stars?
How can I do astrophotography with my 70-300mm lens?
Why do I have blurry star trails?
How to have colors in Milky-way?
How to take the night skies and meteor showers?
What should I look for in a camera for shooting in bulb mode for astrophotography?
Astrophotography exposure setting for noise reduction
What caused my astrophotography images to come out hazy?
How do I get a shot of both the foreground and stars with astrophotography?
How to enhance a cameraphone photo so you can see stars?
How do star trackers work to take a photo for 5 minutes without blur, and are they worth it?
Black sky for night long exposure
What is the "Rule of 600" in astrophotography?
Can I get longer than 15 second exposure with my canon SX 50?
How to set white balance in a photo of stars?
Why should I use the widest aperture for star photography?
How do I focus in low light for long exposures?
Star photography: what aperture
Comment: Maybe not half of the field of view, but a percent or so is a great lot. My notion is that f/2.8 and ISO 3200 needs near 30 seconds, minimum, for adequate exposure, but that duration causes a blur.  A calculator greatly expanding on the 500 Rule (maximum exposure time on a fixed mount) is at https://scantips.com/lights/stars.html   ..  Conclusion: investigate an inexpensive DIY tracker:  https://www.google.com/search?q=barndoor+hinge+tracker+astrophotography
Comment: With the "most super" of the 'Superzoom' bridge cameras, AoV at maximum FL is equivalent to 600-900mm on a FF camera. Expose at 30 seconds (at 900mm that's 20X longer than the 1/600 rule!) with that AoV and the star's aren't blurry from motion - they're trails. That's like exposing for a little over 9 *minutes* at 18mm on FF.
Comment: Manual rotation of the drive wheel on a 'barn door hinge' tracker is OK for lots of successive short exposures. Not so much for extended long exposures.
Comment: The calculator computes it exactly.  The 600 Rule is kinda poor.  A 400 Rule creates a blur trail with additional length not greater than the DOF CoC diameter, which is an existing standard of acceptable blurriness (more precisely, a 412 Rule is equal to 1X CoC for the sensor size).  A 500 Rule is a compromise, however, that is still not much star exposure time.  A barn door tracker is inexpensive, and provides greater time, and is fine for a few minutes, but not for many minutes.
Comment: The 600 rule is good if you are only viewing at 8x10 inches. It's totally inadequate if you're pixel peeping, but so are a 400 or 412 rule. CoC is also dependent upon magnification (sensor size/viewing size/etc.). The "standard" CoC for various formats assumes an 8x10 viewing size.
Answer: Whether it is a camera or a binocular, a bigger aperture is required to collect more light from the night sky. In fact many star gazers prefer wider aperture to longer zoom. So you have to check the max aperture of the lens/ fixed lens camera. Also, a bulb mode is a preferred feature.


Implement K-means clustering with Map-Reduce

Question: Recently in an interview I was asked to implement k-means clustering using the Map Reduce architecture. I know how to implement a simple k-means clustering algorithm but couldn't wrap my head around to do it using Map Reduce(I know what Map Reduce is). Can someone provide me an explanation/algorithm of how to do that? More specifically I am looking what Map and Reduce phases will look like for such an implementation? I was also asked how many Mappers and Reducers will I need?
Comment: Since MapReduces is less a concept and more a library, this seems to be a programming question, which is offtopic here. Please clarify which conceptual issues you're facing.
Comment: @Raphael - map / reduce is a concept - it's implemented in a number of frameworks and fitting a given algorithm into that mindset is a completely algorithmic problem.
Comment: @nbubis Some people [disagree](http://cs.stackexchange.com/questions/3019/what-is-the-novelty-in-mapreduce).
Answer: You can run a loop over $j\in\{1..k\}$:

Create a map that maps each point $x_i$ to itself if $x_i$ is nearest to the mean $m_j$, and to the zero vector otherwise:
$$x_i \rightarrow \begin{cases}(x_i, 1)  & d(x_i, m_j) \le d(x_i, m_l),\ l\neq j \\ (0,0) & \text{otherwise} \end{cases}$$
In the reduce stage, you would find the sums and counts:
$$(x_{i1}, c_1), (x_{i2}, c_2)\rightarrow(x_{i1}+x_{i2}, c_1+c_2)$$
You then divide the resulting sum by the total count.

Thus, for each iteration in the k-means algorithm you will need $k$ maps and $k$ reduces.


What are the roles of the co-pilot in commercial aviation?

Question: I am currently doing a project(in college) on the history and future of the role of a co-pilot and to start it off I wanted to just summarize what the roles of the co-pilot are.
Comment: Welcome! It may be more complex than pilot vs copilot. A crew may be made of two captains (pilots). In a crew of two crew members, one is flying (PF) and one not flying (PNF) but monitoring. Both the captain and the first officer ("copilot") can execute each role (not at the same time). See [here](http://www.skybrary.aero/index.php/Pilot_Flying_and_Pilot_Not_Flying). In addition the captain (or one of the captains) will have the role of PIC (pilot in command), in responsibility of the aircraft and the safety of everybody. PIC may be PF or PNF.
Comment: I'm an airline pilot. I am a First Officer which means I fly that "copilot" role. The Captain makes the final decision and has the final responsibility for what happens, but I have an open forum to speak up and I stay on top of everything that's happening. We apply CRM and TEM, threat and error management together. As far as operational duties go, they are shared for the most part. Actions are usually divided into PF (pilot flying) and PM (pilot monitoring). Research the concept of CRM. Also look at Tenerife crash and how it changed cockpit culture.
Comment: Eastern 401 had a big impact on CRM too.
Answer: Firstly, "co-pilot" is not a term that is really used anymore. When people say that they usually mean the First Officer. It's a bugbear of mine because "co-pilot" implies that there is one real pilot and a half pilot, when the reality is an airliner needs at least two fully qualified pilots to fly it safely!
When it comes to actually flying the plane, the two pilots have designated roles - Pilot Flying (PF) and Pilot Monitoring (PM - sometimes this is called Pilot Not Flying). Both the Captain and the First Officer share these roles - usually one of them is PF on the outbound leg and the other one is PM on the inbound leg. The PF manipulates the controls to actually fly the plane, whereas the PM handles communications and other required tasks that don't involve actually flying the plane.
The biggest difference between a Captain and a First officer is responsibility. The Captain is the Pilot In Command (PIC), who has ultimate responsibility for everything that happens throughout the flight. There are some practical things that only Captains can do, like flying into some tricky airports, landing in strong crosswinds, and on many aircraft only the Captain can use the steering wheel (or Tiller) for taxiing.
Historically there was a strong heirarchy - the Captain was the boss and the co-pilot was, you could say, a servant. This posed big problems, because the Captain is not always right. The advent of Crew Resource Management (CRM) has brought this down to a much more desirable level - where there is still a heirarchy to ensure decisions are made, but not so much that they are unquestionable. The future of the First Officer role will be one of continuing to recognise that they play an important role in a functioning cockpit, rather than just there to serve the Captain. And hopefully people will stop calling them co-pilots!
Comment: @RonBeyer No I think you are confusing 'Pilot In Command' with 'Pilot Flying'. I've never heard of a First Officer being PIC.
Comment: @RonBeyer Captain is PIC (and signs the release) and FO is SIC. This is regardless of who is actively flying the airplane, which is alternated (at my carrier CA had 1st leg, then FO  flew the next two, CA the following two, etc)
Comment: @Prodnegel I see your point. But why have a pilot and a co-pilot instead of two co-pilots?
Comment: *" The Captain is the Pilot In Command (PIC)"*, not really, the pilot in command is whoever decides to take on that role and should also be shared between the captain and first officer.
Comment: Co-pilot does not imply half pilot...as the prefix co means "together, mutually, in common". Maybe the public thinks of it that way, but I don't think the word itself implies that at all.
Comment: @Ben, That actually sounds like a great question to ask :p. Here is a cool link I'm sure you'll appreciate http://www.askthepilot.com/pilots-and-copilots/
Answer: Your question's title says "commercial aviation", and in the question you indicate you're interested in the history. With that in mind, I'll add to Ben's excellent answer.
Commercial aviation includes not just airline but also non-airline flying, including corporate flying. In corporate flying, the duties of the co-pilot varied greatly depending on what the equipment was, who the pilot was, and what company was operating the aircraft. I've deliberately used the pilot and copilot terms because prior to 1985 when I did my last corporate flying, I heard those terms more often than captain and first officer when it came to corporate work. The latter terms were "airline talk" to us, and using them for what we were doing seemed pretentious, although that was starting to change.
The typical corporate usage by small companies of small aircraft, including small business jets usually did not include carrying a flight attendant. That meant the co-pilot often did things a flight attendant would otherwise do, including mixing drinks before engine start and cleaning up vomit after the flight. I did both numerous times.
On the airline side and before proper usage of CRM, the first officer might be used as a scapegoat, especially in third world countries and in Asia. An apparent example of this was the China Airlines 605 accident at Hong Kong's Kai Tak in November 1993. Look at the transcript of that accident. The captain is P1 and is flying the aircraft, the first officer is P2 and is performing PNF duties up until 46 seconds before they hit the water. After that, P2 seems to be manipulating the controls. At the time of the accident, the assumption was the captain had handed control of the aircraft to the first officer when it was obvious they were going to crash. To the best of my knowledge that assumption was never challenged.
Comment: It seems like it's a bit of an overgeralization to say that the first officer used to be used as a scapegoat in third world countries and Asia. There's a reason a cockpit voice recorder is installed in airliners!


What is (or was) http://cycling-exchange.com/ ?

Question: I stumbled across http://cycling-exchange.com/ when looking at Area51. It looks inactive now, but what was it and how does it relate to this site ?  Does anyone know why it failed to pick up or died off - it would be good to know so this site avoids similar fate.
Comment: I'd like to know this as well. Perhaps it's an old StackExchange 1.0 site. Perhaps you cross-post this on [SE meta](http://meta.stackexchange.com)?
Answer: Looking at the list of registered users, it becomes painfully clear why it didn't pick up.
Not enough promotion ⇒ no users ⇒ no participation.
Area51 is different in that it ensures that every new site has a certain amount of momentum right from day one, or else it won't get created to begin with. Jeff and Joel have stated many times that they do not want to, and will not, create "ghost towns".

We do not believe that the Internet benefits from putting up placeholder sites with negligible traffic that do not attract high quality communities.

Taken from this entry on the StackOverflow blog. Read it for further insight.
Answer: It was a SE beta site.
Site was mine. I just didn't have the funds nor time dedication to promote it like it needed. The domain still works, but cycling.stackexchange.com now redirects to bicycling.stackexchange.com, so just a matter of time before it gets turned off.
Answer: Definitely part of the original StackExchange beta.  There used to be a listing on StackExchange.com but I can't seem to find it now.  I remember there were quite a few topical sites, but many of them fizzled due to lack of users.
Answer: As of 2016, the domain is now owned by a domain squatter.
Our good friend the Way Back Machine has the page archived at https://web.archive.org/web/20100511061702/http://cycling-exchange.com/  You can click though this link and read some of the questions/answers.  Some haven't really changed.
In case archive.org ever goes away, here's a shot of the page as it was on January 31 2011.

Observations:

Meta was just a tag back then, as shown by question about login issues
Product recommendations were more acceptable.
The basic concept and design is unchanged, with answers, votes and tags, and bounties and badges.


Switching PhD programs after earning M.S

Question: This fall, I will be a 2nd year PhD student in Microbiology. My ultimate goal is not to work in academia, but industry or government. After being a year in the program, I started to realize a masters degree may be more aligned with my future career goals. I find I like clear cut goals for my laboratory work, and very applied research. However, I would still like to keep the option of a PhD available. I have now found out, that I may need to move to a new program. My fiancee is a 4th year medical student who has matched into a residency across the country. While I never thought I would leave a program for a person, I can't imagine spending 4+ years long distance. Would leaving with a master's degree from my current program burn bridges with professors? Is it even feasible to start over at a new program? I have not yet advanced to candidacy. Would it be wise to wait until after? Any advice would be wonderful.
Answer: professors are people and understand that life happens. I do not think I would enjoy working with a colleague who would have a vendetta against a student for wanting to leave the program in order to move with their soon-to-be spouse. Be open with your supervisor and ask for their advise.
Also, if you want to go into industry/government, do not underestimate the importance of a phd. The ability to apply for grants or oversee a lab is valuable.
Comment: Thanks for the response! Can I ask you another question regarding industry/government. I don't know if this is the case in your field, but I find it very hard to talk to professors about careers outside of academia. Inquiries about industry are often met with comments such as "selling out". aka not doing science for the purpose of sheer curiosity. Do you have any advice for finding out about outside careers?
Comment: I suppose it depends on the university. I work at a top 10 US university and there are major pipelines into industry at the university, especially in the biomedical sector. Even in basic science, there is a tremendous amount of support.  Within the university, it is far from uncommon for faculty to straddle between the university and industry. For example, I really cant imagine top talent in machine learning being told that they are selling out for reaping the rewards of industry.


Is it worth upgrading my wheels on a commuter?

Question: I'm looking at some Fulcrum racing 5 wheels but Im not sure if they would serve my daily rider better or my weekend bike. My daily work commuter is a Giant Escape and my weekend bike (mainly for fitness and fun) is a specialized Allez.
Comment: All snark aside, this is likely to get closed as 'opinion based' - as there's no canonical answer possible. Better in what way? If you are measuring overall watt-hours, you likely spend more distance on your commuter. But weekend cycling is more fun time. And as I hint above, commuter bikes are usually theft-targets so I wouldn't put anything nice on them.
Comment: So, you already got them and don't know what to do with them?
Comment: [In a shady voice] "Hey man, those are real nice wheels on your commuter.... it'd be a shame if they were to get stolen......"
Comment: There's generally only comfort and financial and security reasons for a commuter bike over a super-nice one.   If you can afford them, why not?
Comment: I have a set of fulcrum red metal 5's and I was about to say that the LBS near me said that a replacement freehub for them would b expensive (mine needs new bearings) but I've just looked and it's probably only £50-£60 by the looks of things. I really like my wheels but I am on the lookout for some new lighter ones but, and here's just my opinion, I would keep the fulcrums on for my commute and use the new ones for trail riding only. The racing 5's are sub £200 a set so I'd live with the risk on a commuter bike and buy a blummin' big lock. I always thread my lock through the back wheel anyway.
Answer: Yes, I think it's totally worth it.  It depends on if you have a budget to spend on extra parts of course.
I have a specialized secteur as my commuter and after a year or so of owning it I replaced the stock wheels with some mavic aksium wheels.  Now, the decision was made as part of a groupset upgrade.  The bike was equipped with a low end shimano 8 speed and I got the wheels as part of an upgrade to an 11 speed groupset.  That said, the wheels are on the low end of an aftermarket wheel and they still make a huge difference.  They ride much better than the stock wheels, are lighter (but still heavy by road/race standards), more responsive, and brake better.
I also bought some locking skewers with them and don't ever worry about carrying an extra cable or anything besides a good lock.  The downside is that you need to carry your skewer key around everywhere, but I usually just keep mine in my bag.
Of course, they might get stolen, or your whole bike might get stolen because it draws more attention, but if it's something you want to do and aren't going to be upset if it happens, don't think twice about it.  Make the upgrade.  I'd recommend getting a used wheelset.


How do I change the color of my hydrangea flowers?

Question: So, I've heard that people sometimes mix a bit of lemon juice in when they water blue hydrangeas, they say it keeps them blue if the soil is lacking in acid. I was wondering, I have a pink indoor hydrangea plant; would it be possible to alter the color by putting the lemon juice in? Would it possibly make it blue in time, or purple?
Answer: It really depends on the specific species of hydrangea that you have. It's mostly Hydrangea macrophylla, also called "big leaf" hydrangea (that's the Latin name literally!) that changes colour depending on the pH level of the soil.
In acidic soils (pH less than 7), the flowers are blue in colour (see pic 1), in neutral soils (pH = 7), it is very pale pinkish to nearly whitish (or light cream) and in alkaline soils (pH greater than 7), it is a bright pink or sometimes purple in colour (although, I've never managed to get it to turn purple). Wikipedia gives the following as the reason for the change in colour:

[The change in color with acidity] is caused by a color change of the flower pigments in the presence of aluminium ions which can be taken up into hyperaccumulating plants.

Usually, people throw their coffee grounds in the soil next to a hydrangea plant to increase the acidity and get it to turn blue. However, I've never heard of anyone using lemon juice to achieve this effect. Note that lemon juice has a higher acidity than coffee grounds (and I guess stronger than what hydrangeas would prefer) and I'm afraid you might actually damage the roots. If you must use lemon juice, then you might have to dilute it before feeding it to the plant.
If you'd like to play it safe, most gardening centers sell mixes to turn hydrangeas either blue or pink and you could get one of those and feed your plant. It really is worth trying it and a garden with multiple hydrangea plants, each a different shade is very beautiful.
1. Blue flowers (acidic soil)

2. Bright pink flowers (alkaline soil)

Images courtesy Wikimedia commons
Comment: Yes a lot of modern varieties have been bred to be specific colours - typically, blue, pink, or white. If you have one of these, tricks with limestone, coffee grounds, lemon juice, etc are not going to work.
Comment: Great answer, thanks! My plant is the 'big leaf' hydrangea, but since they're bright pink at the moment and I'm unaware of how they've been bred, I think I'll just keep them the way they are.
Comment: My wife uses a mixture from the garden store that is "acidic" hydrangea food.  Keeps them nice and blue.
Answer: I would definitely not use lemon juice for the reasons already mentioned, but provided you don't have one of the varieties that have been bred to be a specific color, you could use aluminum sulfate to acidify your soil after testing its pH. I have used it myself and it is very effective, but it has to be applied carefully, as an overdose can be toxic.
Here is the advice given by the University of Minnesota Extension:

After planting:
1) Periodically retest your soil pH. Do not add any acidifying amendments if your soil pH is 5.0 or less.
2) To maintain good vegetative growth and acid soil conditions, use ammonium sulfate as the nitrogen source at the rate of 1 lb (or 2 cups) per 100 square feet (or a little less than a ¼ cup per 10 square feet). Ammonium sulfate is the best nitrogen source to help maintain soil acidity.
3) If your soil pH is greater than 5.5, use aluminum sulfate to help lower your pH and supply available aluminum at the same time. Note that aluminum sulfate is generally not recommended for lowering soil pH because high rates can injure most plants. Hydrangeas are the exception. Mix about 1 lb (2 cups) of aluminum sulfate per 5 gallons of water and then apply the solution around the drip line of the plant. Apply enough of the solution per plant to just saturate the soil. Repeat the application on a monthly basis as long as your soil pH is greater than 5.0. Caution - over application of aluminum sulfate can be toxic even to hydrangea. Monitor your soil pH periodically and only apply aluminum sulfate if your pH is greater than 5.0.


How do I add lyrics to a song in iTunes?

Question: How do I add lyrics to a song in iTunes so that it shows the lyrics on the iPod/iPad?
Answer: I own iClip Lyrics and I was fortunate enough to download it before they discontinued it.
(It still works even though they aren't developing it, and if you can find it online I highly recommend it)
All you had to do was play a song, it would search the internet, grab the lyrics, and automatically add them to the ID3 tag for the the MP3 file.
There are some other apps out there that do basically the same thing:

GimmieSomeTune
TuneLyrics
iLyrics
Comment: Alex, can I ask where iClip gets its lyrics from?  Are they in any way offical, or from a user-submitted site which often have misheard and incorrect lyrics?
Comment: If I am not mistaken, iClip was pulling it's lyrics from specific set of sites on the internet. And if I remember correctly, people did not like this...The developer's blog/website explains what happened. (if it's still up)
Answer: Right click the song in iTunes and choose Get Info. Second from the right is the section "Lyrics" where you can paste the lyrics of the song. The lyrics will show up on top of the album art when the song is played on the iPod. Tap the album art to show it if you don't have all the controls visible.
Comment: @Nina Did the phone have time to sync before you disconnected it?
Comment: I tried to copy-paste the lyrics into the lyrics tab on get info but when I disconnected my iPhone, the lyrics wouldn't show up while playing the song. Any suggestions?
Comment: @Nina There's also a setting under Music for showing the Lyrics (& Podcast Info), make sure that is set to On.
Answer: I've written a post on my blog to showcase my findings regarding this question. Check it out:
Software to add Lyrics to MP3 files ID3 metadata
Answer: you right click (control click on mac) on song and click get info. From there you press the lyrics tab and enter your lyrics. Hope this helps.
Answer: To add lyrics to a song, I use this dashboard widget: TunesTEXT
Very simple but very useful.


Can you pair Mac AND iPad with same Apple Wireless Keyboard?

Question: Can you pair both a Mac and an iPad 2 with the same Apple wireless keyboard, but not at the same time?  Or do you have to un-pair one, and then pair it with the other?
Answer: Yes you can.
First, make sure Bluetooth is turned off on your iPad. And enable it on your Mac (make sure the box that says "discoverable" is checked). Then turn on your keyboard and follow the steps to pair it using the Keyboard System Preference pane. Once the keyboard is paired, uncheck "discoverable" (which should remain off unless you wish to pair another device) and then turn off Bluetooth.
Next, head over to your iPad and enable bluetooth. Turn your keyboard off (hold the power button till the light glows and then dims). Turning it on again will get the iPad to pick it up and a prompt will ask you to enter a 4-digit sequence of numbers and the "ENTER" key. Follow the steps. Once that is done, it will be paired.
To use the keyboard on the iPad, make sure the device has bluetooth enabled and that your Mac has that service disabled (you should disable the service before trying to connect the keyboard to the other device).
I just tested it using my Mac and my iPhone 4 and it works perfectly. Sometimes the device takes a second attempt to locate the keyboard, but it does indeed work.
Comment: I was going to try this, but I have an issue: on my iMac, if I turn off bluetooth, I will have no control over the mouse anymore, hence won't be able to turn bluetooth on again ...
So will be stuck with my iPad.
Am I missing something?
Comment: I do this all the time with Apple's wireless keyboard and works great.
Comment: what about an iMac and a macbook pro?
Answer: For those who are looking to do follow the accepted solution with the Apple Magic Keyboard: it is not possible. As @bmike points out, the firmware of the keyboards remembers the last paired device: Can you pair macOS and iOS device with same Magic Keyboard and switch between them?
Comment: Glad I read this comment before buying that expensive keyboard. Whole fuking YouTubers avoid mentioning this crucial question.  Thanks for pointing this out.
Comment: Everyone seems to think this is possible. So I bought the keyboard, and now I'm stuck swapping devices by repairing the device every time, so I have to login with my laptop keyboard first, open the Bluetooth control panel and re-pair every single time, and it's quite frustrating since this was something I saw everyone saying would work flawlessly online :(
Answer: Back in 2011 it was possible: https://www.scottallen.com/2011/04/how-to-use-a-bluetooth-keyboard-with-two-devices/ with the above technique.
In the context of 2020, your best bet is to pair the current apple keyboard (and trackpad!) with your iPad while just connecting them to your more stationary device with their lightning cables.  Of course, the lightning cables also works with the iPad so you could reverse the situation.
Also, if you find yourself connecting your ipad and keyboard to the same USB hub which is then connected to your paired computer, the iPad "wins" and your keyboard will then control your iPad.  This will not break the last pairing and will go back to connecting via bluetooth to the last paired device.
Answer: I had the same problem; I also did not know how to make the BT device undiscoverable. What I did was removed my keyboard device from my iMac (Go to System Preference and then to Bluetooth) by clicking the cross icon when you select the device. I then turn on BT on my iPad, waited a while and the two got connected without a problem. Hope this helps.
Comment: Which is unfortunately exactly what the OP doesn't want to do.
Answer: Paul above notes that there is a problem with iMacs if they are using only a Bluetooth keyboard. I don't know if there is an easy solution to this. I have the same issue, but I also have a separate wired keyboard, and a separate wired mouse which I can connect if I need to reconfigure the wireless keyboard, mouse or trackpad.
I only do it relatively infrequently, so not too big a problem, but if I did it a lot it would be. I have bought another cheap keyboard in the hope that I will then not have to swap between machines too often.
Comment: Is this an answer to the question?


Can I oblige Mail.app to (ask to) send via BCC when sending to a large group?

Question: I just made the (classical) stupid mistake to not BCC-send a mailing to ± 100 people.
:(
Is there an extension or application or script for mail.app to prevent this failure and e.g. intelligently ask me how I want my mail to be send (normal, CC or BCC), when sending to, say, more than 5 people? :)
Answer: Mail is notoriously difficult to script effectively - particularly when it comes to outgoing messages not created by the running script.

tell application "Mail"
  set _title to name of front window
  set mList to messages of drafts mailbox whose subject is _title
  if length of mList = 1 then
    set _msg to item 1 of mList
    if length of (get _msg's to recipients) > 5 then
      beep
      error "Too many To-Recipients!  Do you want to send BCC?"
    else
      return "Send_Normal"
    end if
  end if
end tell

Something like this can be used in conjunction with Keyboard Maestro or a similar macro utility to have the utility select the send-menu-item.
While you can use System Events to do this I find that it sometimes takes 3 or more seconds to launch on my machine if it's not already running, and you start wondering why your macro isn't working when it finally takes off.
Other caveats to this approach are that the message must have been saved at least once to be detected.
So what you want to do is possible but very hackish.
-ccs


Are there any good video lectures for learning general relativity at the level of Hobson?

Question:
Before answering, please see our policy on
  resource recommendation questions. Please try to give substantial answers that detail the
  style, content, and prerequisites of the book or paper (or other resource). Explain what the
  resource is like as much as you can; that way the reader can decide which one is most suited
  for them rather than blindly relying on the suggestions of others. Answers which just suggest a book
  or paper may be deleted.
And please, note that any answers to this are community-owned, which means that they are subject to heavy editing, especially to make them comply with the book policy, to avoid deletion.
This question specifically asks for the level to be that of Hobson.

Are there any good video lectures for learning general relativity at the level of Hobson?
The internet has by L. Susskind, but it is a simple level. I found good one here http://www.youtube.com/watch?v=hcTNxJF_AjU&list=SPB11E80403FB98CFF
however, the acoustics is a little bit not so good.
Answer: Lectures by Ashoke Sen are very deep and insightful. https://www.youtube.com/watch?v=mBytE2daw3k
Comment: It would be nice if you could would shortly address *why* these lecture are deep/insightful/relevant to the topic at hand. Link-only answers are frowned upon.


Why didn't Annie kill Armin during the 57th Expedition Beyond the Walls?

Question: I watched the anime and couldn't find a explanation as to why Annie spared Armin's life?
Comment: It's reasonable that Annie would think of Armin as a friend, or at least as a harmless civilian, since she trained alongside him.  It's hard to say for sure.
Comment: That's true but its kind of hard to tell. Sometime Annie change for personality and act she doesn't care about no one.
Comment: Maybe she secretly had crash on him.
Answer: Why would she?
Annie, at least in her mind, is not a villain. She may be an antagonist to the main characters in the Anime, but she does not think of herself as a villain. She does not think of herself as evil.
She would not benefit in the least from killing Armin. The only members of the expedition she killed were the ones that threatened her titan form. She trained alongside them, and even had formed bonds of friendship with some of them. Even the explorer corps members were at a discomfort dealing with her, after learning what she did.
Her main goal was to get Eren and deliver him to her masters/employers (it is still unclear who charged her with the kidnapping in the manga - as of chapter 66).
So, her reasons for not killing Armin may be:

Armin was harmless. His vertical maneuvering skills were poor, and even if he were to attack her titan form, she would easily squat him.
She does not think of herself as a monster, or even that she is evil, so she has zero motivation for random killing.
More on her self-image, she is clearly a human that can change into titan (in contrast to Ymir who was a titan for 60 years before gaining the power of shifting). She has a good life with the MP Brigade. She is not a psychopath.
She may have some feelings of friendship or camaraderie towards Armin. Remember Armin has a very likeable personality. He gets along well with everyone.
Regarding her personality, Shingeki no Kyojin Wiki says:

Yet, she somehow does seem to hold a strange fascination and even feelings of respect towards people that have a deep sense of duty and righteousness

And it seems to me that Armin falls under that category.
Maybe killing Armin at that time would take more time than just confirming he is not Eren, and she is in a hurry to complete her goal.
Armin was not alone. Killing him (remember that people actually LIKE Armin) could usher the other explorer corps around into a battle-frenzy to avenge his companion (maybe not likely, but who knows).

Reasons for killing Armin at that moment? Can't think of any.
Comment: Also as i recall the tumble off his horse knocked his gear loose making him completely harmless
Comment: It is important to the story that we are conflicted about the shifters.  She commits the most heart wrenching killings in the anime 1st season without batting an eye but then also shows compassion for both Eren and Armin and looks like she really wanted to join survey corp.  Annie IS a monster but you are meant to realize that she must have a very good reason for doing (even thought you don't know it at first).  If she killed Armin no ambivalence.
Answer: She is not a ruthless killing machine. She has a goal in mind along with

 Berthold and Reiner, which is not yet fully revealed.

SPOILERS IF YOU HAVE NOT READ THE MANGA:

 Reiner was present with Armin. If she killed Armin she would have to kill Reiner as well because it would look extremely suspicious that Reiner got out of the fight alive while Armin died (since Reiner is physically superior and he would have to fight until the end if one of his companions is being attacked) BTW, Reiner is the Armored Titan.

Besides the above point: she does have compassion for her friends (as long as that does not conflict with her ultimate goal). When looking into Armin's scared face, she hesitated.
However, I do not think Annie spared his life because Armin was weak. She has killed a lot of other weak members. The only two reasons that I strongly believe she did not kill Armin are the above.
Answer: This topic seems to be deliberately not clarified by the manga writer and has been the subject of discussion on several forums for years. Based on that, the following is not an exact answer, but more like a theory about one of the reasons she didn't kill Armin other than friendship reasons and such.

I think it was related to her mission. As we know that several personnel had different information regarding Eren's position, and Annie and her teams already know that Armin is a smart and clever person based on their observations as well as his experiences on Battle of Trost, and might be able to help them locate Eren. Knowing Eren is not on the right wing as informed to Reiner, they improvise and ended up with Reiner indirectly making Armin to think about Eren's whereabouts


How can the orbit of a Kuiper Belt Object be differentiated from the transit of a rogue planet?

Question: Related to the question "Are any Pluto-sized objects remaining to be discovered in the Kuiper Belt?" and the fact that most of the Kuiper Belt objects have very elliptical orbits, the question begs, what observational techniques are used to confirm that the object being viewed is an orbiting Kuiper Belt Object, as opposed to the transit of a rogue or 'orphan' planet?
Answer: I'm not speaking from an informed position here, but two things come to mind.
First is that a rogue planet is likely to be traveling very fast, relative to our solar system. An object from within our solar system (a Kuiper/Oort object) is going to have an orbital velocity. Something that isn't a part of the system at all could be traveling much, much faster.
Secondly, if a rogue planet somehow slowly drifted into our system at almost no speed, and then got pulled into a sort of orbital speed by the sun, the direction of its orbit might give it away. For example, it's orbital inclination could be way off--even perpendicular to the normal orbital plane. It also might be orbiting in the wrong direction--that is--clockwise, instead of ante-clockwise.
That being said, there's no reason that some disturbed Kuiper belt object might not have an eccentric orbital inclination or even an anti-clockwise orbit. But the larger the object, the less likely this is, because it would need a larger and larger disturbance to throw it so out of whack.
Answer: No special techniques are required that I am aware of, but several observations must be taken to make a reasonable estimate of the orbit. Once a sufficient number of observations are made so that the orbital elements can be determined, then anything that has an elliptical orbit (eccentricity >0 but >1) can be assumed to be orbiting as part of the solar system and thus not a transiting rogue object.
An object with an eccentricity to its orbit greater than 1 is following a hyperbolic escape trajectory, and, unless substantially perturbed by the gravity of another planet, is on its way out of the solar system. I am not aware of any such objects that are thought to have originated from outside the system, but comets have been known to have been flung from the system along hyperbolic paths from the influence of Jupiter.


What network access do I need when I restoring files using RMAN?

Question: I am restoring files from one server to another server using Oracle RMAN, what network accesses do I need?(between these servers)
ftp? port 1521 should be open? or what?
I appreciate your answer thanks...
Answer: If you are using the 11g duplicate from active database option, the only port that needs to be open is the listener port (usually 1521). If you are using any other options to copy your files to the standby host, the required ports for the protocol that you use (scp/ftp/nfs ...)
Apart from the 11g 'from active database' option, RMAN does only read backupfiles that are present on the node on which the restore/clone is to be taking place. Present in this setting means that they thould be readable. The can be on [n]fs or tape, as long as your host can read them it is ok.
I hope this helps


What is Gravitational Lensing?

Question: What is the effect known as gravitational lensing? How does it work? What objects would be able to cause this effect?
Comment: Related: http://physics.stackexchange.com/questions/92050/do-gravitational-lenses-have-a-focus-point
Answer: Gravitational lensing is the effect that large amounts of gravity have on the path of light. Here's an example of the effect:

The animation shows a black hole passing in front of a galaxy (simulated). In theory any object with a surface mass density larger than the critical surface mass density would be able to produce similar such effects.
What's happening is that light goes in a straight line along the spacetime fabric. When a very massive object is in the fabric, it bends the fabric - since the light follows a straight line on the fabric, the line is also bent. This means that the light goes in a not-straight line, and thus a lensing effect.
Answer: Gravitational lensing is the bending of light by massive objects in between the observer (us), and a background source of light. It is a direct prediction of Einstein's theory of General Relativity, and was tested and confirmed by Sir Aurther Eddington during the famous Solar exlipse of May 29, 1919, where the apparent position of a star very close to the sun was observed at a different location - the exact position was successfully predicted by GR.

There are many situations which can give rise to gravitational lensing. These regimes are:
Strong Lensing
Strong lensing is the most visually stunning form of gravitational lensing, and as its name suggests, requires an extremely massive object, and a good deal of alignment between the lens and the source. Galaxy clusters are the most common cause of strong gravitational lensing. Partial arcs, full arcs (Einstein rings), and multiple images are all strong gravitational lensing features one can observe. Some of the most commonly studied objects producing strong gravitational lensing features are the Abell clusters, the most famous of which is Abell 1689 (image below).

Strong lensing features like arcs and rings are typically due to extended objects (like background galaxies which are not part of the cluster itself), and multiple-image (mostly quad-image systems) are typically objects like background quasars.
Weak Lensing
Weak gravitational lensing occurs much more frequently than strong lensing. Lenses can be clusters (in their outer regions), individual galaxies, or even large scale structure in the universe. Weak lensing is not a noticeable effect by eye, rather, it has to be done statistically. Ellipticities of a field of background galaxies are observed on a grid, and are statistically averaged together to create the weak lensing signal. Shape distortions of these background galaxies due to lensing are on the percent scale. One important assumption is made, however, and that is that galaxies' isophotes (lines of constant light) are elliptical, and their orientations are completely random. With that, any net tangential shearing produced is due to gravitational lensing. In the image below (from upper left to bottom right), the upper left frame shows an unlensed field of circular galaxies, and to its immediate right shows the effect of lensing. The image in the bottom right has added shape noise (a 'realistic' field of background galaxies), and to its right is how the field would lens.

Lastly, higher order shape distortion effects, most notably Flexion, can produce the extended galaxy sources to not only shear, but to flex. This is currently a tough thing to measure.
Microlensing
Microlensing is a regime of lensing which is most common on the scale of the Milky Way galaxy. This can occur when background stars pass behind foreground stars. Microlensing is actually strong enough to produce multiple images of the background star, but since the image separations are so small (micro-arcsecond scale - hence the name), what we observe (since an angular resolution of a micro-arcsecond is tough to achieve)  is a change in the flux as the object moves into and out of alignment with the intermediate massive object. Interestingly, microlensing has actually proven useful in detecting planets around stellar lensing systems.
Answer: According to this NASA tutorial, gravitational lensing is when the light emitted from a distant object will be bent by the gravitational field of a large object, such as a galaxy, that is in between us and the distant object.
A diagram summarising this effect is below:

Source: "Discovery of an Unusual Gravitational Lens" (Courbin et al.)
Answer: One star passes in front of another from our perspective. Instead of just blocking the light from the distant star, the light from the distant star that was previously directed to one side, the other side, above, below, - in fact all around the other star - is now bent by the influence of gravity from the nearby star on the photons. As a result, more photons end up heading our way than there were before.
What objects would cause this effect? A massive object passing in front of a star.

What is Gravitational Lensing?


car had no power whatsever, tightened battery terminal started, week later no power again tried terminals nothing happened.

Question: I seem to have a battery,or battery terminal or starter problem? For 3 days my car would have to be jumped, but when i turned it off it would have no power whatsever. I tightened the battery terminals then I had no problems for about 1 week and couple days then it has no power again whatsever. I unconnected the terminals then connected the car started then. I tried to start it the next morning no power again . I had the battery tested it when I jumped it it tested good same with alternator
Comment: what voltage is your battery at before you try to start?
How corroded are your battery posts as well as the cable terminal that connects to your battery?
Comment: And how about the other ends of the battery cables, where they connect to the starter motor and (usually) the engine block?
Comment: What if you disconnect it overnight does it work then?
Answer: Check the battery voltage at the posts the next time it seems "dead".
You may have a cracked lead plate link, which wiggling/tightening the terminals may temporarily help.  As the battery heats up, the lead expands slightly, closing the gap, and will probably test as "fine".
However, if it cools off or the crack separates due to mechanical vibration, the battery will once again appear totally dead.
The only solution for this scenario is to replace the battery.
I would first, however, do as David suggested in the comments.  Check the battery cables at BOTH ends to make certain you don't have a loose/corroded ground or B+ lead to the starter.  However, if you measure the battery voltage at the POST TIPS, and it is less than 10V, you have a failed battery.  If the battery voltage at the posts is 12.5 volts or more, then I would check the voltage from the other ends of the cables, specifically the large B+ cable ends against bare chassis metal.  If there is little or no voltage reading, suspect the cables and/or where they connect to the vehicle.
Answer: Don't just tighten the terminal cables, take them off (at both ends of each cable) and clean the contact surfaces; and check the ground contact. Simple things first.
Answer: check alternator fuse and the fuseable link usually found where the wire connects to the terminal at the fuse block.
Answer: Completely remove the terminals, clean them and the battery and reinstall.
Check your grounds, make sure they have good contact. Electrical grease helps with corrosion.
Take your car to autozone and have your battery and alternator tested. Not sure if you can remove it and take it in.
IF your alternator, battery and connections are good, something is draining your battery. Which will kill your battery and alternator over time.
I highly suggest having your battery and alternator tested, even if you figure out the problem.


What is the importance of the tallit during prayer?

Question: What is the difference whether one wears a tallit or not during תפילה (prayer/worship, sacred service)?
Comment: One practical difference in wearing a tallit gadol, especially over one's head, during prayer is that it blocks out noise and movement thereby allowing the person praying to concentrate better.
Comment: @Lee That has nothing to do with its being a talit though
Comment: eliyah, are you asking specifically about Shmone Esrei/prayer or even Kriat Shema?
Comment: @Double AA, I am refering to Shmone Esrei prayer but also Kriat Shema if applicable.
Answer: The wearing of a tallith messuyesseth during tefillah is very important. However, it does not prevent one from praying should the time for prayer arrive and he find himself without a tallith - whether gadhol or qatan.
The Rambam in the Mishneh Thorah (Hilkhoth Tefillah 4:1ff) lists five things which prevent one from praying, even if the time for prayer has arrived. The wearing of a tallith is not among them. Additionally, the Rambam (Hilkhoth Tefillah 5:1) lists eight things which one should be careful to fulfill during prayer, but do not prevent one from praying should they be left unfulfilled. Again, the wearing of a tallith is not among them.
In Hilkhoth Ssissith 3:12-13, the Rambam expresses the importance of the misswah of ssissith, and especially during prayer. He says:

uvsho`âth ha-tafilloh ssorikh le-hizoher bi-yôther, genoi godhôl hu le-thâlmidh hâkhomim shayyithpâllâl wa-hu eino oTuf.

Translation:

"And during prayer, one must be even more careful [to be wearing ssissith, i.e. more than at other times of the day], for it is a great disgrace for a talmidh hakhamim [a Torah scholar] to pray and not be wrapped [in a tallith messuyesseth].

So, while it is important for each Jewish man to both acquire and wear a four-cornered garment with ssissith, it does not prevent one from praying (or reciting Qiryath Shema`).
And, being that the Rambam mentions it especially regarding Torah scholars, it indicates that he feels that it is imperative for them to wear a tallith during prayer because of their connection to the Torah itself (cf. Hilkhoth De`oth 5:1ff) - although it still would not prevent them from fulfilling their obligation of prayer.
As for the commonly cited idea that not wearing ssissith during Qiryath Shema` causes one to be me'idh sheqer be-assmo ("to testify falsely concerning himself"), this is an idea that stems from the Zohar - it is mentioned nowhere in the corpus of Hazal (i.e. Talmudh Bavli, Talmudh Yerushalmi, Mishnah, Tosefta, Mekhiltoth, Sifra, Sifrei - cf. Rambam, Haqdamah le-Mishneh Thorah 24).
In the Arokh HaShulhan, Hilkhoth Ssissith Wa-'Attifatho 8:1, it discusses the apparent contradiction between the assertion of the Zohar and the halakhah in this matter. There he states that this statement of the Zohar is referring to someone who recites Qiryath Shema` while wearing a four-cornered garment which does not have ssissith tied onto it - dawqah. [See there for a full discussion of this subject]
As far as their prayer is concerned, there is no difference between one who wears a tallith messuyesseth and one who does not. However, the one who is able to wear ssissith during prayer and fails to do so has been lax in his commitment to wear them during their prayers. Of course, if one finds himself at the time of prayer but without a tallith messuyesseth that he can put on, he should certainly not delay his prayers or refrain from praying on account of such circumstance.
Hope that this helps. Kol tuv.
Answer: The meditation said before putting on the Tallit godol says,

ועל ידי מצות ציצית, תנצל נפשי רוחי ונשמתי ותפלתי מן החיצונים
and through the mitzva of tzitzis may my soul, spirit and prayer be protected
  from (harmful) external influences

So it seems that the tallit somehow protects the thoughts of the person praying.
O Ch 24 (1) says

that a person should wear tzitzis (tallis koton) all day and if he
  does not he should at least wear a tallis godol when he prays.

MB [3] says that

someone who says Shema without tzitzis is as if he testifies falsely
  for he says the parsha of  tzitzis and does not fulfil it.

He quotes the Chayei Adam  who says that

people on a journey who daven without a  tallis godol do not do well
  because the majority of the tallisos ketanim are not made according to
  the law in all its particulars.

So another reason to wear a  tallis godol is avoid  saying the parsha of  tzitzis and  not fulfilling it.


My hydraulic disk brake pads are rubbing too hard on the rotor after taking the wheel off

Question: so these are Shimano saint hydraulic disk brakes and i took the wheel off the other day to clean it, put it back on, and for some reason the pads are rubbing overly hard (without actually pulling the brake lever. So the front wheel wont spin too well, ive had another couple of rides with it, but is stil the same... the pads are rubbing too hard.
Comment: Nearly 100% of the time, this happens because someone squeezed the lever while the wheel was out. Reset the caliper and try again. You can use a broad clean screwdriver if you are careful, but the proper tool is better.
Comment: Does this answer your question? [How do I prevent the Hydraulic Disc Brakes on my bike from rubbing?](https://bicycles.stackexchange.com/questions/34441/how-do-i-prevent-the-hydraulic-disc-brakes-on-my-bike-from-rubbing)
Comment: Late addition, but I believe the proper tool is called a piston press.
Answer: The wheel might just be inserted slightly differently than it was before. That happens especially with quick release skewers. With thru axles the wheel insertion is more consistent.
Try to open the wheel, wiggle it a bit and close it again and see of the position changes. You might get it aligned well.
If it does not help, you may need to re-align your brake calipers.
Comment: okay thanks ill try it and see if that works!
Answer: First thing I would check is that your wheel is fully seated and centered in the fork's dropouts. If you've confirmed correct wheel alignment, move on to the brake caliper.  Shimano hydraulic brakes auto-compensate for pad and rotor wear by the pistons moving out from the caliper so they essentially obtain a new baseline start point as the pad and rotor wear.  This is nice but it has a few problems when the wheel, and thus the rotor, are removed from the bike.  If the brake lever is activated while the wheel is out and there is not a shim between the pads, the pistons can move too close together and the gap between them becomes too narrow and they'll rub the rotor. In extreme cases, the pistons can come clear out of the caliper body.
The fix is fairly easy, but care is required to not damage the pistons or the rubber diaphragm that creates the return force that brings the pistons back to their ready position. This is easiest to do with the wheel off and pads out of the caliper.  I'll sumerize a bit of the information here, but Park Tool's, Shimano Hydraulic Disc Brake Service is the go-to reference for this and other situations related to disc brakes.
First, with wheel off and pads out, take a thin flat tool such as a standard screwdriver or a tire lever and carefully use it to push the pistons back into the caliper body. A steady force directed evenly on the piston face for a few seconds should cause the piston to retract into the caliper body. I usually do one side at a time, but the broad enough tool can be placed between both pistons and twisted so that both edges of the tool come into contact with each piston and as the twisting force continues the tool will push the pistons into the caliper as it tries to make room to rotate. It's a similar motion to turning a key in a lock.  Wooden tongue depressors work well as do the sticks from a DQ Dilly bar, essentially a fat popcicle stick.  If the pistons refuse to return fully into the caliper body, or they tend to move back out after tool pressure is stopped, the system may be overfilled.  At the lever, with the reseivoir level to ground (usually requires the lever to be rotated up from it's down angle position on the bars), open up the bleed port cap with it's o-ring. Best to just remove it as the threading is very short and the o-ring can still be sealing the system even when loose.  Return to caliper and push the pistons back into caliper.  Excess oil will be forced out the bleed port.  Return the cap and it's o-ring to the port and tighten.  You've now reset the pistons and can return pads and springs to the caliper.  The spring has right and left sides, designated by an R and L engraved on each side of the spring's arch.  I cannot determine a difference in the spring's sides and brake pads that have the little handle with the hole which comes up from the center of the pad have no right-left designation and can be used on either side, however I'm always careful to have the spring oriented correctly when returning the assembly to the caliper.
Returning the wheel to the bike, again, fully engaged and centered in the dropouts, spin the wheel. There should not be any rotor rub what so ever at this point. If there is, that's an indication of significant misalignment somewhere.  Anything from incorrect wheel placement in the drop-outs, rim not centered with it's hub, improper rotor installation, warped rotor, etc.  If the wheel spins freely, note the position if rotor between the pads. Does it run centered or very close to it? Note the degree and direction of any offset from center.  Go ahead an pull the brake lever. The first pull or two will be a longer pull and may feel soft. Subsequent lever activation will firm up and not as much distance to the bite point will be noted. Release the lever, spin the wheel and check for pad rub on the rotor.
If the pads still rub on the rotor for most or all of the rotation, this indicates the need to center the caliper to the rotor (given nominal wheel and rotor installation).  This, too, is easily performed by loosening the caliper's fixing bolts so that the caliper has free side to side play (if an adapter is being used, be sure not to loosen it's fixing bolts going to the bike or fork frame as opposed to the caliper fixing bolts that are received into the adapter). Next, with the caliper loose, I like to spin the wheel and then pull the brake lever fully and hold it closed.  If you're alone you can wrap something around the lever and handlebar to secure the lever in the closed position.  While the brake pads are engaged on the rotor, tighten up the caliper fixing bolts.  I go back and forth between the bolts snugging one up then the other, back to the first for maybe a ¾ to a full turn, then the other, essentially torquing them up together.  I've noticed that keeping the Allen key very straight and putting the torque on it in such a way as to minimize any lateral forces imbued to the bolt and thus the caliper mounting aspects, the results are more satisfactory.  After the bolts are tight, release the lever, spin the wheel and see about rub.  Over 75% of the time, if no other anomalies are present, this fixes pad rub.
Sometimes the above fails.  If the rub is intermittent, you may have a rotor out of true in a spot and that will need to be corrected.  This is discussed in the linked Park Tool tutorial, and based on your described symptoms appearing after having the wheel off, it's not the most likely culprit.
Comment: okay ill try it, don't have a wedge for the callipers as i bought second hand just over a month ago
Comment: A folded playing card or similar works. Excessive moving  of the bike or putting it in windy conditions like a vehicle carrier would require securing the playing card wedge a little better, but it essentially stays in place very well.
Comment: Am I the only one who never seems to have any luck with the "squeeze the lever to align the caliper" method? On every build or repair that I've tried it, I still had to go back and align the caliper by sight every time that I can recall.
Comment: @Pisco the "squeeze to align" sometimes needs a temporary thin shim around the rotor, between the pads.  A piece of paper or a folded business card can be ideal.
Comment: @Pisco The squeeze to center is a bit of an imperfect technique but does work more often than not for me. You can fine tune the caliper centering method by loosening one bolt at a time and squeeze to center or move that end of the caliper by hand.  Also when tightening the bolts, go back and forth between fixing bolts so they more or less get torqued down together.


What did the Prophet do for a living before receiving Prophethood?

Question: What did Prophet Muhammad do for a living before he became a prophet? Please tell me what he did to gain money or to help out.
Answer: Well not only the seerah books but also the hadith compilations quote two major occupations:

shepherding:

Narrated Abu Huraira:
  The Prophet (ﷺ) said, "Allah did not send any prophet but shepherded sheep." His companions asked him, "Did you do the same?" The Prophet (ﷺ) replied, "Yes, I used to shepherd the sheep of the people of Mecca for some Qirats." (Sahih al-Bukhari)

(which apparently is not approved by shi'a according wikipedia)
In the age of 12 he accompanied his uncle for trading to Syria (a-Shaam):

When the Messenger of Allâh (Peace be upon him) was twelve years old, he went with his uncle Abu
  Talib on a business journey to Syria. When they reached Busra (which was a part of Syria, in the
  vicinity of Howran under the Roman domain) they met a monk called Bahira (his real name was
  Georges), who showed great kindness, and entertained them lavishly. He had never been in the habit
  of receiving or entertaining them before. He readily enough recognized the Prophet (Peace be upon
  him) and said while taking his hand: "This is the master of all humans. Allâh will send him with a
  Message which will be a mercy to all beings." Abu Talib asked: "How do you know that?" He replied:
  "When you appeared from the direction of 'Aqabah, all stones and trees prostrated themselves, which
  they never do except for a Prophet. I can recognize him also by the seal of Prophethood which is below
  his shoulder, like an apple. We have got to learn this from our books." He also asked Abu Talib to send
  the boy back to Makkah and not to take him to Syria for fear of the Jews. Abu Talib obeyed and sent
  him back to Makkah with some of his men servants.  (Ar-Raheeq al-Makhtum, Chapter on Bahira, the Monk, see for example online page 34 here)

Read also in "The life of Muhammad" or "Sīrat Rasūl Allāh" by Ibn Ishaaq from this Meta post page 79 "the story of Bahira"!
He also was known as the trustwhorty (al-Ameen الأمين), so many people trusted him their goods.
And he toke part in harb al-Fijar (or Sacrilegious Wars) a war between Kinanah (Quraish is part of this tribe) and Qais 'Ailaan as stated by ibn Sa'ad in his tabqaat. But he didn't raise arms against the opponents according al-Mubarkpuri in his ar-raheeq al-Makhtum:

His efforts were confined to picking up the arrows of the enemy as they
  fell, and handing them over to his uncles. (Same source as before on the same page)

trading:

Narrated Ibn 'Umar (ra) :
  We were accompanying the Prophet (ﷺ) on a journey and I was riding an unmanageable camel belonging to 'Umar (ra), and I could not bring it under my control. So, it used to go ahead of the party and 'Umar would check it and force it to retreat, and again it went ahead and again 'Umar forced it to retreat. The Prophet (ﷺ) asked 'Umar to sell that camel to him. 'Umar replied, "It is for you O Allah's Messenger !" Allah's Messenger (ﷺ) told 'Umar to sell that camel to him (not to give it as gift). So, 'Umar sold it to Allah's Messenger (ﷺ). Then the Prophet (ﷺ) said to 'Abdullah bin 'Umar "This camel is for you O 'Abdullah (as a present) and you could do with it whatever you like." (Sahih al-Bukhari)

This is one out of many ahadith showing that the Prophet () even kept trading (either) by himself (or via intermediate or by hiring) after the first revelation.
Al-Mubrakpuri says in his ar-Raheeq al-Makhtum speaking about  Muhammad's Early Job:

Muhammad (Peace be upon him), had no particular job at his early youth, but it was reported that he worked as a shepherd for Bani Sa'd and in Makkah. At the age of 25, he went to Syria as a merchant for Khadijah (May Allah be pleased with her) Ibn Ishaq reported that Khadijah, daughter of Khwailid was a business-woman of great honour and fortune. She used to employ men to do her business for a certain percentage of the profits. Quraish people were mostly tradespeople, so when Khadijah was informed of Muhammad (Peace be upon him), his truthful words, great honesty and kind manners, she sent for him. She offered him money to go to Syria and do her business, and she would give him a higher rate than the others. She would also send her hireling, Maisarah, with him. He agreed and went with her servant to Syria for trade. (same online source page 35)

This clearly says that Muhammad was hired to carry merchandise for Khadija. read Also in the above mentioned biography of the Prophet by ibn Ishaaq the pages 82 ff.
See also these relevant fatwas on islamqa #134621 and #34550
Answer: <code>             In the name of Allah, the most compassionate, the most merciful
</code>
Based on my research, Prophet Muhammad (S) passed the period of his teenage time in his uncle's house (Abu-Talib), and was active in commercial affairs as well as helping his uncle. It is remarked that the Prophet has been commercial partner associated with Saaeb ibn Abi-Saaeb, and were commercial affairs to each other.
On the other hand, based on what I figured out in regards to the occupation of shepherd, seemingly, Sunnis agree that the/a job of Prophet Muhammad was shepherd, but apparently Shia Islam doesn't believe so, albeit there appear to be hadiths which point out that shepherd was regarded as a/the job of the Prophet, but Shias have discussion about the authenticity of such narrations … Meanwhile, there doesn't appear to be an explicit verse in the Quran to mention it, too.
As a related helpful context:

The Prophet's grandfather, 'Abdu 'l-Muttalib, was the chief of Banu
  Hashim and also the guardian of the Ka'bah. His father was called
  'Abdullah and his mother, Aminah bint Wahab. His father passed away a
  few months before his birth. At the age of six, the Prophet lost his
  mother as well and was placed under the care of his paternal
  grandfather, 'Abdul Muttalib. But his grandfather also passed away
  after four years; and at this time the Prophet's uncle, Abu Tālib,
  took charge of him and became his guardian, taking him to his own
  house. Thus the Prophet grew up in his uncle's house and even before
  reaching the age of adolescence used to accompany his uncle on
  business journeys by caravan.
The Prophet had not received any schooling; yet, after reaching the
  age of maturity he became famous for his wisdom, courtesy,
  trust-worthiness and truthfulness. He soon became famous as "as-sādiq
  al-amīn" (the truthful, the trustworthy). Abu Tālib used to say: "We
  have never heard any lies from Muhammad, nor seen him misconduct
  himself or make mischief. He never laughs unduly nor talks untimely."
As a result of his sagacity and trustworthiness, Khadija bint
  Khuwaylid, a Qurayshi lady wellknown for her wealth, appointed him as
  the custodian of her possessions and left in his hands the task of
  conducting her commercial affairs. The Prophet once journeyed to
  Damascus with Khadija's merchandise and as a result of the ability he
  displayed was able to make an outstanding profit. Before long she
  asked to become his wife and the Prophet accepted her proposal. After
  the marriage, which occurred when he was twentyfive years old, the
  Prophet began the life of a manager of his wife's fortunes, until the
  age of forty, gaining meanwhile a widespread reputation for wisdom and
  trustworthiness.

Source and further information:

www.al-islam.org/prophethood-and-prophet-islam
and this /  that
www.al-islam.org/life-muhammad-prophet and this
www.hawzah.net and wikifeqh.ir
Answer: You can easily find out in the various books written on the life of Prophet Muhammad (PBUH). In his boyhood he used to herd sheep and goats. And in his young age he went in business travels with his uncle Abu Talib. And after that he also traveled by his own in different business Caravans, selling clothes and different goods in different markets.
I will try to find some references and add them to my answer later.


Why is this Activity Search failing?

Question: Activity Search is failing every time for this install (Search/Find Activities) no matter what search parameters are used. The problem is the following SQL error:

SELECT count( DISTINCT ( civicrm_activity.id ) ) as rowCount  FROM civicrm_contact contact_a   LEFT JOIN civicrm_activity_contact
ON ( civicrm_activity_contact.contact_id = contact_a.id )  LEFT JOIN civicrm_activity
ON ( civicrm_activity.id = civicrm_activity_contact.activity_id
AND civicrm_activity.is_deleted = 0 AND civicrm_activity.is_current_revision = 1 ) INNER JOIN civicrm_contact
ON ( civicrm_activity_contact.contact_id = civicrm_contact.id and civicrm_contact.is_deleted != 1 )  LEFT JOIN civicrm_activity_contact source_activity
ON (source_activity.activity_id = civicrm_activity_contact.activity_id
AND source_activity.record_type_id = 2)
LEFT JOIN civicrm_contact source_contact ON (source_activity.contact_id = source_contact.id)  WHERE  ( civicrm_activity.activity_type_id IN ("110") AND civicrm_activity.status_id IN ("1", "2") AND civicrm_activity.is_test = 0 )  AND  (  ( civicrm_activity.activity_type_id IN (110,135,136,120,1,2,3,116,4,9,12,5,6,19,22,34,40,44,37,38,39,45,41,42,43,52,49,50,46,47,48,51,64,114,115,68,73,74,75,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,99,100,101,102,103,104,105,106,107,108,109,111,113,117,118,119,121,122,123,124,125,126,127,128,130,131,133,134,137,138,139,140,141,142,143) )  )  AND (contact_a.is_deleted = 0) AND (civicrm_activity.activity_type_id Array)

the error message is 'check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Array)' at line 8]'

As you can see this install has a lot of activity types - could this be the reason? The last 'AND' statement seems to be the problem.  This is on 5.28.3 and activity search is working fine on other 5.28.3 systems. Also there seems to be no limit on the number of items in the 'IN' clause in MySQL.
Comment: Do you have some ACL or extension that restricts by types? It's not the amount - what's happening is there's supposed to be a string but it's getting a php array, so it's a coding error somewhere.
Comment: Yes indeed (my, that was a fast response!). We have the Activity ACL extension installed (ACL for Activity Types).  I didn't think it looked like that was relevant...wrong?
Comment: See https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl/pull/14
Comment: Many thanks, I'll test and will confirm if that's the answer. I looked at that site but it wasn't in the list of issues
Answer: I think this is the same problem as https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl/pull/14
Comment: Thanks for this - 47 minutes from reporting the problem and the fix is now installed!
Comment: Great! Glad it's working.

Why is this Activity Search failing?


Site on 2 hosts

Question: is there a way yo add 2 hosts per domain so if i host dies it automatically switches to the other one?
or if its slow you can easily switch to the second host?
Thanks!
Comment: It's called load balancing.
Answer: Yes there are ways to do this but it's a fairly big topic with several different approaches.
The cheapest and simplest way to do this is with DNS. A DNS server gives the ip address of your domain when queried, you have some monitoring that detects when one of your hosts is down and tells the name server to stop giving out the ip of the broken server. normally DNS results are cached often for a day, so you need to the name server to say the record is only valid for a short time, however some isp's will ignore this and cache the record anyway. DNS was no really designed for this and it's not considered a good solution for large sites.
If your site relies on a database you need to make sure this is kept up to date on both servers or kept on a separate server. You can do master/slave database replication if the database is busy and important.
The other switching solutions are much more expensive. You can have two load balancers which distributes to several web servers, a heartbeat system monitors load balancers and the spare takes over the ip should the first fail. You can use BGP to change network routes if a server fails. You can have one ip address in several locations called multihoming.
As I said a big topic but for a small site DNS fail over is best. There are companies offering this as a service but if you have the TTL of your DNS records set low, say one hour then you may be able to change manually, this will be good enough in a lot of cases.

Site on 2 hosts