why are there so many tools/technologies to do same task in open-source community

Question: I recently started learning open source technologies and very soon got frustrated as there are thousands of technologies and tools (each one having their own pros and cons). I am wondering if Windows approach of "All in One" is actually better.
Comment: I know there are different licensing issues involved, but still it makes it difficult for the users.
Comment: After seeing all the posts I realize that the problem is not with the idea of FOSS itself.. I think its a wonderful idea. otherwise we would have a monopoly. But we need to standardize things. May be a ranking system where different tools/technologies are ranked and compared on different aspects like stability, active development, bugs etc... there are quite a few sites but no central place. I think that would be a great idea.
Answer: Why are there so many companies that produce cars, bread and tables? Wouldn't it be more productive to consolidate them into a singe mega-car, mega-bread and omni-table company?
Comment: +1 because I assume you're playing Devil's Advocate.
Answer: I think a big reason for this is because people want to make improvements to something that had the right idea, but it wasn't being applied well (or the way they wanted it to be).
Some software is also a popular choice for projects among University/College students for finals that they end up continuing development on afterwards. You can't always come up with something useful and easy enough for a project that hasn't been done before.
Answer: A) Redundancy is not an exclusive FOSS phenomenon. Even monopolies have their (less notable) competitors -- while almost everyone uses Adobe Photoshop for raster graphics, some still use similar programs by Jasc, Corel or others.
B) Doing the same thing doesn't mean they're doing it the same way. Even if two programs seem almost identical, they usually differ in functionality, interface or paradigm. Merging "the best of both worlds" would often result in usability nightmares and inconsistent behaviour.
C) The easiest way to learn how something works is to make it yourself. Nothing teaches you as much about the way a certain API or language works as writing software in it. Often these toy programs end up becoming useful in some way or another and some of them eventually find widespread use or get picked up by a skilled programmer finding potential.
D) If programmers migrate, software has to, as well. Sometimes you learn a new language or settle on a better one only to find out your favourite API or application doesn't support it. Porting them to your new language of choice often leads to further changes making them unique and distinct from the originals. In some cases they'll get ported back to their original language and the result is reminiscent of a game of FOSS telephone.
E) Everyone has an opinion. Not every feature request results in a feature and not every program is up to the unique task at hand. Also, some people just crave perfection. The beautiful thing about programming and FOSS in particular is that if you THINK you can do it better, you can actually go ahead and try. No DMCA to stop you either.
If you want, you can look at it as an evolutionary process, yes. Some programs and APIs find their niches, some become stupidly popular and some just linger in obscurity or get eaten by the dreaded 404. But as long as there's still some traces of it on the web, someone could still go ahead and pick it up and breathe life back into it -- this is what distinguishes FOSS from non-FOSS. Death is not a dead end.
Answer: I think the main reason is people tend to suffer from the NIH syndrome (Not Invented Here). Most of us suffer from this but in controlled environments we are restrained in what we do. In the FOSS domain people don't have such restraints.
There are countless examples where people have insisted on doing something differently even when it's blatantly worse than the existing solution. This is actually quite an intriguing thing in FOSS where we are supposed to "steal" from each other. Look at KDE and Gnome for instance. Both camps are determined that they look different from the other camp so sometimes they make changes that really don't work just to differentiate.
In most cases it would be much easier to take an existing code base and make your changes there, but there is a certain satisfaction in knowing that you did the whole system yourself. But there is an upside and that's that you get far more new ideas when people start from a clean slate.
Answer: Actually in Windows too there are a lot of different tools for the same task. Just look at the plethora of editors and IDEs that are available.
The reason why open source has so many has much to do with the open source model itself. IF I don't like the way you have implemented something in your open source software, I can branch out. Each time I branch I create a new version of the software. Github takes this to a new level by encouraging developers to branch. Sometimes the hope is that the branched software will have innovations that can be integrated back into the original software. Sometimes it happens that the branched software takes a life of it's own.
Answer:
I am wondering if Windows approach of "All in One" is actually better.

Hmm, maybe people would still be using visual source safe as the "one and only" source control system.
No Thanks.
Answer: It all starts with an "itch". When people dont find "exactly" what they want, they start writing their own. Even if the differences are minor. Also NIH (Not Invented Here) syndrome plays a role.
But given sufficient time, the good ones stand out. Tomcat emerges as the leader for servlet container, Apache for webserver, Eclipse for IDE, MySQL for database and so on.
Open source is all about freedom. We'll have to put up with this problem of plenty.
Answer: From my perspective it's an important part of the evolution in the open source ecosystem.
People tend to start their own projects if they don't like how someone is doing a similar project in terms of code/programming language/project leading/focus. When they do it well, the project will grow until it supersedes its predecessor. If it doesn't do well it won't "live" long or continues to be a small hobby project with only a few users.
That's evolution.
And as some other people stated, on windows are duplicated solutions too, like IDEs, Office suites, ERP programs, even games.
The choice that a user has to make may be hard for non educated users, but that's why there are PC magazines or just professionals, that (think to) know what software is good for which purpose.
Answer: They both have their advantages. Which one you prefer to use on a regular basis is purely a matter of what works for you.
Answer: Since you didn't specify what kind of programs exactly, I guess you talk about software development tools.
First, I'd like to point out that on windows there are many programs that do the same thing too.
Second, we don't live in ideal world, and tool A is good for some cases, but doesn't do well for other cases, tool B is ideal for cases that tool A isn't good with, and tool C requires you to invest time getting involved in internals of other tool, library, soure code, et cetera, but it handles almost any case a lot better than tool A or B.
As a tool developer/contributor point of view, if I don't like how my favourite project is being developed and I do have something to contribute (like a bug fix) but the project maintainer rejects for any reason (for example 'give me money'), I can fork off the project and do what I want myself. Eventually, if my contributions are useful for many people, my project will probably will be useful than the original one.
Answer: Both in the open source world and in the non-free world, dozens or hundreds or thousands of people or groups start to work on some problem. Many of them have to give up early. In the world of commercial software, they simply disappear, hardly leaving a trace. In the open source world, they are just another abandoned project on sourceforge.
For many tasks, only very few solutions survive. In some cases, more than one solutions survive, but only because each solution offers something that other solutions lack. Obviously, conflicting goals (e.g. resource usage vs. eyecandy) make it more likely that different solutions exist, where each solution emphasizes one goal.
Answer: There are many tools, because people create different solutions and approaces. But then again, I am using only SubVersion for version control and not going anywhere else so far. There are many tools, but you don't need all of them. What is needed is a good categorization of the tools according to type, features, usability, popularity, support, continuity, what works with what, and so on. Then you just pick what you need. I agree that there is work to do in open source world, but for example SubVersion is quite easy to install and use.
Sure Windows world is alternative to open source. But it isn't necessarily better, if a component you need is in fact open source, you want to go to open world, want to save in license fees, or such.
Answer: Basically, it's a combination of NIH Syndrome and an understanding of Open Source as a learning tool rather than a method used to create a product.
I don't think NIH is necessarily bad in Open Source, mostly because a really high percentage of Open Source projects never make it out of the "hobby" stage.
Answer: I have built complex systems on both sides of the fence, both FOSS and also on Windows platforms.  While I love the free-ness and flexibility of Linux-based systems (making architectural decisions based on license costs instead of what you really need sucks), I can say with absolute certainty that I get more done with less people on Windows.
With FOSS, if you have a complex system and hire a new programmer, you generally need weeks to spin the person up on all the different pieces of the puzzle - languages, compilers, tools, etc.
Every Windows programmer I have hired in the last few years has been checking in code within one day of starting, sometimes within a few hours.  That's the benefit of a homogenous platform.  I'm guaranteed to get somebody who already knows our whole stack.
You really have to do a cost-benefit analysis of FOSS, to see if you really are in fact saving money.  If you can get by on just one less person, over the course of a year, how much does a developer cost you vs. your license costs?


Threaded portion of corny keg - removable?

Question: I am trying to change over 3 pin-lock kegs to ball type. I got the posts and they include the threaded portion that normally protrudes from the top of the keg. Everything went fine for 5 out of 6 posts but the threads on the keg for the last post must be worn or a slightly different thread size because the new post won't tighten properly. The guy who sold me the kegs said to just hammer out the threaded part out of the keg body and install one of the new threaded parts. Sorry this is clumsy - I don't know the right term for the threaded male portion of the keg. Anyway I'm a bit dubious about taking a hammer to the keg - it's not clear that this part is ever intended to come out - perhaps welded in place? There is rubber right up to the edge so hard to see how it is mated to the keg body. So... hammer or not?
Answer: I have never seen a keg where the threaded part was removable.  If you got some out, they obviously must be, but I think you've run up against one like I've seen.  I'd approach it differently....first, you can try to find an appropriately sized post by using this chart...http://www.ipass.net/mpdixon/KegThreadSizes.htm .  Or do what I do...use threaded (flare) fittings (http://www.northernbrewer.com/shop/ball-disc-1-4-mfl-gas.html , for example) on your gas lines so you can just screw on the proper QD for either pin or ball lock kegs.
Answer: NO don't hammer it
All my cornies are ball lock and the threaded post is a part of the keg body on all of them.
You can get replacement posts to screw into the threaded portion but I have no exprience if the ball lock and pin lock outlets use the same size of threded post.


How do breakaway helmet accessory mounts work?

Question: I've seen it said that when mounting things such as a light or camera on your helmet you want a breakaway mount so that in the event of a crash the helmet slides along the ground rather than snagging on it.  What is it about these mounts that lets them break away?
Comment: Theres a bit more to it than just a fragile clamp.  The item has to break away safely on a side impact as well as a direct frontal impact.  A helmet-mounted camera is what exacerbated Michael Schumacher's skiing accident, by focussing the impact not dissipating it.
Comment: Designed-in weakness.
Comment: Fragile plastic?  Slender straps?  Scoring a piece where it's supposed to give way?
Comment: Whatever it takes.
Answer: My Light and Motion helmet light has two built-in weaknesses that seem designed to fail on impact, tearing the light away from my helmet and not allowing any impact torque to transmit through to my neck:

The light and battery plastic mounts (the plastic-to-plastic connections) are intentionally weak and will pull away with very little force
The velcro that connects the mounts to the helmets isn't very strong and would tear if there was greater lateral force on them

I haven't tested the breakaways in an accident (and don't hope to) but I can say that the light and battery have released when I've hit them on low ceilings in my garage, to my chagrin.


How can I identify which cylinder is responsible for a petrol engine misfire?

Question: My petrol engine has developed a persistent misfire. How can I figure out which cylinder is the culprit in order to hone in on the root cause?
Answer: It is easy to tell a misfiring engine as it will transmit unusual vibrations that vary in severity with engine load. A misfire occurs when a cylinder fails to ignite the air/fuel mixture at the right time and could happen due to a wide range of reasons, including lack of spark (a bad coil), lack of fuel delivery (clogged fuel injectors) and improper ignition timing (out-of-spec cam timing).
There are several ways to identify the cylinder(s) responsible for the misfire:

Use a code scanner. Most modern-day vehicles come with an engine control unit (ECU). One of the jobs of the ECU is to store engine faults, and infers the misfiring cylinder based on the readings coming from the engine knock sensors. While this approach is quick and easy, it is not always guaranteed to register the responsible cylinder.
Infer by elimination. The principle behind this approach is quite simple - if a firing cylinder is disabled while the engine is running the vibration "signature" will change, while if a misfiring cylinder is disabled then there will be no discernible change in engine note. This test is best done with the engine running and with appropriate PPE as it will invariably involve disconnecting coils/plug wires one-by-one. After each cylinder is tested, the coil/plug wiring should be reconnected to restore the engine note back to its baseline.
Observe the thermal signature. A misfiring cylinder will not generate the same level of heat as a firing cylinder. This test is best suited to engines with easy-to-access exhaust headers. With the engine cold, start it up and let it run for a few seconds before turning it off. By figuring out which parts of the exhaust header(s) are cold (an IR temperature gauge should work well here), one can hone in on the misfiring cylinder. This test doesn't work well if the engine is run for too long as the heat generated will even out across the headers.
Comment: You do not want to test cylinders by removing plug wires. In many newer vehicles, this can actually cause bigger issues with the ECU and/or ignition system. You can use other methods which involve grounding that plug wire to get the same effect without damage to the system.
Comment: @Paulster2 : Can you explain the possible issues in more depth? I have used the technique I've described to troubleshoot an LS1 motor without problems, but you have more experience than me.
Comment: You need to do it one of two ways. 1) Use an [in-line spark plug tester](http://img.rakuten.com/PIC/5571849/0/1/500/5571849.jpg), or 2) ensure the spark plug wire is grounded to listen for the difference. By pulling the spark plug wire while running, you run the risk of shorting/burning out your coil (especially in your case with the coil over setup). Your suggestions are good and thorough. Using a thermal IR temp sensor is a great way. Even if the engine is running, the temperature at the "dead" cylinder is going to be much cooler. How much, though, depends on the type of vehicle.


How or what coding format do I use?

Question: I'm wanting to change a book called Being and Nothingness by Paul Satre from pdf to something a phone app called UB reader will recognise, I am using calibre-ebook.com, but don't know which format to use, so far it's nothing but a mess. Or should I copy the entire book to Windows notepad, and then convert it from that? Please help, thank you.
Answer: If you are referring to this website: http://www.mobisystems.com/android/ub-reader/ for the UB reader app you mention in your question; then they state on their homepage that the:

Universal Book Reader is a stylish and user-friendly eBook reading app for Android.
UB Reader provides a comfortable reading experience for Android smartphones and tablets, allowing you to read EPUB and PDF files - DRM-protected and otherwise. An integrated file browser allows you to quickly add any eBook stored on your device, over email, or through the Feedbooks.com online store.

So if you have the content in an EPUB or PDF format you should be good.
From a professional production standpoint Calibre is not recommended, there are a lot of validation and poor coding standards used by Calibre.
Therefore converting it in InDesign or possibly professionally having the epub converted is advised.
InDesign should have no issues creating an ePub correctly. Be sure to export the fonts correctly though to avoid font licensing issues.

How or what coding format do I use?


Add custom Text Layout to Wiki library

Question: In SharePoint 2010 Foundation a wiki library have 8 text layouts (One column, One column with sidebar, etc..)
How can I add custom text layouts?
Answer: You Can change Master Pages, and from this You Can change Layouts. You Can change Layouts in Microsoft Sharepoint Designer, or in Visual Studio.
And here You have a Example in Sharepoint:
http://www.dummies.com/how-to/content/create-a-new-wiki-content-page-in-sharepoint-2010.html
And here is how to do this by Visual Studio:
http://www.sharepointeurope.com/blog/2012/4/6/how-to-modify-standard-%28non-enterprise%29-sharepoint-2010-wiki-page-layout

Add custom Text Layout to Wiki library


Why is Big Mom afraid of Shanks?

Question: Why is Big Mom afraid of Shanks? Is it because of his ultimate Haki? Or is it because of the fact that he even survived after clashing with Edward Newgate and getting in a war with Kaido?
Comment: Where did you read this? BM is not afraid of Shanks. She does not want to take his forces head on, yes because he is a fellow Yonkou. But it is no where stated that she is afraid of him.
Comment: I agree with @Ashray. Two years later a reference is still needed here.
Answer: Big Mom is arguably the weakest Yonko, but she makes up for this by forming allies with different nation. Hence, the numbers of her offspring.
Shanks is definitely a force to be feared for good reasons.

He has only 1 ship - As we currently know, Shanks only has a caveat of a crew in 1 single ship and that says a lot. Numbers in the OP world can mean a lot and him being in the New World with just a single ship and exceptional crew members who are known to be great at Haki (Beckman, Lucky Roo and Yasopp).
Former Cabin Boy of the Pirate King, Roger - He was known to be a part of Roger's Crew with Buggy, although this doesn't mean much because of the latter's credibility, being part of the crew might help him develop his Haki.
Haki Strength - Shanks is shown to be a master of 2 types of Haki, Armament and especially Conqueror's Haki, greatly depicted when he boarded Whitebeard's ship. He also used to occasionally fight with Mihawk, the World's Greatest Swordsman before his arm got severed.

Just these three alone would make you fear the red-haired Pirate. Also, he interrupted Kaido's attempt to attack Whitebeard during the Battle of Marineford and stopped said battle by just announcing the war is over which prompted Sengoku to do it which proves that Shanks is definitely someone you don't mess with.
If he can stop Kaido, the World Government/Marines, and make Blackbeard shiver then this just proves my point.
TL;DR Big Mom is afraid of Shanks because he's just too powerful for her.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/103129/discussion-on-answer-by-shan-coralde-why-is-big-mom-afraid-of-shanks).
Comment: "Kaido's attempt to attack Whitebeard during the Battle of Marineford" ?? Kaido was not even there at that time. Shanks interrupted Kizaru's attack, not Kaido's. Plus it was on Koby, not on Whitebeard. At the time of his appearance, Whitebeard was already dead. So I'm not quite sure what you mean here.
Answer: I don't think Big Mom is afraid of Shanks. She was just being very cautious about him, and any other Yonko. She had a plan to take him down and any other Yonko by getting Lola married a giant Elbaf prince but failed to do so because Lola ran away from her.

She want the giant army, Germa 66 technologies, and all her alliance not because she's afraid with Shanks or any other yonko. But because she want a certain victory against them. She's not Luffy who would run against stronger opponent without thinking ahead...
Comment: I wonder if the last panel actually says "I would have been Pirate KING!". Cuz BM is female.
Answer: Rather than the weakest Yonko, I would say that Big Mom is arguably the strongest. Indeed, she has never been defeated. Whitebeard was taken down by characters who wouldn't make Big Mom blink. Even if Kaido and Whitebeard are physically stronger, which I actually doubt, she has invulnerability far eclipsing Whitebeard and certainly Shanks. That doesn't even touch her Devil Fruit power and the god-like life-force she was born with. Or her Haki, which enabled her to demolish Gear Four Luffy in ONE BLOW.
Comment: Definitely agree with ya, her weakness is pretty much food. Which makes Sanji her natural enemy lol.
Answer: I think Luffy is the weakest yonko even tho he doesn't realize he's a yonko but he will be able to defeat all of them because he is MC so there's that but the only reason Luffy became pirate was because of shanks so shanks also has plot armour because he's like a father to Luffy so that proves he is shanks is stronger than all the yonko but only we viewers know that and so does Oda-chan so Oda-chan makes everyone scared of shanks
Answer: In my opinion, I feel Shanks is the strongest Youkou so far at least, I feel like his Haki and swordsmanship is great enough to rival Mihawk and maybe be stronger.
I also feel like this because if you read the manga or watched the show, you'll know that one time Shanks was walking on the deck of Whitebeard's ship, and his Haki was so powerful he was not only knocking out people with it, but he was splitting the wood with the sheer force! He also clashed with Whitebeard - one-armed, mind you - sure they didn't actually fight, but still impressive.
Shanks also basically stopped the war by just saying "If you want to fight me, fight me and my crew", and just like that, the war was stopped, showing just how intimidated people are by him.
If that's not enough, he went through a whole war with Kaido and came out without a scratch or bruise -- this is the same person who one-shotted Luffy with his club.
Answer: Big mom could be the weakest Yonko because her power really revolves around fear. It has been shown that if you fear Big Mom, she can take your soul or life. But if you don't fear her you can probably win against her. Since you aren't effected by her power at all. There is still a chance that she can win by using haki and her size to her advantage.
So if other Yonko don't fear her they could most definitely win if their skilled enough and can put match her in haki. And be able to cut her think skin.
Comment: Hi. As much as possible, please try to cite sources to further strengthen your answer. Thanks!
Answer: The mystery surrounding Shanks' powers and capabilities is suffocating in a sense. Compared to Big M, I think Shanks would win. First of all, the Yonkou rarely attack each other which makes a head to head comparison quite difficult. It is, however, important to note that Shanks' straw hat is basically the star of the show. Power recognizes power. The hat belonged to someone else before Shanks, guess who? This cannot be used as concrete evidence but it definitely means something. Also, Shanks could hold his own against Mihawk, White Beard and Kaido's forces despite not having a devil fruit ability. Even Black Beard needs time to gather enough strength to challenge him and that speaks volumes. In conclusion, the other Yonkou might be extremely powerful but everyone in the OP world, from the government to the navy and the Yonkou themselves, recognizes that Shanks is in a league of his own. Remember, this is just a biased opinion so do not treat it like concrete fact from statements in OP.
Comment: Answers must be supported by facts and should be cited properly. Answers without references or opinion-based answers are heavily discouraged.

Why is Big Mom afraid of Shanks?


Do ghost type Pokémon appear only at night?

Question: I've seen it mentioned in few answers here that ghost type Pokémon appear only at night. Is this true?
Comment: http://gaming.stackexchange.com/questions/273802/where-can-i-find-purple-type-pokemon?rq=1
Comment: @Dragonrage: That question is about ghost, poison, and psychic type Pokemon. It's a little broad. My question is specific to ghost type Pokemon.
Comment: I have caught multiple gastly's in the morning and night and evening, as well as a couple of haunters in the afternoon... So I can attest to every answer that says no to this question.
Answer: No, it's not. For starters, here's a Gastly around 4pm in the afternoon.

I've also been playing the game until 2 am every night since the game was released and haven't seen a single ghost-type Pokémon in the wild at night. It is doubtful that time of day is a factor for them, which means they're probably location dependent, just like other Pokémon.
Comment: Be (more) careful (compared to day) when playing at night :)
Answer: As far as time of day and the appearance of Ghost (or Fairy)-type Pokémon goes, I definitely wouldn't fault anyone for thinking that there was a relationship there. Multiple sites have created articles claiming as much, and it certainly makes sense that there would be a connection. Unfortunately, based on both my personal experience and evidence posted by other users on this site, there just doesn't appear to be one. I personally have caught two at night and one during the early afternoon, and seen another one on my proximity tracker during the day as well. Ellesedil's answer also provides evidence that Ghost Pokémon are not exclusively found at night.
Unfortunately I have no information about locations where Ghost Pokémon appear. I personally have caught Gastlys near a Park, near a historic landmark, and along a nondescript road near a school, so I can't even offer a guess in this regard. If anyone else has any information (preferably from reputable sources) please feel free to post it to augment our understanding.
Answer: Well. Ghost pokemons doesnt only appear at night. Today I walked a pretty far distance looking for pokemons, and suddenly a ghastly popped up right infront of me in the middle of the day. I think you can get pretty much any pokemon at any point of the day regardless of your position. Maybe not water pokemons but.. hehe
Answer: I've seen a rare chance of getting Ghost Type in the afternoon. None in the morning  for me. At night, at least 3 or more are nearby me, so I'd assume more appear at night, but not much during the day. The game has only been out for so long, so their's lots to explore!
Answer: Oddly enough I have only seen ghost types during the middle of the day so I am not sure what the spawn conditions are.
Answer: Adapted to location is highly debatable. I walked through a complete circuit inside a large cemetary, and caught absolutely none, except for a rattata and a pidgey. I walked enough inside to completely hatch a 2km pokemon and half of a 5km pokemon.
Answer: No, they don't, I caught ghastly in the middle of the day.
Answer: Ghost types have a spawn during the day, its just the spawn is relatively lower than the one at night which has less to the thought that they only spawn at night. The can be found but you have be a little more vigilant for them.
Comment: "its just the spawn is relatively lower than the one at night which has less to the thought that they only spawn at night."  How do you know this to be true?
Answer: Any pokemon can spawn at any time of the day and anywhere, I don't believe that any pokemon in the game yet only spawns at a certain area.
I do think that ghost pokemon more frequently spawn at night though.
Comment: Do you have a source for this?
Answer: My experience is certain types of Pokémon pop up in certain area more than other area.. but not necessarily relates to their genre.. (other wise where to find electric Pokémon?)  and no, ghost Pokémon doesn't pops up only at creepy places either..just random to time/location in general depend on their rarity.  it is more effective to have poke hunters share where they caught most of what Pokémon in what area, then we all can benefit.
Comment: just a P.S. I caught tangela and grimer at a market plaza parking lot at night (because I only go there at night)...but there's loads of magikarb pops up every 5-10 min as well, and loads of other water based pokemon pops up (dratini, mochop, goldee, squirtle, staryu, seel etc....only because there's two water fountain and seafood restaurant??  not so convincing...
Answer: So ghost Pokemon are adapted to location just like every other Pokemon. they are usally found in cemetery's, abandon houses, dark. Secluded places like caves they are more  commonly found in those type of locations
Comment: I don't think the game can even tell if a house is abandoned or if you're in a cave. I don't think it tracks things like cemeteries either.


