Pay off credit card debt or earn employer 401(k) match?

Question: Should a person with high credit card debt pay it off before contributing to a 401(k) with matching?
Comment: Can you take out a loan against your 401(k)? Get the best of both worlds: low interest rates to pay off your debt, and an employer match on your contributions. (But be smart. Make sure you can keep paying it off just as fast as before.)
Comment: +1 to fennec. I like this solution. Most people think that a loan from a 401k is a terrible idea.. but if you're getting 100% back on that 401k money.. that will outweigh any disadvantage you get from a loan. Someone who knows more about this should make it into an answer.
Comment: There are two main risks of the 401(k) loan: 1) You lose your job.  Now, you have no income, and you need to pay back the loan within 60 days. 2) You potentially pay yourself less interest than the return you would have received from the investments the money otherwise would have been in.
Comment: I would like to hear a break down of the loan from 401(k) as well.  I am one of those "don't take a loan" but that is a gut reaction from years of other gut reactions.
Comment: For the purposes of this question, lets say, yes, 50 percent of the total assets under the plan can be loaned out.
Comment: The repayment is protected by collateral, so the main risk is the penalty for early withdrawl. On the plus side, the penalty is an income adjustment ;)
Answer: A matching pension scheme is like free money. No wait, it actually IS free money. You are literally earning 100% interest rate on that money the instant you pay it in to the account. That money would have to sit in your credit card account for at least five years to earn that kind of return; five years in which the pension money would have earned an additional return over and above the 100%. Mathematically there is no contest that contributing to a matching pension scheme is one of the best investment there is. You should always do it. Well, almost always.
When should you not do it?

When your non-discretionary spending is so high that putting money into the pension plan would put you deeper in debt. Frankly that is almost never true. If you think you are in this position, cut your spending more, and do both: make the matching contribution and pay off the debt. If it really is true, and you no longer spend anything on cable TV, meals out, or entertainment, then you should be paying off the debt.
Your pension fund is already so full that you don't want to put more into it. This is another thing that technically might be true but in practice almost never is. Even if you are only a couple of years away from retirement, you could put the money into the 401K, pull it out in a couple of years and pay off the credit card debt then, and still come out ahead. Wouldn't you really rather have that incredibly awesome vacation when you retire, instead of the pretty awesome one you have planned now?
Comment: As I said: "technically might be true but in practice almost never is".
Comment: "Your pension fund is already so full that you don't want to put more into it." - Is that possible? To have this yet carrying a debt on credit cards? Seems a contradiction. I actually can't imagine "so full" as it was my intent to observe "full enough," then work another year or two, to "a bit more than full" and call it quits.
Comment: "You are literally earning 100% interest rate on that money the instant you pay it in to the account." - most 401(k)s I've seen have a vesting period, meaning that they match it on the books, but it doesn't actually become *yours* for a few years.
Comment: If your funds (not just the matching funds) were locked in for so many years that you would incur 100% interest on the credit card debt in that time, AND there was no possibility of paying off the credit card debt any other way in those years, that might be another case when you might choose to pay off the debt. Not very likely I feel.
Comment: There are maximum contributions to 401k schemes in the United States.
Answer: Nope, take the match.  I cannot see not taking the match unless you don't have enough money to cover the bills.
Every situation is different of course, and if the option is to missing minimum payments or other bills in order to get the match, make your payments.  But in all other circumstances, take the match.
My reasoning is, it is hard enough to earn money so take every chance you can.  If you save for retirement in the process, all the better.
Comment: And now I am waiting for @JoeTaxpayer to bring the math and prove me wrong.
Comment: I'm going to go with this too, because impulse buyers will just run up the credit card debt again, once they realize "hey I've got this whole credit line that I won't have to worry about for several years"
Comment: Let's play some math. At a punitive interest rate of 25%, continuously compounded (a close approximation to the daily compounding you probably have), it will take you about 2.7 years for your debt to double (`ln(2)/0.25`). (At a more down-to-earth "expensive" credit card rate of 15%, it'll be about 4.5 years.) If your employer match is 50% instead of 100%, you'd be looking at 1.6 and 2.7 years. (`ln(1.5)/0.25` and `ln(1.5)/0.15`). How many years your contribution set you back from paying off the debt? Is it fewer years than that? If so, the match is the better deal.
Comment: Ha! I just +1 you as you are right on. I'll compose a longer analysis later, but it will support yours, just with some numbers.
Answer: For easy math, say you are in the 25% tax bracket. A thousand deposited dollars is $750 out of your pocket, but $2000 after the match.
Now, you say you want to take the $750 and pay down the card. If you wait a year (at 20%) you'll owe $900, but have access to borrow a full $1000, at a low rate, 4% or so. The payment is less than $19/mo for 5 years.
So long as one is comfortable juggling their debt a bit, the impact of a fully matched 401(k) cannot be beat. Keep in mind, this is a different story than those who just say "don't take a 401(k) loan." Here, it's the loan that offers you the chance to fund the account. If you are let go, and withdraw the money, even at the 25% rate, you net $1500 less the $200 penalty, or $1300 compared to the $750 you are out of pocket. If you don't want to take the loan, you're still ahead so long as you are able to pay the cards over a reasonable time. I'll admit, a 20% card paid over 10+ years can still trash a 100% return. This is why I add the 401(k) loan to the mix.
The question for you - jldugger - is how tight is the budget? And how much is the match? Is it dollar for dollar on first X%?
Comment: It's fine. At one end of the spectrum is that no debt group, at the other, those who are irresponsible. The no-debt guys have a religious zeal about it that ignores the numbers completely. They will tell you to prepay your 4% mortgage before you put a dollar towards your matched 401(k) in the most extreme case. If they sleep better at night, that's great. I have different priorities such as that match comes before everything, then the high interest debt, etc. I think we are on the same page.
Comment: Hope this isn't against etiquette, but this is more of a hypothetical question. I'm really looking for a platonic ideal argument against the "never ever carry credit card debt" line, and this seems like a great one. My budget right now allocates about 35k to building up net worth, but friends and family ask for advice sometimes and I want to confirm my intuition here.
Comment: jldugger, in either case, it's a good question and will provoke me to ask any friends with credit card debt whether they're contributing to their 401k.
Comment: user606723 - at least to the match if any. For unmatched deposits, I'd pay the cards off.
Answer: Agree with Randy, if debt and debt reduction was all about math, nobody would be in debt.  It is an emotional game.
If you've taken care of the reasons you're in debt, changed your behaviors, then start focusing on the math of getting it done faster.
Otherwise, if you don't have a handle on the behaviors that got you there, you're just going to get more rope to hang yourself with.  I.e., makes sense to take a low-interest home equity loan to pay off high-interest credit card debt, but more likely than not, you'll just re-rack up the debt on the cards because you never fixed the behavior that put you into debt.
Same thing here, if you opt not to contribute to "pay off the cards" without fixing the debt-accumulating behaviors, what you're going to do is stay in debt AND not provide for retirement.
Take the match until you're certain you have your debt accumulation habits in check.
Answer: I'd take the match, but I wouldn't contribute beyond your match, for two reasons:

The rules on 401(k) accounts can change at any time, and they may then no longer be the rosy deal that they are now.  Meanwhile, the money in there gets a fairly large chunk taken out should you need to liquidate it before the prescribed time.
Free money is fine.  Great.  You've got it.  But use any excess that you would have invested to pay down your debt.  Unless you have a cherry credit card rate, you'll come out ahead if you pay that down faster.
Answer: Mathwise, I absolutely agree with the other answers.  No contest, you should keep getting the match.  But, just for completeness, I'll give a contrarian opinion that is generally not very popular, but does have some merit.
If you can focus on just one main financial goal at a time, and throw every extra dollar you have at that one focus (i.e., getting out of debt, in your case), you will make better progress than if you're trying to do too many things at once.  Also, there something incredibly freeing about being out of debt that has other beneficial impacts on your life.
So, if you can bring a lot of focus to the credit card debt and get it paid off quickly, it may be worth deferring the 401(k) investing long enough to do that, even though it doesn't make as much mathematical sense.  (This is essentially what Dave Ramsey teaches, BTW.)
Comment: +1 - I just want to add that if you are that person that has difficulty managing your debt remove the temptation of re-accumulating that credit card debt.  Cancel the card, put it in a safe, or saftey deposit box, etc... what ever you need to avoid the impulse to spend money you do not have.
Comment: I agree with this thought process. Mathwise is one thing but getting out of debt (and staying out!) is a huge boost both emotionally and financially.  On top of that no more risk (with debt).
Comment: Sorry, Randy, The David is right up to a point. Tough to get ahead when paying 18% interest and hoping to get 8-10% on one's 401(k). The monkey wrench here is the match. If one sits down and looks at what they will lose by ignoring the match for a year or two, they might be more incentivized to cut their budget elsewhere. Don't like the loan-juggle advise? Fair enough. But I'd rather see someone pay their debt over 4 years getting the match all that time, than to pay in full in 2.5-3 years and lose the match. The obsession with zero-debt can be costly.
Answer: I would definitely be putting in enough to get the most out of the match.  Only reasons I can think of not too would be:

You are able to pay off the credit card in a very short period of time.  In that case, the  non-monetary benefits of having it paid off might be worth delaying starting the 401(k) for a month or two.
The match comes with a vesting period and there is a good chance you will leave before the match vests.

Other than that, not investing in the 401(k) is turning down free money.
Edit based on feedback in comments.
The only time I would advocate number 1 is if you are intensely committed to getting out of debt, were on a very tight budget and had eliminated all non-essential spending. In that situation only, I think the mental benefit of having that last debt paid off would be worth more than a few dollars in interest.
Comment: +1 for the caution regarding the vested matching. I'd agree, a bird in the hand... -1 for missing a 100% match for the sake of paying the card a few months faster. And keep in mind, often the match is only on the first 5-6% of one's income. Get that matched, and send every cent you can to high interest card debt.
Comment: Ok. +1, I'm not so closed minded as to ignore the mental benefit 100%. Still, we see things differently. I handed my sis-in-law a $10,000 check from my equity line, with the agreement that she'll make minimum payments to my loan and take the rest of the money she was using for payments (on an 18% card) and get her company 100% match. She'll be better off by many thousands of dollars a few years from now.
Answer: There is a very simple calculation that will answer the question:
Is the expected ROI of the 401K including the match greater than the interest rate of your credit card?

