How often should one service headset bearings?

Question: How often should one disassemble one's headset and service the bearings, assuming it's a fairly new road bicycle with sealed cartridge bearings and is ridden every day?
Comment: Every 30 years, whether they need it or not.
Comment: It should be noted headset bearings -- at least the old "threaded" style -- can come completely apart (all the balls fall out) without severely impairing the handling of the bike (though certainly this condition would drive a "bike nut" crazy).  I've seen many bikes -- still being ridden -- with severely loose headsets.  (Dunno what would happen with "threadless" units in a similar situation, though.)
Answer: Probably never -- headsets can easily last the life of a bicycle for most people without needing an overhaul.
If you ride in the wet, it is advisable to have a front fender, though (to reduce the likelihood of needing an overhaul even further).
Comment: You really don't need to worry about this, but I would not say never. If you open a 5 or 6 year old bike you sometimes see some principles of rust or a lack of grease. If you bike year-long on the rain for example, it doesn't hurt to do it every year or two. Water always finds a way, and this is also true for bottom bracket and hubs if they don't have sealed bearings. Hubs can be a pain to disassemble and assemble, but BB and headset are pretty easy. @Warren is wrong, you do need a special tool to replace the headset, but to service the bearings one or two allen keys and 20 minutes is enough.
Answer: I'm an almost daily all-season rider for a dozen years. Press fit headset bearings are subject to wear and corrosion. If you ride and/or wash your bike regularly you will feel a slight stiffening over time (handlebars don't move as readily when walking the bike with hand on the seat). This steering symptom gradually increases to feel like you would expect from compromised bearings. Like most things that are press fit, screwed or slipped into a bike frame if they don't get busted loose every few years they will become corroded in place resulting in fits at the bike shop. And while you're at it you may as well replace them.
Answer:
How often should one disassemble one's headset and service the bearings, assuming it's a fairly new road bicycle with sealed cartridge bearings and is ridden every day?

Depends on the type of the headset.
If the headset is of the type that the balls roll directly against the headset cups, it is likely to produce an "indexed steering" failure -- an annoying but not-so-dangerous failure mode that makes the steering stick to some angles. It is not dangerous because a moderate amount of steering force overcomes the sticking.
If this "indexed steering" failure occurs, the proper service is to upgrade to a headset that has cartridge bearings that have a conical or spherical interface. In this type of headsets, the bearing is a unit that is supported by the conical or spherical interface that takes motions that would otherwise damage the bearings. Unfortunately, this "service" requires removing the headset cups so you need specialist tools you might need only once in your lifetime. Best bet is to visit a bike shop that already has those tools.
Most headsets sold today are of the cartridge bearing type and have a conical support for the bearings.
If you already have the newer type of headset, the only service it absolutely needs is to put in new bearings when the headset develops any kind of issue. It is probably not worth it to attempt to repair a cartridge bearing as they are so cheap anyway.
If you ride a lot in the rain and are a service perfectionist, of course it won't hurt to annually take away the fork and ensure the conical interface between the cartridge bearing and the headset cup has ample grease. The interface that prevents the "indexed steering" failure mode works only as long as it remains greased.
Answer: Well, that is a tricky question as it depends on the conditions you have ridden in and how far... although I think conditions may be more important. I have decided to aim for around three monthly service interval since this is also when I replace tyre sealant
Comment: Depending on the quality of the seals, I would agree with @Swifty that 3 months seems very frequent. That service interval would probably cause me to give up and get a Chris King headset - in fact, I have one, and it did go 10 years without servicing. I think many other modern headsets with good seals have comparable, or at least still long, service intervals.
Comment: Nice idea linking it to another service interval. I would describe 3 months as 'frequent' but in all weathers there's lots of opportunity for dirt to reach the seals, so I think/agree that cleaning them off regularly _is_ the maintenance sealed units require. How might you adjust it depending on conditions? Summer vs winter?
Answer: Until recently I would have agreed with many of the previous contributors that Headset bearings are very low maintenance. However, I have encountered a couple of instances recently where sealed bearing were seriously compromised by corrosion due to water ingress... The first was on my (less than 6 month old) Mavic UST rear wheel/hub and the other on the bottom bearing in a Condor Headset that seems to have seized completely in a matter of days after being ridden with no evidence of stiffness or binding.
Comment: Hi, welcome to bicycles!  So what maintenance schedule would you recommend then?  Or how to determine when preventative maintenance is required?
Answer: Per Sheldon Brown, if the front wheel has a fender, hardly ever. Regardless, it's probably a good idea to at least check the headset during regular inspections/overhauls. Depending upon your ride style, that's generally recommended every year/3,000 miles (5,000 km). Of course, that can be dependent upon the type of riding you do and the conditions you ride in. Heavy rain/mud usage will necessitate more frequent maintenance.
As far as sealed vs. serviceable bearings—more depends upon the quality of your components. Well-made of both types will have seals to help keep out contaminants. This is true for both sealed and non-sealed types. If the headset is of the older type without seals, I would highly recommend replacing it with a newer version that does have seals—that comes from experience from contaminant intrusion. For serviceable bearings, I generally clean and re-grease them during major service intervals.
Also—keep in mind that sealed bearings may make servicing easier, but aren't perfect. If water/contaminants get past their seals, there will be a high likelihood for damage, just as with the serviceable type.


Move to secondary?

Question: I put my wort in the primary 9 days ago and dry hopped with 1 ounce of Cascade pellets and used a Wyeast 1272 American direct pitch activator pack. I have not taken any readings but noticed it was still bubbling at about 1 per minute. This is much longer than in the past. My question is can I dry hop and add to a secondary or should I wait a little longer.
Comment: Not your question, but in my experience Activators are only direct pitch into wort of a 1.040 OG or less.  If you underpitched, that could be a reason why you're still seeing bubbles.
Comment: Getting off topic, but care to elaborate why only 1.040, Denny? Wyeast says: "The Activator™ is designed to directly inoculate 5 gallons of standard strength ale wort (1.034-1.060 SG)" http://www.wyeastlab.com/hb_productdetail.cfm?ProductID=16
Comment: Steve, has the temperature of the carboy remained the same? I ask because as a liquid's temp rises, the amount of C02 it can hold in suspension drops. So if you take a beer fermented completely dry at 60F, and raise it to 70F, you will see bubbles in the airlock. But these bubbles are NOT a sign of new fermentation, just of C02 being released from the liquid.
Comment: GJ, it's based on my own and many others experience.  I have not had good results pitching directly into higher than 1.040.  Wyeast is trying to make it easy.  Also, unless the pack is very fresh, the viability is low and there are not an optimal number of cells there.  They say the same thing about "my" yeast that they sell, but I would never do what they recommend.
Answer: Airlock bubbles don't really tell you anything about the state of fermentation.  They only indicate CO2 is being released and that can come from a number of reasons.  A gravity reading is really the only way to know what's going on.  That said, 9 days is a pretty short time for primary.  I usually wait at least 2-3 weeks before I even check on the gravity.  There's no harm to letting the beer go longer and at the very least the yeast will have more time to finish and clean up after itself.  And if you want to, you can skip the secondary entirely.  I seldom do one.
Comment: I've upvoted. This advice cannot be repeated enough, especially to newer brewers.
Comment: Absolutely Husker Steve. No problem at all. Most folks will say that anything under 3-4 months on the original yeast cake is fine, and I've gone longer without any problems.
Comment: So if I decide to keep it in the primary, can I open it up and dry hop and then keep it in the primary anothe 10 to 15 days?
Comment: 3-4 months? I'm guessing a typo and you mean weeks! I've had spoiled beer after 4 weeks in primary. A split batch, one half in secondary after 2 weeks, the other just primary, both kegged after 4 weeks. The secondary beer was fine, but the primary was undrinkable, like rubber flesh with a rotten yeast dressing.
Answer: How long to leave in primary is a controversial topic, but the current thinking is to err on the side of leaving it in longer. The rule of thumb I use for my brews is four weeks minimum in primary. Some of my higher gravity brews I will leave in for 8 weeks. I only use secondaries for things that require very extended aging, like barleywines.
For something like an IPA that is consumed more fresh, I probably would leave it in primary for no less than two weeks, then secondary for dry-hopping. Your milage may vary, of course.
Answer: In general if you have a good pitch rate and and good aeration, primary fermentation can finish up relatively quick (4-10 days).  As stated above, leaving it in the primary fermenter for a bit will help to start cleaning up the beer.
As Denny commented, it is possible it is still bubbling due to under-pitching, or maybe not getting a good level of oxygen into the wort before pitching.
The question is then if you should put it into secondary or not. Some sources I have seen even say that it may not be worth the extra risk of contamination moving it to secondary, and you can even leave it sit in the primary for an extra week or two to let the yeast settle out, then just package it. It all depends on what you are doing, but I do agree, if you can get away with leaving it in the primary for a bit, why risk the contamination by racking it over?
Just a few things to think about.

Move to secondary?


Book where there was only one race

Question: I remember reading a story once where we had all interbred such that there were no longer any blacks, whites, Asians, etc.  We were all 'brown'.  Somehow they 'found' 5 children that were purebred 'races', and I don't remember much else.
Comment: Did the book specifically run in that direction of plot? Because I know of one where a boy realizes late in the narrative that he is one of the purebred, being kept for breeding. It had an early scene where he scratches his friends arm and realizes it's brown beneath the fake skin.
Comment: That does sound familiar now that you mention it - like the kids were being brought up in the Truman Show where 'brown people' had their skin colored so the 'purebreds' didn't feel like outcasts.
Answer: I believe that this may be Piers Anthony's Race Against Time as per my answer here.
I'll just quote the text of it:

It involves a 20th century white boy accidentally scratching off the skin of his friend, showing that it's all brown underneath, and that there's some vast conspiracy that everyone but him is involved in. I want to say that his friend still helps him, but the majority of it is him corresponding with a penpal through coded letters (they do something like having the message be in every third letter) to escape and find more people like him.
Of course, the reveal isn't that the people around him aren't human, but that

[Spoiler ahead]

 The human race has become a homogenous brown due to the mixing of races here in the 24th century, and the protagonist, his pen pal, and a few others are genetic throwbacks to earlier races being preserved in a zoolike "natural environment".
Comment: I think that's it.  I got into him after reading his "Incarnations of Immortality" series so I probably was sampling others he had written.  Thanks!

Book where there was only one race


Do I have to keep relation with my rude & cruel atheist brother?

