Does gravity slow the speed that light travels?

Question: Does gravity slow the speed that light travels?  Can we actual measure the time it takes light from the sun to reach us?  Is that light delayed as it climbs out of the sun's gravity well?
Answer: This is one of those questions that is more subtle than it seems. In GR the velocity of light is only locally equal to $c$, and we (approximately) Schwarzschild observers do see the speed of light change as light moves to or away from a black hole (or any gravity well). Famously, the speed that radially moving light travels falls to zero at the event horizon. So the answer to your first question is that yes gravity does slow the light reaching us from the Sun.
To be more precise about this, we can measure the Schwarzschild radius $r$ by measuring the circumference of a circular orbit round the Sun and dividing by 2$\pi$. We can also measure the circumference of the Sun and calculate its radius, and from these values calculate the distance from our position to the Sun's surface. If we do this we'll find the average speed of light over this distance is less than $c$.
However suppose we measured the distance to the Sun's surface with a (long) tape measure. We'd get a value bigger than the one calculated in the paragraph above, and if we use this distance to calculate the speed of the light from the Sun we'd get an average speed of $c$.
So I suppose the only accurate answer to your question is: it depends.
Re your other question, assuming the spacetime around the Sun is described by the Schwarzschild metric, the time dilation at the surface of the Sun is given by:
$$ \text{time dilation factor} = \frac{1}{\sqrt{1 - r_s/r}} $$
where $r_s$ is the radius of a black hole with the mass of the Sun and $r$ is the radius of the Sun. The former is about 3,000m and the latter about 700,000,000m so I calculate the time dilation factor to be around 1.000002 and this is too small to measure directly.
However you can interpret gravitational lensing to be due to changes in the speed of light, and since we can measure the gravitational lensing due to the Sun you can argue we have measured its effect on the speed of light. This isn't really true as what gravitational lensing measures is the spacetime curvature. However the change in the speed of light (measured by a Schwarzschild observer) is an aspect of this.
Comment: @CrazyBuddy: +1 for mentioning the Shapiro delay. aepyrus: the delay is because the lensed light doesn't follow a straight path so it takes longer to reach you than if it had travelled in a straight line. In this sense you can directly measure the change in the speed of light, though again you're really measuring the spacetime curvature.
Comment: Re: "...interpret gravitational lensing to be due to changes in the speed of light...". For non-rotating objects, does this come out exactly for "index of refraction"=1/sqt(1-rs/r) or are there additional geometrical effects that have to be taken into account to accurately predict light paths in GR.
Answer:
Does gravity slow the speed that light travels?

Not really. Light just follows a curved path in the curvature of space-time produced by a massive object (a consequence of gravity). But, gravity itself doesn't slow down light. Because, we've just corrected these gravitational waves (a century ago) to not to be instantaneous, but travel exactly at $c$ as a consequence of SR, which declares speed of light to be a local frame constant. So, it doesn't arise to slow down light.
But, it depends on how you measure. If you're an observer and you measure $c$ locally anywhere, you'll be able to say that it's still a constant. Locally, it's a No... But, if you're looking towards a massive object like a black-hole or a neutron star, you can measure light much slower or faster depending on where you are. I mean, whether you're influenced by the fields very strongly.

Can we actually measure the time it takes light from the sun to reach us?

Yes. But, we've to take the gravitational time-dilation into account.

Is that light delayed as it climbs out of the sun's gravity well?

Yes. As we measure this light taking geodesic paths around these gravitational fields, there's this Shapiro delay. But, as we take the appropriate measurements of distance and time along the geodesic, we can still find that $c$ is a constant.
Answer: They call it relativity for a reason.  The speed you measure light traveling depends on your reference frame when a gravitational field is present.  If you are in the rest frame of the mass that is generating the gravitational field, then the speed of light can be calculated from the Swarzschild metric. This link presents a nice derivation:  http://mathpages.com/rr/s6-01/6-01.htm
In general, the speed of light depends on the gravitational field as well as the where and what direction the beam of light is.  The speed of light is not a simple scalar in a gravitational field, but rather a tensor!
Answer:
No, Maxwell's equations mean that's constant.
Yes, it's ~8 mins.
Yes, if it comes on a curved path. For example some (but not a lot for something as light as the sun) will leave the sun heading away from the earth but will swing back around as it's attracted to the sun. The total distance traveled is longer than a straight line path and this will be reflected in the time taken.

See also: gravitational lensing.


How exactly do you cut down a tree with fire?

Question: If I wanted to use fire to cut down a tree how would I accomplish this safely? Clearly if I build a big bonfire at the base of the tree it will burn down and possibly cause a forest fire.
Answer: Unless you are building a bridge you don't.
If you don't have the tools to cut it down you don't have the tools to do anything with it once it is down.  You are converting it from a big living standing tree to a big dead laying down tree. Neither of which you have the tools to modify. The only scenario where this adds any value to your life is if your life depends on crossing a river and you can make the tree fall across the river or gorge.  Which would require a tree close to the river that is tall enough to span the gap.  As pointed out in Erik's answer, even when the tree falls it may or may not fall according to your plans. Once it hits the ground it is going to bounce and the bottom of the tree may end up several feet from the stump, which could be over the edge of the gap you are trying to span.
All of the above aside, it takes a lot of fuel and a lot of time to actually burn through a tree. Back in my homesteading days, there was a large stump in my front yard.  I had a chainsaw, pick, axe and endless supply of scrap wood from a local mill.  The stump was about 8 or 10 feet tall, and 6 or 8 feet wide. An old growth Douglas Fir.

Most old growth Douglas-fir (Pseudotsuga menziesii) range in height from 200 to 250 feet, and have a diameter of 5 to 8 feet. source

The first year, I cut the top of the stump off and split that into small pieces to use to burn through the stump.  Around the second or third year I got access to the mill scraps. Burning through this stump was my hobby; while I didn't work on it everyday, I worked on it several times per week. If I was out doing something I would rekindle the fire.  As you can see in the image, a small fire is eating through the tree trunk at ground level. It leaves a little overhang which I would split off occasionally and use to fuel the fire.
The picture below is years into the process of burning through the trunk of a tree that was maybe 250 feet tall when it was alive.  Early on I hit some sap veins which helped fuel the fire, and allowed me to burn into the center of the trunk I could have 2 or 3 small files burning inside, while I was inside the trunk.
Burning through a tree takes huge amounts of good quality fuel.  I can't even begin to guess how much wood I burned in little fires eating their way through the trunk.  If you measured in truck loads, it would be several.

