While your code may be fine, I find it weird to see functional operations in the same expression as the ASCII code '0' (48). It is a very weird juxtaposition of abstractions.
Last weekend when the NSA news was a big deal, I was angry, I wanted my privacy back. I use all the standard stuff (like opt-out, Ghostery, etc). Using https for my emails with Google is great, unless they just send my plain text data to the NSA on request. So I looked around for a safe way to email. OMG was it hard. I had to install all kinds of stuff, find out how it works, and alot of them required the receiver of the message to also have said software. Yeah, if its that hard, no thanks. So I made this in one weekend. Alas I didn't have SSL (encryption) on my domain. And it took a week to change servers, get a dedicated IP and install the SSL. Anyway here it is. Create your message, send your friend the link to your message however you normally would, and they (only them) can see the message. No Google saving your data, and once your message has been viewed its deleted. Nothing for the NSA to even ask for. I realise the message creator is geared towards web developers, version two would ideally contain a more friendly text editor.
* no encryption, just indexed by a hash -> that means the messages are not store encrypted on the server
I would recommend people stay away from your solution, and instead use something like Zerobin: http://sebsauvage.net/paste/
It encrypts everything using SJCL, and if I am worried with the server sending me a modified version of the JS code, I can still keep the code on my own computer but use it to send to the server.
Well would you believe that it is not uncommon for one or two people to die on a cruise? I went on a 10 day cruise a few years ago and three people died on it. They chucked 'em in the fridge and carried on the trip like it was normal.
Yeah, that makes sense. The US annual death rate is 8.39 per 1000[1]. The newest ship in Carnival's inventory holds up to 3,690 passengers[2]. I can't find crew capacity, but some googling suggests there ought to be more than 1000 crew on a loaded cruise that size.
So if you're floating around with 4690+ people, naïvely, about 39 people should die on it every year, or one every 9.28 days.
On a 10-day cruise of that size, somebody is going to die. I bet once you control for the unusually high average age of the passengers and maybe other factors (how many drunken idiots fall over the side and drown every year?), 3 people in 10 days would be pretty normal.
The drunken idiots falling over the side and drowning don't usually get found. As far as I remember, the odds of being found after falling off a cruise ship are really low.
You would think so but no. Visa etc and the banks don't want that kind of trouble. To charge cards you need a special bank account called a merchant account.
A condition of this merchant account is that if someone issues a charge-back on their creditcard, if the merchant can't prove that the card owner brought the service/product then the funds are taken directly form their merchant account by the bank and then given back to the card-holder.
This is why anti-fraud systems are so important to merchants.
Case: I steal your creditcard, I buy a tv worth $10, 000.
You notice this, and chargeback the merchant.
The merchant has to pay you $10, 000 and he lost teh cost price of the tv he sold me (say $7, 000).
So by accepting your stolen card as payment, the merchant just lost $17, 000!
You could also say the total loss is 10K to the merchant, assuming he has a reasonable expectation of making that 3K profit...that is getting a little abstract about it though.
I think they're counting the loss of the merchandise. So a chargeback for a $10,000 TV would be like losing $10,000 plus whatever the cost of the TV was for the store.
Not when you could have sold the TV for $10K. This is the shoplifting issue; the shop loses both the product and the potential profit on the product.
It gets a bit existential e.g. can you lose what you never really had? But even if you fall on the NO side of that, the cost of re-obtaining a product is not zero.
Like everyone else said, it's not exactly that. It's like getting paid $10k in exchange for a TV, then giving it back but not getting the TV back in return.
3. Store pays chargeback. -$10000' subtotal: -$7000
You can't double count the TV, and IMO, you can't count the potential profit loss either, as that's covered once the store buys a replacement TV for inventory. There are fees on top of the above, but the store is out the COGS and fees, not double the COGS, plus the margin.
static bool IsValidLuhn(string numbers) { if (numbers == null) throw new ArgumentNullException("number", "number must have a value.");
var allNumbers = numbers .Where((c) => c >= '0' && c <= '9') .Reverse() .Select((c, i) => (i % 2 == 1) ? ((Convert.ToInt32(c) - 48) * 2).ToString() : c.ToString());
return allNumbers.Count() > 0 ? allNumbers.Aggregate((x, y) => x + y).Sum((c) => Convert.ToInt32(c) - 48) % 10 == 0 : false; }
Edit: Can sum one link me to HackerNews markdown?