Some assumptions that don't affect the calculation, but do help illustrate the points.

You have 30 years until you can pull out the 401K.
Your credit card interest rate is 20% compounded annually.  The minimum payoffs are being disregarded, because that would legally just force a certain percentage to credit card.
You only have $1000.  You can either pay off your credit card or invest, but not both.  For most people, this isn't the case.  Ideally, you would simply forego $1000 worth of spending, AND DO BOTH

Worked Example:

Pay $1000 in Credit Card Debt, at 20% interest.
After 1 year, if you pay off that debt, you no longer owe $1200.  ROI = 20% (Duh!)
After 30 years, you no longer owe (and this is pretty amazing) $237,376.31.  ROI = 23,638%
In all cases, the ROI is GUARANTEED.
Invest $1000 in matching 401k, with expected ROI of 5%.
2a. For illustration purposes, let's assume no match
After 1 year, you have $1050 ($1000 principal, $0 match, 5% interest) - but you can't take it out. ROI = 5%
After 30 years, you have $4321.94, ROI of 332% - assuming away all risk.
2b. Then, we'll assume a 50% match.
After 1 year, you have $1575 ($1000 principle, $500 match, 5% interest) - but you can't take it out. ROI = 57% - but you are  stuck for a bit
After 30 years, you have $6482.91, ROI of 548% - assuming away all risk.
2c. Finally, a full match
After 1 year, you have $2100 ($1000 principle, $1000 match, 5% interest) - but you can't take it out. ROI = 110% - but again, you are stuck.
After 30 years, you have $8643.89, ROI of 764% - assuming away all risk.

Here's the summary -
The interest rate is really all that matters.  Paying off a credit card is a guaranteed investment.
The only reason not to pay off a 20% credit card interest rate is if, after taxes, time, etc..., you could earn more than 20% somewhere else.   Note that at 1 year, the matching funds of a 401k, in all cases where the match exceeded 20%, beat the credit card. If you could take that money before you could have paid off the credit card, it would have been a good deal.
The problem with the 401k is that you can't realize that gain until you retire. Credit Card debt, on the other hand, keeps growing until you pay it off.
As such, paying off your credit card debt - assuming its interest rate is greater than the stock market (which trust me, it almost always is) - is the better deal.
Indeed, with the exception of tax advantaged mortgages, there is almost no debt that has an interest rate than is "better" than the market.
Comment: There's a fallacy in your calculations, specific to the compounding 20% over 30 years. While I agree that if one is committed to paying 20% on a credit card balance, even the 100% match gets killed over time. In the OP's case, the card will get paid slower, not ignored completely. And the OP stated he can convert the card debt to a 401(k) loan, currently at about 5%. It would take well over a decade of a 5% rate to negate the 100% match.


Invisible in visible light but visible in non-visible light?

Question: This may be a stupid question, but I've been wondering this for a while and haven't yet found a solid answer. I'm worried the answer will be something along the lines of "of course not, you dummy" but it's bothering me and I haven't found the answer so I figured I'd take the risk.
Is it possible for matter to ONLY be visible in an area of the spectrum other than visible light? For instance, can any matter be invisible to us but visible in the UV or IR range?
Comment: 'Visible' is a very subjective term here. Do you mean it's dim enough in one wavelength that it is not visible for a certain instrument? Or does visible mean that there is zero emission at that wavelength? The point being, there is almost never zero emission at any wavelength, and whether something is visible or not depends on the instrument limits or other brightness characteristics. For example, a blackbody spectrum emitting body like a human may be visible to an instrument at its peak emission wavelengths (say IR) and not visible at other wavelengths (like visible light).
Answer: While individual atoms or molecules can emit energy at discrete or narrow ranges of wavelengths, once you have larger chunks of matter (and they are above absolute zero) they will emit, at least, a continuous black body spectrum. While black body radiation can be observed at all wavelengths, far away from the peak wavelength it may be below our ability to detect its emission.
Comment: Thank you for the response. I remember the term "black body" from a class I once had, but I didn't find it in my searches for this question. I'll start reading up on that again.

Thank you.


Can I upgrade Ubuntu from a Windows burnt disc?

Question: I currently have Ubuntu 10 (Or 11) on my laptop but no Internet access so I can't use Update Manager. I want to burn a disc from (this) Windows computer to take home for the upgrade. Will this be exactly the same process as burning and installing straight from Windows? The instructions clearly state that to burn a disc from Windows is to install from Windows, no actual burn disc from Windows and update previous Ubuntu OS instruction.
Answer: When you create a disk (whether burnt on a DVD or on a USB stick), it's a bootable disk that you can use from start-up whether the computer in question has Windows, Ubuntu, both, another OS entirely, or has been completely screwed up by an interesting experiment and no longer has any OS on it at all (which is just as well for some of us).
The lack of an internet connection would of course prevent you from updating what you have, or installing anything that isn't included in the ISO. It might be better to take the laptop to the connection, than the Ubuntu to the laptop.
Still, a disk burnt from within Windows does not require Windows to be on the target machine.


Hyperlink (or at least easily searchable ID) **to** mail

Question: I wondered if there is a possibility to create a link (or similar, see below)  in a word processor pointing to a message, event etc. in Thunderbird on Win or Ubuntu. So far I found (and did not solve the issue):

drag & drop Thunderbird message into MS Word: places (copy of) message itself, no link (and hence no context of linked messages, can be big b/o attachments...).
drag & drop message into Libre Writer: opens box where I can check "link", even "DDE" (seemed promising...), but this is just an "insert section" box, which inserts only an empty section. Not sure how this is meant to work on drag&drop...
This Q/A seems exactly what I want, but works only for Mac (need Win or Linux) ("How do I copy a link to a Mail.app message without using drag-and-drop?")
Read sth. about ADS and metadata that is attached to files from mail/internet and contains the file source, but did not find a possibility to use it to actually locate the original mail.

What I want to achieve is, e.g. in a ToDo list or project summary, refer to external material such as mails, where more information is stored that exeeds the scope of the ToDo list/project summary, without writing down folder, date etc. manually.
UPDATE (thanks to user1138 for the hint!): Thunderbird seems to work with GUIDs, also based on Mozilla pages 1, 2, 3 and Mozillazine. However, I could not figure out if these are used as needed for individual messages (or sth. completely different - sorry for my lack of understanding), at least I could not find sth. suggestive in the mail source view, so it might be wrong. But if true: how would one access (find and search) them?
Update 2: To relax requirements a little bit: A useful solution would be a classical hyperlink, but if not possible also anything that is easily and uniqulely searchable, e.g. a GUID or similar I can search for in TB (else than e.g. subject, which is not unique). I know I can place extended search terms (almost unique by sender, subject, time), but I want to avoid writing down a lot of stuff in the first place.
Answer: Windows supported Hyperlinks to Outlook "stuff" (more info at davidtan.org) and a similar question to yours was answered for Outlook here.
But I'm not aware of/nor could I find any such equivalent capability (Paths/GUID's) for Thunderbird.
So beyond writing your own program/Thunderbird Add-on, I think maybe your easiest approach would be to right-click on individual e-mails, select Convert To, Tasks... and then Title each one in a way that references the corresponding ToDo list item.
That, or use Windoze/LookOut! ;-D


Squeaky sounds from our GE dryer. Is this the dryer belt failing?

Question: Our 6 year old GE dryer has a slight (so far) problem. Just as the drum start spinning it makes a squeaky sound. Then it goes away, but I can still hear a reduced version of the squeak every now and then as the drum turns. Seem like it gets worse with a full load. The squeak last less than a second and is not very load.. It has done this for while and it works just as great as it always has but I have a feeling the squeak is telling me something needs to be done and I do not want that to be all of a sudden leaving us stuck without a dryer. Our expensive Samsung dryer totally died on Dec 23 without any forewarning and will be very expensive to fix so we are back to the good 'ol GE which in many ways dries clothes better. I need to keep it alive though!
Answer: Belt and/or rollers (that support the drum as it rotates). Commonly available as a kit of both, often for barely more money than either alone, and the major pain is getting in there to replace them, so just do both is my usual approach.
Comment: And be patient... there are usually a few brackets that have to be removed to replace the belt...+1
Answer: If the GE dryer hasn't been used for a while, that could be a factor.  But quite a few times when faced with a squeaky dryer, my experience has been:

cold room
bearing "dry"  (many dryers have two of these at the bottom rear of the dryer, and a drop of oil will quickly quiet it, as well as warming up from use)
front of drum slides, which are plastic bearings, which the front of the drum slides on
other gaskets or seals
belt and/or belt tensioner

I would check out the bearings first, if you can easily get to them.  Particularly in an older dryer.  They can be replaced, but oil usually buys allot of life.
Then I would look at plastic slides, which if worn, will need replacement.  Easy repair for a DIY.
But your best approach is to isolate the noise, if you can.  Worse when cold? Heavily loaded? And so on.
Finally, in my experience belts tend to fail with very heavy loads, and tend not to squeak unless the tension is not right on the belt.  Even if the belt, replacing them is usually within the capabilities of a DIYer.  In my experience the two rubber wheeled rollers need a drop of machine oil (sewing machine oil or even a tiny drop of engine oil, but WD-40 is not a lasting lubricant for this application). My vote is for the rear roller bearings.  If they get real bad, they are only $10 to $15 each, but they will run for a long time, and even longer with lube once a year or two.
Answer: The squeaking noise is most likely the rear bearing of the drum or the front drum support. I just replaced both for a GE dryer which had been making a grinding noise. When I inspected the inside there was much wear on the front support. The cause was from over loading the dryer.
The repair was fairly-moderately easy. Here is the link for the front support kit that I used for my specific GE model. Here's the link for the rear bearing bushing I replaced.
You must remove the top of the dryer which than allows you to remove the front panel. This exposes the drum which is removed by unscrewing the fasteners inside the back drum wall. Once it's detached the rear bushing is replaced and the new front support can be installed.
When ordering parts always check that they are appropriate for your model. Also a second pair of hands is a good idea.


Why do some publication venues add the degree type next to the author name?