Zebra striping on custom panels layout

Question: Is there a way to get zebra striping on a custom panels layout?  I've been looking hook_preprocess_panels, but I don't see a way to tell if I'm a certain layout is being used.  I don't want it on all layouts, just one in particular.  I have the layout made, and I figure if I can add a css even/odd class to a node in the panel, I should be able to get what I need.
Answer: If you use even/odd pseudo-classes, you don't need even/odd classes
<code>:nth-child(even)
:nth-child(odd)
</code>
Example:
<code>.parent_class > div:nth-child(even) {background: #CCC}
.parent_class > div:nth-child(odd) {background: #FFF}
</code>
or
<code>ul.yourclass li:nth-child(even) {background: #CCC}
ul.yourclass li:nth-child(odd) {background: #FFF}
</code>

Zebra striping on custom panels layout


Do I stand any chance in a race?

Question: Unfortunately, I know I'll be at a disadvantage in racing because I haven't been able to find or create a team, as all of the other people I know who are into cycling are men. I weigh 146 lbs, and my bike weighs 19 lbs. I can sustain 18 mph on my solo rides, some stats on some recent notable efforts of mine:
on a -3.8 incline I averaged 36 mph for 0,4 miles, about 325 watts in-the saddle, and another sprint, at 0% incline, I averaged 480 watts in the saddle for 0,2 miles. How might I measure up in a cat 4 peloton, especially without the help of a team?
Comment: You don't state it explicitly, but "all of the other people I know who are into cycling are men" implies you're not - do you think you could clarify?
Comment: Get a power meter, Watts/kg are the only way to properly measure performance and progress. Be aware that a typical road race is about much more than just raw power. A lot of it is tactics, risk taking (crashes are common) and being an "asshole".
Comment: @ChrisH I would second that. I was writing under the assumption that the OP was male, then I realized that they hadn't explicitly stated that. However, it actually makes no substantive difference to my answer.
Comment: Is your only goal to win?
Comment: How will you measure up? Against the winner or against your expectations? Against the winner, you won't (unless you're racing some 8 year olds), but you may obliterate your own expectations. As a lifetime cyclist, I took up running a few years ago. I decided to run a local 1/2 marathon as my first ever foot race. I set my target at 2:00 full well knowing the winner would be done in under 1:00. I blew my expectations out of the water by finishing at 1:46 and feeling that I could have gone faster.
Comment: Is Lance Armstrong in the race? If yes, probably not good chances. If other pros are in the race, also likely not good. A lot of fat guys and gals, or weekend bikers, then you probably have a good shot. If you just want to win, it's all about who else is in the race. If you just want to finish, that's entirely up to your determination. Also, what are you willing to do to reach your goal? If you give up at the first problem, not so good, or if you are a "fight til you win" person, you could do well. Psychology is often a major part of any competitor.
Comment: @Michael OP has quoted power figures in the question, so likely does already have one. For OP: it's worth figuring out your FTP and filling in the rest of your power curve (power you can sustain for different durations) - that will give you a handle on where your strengths are likely to lie in racing.
Comment: To remove ambiguity: I am not male.
Comment: @user7761803: I was not sure if that's an estimate based on the speed an incline or actual measurements. Since at first OP is only talking about speed.
Comment: @user7761803 I also suspect that's estimated power from Strava - not bad for comparing between your own efforts on the same bike, but not absolute
Comment: What happens if you enter anyway and come last? ...nothing? Okay then!
Answer: Answer:  reset your expectations and give it a go.
The first race I entered, my only goal was to finish.  Second time I did it, the goal was to pace better and finish with a better time than my first effort.
After that, personal improvement is really the goal, developing racecraft and strategy.
When riding in a group/bunch/peloton/paceline of cyclists, you won't believe the amount of boost received from the draught.  Simply watch and learn, parrot what others do, and listen to any advise offered.
It would be good if you could do some group riding before a proper race.  Look for a publicised group ride and try to join.  It can be hard to ride close enough behind someone to benefit from the aero gains, and it can be unnerving to be followed closely by someone.  Practice will help.
Even if you fall off the back of a group in short order, you'll experience what group riding is like.  It can be addictive!

If you possibly can, ride the race route beforehand.  Even some of it is better than going into it cold.  Use an app like Strava etc to log a time, and expect that a bunch ride will drop your time by about 20% assuming similar weather.
Gender is relatively irrelevant in a race - different categories are all run at the same time, perhaps with a few minutes gap between the start times.  IE the full length race might start at 0800 with the half-length version leaving at 0810.   So there's always some mixing between classifications whether they're age, distance, gender, or whatever the race organisers chose.
As a large middle age man, I'm able to descent faster than a lighter rider, but I have to work to maintain and carry that momentum up the next climb.   And then those lightweight little weeds pass me at triple my climbing speed.  Knowing what kind of road is coming up, whether its a long straight descent or a 20 minute climb helps you anticipate and pre-react.
Upshot  life's too short .  Get out and give it a go.  I've seen a guy in his 70's win his age group on a 1960s three-speed city bike.
You can't finish unless you start.
Comment: @Davor hogwash!  If you look at all male riders, there's a huge variation in speed and power.  If you look at all not-male riders, there's also huge variation.  In a race between a woman on the Women's World Tour and an average male, my money is on the woman.  It may be fair to say that an _average_ 60 kg woman has no chance against an _average_ 60 kg man, but to say that a 60 kg woman has no chance against a 60 kg man is sexist, because some 60 kg women can beat some 60 kg men.  Please don't discourage anyone here.  Everyone deserves a chance to race and find out for themselves.
Comment: "Gender" may be irrelevant, but sex is not as men have more muscles per same body weight. A 60 kg woman has no real chance to compete with a 60 kg man.
Comment: Second this. You won't stand a chance in any race you don't enter. And you won't stand a chance in the first race you enter. But then you can figure out how you do, and how to improve.
Comment: Like you I've really noticed the difference on climbs and descents - I'm heavy and so's my bike. On an audax a couple of years ago I seemed not to be moving up the hills, the rider I was with was so quick.  Then I'd catch her up downhill into a headwind.  She did get the women's Everesting record the next month though
Comment: Positive thinking helps a lot. Not of the kind: do I even stand a chance? You won't know unless you try.
Comment: Please remember to use comments for improving/clarifying the question/answer, put answers in answers, and chat goes in [chat]
Answer: I doubt it - at the moment - but we don't know how trained you are, and proper training will work wonders.  This is likely to mean finding either a club or a coach.
If your goal is to race, you really do need to find a racing club to train with. Round here there are several; all have mixed or women's fast group training  rides, some also have junior sections.  However powerful you are, riding in such close proximity to other riders is a very different matter.
To look at some numbers, as you imply you've been riding solo, lets look at time trials. They're simpler because they take out the aspect of peloton dynamics, and generally simplify the tactical side. As results are times, not finishing sequence, the course times are easily found  online.  They also have a lower barrier to entry at least where I am, and if you want to (or have to) ride solo they may be a good format to aim to compete in; distances tend to be either shorter (10 or 25 miles) or longer (100 miles, or even 12 or 24 hours) than road races, which round here seem to be 50--100 km.
I've been playing on my local TT courses recently.  You don't say how long you can sustain 18 mph, but a flattish 25 miles at 18.8 mph would put me 18th out of all 20 riders (on a typical TT that uses some of the same roads).  On a 10 mile course I can average 21 mph.  I may actually enter a TT on that course, as I'd have a reasonable chance of not being the slowest - again I'd be very near the bottom of the table (including all adult riders).  For longer TTs the slowest finishers still seem to average 21 mph - for nearly 5 hours straight.
Comment: Thank you! Recommending looking at time trials was helpful advice. Around me it seems women's cat 4 time trials range from 23mph to 16mph. If I had competed, I'd score around 8th out of 10. I'm slightly above rock bottom, woohoo!
Comment: Also I should thank you @RW98Coppi - after writing this answer I was inspired to ride the 10 mile course and set a PR - my first time under 28½ minutes.
Comment: Joining a club is definitely the easiest way in. For safety reasons you absolutely *must* get some experience riding in a group. If you find a club that has an interest in racing there will be a club coach who can get you ready to race safely. Some races might not even let you enter if you can't show you are safe eg https://www.surreyleague.co.uk/race-preparation-training/
Comment: Round here the TTs aren't categorised (it's to do with the legal history of racing and TTs in the UK), and everyone rides the same events.  Previous or estimated times may be used to restrict entries if there are too many.  Men's and women's winners  are listed for each age range, but the results tables put everyone together in time order - so things are much more equal than in racing.
Answer: Racing on a bicycle is HARD.
In your first race, you'll be lucky if you don't get dropped.  You have no experience managing your efforts and recovery during an actual race. It's different - waaay different. One overdone effort will be enough to put you in big enough of a hole that you won't be able to hold on to the pack until you've recovered.  The problem is you are going to have to make efforts to stay with the pack, but you don't have any feel for how hard you can really go without blowing yourself up, nor how many times you can do it.
There's really only one way to find out.
And you really don't know what "fast on a bicycle" means until you're trying desperately to hold the wheel of the bike in front of you lest you be gapped and get to watch the pack ride away from you.  Once you get dropped from the pack, your race is almost certainly all over - if you're strong enough to catch back up to the pack after being dropped, you're strong enough that you wouldn't have been dropped in the first place.
As @Criggie noted, you won't believe the difference you get drafting in a pack.  But that means that, unless you are really strong, once you're outside the pack you have no chance.  If you go off the front, you will be caught.  If you go off the back, you'll be dropped.
And it's really, really important to know that it's not just "I can hold X watts for 0.2 miles" - it's can you do it again 2 minutes later? Or even just 20 or 30 seconds later. Over and over and over and over.
Hopefully you have a good bit of experience in hard group rides and know how to hold your line.
In your first race, stay away from the front of the pack.  You might very well feel like you can ride up there, especially early with the adrenaline of your first race flowing.  Yeah, no.  You'll likely feel great for a few minutes, and then you'll be hit with, "Uh oh.  What have I done?!?!" as you pop and watch the pack ride off in front of you.
Also stay away from the back of the pack in races such as crits or circuit races that have sharp corners.  Low-level packs will really bunch up as inexperienced riders take bad lines and brake in corners, which means riders behind them have to brake even harder - and then sprint out of the corner to not get dropped.  Those sprint efforts will wear on you, and you'll eventually not be able to stay in the pack.  One term used for that is "getting accordianed off the back".
Ideally, you want to be probably 5-10 riders back from the very front of the pack.  Work to stay there - it's harder to ride further forward as you'll be in more wind and a lot more likely to find yourself actually on the front (if you do find yourself on the front - get off the front immediately as it takes probably 30-40% more power to ride on the front...)  Further back in the pack is harder, too, as you have to deal with larger and frequent changes in speed as you respond to what the riders in front of you are doing.  And all those little accelerations can eventually blow you up - and again you wind up waving "Buh-bye" to the pack.
And please don't "dive bomb" corners. Do you know how to corner?  Do you know what a "late apex" means?  Watch higher-level racers corner - they stay wide until late and go through the corner in a sweeping path with no sharp turns - and little if no loss of speed because they never used their brakes.  "Dive bombing" a corner means thinking it's a good idea to sneak up on the inside trying to gain an advantage. All you'll do is one, go slower through the turn, and two, cause crashes.  Oh, and three:  everyone will hate you because you'll be "that one" - the squirrelly rider who causes crashes.
Answer: Not an answer as such but I wanted to encourage you to go for it. You probably won't win or come last, although someone has to! And inbetween you are only competing against your own expectations. I always wanted to do a triathlon but put it off for years because I wasn't fast enough (in my opinion). But last year I just look the plunge, signed myself up for a short distance and trained for six weeks. I didn't even have a bike. My aim was to finish. I didn't come last - I came in the top third and had I not done a thoroughly dismal bike leg (100 people passed me ) I would have been in the top quarter. I ran the fastest I ever have in my life. As others pointed out your statistics mean little on the day, tactics, strategy and the general behaviour of other competitors changes everything. And the atmosphere is addictive!
I hope you take the plunge and good luck! I am also female - it doesn't weigh much against technique at beginner level. I swam faster than three quarters of the men there .
Answer: For other readers' reference, racing category 4 indicates a beginner cyclist regardless of gender. For interest, in the US, men's races have 5 categories, but the only qualification to advance from cat 5 to 4 is 10 mass start races. Hence, men's cat 4s are still beginners.
At the lower level ranks, team tactics usually don't make a large difference. The differences in strength between riders are fairly wide at the lower levels. Riders are also still developing racecraft, which I would translate as situational awareness and decision making skills under pressure, as well as basic bike handling skills in a pack of riders. The inherent disparity in rider ability makes it harder to achieve good team tactics, even if the riders had learned to execute them. In any case, many riders are looking to upgrade as fast as they can. The entry level men's races at least are full of crashes. In any case, the OP would probably not have been hampered by the lack of a team. In any case, my recollection is that good team tactics are pretty rare in the lowest category.
The OP didn't really give enough detail for us to infer their functional threshold power to weight ratio (power to weight, for short). This might have let us tell how strong the OP was relative to entry level cyclists, if we were also given gender. However, FTP alone doesn't really decide races. Road races often don't go to the strongest person on the road. Many soft skills, as briefly mentioned above, come into play. Also, many lower level races end in bunch sprints. You have to be very considerably stronger than the rest of the field to break away and stay away (and if you have professional-level potential, chances are good that you will do this). Also, the entry level races in the US at least don't typically get challenging enough terrain to force the field to break up. Sprint power and endurance are two separate physical traits, and to some extent you can have one or the other, or a balance of both, but you can't be excellent at both (relative to other riders of similar capability). So, if you aren't a good sprinter, you may get left behind (NB: in this case, you want to get into the breakaways, because you have nothing to lose!!). Also, the local racing circuit is likely to hold at least a few time trials, which tend to riders with endurance (more specifically, riders who can hold a high and steady power, rather than riders who can sprint well or who can do repeated, sub-sprint (VO2max) efforts well).
In any case, if the OP wants to road race, then safety permitting, they should try it! It can be fun. If you don't find it fun, there are other options to cycle competitively, discussed below.

Road racing can be a bit all or nothing
One thing I've heard about road racing is that you have to work really hard just to suck at it, or to finish mid pack, or even not to get dropped. This can be demoralizing. Not everyone will want to stick with road racing, unless they are very talented.
Because of the inherent nature of the sport, in a road race or criterium, we don't care about your actual finishing time, we only care about relative placing. Specifically, you can draft off the pack. If it's a bunch sprint, you will finish at the same time as the pack unless you got dropped, hence we would only care about your finishing place. Hence, there's no equivalent in road racing to entering a marathon as an amateur, and attempting to set your fastest time.
I suspect that human cognition also plays a role - how many of you remember off the top of your head who placed 5th at the last Tour de France? How about 8th? In professional sports, we only really pay attention to the winners. In amateur road racing, we only really pay attention to high placings.
Again, the OP should try it if they are interested, but if you don't place pretty high, the experience may or may not be rewarding. It's possible to advance a category or two and help your teammates out. When I raced road in the US, I made the men's Cat 3 team, and riders were experienced enough to employ basic team tactics, so the experience became more complex as well. Nevertheless, if you don't derive enough interest from just helping teammates but you can only finish mid-pack, there are other competitive options.
There are other competitive and semi-competitive options apart from road racing!
Many in the wider cycling world are a bit dissatisfied with the inherently winner take all nature of pro and amateur road racing. There have always been other options for people, and new technology or simple cultural change are opening more opportunities up.
Riders have always organized local events, like century rides (which often have sub-100 mile distances). The more generic term is Gran Fondo (originating from the Italian for big ride). You should ride these at whatever pace you feel like - but, realize that many riders do feel like riding these as fast as they can. There will often be a lead group or a few lead groups, if it is a mass start. You will often be able to find a group of people at your preferred pace, whatever that is. With the faster groups, you are likely to see some informal sprints as well. That is, competitive amateur riders can find an outlet here, and needless to say you can be as competitive or non-competitive as you please.
Many people have done these rides in groups or solo, and then shared the record on social media (e.g. Strava, Reddit, Facebook). During the pandemic, solo endurance challenges have become increasingly popular. In general, you can even see how well you place in your age and gender group.
Local cycling clubs often hold group rides. Some of these rides will often recreate race-like dynamics in an informal setting. The social engagement and activities are a nice bonus. For female beginner cyclists, there may be the issue that it's physically harder to keep up with more experienced men, and most cyclists are men. However, interest in women's cycling is increasing, and there are often specific clubs or organized rides for women. In my city, one of the bike co-ops holds one or more weekly rides for women only. In a previous city, the local large cycling club hosted one ride exclusive to women. These may offer newer female riders the opportunity to build fitness and soft skills.
It's my understanding that time trials are a popular race format in the UK, and probably in some other countries. Time trials are short solo efforts, perhaps between 10 and 50 kilometers. You are not allowed to draft other rides. This race format may offer people a relatively objective yardstick to measure themselves, and it is less dangerous and less winner-take-all than road racing because of it. There is the potential issue that if you are competitive, equipment can place you at a noticeable disadvantage, and time trials do require specialized equipment to optimize your performance. That said, the lower level amateur categories can be raced successfully on standard road bikes with clip on aero bars.
Randonneur and audax cycling is another alternative format. You attempt to complete a set route in a given time, possibly passing through checkpoints on the way. This format is open to non-competitive or semi-competitive cycling. There may be local randonneuring oriented clubs in your area, and they may be separate from the usual cycling clubs. In my state in the US, one example is the Minnesota Randonneurs. I am not sure if all of these types of rides are referred to as randonneuring or audax rides; the North Star Bicycle Race is an event on paved roads, specifically from St. Paul to the Canadian border and back, but its site doesn't appear to contain either term. Also, many long gravel rides/races are conducted in this format. Speaking of this, while I necessarily don't mean to steer people in the direction of buying more bikes, gravel bikes can often handle rides on both paved and unpaved roads, although you may want to change tires.
Finally, building off the off-road theme, cyclocross races are conducted off-road, and are a combination of a criterium race plus obstacles. Although they are races - in fact, in the US, they're sanctioned under the same body that organizes road racing - they are much more relaxed than road races, and team tactics might only come into play at the very highest levels. As with Gran Fondos, social events are often organized after the race. Crashes are also not that infrequent, but racers typically spread out after the mass start, so they're less common, and the speeds are lower, and the ground is a lot softer, hence injuries seem a lot less common. NB: Learn to roll. In any case, cyclocross and gravel cycling are culturally a lot friendlier to beginners.
Comment: *My recollection is that good team tactics are pretty rare*  Understatement of the century. I've actually been in a race where a group of riders all from one team managed to pull the entire pack up to a 3-man break in a circuit race with just a handful of laps to go. They had a team member in that break so they effectively knocked their teammate off the podium with that move. (I also had a team member in the break - I had managed to cover the break for 3-4 laps and screw up their earlier bridge attempts, but I was gassed.  I did learn that covering a break is just as hard as riding in one...)
Comment: w.r.t the last paragraph: One nice thing about audax is that your pace doesn't matter (the minimum speed is very low), but your ability to keep going is important.  There's essentially no competition though - we have AUK points (and AAA climbing points) but some riders accumulate huge totals, but nothing more than kudos for speed.  That of course doesn't prevent you from seeing how fast you can go.  It overlaps with the long TTs, and plenty of audax riders also race
Comment: Thanks for making me feel old, @AndrewHenle... :( I stopped racing before then. I did know that there was a Cat 5...
Comment: "Historically" means "in the past". It doesn't and shouldn't necessarily imply a very long period of time. Just, a historical one. The 90s and 00s are indeed history.
Comment: @Criggie "Any time I'm in a group ride, it's a race. Whether the others realize it or not." _Is that what you meant? ;)_
Comment: The funny part? I wound up in a ride with the guy from "that team" who was in the break a few years afterwards.  When that race came up when we were talking and I told him the story of how he got reeled in with just a few laps to go - let's just say he wasn't happy with his teammates.
Comment: "Historically" men's racing has 5 categories? Your view of history is _very_ short. When I was licensed there were only 4 and I'm not _that_ old... Also, crashes aren't _uncommon_ in the pro ranks - have you ever watched coverage of the Tour?
Comment: @FreeMan [USA Cycling has had cat 5 for at least 23 years now - cat 5 races existed in 1997](https://www.chainreaction.com/about/mid-life-crisis-on-a-bike-pg133.htm)
Comment: I thought cat5 was derogatory term for what we call 'commuter cuppers' here in Melbourne. People who race each other on thier way home, often one rider (the faster one) being completely unaware they're racing ... I didn't know it was a real category? In Aus we have grades A through D.
Comment: In the US, you only need to complete 10 mass start races to upgrade from cat 5 to cat 4. This is really a total beginner category. Cat 4s are still beginners, and actually crashes in those races are very common, and can put people off road racing. @FreeMan It's true that pros crash a lot as well, but the original questioner isn't a pro. Also, they indicated that they're not male, so this actually doesn't apply to them.
Comment: @FreeMan there's a nominal cat6 too - people who use race and bunch techniques on their commute.  Whether the other rider/s realise it or not.
Answer: Why do you want to race?
I've raced in plenty of races with no intention or desire to win.  My goals were fitness and enjoyment.  In other races, my goal was to win and I trained accordingly.
Without us knowing the stats of the competition, and your degree of training, it is hard to know how good your chances are of winning.
I encourage you to think about why you want to race.  If racing can fulfill your goals, go for it!
Comment: Exactly - one's first goals should be to (2) Start the race, (3) Finish the race (4) Not be last, but overwhelmingly (1) Enjoy the experience.

Do I stand any chance in a race?


Why is Samaveda considered inauspicious

Question: I have read in manu-smriti that the yajurveda is ment for humans rigveda is for devtas (gods and demigods) and samveda is for pitrigana's(ancestral spirits).
So if samgayan (chanting of samveda) is happening you cannot read or chant any of the hynms of Yajurveda or Rigveda (i.e Andhaya).
Comment: By the way, you may be interested in my questions [here](http://hinduism.stackexchange.com/q/5245/36), [here](http://hinduism.stackexchange.com/q/5443/36) and [here](http://hinduism.stackexchange.com/q/6582/36), where I try to find the origins and role of an important Sama Veda song quoted in the Taittiriya Upanishad.  The second question contains a link to an mp3 file of the hymn (but you should be careful about listening to it, given that there are rules about the circumstances under which the Vedas can be heard).
Comment: yeah I have dont do mp3 listening because of same reasons by the way can I ask a specific question about andhayaya with some detailed explanations
Comment: Do you mean Anadhyaya?  Anadhyaya refers to the holidays where Vedas shouldn't be studied.
Comment: Yeah andhyaya means an+adyaya = no study (of vedas). I have a doubt regarding some points of andhayaya when there is too much wind or when wind blows sand and when there is no sunlight in morning prayers(sandhya time) etc.
Answer: First of all, chapter 4 of the Manu Smriti doesn't say that only the Yajur Veda is meant for humans. All the Vedas are meant to be chanted among men, it's just a question of whom each Veda is sacred to:

Let him never recite the Rig-veda or the Yagur-veda while the Saman (melodies) are heard; (let him stop all Veda-study for a day and a night) after finishing a Veda or after reciting an Aranyaka.

The Rig-veda is declared to be sacred to the gods, the Yagur-veda sacred to men, and the Sama-veda sacred to the manes; hence the sound of the latter is impure (as it were).

That is to say, the Rig Veda is concerned with praise of the gods, the Yajur Veda is concerned with the details of Yagnas that benefit Man, and the Samaveda consists of songs some of which are used to venerate the spirits of ancestors.
Now far as whether the Sama Veda is impure, the word impure is just being used metaphorically, in the sense that customs regarding the Sama Veda are similar to customs regarding impure things.  Here is what Medhatithi says in his commentary on the Manu Smriti:

It is not really impure, but when it is heard, one must not study, just as in the presence of some impure thing or person.

Why is Samaveda considered inauspicious


Give an example about limits: $\lim\limits_{x\to0}f(x^{2})$ exists but $\lim\limits_{x\to0}f(x)$ does not.

Question: Can someone help me find an example where $\lim\limits_{x\to0}f(x^{2})$ exists but $\lim\limits_{x\to0}f(x)$ does not.
Thanks.
Answer: The way to approach the problem is to ask yourself in what way squares of non-zero real numbers are different from arbitrary non-zero real numbers. The most obvious thing is the algebraic sign: $x$ can be either positive or negative, but $x^2$ cannot be negative. Moreover, $x=0$ is the point at which this difference shows up. Thus, we want a function that is essentially
$$f(x)=\text{algebraic sign of }x\;.$$
One such function, defined on $\Bbb R\setminus\{0\}$, is the one given in Michael Albanese's answer: $f(x)=\dfrac{x}{|x|}$. Another is the signum function,
$$\operatorname{sgn}(x)=\begin{cases}-1,&\text{if }x<0\\0,&\text{if }x=0\\1,&\text{if }x>0\;.\end{cases}$$
Comment: @mathnoob: You're welcome.
Comment: It might be worth noting that these are the same function, apart from how $f(0)$ is defined...?
Answer: How about $f: \mathbb{R}\setminus\{0\} \to \mathbb{R}$ given by $f(x) = \frac{x}{|x|}$? Look at the one-sided limits to see that $\displaystyle\lim_{x \to 0}f(x)$ does not exist. Now $$f(x^2) = \frac{x^2}{|x^2|} = \frac{x^2}{x^2} = 1$$ so $\displaystyle\lim_{x\to 0} f(x^2) = \lim_{x\to 0} 1 = 1$.
Comment: What's wrong with just $f(x)=|x|, \ f(x^2)=|x^2|=x^2$?
Comment: @Alex: $\displaystyle\lim_{x\to 0}|x|$ exists (in particular, it is $0$).
Comment: Oops, sorry , I thought it was the derivative.
Comment: @mathnoob: No problem.
Answer: Most general example:
Let $g\colon[0,\infty)\to\mathbb R$ be continuous at $0$ and $h\colon(-\infty,0)\to\mathbb R$ arbitrary (especially, you can easily find $h$ such that $\lim_{x\to 0^-} h(x)$ does not exist or, if it exists, differs from $g(0)$).
Then defining $f\colon \mathbb R\setminus\{0\}\to\mathbb R$ as
$$f(x)=\begin{cases}g(x)&\text{if }x>0\\h(x)&\text{if }x<0\end{cases}$$
you find that $\lim_{x\to0} f(x^2)=\lim_{x\to0} g(x^2)=g(0)$, whereas $\lim_{x\to0} f(x)$ does not exist: If it existed, it would have to be equal to both $\lim_{x\to 0^-} h(x)$ and $\lim_{x\to 0^+} g(x)$.


Checkers board game stages

Question: I have read there are 3 types of stages in checkers, i.e. opening, mid and end game. I am confused on how to determine when these three stages exist on the checkerboard. For example, how do I tell when the game is at the mid-game stage, is there a certain board layout or board configuration that allows me to ascertain the stage of the board?
Answer: There are very few specific board setups that detail early- mid- and late-games. It might be easiest to keep track of which stage you are in based on how many pieces and how many kings each player has and comparing to one another.
For instance, when very few pieces remain on either side, regardless of ratio of kings, this can be assumed to be the late game. Another example of late game is when one player is being dominated and has about one-third to one-half of the pieces that the other player has.
In the early-game, as another answer mentioned, some combinations are easy to memorize, especially if you play a lot. In the late game, some strong finishes are to be known in general, such as having all enemy pieces in a position where none of them can move (e.g. have your pieces block off your rear end) or sweeping the board with kings.
Mid-stage is more or less defined as the messy stage, where you're making up every move as you go and taking time to decide based on how you think the other player will react and how far ahead you can plan, aiming for the late stage. The two sides are approximately even and players are vying for the most profitable positions.
Answer: From what I know, this partition is like in Chess, the opening stage can be memorized, the end game has a lot of skill involved and can be learned in lessons, the midgame is all that in between.  To the best of my knowladge there is no formal defenition of this 3-stages partition, such that any state of the game can be classified to one of them.
Derek Oldbury (1924 - July, 1994), a draughts champion that wrote the 6-volume The Complete Encyclopaedia of Draughts wrote about it in The American Checker federation wrote:

Opening, Mid-Game, and End-Game:
It is convenient for study purposes to divide the game into three
  phases; opening, mid-game, end-game. This division is not entirely
  artificial as the chief motives underlying each phase are really very
  distinctive. The dominant theme of the opening may be said to be
  preparation for the battle which rages throughout the mid-game; the
  conflict of the mid-game is resolved in the end-game. In this latter
  we seek to prove the real value of the seeming advantages gained or
  lost during the earlier play.
One need only define the purpose of the end-game to see that this must
  be the most vital phase of the game. The preceding phases are
  concerned with creating good prospects, in the end-game we consider
  the actual result, win, lose, or draw. A slip at this stage and all
  the brilliant ideas of the past become worthless. On the other hand it
  is the end-game, demanding as it does both precision and artistry,
  that may give one the chance to recover from a weak position and turn
  defeat into victory. In draughts the best player wins and the proof is
  here - in the end-game.
Comment: Does not really answer my question "...is there a certain board layout or board configuration that allows me to ascertain the stage..."
Comment: sorry, not that I know of
Comment: Direct quotes should be in quoteblock or otherwise formatted or annotated to indicate that they **are not** your own material. Especially when they are potential breaches of copyright.

Checkers board game stages


How to export Markdown from Org-mode with ``` syntax?

Question: I can export Markdown from Org (using <code>C-c C-e</code>) but <code>#+BEGIN_SRC lang ... #+END_SRC</code> is not exported as i expected as: <code>```lang ... ```</code>.
I would like that the code source will be replaced with <code>``` (markdown syntax), any suggestion?
Comment: I don't know whether tagging source code blocks with languages is standardized in markdown, and whether language names are consistent. Your best bet is probably looking through `ox-md.el` and looking whether there's any option to customize it the way you like it.
Answer: I have found a workaround using ox-gfm
Answer: You could also just use ox-pandoc, which does all this properly. Though you need to have pandoc installed.
Answer: It is relatively simple to derive a new exporter backend (e.g., mymd) from the md backend
and only override the translation function for example blocks.
The function  org-mymd-example-block formats its elements as you like it.
All other functions in the following elisp code are almost verbatim copies from ox-md.el and one only needs to steal a small part of ox-md.el. All other stuff is automatically inherited from the md backend.
(org-export-define-derived-backend 'mymd 'md
  :menu-entry
  '(?y "Export to My Markdown"
       ((?M "To temporary buffer"
            (lambda (a s v b) (org-mymd-export-as-markdown a s v)))
        (?m "To file" (lambda (a s v b) (org-mymd-export-to-markdown a s v)))
        (?o "To file and open"
            (lambda (a s v b)
              (if a (org-mymd-export-to-markdown t s v)
                (org-open-file (org-mymd-export-to-markdown nil s v)))))))
  :translate-alist '((example-block . org-mymd-example-block)
                     (fixed-width . org-mymd-example-block)
                     (src-block . org-mymd-example-block)))

(defun org-mymd-example-block (example-block _content info)
  "Transcode element EXAMPLE-BLOCK as ```lang ...'''."
  (format "```%s\n%s\n'''"
          (org-element-property :language example-block)
          (org-remove-indentation
           (org-export-format-code-default example-block info))))

;;;###autoload
(defun org-mymd-export-as-markdown (&optional async subtreep visible-only)
  "See `org-md-export-as-markdown'."
  (interactive)
  (org-export-to-buffer 'mymd "*Org My MD Export*"
    async subtreep visible-only nil nil (lambda () (text-mode))))

;;;###autoload
(defun org-mymd-convert-region-to-md ()
  "See `org-md-convert-region-to-md'."
  (interactive)
  (org-export-replace-region-by 'mymd))

;;;###autoload
(defun org-mymd-export-to-markdown (&optional async subtreep visible-only)
  "See `org-md-export-to-markdown'."
  (interactive)
  (let ((outfile (org-export-output-file-name ".md" subtreep)))
    (org-export-to-file 'mymd outfile async subtreep visible-only)))

;;;###autoload
(defun org-mymd-publish-to-md (plist filename pub-dir)
  "Analogous to `org-md-publish-to-md'."
  (org-publish-org-to 'mymd filename ".md" plist pub-dir))

An alternative would be to write an :override advice for org-md-example-block. You can use org-mymd-example-block above as replacement of org-md-example-block. But in that way you loose the original md backend.


Planet Surface Rendering: Precision issues

Question: I have been experimenting with C++ and OpenGL, and I am currently writing a program that renders the surface of a planet; specifically, our moon. It's a modified version of the GPU Gems implementation of Geometry Clipmaps which is normalized to the unit sphere and then offset by a heightmap in the terrain's vertex shader. On small scale scale this works rather well:

However, I want to scale this up to the size of the actual moon. Unfortunately, when I do so, stepping artifacts appear:

Now I am (almost) certain that this is simply an issue with floating point precision; 32-bit floats just simply don't have enough precision for planets of this size. However, I am in an interesting situation where I cannot simply change one of my numbers to a double to gain more precision. My vertex shader code is this:
<code>layout (location = 0) in vec3 VertexPosition;

uniform mat4 MVP; //projection and camera rotation matrix
uniform mat4 PLM; //scale and translation matrix
uniform dmat4 SurfaceRotationMatrix; //transforms vertices to be the correct position on surface

uniform samplerCube bump_map; //heightmap cubemap

uniform dvec3 PlayerLocation;

uniform double PlanetRadius;
uniform double TerrainHeightScalar;

void main(){

    //find the world space position of the flat grid (high precision)
    dvec4 worldSpacePosition = PLM * vec4(VertexPosition, 1.0);

    ...

    //offset the y position by the planets radius
    worldSpacePosition.y += PlanetRadius;

    //vertex position in relation to camera (located at origin)
    dvec4 OriginNormal = normalize(worldSpacePosition);
    //vertex position in relation to planets surface
    dvec4 surfaceHighP = SurfaceRotationMatrix * OriginNormal;
    //also calculate surface normals at this point
    dvec4 tangentHighP = SurfaceRotationMatrix * vec4(1.0, 0.0, 0.0, 1.0);
    dvec4 bitangentHighP = dvec4(cross(surfaceHighP.xyz, surfaceHighP.xyz), 1.0);

    // vvv I think this is the problem vvv
    // dvec4 surfaceHighP has to be cast to a vec3 (float) in order for the
    // shader to compile
    double height = texture(bump_map, vec3(surfaceHighP.xyz)).x;

    //set position by multiplying the normal by the distance the point should be from the surface
    worldSpacePosition.xyz = (PlanetRadius + height * TerrainHeightScalar) * OriginNormal.xyz;

    //move the position back to the origin
    worldSpacePosition.y -= PlanetRadius;

    //offset y position by the player's height (both statements are split for best precision)
    worldSpacePosition.y -= PlayerLocation.y;

    //final position: multiply by projection matrix
    gl_Position = MVP * vec4(worldSpacePosition);
}
</code>
OpenGL's texture() function only seems to take float parameters as an input. This makes me believe that this stepping is a result of the cast down to a lower-precision vector, where the program cannot distinguish the tiny change in angle between each grid position. At first I thought it might have been a texture precision error, so I tried switching the heightmap texture to an 8-bit copy but I didn't see any difference in step size or quantity. The texture filtering is linear, so the heights should be smoothly blended between one another, and at large scales big landforms like mountains and hills seem to have no associated problems.
Can anyone confirm that this cast in the texture() call is the reason for the stepping? If so, is there a way to pass high-precision numbers into a GLSL texture call, or, failing that, a solution to this problem that doesn't involve a complete redesign? I was thinking about maybe getting a weighted average of each neighboring "step", and then linearly interpolating between them, averaging between the areas where the float breaks down. Would something like that be possible, or is there a better alternative?
Comment: Hey @DMGregory, It turns out that your question "Low Quality Bilinear Sampling" was incredibly useful and the solution to my problem - the problem was the poor hardware interpolation rather than numerical precision. I just switched my own custom linear interpolation algorithm using doubles and the problem has gone away completely at real scale. I don't think I have enough reputation yet to answer my own question, so if you want to submit your own answer I will mark it as correct.
Comment: This sounds like it might be related to this previous question, "[Low-Quality Bilinear Sampling](https://gamedev.stackexchange.com/q/101953/39518)". You might also find this recent question on [generating smooth terrain on planetary scales](https://gamedev.stackexchange.com/q/165945/39518) useful.
Answer: You should divide the heightmap into manageable chunks, use precise integer math on the CPU to decide which one to use, load it in the shader and use local coordinates when querying the texture.


Prepaid mobile phone package for Frankfurt, Germany

Question: I am visiting my sister in Frankfurt Germany and I want to buy a prepaid card with calling time, SMS and mainly Internet.
I saw the other replies but the sites that were posted from other users are all in German language.
Any ideas guys?
I prefer to have the micro sim card delivered to our home.
Comment: Just to clarify, do you want the sim delivered to your sister's place in Germany, or your place abroad before you set off?
Comment: Fonic (and probably many others) offers prepaid micro sim cards with free delivery
Answer: Lebara's website is available completely in English, as it's marketed to immigrants and offers cheap international calls. The national and data plans are more expensive than those offered by other discount providers like Simyo, Blau and Fonic, but still reasonable.
However, they will deliver the SIM card only to German residential addresses. I doubt whether you can find any alternative that does not require this, since it's mandated by German law that all SIM cards must be registered with the buyer's address.
Answer: On most German supermarkets you can alredy by a Prepaid-SIM card. There are also offers with access to internet avaialble. I really recommend to try to translate the German webpages. E.g. http://www.alditalk.de/sued/ in such cases.
Comment: There in fact is a supermarket at/on the airport - it is named "Rewe" and located in the airport train station for long-distance trains ("Fernbahnhof"). One might have luck to get a SIM card there. The problem is that you need internet access to activate the SIM card, which however is available in the terminal building. You need an already-working foreign SIM card to receive the SMS with the Internet activation code, though.
Comment: Maybe an advantage: At the REWE there is cheep food (for trainstation and airport) available ;)
Answer: It all depends on your needs and how long will you need the SIM card. If you intend to throw the card away after your stay, it pretty much doesn't matter which provider you choose, they are quite close price-wise on prepaid cards.
If you want to keep the card for re-use on later visits to Germany, then it may be important to check how long the SIM card remains valid without being recharged.
There are differences among carriers regarding the network coverage. In cities they're all good, but if you will be travelling to rural areas, this may be important. Generally, T-Mobile and Vodafone have the best and broadest coverage. The other two carriers (O2 and E-Plus) recently merged, so maybe they have caught up on that, but not sure.
Lebara is the best option if you intend to make international calls while in Germany, for example back home. They're unbeatable for int'l calls, especially to Europe and USA. If you need something for national German calls, get another carrier. Lebara is relatively expensive on national calls. Ironically, most of their internatonal rates are cheaper than the national rate. They're using the T-Mobile network and have stable coverage.
Whether you should get the card on-site, or order it online beforehand, depends on your time of arrival. During the day it will probably be less of a hassle to buy in at the airport from some supermarket or kiosk. Newspaper shops should also have such stuff available. If you're arriving late at night, you may be out of luck. In that case, if I were you, I'd let my sister buy the card up front, and then just live with the roaming charges if I have to call her before I get the card.


Extract the first oembed url inserted on the content of a post

Question: I want to extract the first oEmbed url inserted on the content of a post in order to put in a meta tag from the header, or elsewhere as a way to style it differently from the rest of the content.
Comment: meta tag from which header?
Comment: I want to put it following Facebook Open Graph protocol.
Answer: I assume that you're only interested in the first URL that actually succeeds at discovering actual oembed data. The oembed system processes all links it finds, but not every link will have oembed going for it, obviously.
The filter you'll want to use is embed_oembed_html and it gets the HTML cached by oembed, the url, any attributes on the embed, and the post_ID, which is important for your code.
add_filter('embed_oembed_html', 'my_function',10,4);
function my_function( $cache, $url, $attr, $post_ID ) {
  global $my_previous_post_id;
  if ($my_previous_post_id != $post_ID) {
    // post ID changed, so this is the first oembed for the post
    // do something with $url
    $my_previous_post_id = $post_ID;
  }
  return $cache; // it's important that you return the $cache value as-is
}

Now, the whole oembed system is running at the same time as shortcodes do: during the_content filter call. So if you want to grab stuff for the header, you'll have to start the main Loop in the header, run the_content filter over the get_the_content() value, then call rewind_posts() to rewind the query back to the start for the actual main Loop later on in the page.
This sort of behavior causes problems with plugins (like Nextgen gallery) that do stupid things when you run a loop in the header. There's no working around it, but the fact is that those plugins are fundamentally broken and you can't correct their problems. I get this sort of report with SFC-Share and SFC-Like all the time (because they pull content out to put in the header too). Nothing you can do about it, frankly.
Comment: Haha, this is a weird one, the fact that you have to first get the video cached to view it else where in a loop. Still, works like a charm. Thanks Otto!
Answer: Try this:
function get_first_oembed($id) {

    $meta = get_post_custom($id);

    foreach ($meta as $key => $value)
        if (false !== strpos($key, 'oembed'))
            return $value[0];
}

embeds seem to be stored as rendered blocks of HTML so if you want link alone you will additionally need to extract it.
Comment: It work as you said it does, yet I'm not sure how to extract the actual URL I put in the post (before the oEmbed treatment).
Comment: @peroyomas well, there are a lot of ways to [process strings in PHP](http://php.net/manual/en/book.strings.php). Sorry, I don't think I have such ready-made snippet for oembeds (don't use them much myself).
Comment: It works for me on home, but not on archives loop. Theres a way to make it possible?

Thanks in advance.
Answer: I have tried the answer from the @Rarst, but in fact it is not very stable solution to the problem. If you try to var_dump the $meta var above, you will notice that there is at least one another meta field _oembed_time_xxxxxxxxxxxx which is probably for cache busting.
And also, when I removed the oEmbed link from the content of the post, the cached eEmbed meta strings were not removed, which is not what I wanted.
So I dig a bit deeper in the native WP codes of the wp-includes/class-oembed.php and wp-includes/class-wp-embed.php and came up with much more solid solution:
function get_first_oembed_from_content( $content ) {
    if ( preg_match( '|^\s*(https?://[^\s"]+)\s*$|im', $content, $matches ) ) {
        return wp_oembed_get( $matches[1] );
    }

    return false;
}

The regex pattern is copied from the native WP_Embed:autoembed() function, so it is the most reliable one.
It is easy from here to modify this function and extract only the first URL as well.
Comment: This function only works if the first url is the oembed. I've included an updated function that will return the first oembed, no matter where it is in the content. `function get_first_oembed_from_content( $content ) { preg_match_all( '|^\s*(https?://[^\s"]+)\s*$|im', $content, $matches ); foreach ($matches[1] as $match) { if (wp_oembed_get($match)) { return $match; } } return false; }`


How to read and write music scores if I am a blind musician?

Question: I am a fully blind person, now beginning to learn violin with Western classics.
I am presently preparing for Trinity grade 3  practical. I am just looking for a sheet music reader and writer software solution  to find out if such software availability will help me to create scores with my own ideas.
Can anybody suggest any resource?
Comment: Related: https://music.stackexchange.com/questions/10649/resource-for-sheet-music-for-blind-musicians
Answer: You do get braille music.

Braille music is a Braille code that allows music to be notated using
  Braille cells so music can be read by visually impaired musicians. The
  Braille music system was originally developed by Louis Braille.
Braille cell, 2 dots wide by 3 dots high Braille music uses the same
  six-position Braille cell as literary braille. However braille music
  assigns a separate meaning to each braille symbol or group of symbols
  different from literary braille and has its own syntax and
  abbreviations.
Almost anything that can be written in print music notation can be
  written in braille music notation. However, braille music notation is
  an independent and well-developed system with its own conventions.
The world's largest collection of braille music is located at the
  National Library for the Blind in Stockport, UK.1

SOURCE
Comment: Blind musicians I have known have used this Braille system, but also learned to play by ear.
Comment: Braille scores can be difficult to come across, however, depending on where you are located, your local city or university library may be able to do an Inter-Library Loan (it could be called something else in other areas).  A blind student I knew was able to access a large collection through a network of University libraries in the US.


Sound Problem after updating Ubuntu 13.04 from 12.10

Question: After going through various forums and applying those methods, my problem still persists.
I had completely removed pulseaudio as well as alsameter and then re-installed them followed by a force reload and a restart.
Sound is still not coming. Please suggest what to do?
Answer: Which model computer do you have? If you have HP you can install this package.
Answer: Its working now!
I just needed to select the correct "Play Sound through" option in Settings->Sound.
It worked like a charm!


Meat on Rosh Chodesh of 9 days

Question: Why is The reasoning that Sefardim do eat on Rosh Chodesh and Ashkinazim do not?
Sefardim
Is It Permissible To Have Left Over Meat From Shabbat During The 9 Days
Ashkenazim
EATING MEAT AND DRINKING WINE DURING THE NINE DAYS
The Nine Days - Laundry, etc.
Comment: the din is from the week of tisha b'av which is what sephardim follow.the rema says the custom of askenazim is to extend from the week of tish b'av to the whole 9 days which would include rosh chodesh as well
Answer: I found it on the Lakewood scoop:
The reasoning for Ashkenazim is:

The Maharil and the Seder HaYom (from the times of the Arizal) both say that we do not eat meat even for the Seudas Rosh Chodesh. The reason, says the Seder HaYom is that we eat meat on Rosh Chodesh because, as the first day of the new month, it is a day of Simcha. Not so Rosh Chodesh Av which is a month of Puranus, troubles. Also it is the day that Aharon HaKohen was niftar. This is also the opinion of the Arizal in Shaar HaKavanos.

Summary; Askenazim focus on the fact that  normally Rosh Chodesh is a simcha but here it is the begining of a bad thing so no Simcha, Plus it is Ahron Yahrtzeit which ussaly calls for a fast.
The reasoning for Sfardim is:

The Shiyarei Knesess HeGedola writes that the minhag in Turkey, at the time, was to eat meat and drink wine during the Rosh Chodesh Seudah, even in Av. This is also the opinion of the Chida. The Toras Chaim says that if it is your minhag to consistently eat a celebratory seudah with meat and wine each Rosh Chodesh, you should do so on Rosh Chodesh Av as well. The Darkei Chaim V'Shalom takes this a step further and says you should only eat meat if you are noheg like the Talmidei Baal Shem Tov and make a public seudah every Rosh Chodesh. (See Minhag Yisroel Torah 551:6)

Summary: Sfardim and it seems Chassidim too celebrate regularly and do not focus on the negative aspect of the month because Rosh Chodesh is still a simcha. I guess it is consistent with them in genral being more in tune with Rosh Chodesh.
Comment: I don't get your last sentence. Do you have a source for this?
Comment: Also, shouldn't, then, Ashkenazim not say Hallel?
Answer: Sefardim, following the Mechaber, don't start the mourning period until the week of Tisha B'av, and Rosh Chodesh Av is never in the week of Tisha B'av. Hence they would have no problem with eating meat on Rosh Chodesh Av.
Ashkenazim, following the Rema, start the mourning period on Rosh Chodesh (hence "The Nine Days") and therefore don't eat meat on Rosh Chodesh Av.
See here and here.
Answer: This issue depends on whether you are sefardi or ashkenazi. Although a minority opinion holds that if one always has a meaty rosh chodesh seuda (meal) then he may do so on rosh chodesh av as well, the vast majority of poskim — including the chayei adam (133,15) and mishna brura (551, 58) — rule that one may not have meat on rosh chodesh itself; they hold the nine days are just that — nine days. Mishenichnas av — meaning rosh chodesh — memaatin besimcha — this means that as soon as it is rosh chodesh av the restrictions already apply.
Yet, even the sefardi poskim who are machmir on the nine days (the shulchan aruch cites three opinions with no ruling) hold that one may eat meat on rosh chodesh av itself — including the ben ish chai (year 1 devarim 15) and kaf hachaim (551, 125 -126). They hold lo ad bchlal (not including the boundary point), especially as sefardi poskim technically never took on 3 weeks or nine days, rather shavua shechal bo; therefore those sefardim who are machmir and start restrictions from the nine days at least still have rosh chodosh av to be lenient with. I think the lashon (wording) in the kaf hachaim is "v'dye bazeh" (and this suffices).
Comment: was it my imagination or was this answer here before, then disappeared and now reappeared with more content? kewl!

Meat on Rosh Chodesh of 9 days


What features does a camera need to be used for good quality stop-motion animation?

Question: I'm looking to buy a camera for my son to use for stop-motion animation. He has been using an old web cam, but he wants to step up in quality now. What features, eg. live view, resolution, etc, should I be looking for? I've looked at the Hue cameras but I'm not sure these will give the better results we're looking for. Of course, there's a budget, as he is just a teenager – I'd guess we wouldn't want to spend over about £100 at this stage.
Comment: Are you sure that a new camera will be the best thing to increase the quality of his stop motion works? It could also be lights, software, a tripod, ... Maybe you could add information in your question about what the results are lacking?
Comment: Meta-discussion on the topicality of stop-motion questions: http://meta.photo.stackexchange.com/q/3820/1943
Comment: Thanks for your speedy responses. It's definitely the quality of camera that I want to deal with initially, but I'm aware there will be other expenses, although we do already have a tripod. Lots to read and take in here. Many thanks all.
Comment: There is pretty much nothing you can get for that budget, and even less if you want something with specialized stop-motion features. Keep using the webcam until you can afford something.
Answer: You will get best results with the following features:

Tripod mount
Manual exposure mode
Manual focus

Additionally, things to consider:

Raw file format (so you can tweak the look). This is certainly not for everyone.
Tethered mode (this is what a web-camera is really good at...).

If your son is already using a webcam for stop-motion he is probably already using a certain software for doing so? If so maybe the software can control the webcam in focus and exposure. Then maybe getting a better webcam will be best. My webcam has very good quality and exposure and focus can be externally controlled.
Specific Solutions
In this answer to What is best for making stop motion animation - Digital camera or SLR? the suggestion was made to get good software first. I understand as a gift a tangible camera is nicer than intangible software. Also the software linked costs from $70. However, I am sure there are open source solutions for this (although I couldn't find one that allows manual focus).
Having had a look at stop motion pro Action HD ($140) and a Microsoft Lifecam HD Cinema ($???) or a Logitech C910 (I paid £60 through ebay 2 years ago) or C920, this solution would give good results on a low budget. In both cameras you can control exposure, focus and (Logitech only?) zoom from the software.
Do you need a need a better camera?
However, in all technical problems you can best improve things if you analyse what the greatest weakness is in your current solution. Without knowing the results you get I can only speculate:

Low image resultion (i.e. not HD) --> Only a better camera will help.
Noisy images --> Spend £1000 on a low noise DSLR or get cheap lightbulbs and put them close to your scene.
Flicker in the resulting video --> Manual exposure control (either software or camera)
Movements of objects look jerky --> Software solution with "onion skinnning" (that's what it's called) Many open source / free software solutions do this for you too.
Depth of Focus --> Have a look at what macro photographers do.
Answer: My recommendation is that you select the best camera your budget allows from the ones that work with Stop Motion Pro. You can see the list in their What camera should I use? page.
SMP is a PC application that controls the camera and gives you a live preview in your computer monitor. With this software you can shoot your animation from your computer, preview the animation as you are shooting it, see real-time onion skinning, review previous pictures and retake the ones that did not come out right, and much much more.
If your son isn't using Stop Motion Pro or similar yet, then you may want to evaluate if it makes more sense to give him the software and keep your webcam for a while. The visual quality will not improve much, but he'll have a lot of options to improve the quality of his animation, all skills that he'll be able to transfer to an upgraded camera in the future.
Good luck!
Answer: What you would want is a camera that has manual settings for ISO and exposure.
As the exposure time is not critical, you would want to set it to the lowest ISO setting to get the best image quality.
You would want to use the manual exposure setting so that you can take all the images in a sequence using the same exposure, so that you don't get a flicker when you put them together. Set the aperture (f-stop) to the value where the lens gives the best image, and let the exposure time be as long as needed.
Comment: Which camera below £100 has a lens with adjustable aperture?
Comment: Is ISO at HD resolution that important? A well lit scene will not cause problems with high noise and getting enough light to a scene is easy in macro environments (inverse square law and all that). If the son is not doing macro-stop motion than lighting might be an issue.
Answer: You probably want an interchangeable lens camera with the ability to set ISO, aperture, shutter speed, and focus manually. This rules out cheap point-and-shoots, and includes any DSLR or mirrorless on the market today.
Having a larger sensor (as in those DSLR and mirrorless cameras over a point-and-shoot or phone camera) can give a low-light advantage, but since you don't actually have any motion going on, and since you can control the light in your stop-motion environment (right?), this is less important than it is in many other cases. You should be able to get great results from a wide variety of cameras in this situation. On a larger-sensor camera, you'll want to stop the aperture down anyway, to make sure you don't have that miniature-scene razor-thin depth of field.
But there are two things I think are really essential:

Tethering or a wifi solution, with remote live-view. You're going to want to mount your camera to a tripod (or, more likely, to something like Manfrotto's 3-section articulated arm and super clamp), and this will let you control the camera without awkwardly peering at the back and poking at buttons at the risk of moving the camera and ruining the whole sequence. Whether you need a connection to a PC or laptop or are content with a phone app is up to you.
Electronic shutter. If you're making a movie of beyond a minute or two, you're putting a lot of wear on a mechanical shutter and will eventually need to replace it. This will cost several hundred dollars. Using an electronic shutter avoids this. This is the only option for most point-and-shoot cameras anyway. It's often a selectable option for mirrorless cameras; most DSLRs today only use  mechanical shutter (see Do DSLRs allow use of electronic shutter for photography for stop-motion?.)

So, in short: a low-end mirrorless interchangeable lens camera with wifi tethering should hit these points. (It will also have RAW capture mode and the manual control mentioned in other answers.)
Comment: Also, just in case one is using a DSLR, Nikons that don't support and/or aren't using one of E-type (electronically-controlled aperture) lenses are less desirable that other DSLR brands that electronically control aperture. Non-E lenses use a physical aperture control linkage to open the iris. This linkage mechanism is prone to slight frame-to-frame inconsistency, requiring more work in post to normalize the exposure for all the frames in a scene or sequence.
Answer: First, I don't do stop-motion videos, but I'm very fond of it. There's only a small one I did though. So, at your budget I think it would be a compact (unless you found a really good second hand DSLR)
As others have mentioned, you would definitely need manual controls like aperture, ISO, Shutter. And I think it would be nice to have a zoom level around 8×. And I think you may want a macro focusing distance of less than 5cm. And, the most irritating thing my camera has is every time I went to review the image that I just took, it retracted the lens back to the body and we cannot shut that off. So, I strongly recommend you to beware of that.
And, I don't know the grid display is just a feature that every camera has, so....
And I recently saw one camera had a feature just for the stop-motion that the camera displays the previously taken photo overlayed on top of the live image view.
I used a free software called MonkeyJam to create the above clip btw.
And though I didn't worry that much about lighting for that one, I think one or two lamps and something like this ↓ would be somewhat helpful (A mirror attached to piece of wood went through an old lens's cap (the mirror's tilt is adjustable))