The moral here, is that if you have visions of burning a tree down to use for fire wood, you are going to spend more time gathering more fuel to get the tree down then you will gain in fire wood once it is down.  Then you will have to gather more fuel and build more fires to burn it into pieces you can move.
P.S. A big bonfire does not burn through a tree trunk. It does not transfer enough heat to the tree to consume it.
How?
So I told you all the reasons it is impractical for most of the common reason you would want to fell a tree.  But what if you really did need to spend the time and energy required to fell a tree and fire was your best tool?
Assuming only found natural implements (rocks, sticks, bones) for tools and fire.
Make extremely sure the tree is not hollow.  Or you will have a huge Timber Tote Fire Log.
Clear the lower branches, all around the tree.  Give yourself room to work.  Most bark is a natural fire retardant; remove the bark around the base of the tree, all the way around. You only need to clear it a foot or half a meter up.  This will kill the tree and help to dry the wood. Inspect the base of the tree, and clear anything that is growing for 3 feet or meter around.  Look which way the tree is leaning: that is the way it is going to want to fall.  Wherever the widest gap is between roots on the side it is leaning to, dig out some dirt around the roots. This is where you are going to build your primary fire.
Peel the bark off of the roots and build a small fire in the hollow between the roots. Think of it as little oven.  You start baking the roots/tree stump and the dirt.  The trunk and roots are full of liquids; progress is going be much slower then you think.  As the fire burns it will char the wood and dry out the dirt.  As the dirt dries out it becomes easier to remove, allowing you to get a fire around the roots.  You just keep digging (dirt and charred wood) and burning until you get well under the tree.  You don't want to go deep, just a couple inches, but you need to get through the to the center.  AFTER you get a bit more then half way through the side it is leaning towards, you do the same on the other side.  This is the second cut (same as tree felling) that allows the tree to fall on towards the side you hollowed out in the first step.  It will be more likely to fall the way you hope, if you leave a hinge on both sides.  Don't work all the way around like a beaver, or Murphy will have it landing exactly were you least expected and can least afford it to land.
Restating: a small fire is best.  It is going to be slow going, and you're going to be tempted to stack a bunch of wood.  But flames more than a hand high from where you are working is just waste.
Comment: @Erik - From what I've read, making a canoe with fire *did* take a long time, months to years. There were no rush jobs, everything took time. From what I recall, they might be stripping the bark from the base as much as a year in advance to die, dry, and season.  Cutting through the trunk with fire would take a long time, small fires, and periodically scraping the char-wood out, and they'd also need time and people to hunt and gather and other daily life necessities - and the small fires might be used for cooking, etc as well, so much of the wood it took would have been collected anyway, kinda
Comment: I enjoyed reading about your experience with the stump but.... Even though your answer is highly up voted I don't really see how it answers the question. Basically you say 1. this isn't useful, and 2. burning through a 6-8 ft stump takes lots of wood and time. I know people have used fire to hollow out tree trunks to make canoes. I don't know if they use fire to fell those trees but if you have the tools to chop down a tree then you should have the tools to hollow out a trunk. Also I went to a friend's party once on a farm with a huge bon fire that consumed an upright uprooted tree.
Comment: Also in the link in my answer there is another link to a page where they describe [how to make a birch bark canoe](http://www.native-art-in-canada.com/birchbarkcanoe.html). They specifically mention using fire to drop the tree in that article as an alternative to using a saw. Which gives credence to my thought that this was done in the past and could be useful. That being said it probably wouldn't be my first plan of action.
Comment: [Tree stump as fire pit](http://ohmrstucker.com/diy-fire-pit-tutorial-updated/)
Comment: I agree. If you look at the aftermath of a forest fire you see lots of "stumps" that are 10 ft tall and some trees that were basically completely consumed.
Comment: @Erik thanks :)  the difference between your uprooted tree and tree in the ground is the heat sink of the ground.  You can [boil water in a paper cup or with tree bark](http://outdoors.stackexchange.com/questions/13636) If you build that same bonfire around the standing tree, it will burn the top of the tree, and maybe most of the stump, but the bonfire is burning the tree from the top down, not through it. Yes you can burn through a standing tree, but it's a huge undertaking.
Answer: According to this resource one technique is to cake mud on the tree trunk at least 2 inches thick and 6 feet tall. The mud will protect the flames from spreading up the tree. Throughout the whole process it is important to keep an eye on this mud, and replenish it as needed. Remember your goal is to fell a tree not start a forest fire.
Once the tree trunk is protected you build a small fire up against the trunk of the tree on the side you want it to fall. The basic plan is to allow the small fire to burn for a little while. When the flames die down you knock the charred wood off the tree trunk. As you repeat this process the fire should burn a wedge into the tree analogous to the wedge you'd cut with an axe or a saw. Once the tree becomes unstable they recommend building a fire all the way around the base of the tree.

It is important to note a couple of things. Firstly, cutting a tree down with fire carries significant risks to yourself and the forest. Only use fire to cut down a tree if you can't use an axe or saw, and be careful. Secondly, like they say in the article:

Felling a tree with fire isn't as predictable as the good ol' axe method so as soon as you hear the wood begin to split..GET OUT OF THE WAY!
Comment: +1 N.B. this is a technique which has been used since time immemorial to make it easier working on hard wood with primitive tools. Felling a tree with stone axes for example is made a lot easier by this technique, same goes for single-log canoes or the like.
Answer: Yes Grasshopper,
Burning a tree down, is one of the most entertaining things I do in my woods.
Forgive the assumptions and the judgements of the naysayers.  They know not, that they know not.
This is how I burn a tree down, thank you to the Emersld Ash Borer (often because it's too risky to cut it down, as the top breaks off, and flips back to the stump, screaming the whole way "I'm going to crush your skull")
Get a nice sharp chainsaw and make a 4 plunge cuts completely through the trunk.  Make each cut about 1 foot vertically.  Next, sprinkle a tad of diesel fuel into each of the slots. Then get a blow torch and light each slot.  Retire to safe distance, enjoy your beverage of choice, and  grill a burger.  It's as much fun as you can have in the woods with a dead widow maker.
A few notes:  this works for dead trees only.  I've never tried it on a green tree.
If the tree is large sometimes 6 or 8 vertical slots work better.
Best to do when ground is wet and there's no chance of a forest fire.
I would NEVER do this in a pine/spruce/fir forest.
A light breeze helps to stoke the fire.
I've avoided death, many times, by being 300 yards away when the widow maker explodes.  Good luck.
For entertainment purposes only.
I am not an expert, and I don't recommend doing this.


How to disable the popup of Google translate in chrome while it still translates

Question: It is very annoying. When browsing a website that I know is not in English and I trust Googles translation the popup some times comes and destroys the layout and it's impossible to work with the website then. If only the pop is disabled (more like , yeah please no popups for the next hour or so, but I guess that would ba feature)
Answer: In Google Chrome options, there is an option to disable this. Click on the wrench icon and then on the "Under the hood" tab and look for "Suggest to automatically translate sites..."
Comment: that stops translation altogether. I want translation but not the popup
Comment: I don't think that's an option you can change then. You could try the Google Code forums for Chrome and ask there.
Answer: If you disable Translation on Chrome settings you can still translate sites on different languages than yours by right clicking on any page and choosing "Translate to ......"
Answer: After you choose to translate a page, click "Options" on the right side of the bar. Choose "Always translate X to Y," and I think that will kill the popup.
Comment: if it worked like this then there would not be any issue.
Answer: I  just  had  to  go  into  Google settings
Click on Advanced settings  at bottom of  page.
Click on Rest Browser Settings  and it  cleared  the
annoying pop up !!


Can the Monero block chain be pruned to increase scalability?

Question: Can the Monero block chain be pruned to increase scalability? If so, exactly what data can and cannot be pruned?
Answer: Theoretically, there is nothing preventing this. Practically, there is no code to do this yet, however.
There are a few things that can be pruned. Ring signatures, for instance. Once RingCT is in, range signatures can also be pruned. These take a large portion of the transaction data. Note that Aeon, a fork of Monero, does implement some kind of pruning already.
It is important to remember that pruning data makes a node unable to supply the pruned data to other syncing nodes. That data is necessary to fully validate the blockchain in a trustless manner, so while a client may decide to trust a pruned node, there should be at least a few "full data" nodes on the network, keeping the entirety of the blockchain, in order to keep the ability to re-verify the whole thing from scratch.
It is also relevant to note that the current on disk blockchain database is several times larger than the full blockchain data (very very roughly, the disk database is 6 to 8 GB, while the full blockchain data is maybe 3 GB). This is done to speed up subsequent reads from the database.
Comment: Can you provide more information on how the pruning of Ring signatures and of the range signature?
Are there statistics on which % of the blockchain is taken by which type of data (proof of work data, ring signatures data, etc.)?
Answer: Monero 0.14.1, released in June 2019, supports blockchain pruning. It decreased disk space use from ~75GB to ~25GB.
More information: https://getmonero.org/2019/02/01/pruning.html


Unable to install automake1.9

Question: I am not able to install automake1.9 on Debian 8. While running apt-get install automake1.9 I am getting Unable to locate package automake1.9 error.
I have tried updating repo list but that also did not help
Output of apt-get install automake1.9
root@serv1:~# apt-get install automake1.9
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package automake1.9
E: Couldn't find any package by regex 'automake1.9'
root@serv1:~#

Content in sources.list
    # deb http://mirrors.linode.com/debian/ jessie main
deb http://mirrors.linode.com/debian/ jessie main
deb-src http://mirrors.linode.com/debian/ jessie main

# jessie-updates, previously known as 'volatile'
deb http://mirrors.linode.com/debian/ jessie-updates main
deb-src http://mirrors.linode.com/debian/ jessie-updates main

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

I have tried all possible option by changing repo list and also searching on google but did not find any solution.
Do I need to add or update anything in the sources.list file or install it manually?
Answer: Why are you trying to install such an ancient version of automake? Are you following a bad tutorial?
This old version of automake was removed from Debian and last appeared in Debian wheezy.
You probably need to be using a current version of automake instead. At least, you need to be viewing whatever instructions you were following with a great deal of skepticism.

Unable to install automake1.9


How to create and activate specific Conda Environment on Dataproc with Jupyter Notebook Initialised

Question: Once you have the Jupyter notebook installed using the Google Initialisation script is it possible to create and activate a conda environment on all the worker nodes?
Do I need to ssh onto each worker and create the same environment or is there a way to accomplish the same via a notebook if the number of modules to add is small?
Answer: Once you have a cluster up, there is not a great way to re-configure all workers.
If you create a new cluster the conda initialization action might be helpful.


Build a software raid 1 on windows XP

Question: I have nothing but bad experiences in using built in raid controller.
Is there a possibility to use the software raid features of windows 2003 in Windows XP?
Answer: Windows XP Pro allow you to define software RAID volumes, but only RAID 0, see this tutorial:
www.techimo.com/articles/index.pl?photo=149
If you want to configure RAID 1 or RAID 5 volumes on Windows XP this will require some hacking. If you google for "windows XP software RAID" there are plenty of tutorials on how to enable this features on Windows XP
Answer: Yes, Windows XP Pro is capable of software RAID levels 0, 1 or 5. In order to get levels 1 and 5 some modified files have to be installed. I've been using Windows XP Pro with RAID 5 as file server for movies for 6 months now and have had no problems at all. If you're interested here's a pretty easy to follow tutorial Software RAID 0, 1, 5 or JBOD Using Windows XP Pro SP3. If you run into any problems just ask a question in the comments and the admin will  answer them quickly. Hope this helps.
Answer:
I have nothing but bad experiences in
  using built in raid controller.

I can only assume that you're using consumer level nVidia or generic BIOS level RAID on a workstation. Avoid on-board RAID solutions as they're all junk. There are varying differences in RAID solutions. Your best best for doing real RAID is to get an actual card.
I highly discourage doing software RAID especially on Windows as performance won't be too bad in comparison to hardware RAID, but for if you really want any level of protection from failure don't think software can supplant hardware RAID. Yes they cost money. Yes, they can be a complicated. But if you want RAID to work for you, you have to invest in the hardware.
Answer: You can explore the software raid features by right clicking on your "My Computer" icon, choosing "Manage", and then click the "Disk Management" entry in the tree on the left side of the window that opens.  Look for any disks listed as "dynamic" (odds are your system volume is currently "basic") and right click on them to get a menu of tasks you can perform.
Answer: http://support.microsoft.com/kb/307880/EN-US/
EDIT: nevermind, misread the title

Build a software raid 1 on windows XP


Online Game Patents

Question: So i'm quite new to this and i've been trying to find something about this subject, but most of the questions people are asking are if they can patent their game, and i'd like to know what games i can make without getting in patent related trouble with someone. So, let's say that i wanted to make a game like chess and release it on Android (And there are a lot of those). Can i just make it? Does it make any difference if the game is "Buy-To-Play" or "Adds supported" or even free? Basing on amount of chess games, there's nothing like that, so what happens when i want to change some rules in chess, like how figures move, board size, and if those "changes" can be patented, is there a good way to find if "my idea" isn't already patented somewhere?
Comment: You would need to do, or pay someone to do, a freedom-to-operate patent search in the jurisdictions you planned to offer it in. A quick search [ACLM/chess AND game] of the USPTO patent database [http://patft.uspto.gov/] shows 296 patents with "chess" in a claim and "game" anywhere in the document. Looking at the titles can quickly weed out about 1/4 of them. If you look at patents that are recent enough to possibly still be in force, it would be a smaller number.
Answer: Game patents is an area I've done a fair bit of research on.  This should be taken as an informal answer--I've spoken to many patent attorneys on this subject, but I myself am not an attorney.
My sense is that most of the current game patents involve technical implementations (devices and software) as opposed to game mechanics (rules of a given game or set of games.)  Many regions do not recognize game mechanics as patent eligible.
In 2013 there was a US ruling known as "Alice" which cast doubt on the continued US patent eligibility of pure methods, such as game mechanics.  Most game mechanics patents I've found come from before this ruling.  ("Inverse Chess" as an example.) That said, I have seen a few patents subsequent to Alice that seems to involve pure method or game mechanics.  (Without patents, games have no intellectual property protection--IP associated with copyright and trademark do not constitute games, merely artistic and commercial elements applied to game mechanics.)  There is also a long history of precedent in the US in regard to the eligibility of game mechanics.
@GeorgeWhite's advice in his comment is highly reliable.  Having done extensive searches myself, I don't think you need to be concerned, but it's always good to undertake due diligence.
Having had some involvement in the abstract game community recently, my sense is that very few designers pursue patents (the utility patent application process can be expensive with no guarantee of a grant.)
Another consideration is that any novel game mechanic or set of mechanics that are in the public domain are rendered no longer patent eligible.  (Certain regions, such as the US have grace periods for the inventor, but the inventor has to file, at minimum, a provisional patent application and identify their product as patent pending.)
From a liability standpoint, in the extremely rare event that you do unintentionally infringe on a granted patent, simply removing the infringing Intellectual Property once you have been notified should be sufficient.
Comment: Ok, thanks for advice, that really cleared a lot of things for me
Comment: That helps a lot, thanks, there's just one more thing i want to ask - from what i've read patents are country specific, so taking into account that Google Play for example lets you release app in like ~140 countries at once, i'd have to check patents in every single country i want to release it in right?
Comment: @WiktorLobejko Technically, I suppose you might, but, the types of game patents you're talking about come from solo inventors, not game companies, so it's unlikely they'll be patented worldwide (cost in the tens of thousands of dollars US for legal fees per region.)  If you haven't seen your variant via google search and patent search, it's highly unlikely anyone has patented it.  This does not constitute formal advice, but if you want to CYA (cover your butt) you can keep a record of your due diligence (the searches you conducted.)
Comment: @WiktorLobejko IP litigation is ruinously expensive (which is why "patent trolling" worked--cheaper to settle) so no one is going to come after you with a lawsuit unless you make a gazillion dollars (in which case you'll probably have people coming after you even without basis;)  You might also check around on designer forums like https://www.reddit.com/r/abstractgames/ to see if anyone has come across your mechanics.  There are a lot of Chess variants out there.
Comment: @WiktorLobejko I might also recommend asking a general question about due diligence on the https://law.stackexchange.com/.  As a parallel, I have a friend who curates a small film festival.  It's not uncommon to want to show an older, obscure film where the parties who hold the rights cannot be found.  Professional legal advice there has to document the search for those parties, and, if they cannot be reasonably located, show the film.

Online Game Patents


How to enable Mathjax for chat on the Android mobile browser?

Question: Suppose I am a user of stack exchange chat. And I am on Android mobile. My questions are 1) How do I enable Mathjax In chat. Can I? I am asking as the question asked was answered for computer not for mobile.
Comment: To my knowledge, mathjax on chat over mobile is not doable. The second question should be asked separately, to keep things organized.
Comment: You should delete the second question from this post and then ask a separate thread with it.#
Comment: @EmilioPisanty  you mean I should ask the second question as a different question or should I change the Para? Please clear
Comment: As for mobile chatjax - maybe it *is* possible via the same, or a similar bookmarklet? You'll need to be able to use bookmarklets, and there do seem to be solutions available, but they'll change from browser to browser.
Comment: @EmilioPisanty thanks for helping.
Comment: If you *do* ask your second question separately, you should flesh it out some more. In principle, the procedure is the same - you drag the ChatJax bookmarklet to your bookmarks bar and then you activate it. If that doesn't work for some reason, you should explain in detail what you did and in which way it's not working.
Answer: The ChatJax bookmarklet appears to be designed for both desktop and mobile browsers, and indeed there's a specific version for "troublesome mobile browsers" to try out if you find it's not working.
As to how you can install a bookmarklet on a mobile browser - that will vary depending on the browser, and it may not be possible on some browsers. Your mileage may vary here, and I'm reluctant to recommend solutions as the different routes may or may not apply depending on individual situations (such as e.g. willingness to sync mobile and desktop bookmarks).
Alternatively, you could install Tampermonkey as an app and then run the ChatJax++ userscript over it, though again that has some significant overheads.
Generally, to the best of my understanding, rather few people in this site's community use MathJax for chat over mobile, given how hard it is to write LaTeX on mobile keyboards so you're mostly doomed to one-sided conversations even if you can see other people's MathJax rendered correctly.
Comment: you can't even see correctly rendered MathJax in chats on Android, as far as I can see. (I do type LaTeX on a mobile kbd sometimes, it's not really too hard, just slow :-))


Different views on a single link in Quicklaunch

Question: Good morning everyone!
I have a conception/ view issue
What i have
I have a Library, let's call it "MyLibrary".
For this library, I have defined different views. the default is as usual AllItems and i have InEnglish and InFrench.
In my navigation, for the Quicklaunch menu, i have set a link "MyLibrary" to /Site/MyLibrary/Forms/allitems.aspx.
When clicking on it, i see all my documents and the item in quicklaunch is set as "selected" and have a little arrow to show the user where he is.
So, the user can see the other views. When clicking on InEnglish, he got all documents in english. But in Quicklaunch, the Library is no longer selected.
A normal Behavior, because i've set the link to "allitems.aspx".
What i want to achieve
Now, I would like the "MyLibrary" link to be selected no matter the view i select.
What i've tried

Setting the link "MyLibrary" to /Site/MyLibrary/Forms/
result : no document is showing, and the selected item in QuickLaunch is the link to "Site"
Setting the link "MyLibrary" to /Site/MyLibrary/ (because, basically, all the views belong to this library)
result : the AllItems.aspx is displayed (with choice to InEnglish and InFrench views), BUT the selected item in QuickLaunch is the link to "Site"

What i could do but CAN NOT because of specifications

Setting a link per view in QuickLaunch => too many links in the Quicklaunch, no longer user friendly, and too much time : because i have a lot of libraries/lists in this case and circa. 1200 subsites to modify

So, do you have any idea on how to link the different views on ONE item of quicklaunch?
Thanks a lot to help me think!
Answer: You have well explained the situation but before purposing any solution it would be great if you share the problem with screenshots and flow. That would help a lot in understanding the scenario for all.
Probably you can have some custom script on the library allitems.aspx page.
Regards,


Monitoring contract event filters with geth --light

Question: I'm trying to sync 2 ethereum nodes with Main network. It's talking days.
I've an application that filters "Transfer" events on a specific contract.
Something like
<code>abi = ''
address = ''
toggle = False

def get_entries():
  global toggle

  contract = w3.eth.contract(abi=abi, address=address)

  tfilter = contract.on('Transfer', {'fromBlock': 0, 'toBlock': 'latest'})

  return tfilter.get(only_changes = toggle)

  toggle = True
</code>
Since it's days to sync in normal mode ( I also tried --fast --cache=2048), if I could run an another node with --light flag, will above even work? does the --light mode support filtering contract events?
In my case I don't need any event from past, I just need to capture contract events from this point forward.
Answer: I've used Ethereum in --syncmode light and it doesn't have support for filters.
Check this for reference: https://github.com/ethereum/go-ethereum/issues/3752


What would an attacker have to pay per transaction in a large-scale spam attack?

Question: It is claimed that transactions are effectively free. However, they require a proof of work. This PoW is supposed to make spam attacks infeasible. So given an attacker renting hardware from a cloud provider. What would a single transaction cost them? I'm interested just in the order of magnitude.
Comment: With Bitcoin the main problem is people hacking other people's cloud accounts and using that computing power—essentially negating the cost factor since someone else is paying.
Comment: What are you trying to say? How does this relate to a spam attack and why does it only apply to Bitcoin? You could also use effectively stolen resources to attack any other PoW based protocol.
Comment: I just mentioned Bitcoin because it's the most popular and the most targeted cryptocurrency. Of course the attack scenario works for all pow protocols as you correctly point out.
Answer: I don't think it is possible to give a proper answer to this question, as we are lacking benchmarks from high-end hardware.
I will, however, try to estimate a value:
My GPU, a Nvidia GeForce 730 takes 24 seconds (2,5/second) on average to attach an address to the tangle. I measured this by using the light wallet on an idle Windows 10 PC. I started the timer when the GPU usage spiked in the task manager and stopped when it went down again. As it was most of the time only around 75% GPU usage, I subtracted 25% from the time.
The currently highest value card according to this site is the Nvidia GeForce 960.
As the score of this GPU is 6.3 times higher, let's assume it manages 15 transactions per minute = 900 per hour.

It uses 120W of power, so we have 0,12 kWh per hour. Assuming that we have a spammer with access to cheap electricity for 0,05$/kWh, the cost to run this node is $0,006 per hour.
As a result, calculating the POW for 1 million transactions would be around $6,66 for a dedicated attacker

However you have to note a few things:

This simple calculation does not include the price for the hardware, which is at $140.
You would need to run your own full node as nodes will probably ban IPs,  issuing a lot of transactions, this adds to cost.
Nodes might reject a spam of zero-value transactions from a single node if it's getting too much.
You will need 4 cards to reach 1 tx/second. The PoW factor might be raised in the future + a higher hash-rate will be there. Launching a 33% attack will also get harder before the coordinator is turned off.

Running the same with my graphics card (49W;150 Tph;$0,28 Electricity) will result in $91,47 per million transactions. Assuming that you have a similar setup and that a value transaction bundle consists out of four transactions, one transaction's cost is far below one cent. That's still an incredibly tiny amount. In the future, it might get even lower if energy gets cheaper and if we get better hardware.
You can easily test this with your own PC by running the very simple benchmark I provided above. If anyone knows a proper Linux or Windows Curl benchmark tool, please comment with a link.
Comment: great answer, thanks! What I learned is that creating spam transactions is relatively cheap. However, if you want to create them fast, you need a lot of hardware.


Can a color-blind person see color with filter glasses?

Question: Why does color vision improve in color-blind persons using these filter glasses from Enchroma? Will a color blind person be able to see the same colors on a television? I'm asking, because the colors for every point on a TV screen are combinations of red, blue and green.
Answer: Short answer
Optical filters can optimize color contrast, but never restore color blindness. Filters remove colors, they can never add something. However, glasses like this can prove helpful for certain sub-populations of people that are partially color blind.
Background
First, the term color blindness is deceptive. It is better to talk about colour vision deficiency (CVD). This, because many people labeled as color blind in fact have all the red, green and blue cones like the normally-sighted. These people have protanomaly (abnormal, but still functional red cone photopigment), or deuteranomaly (abnormal green cone photopigment). These two conditions are mild and don't affect daily life too much (source: NEI / NIH).
The other two most common forms of CVD are protanopia and deuteranopia. Protanopes have no working red cone cells and deuteranopes have no green cones. These conditions are more severe and do affect daily life as color perception is compromised. These conditions can be coined color-blindness, as these folks miss one type of cone altogether (source: NEI / NIH).
The glasses of Enchroma target the first two conditions, namely the anomalies and not protanopia or deuteronopia. The Technology page of Enchroma explains why. Basically, protanomaly and deuteranomaly are characterized by the red and green pigments having a shifted spectral maxima. The end result is the same, namely more overlap between the spectral absorbance curves (shown for deuteranopia in Fig. 1). In normal vision, the overlap is already pretty extensive, meaning that green light activates a large portion of red cones and vice versa. In protanopia or deuteronopia this effect is further increased, resulting in a degraded capability to separate reds and grees. For example, protanopes perceive reds, oranges, and yellows as greener, and colors are not as bright. Deuteranopes perceive yellows and greens as more red and they have difficulty telling violet from blue (source: NEI / NIH).

Fig. 1. Left: normal cone spectral distribution vision, right: cone distribution in Deuteranopes. source: Enchroma
What Enchroma has come up with is actually really clever (!) - they've put a spectral notch filter in place and wedge it in-between the red and green spectral optima, thereby removing the large area of overlap. This reduces brightness, but it will enhance contrast when the glasses are worn (Fig. 2).

Fig. 2. Spectral notch filter to enhance green-red color contrast. source: Enchroma
And yes, above considerations hold for any colored object, including monitor pixels.
Comment: I am colourblind and own a pair of the enchroma glasses. For me (experiances seem to vary) the glasses certainly make colours look different however there is only limited improvement between difficult red-green differentiation. I've yet to try a colourblindness test wearing them!
Comment: I've been reading around a lot and I still don't understand how this is meant to work. Surely it just makes the wearer blind to wavelengths of light filtered out by the glasses? The wavelengths on either side of the notch (not being blocked) are going to excite the red and green cones about the same amount, just as they were before, and so will still be difficult to distinguish. I haven't found an explanation that feels sufficient yet.
Comment: The wavelengths on the side will excite as they did before, but the regions of high overlap are excluded by the notch. Imagine that the area on the left excites G 1 unit and R 0.2 units, while the are covered by the notch is 5 units G and 5 units R. With the notch, you have 1:0.2 or a contrast of 5. Without the notch you have (1+5):(5.2) or a contrast of 1.15. Contrast would be enhanced almost 5-fold.


Setting maximum number of sign-ups in Google Forms

Question: We use Google Forms to manage a large school event in which each activity requires sign-up using a separate form. We have a maximum number of students per activity. How do we
"close" the sign up once the maximum has been reached? Is there a way to then automatically submit data to a wait list?
Answer: With this little script, you can easily pre-set the number of responses.
Code
<code>function closeForm() {
  // get active form
  var form = FormApp.getActiveForm();

  // retrieve number of responses thusfar
  var responses = form.getResponses().length;

  // set close message
  var msg = "Maximum number of respondents has been reached";

  // set max
  var maxResponse = 3;

  // do the math
  if(responses >= maxResponse) {
    form.setAcceptingResponses(false).setCustomClosedFormMessage(msg);
  }
}
</code>
Note
In this particular case the number of responses is limited to three. Add the script, in the form editor under Tools>Script editor (same as in a Google Spreadsheet). Now the script needs to be activated, each time a submission is being made. In the script editor, under Resources, select the script to run On form submit.
Comment: 4.5 years later, the code still works :D
Answer: Yes there is! Look at these instructions from Lise Galuga.
I have modified the code and written about it in this blogpost, but that's in Dutch;-)
Comment: They still have the Yeas and the Nays in the senate, but Dutch isn't really a global language anymore.


Typical Fairy-tale Story Especially Princess Stories

Question: I have a question. I am planing to write to a fairy-tale like a Brother Grimm or Hans Christian Anderson type of fairy-tale set in the modern time but after conducting research(reading fairy-tales of these literary greats). Its hard. I know every story is so different and so unique and that's whats make them awesome. The delima is that i need to know what are the typical features of a fairy tale especially a princess and prince story. These kind of show how girls should follow their dreams etc but i can't really understand how i should establish a plot. What should be the climax etc. I hope you can help me.
Comment: @dmm It's international law that you must include a **TIME-SUCK WARNING** whenever you send someone to tvtropes.org.
Comment: Have you checked out the Aarne-Thompson classification? It's very well known, you can find it on Wikipedia.
Comment: I don't know, dropping a Wikipedia link and bolting seems too lazy to qualify as an answer.
Comment: Also check out tvtropes.org, which will undoubtedly have tropes about princesses.  Note that tropes are not necessarily bad, if you are aware of them and use them to your (and your readers') advantage.
Comment: @lea You should add some detail and make that an answer. That's exactly what the OP needs.
Comment: @Lea it's not drop and bolt; you have to explain what the link is and give a summary. :)
Answer: You are confusing a traditional fairy tale with the Disney version of it.
The traditonal fairy tale does not "show how girls should follow their dreams". They either show how disregarding common contemporary moral standards leads to a tragic end, or how acting in accordance with morality leads to a happy end.
Cinderella does not get the prince because she follows her dreams at all, but because she works hard and diligently, is honest and kind, even to her stepmother and step sisters who treat her bad. Her sisters on the other hand follow their dreams of wealth and marrying the prince and are punished for their greed and unkindness! Cinderella does not aim for nobility and riches at all, she is rewarded with true love because she is a "good" person.
The little mermaid in Anderson's tale dies, because she follows her dream! Snow White gets the prince because she diligently worked as a servant for the dwarves. She did not even know that there was a prince, she never aspired to anything beyond her current lot. If anything she was happy as the maid to the dwarves! And so on. Fairy tale protagonists don't succeed in pursuing their dreams. The fairy tale morality is quite opposed to current American individualism. Fairy tales reward subservience, modesty, humility, loving your parents (even if they are evil) and so on. And fairy tales harshly punish stupidity! Think of all the nice persons that get killed just for being naive.
Fairy tales tell you to:

be good (in the Christian sense of the word), but
don't be stupid (because the world is bad).

What you are looking for is not the structure of the fairy tale, but the common Hollywood romance plot.
Answer: If you want to learn about plotting fairy-tale stories I recommend you to read "Morphology of the Folktale" by Vladimir Propp. It is a study that dissect the different elements of the folk tales from examples and present a common structure composed by 31 "functions". It is easy to structure your tale after that schema.
You can have a bit of it by reading Wikipedia article on Propp (Propp). However, if you are interested in the field like I am I recommend you to get your hands in the book.
I recommend also to have a look at John Campbell's take on the monomyth (Monomyth) if you plan to write a heroe/heroine based tale. This one is more focused on the inner development of the hero than Propp's work.
I agree with another answer in that you don't seem to want the real traditional folk tales (i.e. gory original Grimm Bros. stories) but the decaf post-victorian Disney like version of them but that is compatible with the works I referenced.
Answer: As I mentioned in my comment above, the Aarne-Thompson classification, specifically the section on fairy-tales, may be useful to you. A handy summary can be found on Wikipedia. It classifies stories by theme and gives common examples which are likely to be familiar to you. It also lists lots of fairy-tales that have become forgotten in recent years, which you may find inspiring to your story.
Fairy stories are classified by the role of the suprnatural in the plot. If you want a "prince and princess" story you might look at stories with supernatural wives or husbands, of which there are many: East of the Sun, West of the Moon is a semi-well-known example. The Frog Prince might be more famous. If you do take to this plot, absolutely check out the tale of Eros and Psyche from Greek mythology, which some folklorists call "the first fairy tale".
Answer: Oh, it's easy! What you need is a villain!
First, think up a reason, why someone wouldn't want the princess to meet the prince. What is it in that connection, that someone might hate? Any reason?
Knowing the reason, think of means of keeping the two apart. Lies? Betrayal? Poisonous, controlling relationship? Dependence? Guilt trip? Force? Dark magic?
Then build the character around the motive and the means - flesh out the villain, and the relationship of that villain with the prince and the princess. Lurking in shadows? Pretending to be a best friend? Looming as an overlord? Being a competitive, jealous scoundrel?
Then, once you have the villain and his(her) power developed - you fleshed out the way of keeping the lovers apart in detail - start poking at it, looking for weak spots. Negligence, ignorance, paranoia, whatever vice the villain has that can be exploited to break through the barrier.
Then flesh out the royal pair, sharing between them skills and powers that will make overcoming the barrier possible, though difficult.
And then just write it down in order. Introduction of the actors, building their relationships, then fight against the barrier, breaking through the barrier, happy ending.
That's the basic structure, which you may convolute some, for extra effect. Like: The princess and the prince don't go along with each other in the least, and only through common trials they overcome the differences. Or: The meddler opposes the breaking through the wall. Another approach must be taken. Or: The meddler poisons the relationship. Or any of countless mutations, like the princess choosing not to marry the prince, or the prince appearing to be the actual meddler, with the obvious one being actually a "hard love" good person, or one of the lovers getting corrupted in the process... sky is the limit, but that's all just mutations of the simple scheme described above.
Answer: They typically:
Fall in love with one another, hate each other at first, get lied about, always have misunderstandings, almost die, are betrothed to each other or someone else, involve a witch, have an evil/good stepmother, princesses are either helpless or more macho than the man hero, they try to quit being royal and go gallivanting off with peasants, always wonder why the bad guy is doing this to them, the first kiss is true love's kiss, have a death in the family, the sidekick who dies or is a bad comedian, and the list is sure a long one. See a couple of movies or books and you'll find more.
Establishing a plot:
Sometimes you only have a few scenes to start with for your character to perform. Write them out, the story can/will grow from there. You're in control of who and what your story revolves around. What do you want to happen?
Climax:
Depends on what you find out about your character and what's in and what's going on in their world as you write about them.


Mutation That Loses Stop Codon

Question: Someone asked this in my class and my instructor wasn't sure in her answer, doesn't anyone know what happens in protein synthesis if a mutation causes mRNA to not possess a stop codon? Would the protein eventually stop? Would it keep coding into the poly-A chain and insert a bunch of phenylalanine?
Answer: No, this will not happen. mRNAs are inspected in the nucleus before they are exported into the cytoplasm (at least in eukaryotes), where transcription and translation don't happen at the same place. This ensures that no mRNAs without stop codons or premature stop codons are exported. This phenomenon is called
"mRNA surveillance". mRNAs that do not pass this quality check, are degraded. See the Wiki reference for some basic information and the references below for more.
References:

Process or perish: quality control in mRNA biogenesis.
The exosome and RNA quality control in the nucleus
A faux 3′-UTR promotes aberrant termination and triggers
nonsense-mediated mRNA decay
Comment: you can add a note on non-stop mediated decay mechanism
Comment: @WYSIWYG You mean how the RNA is removed? I can do that later.
Comment: Technically, NMD takes place in the eukaryotic cytoplasm, because that is where the ribosomes are translating mRNAs containing "early" termination codons.  The situation the OP describes, where the wild-type stop codon is mutated to a codon recognized by a charged tRNA will just result in a slightly longer protein with an extra tag on the C-terminus.  A normal 3'-UTR will contain additional stop codons in all frames--on a random basis. This (the extra a.a., residues) also occurs in cells expressing a suppressor tRNA, the activated a.a. will get inserted instead, and the protein will be longer.
Comment: @mdperry I am not talking about NMD (nonsense mediated decay). There is another mechanism called nonstop decay. Yes I agree that the protein will be longer in that case. This is detected and the faulty products are cleared off.
Comment: Downvote. It obviously does happen, see the answer below.
Answer: Yes you are correct. These mRNAs, that lack stop codon will cause translation to continue into the poly-A tail (it will result in addition of lysines not phenylalanine). Since no stop codon is present, the ribosome remains attached to the mRNA. Under these circumstances, a pathway known as non-stop decay is activated.
An important protein in this pathway — Ski7 detects a stalled ribosome and initiates the decay process for both the peptide and the mRNA. The poly-lysine tail of the peptide has been shown to fasten the peptide decay process.

In prokaryotes too, the non-stop mutations cause the ribosome to run through the stop codon and to eventually stall. However, there are no poly-A tails and ribsosome recovery pathway is different from that of eukaryotes. An RNA called tmRNA (a hybrid of tRNA and mRNA) binds to the the A-site using its tRNA-like domain. Then the translation proceeds through the mRNA domain of tmRNA (this is called trans-translation) which causes an addition of a peptide tag (that acts like a degradation signal) to the stalled polypeptide and finally leads to ribosome release when the stop codon is reached.

References:
Non-stop decay:
            Klauer and van Hoof. Degradation of mRNAs that lack a stop codon: A decade of nonstop progress. Wiley Interdiscip Rev RNA. 2012 Sep-Oct; 3(5): 649–660.
tmRNA:              Jannsen and Hayes. The tmRNA ribosome rescue system. Adv Protein Chem Struct Biol. 2012; 86: 151–191.
Comment: This is the best answer I think since some mRNA obviously escapes nuclear surveillance (or these pathways wouldn't exist) and the question specifically asks what happens during protein synthesis. Perhaps it's also worth mentioning tmRNA, since we eukaryotes aren't the only organisms out there (it's also an ingenious mechanism of simultaneously targeting the aberrant protein for degradation whilst rescuing the stalled ribosome).
Comment: @canadianer thanks for pointing that out. Added :)
Answer: In fact, it is rare that stop codon mutation causes translation of polyA sequence in mammalian cells because you will find another in-frame stop codon downstream. And some stop codon mutations still producing the protein stably(1).
However, as WYSIWYG mentions, in the absence of alternative in-frame stop codon, mRNAs would be degraded. It is also called none-stop decay(2). I am not sure that this phrase gets popularity though.

Mutation That Loses Stop Codon


What is the bishop pair worth?

Question: It depends on the position but with all things being equal how much material value would you say the bishop pair is valued at?
Answer: There is a well known article called The Evaluation of Material Imbalances
by GM Larry Kaufman, first published in 1999 in Chess Life, winner of the 'Best Instruction' award from the Chess Journalists of America, that has the bishop pair valued at half a pawn.
A quote from the article (linked above):

"The bishop pair has an average value of half a pawn (more when the opponent has no minor pieces to exchange for one of the bishops), enough to regard it as part of the material evaluation of the position, and enough to overwhelm most positional considerations. Moreover, this substantial bishop pair value holds up in all situations tested, regardless of what else is on the board. This large a bishop pair value is surprising because in the opening grandmasters will often give up the bishop pair to double the opponent's pawns or to gain a mild lead in development, factors which are generally not worth half a pawn..."

That same article values the other pieces like so:
King = 4 (endgame)
Queen = 9.75
Rook = 5
Bishop = 3.25
Knight = 3.25
Pawn = 1
Whether you wish to rely on such figures is up to you. Personally I think you would be better off exploring why the bishop pair is considered an advantage, and when. The best explanation I've seen is in Ludek Pachman's Complete Chess Strategy Vol 1.. Some of the points he raises:

"In open positions their effectiveness is an extremely important factor."
"...the opportunity of purposeful simplification."
"The side with the two bishops can bring his king to the centre more easily under their protection"
"...helps by preventing the enemy king from using the otherwise weak squares of a certain colour."
Comment: The 1999 Kaufman link is now broken but an alternative source is: https://www.chess.com/article/view/the-evaluation-of-material-imbalances-by-im-larry-kaufman
Answer: This page values the Bishop pair from +1/2 to +3/4 points.
Answer: Readers interested in exploring this topic might be interested in a blog post I have written about data mining to find empirical evidence in support of such questions. It is called, Chess game data mining: exploring the advantage of the bishop pair with pgn-extract. The post discusses some of the results found by Timoshchenko, Kaufmann and Sturman but it is primarily about mining data rather than presenting new results.
Answer: The bishop pair overcomes a problem of having a lone bishop; it can only operate on half the board. So, strategically, the owner of the bishop pair can limit his opponent's activity anywhere on the board that's not shielded by pieces.
As b1 pointed out, Ludek Pachman observed that this advantage extends to being able to control and sometimes force an advantageous simplification. If the opponent manages to stage a knight at an annoying outpost in your position, you're only guaranteed to be able to eliminate it if you have another knight or both bishops. Using a knight can take up to 4 moves, so give me the bishop.
A prime demonstration of using the two bishops strategically took place in the following game.
<code>[Event "London"]
[Date "1883"]
[White "Englisch, Berthold"]
[Black "Steinitz, William"]
[FEN ""]
[Result "0-1"]

1. e4 e5 2. Nf3 Nc6 3. Bb5 g6 4. d4 exd4 5. Nxd4 Bg7 6. Be3 Nf6 7. Nc3 O-O
8.O-O Ne7 9. Qd2 d5 10. exd5 Nexd5 11. Nxd5 Qxd5 12. Be2 Ng4 13. Bxg4 Bxg4
14. Nb3 Qxd2 15. Nxd2 Rad8 16. c3 Rfe8 17. Nb3 b6 {A key element in the two bishops strategy is to contain the opponent's knight.} 18. h3 Be6 19. Rfd1 c5
20. Bg5 f6 21. Bf4 Kf7 22. f3 g5 23. Rxd8 Rxd8 24. Be3 h6 25. Re1 f5 26. f4
Bf6 27. g3 a5 28. Nc1 a4 29. a3 Bc4 30. Kf2 gxf4 31. Bxf4 Bg5 {Now it's time to simplify, because Black has a favorable bishop-vs-knight endgame, with pawns on both wings.} 32. Bxg5 hxg5
33. Ke3 Kf6 34. h4 gxh4 35. gxh4 Re8+ {Taking off the rooks increases Black's advantage due to the pawn structure, and amplifies the superiority of the bishop over the knight.} 36. Kf2 Rxe1 37. Kxe1 Ke5 38. Ne2 {Time for the knight to go, so Black will have a clear path to promotion on the kingside. He doesn't need the bishop to accomplish the promotion.} Bxe2
39. Kxe2 Kf4 40. c4 Kg4 41. Ke3 f4+ 42. Ke4 f3 43. Ke3 Kg3 0-1
</code>
The bishops can also be used to help connected pawns crawl forward and defeat the facing pawns, and to provide a shield for the king to advance behind.
They are at their strongest when the position is open, so the owner of the bishop pair should prepare one or more pawn breaks to clear the center.
Therefore, when playing against the two bishops, block the position as much as possible, and find or create good outposts for your knight(s).
In the Czech Benoni and Dutch Stonewall openings, the center becomes blocked early and stays that way. It's not uncommon for both players to attempt to trade their bishops for the opponent's knights, because the knights are more useful in that type of position.
So, the evaluation of the bishop pair's advantage depends on the character of the position. In general, it behaves the way the single bishop vs knight does; pawns on both wings enhance it, and the openness of the position enhances it. Blocked positions reduce it, and pawns on only one wing reduce it.

What is the bishop pair worth?


Does document "depth" affect CouchDB performance?

Question: I have a project where it is very tempting to use a deeply nested collection of data. But how does that affect performance? Are there any reasons why I should avoid doing this? I'm talking about lists in lists in lists, etc.
Answer: Per this StackOverflow thread, it sounds like lists are created by serializing and then deserializing the data.
If you were deeply nesting your documents with list inside of list, that would be a serious performance hit purely from the serialization and deserialization.
If you have a hierarchy like this, I would consider using MySQL, since it's designed for relational data.  It would be simple to implement a hierarchy using a relational DBMS compared to CouchDB.


increase PID sampling rate on embedded system

Question: my robotic project is running at every 1ms and the processes are taking about 0.9ms. I am running PID so my max clock rate is 1kHz. About half of the processing time are taken by SPI peripherals, IMU and encoders. Is there any recommendation on how I can run faster PID sampling rate?
Comment: Why do you need a higher sample rate?
Comment: You have to change sensor reading time. Sample time bounded to sensors. PID sample rate has no matter. Try assembly language to shorten. Also can you share your hardware specifications.
Comment: @Daniel I wanted to experiment. And hope it improves performance.
Answer: Increasing the sample rate probably isn't going to buy you much if you can't do something useful. That is, if you don't update the control signal (e.g., motor current) at the same high sample rate, then I don't think you're going to gain much. Similarly, if your IMU or other sensors don't update at the higher frequency, polling them at a higher frequency isn't going to get you much either.
You need high frequency feedback, high frequency output, and the headroom to process at those high frequencies. If you could increase the PID sample rate, if you're still relying on the 1kHz process to provide the output then you haven't gained much. However, note that the input frequency doesn't matter too much; at a bounding very low frequency input the controller would interpret the reference like a step input, but you still get PID control/stability.
What I would suggest is either going with a faster processor or (preferred) splitting PID off into its own processor. Use a "master" to interface with the user, generate a reference signal, then pass that reference off to the PID controller. Doing this frees up the PID controller to handle only the relevant feedback (sensors) and outputs (motors).
For example, say you are running a quadcopter. The master controller gets the motion control input from the pilot, but also gets periphery input from the pilot, for things such as maybe camera gimbal control, camera control, lighting/display control, audio, heartbeat messages, feedback vehicle parameters to the pilot, etc.
Of all of these things, parse the motion refernce (pitch/roll/yaw/thrust etc.) and pass that off to the PID control chip.
Now the PID control chip gets the motion reference at the 1kHz input, but the reference doesn't need to update very quickly. The PID control chip can now focus only on polling the IMU/compass/other sensors, calculating reference-feedback errors, and modifying the outputs.
Comment: could you elaborate on "reference doesn't need to update very quickly"? or direct me to some other place where I can look into the validity of such implementation?
Comment: It's just a step response. Say you get control reference signals every 1ms (1kHz) but your PID runs every 0.1ms (10kHz), then you essentially have a 10 sample step followed by another 10 sample step - PID will still work to control to the input. This is akin to breaking down a system response as a summation of impulse responses.


How can one differentiate between "who" and "whom"?

Question: Many times, I've been asked the difference between "who" and "whom". I myself know the difference, but it is hard to explain to others. What is the easiest way to explain it to those with a basic understanding of English? A mnemonic (if possible) would help.
Comment: [Calvin Trillin](http://books.google.com/books?id=G8Em3RgdkncC&pg=PA229#v=onepage&q&f=false) once wrote: "As far as I'm concerned, *whom* is a word that was invented to make everyone sound like a butler."
Answer: In modern informal usage
Traditionally, who and whom are distinguished: who is used as a subject, whom as an object. But the distinction produces a number of inconsistencies, and it has confused even such native speakers as William Shakespeare, the translators of the King James Bible, and Daniel Defoe.1
Fortunately for the English learner, in modern informal English, you don't need to distinguish them. Who (as well as derived forms like whoever) can be used in all positions.
For instance, who can be used as both a subject and an object (as an interrogative):

Whosubject of "[i]s"'s there?
They sacked whoobject of "sacked"?
Whoobject of "to" will the task be assigned to?

and similarly when it heads a relative clause:

Give it to anyone who asks for it.
Give it to the employee who it's assigned to.

"Whom" will generally still be used when it immediately follows the preposition it is the object of. But such constructions are uncommon in informal English, since pied-piping of prepositions is used only in formal registers.
"Whomever" is essentially unused, with "whoever" used even immediately after a preposition:

Give it to whoeverobject of "to", subject of "asks" asks for it.
Give it to whoeverobject of "to", object of "picks" the computer picks.

1 That is, the distinction was never widely observed in detail.
Comment: No, the last one is wrong.  One gives it to whomever the computer picks.
Comment: @tchrist: According to [this NGram](https://books.google.com/ngrams/graph?content=to+whoever+you+like%2Cto+whomever+you+like&year_start=1800&year_end=2019&corpus=29&smoothing=10), Brits have come out resoundingly in favour of *[give something] to **whoever** you like* in recent decades. Switching the corpus to AmE reverses the preference in favour of *...to **whomever** you like*, but I'm sure it's only a matter of time before you guys see the advantage of this particular simplification.
Answer: You asked for a mnemonic; here's a simple one:

Use who in places where he fits.
Use whom in places where him fits.
Use whose in places where his fits.
Comment: *Who/whom she was talking to?*
Comment: @MaulikV  I would tend to 1) "Who was she talking to?" and 2) "To whom was she talking?"
Answer: A long time ago, in a galaxy far, far away, English used to have noun cases. Generally, cases where the rules by which a noun changes.
When a noun was a primary actor in a sentence, it was used in a nominative case.
However, if a noun was an object of some action, other cases were used.
Consider:

My brother is a doctor - here, "brother" is a primary subject, so nominative case was used;
I give an apple to my brother - here, "brother" is not a primary actor, so the noun used another case. Usually, dative;
I see my brother - here, "brother" is a direct object of an action, so the noun was in objective case.

There are many resemblances of former use of noun cases, and the most prominent example is pronouns:

Nominative "I", but objective "me";
  Nominative "who", but objective "whom"

Hence, the answer to your question:
Who is used when you are talking about the subject (actor):

Who broke the window?

Whom is used when we are talking about an object of a certain action:

With whom are you going to a school?
Answer: Who is Subject Oriented Interrogative pronoun and Whom is Object Oriented Interrogative Pronoun.
Usage of Who:-
1) It can be used in place of subject to interrogate.
Ex- i) Who are you?
ii) Who taught you to talk like that?
2) It can also be used as a subject of a clause.
Ex- i) This is the person who was searching for you.
ii) Anybody who would like to climb the hill may come forward.
Usage of Whom:-
1) It can be used in place of object to interrogate.
Ex- i) Whom do you want to leave with?
ii) Whom is this present for?
2) It can also be used as a object of a clause.
Ex- i) This is the person whom I told you about.
3) Whom is always the correct choice after a preposition.
Ex- Katrina is the girl with whom I am going to date.
Answer: I taught this to my students in a very simple manner just last week.
Who broke the vase?
Whom did mother call?
In the first sentence, the work is done by the unknown person 'who'. It is in active voice. Hence, we use 'who'.
In the second sentence, 'mother' does the work. The verb refers to the object. It is in passive voice. Hence, we use 'whom'.
In other words, if the unknown entity does the verb, use 'who'. If the verb is done on the unknown entity, use 'whom'.
Comment: *Whom did my mother call?* is not in the so-called passive voice. It is not a passive construction.
Comment: *Who/whom was she talking to?* What is the choice as per this theory?