Question: I've noticed that some publication venues add the degree type links to the author name, like MS, PhD, MBA or  MD. What's the point? (example)
Comment: I don't know why, but I at least find it obnoxious and problematically elitist.
Comment: It should be noted that listing names with the degree type in all professional contexts (business cards, presentations, letters, documents, ...) is completely normal and expected in some cultures. Maybe the respective publication venues were strongly influenced by someone from such a culture, who was either unaware of different customs in English-speaking cultures, or who did not see a point in omitting that information and thus kept requiring it in the styleguide for publications.
Answer: It depends completely on the journal's editorial criteria.  Some journals will expect that the degrees are included (see JAMA) and some will not (see Research in the Teaching of English).  Professional ego will not come into it -- the journal will want to maintain uniformity from article to article.
Academic cultures differ as to whether degrees are typically appended to names.  In the academic culture in which I spent 30 years of my professional life, use of the "Ph.D." was seen as unnecessary -- if one identified oneself as "Associate Professor of English" or "Professor of English," the Ph.D. was assumed.
Comment: I thought English was one of those fields where it was common for professors to only have an MA.
Comment: While it's possible that lecturers or part-time instructors will have an M.A. (and will get teaching experience while completing the degree), I don't know of anyone on the tenure-track line in English, in all my years at a university, that didn't have a Ph.D.  You may be thinking of those who teach creative writing, which at my university was a separate department -- many professors in Creative Writing will have an MFA, a terminal degree in a creative field, equivalent to the Ph.D. in other fields.
Comment: P.S.  Just to clarify, in the U.S., a lecturer is generally a part-time instructor.
Answer: I cannot generalize, based on your single-document example. There might be various reasons, such as publication outlet's requirements or authors' professional ego (see egocentrism and/or egotism). However, in that particular case, it can be argued that the degree attribution has been done to clarify that some of the authors are not Ph.D. holders. Not that it matters much (or should matter much or at all, that is), but, perhaps, the authors wanted to be more precise in attribution in order to prevent confusion due to implied assumption that all authors are doctoral degree holders.
Comment: All of this is wildly speculative and the bit about egocentrism, judgmental.
Comment: @CapeCode: What is speculative about listing some _potential reasons_? I have not argued any definitiveness about any of those. As far as egocentrism being a potential factor, do you believe that such _argument_ can be referred to as being judgemental? Moreover, the OP haven't asked about existing research on the topic, but about people's opinions, so I have offered mine. Thus, it IMHO cannot be speculative by definition.


Do I need a visa to go to Canada from America if I am Vietnamese have tourist visa of USA?

Question: I want to go to Toronto to visit my brother only for 5 days and will come back to the USA. I also want to see the water fall through the border between Canada and USA. I am now staying in Milwaukee, Chicago and I'm Vietnamese, I have a one year, multi-tourist USA visa. Do I need a Canadian visa?
Answer: Yes, you do need a visa.
Your USA visa has nothing to do with allowance to cross the Canadian border.
The only way it might be beneficial is when you will apply for Canadian visa at their embassy, it'll be easier to get the visa since you already have the US one.


NLP Feature creation from phrase matching

Question: I'm building a model to classify email content, to decide whether the email should lead to a JIRA ticket being "Raised" or "Not Raised". The problem I am having is the data is highly imbalanced with only around 11% being classed as "Raised". So far, the Random Forest classifier is providing the highest level of accuracy but the True Positive Rate/Recall is sitting at around 40% and I can't seem to increase upon this. I have been provided with a list of phrases that should they be contained in the email content, then in all likelihood a ticket needs raising. Looking for some tips as to the best method to create a new feature based on phrase matching? Has anyone any experience in the best methods for doing this?
Answer: The problem with imbalance is that the optimizer can get a very good score by declaring everything 'not raised'. You need to cheat with your training data by removing that incentive. I would suggest a training set that is balanced 50/50 between the classes. Your evaluation set can still be representative, which will give you a sense of how it'll generalize.
Comment: I've used SMOTE to create a 50/50 balance and have achieved 92% recall but this has been at the expense of accuracy at 79%!
Comment: I'm actually working on a very similar problem ('read' JIRA tickets and determine if they impact my team) and went through something similar. I've been using SpaCy and Prodigy for the job, rather than sklearn. They have some neat tools in there, including one that gives you a sense of whether more training data would help. It works by seeing how much the precision and recall lift based on the number of examples you train with. That might be a profitable avenue to pursue.
Comment: Also, it would be useful to investigate your false positives to figure out why the model might be misclassifying them. Once you have that sense, you can augment your training set by including them as 'not raised' examples that the model can learn from...
Comment: I have an idea why the false positives are being created. Some duplicate emails were labeled once correctly and subsequent reminders were labeled incorrectly. I've tried to remove the duplicates where i can but i think i've missed a few. Do you have any links with examples for the spacy implementation?
Comment: Just fyi, Prodi.gy is a paid tool. To me it was worth it because I wasn't having much luck training SpaCy on my own, but YMMV. Link to text classification examples: https://prodi.gy/features/text-classification
Comment: Thanks I'll look into it.


How do you disable the "Manufacturer's Suggested Retail Price" on magento

Question: How do you disable the "Manufacturer's Suggested Retail Price" on magento.
Comment: Have you got the answer of your query?
Answer:
Manufacturer's Suggested Retail Price

Some manufacturers may implement a so-called "minimum advertised price" restriction. It means that the retailers can't promote the product below a fixed price. NOTE, that it is forbidden for the merchant only to DISPLAY the lower price, not to SELL the item for less. Thus, it makes sense to hide the product price and show it as soon as the item is already in the customer's shopping cart.

Minimum Advertised Price - Magento's Built-in Option

Magento comes with a built-in Minimum Advertised Price (MAP) option. This is what will help the e-store owners to offer the better price to their customers without displaying it on the product page. Due to the fact that MAP can be configured at global and product levels, the retailer can apply the MAP settings to all products or only specific ones. Here's how it works:

On the Admin Panel go to System>Configuration>Minimum Advertised
Price tab;

Change Enable MAP to "Yes";

At the Apply MAP (Default Value) section choose "No" (unless you want to hide all prices throughout your e-shop);

Now you can choose where you want to Display Actual Price:

In cart;
Before order confirmation;
On gesture (on click);

Once completed, click Save button.

Here's how it looks on the frontend:

I hope this will help, as far as I understand you ask for this


A function discontinuous on a countably infinite set

Question: This is a proof from Royden's Real Analysis and there is a part that I do not understand( Underlined in red). Any explanation is much appreciated.
Answer: To put it in simply, consider a point $x_0$ in the set $(a,b) \sim C$. Now take a neighborhood about $x_0$ and notice that if you take a neighborhood small enough you can ensure that no points $q_1 ,q_2, \ldots ,q_{n}$ are in this neighborhood. Therefore if $x$ is a point in the said neighborhood then $|f(x_0)-f(x)|$ will be at most the tail end of the series $\sum \frac{1}{2^n}$ from the point $\frac{1}{2^{n+1}}$ onward. And this tail end sum can be shown to be less than $\frac{1}{2^n}$
Answer: It is critical to note that $n$ is chosen before the interval $I$ is selected.  There is a typo in that the $q_n$ you underlined should be $q_k$.  Given $x_0$ and $n$, there are only finitely many $q_k$ with $k \le n$, so one of them is closest to $x_0$.  You can't have an infinite sequence that gets closer and closer to $x_0$ because the sequence isn't infinite.  You can then choose $I$ to be small enough it does not include any of the $q_k$.
This is leading to an $\epsilon-delta$ proof.  If you give me an $\epsilon$, I need to find a $\delta$ such that ...  Instead of finding $\delta$ algebraically, I find $n$ such that if there aren't any $q_k$ with $k \le n$, the jumps in the interval will be small enough.
Comment: Yes I knew it had to be a typo! This book is full of typos!


SHARE saved Google images list from Android

Question: Using my Android Acer mobile phone, I created and titled a list of Google Images under my Chrome account. How can I share this with others?
Comment: Can you explain what you did and where this list is stored? Did you simply download a bunch of pictures to your phone?
Answer:
You can share photos, videos, albums, and movies, with anyone, even if they don't use the Google Photos app.
Share to your contacts

On your Android phone or tablet,  open the Google Photos app
Sign in to your Google Account.
At the bottom, tap Sharing.
At the top, tap Create Create.
Choose photos to share, then tap Next.
At the top, tap Type a name, phone number, or email.
Select people to share with. If you're part of a family on Google with at least 2 other people, select Family group to share with your
  family members.
Tap Done. You can add a title or message, then tap Send.

Send a link or share to other apps

On your Android phone or tablet, open the Google Photos app Photos.
Tap the photo, album, or movie to share.
Tap Share Share.
Select another app to share or send someone a link. You can also enter or select a name, phone number, or email address.

Source: Google Photos Help


how to add confirmation of user in authentication from mail?

Question: I have authentication process but it saves the user when sign up and login can be done once sign up is completed. I want to send a mail to the user to conform the account, only then he must be able to login. How can i add this feature in my existing authentication system?
Comment: I did not use any gem. I just followed this link http://railscasts.com/episodes/250-authentication-from-scratch and made an authentication system.
Answer: There is a pretty good gem that helps you with user authentication workflows. Devise can be found here: http://rubygems.org/gems/devise
But if you want to develop your own authentication system, you need to save the user on the database, and use a column for to manage the registration state (e.g. registered / confirmed).
To send e-mails to the user, please take a look at the action mailer documentation page: http://guides.rubyonrails.org/action_mailer_basics.html
Comment: I tried devise example and i worked fine but i could not able to change the views so i tried another way from railscasts.com/episodes/250-authentication-from-scratch which went well, but missing account confirmation from mail.
Comment: You can override the devise views. The documentation could be better in that part, but it can be done. Look at the devise source code and create the same views' structure in your app. Copy the views in the gem  to your app/views/devise/... and edit them in place. Rails will use the views you define instead of the views in the gem. Source code can be found here: https://github.com/plataformatec/devise
Comment: I could not find where to change the views in the https://github.com/plataformatec/devise/wiki/Example-Applications. Please look at this example.
Comment: Right. The documentation is not the best on that part. If you look at the gem source, it has the views in there. Including the mail views. See https://github.com/plataformatec/devise/tree/master/app/views/devise/mailer. Just copy the respective file to your app, overriding the full directory. For example, copy app/views/devise/mailer/confirmation_instructions.html.erb from the gem to your local app/views/devise/mailer/confirmation_instructions.html.erb. Then edit the file to your own needs. That should work.


