Replying to one's own question

Question: Is there a policy about replying to one's own question? It might happen (and it has just happened to me) that on further thought or research, one finds a solution to his own problem, which might deserve a place alongside other people's answers. Is this acceptable?
Answer: From the FAQ:

It's also perfectly fine to ask and answer your own question, as long as you pretend you're on Jeopardy: phrase it in the form of a question.

It is encouraged to answer your own question, as long as it meets the standard Q&A format.
Comment: The FAQ reference to http://en.wikipedia.org/wiki/Jeopardy! is not ideal for people who have never seen the show; it's a **really** long article. I'd prefer the FAQ to be self-explanatory.
Comment: Thank! Sorry for having missed this in the FAQ.
Comment: I was just about to say what Graham said, I have no idea at all what Jeopardy is, any more than the average American will know what Countdown is... :)
Answer: If you post a question about a problem you have, then find the solution to your own problem, please, please post it.
While official policy is to encourage self-answering questions, I personally take a dimmer view of people who post a question then answer their own question seconds later. If it's a common problem to which the user wants to document the solution, that can be a helpful contribution to the site, but frankly I hold such questions to a higher standard of "it better be a good general question."
In general, SE question serve two purposes: they help the OP get the information they need, and they create a searchable archive of useful information for people who encounter the problem in the future. If a question seems likely to only fill the first role, it gets closed as "too localized." But an instantly self-answered question only fills the second role, so it had better be good at that second role (i.e. it should be something that others are likely to look for).
If someone asks and then instantly answers their own question, my first response is to ask "what's the point?" Sometimes there is indeed a good point in documenting the question, but if there isn't, I'm likely to vote against the question.
Comment: Right. Nathan, Jason, and I discussed this on the [Ask Different Best Practices podcast](http://apple.blogoverflow.com/2012/01/podcast-20-ask-different-best-practices/) (27:00 to 31:30). We came to the conclusion that a question should be a problem that you're having, and that although easy questions are OK, lazy questions are bad. If you can instantly answer your question, you didn't really have a legitimate problem.

Replying to one's own question


How does account recovery work?

Question: What are the limitations to account recovery regarding private keys & associated coin holdings?
How does account recovery work for stolen/lost accounts?
Comment: @noisy If you have an answer please post in the 'answer' section below. Comments do not have the tools we use to vet/edit/correct whatever you might say here, so we do not post answers in comments. Thanks.
Answer: This issue is discussed Here on GitHub by Dan and also in his development update a few months ago
The general concept is that every account will have three special permissions: owner, active, and recovery. You will be able to choose recovery partners you trust (friends/family) who will be able to update the active authority and grant you access back into your account. As long as you specify some friends and family you trust to return your account to you if you lose your keys, then you never have to worry about getting locked out forever.  This is made possible through Authorization delays and Deferred Transactions on the EOSIO blockchain.
In Dan's post he also says:  There is only one scenario that could leave an individual helpless: losing their active key at the same time as the hacker gets the key. This can largely be mitigated by having an adequate backup strategy with redundant keys.  That could be considered a limitation.
Comment: Recovery was removed as native action and is now discussed in this issue on github https://github.com/EOSIO/eos/issues/2894

How does account recovery work?


new passport and US visa in old passport has different spelling in middle name

Question: my husbands new passport has a  corrected middle name of ESPAÑA while his US visa that is in his old passport has a spelling of ESPANA. does he need to secure a new US visa? pls help! thank you
Answer: This is not a typo and does not invalidate the visa.
The US does not use special characters (those other than A-Z) for names in their visas. They have their own scheme for translating special characters into non-special ones which typically involves removing the special parts of characters, such as the snake above the "N" in this name.
As a reference, you can see this in the US visa FAQ for Germany (https://de.usembassy.gov/visas/visa-faqs/) in point 1. I could not find a similar FAQ entry on the respective page for Spain, but the same rules should apply.


How to get rid of sprouts on the trunk of my willow tree

Question: I have a willow tree that I pruned back most of the top. Now I have sprouts coming out all over the trunk. I can cut off the new sprouts in unwanted areas, But is there a way to keep them from coming back?
Comment: Have you tried putting landscape cloth extremely close to the tree so that the suckers will push right into the cloth? I remember my parents had suckers right away after cutting some of the cloth back from the base of the tree.
Comment: @blackthumb the question says "coming out all over the trunk" not suckers from the roots.
Comment: @alephzero the trunk is where the tree meets the dirt.
Comment: @blackthumb Most define the trunk differently. [1](https://en.wikipedia.org/wiki/Trunk_(botany)), [2](https://www.collinsdictionary.com/de/amp/englisch/tree-trunk).
Answer: Your basic problem is that the harder you prune the tree, the more it will try to grow, until you finally go a step too far and kill it.
But the chances of killing a well established willow tree are just about zero. They will even regrow after a stump grinder has taken out the root ball to a foot (30cm) below ground level!
Willow is also one of the fastest growing trees, even before you provoked into growing even faster.
What you did to your tree is called "pollarding" which was traditionally done to produce lots of thin, fast growing branches which can be harvested for weaving baskets, etc, or as firewood. The new growth was cut right back every one or two years, and the tree will continue producing more indefinitely.
Coppicing is basically the same as pollarding, except you cut right down to ground level rather than leaving a few feet of the original trunk. Pollarding had the advantage that animals like rabbits can't eat the new shoots as soon as they appear, but apart from that there is no real difference.
A couple of pictures here of how your willow is trying to develop after you pruned it, if you just let it do it's thing for a couple of years. Trying to fight it is going to be tough!
Trying to turn your willow back into "something that looks like a tree" is probably a lost cause. If you want to start a new tree, you can easily grow one from a cutting. Just wait till a few of the shoots are two feet long, cut them off at the base, stand them in a bucket full of water, and ignore them (except for topping up the water as required). They will grow roots in a few weeks. Then plant them and give them a bucket of water every day until they get going. It is impossible to over-water willow trees.
Alternatively, use the new growth to make a "living sculpture" or a garden feature like a shelter for a seat. There are plenty of videos on the web with more detail, but you won't do any damage by "getting it wrong" - just prune off your mistake, and start again!
Comment: "impossible to over-water willows" - as in, "they will happily grow in standing water".  For example, see http://www.swampyacresfarm.com/wordpress/weeping-willow-tree-planting-project/


Where are the files that control the multisite user dashboard?

Question: In multisite where are the files that control the dashboard for the multisite user admin? Also where are the files for the normal, standard, wordpress admin dashboard? I want to tweak the mu user dashboard to have some things the normal wordpress admin has. Thanks - Brandon
Answer: Most of these files are in wp/admin/network. But be aware that some are just wrappers for regular admin files one level up: they include the corresponding file.
What you probably need are the hooks and the function is_network_admin() that checks if you are currently on a network admin page.
Most hooks and global variables are the same as in admin just with a prefix or suffix network. $pagenow on the dashboard for example is dashboard-network.
The most important difference: there is no network settings API. You can use wp-admin/admin-post.php as a workaround (example).
Comment: is that super admin or is it just the normal user? I fount the super admin I think, but not the normal user.
Comment: Only users with the `'manage_network'` capability can access the network admin area.
Comment: I know, I am saying I need to edit the user admin  not the network admin, but the user admin dashboard, I am going to tweak it to allow customers to add plugins that we control. I just need to know where the dashboard files are for the network user dashboard, nothing else. Thanks for the help, Brandon


Fitting Shimano cassette to an old mavic wheel

Question: I have a vintage CAAD 2 with Mavic Open CD wheels SUP, (very old) but perfect for what i need. The running gear is campanola but very high geared. I want to change it to Shimano which have a better range. My question is what free wheel hub will fit my mavic wheels for the Shimano 9 speed cassette i bought.
Comment: What hub is it built with? You may be able to find a replacement freehub body to fit Shimano cassettes.
Answer: Campy and Shimano 9-speed cassette spacing are too different for the mismatch to work very well. Campy is 4.55mm cog-to-cog and Shimano is 4.35mm. It is true that it can be made to kinda sorta work, i.e. in the stand when things are clean and new, but it's finicky in real world conditions.
It seems like the Veloce 9 28t cassettes haven't been available for a while. Miche is making a Campy-compatible 9-speed 13-28 which is available though. Your simplest route by far, especially if the rear wheel is still good, is almost certainly to get that cassette and then if that isn't enough, switch to compact cranks in front.
The other path is get a new Shimano-compatible rear wheel, or build a new hub into your current rim if you really want, plus a Shimano 9 cassette that has individual cogs, and then conversion spacers for it that switch the spacing to Campy. These are the good way of doing this kind of hack. 9-speed ones have been available but I'm not sure if anyone is making them new anymore, but if not they can probably still be found.
You probably have a Campagnolo (as in made by Campy) hub now, and no replacement freehub will be available for it. At this point it's almost certainly the same deal if it happens to be a third-party Campy-compatible hub, although it is true that sometimes swapping freehub bodies on those with another type is technically possible.
(It sounds like you've got a wheelset with Mavic rims and someone else's hubs, as I don't believe there was ever an Open CD prefab set. This bike is also from before the days of named prefab sets. If I'm mistaken and the hubs are also Mavic, then there very well may be alternate freehubs out there for them, as Mavic road wheels have typically emphasized being fairly easy to switch.)
Answer: You may find New Old Stock (NOS) hubs on ebay. I have some wheels built in the late 80s/ early 90' with Mavic Open CD rims and Shimano's Ultegra 600 hubs. Those rear hubs and those from the 105 or Dura-Ace series are normally 36-hole, though 32 existed. The hubs take 9-speed cassettes. There should still be enough of these around.
You could also try for some newer stuff, any hub with the right hole pattern and a Shimano-fitting take-up will work, although you'd have to adjust the width of the cassette with the correct thickness of spacers which isn't a problem. All cassettes down to 7-speed fit on modern hubs. Spacers of different thickness are widely available from bike shops.
But there's a bigger caveat if you want to mix Campagnolo shifting and Shimano cassettes. That won't work together unless your system uses friction shifting. If your system uses indexed shifting which a 9-speed probably does, the spaces between the cogs and the movement of the rear derailleur differ between Campa and Shimano and will not permit clean shifting.
Comment: Thank you for the quick response. Am i right that i need to respoke the wheel with the Shimano Utegra hub, or is the Shimano hub your referring to compatible with the mavic wheel centre i have?
Comment: @GavanDuffy : If the number of holes is identical, yes. I'd recommend you use new spokes and check the braking surfaces for wear.
Comment: The spacing for 9 and 10 speed Campagnolo and Shimano is very close and you can get away with just using the cassette from other system. Of course we have no idea if OP's bike is even 9-speed to begin with. And it's likely that if the cassette size is not available from Campagnolo, the derailleur isn't able to handle it anyway.
Comment: @ojs : Anyway, a purist would rather 'suffer' on the correct Campa cassette than run a Japanese cassette on a vintage Italian set-up. ;-) I'd keep the old wheel for purity's sake and display purposes and buy a second rear wheel with that Shimano cassette. It can't be that expensive, probably less than a new hub, spokes and the labour for a rebuilt.
Comment: @Carel a significant portion of cyclists are not purists. Besides, Campagnolo stuff is often durable, so 9-speed is not necessarily vintage that is kept for display purposes but actual working gear.


Recent Facebook XSS exploit details

Question: There was a recent XSS exploit on Facebook that posted a vulgar message and got users to click on a link to spread the payload. What vulnerability was exploited, and what can other sites do to avoid a similar attack?
Answer: Here is a good overall reference http://cwe.mitre.org/data/definitions/79.html
per www.infosecisland.com:

From Symantec's Candid Wueest:
"The vulnerability exists in the mobile API version of Facebook due to insufficient JavaScript filtering. It allows any website to include, for example, a maliciously prepared iframe element that contains JavaScript or use the http-equiv attribute's "refresh" value to redirect the browser to the prepared URL containing the JavaScript."
"Any user who is logged into Facebook and visits a site that contains such an element will automatically post an arbitrary message to his or her wall. There is no other user interaction required, and there are no tricks involved, like clickjacking."
"Just visiting an infected website is enough to post a message that the attacker has chosen. Therefore it should be of no surprise that some of those messages are spreading very fast through Facebook. Some are posting links to infected websites, creating XSS worms that spread from user to user."
Facebook has patched the JavaScript-based XSS vulnerability, and the company says they are now working to undo the damage done by the attack.

So the issue is related to neutralizing data input into web pages.
Answer: Of course, we now live in the internet era, so, there's a video for that!
https://www.youtube.com/watch?v=QcSAU16wjHQ
It is almost 10 minutes long, complete with all the details you would like, reviewing the exploit code and its functionality.

Recent Facebook XSS exploit details


Is the Tathagata 'special'?

Question: Mahayana or Theravada, or any other offshoot. Is a Buddha an exception? Or a personification?
Comment: You need to define "special."
Comment: The question is not clear enough. What does "special", "exception" and "personification" mean here?
Comment: To tell someone is special, we have to compare him/her with someone else. So the answer for your question is entirely depend on whom the blessed one compare with. The number of sets which all the persons/things other than blessed one belonged to is countless. So please narrow your question to something like "Is Tathagata special from another Tathagata?" or "Is the Tathagata special from other Arahants?" or "Is the Thatagata special from puthujjana?" or "Is the Thatagata special from other conditioned things?"
Comment: I can only answer for the last part of your question until you change the question. The blessed one said "Sabbe Dhamma Anatta". Here, "Dhamma" means all including Nibbana. So the Tathagata is not an exception. In other words, the blessed one is also no-self.
Answer: It is not personification. There is evidence that Gotama Buddha exists in India. He is special so he was called Samma Sambuddha.
================
when the Buddha is designated a sammā Sambuddha, "a perfectly enlightened one," this highlights not only the fullness of his enlightenment but his authority and reliability as a spiritual teacher.
https://www.accesstoinsight.org/lib/authors/bodhi/arahantsbodhisattvas.html
Answer: Why does good householder Ilya, so long and often wisely involved, as such a fullish question, actually knowing for her self? Why would on join a "Tathagata-form" at first place, if perceiving him as common?
Everybody, seeing the Dhamma could see the Tathagata, and in as far every not blind person could reach same "Tathagata-hood", once there, is common under Arahats. And also "fox and sour graps"-thinking is common under those not inside or heading toward different ancestorship.
Although householders question could be marked as special unwise, it's actually common under common. If liking common... well then... the world stands open for such.
[Note that this isn't given for stacks, exchange, other world-binding trades, nor for delight in pseudoliberalism, but for escape from this wheel]

Is the Tathagata 'special'?


How do I acquire artifacts?

Question: I think in one of the videos they showed them being dug up from either razed cities or old city ruin sites, but I haven't seen a concrete explanation. How exactly do I acquire artifacts to fill my museums et al?
Answer: Artifacts are gained by using Archaeologists. The Archaeologist unit is unlocked by the Archaeology technology in the Industrial Era, and also can only be built in cities that have built a University.
Once you have the Archaeology technology, even before you make an Archaeologist, you will be able to see basic antiquity sites. Move an archaeologist to one, and they will be able to work the tile as workers do other tiles. This takes a handful of turns (depending on game speed), and when they are done you will have the option to gain an Artifact, or to create a Landmark improvement on the tile.
If you see an antiquity site in another civilization's territory, you can still work it, but doing so will potentially anger the other civilization, in much the same way as converting their cities does when they have their own religion.
Lastly, if there are several other civilizations working archaeology sites, you can try getting the Exploration Social Policy Tree. Having all policies in the tree unlocks hidden antiquity sites, which function exactly the same as regular antiquity sites, but cannot be seen nor worked by civilizations without the full Exploration tree, which means there may be less competition.
Comment: Can antiquity sites appear in uncivilized territory?
Comment: Yes, and they often will. They appear in a manner similar to resources, scattered all across the map, though with the distinction that they disappear once excavated. In fact, antiquity sites in an un-owned area that has seen heavy barbarian activity may even give a Barbarian Artifact, rather than one associated with an actual civilization.
Comment: For those that appear in civilized territory, will they be blocked by tile improvements? I often improve unworkable tiles in anticipation of placing a nearby city; am I decreasing my chances of dig sites?
Comment: I just completed Archaeology, and several Antiquity Sites appeared in my territory on tiles with other improvements. I assume building a dig site won't remove the improvement but will update my comment if it does.
Comment: If you go for the Artifact option, no, the old improvement is fine. If you choose the Landmark option (which I glossed over, as it's mostly irrelevant to the question asked here), then the existing improvement is replaced.
Answer: Once you discover Archaeology, a new type of Bonus Resource will appear on the map -- Antiquity Sites!
If you build an Archaeologist (also unlocked with Archaeology) and move them to an antiquity site, they can perform an archaeological dig that will give you your choice of an Artifact or to create a landmark on the site.

How do I acquire artifacts?


How often are label recordings off-note: sped up or slowed down?

Question: How rare is it that recordings are sped up or slowed down after recording, by a few percent, during the mastering process?
Answer: Not that rare.  The producer felt a little extra energy could be gained by raising the speed and/or pitch a little. Or there may be more pragmatic reasons, making changes to fit in with the pitch or speed of what precedes or follows.
Comment: You mean that tracks are often changed to match the tempo of another song in a DJ mix? I meant individual song recordings. ... The producer can choose to change the speed of the recording that the artists played at, there is not taboo agains that, I should definately foresee that, when programming chord recognition program , the keyof A can be arbitrary adn not 440khz? I am wondering what kind of error level i would get ina chord recognition program if i presume that all recordings are in universal digital tuning standard of A=440.
Comment: That wasn't what I meant, but it could also happen.
Answer: This used to be common before the days of digital - often the record company would complain to the producer that a song is too fast or too slow and the option would be to vary the tape speed on the master.
Comment: Even with the current pitch shifting algorithms, it's not so easy to pitch shift in the digital domain without loosing quality and adding artefacts - particularly if the track has a lot of acoustic guitars, cymbals or vocals.
Comment: John Lennon often had his recordings slowed down a bit to lower the pitch of his voice --he felt he sang too high.  And KC (of the Sunshine Gang) used sped up instrumentals as a signature part of his sound.
Comment: Why only before the days of digital?  Faster doesn't HAVE to mean higher now, but there's a lot of nostalgia for the "old ways" in the recording world!


Aluminium Aerobars on Carbon Handelbars

Question: Since I want to build up a new bike with road or gravel handelbars and aerobars I try to get as much information about it as possible.
Now I have just watched a video where the person in it says (at 00:55) that it is not recommended to use aluminium aerobars with carbon handelbars. I am just wondering why that is (maybe because they want to sell more of the cost intensive carbon stuff). Both can make scratches on the handelbars but if you tap it both should not. Any ideas why this should not be recommended?
Comment: [See Rule #54](http://www.velominati.com/comment-page-8/)
Comment: My carbon roadbars tell me that the maximum clamping torque must not exceed 5Nm, no matter what you clamp, whether the bars in the stem or an aero-extension. No matter what you clamp you should always use carbon mounting compound since it will prevent slippage.
Answer: I'm not a composites engineer. However, I'll attempt to explain.
Some carbon bars can take clip-ons
If a carbon fiber handlebar or a carbon fork steerer can withstand the force of your stem clamping on it, then chances are a handlebar could also withstand the force of aero bars clamping on it, assuming it was designed to do so. I've found several carbon handlebars that specifically claim to be compatible with clip on aero bars in general, like the Bontrager XXX aerodynamic handlebar. This bar's tops are flattened for aerodynamics (laugh if you want, but it actually makes a small but measurable difference). I suspect the bar would take clip ons in the rounded center section. The ENVE SES aerodynamic handlebar is compatible with ENVE's own clip ons, which are designed to clamp onto the flat section. Specialized makes its own version for International Triathlon Union (ITU, where drafting is legal) riders of the Venge aero road bike, which has aerodynamically shaped bar tops as well. And, naturally, many carbon bars are round, and some of them, like this Bontrager Pro handlebar, claim compatibility with clip on aero bars.
As a counter-example, consider the 3T Superleggera (Italian for super-light) handlebar. The Limited and Team versus weigh under 190g per bar and explicitly say they are not compatible with clip-ons. The 240-250g Pro version explicitly says it is compatible with clip-ons.
If they don't say they can, assume they can't
I'd wager that if a carbon handlebar's literature does not specifically state compatibility with clip on aero bars, it is not compatible. I would assume that its clamp area is only reinforced right where the stem clamps. So, the presenter in the Global Triathlon Network video isn't entirely correct, but she's definitely not wrong.
Recall that carbon frame tubes are not designed to withstand clamping, and frames can be damaged if just clamped in a repair stand. If a carbon handlebar wasn't designed to safely take clip-ons, it might not have the necessary wall thickness or other structure to not crack under the clamping force, and I would assume that it was not designed to withstand clip-ons.
Why would not all carbon handlebars be able to take clip on aero bars?
@mattnz linked to The Rules, which is basically a tongue in cheek style guide for performance-oriented road cyclists. He correctly stated that Rule 54 says not to mount aero bars (unless you're in a mountain time trial). The Rules are definitely intended to be tongue in cheek. However, aside from fashion and peer pressure, there's a substantive reason for roadies not to mount clip on aero bars: your control over your bike is reduced considerably when in the aero bars. Hence, I'd argue that you should not use aero bars if in a paceline or even if you are riding with a large group of riders, barring explicit prior agreement (e.g. you are doing team time trial practice and you all agree that the first X riders will stay in aero bars). If you are in a sanctioned mass-start road race, you're not allowed to have clip-on aero bars at all.
I'm not sure how high the demand for clip-on compatibility is among many drop bar riders. In my experience, most riders don't mount them. Hence, some manufacturers might assume they don't have to design their carbon bars to accept aero bars. This might not be a sound assumption.
What about light aluminum bars?
This discussion raised a question for me: should we assume that aluminum handlebars are safe for clip-ons? I recall that the lightweight aluminum handlebars of the early 2000s may have had specified weights of 220g or less, whereas claimed weights seem considerably more for most aluminum bars today (e.g. the lightest alloy Bontrager handlebar seems to have 260g claimed weight).
I do not recall if lighter aluminum handlebars were rated for clip-ons or not. It does seem possible that the lighter bars may have been pushing the limits. If they were aggressively butted (i.e. their wall thickness was different through the length of the bar), then it's possible the area by the stem clamp got butted to a lower thickness and that it wasn't safe for clip-ons. However, I don't really have a way to confirm this right now.
In any case, I suspect that people looking to buy a light bike today would either use carbon handlebars, or else they might not bother with light handlebars entirely. There may no longer be a demand for or a supply of ultralight aluminum bars. The ones that remain probably do have sufficient wall thickness to accept clip-ons.
Side note: internal view of a carbon handlebar
I suspect the stem clamp area on carbon handlebars is much thicker than the rest of the bar. I'm pretty sure I see that in this video by Luescher Teknik, an Australia-based carbon fiber testing and repair expert who cut his teeth in the aerospace industry. (Vid should start at about 6:10 in, and it shows a cut-up 3T carbon handlebar.)
Comment: I'm with you except for your inclusion of endurance road bikes - they're often bought for long rides without bans on aerobars, from organised events to credit-card touring, and aerobars provide a nice relief hand position especially into a headwind.  That's why I've got them on my tourer
Answer: First, that seems to be generic advice, so there are bound to be exceptions.
But, in general, there's a really good chance carbon-fiber handlebars are not round except for the central clamp area, and in general are not designed to have weight-supporting structures clamped to them.
Aluminum bars tend to be round, and aluminum in general is a lot more forgiving of undesigned loads than carbon fiber might be - any one bit of aluminum will have pretty much the same characteristics (tensile strength, stiffness, etc.) in all directions.  Carbon fiber can be extremely anisotropic - different properties when measured in different directions.
Aluminum bars strong enough to handle the shocks of supporting significant weight over bumps pretty much have to be able to handle the pressure of clamp-on load-bearing devices such as aerobars.  And aluminum bars tend to be simple tube shapes and not complex forms.
Carbon fiber bars, on the other hand, can easily be complex non-round shapes that aren't readily able to handle non-specific clamp-on accessories. Carbon fiber can also be designed in ways that it can't safely handle significant loads that it wasn't specifically designed for.
So if you get a set of carbon fiber road or gravel bars that are round, and specifically designed to handle clamp-on aerobars, they'll work. Good luck finding such bars, though, as carbon fiber bars tend to be expensive, high-end, dedicated-to-their-specific-discipline accessories.
I suspect that's why that video gave that advice.
Comment: I understand your point that carbon might be not suitable or dedicated. But still there are many (as the one in the clip) using carbon aerobars on carbon handelbars (e.g. https://bikepacking.com/plan/lael-wilcox-2019-tour-divide-gear-list/). But still do not understand why you should not mix the material.
Comment: @ruedi https://www.google.com/search?q=i+heard+it+on+the+internet+it+must+be+true   ;-)
Answer: Clamping items on Carbon handles have a limited torque amount unless they are designed to take more force.
I bought a Mt Zoom MTB handlebar. There was two versions, one for using handlebar ends, and a second version that was lighter but would NOT accept handlebar ends.
I think it more depends on the handlebar, rather than if the material is alloy or carbon. I don't think the material means anything in this context.
Answer: This sounds like hogwash. Even carbon clip-on bars have aluminum clamps. There might be some with carbon clamps out there, but I haven't seen them.
It is possible for galvanic corrosion to form between aluminum and carbon fiber, so you would need some kind of intermediate layer. I think that carbon bars normally do have some kind of clearcoat, which I think would serve that purpose.
Comment: Oh I get that, and I don't think we are disagreeing with each other. If I understand correctly, the question is whether *carbon* bars can be used with *aluminum* clip-ons. I don't question that there are some carbon bars that cannot be used with *any* clip-ons.
Comment: It may not be hogwash. Consider the 3T Superleggera Carbon handlebar (Italian for super-light). The Limited and Team versions explicitly say they are **not** compatible with clip ons. They do weigh well under 200g. The 240-250g Pro version is compatible with clip ons. https://us.3t.bike/en/products/dropbars/superleggera-560.html
Comment: That's a good point. I interpreted the OP's question in a more general sense.

Aluminium Aerobars on Carbon Handelbars


Neyman Pearson Lemma application

Question: A sample of size $n$ is taken from a random variable with probability density function $f(x)=(\theta+1)x^{\theta}$, $0 \leq x \leq 1$. Use the Neyman-Pearson Lemma to determine the form of the critical region for the most powerful test of $H_{0}: \theta=1$ against $H_{1}: \theta =2$. What I did was I found the likilehood function of $H_{0}$ and $H_{1}$ which gave me $2^{n}x^{n}$ and $3^{n}x^{2n}$ respectively. Then I obtained that $2^{n}x^{n}/3^{n}x^{2n} < c$ and then simplified that expression. However, I was wrong, so any help is appreciated.
Comment: You might want to add the `self-study` tag and read it's wiki.
Comment: Could you be a bit more specific ? I don't understand why I a did not applied Neyman-Pearson correctly ...
Answer: You are given a sample $\mathbf X=(X_1,\ldots,X_n)$ of size $n$, so you cannot work with a single observation.
The joint density of $\mathbf X$ is $$f_{\theta}(\mathbf x)=(\theta+1)^n\left(\prod_{i=1}^n x_i\right)^{\theta}\mathbf1_{0<x_1,\ldots,x_n<1}\quad,\,\theta>0$$
By Neyman-Pearson lemma, a most powerful test of size $\alpha$ for testing $H_0:\theta=\theta_0$ against $H_1:\theta=\theta_1(>\theta_0)$ is given by
$$\phi_0(\mathbf x)=\begin{cases}1&,\text{ if }\lambda(\mathbf x)>k\\0&,\text{ if }\lambda(\mathbf x)<k\end{cases}$$
, where $$\lambda(\mathbf x)=\frac{f_{\theta_1}(\mathbf x)}{f_{\theta_0}(\mathbf x)}$$ and $k(>0)$ is such that $$E_{\theta_0}\phi_0(\mathbf X)=\alpha$$
For the problem at hand, I get $$\lambda(\mathbf x)=\left(\frac{3}{2}\right)^n\prod_{i=1}^nx_i$$
Now study the nature of this function in terms of $\prod_{i=1}^n x_i$ to completely define $\phi_0(\mathbf x)$.
Comment: Actually it should be $\theta >-1$ for the parameter space.
Answer: Likelihood function
If the individual members in the sample are independent then the likelihood function can be based on the joint probability distribution (which is the product of the individual distributions):
$$\mathcal{L}(\theta;\mathbf{x}) = \prod_{i=1}^n f(x_i|\theta) = \prod_{i=1}^n (\theta + 1)x_i^\theta = (\theta+1)^n P(\mathbf{x})^\theta$$
where $P(\mathbf{x}) = \prod_{i=1}^n x_i$
and you get for the likelihood ratio:
$$\Lambda(\mathbf{x}) = \frac{\mathcal{L}(\theta_1;\mathbf{x})}{\mathcal{L}(\theta_2;\mathbf{x})} = \left( \frac{\theta_1+1}{\theta_2+1} \right)^n P(\mathbf{x})^{\theta_1-\theta_2}$$

Distribution of $P(\mathbf{x}) = \prod_{i=1}^n x_i$
$P(\mathbf{x}) = \prod_{i=1}^n x_i$ is the statistic that we can use to fully describe the likelihood ratio. Let's have a look how it is distributed.
We can find the distribution of $P$ by using the general formula for a product distribution:
$$ f(x_1 \cdot x_2 = p) = \int_p^1 x_2^{-1}f(p/x_2) f(x_2) dx_2 = (\theta+1)^2 p^\theta \log p $$
a process which you can continue and you have more generally
$$f(p) = \frac{(\theta+1)^n p^\theta(-\log p)^{n-1}}{(n-1)!}$$
in a plot this looks as following

Principle of the Neyman-Pearson lemma
What you should note about these graphs is that the probability density for observing a particular $P$ is not the same for each $\theta$. With the hypothesis $\theta=1$ you are more likely to get smaller values of $P$ in comparison to the hypothesis $\theta = 2$

Now the point of the Neyman-Pearson lemma is to find a region where the probability of rejecting the null hypothesis, conditional that the null hypothesis is true, is equal to the chosen $\alpha$ level (e.g. 5%), while making the probability of rejecting the null hypothesis, conditional that the alternative hypothesis is true, maximum. This occurs when we choose those regions where the ratio $\Lambda$ is smallest.

In the first image ($n=3$) you see that the power is not really high (100-12.6 = 87.4% probability to make a type II error when $\theta=2$) but this power increases when $n$ increases. In the second image ($n=6$) the power has increased to 20.3%.

Choosing a critical region
The critical region is found by setting
$$Pr(\Lambda < c_\Lambda | H_0) = \alpha$$
Such that we only get a type I error (falsely rejecting the $H_0$ conditional on $H_0$ being true) in a fraction $\alpha$ of the cases.
To express this (in the case of the exercise) we can use $P(\mathbf{x}) = \prod_{i=1}^n x_i$, the statistic that fully describes the likelihood ratio. And when $\theta_1<\theta_2$ then we can say that if $\Lambda$ is smaller than some critical level then $P(\mathbf{x})$ is larger than some critical level. Thus we look for:
$$Pr(P(\mathbf{x})>c_P|H_0) = \alpha$$
which can be found using the earlier expressed distribution function of $P(\mathbf{x})$
$$F(p) = \int_0^p f(x) dx = \frac{(\theta+1)^n}{(n-1)!} \int_0^p x^\theta (-\log x)^{n-1} dx = 1-\alpha$$
Now this can be expressed analytically
$$\frac{(\theta+1)^n}{(n-1)!}  \int_0^p x^\theta (-\log x)^{n-1} dx = p^{\theta+1} \sum_{i=0}^{n-1}\frac{(-(\theta+1) \log p)^{i}}{i!} = 1-\alpha$$
which is an implicit form of which I am not sure whether you can solve this in closed form, but it is not too difficult to use computational methods to solve it.
(Alternatively, you could express it in terms of the regularized incomplete gamma function. This relates also to the comment from StubbornAtom that the product of $x_i$ is related to the sum of $\log(x_i)$ and the distribution of these is a gamma distribution.)
Comment: I would have added this in my answer if the OP had made any response, but say I have to find some $c$ for which $P_{\theta_0}(\prod X_i>c)=\alpha$.

We have $X^{\theta+1}\sim U(0,1)$ (the distribution function), so that $-2(\theta+1)\ln X\sim \chi^2_2$, and summing over these iid observations, we can find $c$ in terms of the $(1-\alpha)$th fractile of $\chi^2_{2n}$.
Comment: Good job but we don't really need the distribution of $\prod X_i$ in the end.
Comment: @StubbornAtom how do you set the critical level for the likelihood ration such that the type I error is $\alpha$ ? $$Pr(\Lambda < c_\Lambda | H_0) = \alpha$$

Neyman Pearson Lemma application


How can I take out a Heavy using the Huo-Long Heater?

Question: I was wondering if there was any way for a spy to stab a heavy who had the Huo-Long heater deployed without getting set on fire. The ring of fire seems to come out at intervals of flame no-flame, but every time I have tried as spy I've always ended up set on fire. So aside from the obvious "stab when he isn't shooting" is there any way around this weapon's effect?
Comment: According to the wiki, the attack interval of the fire ring is half a second, which means you need to be very precise in order to get in and backstab without being lit on fire.  Jumping is far easier I would imagine.
Answer: To avoid getting burned by the Heavy's Huo Long Heater, instead of charging towards his back, try jumpstabbing from higher positions.  Hold crouch while positioning yourself on top of him, then stab when you land on him (remember to hold Crouch).
Trying to run to his back and stabbing him will set you on fire, even whilst the Heavy dies.  So for these guys, I typically try jumpstabbing.
If you care less about getting burned, and more about making kills, use any knife besides the Spycicle. The Spycicle will be consumed when hit with fire, rendering your one-hit kill backstab gone, so take care when choosing the proper knife for the job.
If you care more about your life than making picks, then go with the Spycicle.  At the very most, if you attempt to bypass that half-second delay of flames from the Huolong, and mess up, you can still get away without getting burned.
Answer: One technique is to activate the Dead Ringer after a successful stab. You will be set on fire briefly (taking slight damage), but the Dead Ringer's effect will extinguish the flames.
It's very important that you activate the Dead Ringer after stabbing the Heavy (or at least after retreating if you feel your cover is blown) or you will be set on fire while cloaked. Not only does this reveal your location to enemies, the fire will also drain your cloak time, leaving you very vulnerable.
Answer: When dealing with Huo-Long Heavies, I use the Conniver's Kunai and the Dead Ringer. The health absorbed from the Heavy compensates for the damage caused from the fire ring and if you want to be cautious you can use the Dead Ringer. If you don't want to backstab, for some reason, I would recommend the Ambassador as its critical damage from headshots is helpful for quickly taking out the Heavy from long range.
(some advice with the Ambassador: before trying to use it, be sure that you can aim well using only the crosshair, and be sure you're far enough away to not attract the Heavy's attention. Also, use the Ambassador as a last-ditch option, as it is easier to just sneak up behind the Heavy and backstab him.)
Comment: A successful stab with the Kunai counts as healing and extinguishes the flames immediately.
Answer: EDIT:  After further research, jumpstabbing as @Retrosaur mentions is probably the most direct way to deal with the Huo-long.  It's effects are only along the ground!
The Spy-cicle will let you get in close although you can't necessarily stab them at that point.  But it does regenerate pretty quickly, I use it with the ambassador, to do a sort of head-shot backstab on weaker targets or even foolish heavies.

The ammo drain of the Huo-Long means the heavy must be next to an ammo source to fire continuously, the weapon's only major weakness.  Try to keep this in mind as you plan a take down for him, he's got to stop firing and run for the ammo if he's out in the open.

Often times I use a combination of the dead-ringer and the Spy-cicle to help me more properly fake a death.  Once people are convinced of your death, they often times more vulnerable.  I use the dead ringer in repeating strike runs, so that I'm always swooping in and out of melee range making it unclear whether if I'm truly dead or not.
Tip: The Ambassador is a reliable way to kill unprepared snipers, even good ones are usually suckers for it.
Comment: Your answer is detailed, which is good, but it seems a bit too general and not really tailored to this question; could you more clearly relate back to the question?


Is it possible to know the distance objects are from camera based on only knowing one object's height?

Question: I am doing a project where I have to know distance a particular object is from camera. In the photo I only know one of the object's height, but I don't know how far away that object is and I don't know how tall are other objects. Is it possible to write a code or do some geometry to know other objects distances from camera using only the height of one object? For example I have an image where 5 meters away there is a box which is 1 meter high, I wanna know the distance to human who is 12 meters away, or to know a distance to a dog who is 7 meters away. Maybe you guys know any datasets or models which deal with the same problem as I am facing. Any help will be appreciated.
Comment: No, it is impossible. Assume you see a circle, than in the image has 50 pixels of diameter (and a focal angle of 45º). The circle can have a real size of 1 meter and be at 1 meter distance, or 2 meters and be at 2 meters distance, ... . Impossible to know the real values.
Answer: Monocular depth estimation basically does this and it implicitly brings in knowledge about object size. But you need to have prior information.


How does wind cause large waves?

Question: I was just wondering about the large waves associated with storms. It seems a little counter-intuitive that large masses of water can be put into motion by moving air (which is much lighter than water). It must take a lot less energy to set a wave oscillating than I am expecting. I'd appreciate an explanation from first principles, though.
Comment: Are you talking about wind waves or storm surge?   https://en.wikipedia.org/wiki/Wind_wave  https://en.wikipedia.org/wiki/Storm_surge  I don't consider a storm surge a wave.
Comment: I was thinking of storms that occur on the open seas, not necessarily close to land.
Answer: This is going to be brief as on a phone : I welcome somebody posting a more complete answer. But the basic principle of large waves appearing from wind is:
 from a smooth water surface, the wind can produce only small ripples. But those ripples mean that the surface is no longer smooth. The higher the ripples get, the more surface there is for the wind to act upon, thus enlarging them more. Thus are local wind waves formed. For these wind waves to build into the large swell that is found in the oceans, this process needs to continue for a number of days, and some hundreds or thousands of miles. Large swell waves hitting the coast may have been formed in a storm the other side of an ocean.

How does wind cause large waves?


Why did Kronos swallow his children up, instead of killing them?

Question: As the myth goes, Kronos swallowed this children as they were presented to him, so he could prevent the prophecy. But why couldn't he kill them?
Comment: Probably "evil contains the seeds of its own destruction." Remember, these stories were meant both to entertain and to teach — these aren't histories of real beings. Characters can do stupid things because the plot needs them to.
Comment: Possibly because they're also gods? I *think* the Greeks treated their gods as unkillable, unlike the Norse.
Comment: @FuzzySquid If we go into "couldn't Cronus do that" territory, the most obvious question is: Couldn't Cronus avoid procreating in the first place?
Comment: @yannis: Perhaps he couldn't. Note the account of Cronus' emasculation of Uranus--the seed that fell on land and sea made them conceive and give birth to various divinities, Aphrodite among them.  If divine seed has such potency, I doubt that any prophylactic would have been effective. ;-)
Comment: Another story says that Ares was captures by giants, and he was put into a jar. There he was left to wither. He didn't die, but the was broken. Couldn't Cronus do that?
Comment: @RalfB Touché...
Comment: See *[Cronus: Name and comparative mythology](http://en.wikipedia.org/wiki/Cronus#Name_and_comparative_mythology)*.
Answer: Cronus's children were gods, and therefore immortal.  Until the "Pan is dead" tale, which was only related in the first century AD, no death of a deity is related in Greek mythology.  Gods and Titans alike may be imprisoned or transformed, but not killed.  This is unlike some other mythologies: whereas Osiris, Tammuz, or Baldur are clearly described as dead, the Greek equivalent, Persephone, is merely kidnapped by Hades.
In the story of Chiron, the immortal centaur, he is mortally wounded and wishes to die, but death does not come to the immortal.  Chiron is described in myth as giving his immortality away to Prometheus, in order to die; even then he does not truly die, but is transformed into a constellation.
From this account it may be inferred that the Hellenes took immortality literally: not just unaging, but actual unkillability.  This is supported by the myth of Tithonus, where it is apparent that agelessness and immortality were distinct concepts to the Greek mind: the former not being subject to growing old, the latter not being subject to death.
Thus, in answer to the question: Cronus did not kill his divine offspring because he could not---they were immortal, in the sense of unkillable.  The most he could do was imprison them.  Likewise, the gods later imprisoned Typhon and the defeated Titans, but did not kill them instead---not for want of will, but because even they could not kill immortals.
Comment: Good answer.  it's the "eternal present".  Was reading Graves' *Homer's Daughter* this weekend, and he notes that we don't say "Homer recorded", but "Homer records".


Informal way of saying hello?

Question: Is there a more informal way than the standard 你好 to say "hi" or "wazzup" when meeting friends or equal age people of the same age, or is 你好 always appropriate?
Comment: Just make a sound, like 'haa'. 'ahh' they are not English,  Chinese or any language,  they're just sound
Comment: Just say "hi" or "hey"?
Comment: Haha, yes of course, but is there a Chinese word that is equal to that? :)
Comment: Maybe "yo" or "哟". Generally it depends on context and relationship between you and this person you greetings. There're many alternatives, but not precisely equal to "hello", like calling them by nickname, or "吃了没?""去哪啊?""早" etc.
Answer: You can say '嗨', which is equivalent to 'hi' in English or '哈咯' which translates to 'hello' or even '哟' like another user had mentioned in the comments.

Informal way of saying hello?


Convention personal environment variables

Question: Is there an Unix convention for setting personal environment variables? I read they should be put in $HOME/.bash_profile instead of $HOME/.bashrc. Nonetheless, I was thinking of providing a way to distinguish my own variables. This way even though I would forget one I could tell at first glance whether it has been set by me or not. For instance when I do the autocompletion in the terminal I could make my variables start with an underscore, or a minus 'm' as in one of C++ language's conventions. I understand there might not be an absolute answer but I'd like to hear about some good practice and conventions that work toward this purpose: providing a simple way to distinguish system environment variables from personal ones.
Comment: Put them in your `$HOME/.bash_profile`, and they are yours since are put in your profile. `.bash_profile` is executed for login shells, while `.bashrc` is executed for interactive non-login shells.
Answer: Where to set environment variables is covered in What's the best distro/shell-agnostic way to set environment variables?
Regarding naming, the main reason to set environment variables is because an application uses them, so you don't get to choose the name.
There is no concept of namespaces for environment variables. The closest thing is to pick a prefix, generally of the form SOMETHING_ (i.e. the prefix ends with an underscore and you have variables SOMETHING_FOO, SOMETHING_BAR, …). But most variables aren't for a specific application, but rather a family of applications. If a variable is only meaningful in one application, it should generally be a command line option. So there isn't much need for namespaces.
If you're defining variables only for use on the command line, then don't use environment variables, use shell variables. (See Difference between environment variables and exported environment variables in bash) If you define a variable in a shell script and you don't use export, that's a shell variable, not an environment variable, and it's only visible in the shell where you defined them. So if you're defining a variable for use on the command line:

Define it in your shell interactive startup file (~/.bashrc for bash, ~/.zshrc for zsh, ~/.config/fish/config.fish for fish).
Don't export it.
There's a widespread convention that environment variables are all-uppercase and shell variables are all-lowercase.

For your own use, pick whatever names you like, as long as they don't conflict with environment variables that you use (environment variables are automatically imported as shell variables). I don't recommend an initial underscore because that's what bash and zsh's completion systems use internally.
Answer: Here are my recommendations for where to set the environment, along with explanations.
The relevant details are:

The user profile file is ~/.bash_profile, ~/.bash_login, or ~/.profile. I suggest using one of the first two, because the last one overlaps with other shells. However, see Note on GUI login at the end.
The user rc file is ~/.bashrc.
An interactive login shell (e.g. a console login, or ssh login) reads the profile file only.
A noninteractive login shell is rare, but it might occur run during GUI login. Either way, if this is a Bash shell, it acts as a noninteractive login shell, and reads the profile file only.
An interactive nonlogin shell (e.g. new tab in XTerm/Konsole) reads the rc file.
A noninteractive nonlogin shell (e.g. shell script) reads neither, with one important exception: If started by ssh, it reads the rc file.

The exception involving ssh is motivated by the fact that when a script is run through ssh (ssh $host my_remote_script), the environment (mainly PATH) is not already set up, as is the case when running a local script. Thus, IMO, the exception is a motivation to set the environment in ~/.bashrc, so that the same environment is used for both locally-invoked and remotely-invoked scripts.
Based on all this, my recommendations are:

Profile file:

Do not set anything that might be useful to a remotely-invoked script, including PATH.
Source the rc file unconditionally: . ~/.bashrc.

Rc file:

Set environment variables as needed.
Beware that the file will be sourced when the environment is already set (by interactive nonlogin shells). So, if you unconditionally do PATH=$HOME/bin:$PATH, you might end up with PATH=$HOME/bin:$HOME/bin:... after sourcing it twice (an annoyance, not an error). An easy fix is to guard the environment setting:
# ~/.bashrc
if [ ! "${MY_ENV_SET:-}" ]; then
    PATH=...
    ...
    export MY_ENV_SET=1
fi

Only define shell niceties for interactive shells:
...
[ "$PS1" ] || return 0
PS1=<fancy_colored_prompt>
source ~/.bash_alias
eval $(dircolors -b ~/.dircolors)
source /etc/bash_completion

GUI login. One last important thing you need to consider is how your GUI sets PATH during startup. This might be done using Bash, or not. In my case, I use KDE, and this file is sourced during startup:
# ~/.kde/env/path.sh
# https://userbase.kde.org/Session_Environment_Variables
PATH=$(env -i /bin/bash -lc 'echo $PATH')

This invokes a (rare) noninteractive login Bash shell, using an empty environment, which also sources the rc file, and all is consistent.
If you are using another GUI (Gnome?), you should look into how PATH is set during its startup. If your GUI sources ~/.profile, make sure to source the rc file from there as well.
Comment: Your facts are mostly correct but your advice is almost consistently bad. See http://unix.stackexchange.com/q/88201 and http://unix.stackexchange.com/a/3085 . `~/.bash_profile` is not read by most GUI logins whereas `~/.profile` is, so `.profile` is preferable. `~/.bashrc` is only read by interactive shell so it should never set environment variables, otherwise they are not set by programs that aren't started from a terminal. The profile file should not source `.bashrc` unconditionally, only if the shell is interactive.
Comment: In any case this, you aren't answering the question, which is not where to set environment variables but how to name them.
Comment: I addressed the GUI login issue.
Comment: Other than that, instead of distastefully dismissing advice (by shamefully calling it "consistently bad") and appealing to the logical fallacy that is an argument of authority, I challenge you to take time and explain what you find "consistently bad", or else retract such comments. Thanks!
Comment: To address your remaining argument, apart from the GUI startup issue- Any program not started from the terminal will (a) have the environment already set by the GUI, and (b) if for some peculiar reason they don't, and they need to source `~/.profile`, sourcing the rc from there covers that case. In your last sentence, "should not" is probably a personal preference. I am not saying your scheme doesn't work, I am only challenging your assertion that mine is "consistently bad" or even just "bad". IMO, these are different ways of setting things up.


Why do we have no enzyme to digest cellulose?

Question: As we know, cellulose is the most abundant polysaccharide in nature. Why don't we have an enzyme to digest cellulose?
Comment: Evolution doesn't make everything perfect.
Comment: I removed the line about evolution making things perfect. It is obviously wrong. Try watching an [albatross land](http://www.youtube.com/watch?v=5AsOjx_Twtw) for example and tell me that they're perfect.
Comment: @terdon or take off for that matter ...
Comment: Bcoz human body doesn't have appropriate enzymes to breakdown beta acetal linkages.
Comment: If we were able to digest cellulose which is the fibre which protects us from colon cancer, don't you think many of us would die of colon cancer? Probably we lost the gene for producing cellulase, the enzyme that digests cellulose, during evolution to our advantage.
Comment: The question is really: "Why can't humans OR bacteria easily digest cellulose". It's very hard! Ruminants need a large, specialized bioreactor and to chew food for hours, "ordinary" gut-and-microbes won't do. If a bacterium found a quick, efficient way to digest cellulose it and it's animal host(s) would mow down forests (until trees evolve another defense that is).
Answer: While it's true that cellulose is full of calories, it's very difficult to get the calories out.
Symbiotic bacteria take ages to digest cellulose, and as a result animals that digest cellulose with specialized symbiotic bacteria have a huge gut to house them in.
It's likely that the reason humans can't digest cellulose is because mammals generally can't. And mammals generally can't because it's way too much work, and we don't need to.
Comment: Even ruminants that eat grass and so on mostly just let bacteria eat the cellulose then digest the bacteria.
Comment: "mammals generally can't"?
Comment: @Resonating imho your answer would improve, if you incorporated your comments.
Comment: Are there animals who can digest cellulose without the help of bacteria?
Comment: [Some termites](http://rsbl.royalsocietypublishing.org/content/3/3/336.long), but I think that's it.
Answer: This seems one form of a common question about evolution.
That being: "Trait X would seem to be an advantage, so why can't organisms adapt to X?
That is, why don't we have all traits that are advantageous at all?  Why not just digest cellulose, but maybe why not lignin as well?  Why shouldn't we photosynthesize our own food?  What about sonar as well as eyes?  We know that some living thing can do all these things.
The answer, somewhat mentioned elsewhere here, is that some advantages are not enough for the adaptation to take hold.  You have to consider that there is a cost to each such ability as well.
Cellulose is energy poor and any animal which relied on cellulose would have to specialize in cellulose metabolism to the point that they might not compete against fellow animals that got their food from other sources like meat or vegetables.
thanks for the comment below:  addendum:
energy poor in this case is a combination of how common the material is, how advantageous it is to digest (woody plants don't grow back very quickly once you eat them up).  i don't know why i wrote that there are not cellulases.  there are plenty of them and we use them a lot but they tend to be from slow growing fungi...
if you want to follow your question to the conclusion : "celluose digestion is a huge advantage in all respects" then the question is why aren't they in every bacteria that grows around plants?  because evolution is not how cellulases are created?
in fact woody plants include other materials supporting their structure to prevent this eventuality.  lignin is a non carbohydrate semirandom fiber based on phenols that is indeed very slow to digest and difficult to get at with an enzyme... at the moment it does seem to be enough to prevent plants and paper celluose from dissolving and being eaten...
Comment: You make a good point. I think these questions also come from the wrong perception (which was evident in the original version of the question) that evolution is finalistic towards making a species "perfect".
Comment: shigeta, I agree with nico, evolution does not make things "perfect". Not by a long shot. Living organisms are a mess, riddled with hopelessly inefficient mechanisms. Think Rube Goldberg machines. It's nowhere close to what a decent designer would have come up with, but it's what you get from random mutation + selection. This more general question probably deserves an answer in itself ...
Comment: "Cellulose is energy poor" Excuse me? You're basically saying glucose is energy poor. You should specify that it's "energy poor" in the sense that it's resistant to enzymatic breakdown or something (I don't know if that's the actual reason, it's just what I'm assuming based on other answers in this thread.)
Comment: we make the same mistake when we buy cars too - a V8 2 ton pickup with back seats and i'll have the perfect car - it can do anything! But in biology a tiny fly is perfect and so is a rock clinging piece of lichen...they just do what they need to do well enough
Comment: there's lots of shades of meaning here, which is definitely interesting to talk about.  Organisms are so optimal for selected traits that they amaze and astound us - better than we can design ourselves in many cases.  Where selection has not had as much pressure (e.g. long life, resistance to damage and disease, empathy, speed, intelligence) it can seem that they are strangely vulnerable.
Comment: energy poor in this case is a combination of how common the material is, how advantageous it is to digest (woody plants don't grow back very quickly once you eat them up).  i don't know why i wrote that there are not cellulases.  there are plenty of them and we use them a lot but they tend to be from slow growing fungi...
Answer:
Why don't we have any enzyme to digest cellulose?

Why should we?  We don't use it as a source of energy so why bother?  Even animals that do "digest" cellulose, like ruminants, only do so because of symbiotic bacteria; it would be a poor system indeed in which every organism utilized the same resource.  We occupy enough of the food chain as it is.
Answer: The question forgets that organisms consume materials for two reasons: To capture chemical energy (which it focuses on) and to gain molecules that the organism cannot otherwise produce. Cellulose effectively serves only one purpose in organisms that digest it: energy production. Eventually, it is broken down into H2O and CO2, both of which are excreted.
Throughout the millennia, getting calories was not that difficult, but getting enough essential micronutrients (vitamins, minerals and amino acids) as humans moved into different environments has been where there was selective pressure. Selective pressure for other calorie sources, such as cellulose, has never really happened. Beyond this, there is a ratio of optimal caloric intake to optimal nutrition intake a human should get from his diet for that human and humanity in general. A mutation or sudden symbiosis with gut bacteria  that allowed for cellulose digestion would make it even more difficult to keep that ratio, but it is non-optimal situations where selective pressure occurs. The issue here, in my opinion, is that that would be too great a selective pressure on decreasing the micronutritional requirements. The human would far too easily get calories and need to eat many times more in calories what he needed to get the necessary nutrition. So actually, there is selective pressure against cellulose digestion. Further, because of the way humans are built and the other great primates, this sudden mutation or symbiosis seems very unlikely.
Also, cellulose already serves a vital purpose in the gut. It is commonly called fiber, and allows the feces in the colon to remain moist enough to be passed. Some mammals have adapted colons that can pass very dry feces (the Camel's feces is so dry that you can start a fire with it), but they are typically arid climate species, where water is by far the most precious resource. So the selective pressure was on water intake, not calorie intake.
So there has been no selective pressures on humans to digest cellulose, nor will there ever be, so long as there is such a high need for vitamins, minerals and essential amino acids. Such selective pressure would take the form of there first being super nutrient rich foods (relative to humans), then that same food becoming calorie poor. Basically, humans would have to start replacing a meal or two per day with only vitamin supplements. Even with that, the only mammals I know of that digest cellulose are actually utilizing symbiotic gut bacteria to do so. I can't imagine the clever way humans might get that bacteria into their own guts. Actually, I can.
Comment: I don't want to bump with an edit, but I recall a criticism of this answer that accused the line about nutrition to calorie intake ratio hinging on that common error that evolution makes perfect. I want to clarify that's not what I mean. I mean to point out that currently, because of known evolutionary pressures, there *is* an optimal ratio and an adaptation to digest cellulose would gravely affect that, therefore that would have to adapt as well.


1 Kalpa of Brahma

Question: 1 Kalpa (4.3 Billion Years)of Brahma matches the age of earth approx. which is 4.54 Billion Years. But in the 2nd Kalpa or the night of Brahma (after 4.3 Billion Years), Brahma sleeps and there is total annihilation. So in that case, after this age of earth, the earth should be totally destroyed again? But we are all still alive? Why so?
Comment: Possible duplicate of this question: http://hinduism.stackexchange.com/q/4018/36
Comment: By the way, you shouldn't say Kalpa of Brahma.  A Kalpa is a period of time which is one day for Brahma.  So you should either just say Kalpa or you should say day of Brahma.  Also, the night of Brahma isn't called a second Kalpa, it's called a Pralaya.
Comment: ok..so kalpa is 4.3 billion years and then there is pralaya.. But we are still alive? The earth hasn't been destroyed? Why so?
Comment: I was just commenting on terminology, not on your question itself.  But if you want my opinion on your question itself, it's always seemed to me that the calculation of the length of Kalpas must be flawed in some way.  Perhaps there are periods between Yugas and Manvantaras unaccounted for in the calculations, for instance.  The reason I suspect this is that Kalpas and Pralayas don't have to do with just creation and destruction of the Earth, they have to do with the creation and destruction of the entire three worlds: http://hinduism.stackexchange.com/a/2876/36
Comment: The three worlds consist of Bhuloka (the entire physical universe) along with Devaloka and Asuraloka. So that means that the present Kalpa would have had to start all the way at the Big Bang, not at the formation of the planet Earth.  So it seems to me that the actual length of a Kalpa would have to be about 30 billion years, and yet conventional calculations give us only 4.3 billion years.  So there seems to be a snag somewhere.
Answer: Because Time is cyclic in nature as per Hinduism. Creation, preservation and destruction is happenning since eternity.
Srimad Bhagavtam 12.4.2 says

चतुर्-युग-सहस्रं तु ब्रह्मणो दिनम् उच्यते स कल्पो यत्र मनवश्च तुर्दश
  विशाम्-पते||
One thousand cycles of four ages constitute a single day of Brahmā,
  known as a kalpa. In that period, O King, fourteen Manus come and go.

So, 1 kalpa is 1000* 12,000* 360 = 4.32 billion years as said by you. After pralaya, Three worlds (Swarga, Earth and Patala) are again created by Brahma (which is next day for Lord Brahma).
Srimad Bhagavatam 3.11.23 says

निशावसान आरब्धो लोक-कल्पो 'नुवर्तते यावद् दिनं भगवतो मनून् भुञ्जंश्
  चतुर्-दश||
After the end of Brahmā's night, the creation of the three worlds
  begins again in the daytime of Brahmā, and they continue to exist
  through the life durations of fourteen consecutive Manus, or fathers
  of mankind.

Same is the case with Mahapralaya. So, time is cyclic in nature with no beginning.

1 Kalpa of Brahma


Which Raspberry pi OS images support ENC28J60 ethernet port natively?

Question: Which Raspberry Pi OS images support ENC28J60 Ethernet adapter natively? If none, how can this be installed via the command line and on which OS image?
Comment: I have a Pi running Rasbian 4.1.13+ I can load the driver with "sudo modprobe enc28j60".
Answer: A driver for the ENC28J60 has been in the Linux kernel for a few years, so I you should be able to interface with it.
As @RichardPennington wrote, you load the module with sudo modprobe enc28j60.
Comment: Loading the module alone won't work, you also need some device tree bits to tell the kernel where the device is. I don't recall the detaill offhand though.
Comment: how come it doesn't load automatically like windows?
Comment: You mean you got the ethernet controller wired to your Pi, installed Windows on it and it just loaded automatically?
Answer: With moderne disk images, the software part is trivial to get an ENC28J60 work on Raspberry Pi (I did not try yet on other Pis): edit /boot/config.txt and add this where you can:
dtparam=spi=on
dtoverlay=enc28j60,int_pin=25,speed=12000000

There may variations such as int_pin=27.
Note that there are several different enc28j60 boards which may have different pinout. So don't rely on photos (unless your ENC28 is absolutely identical to the one on the tuto).
Also note that the pinout labelled on the RaspIO board on your picture is completely wrong, and does not match the official pinout published by the Raspberry fondation (it matches the documentation of a third party library). If you are trying to reuse rPi documentation to adapt to other Pis, you must ignore the labelling on the picture, and use this table from instructables:
Pi            ENC28J60     Colour
---------------------------------
+3V3          VCC          Red
GPIO10/MOSI   SI           Green
GPIO9/MISO    SO           Yellow
GPIO11/SCLK   SCK          Blue
GND           GND          Black

GPIO25        INT          Blue
CE0#/GPIO8    CS           Green

Unlike what's said on the instructables page, some trivial variations are possible: ground may be plugged from pin 20 or 25, and interruption can be wired to an other GPIO (as long as you update the   config line). Using CE1 is probably more tricky.
http://www.instructables.com/id/Super-Cheap-Ethernet-for-the-Raspberry-Pi/
http://raspi.tv/2015/ethernet-on-pi-zero-how-to-put-an-ethernet-port-on-your-pi
Comment: umm the pinout shows on the raspio board seems to match https://www.raspberrypi.org/documentation/usage/gpio/ to me


mutt: return to index after deleting or saving message in pager view

Question: After deleting or saving a message in pager view in the MUA mutt, the program remains in pager view and jumps to the next message in the current folder. Can this default behavior be changed so that after deleting or filing an email, the pager mode is exited and the folder index is displayed?
Answer: You want to execute two functions (delete-message and exit) at once so you have to use a macro:
macro pager d '<delete-message><exit>'

This will bind d to delete the current message and exit the pager.
You can do the same for s but it gets a little bit more complicated as you need to have user input, if you just accept the default save location or use save-hooks you can simply use
macro pager s '<save-message><enter><exit>'

If you want to alter the save location interactively I unfortunately don't have a tip how to change it, I'd try to use/leverage save-hooks
Comment: Hello. I notice that sometimes, by default, I am returned to the index after deleting a message in pager view. As a result, the `` command in the macro definition causes exiting from mutt to the terminal. Is there a way to simple jump to index so that this unintentional behavior can be avoided?
Comment: @user001 if you are on the last message and delete a message mutt will automatically exit the pager. And no you can't create/test for things in a macro (as far as i know)
Comment: I was not able to determine if there was a configuration option for these actions, but binding to a macro definitely works well. Please let me know if you figure out how to do key bindings that involve user interaction. Thanks for your help.
Comment: @user001 i don't know of such an option but you can have a look at http://www.mutt.org/doc/manual/manual-6.html which should cover all config options
Comment: Thanks -- I'm slowly making my way through the mutt documentation now.
Answer: I solved it this way:
macro index d "s=Trash\n" "move message to trash"
macro pager d "C=Trash\n\n<exit><delete-message>" "move message to trash"

This also prevents to mark the next message as read
Answer: To make a macro for this that doesn't close mutt when you're on the last message you can do something like this:
macro pager d "<delete-message>i" "Delete message"

Or (if you're using Gmail)
macro pager e "<save-message>+archive<enter>i" "Archive message"

This way since i isn't mapped by default in the index, it will just tell you 'key not bound' rather than exiting mutt. But since in the pager it is the default mapping for exiting the pager it will work as expected.
Note that this does mark the next message as read if it was not already. You could probably add something to the end of that to fix that if you wanted to though.
Answer: I looked in the source code to figure this out.
macro pager d "<enter-command>unset resolve<enter><delete-message><enter-command>set resolve<enter><exit><next-entry>"

Of course modify this for what suits you. The key is turning "resolve" off prevents mutt from moving to the next message after you delete it.


Interpreting PCA Results (identifying two randomized datasets - which is which)

Question: I'm working on an assignment which involves two sets of data, each a matrix whose columns are signals. The signals represent the observed knee motion angles of individuals walking - i.e 0 represents a "straight" leg, and 90 a leg bent at a 90 degree angle. Both sets of data are randomized in a way known only to the instructor. One set contains observations for individuals with arthritis, and one set contains "healthy" individuals - the control group. My task is to determine which is which using principal component analysis (in MATLAB).
I've performed the PCA but I'm wondering if my interpretation of the results is correct. The cumulative variance explained by the "first" five principal components for the first dataset ($X$) is:
$$[0.6582, 0.8151, 0.8927, 0.9480, 0.9802].$$
So the first principal component explains 0.6582 of variance, the first two 0.8151, and so on. For the second dataset ($Y$):
$$[0.7033, 0.8532, 0.9545, 0.9815, 0.9925].$$
My hypothesis is that the control group without arthritis will have greater variance between observations than the group with arthritis, who will have poor range of motion. As such, fewer principal components should capture more variance (from the mean signal), for the "arthritis" dataset, relative to the control dataset. That would make $X$ the control dataset.
I'm not sure if my reasoning is correct or if I've approached this wrong.
Comment: Your reasoning is not ungrounded but without actually seeing a plot of the components it will be hard to draw better conclusions. Please also add the [self-study] tag as it is clear an assignment.
Comment: Your hypothesis has an appeal. Have you been provided enough detail to make hypotheses about how different variables should change? (if not some searching can help) then look at the loadings and see if the pattern you observe matches what you expect. Remember loadings have arbitrary direction (+ or -) , but the scores for that loading will be determined by loading direction in the model.
Answer: Since your data set is clearly random(as only the instrcutor knows it), then the results must be similar. However, you do not know whether data


Why can't I choose my hyper-parameter in the training set?

Question: Say I've divided the data into 3 parts: training, validation and test. I know for example, that in Neural Networks, the number of hidden layers is a hyper parameter. Why can't I train numerous NN architectures in the training set and then test their accuracy in the test set; thereby allowing me to choose one final model? What is the purpose of the validation set in this instance?
Answer: I wouldn't say you can not tune the hyper-parameters in the trainig dataset, but the purpose of doing so is different than in the validation set.
In general, what it is intended with a ML algorithm is how to optimally classify or perform regression given some training data. Once the model is trained, it will be used with new data to obtain predictions, thus:

We need some training data. With this dataset, the model will look for the optimal weights and biases that minimizes the selected loss function.
We need some upper bound to our performance metric: for example, we can decide that our model has to perform like a human, which has showed an average metric of 95% for some specific task. The upper bound can be the best score in a certan benchmark, etc.
We start training the model on the training data and we evaluate its metric, lets take the accuracy. If the accuracy is too low, we can tune the hyper-paramters until the accuracy increases in the training data (no evaluation dataset is used here). The difference between our model's accuracy and the upper bound is taken as the bias of the model (this bias has not to be confused with the biases of the neurons). So, the accuracy on the training data gives us the bias of our model.
Once we decided our bias is reasonable (optimally 0) arises the question of how the model will perform when it is fed with data that has not be used for training (the real application). The difference between the accuracy on this unseen data and the accuracy on the training data is the variance of the model. This unseen data is the validation set and give us an idea of how the model generalizes to new data. If the variance is high, then the model poorly generalizes to new data. Then, we perform hyper-paramater tunning and evaluating the accuracy on the validation data until the variance is low enough, trying to not worsening the bias (variance-bias trade-off).

Example: desired accuracy = 95%. Training accuracy = 93%. Validation accuracy = 82% -> Bias = 2%, Variance = 11%
Summarizing:

Tunning in the training data = decreasing bias
Tunning in the validation data = decreasing variance

What's more unclear is the role of the test dataset. I usually use it when I decided that the model will be no longer changed and I need the final metric that describes the model. The test set can also be used to have an idea about how the model performs with data which have not be intended to work with. In general, the test set gives the power of the model for the inference task.
Comment: Firstly, my comment depends on terminology so I hope people are aware of this. From the textbooks and materials I used, I prefer to define (inductive) bias as the "minimum risk achievable by a predictor in the hypothesis class". Therefore, tuning in the training data is really trying to decrease this bias. What is the minimum bias you can get? The error achieved by Bayes optimal classifier (like the upper bound above). In that sense, I will prefer not to call "The difference between our model's accuracy and the upper bound is taken as the bias". To conclude, nothing's wrong :)
Answer: This is exactly why. If you use your test dataset to select the best architecture that can predict, then you are not using it as a test data, you are using your test data as a validation data. And, in the end, you run out of data to test.
To make it clear:

Train dataset: Use your train dataset to learn the parameters of your model (for example, weight of connections in your NN).
Validation dataset: Use your validation dataset to see how they perform and tune these hyperparameters (for example, prune your nets, etc).
Test dataset: Your test dataset should only be used just in the last instance to test the model. Otherwise, you are not be able to test on data that you haven't use to train your model.

You can read more about it on this article.
Comment: I think the number of connections is not learnt, is something that can be set/tuned... what the network learns are the weights and biases
Comment: I appreciate you correction but... the hyper-parameter, whatever they are, are not learnt, are selected or tuned. Furthermore, the weights are not hyper-paramters.
Comment: @ignatus you are completely right, i have corrected it.


APFS Container Disk & APFS Container Scheme Mismatch - Cannot Resize

Question: I have an issue where I screwed up my partitions by removing a PC formatted partition, and it did not recombine itself with my overall partition. Issue happened because I got a new SSD, loaded my mac stuff, created a 300GB PC partition, and was trying to use WinClone 7 to reload my old bootcamp, but it kept not being bootable. I was able to remove the non-bootable PC partition twice, but the third time I ended up with an issue and was hoping someone could help.

When I run 'diskutil list' in recovery mode, in Disk0s2 it shows
Apple_APFS Container disk1 is 2.0TB, while in Disk1 , it shows APFS
Container Scheme is 1.7TB (and says its the Physical Store at
Disk0s2).
When I run 'diskutil APFS list', its showing the
capacity at 1.7TB
I've tried resizing being specific to "2.0t"
and using "0", but it gives me an error either way (with "0" stating
it can't be the same size)

Anyone have thoughts to recover the 300GB I'm missing, other than completely re-formatting the entire thing? Everything else looks normal besides the mismatch.
Also has anyone else had the same issue with WinClone? I figured maybe I have to use bootcamp assistant to create the partition instead of doing it manually, and then overwrite it with WincClone?
Thanks in advance!!
gpt show
       start        size  index  contents
       0           1         PMBR
       1           1         Pri GPT header
       2          32         Pri GPT table
      34           6
      40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  409640  4000387680      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  4000797320           7
  4000797327          32         Sec GPT table
  4000797359           1         Sec GPT header

diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         2.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         2.0 TB     disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +1.7 TB     disk1
                             Physical Store disk0s2
   1:                APFS Volume Macintosh               133.6 GB   disk1s1
   2:                APFS Volume Preboot                 41.4 MB    disk1s2
   3:                APFS Volume Recovery                512.3 MB   disk1s3
   4:                APFS Volume VM                      2.1 GB     disk1s4

diskutil apfs list
APFS Container (1 found)
|
+-- Container disk1 C7855526-CCEF-4FBC-9397-B560C8AA2D33
    ====================================================
    APFS Container Reference:     disk1
    Size (Capacity Ceiling):      1748316786688 B (1.7 TB)
    Capacity In Use By Volumes:   136617209856 B (136.6 GB) (7.8% used)
    Capacity Not Allocated:       1611699576832 B (1.6 TB) (92.2% free)
    |
    +-< Physical Store disk0s2 681FC29B-F4C1-481D-9112-10194930CA55
    |   -----------------------------------------------------------
    |   APFS Physical Store Disk:   disk0s2
    |   Size:                       2048198492160 B (2.0 TB)
    |
    +-> Volume disk1s1 A91EA382-7624-4E09-8D48-2FFF6AB12700
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s1 (No specific role)
    |   Name:                      Macintosh (Case-insensitive)
    |   Mount Point:               /
    |   Capacity Consumed:         133638852608 B (133.6 GB)
    |   FileVault:                 No
    |
    +-> Volume disk1s2 2CF27193-404B-44CC-B33B-FFF867164EF9
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s2 (Preboot)
    |   Name:                      Preboot (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         41385984 B (41.4 MB)
    |   FileVault:                 No
    |
    +-> Volume disk1s3 52F3B2B8-A140-4EB6-9F9D-04D18AE8A045
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk1s3 (Recovery)
    |   Name:                      Recovery (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         512319488 B (512.3 MB)
    |   FileVault:                 No
    |
    +-> Volume disk1s4 8C075D10-42E3-4BE5-9FFC-AB2709A73909
        ---------------------------------------------------
        APFS Volume Disk (Role):   disk1s4 (VM)
        Name:                      VM (Case-insensitive)
        Mount Point:               /private/var/vm
        Capacity Consumed:         2147504128 B (2.1 GB)
        FileVault:                 No

Resize Attempts:
MacBook-Air:~ XXXX$ diskutil apfs resizeContainer disk1 0
Started APFS operation
Error: -69743: The new size must be different than the existing size
MacBook-Air:~ XXXX$ diskutil apfs resizeContainer disk1 2.0t
Started APFS operation
Aligning grow delta to 251,683,213,312 bytes and targeting a new physical store size of 2,299,881,705,472 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 2,048,198,492,160 bytes
Error: -69519: The target disk is too small for this operation, or a gap is required in your partition map which is missing or too small, which is often caused by an attempt to grow a partition beyond the beginning of another partition or beyond the end of partition map usable space

.
Comment: Please add the output of `sudo gpt -r show disk0`, `diskutil list` and the precise resize command!
Comment: @klanomath updated per the above, thanks for your help!
Answer: If you make the container smaller, then the mismatch will go away. For example, use the command given below.
diskutil apfs resizeContainer disk0s2 1.6t

Afterwards, you can enter the command given below to resize to 2.0 TB.
diskutil apfs resizeContainer disk0s2 0


Windows 7 on Bootcamp doesn't want to boot. Can't copy files from Bootcamp to Osx mavericks

Question: I have strange problem. A few days ago a was doing some projects on windows 7 and updates appeared , when windows was installing updates I closed it down by holding power button. After that I can't access to windows(windows loading screen appears, it loads for about 20 min and after that nothing happens). When I'm trying to repair it with windows install cd it doesn't recognize any windows partition. Anyway I've got many project files on Bootcamp with are very important to me. I tried copy them on OSx but I can't. OSx see correctly Bootcamp partition but I can copy only small files like PDF 120kb. Whem I am trying to copy bin files(my project) an error appears "finder can't complete the operation because some data in ... Can't be read or written. Error code -36". I tried installing ntfs-3G but after that it unmounts Bootcamp and when I'm trying to mount it again error appears. I tried also Ubuntu live cd, with ntfs-3G. I tried ntfsfix commands, I tried mount it on Ubuntu but still same problem. I also took off disk form Mac and installed it in case. I plug it by USB to another computer but unfortunately same problems. Bootcamp can't be mounted. Linux says that I should log into windows and try chkdsk /f but like I said I just can't boot to windows. I hope you can help me, because this projects are very important :/
Btw. OSx also running very slowly now. Something happend after that restart on updates and mavericks is booting very slowly and also running slowly...
Comment: Anytime there are very important files, it is helpful to establish a monetary value in your mind before you decide which course of action to take. If you wouldn't even spend $50 to get them back, then you can rule out several options like buying software tailored to this task or getting professional help. Conversely, if you're willing to pay $1000 disconnect the drive and seek professional help immediately.
Answer: Since the problem followed the hard drive when connected to a new computer, you have a clear case where the problem is disk based. The slowness, the error, and that it seems to be getting worse would make me think that you may only have a short amount of time to finish your recovery efforts.
Worst case, the drive itself is failing and you can only get files off while it cooperates. Best case, the file system is corrupt and once you zero the drive entirely, it will work properly. The test that determines which of the two is the case involves erasing the entire drive, so plan for the worst and hope for the best.

Consider stopping your recovery attempts if the data is of value such that you would pay a professional. If it is hardware, time may run out and running the drive could make things worse.
Prioritize and get the most important files off that drive entirely considering both the Mac side and the Windows side.
Use PC file recovery tools on the Boot Camp side, use Mac recovery tools like Data Rescue 3 on the Mac side. Also, don't overlook tools like rsync that can ignore errors and keep trying to copy other files after running into the initial error - 36.

Good luck. It seems like you have a good handle on various options for getting files off the drive so I wanted to offer some other options. Also, you made no mention of backups whatsoever - depending on how recent your last windows backup and last Mac backup are, you could reduce the scope of your efforts accordingly.