Height and feedline loss tradeoff for VHF

Question: Currently my 2m antenna is about 3m above the ground inside, my HF antenna is connected to 30m (2db loss) coax and is about 12m up. Since the loss for 2m is a lot more when traveling down such a long piece of coax will moving my 2m antenna to the same mast as the HF antenna be worth the gain in height?
Comment: You probably also need to outline what kind of HF antenna you have on your tower for the antenna gurus to comment on how the two antennas may interact with eachother. Is it a yagi with rotator on top? Is it a dipole with wires to either side (with free space above for a VHF vertical)?
Comment: Some clarifications, the reason I'm considering the move is to gain some more coverage, both for simplex and repeater use. I can hit the local repeaters but was hoping to add one or two other ones as well. My current VHF feedline was packaged as a car setup pack, not sure what it is since I got it a while back.
Comment: I have two HF antennas fed at the same point, both half wave dipoles, one for 20m and one for 40m. The idea is to put the VHF at the feedpoint on top.
Answer: I'm not a feed line guru, but I'm not sure your question as its worded now has an academicly "correct" answer anyway as it's a matter of owner preference and local conditions.
You should clarify what you want from your VHF setup. If you can already effectively work all your local repeaters and are not concerned with simplex coverage, then maybe it won't be worth relocating your VHF antenna for you.
If you are concerned about simplex coverage for emergency use when repeaters could be down, then the height improvement may be worth any potential feed line loss to you.
If your living conditions or significant other require you to move the antenna for space/placement reasons, the top of the tower may be nice and out of the way.
You will need to weigh these benefits and costs against your desired performance.
Of course if you are running inexpensive feed line with your VHF antenna indoors, moving it outside with good quality feed line may not cost you anything more than you are already losing with the antenna indoors! So its just a matter of cash and time to mount it right.
EDIT After comments: Taking into account your clarification in the comments above, I would say getting the antenna outdoors and replacing the "car kit" feed line with quality low loss feed line will likely give you an all around better setup. ARRL seems to recommend Belden 9913 or LMR-400. "For base stations in particular, always buy the lowest-loss coax you can afford." - from that same ARRL page.
I've seen more than a few people put a VHF vertical above the apex of a dipole on a tower. But hopefully someone more knowledgeable than I can advise on a recommended minimum separation distance. If you can keep the vertical a few feet above the dipole that will help reduce any interaction between them.
Whatever separation distance you can achieve, I'd be pretty confident your setup will improve getting your antenna outside with better feedline.
Answer: Usually, higher is better, assuming you are using coax that isn't exceptionally lossy. At VHF, this will be something other than the cheapest coax you can buy.
Unfortunately, that's the most accurate answer you can get here, because the benefit of additional height depends on a lot of things about your environment that we don't know. Are there buildings in the way? Trees? What are ground conditions like around your location? What's the height of the other antenna?
The best height will be the one where coax loss + path loss are at a minimum. Calculating  the coax loss is easy: read the datasheet. Calculating path loss not feasible, but you can measure it.
Put your antenna on a piece of coax long enough to reach to your highest height considered. Mount the antenna down low. Go far away. Make a test transmission. Measure the received signal strength. Now move the antenna up higher and repeat. Now you know what you stand to gain by putting the antenna higher. Compare that to what you will lose, calculated from the coax specifications, and you will know if higher is better.
Answer: Some possible solutions would be:

Get better feedline, like LMR400
Get an LNA, this is a special amplifier that sits between your antenna and feedline and is powered by a supply at the other end of the feedline.
Transverter. A transverter will take for instance a 10m signal and convert it to 6m and vice-versa. You see these a lot in the GHz spectrum, as installing waveguide or LMR1200 is not practical.
Comment: That LMR400 Amazon affiliate link goes to a page with some pretty dire reviews.
Comment: Point 1 already mentioned by both previous answers... but point 2, how does this answer the question about antenna location? The question was about consering the trade off of feed line losses vs. benefits of height - the preamp will not prevent feed line losses. Just wondering your line of thought here.
Comment: The preamp helps mitigate line losses on receive. In some instances this <-------FeedLine------> setup also amplifies the outgoing signal.


How can I get a me.com e-mail address?

Question: Was this a service only offered with Apple's Mobile Me? Is there anyway I can still get an e-mail address ending in @me.com?
Comment: The answers below appear to be old (before iCloud was released) so are based on some guess work... Can anyone please update whether one can still get @me.com email id, I'm unable to find a way.
Comment: I found a way and have added it as answer below.
Answer: It's basically not possible to make a new MobileMe account while the transition to iCloud is happening. There are some loopholes (like adding a new account under an existing Family account) - but most will have to wait until iCloud is released. The official word on that is a vague - in the fall of 2011.
From the Apple preview page covering Contacts, Calendar and Mail as part of iCloud:

