Hacker Newsnew | past | comments | ask | show | jobs | submit | trip42's commentslogin

a basic explanation is that by preceding a variable declaration with var creates a property on the nearest containing function

This is not true, the var hoist the variable and scopes it to the function, but does not create it as a property of the function. A function is defined in its outer function scope, an it's properties will persist across calls.

  function foo() {
    var bar = 1;
    foo.baz = 2;
  }

  foo();

  foo.bar; // is undefined
  foo.baz; // is 2
Adding properties to functions is useful for memoization, but is different than what the var statement does.

Your summary of that section is a better explanation:

all variables are scoped to a function (which is itself an object), and where you declare those variables with var determines the function they are scoped to.

You might add, if you never declare the variable with var it is implicitly declared global.


thanks for the help


For many people, the real return on buying a house is owning the house, not the increase in value of the property. Where I live housing is fairly inexpensive and I can't think if of any other similarly sized investment that is guaranteed to cover my cost of housing for the rest of my life.

(edit: typo)


I built a slideshow control system for a class project using nearly the same approach. A user uploads a slideshow or authors it online and connects a phone/device via a QR Code or URL to control the presentation. The controller uses websockets to communicate with a nodejs server for events like previous/next, a touch-screen based laser pointer, and presenter notes. I was amazed how responsive the touch movements translated to moving a dot on the screen through a remote node server.

We didn't use any accelerometer events, but touch events worked seamlessly on iOS and Android.


The title contradicts itself, keeping the courts involved was a goal of the anti-SOPA movement.


> Deep Packet Inspection.

I have a problem with this whether a court was involved or not.


I'm going to nitpick a bit and say this article would be better titled, "Accounting for Geeks". Over simplified, finance is more forward looking, while accounting is a reflection or recording of what has happened in the past. Income Statements, Balance Sheets, and Cash Flow Statement are accounting instruments.

To be fair, the article talks about funding, which is finance, but brushes over the differences between debt and equity finance and doesn't provide the tools to evaluate when, what, and how to finance.

Tech start ups are probably in a, take what you can get, position for funding. Still, having an understanding of finance could help with evaluating things like convertible notes which start as debt and can optionally convert to equity.


Concluding that ideas are as valuable as execution because two poorly executed (but still executed) apps performed better than well executed seems to assume that everyone with the same idea could execute at all.

One surely has higher odds if success, if they were to execute every idea, without evaluating its value, than someone with perfect ideas but no ability to execute.


The US education system benefited for a long period where many incredibly smart women had career options basically limited to teaching and nursing. As equality improved, some of the brightest prospective teachers instead became doctors, scientists, and engineers. This decrease in teacher quality is resulting in a more "assembly line" style of education, where each step is fully structured. I have seen anecdotal evidence of highly qualified teachers exiting the workforce because the structure of the work has become unfulfilling.

I suspect there are also incentives for top performers to move out of education and into administration.


TAL is one of the most impressive things to come out of Zope, after using it for years I feel dirty using a templating system allows inline programming logic. Chameleon templates implement Zope's TAL for use outside of Zope: http://chameleon.repoze.org/


In high school I programmed Mortal Kombat on my TI-85, if it can't do that and can't be rooted via zshell, it doesn't count.


You mean YouTube has information on all of the photographs I've ever taken and who I've licensed them to? I don't recall making this information public, so I don't see how they could possibly detect copyright infringement of my content.


The copyright infringement detection technology is opt-in. You disclose to YouTube the licensees.


Throw one of your images at tineye.com. It's a reverse image analysis tool; their algorithm is under wraps, but I'm sure a few people around here could speculate on how it works. It works nicely with cropped and scaled images, which is a hint =)


Infringement depends on permission. No third party can possibly know whether or not the use of a given work was authorized or not unless told by the copyright holder.

Now, when told by the copyright holder that no use of some work is authorized, they can flag all copies of it that they are able to find and match it under the assumption that nothing is authorized. But you couldn't add anything if we assume that every user is lying about being authorized.

Moreover, as was demonstrated in the Viacom case, even the copyright holders get it wrong. In particular, Viacom had uploaded copies of their own works and made them appear leaked. Yet these were uploaded by Viacom itself and, thereby, authorized. They even had to go back and have them put up after taking them down by mistake. And they had to remove them from their complaint after being told of their mistakes. Twice. After doing due diligence with expensive lawyers.


I think his point was that you can certainly detect an image in use on other sites but that does not matter because it may or may not be infringement. Nobody could possibly know if he licensed his work to be used by certain sites or not.


The comment you guys are responding to was in jest. I wrote the original post in this subthread. My point about Tineye was that it's obviously capable of picking up duplicates (which is the immediate question I was responding to) and equally incapable of determining which of those duplicates are licensed.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: