pixelglow
http://stackoverflow.com/a/12393597/60910
Therefore the straightforward way to parse a zip file is to proceed from the beginning and parse out each file sequentially. The End of Central Directory record is then only a redundant convenience to avoid sequentially scanning files e.g. in large zips for random access.
The only wrinkle is that each entry has a header which typically states the compressed size and checksum. Either you have to compress each entry content in some temp buffer or file to figure out the compressed size and checksum, then write out the header and compressed content. Or you write out the header with these fields zeroed, then compress the content on the fly and write it out, then write out a data descriptor with the compressed size and checksum.
In particular, in the beginning Objective-C was a lot looser typed at compile time than it is now: no NSString* or NSWindow*, it was all just id. It was an attempt to make C look like Smalltalk.
The language eventually evolved more toward the static-typed end of the spectrum, culminating in support for lightweight generics and ostensibly birthing Swift along the way.
Good guys DeskConnect: patrons of open source
Show HN: PredicatePal: Swift DSL to build NSPredicate's via expression templates
I'm not a doctor however so take any advice with a grain of salt. (But not sugar, definitely not that.)
> I keep reading that the problem is carbohydrate overload to my genetics.
Read up on "glycemic index". This index tells you how close your food is to pure glucose e.g. table sugar has a glycemic index of 68 so it has 68% of the insulin response of pure glucose. The index correlates to the type of carbohydrate and how processed it is, although there are some surprises e.g. premium ice cream has a G.I. of 37.
http://www.glycemicindex.com/index.php
You don't have to commit the entire index to memory. Usually you can come up with several heuristics e.g. tropical fruit tends to have higher G.I. than temperate fruit.
Obviously you should test this with your own blood sugar readings as individual response to a carbohydrate challenge can be quite different.
The other components to a meal also affect blood sugar. For example, acid, protein and fat tend to slow down digestion and thus blood sugar spiking. If you must take pasta for example, take it with a tomato-based sauce (acidic) rather than cream-based. YMMV.
> Unfortunately, my doctor thinks that pushing pills is an adequate response, which I heartily doubt.
It's important, although somewhat depressing, to see this disease as a progression. A progression that you have to slow down as much as possible, but still a progression.
Know that in the future, you may have to resort to the first line of pills, and then possibly stronger ones. Try to slow down the progression as much as possible, and research the pills to see their efficacy and benefit.
Metformin is usually the first line of defence and it has a long history and little side effect. It generally fools your body into thinking it's in starvation mode, which means you can lose weight, both fat and muscle. It actually lowers insulin resistance rather than increasing insulin. Generally in amounts >1g it gives you loose bowels, so when you have to use it keep on low doses as long as possible.
When metformin doesn't work as well, generally you'll get prescribed sulfonylureas. Since they increase insulin secretion, they tend to exacerbate your insulin resistance. There is some inconclusive research that they burn out the pancreatic beta cells. Better to avoid these as long as possible, but if your glucose control is bad you may not have a choice.
I'm currently on an incretin enhancer (gliptin) + metformin.
Also look up supplements on examine.com. It's hard to tell the effectiveness of supplements, the only one that had a distinct effect on me was berberine.
The other thing you can do is exercise. Lots of it. Strength training for more muscle and more insulin receptors. Aerobic exercise to burn/absorb more glucose and lose weight. There's even recent evidence that high-intensity interval training improves diabetic markers more than sustained, low-intensity exercise.
Epic diagrams for an epic screen
Show HN: Instaviz Lite 2.1 – iOS diagram sketcher
You could
* Combine it with black pepper, warmth and/or oil.
* Use the Meriva or BCM-95 form.
* Use nanoparticles, marketed as Theracurmin/Theracumin.
Most nights, I combine two caps of Theracurmin with fish oil and lukewarm water for my wife to drink. It does seem to help with her arthritis.
I suspect this originated with autistic individuals finding it hard to actually lie, i.e deceive. This relates to their shallow theory of mind, or difficulty believing other people have different thoughts and ideas from them or the absolute "truth". This idea has subtly spread through science and tech culture since many practitioners are on the spectrum, where some absolute truth is held up for admiration and significant deviation is uncomfortable.
For example, "code never lies." So if I say "xyz" about the code and it is false, I am "lying".
Virtually every diagram I ever published could've been developed on an iPhone 3S
Untangling UIKit view transitions on iOS
The shape recognition is a custom C++ library I call Recog, based on naive Bayesian classifier on geometric statistics.
The automated layout engine is Graphviz, as is the native file format (wrapped in my open-source zip library zipzap).
The help videos are not embedded in code, but are stored in Amazon S3 fronted by CloudFront. That also fronts a small web service written in node.js + sqlite3 for indexing the videos.
Show HN: Instaviz 2.0, a full rewrite of my iOS diagram sketcher
In ARC, all strong pointers may have multiple owners. In C++11 RAII, the typical, defining use is for single owners (std::unique_ptr) but multiple owners are supported too (std::shared_ptr).
In ARC, local pointers may be reclaimed before their scope ends, if the compiler determines no further use of the pointer. In C++11 RAII, all such resources are reclaimed only at scope end.
ARC is not exception-safe by default, you have to compile with -fobjc-arc-exceptions to make it exception safe; however Apple standards have been moving away from using exceptions for recoverable conditions for some time now. C++11 RAII is of course exception-safe by default, it's one of the rationales behind the technique.
Poignant article, some echoes in my own life. My nerd cred includes liking comics, Star Trek, computer programming, obsessing about science fiction minutiae, explaining real life using computer/SF/fantasy tropes etc. But somehow never quite belonging with all the cosplaying, filksilking, us against the muggles depth of nerddom. And never quite belonging with mainstream society either -- why do people NOT want an explanation how MCU Bruce Banner can control his Hulk persona, for example?
It's strange this feeling of not belonging. The author identifies this with a former life ("my hometown"), presumably because he's partly outgrown it. While I have outgrown some parts of my nerddom, I've always felt this "not belonging" though.
Certainly, modern conceptions of Vulcans are a lot more nuanced e.g. they are privately strongly emotional or otherwise have to strongly suppress their emotions. See for example Star Trek (2009) which deals with Spock as a young boy in Vulcan culture, which is eerily reminiscent of this article. Wonder whether Orci, Kurtzman or Abrams read this article before conceiving the 2009 incarnation of Spock?
* Write the CPU-heavy code in C++ and bridge it back to node.js as an add-on: http://nodejs.org/api/addons.html
* node.js is built atop libuv, so use libuv's work queues to offload the CPU-heavy code to a worker thread: http://nikhilm.github.io/uvbook/threads.html
Show HN: zipzap 8.0, zip file I/O for iOS and OS X
Show HN: Fast Double Metaphone in C++11: 2M sound-alikes per second
See http://clang.llvm.org/docs/Modules.html and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n207....
Prefer "x = y + z" to "ADD y TO z GIVING x".
Prefer "[[NSThread alloc] initWithTarget:t selector:s object:o]" to "pthread_create(&p, &a, &f)".
I once wrote a SIMD C++ template library based on valarray: http://www.pixelglow.com/macstl. Sadly it has languished over the years but I would love to work on it again. It had novel (at the time?) vectorized trigonometric functions, for example.