Mail that delivers. Free.
When you set up iCloud, you get a free me.com
email account. iCloud automatically
pushes new email messages to all your
devices, so your inbox is up to date
everywhere you check it. And iCloud
keeps all your folders in sync, no
matter which device you're using.

That was posted June 6, 2011, and I think that's pretty definitive. Free me.com accounts for all. It's unclear if you can get a new one today, but when iCloud opens to the public, you'll be able to sign up for one.
The sign-up page for MobileMe was disabled when iCould was announced at WWDC. People with unredeemed paid memberships can request a refund as they can no longer create a new account. Also, the free trials are suspended - presumably until iCloud opens this fall. The MobileMe transition FAQ documents this in detail and should be updated if things change before iCloud details are released.
The only way to get an account is if you already have a Family Pack with unallocated sub accounts. It is not clear if and how that sub account will transition to iCloud, but that may be an option for some to establish MobileMe email after June 6, 2011 and before iCloud opens for business.
Comment: "Free me.com accounts for all." with "all" meaning every one who owns an iGadget or a mac with OSX 10.7 (or later).
Comment: Possibly true (We don't yet know if Windows users with Safari or iTunes but no iGadgets will be able to sign up for iCloud), but I think that on AskDifferent, that's not an very restrictive assumption. If people want free email that can do lots of other stuff, including excellent syncing capabilities for many platforms, there's always Google. I use MobileMe now for mail, calendar, and contact syncing, but NetNewsWire and Reeder use Google Reader as my canonical RSS store. And when we had Blackberries a few years ago, before we bought the iPhones, we used Google Sync.
Comment: @martin anyone with an Apple ID will be able to sign up for an iCloud account, so all you will need to do is go to https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/ and set one up.
Answer: Definitive answer on this is now at Apple's KB as of 15 Jan 2015
Extract:

If you created an iCloud account on or after September 19, 2012, your email address ends with @icloud.com. Learn more about @icloud.com mail addresses.
If you created an iCloud account before September 19, 2012, or moved to iCloud with an active MobileMe account before August 1, 2012, you have both @me.com and @icloud.com email addresses.
If you had a working @mac.com email address as of July 9, 2008, kept your MobileMe account active, and moved to iCloud before August 1, 2012, you can use @icloud.com, @me.com, and @mac.com email addresses with your iCloud account.

In each case, you can sign in to iCloud with either your @icloud.com email address or the Apple ID that you use with your iCloud account.
If you created one or more email aliases for your account, be aware of the following:

You can change or delete an email alias, but if you delete an @mac.com or @me.com email alias, you can't add it back to your iCloud account.
You can't sign in to iCloud.com with an email alias. Sign in with your @icloud.com email address or the Apple ID that you use with your iCloud account.
Answer: You can actually just go into the "Mail, Contacts & Calendars" section of your system preferences on your Mac.  Click the add account option on the left and then click the iCloud option on the right, it will give you the option to generate a new apple ID account with an option to make it a free @me.com account.
Answer: Steve Jobs mentions in WWDC 2011, that "We'll give you a me.com email address," when speaking about iCloud.  So - if your question was in reference to whether the @me.com addresses will disappear with the coming of the iCloud service, no, I don't think so.
Answer: From this Apple Support page:

Can I create a new MobileMe account?
  You can no longer create a new 60-day trial account or start a new subscription using a code contained in a MobileMe box. However, if you have a Family Pack subscription, you can still create new family member accounts.

Edit: I hadn't targeted the actual question very well: "How can I get a me.com e-mail address?".
Turns out, you only need to create an Apple ID using your an existing email address which you will need to verify; then using iOS 5, OS 10.7, or Windows Vista or later, and create an iCloud account which will include your choice of an available @me.com address.
Answer: On a Mac running Lion or higher, click System Preferences, select iCloud.
If you have selected another account, logout.
Click on Create an Apple Id ... rest is self-explanatory and go through the steps.
Answer: Ah hah! So I found a tricky way to get my me.com address. I downloaded the iOS 5 developer preview onto my iPad 2. The new iOS gives you the option to create a me.com e-mail address.
Comment: @bmike: Per your flag, developer questions are okay up to the point of asking about actual code. The lingering question is really how much traction these will get over time (which so far isn't much, but there really isn't another place to ask them. SO will close stuff like this and Programers is for subjective questions).
Comment: These accounts could be marked as developer sandbox only similar to Game Center accounts that were all mass deleted just before the go-live date for the general public. Use caution unless you have information that these are not just test accounts and will actually be migrated if that matters to you.
Comment: http://developer.apple.com has discussions for anything relating to beta software and NDA material and iCloud beta - perhaps you meant no other place on SE.
Answer: I have been looking for a way to get @me email id and finally after a lot of search found a way here

go into the iCloud settings on your Mac and check Mail, you will be
  prompted to create a @me.com address.

I'm not sure whether there is any other way to create @me address from me.com or icloud.com but the above worked for me!
Answer: I don't recall seeing it mentioned during the process of signing up for iCloud but @me.com addresses/aliases are automatically created alongside your @iCloud.com email address.
For instance, if John Doe created an iCloud account today and subsequently obtained his email@example.com email address he could also receive email sent to email@example.com without doing any extra work on his end.
tl;dr - If you already have an @iCloud.com email address you can automatically receive email sent to the same address ending in @me.com.
Comment: How does this differ from other answer's e.g. Atul Goyal's and jaideep's and Diana's
Comment: @Mark The difference is none of their answers explain that me.com addresses are still available as an alias.  If an end user walks through the steps in any of their explanations they're greeted with options all ending with iCloud.com addresses.  Technically they are correct, these are valid methods for obtaining a me.com/icloud.com address, but they don't explain that the iCloud address can use the Me address as an alias.

How can I get a me.com e-mail address?


Area Under Curve ROC penalizes somehow models with too many explanatory variables?

Question: I'm using Area Under Curve ROC as a performance measure of my classification algorithms (logistic regressions). Since I'm going to choose the model that maximize the Area Under Curve ROC, I would like to know if AUC penalizes somehow models with too many regressors (for example, like BIC information criterion).
Comment: No, it does not. AUC only assesses predictive performance and is completely agnostic to model complexity.
Comment: did you compute the AUC 'in sample' (i.e on the same data you used for estimating the logistic regression) of 'out-of-sample' (on other data than the data you used for estimating) ? id you compare the AUC using the same data ?
Comment: I estimate the logistic parameters in the training set (75% of the whole dataset) and then I compute the AUC in the test set (25%), and yes, I compare the AUC using the same data (the same test set).
Comment: @LucaDibo the reason you are seeing AUC favor fewer regressors is not because of any special property of AUC. It is just because you are utilizing a train-test split. See my answer below.
Comment: Thanks Marc. So, what I don't understand is: I can choose between a set of 30 regressors, why AUC is maxim with a subset of just 8 regressors? I mean, if it does not penalize model complexity, then why it does not choose all the possible regressors?
Comment: Probably because some inputs deteriorate the performance of your classifier. Having more inputs does not guarantee a better classifier.
Answer: You mention in the comments that you are computing the AUC using a 75-25 train-test split, and you are puzzled why AUC is maximized when training your model on only 8 of your 30 regressors. From this you have gotten the impression that AUC is somehow penalizing complexity in your model.
In reality there is something penalizing complexity in your model, but it is not the AUC metric. It is the train-test split. Train-test splitting is what makes it possible to use pretty much any metric, even AUC, for model selection, even if they have no inherent penalty on model complexity.
As you probably know, we do not measure performance on the same data that we train our models on, because the training data error rate is generally an overly optimistic measure of performance in practice (see Section 7.4 of the ESL book). But this is not the most important reason to use train-test splits. The most important reason is to avoid overfitting with excessively complex models.
Given two models A and B such that B "contains A" (the parameter set of B contains that of A) the training error is mathematically guaranteed to favor model B, if you are fitting by optimizing some fit criterion and measuring error by that same criterion. That's because B can fit the data in all the ways that A can, plus additional ways that may produce lower error than A's best fit. This is why you were expecting to see lower error as you added more predictors to your model.
However, by splitting your data into two reasonably independent sets for training and testing, you guard yourself against this pitfall. When you fit the training data aggressively, with many predictors and parameters, it doesn't necessarily improve the test data fit. In fact, no matter what the model or fit criterion, we can generally expect that a model which has overfit the training data will not do well on an independent set of test data which it has never seen. As model complexity increases into overfitting territory, test set performance will generally worsen as the model picks up on increasingly spurious training data patterns, taking its predictions farther and farther away from the actual trends in the system it is trying to predict. See for example slide 4 of this presentation, and sections 7.10 and 7.12 of ESL.
If you still need convincing, a simple thought experiment may help. Imagine you have a dataset of 100 points with a simple linear trend plus gaussian noise, and you want to fit a polynomial model to this data. Now let's say you split the data into training and test sets of size 50 each and you fit a polynomial of degree 50 to the training data. This polynomial will interpolate the data and give zero training set error, but it will exhibit wild oscillatory behavior carrying it far, far away from the simple linear trendline. This will cause extremely large errors on the test set, much larger than you would get using a simple linear model. So the linear model will be favored by CV error. This will also happen if you compare the linear model against a more stable model like smoothing splines, although the effect will be less dramatic.
In conclusion, by using train-test splitting techniques such as CV, and measuring performance on the test data, we get an implicit penalization of model complexity, no matter what metric we use, just because the model has to predict on data it hasn't seen. This is why train-test splitting is universally used in the modern approach to evaluating performance in regression and classification.
Answer: There is a good reason why the regression coefficients in logistic regression are estimated by maximizing the likelihood or penalized likelihood.  This leads to certain optimality properties.  The concordance probability ($c$-index; AUROC) is a useful supplemental measure for describing the final model's predictive discrimination, but it is not sensitive enough for the use you envisioned nor would it lead to an optimal model.  This is quite aside from the overfitting issue, which affects both the $c$-index and the (unpenalized) likelihood.
The $c$-index can reach its maximum with a misleadingly small number of predictors, even though it does not penalize for model complexity, because the concordance probability does not reward extreme predictions that are "correct".  $c$ uses only the rank order of predictions and not the absolute predicted values.  $c$ is not sensitive enough to be used to compare two models.
Seeking a model that does not use the entire list of predictors is often not well motivated.  Model selection brings instability and extreme difficulty with co-linearities.  If you want optimum prediction, using all candidate features and incorporating penalization will work best in most situations you are likely to encounter.  The data seldom have sufficient information to allow one to make correct choices about which variables are "important" and which are worthless.
Comment: AUC should play absolutely no role in that process.  Logistic regression is all about the likelihood (or deviance).  You should be optimizing the deviance in the test sample.  This assumes you have a huge training and a huge test sample otherwise split sample validation is unstable.  I've expanded my answer to deal with your other question.
Comment: I estimate logistic parameters in  the training set and then I compute the AUC in the test set. In this way I overcome the over fitting issue (I think). What I don't understand is the following: since I can choose between a set of 30 regressors, why AUC is maxim with a subset of just 8 regressors? I mean, if it does not penalize model complexity, then why it does not choose all the possible regressors?
Answer: This should help clarify a few things, in as few words as possible:

AUC = measure of model's actual predictive performance
BIC = estimate of model's predictive performance

Performance Measures, like AUC, are something you would use to evaluate a model's predictions on data it has never seen before.
Information Criteria, like BIC, on the other hand, attempt to guess at how well a model would make predictions by using how well the model fit the training data AND the number of parameters used to make that fit as a penalty (using the number of parameters makes for better guesses).
Simply put, BIC (and other information criteria), approximate what performance measures, like AUC, give you directly.  To be more precise:

Information criteria attempt to approximate out-of-sample deviance using only training data, and make better approximations when accounting for the number of parameters used.
Direct performance measures, like deviance or AUC, are used to asses how well a model makes predictions on validation/test data.  The number of parameters is irrelevant to them because they're illustrating performance in the most straightforward way possible.

I thought the link between information criteria and performance measures was hard to understand at first, but it's actually quite simple.  If you were to use deviance instead of AUC as a performance measure then BIC would basically tell you what deviance you could expect if you actually made predictions with your model, and then measured their deviance.
This begs the question, why use information criteria at all?  Well you shouldn't if you're just trying to build the most accurate model possible.  Stick to AUC because models that have unnecessary predictors are likely to make worse predictions (so AUC doesn't penalize them per se, they just happen to have less predictive power).
Answer: In logistic regression (I do it univariate for easier typing) you try to explain a binary outome $y_i \in \{0,1\}$ by assuming that it is the outcome of a Bernouilli random variable with a success probability $p_i$ that depends on your explanatory variable $x_i$, i.e. $p_i=P(y_i=1|_{x_i})=f(x_i)$, where $f$ is the logistic function: $f(x)=\frac{1}{1+e^{-(\beta_0+\beta_1 x)}}$. The parameters $\beta_i$ are estimated by maximum likelihood. This works as follows: for the $i$-th observation you observe the outcome $y_i$ and the success probability is $p_i=f(x_i)$, the probability to observe $y_i$ for a Bernouilli with success probability $p_i$ is $p_i^{y_i}(1-p_i)^{(1-y_i)}$. So, for all the observations in the sample, assuming independence between observations, the probability of observing $y_i, i=1,2, \dots n$ is $\prod_{i=1}^np_i^{y_i}(1-p_i)^{(1-y_i)}$. Using the above definition of $p_i=f(x_i)$ this becomes $\prod_{i=1}^nf(x_i)^{y_i}(1-f(x_i))^{(1-y_i)}=$.  As the $y_i$ and $x_i$ are observed values, we can see this as a function of the unknown parameters $\beta_i$, i.e. $\mathcal{L}(\beta_0, \beta_1)=\prod_{i=1}^n\left(\frac{1}{1+e^{-(\beta_0+\beta_1 x_i)}}\right)^{y_i}\left(1-\frac{1}{1+e^{-(\beta_0+\beta_1 x_i)}}\right)^{(1-y_i)}$.  Maximimum likelihood finds the values for $\beta_i$ that maximise $\mathcal{L}(\beta_0, \beta_1)$. Let us denote this maximum $(\hat{\beta}_0,  \hat{\beta}_1)$, then the value of the likelihood in this maximum is $\mathcal{L}(\hat{\beta}_0,  \hat{\beta}_1)$.
In a similar way, if you would have used two explanatory variables $x_1$ and $x_2$, then the likelihood function would have had three parameters $\mathcal{L}'(\beta_0, \beta_1, \beta_2)$ and the maximum would be $(\hat{\beta}'_0, \hat{\beta}'_1, \hat{\beta}'_2)$ and the value of the likelihood would be
$\mathcal{L}'(\hat{\beta}'_0, \hat{\beta}'_1, \hat{\beta}'_2)$.  Obviously it would hold that $\mathcal{L}'(\hat{\beta}'_0, \hat{\beta}'_1, \hat{\beta}'_2) > \mathcal{L}(\hat{\beta}_0, \hat{\beta}_1)$, whether the incerase in likelihood is significant has to be 'tested' with e.g. a likelihood ratio test. So likelihood ratio tests allow you te 'penalize' models with too many regressors.
This is not so for AUC ! In fact AUC does not even tell you whether your 'success probabilities' are well predicted ! If you take all possible couples $(i,j)$ where $y_i=1$ and $y_j=0$ then AUC will be equal to the fraction of all these couples that have $p_i < p_j$.  So AUC has to do with (1) how good your model is in distinguishing between '0' and '1' (it tells you about couples with one 'zero' and one 'one'), it does not say anything about how good your model is in predicting the probabilities ! and (2) it is only based on the 'ranking' ($p_i < p_j$) of the probabilities.  If adding 1 explanatory variable does not change anything to the ranking of the probabilities of the subjects, then AUC will not change by adding an explanatory variable.
So the first question you have to ask is what you want to predict: do you want to distinguish between zeroes and ones or do you want to have 'well predicted probabilities' ? Only after you have answered this question you can look for the most parsimonious technique.
If you want to distinguish between zeroes and ones then ROC/AUC may be an option, if you want well predicted probabilities you should take a look at Goodness-of-fit test in Logistic regression; which 'fit' do we want to test?.
Answer: As Marc said, AUC is only a measure of performance, just like missclassification rate. It does not require any information about the model.
Conversely, BIC, AIC, need to know the number of parameters of your model to be evaluated.
There is no good reason, if all of your predictors are relevant, that the missclassification rate or the AUC decreases when removing variables.
However, it is quite common that combining a learning algorithm, an importance measure of the variables and variable selection (based on the importance the algorithm grants them) will perform better than fitting the model on the whole data set.
You have an implementation of this method for Random Forests in the R RFauc package.


