The part of regex
[\w\.-_]
should really be [\w\.\-_]
instead.But not that's not what caused the problem mentioned in this post.
(edited for clairifcation)
HN user
The part of regex
[\w\.-_]
should really be [\w\.\-_]
instead.But not that's not what caused the problem mentioned in this post.
(edited for clairifcation)
I tried out your command and got different line count compared to the output of the commands mentioned in the post. The man page for comm says it assumes inputs to be pre-sorted. To do that, you need to sort the input files before passing them to comm.
# show only items in both a and b
comm -1 -2 <(sort -u a_list) <(sort -u b_list)
# show only items unique to a
comm -2 -3 <(sort -u a_list) <(sort -u b_list)
# show only items unique to b
comm -1 -3 <(sort -u a_list) <(sort -u b_list)Clicking the link below creates a new imgur URL:
http://imgur.com/upload?url=https%3A%2F%2Fnews.ycombinator.c...
Perhaps someone had included a URL like the one above in some wordpress template.
Get a copy of Merriam Webster's Visual Dictionary and just go through its approx. 1000 pages of high-quality illustrations. It efficiently introduces you to countless tip-of-the-ice-berg topics/industries that are very much remotely related to tech. It humbles you and evokes that feeling of self-insignificance like when you look at aerial view of cities through an airplane window.
Thanks for the link. Awhile back, I had implemented an n-bit cipher (where 1 <= n <=64) with an unbalanced Feistel network and used hash function as the basis of the round functions. I then wrap it within a cycle-walking function to form a cipher for any number smaller than 2^64. I did all this so I can generate scrambled 5-char path IDs of short URLs (e.g. test.com/xA7bc) with domain size of 62^5.
+1 for skip32.c since it's O(1) space and O(1) time. With the prime approach, you may need to call it multiple times to reject numbers greater than 2^32-1. Also, a generalized Feistel algorithm may be used to generate permutations with fewer than 32 bits with the same constant space/time requirement and may be helpful in skipping specific IP ranges.
It's actually more of a hack to deal with malformed GIFs and goes directly against spec. To address GIFs where each frame has a 0 frame delay, most GIF decoders implement a minimum frame delay value.
See: http://nullsleep.tumblr.com/post/16524517190/animated-gif-mi...
Edit: This is what it looks like with all frame delays set to 2 centiseconds: http://i.imgur.com/24xpZEd.gif
On Chrome and Firefox, you should see it animate more quickly.
Non-consumable in-app purchases are restorable on any iOS device you can sign in with your iTunes account. When you buy a new iOS device and use StoreKit's restore transaction feature, Apple will generate a new receipt with UDID of that device. In-app purchases are tied to your iTunes account whereas embedded UDIDs are tied to devices you sign in with your iTunes credential.
The UDID embedded in receipts prevents/deters people from sharing them with others using MITM techniques. Sharing does happen and Apple's article helps address that issue.
Apparently, with the lipo tool, you can still support iOS below version 4.3 and Apple won't reject it.
One use of UDID is verifying in-app purchase receipts. It's demonstrated in the sample code associated with Apple's article titled "In-App Purchase Receipt Validation on iOS".
See: https://developer.apple.com/library/ios/#releasenotes/StoreK...
Lowercasing the first character--by itself alone--does not address inverted case scenario (e.g. "PaSsWoRd" and "pAsSwOrD" evaluate to "paSsWoRd" and "pAsSwOrD" respectively).
One way to resolve that issue is to create two versions of the password (one with normal casing and one with inverted casing, but both with the first character lowercased), sort them, and pick the first result.
["pAsSwOrD", "PaSsWoRd", "PAsSwOrD"].map(function canonicalize(pwd) {
function invert(str) {
return (str == str.toUpperCase()
? str.toLowerCase()
: str.toUpperCase());
}
var head = pwd.substring(0, 1).toLowerCase();
var tail = pwd.substring(1);
var vers = [head + tail,
head + tail.split("").map(invert).join("")];
return vers.sort()[0];
});
Which gives the following result: ["pAsSwOrD", "pAsSwOrD", "pAsSwOrD"]
The three different variations get canonicalized into one version. With it, you can just store one hash instead of three.There's a bug in the first optimization example. Specifically, class "point"'s "up" and "down" methods still reference the "move" method as "move" instead of "b". It can be fixed by replacing the original statement "p.move(10)" with "move.call(p, 10)" for the "up" method (and similarly for the "down" method).
Despite the bug, I think it illustrates a good point. You can adopt a specific coding style that help you achieve higher level of minification/obfuscation.
It would be nice if languages like TypeScript can perform this transformation for you.
I'm not sure what you mean -- Facebook disabled the iframe approach long ago.
For the many-small-repo scenario, I use this technique to host multiple projects under one Github private repository:
http://stackoverflow.com/questions/1384325/in-git-is-there-a...
Instead of creating a repo per project, I create a orphan branch within a shared repo for that project. The benefit of this approach is that you can always cleanly export the commits into its own repository without altering SHA ids. The con is that you have to pick separate branch names for each project (e.g. proj1-master, proj2-master).
I agree. I recall when Facebook Connect was first introduced, it provided websites the ability to let non-logged-in users to login to Facebook via an inline iframe. (the experience is pretty much same as Stripe's button's approach). Facebook disabled it shortly after for the reason that I think it's pretty obvious: one can easily create an iframe login form that pretends to be from Facebook and use it to phish login credentials. Instead of using iframe, Facebook now popups a window to prompt user for login credential and app authorization. I believe it will only be a matter of time before Stripe abandon this inlined approach and switch to a popup-based solution; otherwise, they will likely jeopardize their brand/trust when malicious people start to spoof their payment flow.
What's broken is this: when you make a POST request to a server that omits the Cache-Control header, iOS 6 caches that response by default. That behavior violates the HTTP spec.
RFC 2616 Section 14.9.1 states:
14.9.1 What is Cacheable
By default, a response is cacheable if the requirements of the
request method, request header fields, and the response status
indicate that it is cacheable.
Section 9.5 (for the POST request method): Responses to this method are not cacheable, unless the response
includes appropriate Cache-Control or Expires header fields. However,
the 303 (See Other) response can be used to direct the user agent to
retrieve a cacheable resource.
Responses to the POST request method are not cacheable by default according to the spec.Another connection related issue is that iOS 6 cache responses of ajax POST requests. http://news.ycombinator.com/item?id=4550441
Two of our iOS apps broke because of this bug. This is a huge breaking issue. Two known workaround: 1.) appending random query value to the request URL and 2.) update the web service to set "Cache-Control: no-cache" in the response headers for POST requests (perhaps this affects PUT and DELETE requests as well).
Okay, I was able to confirm sergeo's statement. Here's what I did:
1.) I compiled my app with a 4-inch default image using XCode 4.4.1 with iOS 5.1 as the base SDK and ran the app in Xcode 4.4.1's iOS simulator.
2.) I copied the resulting i386 app folder from /Library/Application Support/iPhone Simulator/5.1/Applications/[app uuid] to /Library/Application Support/iPhone Simulator/6.0/Applications/
3.) I started XCode 4.5's iOS Simulator and ran my app from Spring Board.
The result? It did work. I was able to see my Xcode 4.4.1-compiled app in 4-inch display mode.
I can't say for sure if this will work on the iPhone 5 hardware, but I'd bet the answer is yes.
I guess with this finding, if you're not using any iOS 6.0 features, it may be better to continue to compile your app using Xcode 4.4.1 since that lets you more easily produce app with armv6 support.
Do you know how to run Xcode 4.4-compiled binary in Xcode 4.5's iPhone simulator?
They're all down for me.
Can't tell if this is serious. Is this feature designed for hipsters? What is the percentage of the population that knows Morse code?
Interesting. Perhaps, instead of relying on "Vary: Accept" the server should respond with: "Vary: YourCustomHeader". The API client, on the other hand, will include "YourCustomHeader: SomeConstantValue" when making requests to the server. That way, the reverse proxy will only store up to two versions in its cache.
Businesses may share common interests with their vendors or customers but they also almost always share conflicting interests. Unless both parties' interests completely align with each other's, I can't see how a vendor/customer can be considered to have the business's best interests in mind.
The article says Dragon agreed to pay Goldman a flat fee of $5 million. What if Goldman did perform due diligence, reported the issues to Dragon, and caused the deal to get cancelled, would Goldman still get $5 million? I don't think so, but if their agreement says they should and I were in Goldman's shoes, I would find reasons to recommend against the deal, because, to earn $5 million, it seems much easier to just advise against the deal than to assist the transaction and bear the risk of a bad outcome. On the other hand, if Goldman gets nothing (or a fraction of the $5 million fee) in the event that the deal gets cancelled, it would be in Goldman's best interests to see the deal go through and avoid performing any potentially deal-breaking services (e.g. due diligence) not specified in the written agreement.
There are scenarios where vendors or customers do have the business's best interests in mind. One such scenario is when the vendor or customer has very close family relationship with the business owner (e.g. husband-wife, father-son, etc.) These scenarios are uncommon. To be on the safe side, I agree with the sentiment that only you have your own best interests in mind.
You can track reviews for an iOS app by subscribing to its rss feed.
http://itunes.apple.com/us/rss/customerreviews/id=[your_apps_apple_id]/sortBy=mostRecent/xml
For example, here's the RSS feed URL for the Facebook app.http://itunes.apple.com/us/rss/customerreviews/id=284882215/...
My friends and I do the same thing: highlight and google the title of the article instead of clicking on the link. The funny thing is we all learned to do this on our own! Quite disappointed to see FB recently added JS code to prohibit users from highlighting the title of the article (presumably to discourage users from doing this).
Look into format-preserving encryption. I wrote something that allows you to generate permutations for an arbitrary sized range. With it, there are no collisions.
Thank you. I'll do that.