What does it mean 'black holes is created when center of a very massive star collapses in upon itself'?

Question: I read many times that black holes is created when center of a very massive star collapses in upon itself but what does it mean ? Does weight of center of massive star increase so much that itself can't bear weight or I can say space itself cant bear weight of such center of massive star that it collapse. I tried to read answer on google but want to know in layman language as I am not astro physics researcher or student. Thanks
Comment: I don't quite see why this has a close vote, looks like a perfectly reasonable question on the formation of black holes...
Comment: In a nutshell, a critical threshold is reached.  Iron builds up over time and Iron is the end of the energy producing fusion process, so you have an Iron core, that's no longer producing heat and it can begin to cool.   As it grows smaller the weight does increase because weight increases as the Iron gets more compact and when it increases enough, the critical threshold is met and it falls into itself surprisingly fast, creating a neutron star or black hole and the outer layers of the star go supernova.   I can flesh that out into an answer, or maybe someone with more knowledge can.
Answer: This Wikipedia page on Stellar Evolution is a good starting point with lots of links to more info.
A star is a huge sphere of mostly hydrogen.
Like any large mass it has a gravitational field and that field acts on star itself.
So it would always want to collapse to as dense a sphere as possible under it's own gravity.
Now as the density increases, particularly at the center, the pressure also increases and so does the temperature.  When these are high enough the core of the star will be able to fuse hydrogen (and later other materials) into heavier elements.  Doing so releases huge amounts of energy and this is what creates all that light we see.
But the energy released also prevents the star from collapsing more.
And it can stay that way (more or less) for billions of years.  It is this energy produced by fusion at the core that balances the gravitational force (weight) of the rest of the star trying to crush the core.  So fusion that generates more energy than it requires to happen is essential to keep a star "alive".
After a long time, the hydrogen at the core runs out and the star starts to burn heavier elements at the core (helium, carbon, etc. ).  It does that until those run out and (roughly) we reach elements like Iron remaining.  At that point fusing those elements no longer generates enough energy to stop the star collapsing and it starts to collapse again, but very, very rapidly.
Exactly what happens next depends mostly on the mass of the star.  It can end up as a white dwarf, neutron star or black hole.
But the final collapse is a very rapid process and quite violent.
Once the useful fuel at the core runs out, the stars dies a spectacular death one way or another.
What is a black hole (in simple terms) ?
Gravity is a result of the way mass (or even energy) can distort space.
Beyond a certain point this distortion becomes so great that everything on one side becomes trapped inside a "surface" called the event horizon.  An event horizon is what a black hole actually is - no event horizon, no black hole.
Within the black hole, space is distorted in a way that's basically impossible to describe without some mathematics.  The effect is that there is no direction you can move in and no speed you can travel at which will not lead you to the center of the black hole - the singularity.  Don't even try and visualize it, it just isn't a common sense idea.
This even works with light.
Now an event horizon is not a surface you can feel.  You can actually travel across an event horizon (but only inward, not outward !).  So this change in the way space-time is distorted is not something that is sudden or obvious to the person doing the falling.
Back to our star collapsing.
As it collapses (without energy from fusion to stop that), it becomes denser and denser.
Now if it is large enough it will collapse to a black hole, because the core will become so dense from the collapse that it will be enough to form an event horizon.
Our Sun is not large enough to do that.
Comment: I like this line ' Don't even try and visualize it, it just isn't a common sense idea.'
Answer: A star is always a balance of gravity trying to collapse it inward and nuclear fusion trying to blow it up. Usually, the forces are in balance, as the gravity causes more nuclear fusion from hydrogen all the way to iron. However, iron takes an exponentially higher amount of energy to fuse, so gravity wins and crunches the star inward. This weight forms the black hole and also generates a final burst of nuclear fusion, causing the burst of light that people see, and also forming the elements beyond iron. Hope that this answer helps!


Novel ID: Book with cloning and an evil clown alien

Question: I'm looking for a science fiction book. There is a station orbiting earth and a message showing aliens being attacked by other aliens. A warning to humanity. I recall the evil aliens looking like a clown. There is cloning later in the book. People are interrogated and killed. Then the next clone is brought in.
Comment: Send in the clones.
Comment: Hi, welcome to SF&F.  Where and when did you read this?  Was it a physical book or an e-book?  Do you recall the cover art?
Answer: I am reminded of Pohl's Eschaton Sequence
In this series of novels, aliens occupy a human space station in Earth orbit, and have teleportation technology allowing humans and others to be duplicated (thus the clones you remember).  In addition, the aliens on the space station send warning messages to Earth about the dangers of a different faction of aliens. Some of the aliens look silly - humans call them "Dopeys," "Docs" or "Scarecrows," which may correspond to the "clown" memory you have.
This review of the third book in the series mentions the interrogation of duplicates:

At the start of the novel, Dannerman is cloned by a group of alien
Horch and imprisoned so they can interrogate him about life on our
planet.


Can the sum of two non-degenerative random variables ever be uniform?

Question: Background
A rather famous problem is regarding if the sum of loaded dice can be uniformly distributed over $\{2, \cdots, 12\}$; the answer is no. We can see that the top answer in the above link can be generalized to an $n$-sided dice for odd $n$. But what about even $n$? This isn't so hard to prove through a different technique; denote $\mathbb{P}(X = k) = p_k$ and $\mathbb{P}(Y=k) = q_k$ for $k \in \{0, \cdots, n-1\}$ (it's more convenient to work with zero indexing). In order for $X+Y$ to be uniform over $\{0, \cdots, 2n-2\}$, we must have
\begin{align*}
\mathbb{P}(X+Y = 0) = p_0q_0 = \frac{1}{2n-1} \qquad \text{and} \qquad \mathbb{P}(X+Y = 2n-2) = p_{n-1}q_{n-1} = \frac{1}{2n-1}
\end{align*}
But
\begin{align*}
\mathbb{P}(X+Y = n-1) &= \sum_{k=0}^{n-1}\mathbb{P}(X = k)\mathbb{P}(Y = n-1-k) \\
&\ge p_{0}q_{n-1} + p_{n-1}q_0 \\
&\ge 2\sqrt{p_{0}q_{n-1}p_{n-1}q_0} \\
&= \frac{2}{2n-1} \\
&> \frac{1}{2n-1}
\end{align*}
We see that the above strategy would've also worked for the odd case as well.
Generalizations
I have the following few problems. Is it possible to construct two (real) independent random variables $X, Y$ such that $X+Y$ is