Question: My elder brother is an atheist and so much rude & cruel to us that sometimes he even beats my parents specially my mother is the victim! You can't imagine what he has done to my family. I don't want to mention these scenarios , just assume that a 25 years old strong healthy sound minded person (atheist) who have no fear of Allah and several times he had thrown away the Quran, tore it off and disgraced it! What else can he do to us?
When I close my eyes and think about him I see nothing but extremely bad memories!  we're the victim of his oppression since 2011-12! So my question is short & simple:
Is he still considered as my family member?  Do I have to keep the relation with him?
Comment: This question is mainly addressed in [Is it wrong to sever ties of kinship in the case of an abusive relative?](https://islam.stackexchange.com/questions/33229/is-it-wrong-to-sever-ties-of-kinship-in-the-case-of-an-abusive-relative/33300#33300)
Comment: medi1saif and UmH may Allah bless you in every affairs of yours and your loved ones in this life and in the hereafter. Keep me & my parents in your prayers!
Comment: As Salaamu 3laykum, please see my answer below regardless of the votes.
Answer: Bismillah Hir Rahmaan Nir Raheem
As Salaamu 3laykum,
I hope you are doing well. We have to first recall that we were created to worship ALLAH (Glory Be To Him).

And I did not create the jinn and mankind except to worship Me. (Quraan, chapter 51 verse 56)

So this whole world is an amusement and a playground. Think of it a temporary layover when travelling from one place to another.

And this worldly life is not but diversion and amusement. And indeed, the home of the Hereafter - that is the [eternal] life, if only they knew. (Quraan, chapter 29 verse 64)

In this travel of life you will encounter all types of people. We should stay away from labeling anyone good or bad. Let ALLAH (Glory Be To Him) decide that. When it comes to your older brother , he is still your brother. You should still respect him and show kindness towards him. Never sever the ties of relationship with your family.

the Prophet (peace be upon him) said: "Merely maintaining the ties of kinship is not adequate. But connecting the ties of kinship is when his ties to the womb are severed and he connects it." (Tirmidhi)

We also see during the Prophet (peace be upon him) time he was treated badly however he turned back to them with kindness.

Ibn Sa'd, the early biographer and historian, narrated in his work on history, al-Tabaqat, through 'Aisha may Allah be pleased with her) that the Prophet (peace be upon him) was reported to have said, "I was [living, in Mecca] between the two worst neighbors [one could have]: between Abu Lahab [his uncle and sworn enemy] and 'Uqbah ibn Abi M'uayt [who once threw a sheep's insides on his blessed head, peace be upon him, while he was praying].  Indeed, they would come with bloodied intestines and throw it on my doorstep…"  [al-Tabaqa, Ibn Sa'd, as quoted in Suyuti's Jami' al Kabir]

&

Aisha reported: She asked the Prophet (peace be upon him), "Have you encountered a day harder than the battle of Uhud?" The Prophet, peace and blessings be upon him, said, "Your tribes have troubled very much, and the worst was the day of Aqaba when I presented myself to Ibn Abd Yalail ibn Abd Kulal and he did not respond to what I intended. I departed, overwhelmed with excessive sorrow, and I could not relax until I found myself at a tree where I lifted my head towards the sky to see a cloud shading me. I looked up and saw Gabriel in it. He called me saying: ALLAH has heard your people's saying to you and how they have replied, and ALLAH has sent the Angel of the Mountains to you that you may order him to do whatever you wish to these people. The Angel of the Mountains greeted me and he said: O Muhammad (peace be upon him), order what you wish, and if you like, I will let the mountains fall on them." The Prophet (peace be upon him) said, "No, rather I hope that ALLAH will bring from their descendants people who will worship ALLAH alone without associating partners with him." (Source: Ṣaḥīḥ al-Bukhārī 3231, Ṣaḥīḥ Muslim 1759)

Furthermore, if you were to sever the ties of kinship then I will give this warning:

the Messenger of ALLAH said: "The one who severs ties will not enter Paradise." Ibn Abi 'Umar said: "Sufyan said: 'Meaning: Ties of the womb." (Tirmidhi)

What Can You Do?

Take him out for lunch or do any activity that show that you care for him

Talk about anything other than Islam, just be his brother, and when you feel you can talk to him then share some things about Islam little by little

Try to gain a relationship of trust with him by sharing your feelings regarding his attitude and mannerisms, etc.

See if he is a open to seeing a psychologist to talk about his anger and issues

Recite the last two verse of Surah Baqarah (Quraan Chapter 2) every night

The Prophet, peace and blessings be upon him, said, "Verily, ALLAH issued a decree before He created the heavens and the earth by a thousand years. He sent down two verse for the end of Surat al-Baqarah. They are not recited in a house but that Satan will not come near it." (Tirmidhi)

Inshaa ALLAH I hope things become better. We should all make dua for ourselves and for all human beings and jinns that they believe in ALLAH (Glory Be To Him) and His last messenger (peace be upon him).

Have a nice day!
Comment: The core part of this answer is wrong. Keeping ties of kinship is not required towards disbelieving relatives who are hostile to Islam. This is evident from [9:23](https://quran.com/9/23?translations=20), [58:22](https://quran.com/58/22?translations=20), [60:4](https://quran.com/60/4?translations=20) etc. You mention Uqbah ibn Abi M'uayt as an example of kindness (even though it is not relevant to ties of kinship) but you seem to have missed out that he was actually captured in the battle of Badr and was beheaded on the command of the Prophet.
Comment: As Salaamu 3laykum @UmH , I hope you are doing well. None of the verses you have mentioned say to sever the ties of kinship. Allies / loyalty is different then severing ties of kinship. Allies mean you have taken an alliance or side with that person's faith. Which of course no Muslim sacrifices his faith.  Regarding Uqbah is that you never see the Prophet give up teaching him Islam until he went too far and threatened Islam. Same with Prophet Nuh even up to end of moments of his sons life he is asking ALLAH to help him (https://quran.com/11:45?font=v1&translations=131%2C20).


Please help me ID this bonsai?

Question: I recently acquired this plant from a friend. I just need help identifying what type of bonsai/ plant this is.
Comment: Why don't you ask your friend?
Comment: She doesn't know it either.
Comment: How long ago did your friend give this plant to you?
Comment: is it a bonsai?
Comment: It is a bonsai but needs some pruning and all that work. Mr. b.nota was kind enough in identifying the plant for me. it's a Buddhist Pine apparently and I'm kinda excited to work on it come spring time.
Answer: I think it is Podocarpus macrophyllus, or Buhddist pine. This species is very suitable for bonsai. Try to keep your tree small, yours has large leafs now, but you would like to keep them small (by pruning and shaping it). ideally you would like to shape it into something like this.
Does your tree get enough light? It is placed next to the window, right?
Comment: I think that might be it! Thank you, @b.nota! Appreciate it. All the while I thought it was of a bamboo-sort-of family. XD And, my tree is nothing like what you linked me. haha! I better start working on this one. Although, it's winter here in Canada, I might just let it do it's thing and work on it in Spring. I'm afraid I might kill it if I do the pruning this time of the month. Yes it's by the window and all my plants are in the basement. It's not direct sunlight but a very well lit basement during the day. Does it have to be in direct sunlight?
Comment: Yeah you can better wait for early spring before pruning the bonsai. In the mean time try to read about how to do this on the web, it can take years before you get a real tree-like shape into it. I think it will benefit from sunlight, especially when indoors, but now during winter it is not trivial (they need it to grow in spring and summer). Good luck with, I had a podocarpus bonsai indoor once, but it died, so take good care of it!
Comment: Thanks again! Yeah, come spring time, I'll work on them. I like gardening and all but it was not a serious hobby. I've always wanted to have something to do with bonsai but never really got into it. I had 2 Ginseng bonsai trees last year but they died too. It was my fault, I left my bedroom window open in my old apartment while I was gone for about a week and that was mid-November with below 0 (-C) temp. XD Well, lesson learned. I'm sure I'll enjoy this new hobby of mine and I'll definitely welcome all your expertise. Thanks again, Buddy! :D

Please help me ID this bonsai?


Why can anthracene, but not phenanthrene, take part in Diels–Alder reactions?

Question: Both anthracene and phenanthrene seem to be structurally similar, with three aromatic rings. The middle rings in particular seem to be similarly activated towards cycloadditions.
Comment: I wouldn't be entirely surprised if phenanthrene could undergo D-A reaction, but as the dienophile instead of the diene.
Answer: Have a look at the reaction mechanism of the Diels-Alder Reaction, e.g. at Wikipedia.
We have talked about this reaction before on this site, and concluded that a sufficient explanation is only possible with the help of molecular orbitals: How accurate is this polar mechanism for the Diels-Alder reaction?
Borrowing from Wikipedia,[1] here is the most important part of the mechanism, the HOMO of the diene and the dienophile:

Now the most important part of this picture is the symmetry of the HOMO/LUMO of the diene, since this is the subject of your question. We need either a HOMO or a LUMO of these symmetries and then could match a suitable dienophile.
In anthracene we find the appropriate symmetry of the HOMO:

The reason for the regioselectivity has also been discussed before on this site: Diels Alder with Anthracene and Maleic anhydride.
We could also tune our reaction to be of inverse demand, as the LUMO has also appropriate symmetry:

In phenanthracene we do not have the appropriate orbital symmetry in the HOMO:

The LUMO is also not suitable for an inverse Diels-Alder reaction.

Reference and Notes

"FMO of Diels-Alder reaction" by Chrito23 - Own work. Licensed under CC BY-SA 3.0 via Commons.
Calculations on the DF-BP86/def2-SVP level of theory employing Gaussian09 rev. D. Contour values for the orbitals are at 0.05 e/rBohr. Occupied orbitals are depicted in blue and orange and unoccupied orbitals are depicted in yellow and red. Phases are chosen at random.
Answer: HOMOs and LUMOs don't explain everything.   Polyaromatic hydrocarbons also have their reactivities explained by Clar's aromatic sextet rule.   There is an excellent reference here from the Journal of the American Chemical Society that explains both the rule and reactivities of polyaromatics (http://pubs.acs.org/doi/abs/10.1021/ja00529a046).  In short, not all rings in an polyaromatic have equal aromatic character.   Clar's rule explains how to determine this for a given polyhex, which is a good idea since there are 22 possible structures for five ring polyaromatics and doing the HOMO/LUMO calculations can be tedious.  BTW, there are 82 possible six ring polyaromatics, and the numbers keep going up fast beyond that.


Where are the references of Vesak in the Pali canon?

Question: It is traditionally believed that the Buddha was born, enlightened and passed away on the date(tithi) of Vesak. Now it does not seem to be very probable that all three major incidents of one's life would occur on the same date. What is the earliest source of this information about Vesak in the scripture?
Comment: It really is a matter of faith. No archeological evidence can verify with certainty either claim, nor can any literary analysis claim to do the same. One is free to make up one's own mind, to believe or not to believe. It is incidental to the path of liberation in any case.
Comment: This book may be interesting to you. http://www.buddhistelibrary.org/en/displayimage.php?album=149&pid=2326#top_display_media
Answer: Without looking too deeply, it seems that the word "visākhapuṇṇamadivase" (day of the full moon of Visākha) only appears in the commentaries. I don't think there is any canonical reference to that date; though I can't think offhand of any sutta that is precisely self-dated.
Answer: You have to imagine whether you are in that time first, at the age of memorizing not reading like nowadays.
They almost always memorize all memories as approximation like we memorize as month, quarter, etc.
In pali, we called this kind of number as  approximated number, Anekasankya. It's one of 5 types of number using in Pali canon, missa, gunita, sambandha, sanketa, aneka.
I have no idea for the birth date however it's make sense to say the enlightened  month and the dead month are in the same month before VassaMasa (raining season) according to Tipitaka in VN Mahavagga Mahakhandhaka, VN Vassupanayikakhandhaka, VN Pañcasatikakkhandhaka, and DN MahaparinibbanaSutta.
It's make sense because in VN Mahavagga Mahakhandhaka and  VN Vassupanayikakhandhaka the Buddha enlightened before walking from ๑(1) to ๒๐(20), see below picture, and lived his first raining season, 8th-11th month, at ๒๐(20).
And in VN Pañcasatikakkhandhaka, and DN MahaparinibbanaSutta, the Buddha was dead before raining season as well.
When we count the raining season, 8th, and walking timing together, it's make sense to be some date around 6th month, Visakha.
Reading without caring of tipitaka memorizer is ruining the readers' right view exactly.


Where do we request changes to the site?

Question: I don't so much have a question as a proposal that I'd really like to see effected. I'd like to argue for and push for longer tags to enable clear full titles with expansions, as squashing under the limit and having to clarify the game name in my body is annoying. Where is the proper place to do this? I figured meta is obviously good for questions but guessing it's not the proper place to outright propose changes such as these.  Is simply tagging it feature-request sufficient? Didn't seem so.
Comment: Are there any specific examples you've found where the 25 character limit has caused problems?
Comment: Well, board games often are long names and clunky to shorten. Why do it? to improve readability? The argument for concise variables in programming works for me because they are embedded in a 'sentence' structure of sorts in code logic and can get really verbose in that context, but, here, the tags are typed once and neatly arranged in one place. I feel there's a clear way to identify and search when we're expected to simply type some or all of the game title instead of having potential conflicts or incorrect matches when someone searches settlers looking for a different game.
Comment: I understand your reasoning, but I'm curious to know if there were specific situations that you've run into where you felt that there definitely needed to be more characters. Was there a certain game?
Comment: My previous comment is rooted without knowledge of how the tag system works with regard to searching of course. I think it just feels simple to write Arkham Horror Curse Of The Dark Pharaoh and see hits specifically related to it and how many questions pertaining to it, than search for titles that intersect and collecting questions about different games under the same tag potentially.  I read it was a hard limit to change in the codebase so the gripe is minor enough that it sounded not worth pursuing in the end.
Comment: In answer to your followup, I don't think any situation made me feel i *had* to have 25+ characters. It was mostly just not liking seeing an abbreviation for a title that wasn't the title of the game. Maybe the search function for tags is loose enough that they will catch minor problems and provide good results regardless.
Comment: One situation that recently came up, I wanted to add 'the-captain-is-dead-adrift' (expansion to The Captain Is Dead), but couldn't because of the limit, so I had added 'the-captain-is-dead-ep2' but this seems clunky. What do people do if ep2 doesn't even fit? Do I have separately 'the-captain-is-dead' and 'adrift' or 'expansion-adrift'? Obviously if there is a game called adrift, there is now a conflict that obscures the tag. The tag I added asked me to create a tag wiki, and I didn't like the thought of creating one for two conflicting possibilities. I'll probably go with 'expansion-adrift'.
Comment: I also notice that when I change it to "captain-is-dead-adrift" (removing the "the" just to make it fit), searching with "the captain is dead" fails to find the question.  That seems like a quality of the search feature that doesn't jive with having to improvise (cut off words, abbreviate) the tags like this. If I had to abbreviate something like "Curse of the Dark Pharaoh" to "Curse of Dark Pharaoh" to fit a tag restriction, I'd hope the search feature would be a little looser and trigger a hit despite the query containing a term that wasn't in the tag.
Comment: That does make sense. Since this question already has an accepted answer, perhaps it would be good to raise a new question if it is difficult or impossible to find specific games using search because of the tagging.
Answer: This is the spot.  The site admins will see everything tagged feature-request.  There is no guarantee that they will respond, though.
This has been status-declined on meta.stackexchange.com in the past - Raising the 25 chars limit for tags
Comment: Thanks, I also see the issue being more relevantly put forth here http://meta.gaming.stackexchange.com/questions/1037/increase-tag-length-limit-to-30-characters. I guess this will not be happening.


Are Xbox One games region locked?

Question: If I buy an Xbox One from the United States, then go to Thailand will games that I buy in Thailand work for my US Console?
Answer: Yes! I have been doing research on this (regioned games) myself for a while as I am from the US but I live part time in Germany. Here are my findings:

XBox 360 games are regioned (NTSC, etc.) so games don't work everywhere
XBox One games are no longer regioned so games will work everywhere
However Blu-ray DVDs are still regioned, so if you try to watch Blu-ray movies from Thailand on your XBox it will not work
Comment: Not all Xbox 360 games are region locked and not all region-locked 360 games can't work on consoles from a different country/region.

Are Xbox One games region locked?


Knowing time any where and any when

Question: My question is if I put you down somewhere in the Milky Way galaxy in any given period of time, is there a way for you to tell when and where you are based on stars or constellations? Or some known astronomical event like a supernova? How accurate would that be?
Comment: I believe I've seen pulsar mentioned as possible ways to navigate outside the solar system, but I'm doubtful we could do this for any time and any place (and I'm not sure what you'd use as a common temporal reference at two different locations in space-time).
Comment: Overly simple answer for the when: measure the distance between the Sun and several nearby stars, especially those with high "proper motion". These set of distances are unique for a given time. Of course this assume: 1) you can find the sun, and 2) this is during the sun's lifespan.
Answer: This question is someone open-ended since you don't provide many constraints, so I'll impose the following two conditions of my own to help me give an answer:

I'll assume that after you're randomly placed in space and time, that you can make any observation one could make here on Earth - that is, you have whatever equipment is necessary to observe anything about the Universe we can currently observe.
I'll assume that you have access to all current astronomical knowledge (in a digital library or some such thing) such as star catalogs, physics books, published papers, etc.

How do we know our location?
In determining location, because we exist in three dimensional space, we have to specify position with three coordinates. The simplest coordinate system in my mind, in terms of what we can measure, are the three coordinates below:

our radial distance from the center of the galaxy,
our height above or below the galactic plane,
and our azimuthal angle from some reference point.

Yes I know these coordinates aren't orthogonal, but they relate well to measurements one could make and simple coordinate transformations could make them orthogonal.
The first one is pretty easy. We can currently measure the distance to Sag A*, the black hole at the center of the galaxy. It's not particularly easy and measurements have fluctuated over the years with respect to our position on Earth (see e.g., Eisenhauer et al. 2003 or Boehle et al. 2016), but it is a measurement which could allow you to define #1.
The second coordinate could be achieved by simply mapping the local star field. A survey akin to SDSS could accomplish this. This is precisely what was done in this Humphreys & Larson 1995. It would take time and a lot of work, but you could make this measurement pretty easily.
So far so good. Now we come to coordinate #3 and suddenly we hit a problem. We need to know our azimuthal position with respect to some reference point. That is, if you look down on the galaxy and consider our angle from some line, what would that line be and what would that angle be? Since the clear intent is to relate our new position to where the Earth is, the most logical reference line is the line connecting the Earth to the center of the galaxy. But how do we know where that line is with respect to our new position? I'm afraid I don't have a good answer here. Others suggested using pulsars but that isn't foolproof. First, you don't know when you're being deposited so it could be billions of years in the past or future when all current knowledge of pulsars is no longer relevant. Second, you might be on the other side of the milky way where we can't actually see anything currently and thus have no knowledge of pulsars over there.
Your best bet might be to map out the star distribution of as wide a swath of the galaxy as you can see to try and understand what the spiral arms look like near you. We've already done this for our current position in the galaxy. Galactic arms move and change slowly, taking hundreds of millions if not billions of years to change significantly. If you can recognize the general structure of the arms, that would give you a decent reference to your azimuthal position.
How do we know the time?
I'm going to break this down into two possible answers. The first assumes you've been placed in a time not too distant from our current time (think less than a million years) and you're still pretty near to our current position.
In the case above, pulsars are the way to go. Pulsars pulse with extreme regularity, so that they're great time keepers. But if your goal is to know how much time has passed, you need to look at the time rate of change of the pulses. As it turns out, the pulsars don't pulse with perfect regularity. The time between pulses decays very slowly over time due to the pulsars losing angular momentum very slowly. The general step to calculating a reasonably precise time is as follows.

Find a pulsar that is currently known and has current measurements of the pulse rate and decay in pulse rate. To make sure you've identified a given pulsar as the correct one, you'll have to map its relation to other stars via a wide survey (the star fields will have changed, but if you're not too far away from our time you can predict with reasonable accuracy where most stars will be or have been in the past).
Measure the pulse rate (and decay rate if you wish, but that may take years or even decades).
Compare your currently measured pulse rate to the present day measured rate and decay rate and do some calculations. You should be able to figure out your current time with respect to the time now fairly precisely. I can't say how precise, but I wouldn't be surprised if you could get within a decade or so of the current time (depending on how accurate your pulsar models are).

The only caveat to the above approach is that pulsars can "glitch". Normally the pulse rate decays smoothly, but every once in a while a pulsar might just glitch and quickly change pulse rates. It is unclear exactly why these glitches occur and they're unpredictable so you have to make the assumption that your pulsar hasn't glitched between now and whatever time you're in. If it has, your time may be off wildly. To mitigate this, you should of course use as many pulsars as you can find. If one pulsar gives a different number than the rest, you can assume it glitched and throw it out.
The second case is more tricky. Now I'm going to assume you're in a time really distant from our own. Millions or possibly billions of years away from now. In that case, any hope in finding a precise time (or even a precise year) is wildly presumptuous. At best, you can figure out your general time within the universe by measuring the current age of the universe. We currently know the age to be $13.799\pm 0.021\ \mathrm{billion\ years}$ based on the latest and greatest measurements. You can see our uncertainty is down to 21 million years. If you make similar measurements of the Universe's age in your time, then the best you'll be able to do is define your time with respect ours with an accuracy of ~20 million years. But if you're a billion years in the future, that's a pretty good measurement in my opinion.
Comment: I like this and it could be extended in many ways. A simple way of estimating your cosmological age is just to measure the temperature of the CMB.
Comment: Brilliant answer, this is exactly what I was looking for! Thanks.
Answer: Some of this might stray into WorldBuilding StackExchange territory, and 'when' will be tough to approximate as galactic rotation and stars going through different phases of their lives can make constellations and reference points obsolete with time.
As StephenG mentioned, pulsars, owing to their (usually) unchanging and detectable rotation periods, can be used as reference points. The plaques attached to Pioneer 10 and 11 provide the solar system's location relative to nearby pulsars. Pulsar coordinates were also added to the Voyager Golden Album too.
The alternative would be to adopt relatively fixed locations on your 'local' celestial sphere and determine your position relative to them, and therefore where your destination is. This assumes you know where your destination is relative to your reference points. The galactic core's location, the direction of galactic rotation, the Magellanic Clouds or other extra-galactic sources could be your reference points. They would hardly be accurate but if you are attempting a Voyager-esque journey through the Milky Way, it's a start.
Comment: @RobJeffries I never emphasised these as being long-term solutions. As mentioned in my first paragraph; few reference points will remain useful in the long run.
Comment: Pulsars will not work in general because the pulsar phenomenon lasts many orders of magnitude less than the age of the Galaxy. The Magellanic clouds cannot really be used as "reference points" since they orbit the Galaxy (and their orbits are not well defined); other nearby extragalactic sources are also in relative motion .
Answer: The location part of the problem is mostly dealt with in Zephyr's answer. I completely concur, but the last part - the azimuth - is indeed tricky, but you also have to define what you mean by position in azimuth. If you are in the recent past or future then some definition would be possible based on the directions of a network of radio-loud, high-redshift quasars. Indeed, accurate measurements of their redshifts could then be combined with a cosmological model to tell you at what exact cosmic epoch your measurements were made at.
Similarly, a cosmological model could be combined with a precise measurement of the temperature of the cosmic microwave background to give you your cosmic age. This would work at any cosmic epoch (assuming we have got the cosmological model correct) and be far more precise than some alternatives you could think of, like measuring the current age of the Galaxy using the luminosity of the coolest white dwarfs or the ages of stars in the oldest globular clusters (maybe accurate to a billion years).
However, if you are billions of years into the future or past then defining the azimuthal location in any well-defined way becomes impossible. The Galaxy rotates with a not precisely known speed that varies with radius. Distant quasars come and go (or more precisely, turn on and off); local galaxies move with respect to our Galaxy with not precisely known (tangential) motions. Perhaps you could make a definition with respect to the cosmic ray dipole alignment, but this would change as the Galaxy's motion changes due to the influence of other galaxies in the local group and supercluster.

Knowing time any where and any when


Divide into grid and Mosaic using google earth?

Question: Is it possible to download 1:2000 scale of a town using google earth image? If divide the whole area into grid and mosaic them is an option, how it is done using google earth? I tried using grid. But there is no option to change the grid size.
Answer: I have found a guide to divide maps and download them from google earth at :
Downloading mosaic Google Earth maps and rectify them automatically in their correct coordinates.
However after looking into it further it looks like there are simpler ways to do this using the Google Map Ripper from Blue Black Works. This should provide you with the ability to set the scale that you desire as well.


Does bleeding make a fast void

Question: Does during fasting makes it void. Does it depend on the amount of bleeding or the type bleeding. I need full details about it.
Comment: just to add up what Goldprsuedo has said, if the bleeding is inside the mouth, as long as you dont swallow it, your fast is valid..
Comment: Found a similar question here : http://islam.stackexchange.com/questions/9049/does-bleeding-break-the-fast For those who like a little more detailed discussion and various Sources.
Answer: Bleeding, as in bleeding from a cut or a wound, does not make the fast void in and of itself.  If, however, the blood loss is enough to weaken you to the point that further fasting would actually be harmful to your health, the fast should be broken; this would fall under the same general ruling as breaking your fast due to illness and making it up at a later date.
However, in the case of women where the bleeding is menstrual or post-natal blood, the fast is considered void.  Again, this would need to be made up at a later date.

Does bleeding make a fast void


3D Line-Plane Intersection

Question: If given a line (represented by either a vector or two points on the line) how do I find the point at which the line intersects a plane? I've found loads of resources on this but I can't understand the equations there (they don't seem to be standard algebraic). I would like an equation (no matter how long) that can be interpreted by a standard programming language (I'm using Java).
Comment: Its not a duplicate, 4382591 isn't asking about the general case.
Comment: possible duplicate of http://stackoverflow.com/questions/4382591/line-plane-intersection
Answer: Here is a Python example which finds the intersection of a line and a plane.
Where the plane can be either a point and a normal, or a 4d vector (normal form),
In the examples below (code for both is provided).
Also note that this function calculates a value representing where the point is on the line, (called fac in the code below).
You may want to return this too, because values from 0 to 1 intersect the line segment - which may be useful for the caller.
Other details noted in the code-comments.

Note: This example uses pure functions, without any dependencies - to make it easy to move to other languages.
With a Vector data type and operator overloading, it can be more concise (included in example below).
# intersection function
def isect_line_plane_v3(p0, p1, p_co, p_no, epsilon=1e-6):
    """
    p0, p1: Define the line.
    p_co, p_no: define the plane:
        p_co Is a point on the plane (plane coordinate).
        p_no Is a normal vector defining the plane direction;
             (does not need to be normalized).

    Return a Vector or None (when the intersection can't be found).
    """

    u = sub_v3v3(p1, p0)
    dot = dot_v3v3(p_no, u)

    if abs(dot) > epsilon:
        # The factor of the point between p0 -> p1 (0 - 1)
        # if 'fac' is between (0 - 1) the point intersects with the segment.
        # Otherwise:
        #  < 0.0: behind p0.
        #  > 1.0: infront of p1.
        w = sub_v3v3(p0, p_co)
        fac = -dot_v3v3(p_no, w) / dot
        u = mul_v3_fl(u, fac)
        return add_v3v3(p0, u)

    # The segment is parallel to plane.
    return None

# ----------------------
# generic math functions

def add_v3v3(v0, v1):
    return (
        v0[0] + v1[0],
        v0[1] + v1[1],
        v0[2] + v1[2],
    )

def sub_v3v3(v0, v1):
    return (
        v0[0] - v1[0],
        v0[1] - v1[1],
        v0[2] - v1[2],
    )

def dot_v3v3(v0, v1):
    return (
        (v0[0] * v1[0]) +
        (v0[1] * v1[1]) +
        (v0[2] * v1[2])
    )

def len_squared_v3(v0):
    return dot_v3v3(v0, v0)

def mul_v3_fl(v0, f):
    return (
        v0[0] * f,
        v0[1] * f,
        v0[2] * f,
    )

If the plane is defined as a 4d vector (normal form), we need to find a point on the plane, then calculate the intersection as before (see p_co assignment).
def isect_line_plane_v3_4d(p0, p1, plane, epsilon=1e-6):
    u = sub_v3v3(p1, p0)
    dot = dot_v3v3(plane, u)

    if abs(dot) > epsilon:
        # Calculate a point on the plane
        # (divide can be omitted for unit hessian-normal form).
        p_co = mul_v3_fl(plane, -plane[3] / len_squared_v3(plane))

        w = sub_v3v3(p0, p_co)
        fac = -dot_v3v3(plane, w) / dot
        u = mul_v3_fl(u, fac)
        return add_v3v3(p0, u)

    return None

For further reference, this was taken from Blender and adapted to Python.
isect_line_plane_v3() in math_geom.c

For clarity, here are versions using the mathutils API (which can be modified for other math libraries with operator overloading).
# point-normal plane
def isect_line_plane_v3(p0, p1, p_co, p_no, epsilon=1e-6):
    u = p1 - p0
    dot = p_no * u
    if abs(dot) > epsilon:
        w = p0 - p_co
        fac = -(plane * w) / dot
        return p0 + (u * fac)

    return None

# normal-form plane
def isect_line_plane_v3_4d(p0, p1, plane, epsilon=1e-6):
    u = p1 - p0
    dot = plane.xyz * u
    if abs(dot) > epsilon:
        p_co = plane.xyz * (-plane[3] / plane.xyz.length_squared)

        w = p0 - p_co
        fac = -(plane * w) / dot
        return p0 + (u * fac)

    return None

Comment: Finally, an intersection method that actually works! Man.. I was banging my head on the wall for so long trying to fix my code for point of contact, thank you sir.
Comment: it's infinite in the sense that this method doesn't impose a start/end point for the line. In practice it's limited by float precision.
Answer: Here is a method in Java that finds the intersection between a line and a plane. There are vector methods that aren't included but their functions are pretty self explanatory.
/**
* Determines the point of intersection between a plane defined by a point and a normal vector and a line defined by a point and a direction vector.
*
* @param planePoint    A point on the plane.
* @param planeNormal   The normal vector of the plane.
* @param linePoint     A point on the line.
* @param lineDirection The direction vector of the line.
* @return The point of intersection between the line and the plane, null if the line is parallel to the plane.
*/
public static Vector lineIntersection(Vector planePoint, Vector planeNormal, Vector linePoint, Vector lineDirection) {
   if (planeNormal.dot(lineDirection.normalize()) == 0) {
       return null;
   }

   double t = (planeNormal.dot(planePoint) - planeNormal.dot(linePoint)) / planeNormal.dot(lineDirection.normalize());
   return linePoint.plus(lineDirection.normalize().scale(t));
}

Comment: N.B. LineDirection *must* be normalised
Comment: I searched this answer for way to long! Great code example, easy to understand.
Comment: @smirkingman You are correct, thank you! In my code it had been normalized before being passed into the method, I have edited the post to include this.
Comment: Just an update as this does not work for all case. Take a point `{0,0,0}` ray `{-1,0,0}`, use YZ plane at x =10 so plane point `{10,0,0}` and normal be either `{-1,0,0}` or `{1,0,0}` it does detect a hit even if the ray is casting away from the plane
Comment: @Franck Good observation! This code only works for lines, not rays.
Answer: You'll need to consider three cases:

Plane is parallel to line, and line does not lie in plane (no intersection)
Plane is not parallel to line (one point of intersection)
Plane contains the line (line intersects at every point on it)

You can express the line in parametric form, like here:
https://www.nagwa.com/en/explainers/296105290721/
This does the same for the plane:
https://jongarvin.com/up/MCV4U/slides/vector_parametric_plane_handout.pdf
If the normal to the plane is perpendicular to the direction along the line, then you have an edge case and need to see whether it intersects at all, or lies within the plane.
Otherwise, you have one point of intersection, and can solve for it.
I know this isn't code but to get a robust solution you'll probably want to put this in the context of your application.
EDIT: Here's an example for which there's exactly one point of intersection.  Say you start with the parameterized equations in the first link:
x = 5 - 13t
y = 5 - 11t
z = 5 - 8t

The parameter t can be anything.  The (infinite) set of all (x, y, z) that satisfy these equations comprise the line.  Then, if you have the equation for a plane, say:
x + 2y + 2z = 5

(taken from here) you can substitute the equations for x, y, and z above into the equation for the plane, which is now in only the parameter t.  Solve for t.  This is the particular value of t for that line that lies in the plane.  Then you can solve for x, y, and z by going back up to the line equations and substituting t back in.
Comment: Thanks, that's very helpful, but I'm still a little baffled. I understand how to get the equation for the line, that's pretty simple. But from there on I'm stuck. In lamen's terms, what exactly does the 'equation' of a plane mean? And what do I do to work out the point of intersection once both equations are solved?
Comment: What information do you know about your plane?  Points in the plane, for example?
Comment: Pretty much anything, I think. I know at least 4 points on the plane, and it's defined independently so I should be able to find out almost anything.
Comment: Both links are now dead.
Comment: @n0rd Hey, thanks for checking them, I appreciate that! I guess that tends to happen on the web over time.
Comment: @John and that's why you put relevant parts into your answer...
Comment: @n0rd I fixed the links. This is likely the last contribution I will make to any of these sites.  They served a purpose in my life at one point, but now they're just tiresome, in no small part to the attitude behind comments like yours.
Answer: Using numpy and python:
#Based on http://geomalgorithms.com/a05-_intersect-1.html
from __future__ import print_function
import numpy as np

epsilon=1e-6

#Define plane
planeNormal = np.array([0, 0, 1])
planePoint = np.array([0, 0, 5]) #Any point on the plane

#Define ray
rayDirection = np.array([0, -1, -1])
rayPoint = np.array([0, 0, 10]) #Any point along the ray

ndotu = planeNormal.dot(rayDirection)

if abs(ndotu) < epsilon:
    print ("no intersection or line is within plane")

w = rayPoint - planePoint
si = -planeNormal.dot(w) / ndotu
Psi = w + si * rayDirection + planePoint

print ("intersection at", Psi)

Answer: If you have two points p and q that define a line, and a plane in the general cartesian form ax+by+cz+d = 0, you can use the parametric method.
If you needed this for coding purposes, here's a javascript snippet:

/**
* findLinePlaneIntersectionCoords (to avoid requiring unnecessary instantiation)
* Given points p with px py pz and q that define a line, and the plane
* of formula ax+by+cz+d = 0, returns the intersection point or null if none.
*/
function findLinePlaneIntersectionCoords(px, py, pz, qx, qy, qz, a, b, c, d) {
    var tDenom = a*(qx-px) + b*(qy-py) + c*(qz-pz);
    if (tDenom == 0) return null;

    var t = - ( a*px + b*py + c*pz + d ) / tDenom;

    return {
        x: (px+t*(qx-px)),
        y: (py+t*(qy-py)),
        z: (pz+t*(qz-pz))
    };
}

// Example (plane at y = 10  and perpendicular line from the origin)
console.log(JSON.stringify(findLinePlaneIntersectionCoords(0,0,0,0,1,0,0,1,0,-10)));

// Example (no intersection, plane and line are parallel)
console.log(JSON.stringify(findLinePlaneIntersectionCoords(0,0,0,0,0,1,0,1,0,-10)));
Comment: Should "var t = - ( a*px + b*py + c*pz + d ) / tDenom;" actually be subtracting d ? so ...     var t = - ( a*px + b*py + c*pz - d ) / tDenom;
Comment: d is only the independent term with nothing more special about it. In the example, you can see that a plane y=10 is represented with d=-10 (first console log). If it is still not clear I may write down the formula development/solution.
Comment: What if the line is **contained** within the plane? This function only seems to return a point or null, and in this case I would expect it to return the line itself (because that's what intersects the plane). And can I conclude that when null is returned that the line never intersects the plane?
Comment: The reason d is negated in this formulation is: Given a normal *n* for the plane and two points in a plane *p* and *q* then we know that: *dot(n, (p-q)) = 0*. This can be expanded to(using *p* and *q* as point vectors) *dot(n,p)-dot(n,q)=0* where *-dot(n,q)* becomes *d* and the plane equation becomes: *dot(n,p)+d=0* which shortens to the standard *[n|d]* implicit form of the plane. The important take away here is *d=-dot(n,q)*
Answer: Based on this Matlab code (minus the checks for intersection), in Python
# n: normal vector of the Plane
# V0: any point that belongs to the Plane
# P0: end point 1 of the segment P0P1
# P1:  end point 2 of the segment P0P1
n = np.array([1., 1., 1.])
V0 = np.array([1., 1., -5.])
P0 = np.array([-5., 1., -1.])
P1 = np.array([1., 2., 3.])

w = P0 - V0;
u = P1-P0;
N = -np.dot(n,w);
D = np.dot(n,u)
sI = N / D
I = P0+ sI*u
print I

Result
[-3.90909091  1.18181818 -0.27272727]

I checked it graphically it seems to work,

This I believe is a more robust implementation of the link shared before
Answer: This question is old but since there is such a much more convenient solution I figured it might help someone.
Plane and line intersections are quite elegant when expressed in homogeneous coordinates but lets assume you just want the solution:
There is a vector 4x1 p which describes the plane such that p^T*x =0 for any homogeneous point on the plane. Next compute the plucker coordinates for the line L=ab^T - ba^T  where a = {point_1; 1}, b={point_2;1}, both 4x1 on the line
compute: x=L*p = {x0,x1,x2,x3}
x_intersect=({x0,x1,x2}/x3) where if x3 is zero there is no intersection in the euclidean sense.
Answer: This is a fixed version of the mathutils API.
# point-normal plane
def isect_line_plane_v3(p0, p1, p_co, p_no, epsilon=1e-6):
    u = p1 - p0
    dot = p_no * u
    if abs(dot) > epsilon:
        w = p0 - p_co
        fac = -(p_no * w) / dot
        return p0 + (u * fac)

    return None

MathUtils round float with vector operations so this solution is not precise.
Answer: Just to expand on ZGorlock's answer, I have done the dot product, addition and scaling of 3D Vectors. The references for these calculations are Dot Product, Add two 3D vectors and Scaling. Note: Vec3D is just a custom class which has points: x, y and z.
/**
 * Determines the point of intersection between a plane defined by a point and a normal vector and a line defined by a point and a direction vector.
 *
 * @param planePoint    A point on the plane.
 * @param planeNormal   The normal vector of the plane.
 * @param linePoint     A point on the line.
 * @param lineDirection The direction vector of the line.
 * @return The point of intersection between the line and the plane, null if the line is parallel to the plane.
 */
public static Vec3D lineIntersection(Vec3D planePoint, Vec3D planeNormal, Vec3D linePoint, Vec3D lineDirection) {
    //ax × bx + ay × by
    int dot = (int) (planeNormal.x * lineDirection.x + planeNormal.y * lineDirection.y);
    if (dot == 0) {
        return null;
    }

    // Ref for dot product calculation: https://www.mathsisfun.com/algebra/vectors-dot-product.html
    int dot2 = (int) (planeNormal.x * planePoint.x + planeNormal.y * planePoint.y);
    int dot3 = (int) (planeNormal.x * linePoint.x + planeNormal.y * linePoint.y);
    int dot4 = (int) (planeNormal.x * lineDirection.x + planeNormal.y * lineDirection.y);

    double t = (dot2 - dot3) / dot4;

    float xs = (float) (lineDirection.x * t);
    float ys = (float) (lineDirection.y * t);
    float zs = (float) (lineDirection.z * t);
    Vec3D lineDirectionScale = new Vec3D( xs, ys, zs);

    float xa = (linePoint.x + lineDirectionScale.x);
    float ya = (linePoint.y + lineDirectionScale.y);
    float za = (linePoint.z + lineDirectionScale.z);

    return new Vec3D(xa, ya, za);
}

Comment: This is clearly incorrect: the dot product of 3D vector is `(v0.x * v1.x + v0.y * v1.y + v0.z * v1.z)`

3D Line-Plane Intersection


With what chords do we modulate from Em to G?

Question: In this version they modulate from Em to G by the chords Em-D-G? Is there a better way of doing it?
Comment: Does this answer your question? [How many types of modulation are there?](https://music.stackexchange.com/questions/27079/how-many-types-of-modulation-are-there)
Comment: Kind of ironic that a song about heart's joy in a garden full of blueberries is in a minor key in the first place...
Answer: I wouldn't call that a modulation at all, it's a common pop/folk song, mostly in E minor, just with a short visit on the relative major side. The minor's relative major lives in the same double house, just the next door, and the visit is short, just having a cup of tea, not starting to use the major's fridge or sleeping in the same bed or anything. Modulation would mean a more long-term change. In other words, even during the G chord, would you say that's home, where your journey ends naturally? In my opinion, if right after the G chord you play an Em, that's a possible home and could be the end, although a bit surprisingly quick ending.
There's a few different ways to move harmony around, see my answer to "How to determine passing chords" How to determine passing chords
If you want to keep the Em and G while still preparing the listener for the D chord in a slightly less abrupt way, put an Am7 before the D in place of the Em. This is "trick 2" in the answer linked above.

If you start changing things, you might try, for example moving a voice down in steps like this, and setting the chords accordingly. This is "trick 1" in the answer linked above.

(A little bit of trick 2 applied as well, in B7 - Em and Am6/F# - B7 - Em.)
However, that changes many other things as well, like the chord rhythm, which doesn't go One-two-THREE One-two-THREE anymore. And now "liljor och akvileja" get quite a different feeling, etc.  And we don't go to the G major chord at all. :)
Comment: ii-V-I lives on...
Comment: Yes, two-five-one jumps along the steps, it's one of the basic ingredients. I can't see how it could die. :)
Answer: The simplest, most effective and most used transition chords are Vs, or V7s. The dominant of the new 'key'. So here, in Em, D G is unsurprising. It may not even go under the banner modulation, as those other chords at that point are all included within the key Em, so it's hardly that it's gone into G, especially being back in Em after only three bars.
You ask if there's another way. Several. Going direct from Em to G is one. Cm to G works, as does Co to G. A basic premise is notes moving a semitone to the new chord. The last one does easily - C>B, E♭>D, G♭>G.
Answer: One way (but as Tim notes above) that one can move along the cycle of fifths e-a-D-G. This may not sound much like a modulation though. (One cannot play notes in the new key that don't occur in the old key. That's useful on things like C-G or Ab-d or the like). To get the G to "stick" as a key, one my find it useful to use an extended cadence like A7-D7-G or the like.
In a short piece like the one posted. These harmonic movements may be "tonicizations" rather than complete modulations. There is not enough time to indicate a full modulation.
Answer: This is the best way and quite usual, many minor tunes do this as G is the relative key of em.
i (em) => vi (G)
em-D-G = vi-V-I
could also be reached by em C D G (vi IV V I)
I wouldn't call it a modulation. This is a short extension to the relative key ... 4 bars later we are back in e-minor.
Answer: An F#7(#9)(#5) would resolve to G (deceptive cadence)and would keep the melody on top. Although if you choose to use such a chord it would be important to have a few other similar secondary dominants in your arrangement.
Answer: In this case - a simple folk-song style and a modulation to such a closely-related key as to hardly count as a modulation at all - I see no advantage to anything more complicated.
Answer: I'm no theory expert in the least. In fact I would say novice is a stretch when it comes to theory. I use this change quite often when noodling around. When I can think to not jump back and forth with the standard walk up & down. Couldn't this be considered iv V I progression in Gmajor?


Focus motor problem in lens due to fine dust particles

Question: I have a Sigma 18-250mm F3.5-6.3 DC Macro OS lens that I use exclusively with my Nikon D5300. I went to Denmark last year, and visited Rubjerg Knude Lighthouse. If you've ever been there, you know that the lighthouse is surrounded by a type of sand that is so fine that the grains cannot be seen separately. Long story short, some of this fine dust went into the lens apparently. Since that moment, the autofocus motor on the lens makes strange noises when it wants to work, and most of the time, it is stuck until I give it a push by moving the manual mechanism a bit. Is there a way that I can clean-up inside of the motor so that the lens goes back to normal working condition?
Comment: Hi Ali, Welcome to Photography.StackExchange. We hope you enjoy sharing knowledge and experience.
Comment: Thanks! I'll do my best!
Answer: Here's what I did in the end:
First of all, opening up the lens is not a good idea. It's a complex and delicate system, and if you don't have experience in this area, avoid disassembling the lens.
To clear up the dust from within the focus ring you need to blow air from under it. In this model, this was not possible from outside. So I got a power duster spray, put the zoom to max (250mm in this case), and blew the air through the exposed parts of the inside of the lens, particularly behind the yellow cable.

I think I got almost all the dust out, and the lens is working fine now. But please note that the amount of dust was not a lot, and it didn't really compare with lenses damaged from color runs.
Comment: This could blow dust into places where it is even more harmful (eg into the aperture area).... in which case you will have to disassemble it ... if you can disassemble it ....  Sigmas are notorious for being tricky to dismantle, let alone put back together.
Answer: No, there is nothing you can do yourself. This is one of those cases of, "if you have to ask, then you don't know enough about it to do it yourself".
The lens needs to be sent to Sigma (or a Sigma authorized repair center) for cleaning and repair. Lens motors and mechanics are not designed to be user-serviceable.
Damage or malfunction due to fine-dust conditions are some of the worst things to repair or clean. For instance, LensRentals.com has specifically banned uses such as photographing color runs, where colored fine powder is purposely shot at the runners (yeah, I don't get it. Seems like a bad thing for your lungs). Even LensRentals's full damage waiver, which covers damage from things like being attacked by a bear, doesn't cover color runs or events like Burning Man. For a good article about just how bad fine dust is for cameras and lenses, read the blog post by Roger Cicala, founder of LensRentals.com: How to Ruin Your (or Our) Gear in 5 Minutes (Without Water)
Comment: So here's what I did: I bought a power duster spray and started blowing air on the inside of the lens. To do this, I had to put the zoom on 250mm and then blow into all the exposed internals of the lens. So far, I hear no more weird noise from the lens. Thanks to your answer, I avoided the stupid temptation to open the lens up and probably saved myself some money. I realised that unlike the lenses in your link, mine didn't have any dust on the inside of the glass, but rather inside the focus ring. So it might be possible that I was successful in cleaning that part up without opening the lens.


How do you tell the difference between 決行 and 欠航?

Question: So apparently
決行-けっこう (to carry out)
and
欠航-けっこう (cancelled)
are pronounced the same way? Or does one of them have a different pitch accent pattern? At least Google translate pronounced them the same.
This seems problematic for a situation like the following, since you can't tell from context:
https://youtu.be/J2vVPpbEdH0?t=21
Comment: At least for me, "決行" is definitely not the first word that comes to mind in a situation like this...
Comment: In actual Japanese, 決行 = "to daringly 実行". A ship cannot be 実行-ed so there's no chance to confuse this pair.
Comment:  That video is hilarious.  In those kind of situations, I think the only way to get the point across is to 言い換える.
Answer: 決行 and 欠航 are pronounced the same, but you can tell which is used from the context. Simply, 決行 is not a word used in a situation like the one in that video. Note that the person on the right is supposed to be a traveler who doesn't speak Japanese like a native speaker.
決行 means holding a public/social event or carrying out a plan/operation determinedly despite some obstacle (typically bad weather). Here "event" includes a live concert, a sport game, a competition, a strike action, a military operation, and so on, but not a departure of a ferry/airplane.
Answer: 決行 (けっこう{LHHH}) and 欠航 (けっこう{LHHH}) are both of level pitch. No other options are offered by NHK日本語発音アクセント辞典 or 大辞林.


Finding missing, mystery drivers

Question: What steps do you take to find missing mystery drivers?
I.e. You have new machine, and after installing a new OS, the audio or video or memory card reader doesn't work. How do you find the correct drivers?
Answer: The PCI vendor and device identification information, each of which are two-byte identifiers, will often return useful information if popped into a search engine.
The Windows driver manager interface will show you many interesting details about your hardware in the 'Details' screen of a Properties window. Among these are 'Hardware Ids', which is where the VEN_XXXX and DEV_YYYY values can be found.
On Linux, you can use lspci -nn, while on FreeBSD, pciconf -lv is your friend.
Answer: For Windows: you can use "EVEREST" to fetch this information automatically. It also often suggests URLs to visit for drivers :)
Answer: Usually the main board (motherboard) comes with a driver disc that has all the important on-board drivers. If not, open the case, look for the main board make and model on the board itself, visit the manufacturer web site, and download.
For external peripherals, same procedure. Get the make and model, then visit manufacturer web site or Google for drivers.
This question should probably be moved to superuser.com later.
Answer: I often boot a Linux disk (RIP, Rescue Is Possible, is one of my favorites for this) and run dmesg, lspci, lshw, and hwinfo, and from that use Google to track down a vendor and/or specific model driver information.
I think the newer versions (9.3 is out now, as I recall) have a boot menu option to run hardware tests, that might help too.
If you get a copy of the Ultimate Boot CD there is a few hardware identification tools on that to give clues for finding drivers.
Answer: This may not help if you're installing an upgraded OS that the original drivers don't work for. But...
Many PC manufacturers allow you to download the drivers that came with the machine even years after your purchase.
If it's a Dell go to dell.com and enter the "Service Tag" number for the machine.

Finding missing, mystery drivers


What are the stats of the Razer green/black color crystal?

Question: I have seen the green/black saber crystals from the Razer peripheral promotion, and I was wondering what the stats are. Are they like the yellow/black color crystal? Can you improve its stats, or are we stuck with low stats?
Answer: Originally, there was only this item, which is +4 endurance, exactly like the original pre-order crystals.
However, it seems that Bioware has now added a pre-order vendor who sells high-level versions of the yellow-black crystal. It's possible they might do the same for the Razr crystals in the future.
Answer: As of Patch 1.2 you can trade in the original +4 endurance crystal and 250,000 credits for one of these level 50 crystals:

SE Black Green Eviscerating Crystal — +41 Critical Rating
SE Black Green Hawkeye Crystal — +41 Power
SE Black Green Indestructible Crystal — +41 Endurance
SE Black Green War Hero's Crystal — +41 Expertise Rating

You get them from the Mods vendors on Coruscant and Dromund Kaas near the Market kiosks.  The SE versions are slightly lighter/yellower in color than the Rakghoul Outbreak event crystals:

You could also get four cheaper +16 level 31 black/green crystals from that event.


Living in Switzerland as Italian

Question: I'm an Italian citizen. I want to travel to and live in Switzerland with my children, who have card residence eu limite from Italy. Do they require a visa or are they covered under free movement?
Comment: You are Italian, but your children are not?
Answer: To live in Switzerland you need a residence permit, not a visa. As an Italian you can freely travel to Switzerland for the purpose of tourisme of short business visits, and your family can accompany you. Normally you will not even encounter passport control when crossing the border.
But to live in Switzerland you will need to get a residence permit. And for that you will need to meet the conditions for a permit. You will need to apply for this permit in the Canton you intend to live. The procedures you can find on their website.
Your first job however will be to find a job. Have you started on this?
Comment: A job isn't necessary; see "Residing in Switzerland without gainful activity (PDF, 128 kB, 22.12.2020)" available from a link on [Living and Working in Switzerland > FAQ – Free Movement of Persons > Factsheets](https://www.sem.admin.ch/sem/en/home/themen/fza_schweiz-eu-efta/eu-efta_buerger_schweiz/factsheets.html).
Comment: what happens when an Italian visitor without a residence permit overstays in Switzerland? do authorities hunt them down? Are they punished at the time they do exit the border and they see then that you overstayed (somehow, given that train travel in and out of Switzerland to EU countries is never logged on passports, so there's no way for them to prove the duration of your stay)
Comment: @user610620 [All roads lead to Rome](https://en.wikipedia.org/wiki/Milliarium_Aureum): There is more than one way to determine if someone has overstayed. If you signed a rental contract more than three months previously and are still living there ; have been working longer than three months ; been paying utilities bills longer than three months ; your children have been attending a school longer than three months etc., etc., etc.
Comment: @MarkJohnson if someone was there in January, and next appearance was May, no one will know they were just laying low in April, which is the three months in between when they were supposed to leave. Interruptions between each 3 month allowance period can go completely undetected and they can't prove otherwise... as for paying rent longer than 3 months, plenty of foreigners still pay rent on swiss apartments they owned before their residence permit expired. landlords don't do an annual check on residence permits. and the state doesn't check if the landlord has been receiving payments
Comment: @user610620 Since the misuse is so small, a systematic checking is not considered worth the effort. That doesn't change the fact that through any cross checking cases may be noticed which could lead to a possible prosecution.
Comment: what do you mean by misuse

Living in Switzerland as Italian


Any way to watch Netflix on an iOS device running outdated software?

Question: We recently bought a used 1stGen iPad Air (MD788LL/A).  It looks like we can't install the Netflix app because it requires iOS 13, and our iPad cannot be updated to that version of the operating system.  Is there any way to work around this?  Is it possible, for example, to watch Netflix in the Safari browser?
Comment: Have you tried going to netflix.com in safari? Just curious if that would work, don't see why it wouldn't unless they block ipad for some reason. Don't have ipad so can't check myself.
Comment: At least related to https://apple.stackexchange.com/questions/378415/old-ipad-how-to-install-apps-without-other-device
Comment: @Harper-ReinstateMonica Yes, if you have an old version of Netflix it will work fine. The problem is that new versions will not, and old versions are not available for download unless you already have it in your purchase history.
Answer: It is a common thing among outdated apple devices.
If you have a friend, relative or access to any device with the latest iOS, just open up your account from them.
Install the app, delete it and log out.
Once you go back to your own device, the app will be listed in your "Purchased" section.
When you press download from there, the prompt will say something like (paraphrasing) "The latest version of Netflix is not compatible with your version of iOS, do you want to install latest compatible version?"
From then, you can install the app and use it up until Netflix cuts support for that version of app.
Comment: OK, so the limiting issue is being able to initially "purchase" the app into their App Store Account. (purchase price $0 of course).  That makes sense, App store doesn't want to take your money for an app if you can't run the latest version.  That explains my experience which is that Netflix installs fine for me on my ancient iPad.
Comment: @LuisFelipe Not to doubt you too much—but are you _absolutely sure_ it doesn't work for whatsapp? Whenever I've seen someone say this process doesn't work, it's because they weren't redownloading from the purchase history screen.
Comment: note: doesn't work with whatsapp
Comment: Hello @Wowfunhappy, you can download the app in a previous version, but it will warn you that "you can only use WhatsApp with the last account associated to this device". Here is a problem if you opened WhatsApp on a new device. I can go furthermore this step due to application login fails. You can download yes, but maybe you can login
Answer: If you don't have access to a newer iOS device, or don't want to mess up the accounts on your friend's phone, you can "purchase" an app through an older version of iTunes.  Apple provides links for the last app store enabled iTunes versions.
Of course, not all apps will work on older devices, even if there's a version of the app that's compatible.  For instance, an online game might no longer be supported on the game's servers.  Or Netflix could drop support for older iOS devices.
Answer: If you're looking for a more long-term solution, you can probably jailbreak your iPad considering its iOS version. There are multiple jailbreak tweaks such as AppAdmin that allow you to download and install earlier versions of applications; you can find one that is compatible with your device, and then use it.
Comment: Best solution. Always jailbreak/root your device, take back control over your hardware.


What do we call a function that outputs 0 on half and 1 on the other half of all inputs?

Question: I have a Boolean function that outputs a one on half of its inputs and outputs a zero on half of its inputs, the inputs are assumed to be coming from the uniform distribution. Another way of saying this is the output is one half the time and zero half the time, on average. What is the scientific notation for describing this output scenario?
Answer: A boolean function is called balanced if it is zero on half its inputs and one on half its inputs.  So, "balanced" might be the term you are looking for.
Comment: @MaryanneThomson The scientific notation is to say that the function is balanced. If you want symbolic notation, you can invent one yourself, since no standard one exists.
Comment: Thank you DW, but I was not looking for a "word term", but scientific notation, like LA-TEX.
Comment: @MaryanneThomson, OK. I'm not sure what you are looking for, then.  Please try to edit your question to give a more detailed explanation of what you're looking for, how you will recognize an answer that meets your needs, an example (of something similar), something like that.  (By the way, for your information, nomenclature tends to refer to a name or terminology, so that might not be the word you want to use in the title of your question.)
Answer: If there's a word for it, use that one (see other answers).
Mathematically speaking, you look at functions $f : X \to \{0,1\}$ so that
$\qquad\displaystyle |f^{-1}(0)| = |f^{-1}(1)|$
where $f^{-1}$ denotes the inverse image of $f$.
So this is how one could define the property:

Let $X$ and $Y$ be finite sets with $|X| \in |Y|\mathbb{N}$.
A function $f : X \to Y$ is balanced if
$\qquad\displaystyle |f^{-1}(y)| = \frac{|X|}{|Y|}$
for all $y \in Y$.
Answer: If you absolutely insist on using symbolic notation, you can state that $\mathbb{E}[f] = 1/2$ (i.e., the expectation of $f$ is $1/2$, presumably with respect to the uniform measure over all inputs). You could also state that $\hat{f}(\emptyset) = 1/2$ (i.e., the Fourier coefficient at the empty set equals $1/2$), but $\mathbb{E}[f] = 1/2$ is probably better. Both of these assume that you already know that $f$ is Boolean.
Comment: I dislike this because it admits more scenarios than the question. That is, non-uniform measures with unbalanced $f$ can still yield an expectation of $1/2$.
Comment: I like this answer the best, sorry I can't upvote , you guys are all so smart!
Answer: You could say that that boolean function follows the bernoulli distribution where an outcome of success (outputting a 1), with probability $p = 0.5$, and an outcome of failure (outputting a 0), with probability $q=(1-p)=1-0.5=0.5$. Depending on your context you can also make an output of 0 your success condition and flip your failure condition.
In terms of notation, if $x$, represents an arbitrary input, and you have such a function $f$, you could say $f(x) \sim Bernoulli(0.5)$ and $Pr(f(x)=1) = 0.5$, meaning that the probability of outputting a one on input x is 0.5 and the former porton means that f(x) follows the Bernoulli distribution.


Why is there a diode connected in parallel to a relay coil?

Question: In most electrical circuits with a relay, a diode is connected in parallel to the coil of the relay. Why? Is it always a good practice?
Comment: The diode is a really good idea. It's called a freewheeling diode. This answer covers the details (and that's why I put this as a comment only): http://electronics.stackexchange.com/a/56323/930 Scroll to where it says "Some Background Info". In short, the diode takes the energy stored in the relay's coil when you switch the current off. Without the diode, the energy has no place to go and will cause a large and probably destructive voltage spike.
Comment: @zeb Freewheeling = flyback?
Comment: @JYelton, freewheeling is kind of like flyback, but flyback usually moves the energy somewhere else,  the freewheeling diode just short-circuits the coil and lets the coil's internal resistance and the diodes voltage drop consume the energy.
Comment: Possible duplicates or related: http://electronics.stackexchange.com/q/97563/2028, http://electronics.stackexchange.com/q/15505/2028, http://electronics.stackexchange.com/q/51355/2028, http://electronics.stackexchange.com/q/78676/2028
Answer: Since an inductor (the relay coil) cannot change it's current instantly, the flyback diode provides a path for the current when the coil is switched off. Otherwise, a voltage spike will  occur causing arcing on switch contacts or possibly destroying switching transistors.

Is it always a good practice?

Usually, but not always. If the relay coil is driven by AC, a bi-directional TVS-diode (or some other voltage clamp) and/or a snubber (series RC) need to be used. A diode would not work in this case as it would act as a short-circuit during the negative half-cycle of the AC. (See also Red Lion SNUB0000 for application info)
For DC driven relays, a diode is usually used, but not always. As Andy aka pointed out, sometimes a higher voltage than what is allowed by a diode alone is desired for faster turn-off of the relay (or other such as solenoids, flyback transformers, etc.). In this case, a uni-directional TVS-diode is sometimes added in series with the flyback diode, connected anode to anode (or cathode to cathode). A series resistor could be used in place of the TVS-diode, but the clamping voltage is more deterministic if the TVS-diode is used.
If a MOSFET is used as the switching element, normally you still need the flyback diode as the body diode is in the opposite direction to do any good. An exception to this is a MOSFET that is "Repetitive Avalanche Rated" (such as IRFD220). This is normally drawn with a zener diode symbol for the body diode. These MOSFETs are designed to clamp the voltage at a level they can withstand, allowing the higher voltage for quicker coil turn-off. Sometimes an external uni-directional TVS-diode (or zener) is placed in parallel with the MOSFET for the same purpose, or if the MOSFET cannot handle the "Repetitive Avalanche Current" or "Repetitive Avalanche Energy", or if the avalanche breakdown voltage is higher than desired.
Comment: @Sz. Thanks for the comment and for providing a working link. Fyi, here is a revised link to the original Semtech doc: https://www.semtech.com/uploads/documents/what_are_tvs_diodes.pdf ... Either link should be adquate for anyone needing further info on TVS diodes.
Answer:
Is it always a good practice?

It's nearly always good practice and it's very effective BUT, if you are needing a relay that deactivates as quickly as possible then there are alternative methods. The reason it is slow is because when the circuit to the relay coil opens, all the energy stored in the relay coil forces a current thru the flywheel diode until that energy is "spent".
The diode acts like a short circuit with a small forward volt-drop and with the resistance of the relay (maybe 100 ohms), it will delay the relay de-activating a few extra milli-seconds. This is not usually a problem but, if it is, then putting a resistor in series with the diode means the energy is "spent" significantly quicker.
The down side is that your controlling transistor has to "suffer" a voltage pulse that is significantly more than Vsupply + 0.7V - it may be twice the supply voltage when using a resistor but, in most circuits, finding a transistor that can be adequately rated is not usually a problem.
Comment: To avoid the possible (minimal, however) delays caused when adding a diode in anti-parallel over the relais, you could put a zener diode over the CE of the transistor instead (anode to emitter/ground, cathode to collector), with a zener volage slightly lower than the Vceo max of the transistor.  For instance, in case of a BC547, you could take a zener diode with a zener voltage of 30V (Vceo max of a BC547 is 45V).  This will create a faster deactivation of the relais.
Answer: When the current through a coil is switched off, the coil (being an inductor) will try to maintain the current. When there is no path for this current the voltage across the coil will increase rapidly, and the current will find a path, right through the isolation of a chip or transistor, destroying that component. The diode provides a path for this current, so the energy stored in the coil can be dissipated safely.
So yes, it is a good idea to provide a discharge path.
A diode parallel to the coil is probably the most often used way, but there are other ways, like a snubber (R+C) or a zener diode to ground. A resistor in series with the diode can make the relay fall off faster.
Comment: Will try to -> WILL :-)
Answer: When an electromechanical relay is de-energized rapidly by a mechanical
switch or semiconductor, the collapsing magnetic field produces a
substantial voltage transient in its effort to disperse the stored energy
and oppose the sudden change of current flow. A 12VDC relay, for example,
may generate a voltage of 1,000 to 1,500 volts during turn-off. So it is a common practice to suppress relay coils with components which limit the peak voltage to a much smaller level by providing a discharge path for the stored magnetic energy.
Using just a freewheeling diode is not always the best practice. Here are a few suppression methods:

A bilateral transient suppressor diode
A reverse-biased rectifier diode in series with a zener diode C. A metal-oxide-varistor (MOV).
A reversed-biased rectifier diode in series with a resistor.
A resistor, when conditions permit its use, is often the most
economical suppression.
A reversed-biased rectifier diode.
A resistor-capacitor "snubber". Generally the least economical
solution and no longer considered a practical solution.
A bifilar wound coil with the second winding used as the
suppression device. This is not very practical since it adds
significant cost and size to the relay.

The suggested technique for relay coil suppression is to used a reverse biased rectifier diode and a series zener diode in parallel with the coil. This permits the relay to have optimum release dynamics and a good contact life.
Answer: Whenever current flow through a coil of wire stops, a voltage spike is created. This spike results from the collapsing of the magnetic field around the coil. The movement of field across the coil produce very voltage spike which can damage electronic components. This is when clamping diode comes into play. By installing C diode in parallel with coil, a bypass is created for the electrons during the time circuit is open or current through coil stops.
Comment: What is a 'C diode'? Discussing electrons is not useful and causes much confusion. Almost all circuit analysis is done using conventional current (flowing from positive to negative). Welcome to EE.SE.
Answer: As others have mentioned, the diode is connected "anti-parrallel" , i.e. it is wired in "backwards" so it does not conduct in normal operation.
It's primary purpose is to limit the voltage appearing across the relay when it is turned off, which in turn limits the voltage across the switching element (bipolar transistor or MOSFET or relay contacts) which protects the switching transistor from failing due to overvoltage.
The diode only works in DC circuits, an alternative is needed for AC circuits (e.g. a varistor or resistor + capacitor.
The drawback of using a diode is that the turn_off is a lot slower than turn_on of the relay (or solenoid) , this could be a problem for a relay as it's contacts will open slowly, and possible arc. It might be an advantage for a hydraulic solenoid, as the valve will close slowly without water hammer.
If an alternative higher supply voltage is available, then the diode could be connected to this; for example powering the relay from 12v, and having the diode go to 24v means the switch on and switch off times would be roughly similar, and the stored energy is dumped into the 24v supply. If the coil is to be switched repeatedly then a lot of energy will be wasted with the simple diode circuit, a slightly more complex arrangement can recover most of the energy.
Another drawback is the diode circuit does not limit the voltage rate of change, known as dV/dT, this can be a problem if the switching element is a set of contacts, as it will cause the contacts to arc over, in that case a snubber using resistor + Capacitor or Resistor+Capacitor+Diode would be needed to limit the "off state dV/dT".
The high dV/dT can also create EMI , and general purpose diodes like 1N4001 are very slow switching, so can easily generate a 5nS wide high voltage pulse before snapping on, so a clamp diode should be a schottky diode to avoid EMI.
Just having a clamping diode across the coil does not prevent all failure modes, for example plugging and unplugging the coil into a socket while active  or bridging the transistor with jumper clips can damage the switching transistor due to the extreme dV/dT involved.


Where can I go using a Portuguese temporary residence card?

Question: Can I travel anywhere in the EU with a Portuguese Golden Visa temporary residence permit and my South African passport, i.e, without any Schengen visa?
Comment: Don't confuse the Schengen zone with the EU. The Uk, Ireland, Cyprus, Bulgaria, Romania and Croatia are EU members outside Schengen, and Switzerland, Iceland, Norway and Liechtenstein are Schengen members outside the EU.
Comment: @MLewis You can check https://www.gov.uk/check-uk-visa/y to find out if you need a UK visa. In general SA citizens typically need a visa to enter the UK, a temporary residence card for any of the Schengen countries makes no difference to visa requirements for the UK.
Comment: I know you asked about the EU, but you can also visit other countries outside of the EU (like Turkey) on the basis of your Schengen residence card. You still need a visa, but you can get it online in minutes.
Answer: With a residence permit from a Schengen member state, you can travel to other Schengen member states, and sometimes to states which are in the process of joining the Schengen area, without a visa. The typical permitted stay is 90 days out of 180, as with other visitors, but it may vary with states that have not yet completed the process to join the Schengen area.
Comment: You might want to add that a visa for UK would be required. OP asked about EU, but also referred to Schengen visa as an example.


How to choose between a race bike like a Madone and a classics bike like a Domane

Question: I ride regularly for exercise in New York City but do not race. I currently ride on a steel frame that handles the rough roads easily. I want to buy a carbon bike and am torn between a "classics" bike like a Domane or a Roubaix and a race bike. My rides are usually around 2-3 hours so comfort is nice but not essential. I appreciate quickness in traffic and am comfortable with a race bike geometry but am worried about durability. Any advice on how to think about these trade offs?
Answer: I think you answered your own question when you stated "I don't race."  I know many in our club who enjoy the Roubaix.  I personally prefer riding my steel Soma ES over my carbon race bike for most things, including fast club rides.  Don't get me wrong, a twitchy race bike is great in a crit, but the other non-race bikes have had their design optimized for non-race road riding.  It is too easy to get up caught up in all the bike porn the industry pushes.  A solid, well sorted, well maintained, properly fitted road bike of any class and age can be a great riding tool.
In the end this is just all opinion, but I would be careful not to get caught up in the industry's push for "race" performance, which only serves a small minority of road riders.
Comment: I would also ask yourself why you feel you want/need a carbon bike? Do you just want something lighter? There are plenty of options out there including aluminum, titanium and mixes of alloy and carbon. There are many bikes that are aimed at riders like yourself who want a well built bike but do not race. They are often classified as "enthusiast" bikes. They are well-built but the geometry is meant for club rides and non-race situations. As for durability, most parts on the higher end will be similar. I'd stick with alloy wheels over carbon as they will take the brunt of the city's torture.
Comment: @ThaRiddla - I still have my carbon bike from my days as a cat 1/2 racer.  Occasionally, I think of getting back into racing again, but life is so busy at the moment.
Comment: Another option, if you have the budget, is to actually have a bike built for you-- or order one with custom/semi-custom geometry. This can be done either through a individual framebuilder or through some vendors that build to order. You just have to have a firm idea of exactly what you want out of the bike.
Comment: @Angelo - If you are unsure what class of road bike will work for you, I am uncertain building a bike with custom geometry makes sense.
Comment: @Rider_X, my comment was aimed at the OP :) I've found life sometimes does get in the way of racing/riding as well.
Answer: Ask yourself a question...if you end up getting a Roubaix, for example, will you buy it and still be hankering after a carbon frame? If that's the case then perhaps it would be better to get the carbon frame now rather than to get a bike, be not entirely satisfied with it, and end up buying a carbon bike anyway in a year or so.
I just mention this perspective because that's exactly what happened to me. Nothing to do with what you actually need, nothing to do with whether you'll race or not, in fact quite irrational. But that's how many people think (and of course the manufacturers know this - those $10,000 bikes sitting at the top of their range aren't aimed at the professionals, but at hobbyists with money to spare).
The only concrete thing I can add is that I previously owned a 2010 Trek Alpha 2.3 - same geometry as the Madone but an alu frame. Obviously we're all different shapes and sizes but I found it easily comfortable enough for long, six hour rides, so I doubt you'd have a problem comfort-wise. And durability? Well, look at the warranty periods the manufacturers offer on their frames and that should give you an idea of what they think the odds are of failure.
Hope this helps.
Comment: Saddles and pedals. Think test ride. Setting someone up for a quick test ride, it's easy to move their pedals (which match their shoes!) and easy to change saddle height. Putting the saddle itself on can be somewhat of a pain, so you put one. Also...a bike without pedals looks like a bike. A bike without a saddle looks incomplete.
Comment: @Kibbee, that's kind of my point. Speaking for myself and I suspect a lot of other people a $5000 bike will give me nothing much over a $1000 bike. But people buy them because they want them and can afford them, not because it'll make them world champion. Obvectively it makes no sense to spend the extra, but its no different from many other things in life. Why does a guy buy a Ferrari when he's only allowed to drive it at the same speed as the guy with the Ford?
Comment: oh, and my dream bike is the top-of-the-range Bianchi (think its about £9000, so that's $15,000). Why? 'Cos it looks like sex on wheels. A totally nonsense reason. But maybe one day when I have that kind of money to spare....
Comment: I've always thought the idea of $5000+ bikes to be a little odd.  At the point where spending $5000 on a bike would give you any advantage, you should probably be at the point of buying the parts individually to suit your personal riding style and abilities, and possibly not paying for the bike (sponsorships etc.)  Every time I see a fully assembled (minus the pedals) bike for $5000+ in my LBS I laugh a little. Also why do they always leave off the pedals but include a saddle?  The saddle choice is way more personalized than then pedal choice.