Can I use a Brompton bike with a trailer like the Thule Chariot Cougar?

Question: I wonder if I can use a Brompton bike with a trailer like the Thule Chariot Cougar? It uses the so called Thule Axle Mount and I wonder if it is compatible to the bike. At this point, it is just advanced planning and I can't test the possible setup. What do you think, any experiences?
Comment: The Brompton either has a standard axle or an internal hub-gear. You could swap the standard axle with a quick-release type and fit the Axle Mount. But still...
Comment: Doesn't having a trailer defeat the purpose of being foldable?
Comment: So, this question is  18 months old.  Can you tell us how you got on with mounting the trailer on the brompton?  Did it work okay or have you done something else in the meantime?   You're allowed to answer your own question, and then accept the answer.
Answer: I'm going to say yes based on this photo.  It looks that the hole is big enough to pass over just about any axle, quick release or nutted.  I think what is throwing you off is that it comes with a quick release skewer that is longer than what is typically used for wheels.  You may not need that provided skewer.  Burley uses a similar one and I was able to put the hitch on a Jamis bike using the skewers that came with the bike.
If your bike has the internal gear hub, it probably has anti rotation washer (special washers to keep the axle from turning).  This hitch would mount to the outside of that washer.
Comment: You may end up with an uncomfortable seating angle for the children.  The chariot mount and angle assumes a 26" or 29" wheel.  Dropping it down to the axle height of such a small wheel will drop the bike adapter height and tilt the whole trailer forward.
Answer: I have a Chariot (now Thule) cart attached to my Brompton (with internal gears). It has the standard adapter (similar to the one in the picture above) and works fine. I didn't have to do any adaptations.
The only issue is that the cart leans forward due to the 20" wheel but my little one does just fine.
Answer: How much "like" does it have to be?  I have seen trailers that clamp onto the seat post.  These have the added advantage that when unhooked from the bike, you can use it like a hand truck.  I used to go grocery shopping with a Burley axle-mount, and had to rearrange the groceries when I lowered the tow-bar to axle height.
In one model I saw, the cargo compartment was easily removable from the frame and had straps to make it a backpack.
UPDATE: I now have a Cyclone IV Chubby.  On the road, my supplies go inside it.  When I get to an airport, I empty it, fold the Brompton and put it inside.  Surround it by whatever else will fit and check that in.  The rest goes in the backpack for carry-on.
Downside: excess baggage fees
Radical Design makes other trailers.
This person uses a child trailer with Brompton
Answer: This should work.
I use the Thule Chinook 1 with my Brompton folding bike.
The only inconvenience is that the front wheel is best not folded down but removed. The clearance with the ground is too low. But when you remove the front wheel, it works perfectly.
Based on this experience I would say yes!
Answer: Yes i can confirm that a Thule Chariot goes great on a Brompton. The clearance from the road to the coupling is clearly lower than on a larger-wheeled bike but it handles well and has not slowed us down at all.