uniformly distributed over a finite set $S \subseteq \mathbb{R}$ (e.g. $S = \{1, 1.6162, 2.71828, 3.14159\}$, it doesn't even have to be integers for that matter). In other words, the measure associated with $X+Y$ is a normalized counting measure over $S$.
uniformly distributed over finite-Lebesgue measure set $S \subseteq \mathbb{R}$ (e.g. Cantor set, it doesn't have to be an interval). In other words, the measure associated with $X+Y$ is a normalized Lebesgue measure over $S$.
If the above settings are two limited, then we can extend $X$ and $Y$ to be $p$-dimensional random vectors and ask the associated existence question for $S \subseteq \mathbb{R}^p$.
If still not possible, perhaps ask if it's possible to construct a sequence $\{X_k\}$ and $\{Y_k\}$ with $X_k, Y_k$ independent and converging to non-degenerate $X, Y$ respectively such that the limit of the measure associated with $X_k + Y_k$ converges to either a normalized counting or normalized Lebesgue measure.

I conjecture the answer to the first 3 problems is not possible because, intuitively in the continuous case, the density of $X+Y$ must be ``smooth'' because convolutions generally smooth the functions they are working with, but a uniform density is discontinuous; a similar principle applies to the discrete case. Problem 4 would be interesting to think further.
Answer: If $X$ or $Y$ (or both) is discrete then it is possible to find examples that sum to a uniform distribution. For example, let $X$ assign a weight of $1/2$ to each of $0$ and $1$, and let $S$ be any subset of $\mathbb R$ such that $S$ and $S+1$ are disjoint. Then if the measure of $Y$ is the uniform (or counting, if $S$ is finite) measure over $S$ then $X+Y$ is uniformly distributed over $S\cup (S+1)$.


Can't sign into Turbo Tax account, can I just create a new account?

Question: I can't sign into my Turbo Tax account that I've used to file my taxes the past 2 years, and no matter what I've tried I can't reset the password. I have given up. Is it problematic to just create a new account, or should I just go ahead and do it?
Answer: If you have no need for the information locked in the account, then creating a new account has little impact on you. But if the only copy of the previous years tax return is in that account then abandoning it is more problematic.
Many users of the software expect that the first step in the process is importing data from the previous years return. If you don't have access to the old data you will have to re-enter addresses, SSNs, and employer information. All of which takes time, and there is a risk of typos.
Hopefully if you didn't export data from the account at the end of last year, you at least have a PDF of all the old forms and worksheets, in case you need to refer to them in the future.
Having at least a PDF of the stuff you submitted, and the other worksheets, can be useful if you need to show proof of income for financial aid or a home mortgage. Sometimes they need to go back more than one year. For one job as federal contractor I needed to provide my AGI for the previous 5 years, which was easy to do with the PDFs. For another position before the affordable care act, I needed to submit several years of tax forms to prove that they were my dependents.
If the account is an online account, then having multiple accounts does mean that your key data is in multiple accounts online which may increase your exposure. It is possible the reason you can't get in and recover access is that somebody already got in and changed the password.
Comment: Importing last year's return is a helpful feature, but is still not a deal breaker, even if they don't have another copy. In most cases, you don't really need much info from the previous year's return that you can't find in other ways. Probably the main thing would just be the amount of your previous year's state refund which you could probably find by inspecting bank statements.
Answer: One outside possibility is that your TurboTax account has been hijacked, you've been locked out, and it will be used to submit a fake tax return. This could cause you innumerable headaches down the road, so it may be worthwhile to contact Intuit's technical support and get your account reset.
If this turns out to be hard because all your contact info and security questions have been changed, then the chance that your account has been hijacked goes way up, and you should contact the IRS to make sure someone doesn't use that account to submit bogus tax returns under your name.
Comment: Thanks, I'll definitely look into this. However I'm guessing this isn't the case because I keep getting emails to the same email account it's linked to telling me to sign in so I can file my returns for the year, I'm guessing that if someone else had signed in it would have stopped, and they'd also probably try to change the email address linked to the account.
Comment: @DJSpicyDeluxe If you're still getting emails to that account, can you try the "Forgot password" option?
Comment: @shoover I've only tried it about a million times


The problem of General relativity

Question: Did Friedmann by his equations find a problem in the theory of general relativity?
Because at first Einstien built his theory on a steady state universe. But, Friedmann according to this theory estimated that universe cannot be in the steady state and should expand.
If yes, what was the problem of the theory with the steady state?
Comment: The problem is that there are no stable steady-state solutions except rather useless ones  (this applies even with the cosmological constant) unless you do tricks like creating matter continually (which gives you the endlessly-expanding steady-state universe of Hoyle et al).  Fortunately for GR the universe does not appear to be in a steady state.
Answer: When Einstein developed GR, cosmologists did indeed believe the Universe existed in a steady state.
However, Friedmann found that GR only works if the Universe is either constantly expanding or contracting. To force the field equations of GR to spit out a steady state universe, Einstein added the cosmological constant $\Lambda$ to the equations.
This term was then removed when the expansion of the Universe was discovered by Hubble and others, and then added again very recently (but acting repulsively rather than attractively) after the expansion of the Universe was found to be accelerating (aka dark energy).
Comment: Note that a cosmological constant does not, in fact, yield a static universe: the equilibrium is unstable.
Comment: *but acting repulsively rather than attractively* Why "but?" Einstein used a repulsive cosmological constant as well.

The problem of General relativity


What mathematical skills does testing require?

Question: I've just been wondering what mathematical skills I would need to become a software tester.
Comment: I'm testing a financial planning tool now and for it, there is probably a requirement for algebra level math.  As noted by the answers below, for normal testing and even automation, the required math is pretty minimal.
Answer: Kairu I wonder what has stimulated your question?  Why do you think that you need mathematical skills?
I'd say the most important things in no particular order are:

Good broad IT understanding.
A logical (but not specifically mathematical) mind.
Experience of people using applications.  Try to be an end user yourself and use as many different applications as you can, and be critical.
Good communication skills.
With the type of tools and applications available today, even if
limiting yourself to UI testing, you will need some level of programming skills.
Being a detective like Sherlock Holmes is very important.  Logical
thinking is vital.
Appreciating you cannot do it all so knowing when to stop and thus
awareness of risk assessment.

When looking at performance, my own specialist field, a knowledge of basic statistics is good.  Still amazes me the number of people who set or monitor Service Level Agreements (SLAs) who do not know the difference between a percentage and a percentile.
When I started out many years ago I arrived at IT because I studied mathematics.  I'm sure many ITers liked mathematics more than say literature.  But I do not think it is particularly relevant.
Answer: It depends.
As Nigel has already observed, software testing is a field where the most important skills tend to be difficult to quantify (good communication skills, for example).
In my experience, unless you're testing something that involves heavy mathematical lifting, you don't need more than high school level mathematical skills.
A knowledge of basic statistics is always good. So is being able to dig into a database and spot-check calculations (although my experience is that most of the challenge there is refining the data-set so that the calculations can be performed by a human in a reasonable time-frame).
Here's some of the mathematical skills I've used in my testing career:

basic arithmetic (usually checking totals and percentage calculations - for some reason I can't escape tax calcs...)
calculating averages and standard deviations (this is typically a once-and-done test for software that reports averages and SDs - it needs to be done to check that the calculation routines are correct, but after that the main concern is that the correct data gets used)
calculating conversions - hours/minutes/seconds to decimal time is one I do a fair amount of at the moment. In my last position currency conversions were a big concern.

The logical skills (which can be classed as mathematical or not, depending on who's doing the classifications) I use include:

tracing execution through code (by reading the code). You don't have to know how to program to do this, but it helps.
building data sets - it's important to know which data sets exercise which paths through the application, and to be able to view the application as a set of logic gates (IF this condition applies, THEN do A)
narrowing down problem reproduction. More often than not, the software I test does not have simple bugs. Usually there are multiple conditions, making the bugs appear intermittent. An example I ran into yesterday: if the organization allowed transaction records to have a specific type of linked item, and the transaction record had been entered by any user other than the currently logged in user and the transaction item did not have a linked property with 100% allocation, saving the transaction would copy all transaction lines entered by users other than the logged in user. Tracking that down took me a while.

"Soft" skills I use:

communication skills - being able to get all the necessary information into a bug report is one thing. Phrasing the report in a way that isn't insulting to the programmer is another.
ability to learn quickly - this is one of the most important skills in my career. Very few testers work with simple applications - we need to be able to build up a broad domain knowledge very quickly, and then maintain and keep extending our knowledge base.
switching between big-picture and detail thinking - this is another big one. Without the big picture, it's easy to lose track of how a feature should interact with other areas of the software and just focus on that feature. At the same time, the details have to be correct as well. A good tester can switch between both ways of thinking at need.
note-taking - that might sound mundane, but jotting down the important stuff can be a major help. I typically operate with two monitors, plus pen and paper at hand.

This is all a long way from a complete list, but it should be enough to give you an idea of where mathematical skills fit in the overall testing picture.
Answer: Statistics is probably a must in order to understand testing, for example the Birthday Paradox that can be used to reduce the number of tests, analyzing numerical results of tests and performance tests or planning stop conditions of test runs.
Some basic (or even more) Algebra and Combinatorics are also important for solving day to ay algorithmic problems.
Comment: Rsf - I absolutely agree that a basic understanding of statistics is necessary for testing, but for a different reason. The improper use of statistics can quickly lead to the use or trust in misleading or harmful test metrics. Arming testers with that knowledge can help improve their analytical skills.
Answer: Unless you test mathematical software, the most you would need is Algebra.  There are other skills you will need, but Algebra should cover the math part.
Answer: Probably the highest level of mathematics that you would need is Algebra, especially if you're doing cylomatic complexity, critical fault assumption, or robustness testing, which are applied using algebraic formulas
Answer: Really broad question.  I would suggest you learn boolean algebra and normal algebra.
If you test math software, you would need to know the branch of math you are testing.
If you are testing GPS or graphs, you need graph theory.
Answer: Basically, I Am Working on E-commerce domain for which below Mathematical skills helps me to do testing in a better  way. It looks to be simple skills but if we did any calculations incorrectly it will impact client business in a drastic way.

Arithmetic operation - For calculating the tax
Percentage calculation - When testing the Promotions sales.
Algebra

Apart from this, the testers Good to have the below skills

Software tester should have sharp analytical skills. Analytical
skills will help break up a complex software system into smaller
units to gain a better understanding and create test cases.
Every software tester must have an excellent communication skills. A
tester should be ready to communicate his thoughts and ideas
effectively, using different tools and media.
Think Out of the box.
Willing to Learn New Technologies.


Is there any difference between a flat manifold and an affine space?

Question: What is the difference, if any, between a flat manifold (in which the Riemann tensor vanished identically) and an affine space?
Answer: A Riemmanian manifold is called flat if its curvature vanishes everywhere.
However, this does not mean that this is is an affine space.
It merely means (roughly) that locally it "is like an Euclidean space."
Examples of flat manifolds include circles (1-dim), cyclinders (2-dim), the Möbius strip (2-dim) and various other things.
Yet, let me add into the direction of your idea that the universal cover of a complete flat manifold is indeed an Euclidean space.
Comment: OK, that makes sense. Riemann tensor can tell us whether the manifold is intrinsically flat, but it can still be embeded so that it's extrinsically curved.
Answer: If $G < Isom (\mathbb{R}^n) \cong O(n) \rtimes \mathbb{R}^n$ is a subgroup of isometries of some Euclidean space $\mathbb{R}^n$ acting freely and properly discontinuously on it, then the quotient will be a flat Riemannian manifold. Conversely, any flat Riemannian manifold arises in this way. In the realm of surfaces, this gives you planes, disks, annuli(=cylinders), Mobius bands, tori and Klein bottles. As you see you can have non trivial topology (the main constraint in this case is that the Euler characteristic must vanish, by Gauss-Bonnet).
On the other hand, an affine space is always a contractible space: fix any point $P$, then retract the whole space onto $P$ by straight line homotopy, i.e. $(x,t)\mapsto tP + (1-t)x$. Thus the only surface admitting the structure of an affine space is the plane.
Moreover, on a flat manifold you have well defined geo-metric notions: for example it makes sense to measure angles or lengths on a flat manifold (actually any Riemannian manifold). But it makes no sense to measure such entities on an affine space (such measurements do not belong to affine geometry). From this point of view, the structure of an affine space is more algebraic than geometric: here you have a way to add vectors to points or to perform affine combinations (something which is not available on a general Riemannian manifold). So I guess the point here is that the two structures belong to two different realms of "geometry" and are not really comparable to each other.
Comment: If you want to do affine combinations on differentiable manifold, then you have to require that the local charts are such that the change of charts are affine maps. This is what is called an affine manifold (see the wiki page for detailed discussion). Without this additional structure, the only "affine" aspects of a differentiable manifold is the lack of a preferred point, I guess.
Comment: Of course you are right: Riemannian manifolds don't have a preferred point. [By Euclidean space I usually mean a real vector space endowed with a scalar product, so it would have an origin; but this is just a matter of terminology]. Anyway I guess the main feature of a structure is what it has, not what it lacks: I wouldn't consider an affine space similar to a Riemannian manifold "because" both of them lack the choice of a special point, since this property is shared by a lot of structures; for example a general topological space comes without the choice of a base point. And what you have...
Comment: ..on an affine space is the underlying vector space, which gives you the ability to add vectors to points and to perform affine combinations; this is something not available on a general Riemannian manifold. I do agree that you have a way to turn an affine space into a Riemannian manifold (by means of non canonical choices). The examples above show that, conversely, you cannot turn every Riemannian manifold into an affine space.
Comment: If we agree that the main feature of an affine space is the availability of affine combinations, then I would say no. I agree that on a Riemannian manifold you can pick a chart around a point and perform affine combinations, but what if you pick a different chart around the same point? then the affine combination will not be preserved, because the general change of variable is not going to be an affine map. Tu put it in another way, affine combinations are not intrinsecally/well defined on a general Riemannian manifold.
Comment: Very interesting perspective! So, you wouldn't consider affine spaces to be a precursor to Riemann spaces? Also, what is the use of affine spaces then?
Comment: imho I wouldn't regard affine spaces as precursors to Riemannian manifolds, essentially because the essence of Riemannian geometry, i.e. the possibility to measure the length of tangent vectors (hence of curves) is not available on affine spaces. To have such a feature you have to turn your affine space into a Euclidean space: for example fix a point and a scalar product; this would allow you to measure angles and length. I would consider this as a precursor to Riemannian geometry. Actually, the tangent space to a point of a Riemannian manifold carries the structure of Euclidean vector space..
Comment: so you can consider Euclidean vector spaces as infinitesimal versions of Riemannian manifolds. Affine spaces arises, roughly speaking, whenever you have some object where you could define some structure of vector space, but you have no canonical choice of an origin. These are quite ubiquitous. To stay in the realm of manifolds, the space of connections on a differentiable manifold carries the structure of an affine space (you have no preferred connection on a differentiable manifold). Another important example is given by the space of solutions of an inhomogeneous linear differential equation.
Comment: Would I be wrong in thinking that neither the Euclidean space nor Riemann space have a fixed point to serve as an origin? Of course, they do have the scalar product which the affine space lacks.
Comment: Can we at least say that every Riemann space is locally affine? Because, it is locally Euclidean and it doesn't have a preferred point.


Hamming Code Error Detection

Question: I am learning few things about hamming code and error detection so my question may sound stupid. So i know that lets i ahve (7,4) hamming code and i made transpose of parity check matrix H(t). Now say my code word was Y="1001000" now i need to find the error i know the procedure that you compute syndrome by  Y.H(t) and i get 110 now i know from the table my error is "e=001000" and i can go on to correct the third bit my question is how do you compute "e" if you cannot have a look at the syndrome table in other words what is the formula to compute "e" when you only have your code word and your H(t) matrix and you cannot correspond to the syndrome table? If it is stupid pardon me.
Thanks anyways.
Comment: Have you looked at [the first question on the *related* menu?](http://math.stackexchange.com/q/80472/11619)
Answer: if you have the matrix $H$  then you can find all codewords and will build the table of syndroms.
Comment: I do have matrix H now i already have table of syndroms but i want to compute e with our it ? No when i multiply my code word Y with H(t) i get 110 my code word was 1001000. now can i compute my error just with this information? or can you may be guide me a bit further?
Answer: There is no such thing as a stupid question, and this question is actually an important question in coding theory. Your problem is in fact equivalent to the "decoding problem," i.e. you want to find the transmitter codeword $x$ given that you have received $y$ (As once you know $e$, you can get $x = y+e$ and vice versa). The optimal way of doing this (to minimize the block error probability) is to choose the most likely transmitted vector $x = Gs$ given that what you have received is $y$. Due to its various symmetries, this becomes a rather straightforward task in the case of a Hamming code. In a general code with a general parity check matrix, there is unfortunately no easy way of doing it: You will have to calculate the probabilities $p(s_i|y)$, where $s_i$ are your possible data-words, and choose the $s_j$ that maximizes this probability. In fact, the only reason as to why there are different (suboptimal) decoding algorithms (such as the message passing algorithms for LDPC codes) is that the optimal decoding procedure described above is a very difficult (computationally expensive) task.
Comment: First Thanks... I understand you partially that if you cannot have look at the syndorm table you can compute e by choosing most likely now coming back to the example i quoted above i get Syndrome =Y.Ht= 110 now till this stage i know how i get there then there they compute e whcich is equal to =0010000 now i can compute this by syndrome table but how can i reach to this figure say if i do not have a syndrome table.Only for hamming codes at the moment. I might frustrate you but i always try to understand concepts with example since i am always been a slow learner :(
Thanks anyways
Comment: Oh i juts solved it thanks a lot but i guess now i am gonna post a new question. :) regarding extended hamming code

Hamming Code Error Detection


Track of account records into alternate contact (custom object) records

Question: We need to track any change in billing Address ( address,city,state,zip)  of Account in a new Object : ÄLTERNATE CONTACT  (Address, City,State, Zip, UpdatedDateTime, Account) .  This object should only store unique address information. If the same address already exists in Alternate contact, just update "UpdatedDateTime" field without creating a new record.Only required on after update trigger
Comment: Any help would be much appreciated!!
Comment: what problem are you facing?
Comment: it seems that you know what to do, a trigger on account after update, so I'll ask the same as Mr.Frodo : what problem are you facing ? What did you try so far ?
Answer: I'd put something like this in the trigger :
<code>List<Id> ids = new List<Id>(); //ids of accounts with watched fields modified
for (Integer i=0; i<trigger.new.size(); i++) //foreach account
{
  if ( //if one of your fields is modified
       (trigger.old[i].address != trigger.new[i].address) ||
       (trigger.old[i].Zip != trigger.new[i].Zip) // || etc. with all field u want
     )
     {
        ids.add(trigger.new[i].Id); //keep track of its id
     }
}
if (ids.size()>0) //if u got accounts modified
{
  AlternateContact__c[] altCts = [Select Id, UpdatedDateTime__c from AlternateContact__c where AccountId__c in :ids]; //select alt contacts linked to these accounts
  for (AlternateContact__c ac : altCts) { //for each of them
    ac.UpdatedDateTime__c = DateTime.now(); //update the date
  }
  update altCts; //save your changes
}
</code>
Please have a look at https://salesforce.stackexchange.com/help before you post your next question. This one lacked details.
Edit after your comment :
If I understood you need to

Query all fields on your AlternateContact__c object related to account
Check if all the fields (except id of course) match your new address
if it does update date
if it doesn't create new AlternateContact__c

I can see nothing hard in it, you just have to adapt the code I wrote up there.
Comment: Actually, I want to write a trigger on account object so that when account's address is updated with a new address then its old address record is created in alternate contact object. But when the account address is updated with any of the previously created alternate contact address records then the UpdatedDateTime__c field of that alternate contact record will be updated with the current time without creating any new alternate contact record. Thanks in advance.
Comment: First I would'nt call "contact" an object supposed to represent an address since contact is already a totally different object in Salesforce.
Comment: alternate contact(alternate_contact__c) is a custom child object of account.
Comment: yes I got it, as you can see if you look at the code (and understand it) I wrote. If my answers are not enough I'm afraid you should start with learning https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm  or https://trailhead.salesforce.com/ : I can't do more or I'd have to bill you ;)


PDF reader and trusted identities

Question: Acrobat Reader has a nice feature "manage trusted identities" that allows to import CA certificates to validate the signature on a document.
Is there an option to define trusted identities in the Android version of the reader (or in any other free pdf reader for android)?
Answer: [Disclosure: I work for CoSign]
I just viewed a digitally signed PDF in Adobe Reader for Android version 10.6.0.
Unfortunately, it does not appear that the app will verify the digital signature. It does display the graphical representation of the signature, but there is no Signature Panel and no message about the signature's verification status.
Hopefully they'll add that feature to the mobile version someday.
Please submit your own answer to your question if you find any Android software that will verify a digital signature.
In the meanwhile, you could roll your own solution if you're willing to write an app. See the Signature API guide at www.arx.com/api for info.
Or you could use CoSign Web App, Box or Google Drive. All of those apps work in mobile and include integration with CoSign. By opening the doc in CoSign, you'd see the doc and its signature verification status. See screen shot below.

PDF reader and trusted identities


Does construction stop after a raid

Question: In clash of clans, my friend told me 'If you are upgrading a town hall, and you are raided, it stops and you lose all the resources'. I was wondering if he was telling the truth or not. If anyone can help me, please! I don't want to risk it.
Answer: Your friend is obviously not telling the truth and i speak from experience.
I currently have my Town Hall being updated from Level 9 to 10 which takes well over a week. it is positioned in a spot so most attackers will aim for it and allow me to loose trophies but my resources are kept safe.
Since I am attacked on a daily basis, the times where the attacker as only been able to steal resources from my Town Hall the results show they have only obtained 1,000 Gold and Elixir, the same amount it has always given up when totally destroyed. while i normally have stored 2,000,000 as i build up for upgrades, if i lost all my resources just because the Town Hall was being upgraded then i wouldn't ever have enough to upgrade by Wizard Towers during an upgrade
Also, as i only check in once a day it being destroyed does not stop the construction since if that was the case then i wouldn't see roughly a day's progress done on my Town Hall Upgrade
Comment: I think when the question states `you lose all the resources`, what they really mean is "all of the resources the Town Hall has to offer" or something to that effect. Not "all of the resources in your village ignoring all limits that attackers normally encounter when raiding resources."

Does construction stop after a raid


SQL Server 2008R2 - how to install replication components

Question: I am trying to install the Replication components for SQL Server 2008R2, on technet website it says:

On the computer that is running IIS, insert the SQL Server 2008 R2, SQL Server 2008, or SQL Server 2005 CD and run Setup.exe.
In the SQL Server Installation Wizard, on the Components to Install page, click Advanced.
On the Feature Selection page, click Client Components, and then click Connectivity Components to install the SQL Server replication components

But the CD is lost, is there anyway to download the components or the setup files online?
<code>Select @@version

Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
</code>
Comment: Do you have the installation keys with you ?
Answer: You might get away with using the eval ISO.
Try download that, burn it to a disk (or mount it by other means) and see if it will cooperate. It'll certainly contain everything, assuming it is as happy to be used to update your licensed install as it is an eval one.
EDit: I've removed the link as it was incorrect. It looks from trying to search on their site that SQL 2008r2 eval isn't available direct from MS any more. You might be able to find it elsewhere though.


How and where to add google analytics tracking code?

Question: Creating a single page responsive site in drupal 7.While trying to enable google analytics module,came through certain doubts. While registering our site with google analytics they gave us a tracking id (a js snippet)
Can anyone tell me after enabling module is it necessary to add the snippet ?
If its necessary ,then where to add the snippet in which .tpl file in drupal?
Answer: Easiest and most admin-friendly way is to use Google Analytics module:

Adds the Google Analytics web statistics tracking system to your website.

Just install it, turn it on and configure.

(source: drupal.org)
Comment: @NijiMonachan also, and I know how it sounds, **be sure to clear caches**. If Drupal has page without GA in cache, GA will not work, simple as this.
Comment: Thanks Molot for your response .After enabling and configuring the google analytics module ,and signing up with google analytics,showing an message as tracking not installed. Hoping we don't need to paste the snippet code in any of .tpl files!!
Comment: @NijiMonachan give Google couple of hours. It's servers are busy, they don't keep a real-time eye on your site to know if you did it or not. Next time they'll have a glance, they'll tell.


Synchonising Phonegap app data between ipad and iphone

Question: I have a Phonegap app on the App Store. I am very confused as to how to allow the following senario - a user has a copy of the app on his ipad, he writes to the sqlite database, these changes to the database are synchronised with his copy of the app on his iphone.
Looking at the Phonegap documentation - I  can set
preference name="BackupWebStorage" value="cloud"
in config.xml - so this backs up the database to icloud. Is this all I need to achieve what I am after?
Answer: Quoting the Phonegap documentation here,

j. BackupWebStorage (string, defaults to 'cloud') - valid values are
  'none', 'cloud' and 'local'. Set to 'cloud' to allow the web storage
  data to be backed up to iCloud, and set to 'local' to only allow local
  backups (iTunes sync). Set to 'none' to not allow any backups of web
  storage.

So specifying value="cloud" in the config.xml allows iOS to back up files from the documents directory to iCloud. It is the developers duty to fetch back any information from iCloud that was backed up from an earlier or another installation. See  this .
Comment: I think he is asking about the "It is the developers duty to fetch back any information from iCloud that was backed up from an earlier or another installation." part. How can that be achieved?


Synonyms of the loanword "cum"

Question: Is there any other word to express A-cum-B instead of using "cum"? I don't want to use "cum" as it may cause unwanted laughingstock.
Comment: It's not really clear what you mean here.  Can you explain in what way you're linking A and B? More context will allow for a better answer here.
Comment: A union B maybe? I'm not sure of your context though, so I can't be of much help there. Please elaborate the question with context so you get better tailored answers.
Comment: For example, HR manager-cum-General manager
Answer: With the unfortunate modern connotation, it may be better just to omit the word. Instead of using studio-cum-office, just use studio-office. It will be understandable.
Answer: The meaning of cum in this sense is "combined" or "with" (from the Latin for "with").
For example a workshop-cum-garage.
Some other ways of expressing that could be:

A combined workshop and garage
A combined workshop/garage (you would pronounce this "a workshop slash garage")
A combination workshop/garage
A workshop/garage
A workshop that doubles as a garage

etc

Synonyms of the loanword "cum"


Estimating direction from a distribution on a circle

Question: Let there be $n$ points on a unit circle. It is known they come from "normal" distribution around particular unknown direction (i.e. sum of 2 "normal" distributions on circle - one centered at point $p$ and the other at its opposite $-p$).
What is the best way to estimate this direction? By best I mean an algorithm that is a. analytical, b. efficient and c. simple.
Comment: you might enjoy looking at: http://en.wikipedia.org/wiki/Von_Mises_distribution
Answer: This seems too simple to be true, but, combining some of the ideas posted earlier,
I think you could just interpret the vectors as complex numbers and take the RMS.
Squaring will turn the bimodal distribution into a unimodal one.
Then the square roots of the mean should give a good estimate of the modes of the original distribution.
Comment: That's a good answer Niels, and I believe it will work quite well in this case. One trouble I see is that by squaring you have multiplied the 'noise' (if you like) by 2.  So, I think that this estimator will be *consistent*, but not *efficient*.
Comment: Actually, I lie.  In this case, I think this is exactly what you want to do!  I recommend this answer be marked as correct.  My answers can just be considered as advertising for the important and interesting the field of circular statistics.
Comment: In principle the stretching of the squaring is undone by the shrinking of the square root. I do see a potential problem with the arithmetic mean getting smaller in absolute value, especially if the distribution is rather flat, but I don't think that's a linear effect, is it?
Comment: I think, due to the symmetry, it essential does act in a linear way. I'm pretty sure I can describe very accurately how well your estimator will work. I'll post this as an(other) answer a bit later.
Comment: Niels, thanks a lot! I didn't know the RMS concept. If i did it might ring a bell. It's indeed THE best answer in the sense i asked for.
Answer: The standard way to solve this is to just consider each of your data points as unit vectors, then take the average of those unit vectors.  The direction of this averaged vector is the estimated direction.
There is a large literature on this topic which generally goes by the name of directional statistics. The seminal text on is Mardia and Jupp's book Directional Statistics. This field has a huge number of applications in astronomy, biology, meteorology, engineering etc.
Comment: What would happen if you make a new circle by identifying opposite points on the original circle, and then take the average as suggested in this comment? (I haven't checked, so this may have an obvious reason for not working.)
Comment: The summation works in the case the direction is "signed" i.e. not symmetrical around 0.
In my case this wont work: e.g. if there're 100 points at $p$ and 100 points at $-p$ their sum will be 0...
Thanks for useful link, though.
Answer: Ok, so now I will describe why Niels's estimator works so well. Take a bimodal and symmetric circular density function $f$ with modes $p$ and $-p$ (we will assume that $p$ is positive) such as the one plotted in my previous answer. Let $\Theta_1, \Theta_2, \dots, \Theta_N$ be $N$ observations drawn from $f$.
Niels's estimator first computes the complex numbers $e^{i 2 \Theta_n}$ and takes their average
$$ \bar{C} = \sum_{n=1}^{N} e^{i 2 \Theta_n} .$$
The estimate, denoted $\hat{p}$, is given by taking the complex argument of $\bar{C}$ and dividing by 2, that is
$$ \hat{p} = \frac{\angle{\bar{C}}}{2}$$
where $\angle{\bar{C}} \in [0,2\pi)$ denotes the complex argument. The next theorem describes the asymptotic properties of this estimator. I use the notation $\langle x \rangle_{\pi}$ do denote $x$ taken to its representative inside $[-\pi, \pi)$.  So, for example, $\langle 2\pi \rangle_{\pi} = 0$ and $\langle \pi + 0.1 \rangle_{\pi} = -\pi + 0.1$.

Theorem:
  Let $\lambda$ denote the difference $\lambda = \tfrac{1}{2}\langle 2\hat{p} - 2p \rangle_{\pi}.$
  Then $\lambda$ converges almost surely to zero as $N \rightarrow \infty$ and the distribution of the normalised
  difference $\sqrt{N}\lambda$
  converges to the zero mean normal with
  variance
  $$ \frac{\sigma_s^2}{c} $$
  where
  $$ \sigma_s^2 = \int_{-\pi/2}^{\pi/2}\sin^2(\theta) f(\langle \theta + p \rangle_\pi) d\theta \qquad \text{and} \qquad c = \int_{-\pi/2}^{\pi/2}\cos(\theta) f(\langle \theta + p \rangle_\pi) d\theta. $$

The definition of the difference $\lambda$ might seem a little strange at first, but it is actually very natural. To see why note that $p$ and the estimate $\hat{p}$ are both in $[0,\pi)$ but, for example, if $p = 0$ and $\hat{p} = \pi - 0.01$ then the difference between these is not $\pi - 0.01$, because the two modes are actually very close to aligned in this case. The correct difference is $\lambda = \tfrac{1}{2}\langle 2(\pi-0.01) - 2 \times 0 \rangle_{\pi} = 0.01$.
The proof of this theorem follows from a very similar argument to Theorem 6.1 (page 87) from my thesis. The original argument is due to Barry Quinn. Rather than restate the proof I'll just give you some convincing numerical evidence.
I've run some simulations for the case when the noise is a sum of two weighted von Mises circular distributions with concentration parameter $\kappa$.  So, when $\kappa$ is large the distribution is concentrated and looks something like the picture on the left below ($\kappa = 20$ in this case) and when $\kappa$ is small the distribution is quite spread out and looks something like the picture on the right below ($\kappa = 0.5$). We obviously expect the estimator to perform better when the distribution is quite concentrated ($\kappa$ is large).

(source left) (source right)
Here are the results.  The plot below show the simulated variance of $\lambda$ after 5000 trials (the dots) versus the variance predicted in the theorem above for a range of values of $\kappa$ and number of observations $N$.  You can see that the theorem does a very good job of accurately predicting the performance if $\kappa$ isn't too small.
 (source)
There is still an open question as to whether this is the best estimator (in the sense of maximally reducing the variance of $\lambda$). It would be possible to derive a Cramer-Rao bound for this estimation problem to give an idea of the best possible performance of an unbiased estimator. I suspect that this estimator performs very near the Cramer-Rao bound. So, in that sense it is close to best possible.
Comment: It seems your thesis quote may  precede usage by Laurence J. Peter,

http://www.wordwizard.com/phpbb3/viewtopic.php?f=16&t=19330

but there is some question owing to the many books he wrote

http://en.wikipedia.org/wiki/Laurence_J._Peter
Comment: Oh yes! I much prefer Herman Wouk's ryhming version ''When in danger or in doubt, run in circles, scream and shout'' anyway. Thanks!
Comment: Eternal Vigilance is the Price of Liberty.
Comment: Robby, thanks for your exceptional and insightful comments! I'm lucky to stumble on a real expert in this field!

However let me point to you that this last comment doesn't deliver what's promised in one of the comments above (ie. explain WHY Niels' estimator is good). Rather it provides rigorous definition of it + simulation results. For the real explanations (proof of the Theorem) the reader is referred to you thesis :)

Of course it is incorrect for me to expect the full answer in a page or 2. If i'll need to address more similar questions i'll surely take a read of all the links.
Answer: I see now that Andrei would like to know what to do when the distribution has 2 modes and is symmetric about these modes. It seems better to just give a second (more detailed) answer rather than complicate the simple answer I gave above (basically I think the idea in gowers comment above is sound, but it's a bit tricky to actually implement).
So, how do we deal with estimating the 'mean direction' of a distribution that looks something like:
     (source)
Good questions at this point are ''what is mean direction anyway?'' and specifically for the distribution above ''does a mean direction even exist?''
This has been a question I have been looking at a few months now. I'm wary of blowing my own horn a bit here, but I am going to attach a part of my thesis which I think gives satisfactory answers to these questions (I would love to give you the whole thesis, but it's not quite ready for the public to see). I suggest that there are (at least) two different, but equally reasonable and intuitive definitions of mean direction. I argue that the distribution above has no mean in a rigorously definable sense for both of these definitions.
Given $N$ data points $\Theta_1,\dots, \Theta_N$ on a circle there exist very accurate and efficient O(N)-time algorithms to estimate both of these means if they exist. Neither algorithm will converge if used on circular data drawn from the bimodal distribution above as (according to my definition) the means do not exist.
Still, given $N$ data points $\Theta_1,\dots, \Theta_N$ drawn from the bimodal distribution above, if what you want to do estimate one of the ''modes'' rather than the mean direction, then my gut tells me that there probably are efficient and accurate algorithms to do this, although I don't know if they exist in the literature. You could try Fishers book The Statistical Analysis of Circular Data.
Comment: Robby, mostly I want to know how to post a drawing of a peanut.
Comment: Hi Will, I use metapost. The actually data for the pdf (it's a weighted sum of von Mises distributions by the way) comes from a java library (unfortunately) and then the plotting gets done by metapost.  At some point I plan on releasing all of the code I have for simulations and plotting under the CRAPL http://matt.might.net/articles/crapl/. However, at the moment I feel the code is even too crap for the CRAPL :(
Comment: @Andrei: If you have further questions, feel free to send me an email.
Comment: Between Will's comment and your comment talking about "CRAPL", I'm laughing quite hard indeed.
Comment: Robby, release all the code. If it loves you, it will return.
Comment: I will Will, I will. Just give me a little time.


Rotate views results based on number of times viewed

Question: I have 10 images that I want to rotate within a views consisting of 6 viewable slots (my Views results). I want to rotate the 10 images so that each recieves (approx.) an equal number of views. The Node Statistics option added as a Sort Criteria does not work for this because you have to actually open and view the node itself for the counter to increment. What I want is for the counter to increment each time the images are shown from within the view.
Answer: IMHO I don't think that you will be able to find a module that does this. You will need to write custom code for that. Depending on how comfortable you are hacking with Drupal and PHP you might find it trivial or very difficult.
So here are the requirements:

The counter must persist between page renders, so you need to store it in the database. A CCK field (D6) or "just" field (D7) will do the trick. You would assign this new field to your image content type.
This is a View. So how could you write to CCK field when rendering a View? The answer to that is preprocessors. How to write preprocessors is beyond the scope of your question. So is how to write to a CCK field. You can look for that answer in other Stack Exchange questions and the main Drupal site.
On your View, you would then sort the images by this "counter field".

That should do it.
Comment: Thanks for the help. This sounds interesting but unfortunately I think that this is beyond the scope of my ability. Im willing to pay somebody to create this for me. If anybody is interested please get in touch.
Answer: You can get your first part of displaying 6 of your 10 pictures an approx. equal amount of time by limiting the display to 6 and sorting them with GLOBAL RANDOM.
That will just randomize the order and pick the first 6.
To your second part, that will require a lot more work, but could be done in a views theme template and a whole bunch of nodeapi()ing where each time a picture is displayed, a field is autoincremented and resaved back to the node.


"I know it" vs. "I know this"

Question: What is the difference between these two phrases: "I know it" and "I know this"? One explanation I found is that "it" means what you perceive and "this" is more abstract. Is it so?
Comment: I don't think the explanation you found is correct, but I also can't figure out the difference myself.
Comment: In this context, "Is this so?" seems more natural to my (American) ear than "Is it so?".
Comment: It would've been more helpful with context
Answer: It is not possible to say with any certainty what the nuanced differences might be.  Here are some plausible uses:
She's taking money from the till, I know it! There should be more money here. We've had a busy day.
or:
I know this (or This I know): when you're serious about going to medical school, you don't party every weekend.
Answer: For I know it, this is used more often in the past tense:

I knew it! He seemed strange from the beginning.

It is a confirmation of some suspicion or idea.
In the present tense it is pretty literal.
For I know this:

I can't believe that I could not repair the car. I know (how to do) this.

meaning you know how to repair the car but for some reason you couldn't. In this case it is an expectation of ability.

"I know it" vs. "I know this"


If Earth had no atmosphere, how many people would be killed by meteors every year?

Question: Suppose those people engage in similar activity, walking on surface etc.
Comment: What then about people killed by not having air to breath?
Comment: @Hohmannfan your new name is "Mr. Buzzkill." :-) .  Just try to pretend for a moment that we are all  gigantic tardigrades.
Comment: "If you can dodge a ball you can dodge a meteor"
Answer: Three millions.
For this answer to be any fun, let's first assume that before removing the atmosphere, we have equipped all humans with oxygen supplies. In return, they are not allowed to go indoors or otherwise protect themselves.

The size of meteors — as well as most other things in the Universe — has a distribution that is well described by a power-law. The larger the meteor, the rarer they are.
Small meteors can be lethal only by a direct hit, while large meteors in the real world can be lethal due to the effect they have on the environment; dust can cover the sky for years and prevent the Sun from keeping us warm. However, since we have removed the atmosphere, the debris will fall down immediately, and the only way to kill us is by the explosion. But, as will be shown below, the dangerous ones are the small ones because the rate at which large ones falls off so quickly.
The number $N$ of meteors entering Earth's atmosphere every year with a diameter $D$ (measured in meters) or larger is given by (Brown et al. 2002)
$$
\frac{N(>D)}{\mathrm{year}} \simeq 37 \left( \frac{D}{\mathrm{m}} \right)^{-2.7}.
$$
Minimum size needed to be lethal
What makes a meteor lethal is really outside astronomy, and someone may be able to come up with a better answer, but for the sake of the argument, let's assume that the energy needed to kill a human by a direct hit is equal to the energy of a bullet fired from the world's smallest firearm, the 2mm Kolibri, which has a muzzle energy of $E_\mathrm{lethal} \simeq 4\,\mathrm{J}$.
Earth orbits the Sun at 30 km/s. Depending on the direction from where the meteor arrives, it will have different speeds, but it will at least enter with the escape velocity of Earth, i.e. 11 km/s, and a typical speed is $v_\mathrm{impact} = 17\,\mathrm{km/s}$ (Marcus et al. 2010). Thus, the minimum mass to kill by a direct hit is as small as
$$
m_\mathrm{lethal} = 2 \, E_\mathrm{lethal} \, / \, v_\mathrm{impact}^2 \simeq 30 \,\mu\mathrm{g}.
$$
At an average density of 4 g/cm$^3$, this means that a small grain of a diameter of 0.2 mm will kill you. According to the formula above, the number of such grains (or larger) that hit Earth every year is $2\times10^{11}$.
Since the surface area of Earth is 510 million $\mathrm{km}^2$, that's $n_\mathrm{hits}\sim5\times10^{-4}\,\mathrm{hits}\,\mathrm{m}^{-2}\,\mathrm{year}^{-1}$.
Some 7 billion people live on Earth. They each occupy roughly $1\,\mathrm{m}^2$ (and weren't allowed to protect themselves, remember), so in total they occupy an area of $A_\mathrm{folks,tot} = 7 \times 10^9\, \mathrm{m}^2$.
Thus, the number of people being killed by direct hit meteors every year is
$$
N_\mathrm{kill} = n_\mathrm{hits} \, \times \, A_\mathrm{folks,tot}
 = \mathbf{3\,million\,year^{-1}},
$$
or one person every 10 seconds.
Death by explosion
How about non-direct hits? Let's assume that the minimum size to kill you would have an energy equal to that of a hand grenade holding 100 g explosives, and that you're killed if it hits within a few meters of you, so that you "occupy" 10 m$^2$. Similar to above, you can work out that this corresponds to a meteor of ~1 cm being lethal, and that the rate at which such meteors is only $2\times10^4$ per year, so only 2-3 people would be killed in this way. Even larger explosions are even more rare. Thus, the probability of killed by a explosion is negligible compared to direct hits, so the final answer would be the above, i.e. 3 million per year.
Conclusion: Let's not remove the atmosphere.
Comment: That's awesome, also relevant for colonizing the moon and maybe Mars, but meteors hit those 2 bodies on average a little slower.  I think many 4J. impacts would simply leave a thin hole in a person and not be fatal, the heat, perhaps cauterizing the wound (perhaps not) but small punctures would close more quickly, less bleeding out.  Impacts wouldn't be fun but I think fewer than 3 million would be deadly.   And, I love your answer!!!  XKCD worthy.
Comment: Thanks @userLTK. And yes, I think you're right, I probably overestimated the death rate. It's also dubious whether the N-D relation can be extrapolated to such small sizes.
Comment: @CarlWitthoft: Regarding the "hits that don't kill", I assumed that since they're not allowed to go indoors, including the hospital, treating exsanguination is so difficult that we can assume that most hits result in death.
Comment: Great answer to this Fermi problem. Just a small note, you might want to specifically inlude in your units for $n_{\mathrm{hits\:per\:area}}$ a $\mathrm{year}^{-1}$.
Comment: I think your $1 m^2$ coverage only applies to those who are lying down (and in certain cases, that applies to a pair of people lying down heh heh).  People standing up have a cross-sectional area closer to roughly $ 0.3 m^2$  I would guess.  And if a meteor only hits our shoulder or toes, that would hurt but not kill us.
Comment: Thanks, @zephyr, that's included, and propagated to the result (I also had an error in the "per area" unit, which was written as m$^{-1}$).
Comment: @CarlWitthoft: But the meteors don't just come from above, but also from the front and back. They probably come _more_ from above, though, because gravity will make the paths more vertical. I'll let the 1 m$^2$ as an order-of-magnitude number, and then people can use the formulae with preferred numbers.