Better HN
topnewbestaskshowjobs
Log inSign up

program

998 karma · joined Oct 22, 2010 (16y ago) · 236 submissions

Submissions

comment 15y ago · link · parent

They will lose money:

  #triangle-up { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 100px solid red; }
is 143 bytes.

comment 15y ago · link · parent

I've read this example first time in a storic stackoverflow topic:

http://stackoverflow.com/questions/1995113/strangest-languag...

it will stay forever in my bookmarks.

comment 15y ago · link · parent

CYberdyne INC (Japan) has a very advanced Hybrid Assistive Limb project as well. It's not developed for military purposes but for helping the disabled and elderly in their daily tasks. They will begin production in 2012.

http://www.cyberdyne.jp/english/robotsuithal/index.html

comment 15y ago · link · parent

Given that "window" is the top level object in JavaScript:

location === window.location === self.location

and that objects are also associative arrays:

oneObject.aMethod === oneObject['aMethod'] === oneObject['aMet' + 'hod']

you can write infinite variant of the same function call.

comment 15y ago · link · parent

It's called auto-termination:

http://developer.apple.com/library/mac/#documentation/Genera...

Only applications that support auto-save AND set NSSupportsAutomaticTermination to YES do quit when there are no open windows.

comment 15y ago · link · parent

I think that the author took inspiration from Objective C blocks:

  int (^aBlock)(int) = ^(int a) {
    return a;
  };

comment 15y ago · link · parent

I see two problems regarding the adoption of this device:

1) Non adapt for touch typists. In my opinion it would be very hard to find the home row without raised dots and the feeling of real keys.

2) Can increase the effect of repetitive strain injury (RSI). Hitting an hard surface isn't the same thing that hitting keyboard keys.

comment 15y ago · link · parent

In Chrome, Firefox and IE the video don't go fullscreen but instead the div with the <video> does span all over the page.

comment 15y ago · link · parent

Addendum: the 'document' extras: http://tiny.cc/kaktu

webkitCancelFullScreen webkitCurrentFullScreenElement webkitFullScreenKeyboardInputAllowed webkitIsFullScreen onwebkitfullscreenchange

comment 15y ago · link · parent

Also arrays of arrays have a much more compact syntax:

  $a = [1 => [4, 5, 6], 2 => [7, 8, 9], 3 => [10, 11, 12]];

  $a = array(1 => array(4, 5, 6), 2 => array(7, 8, 9), 3 => array(10, 11, 12));

comment 15y ago · link · parent

The documentation is misleading. You can use follow-mode on an arbitrary number of windows that show the same buffer.

comment 15y ago · link · parent

How Little Has Changed

Full disk encryption and multi-touch gestures alone are a good buy for 29.99$.

comment 15y ago · link · parent

Works well in webkit-based browser (Chrome 12 and Safari 5 tested). This is due to the extensive usage of -webkit-animation-, -webkit-pointer- and -webkit-transform-.

The crocodiles are radio buttons and animations are controlled via the :checked pseudo-selector, very clever.

comment 15y ago · link · parent

Addendum: when using the Magic Mouse/Trackpad in Lion, if you scroll down the window content goes up. Up goes down (you don't scroll the bar, you scroll the window). Just like on iOS.

comment 15y ago · link · parent

Twitter does this:

  http://twitter.com/#!/twitter
is parsed by the Google crawler as:

  http://twitter.com/?_escaped_fragment_=/twitter
which is a 301 Moved Permanently to the old:

  http://twitter.com/twitter
which in turn redirect to the #! version if you are logged. This is a mixed approach that mantain backward compatibility (and support Bing, Yahoo and other crawlers).

comment 15y ago · link · parent

I use the well-known "clockwise spiral rule" http://c-faq.com/decl/spiral.anderson.html

comment 15y ago · link · parent

Actually that is the name that appears in the ECMAScript official language specification:

http://bclary.com/2004/11/07/#a-7.9.1

comment 15y ago · link · parent

Javascript has automatic semicolon insertion. This function:

  function a() {
    return
      true;
  }
return undefined.

comment 15y ago · link · parent

This is so true. Worst of all a company named Tynt has a patent pending for ctrl+c injection:

http://www.google.com/patents?id=4Qx6AQAAEBAJ&printsec=a...

comment 15y ago · link · parent

I use both. I create SVG files with Inkscape (if and only if I need to draw some complex shapes) and then I display them using the Processing language (the javascript port:)

http://processingjs.org/

The Processing parser generate (fast) javascript code on the fly the can be accessed from external scripts. You can mix processing with javascript.

comment 15y ago · link · parent

This isn't a news. Google profiles can be indexed by search engines since 2008. See the google robots.txt file:

http://www.google.com/robots.txt

comment 15y ago · link · parent

It all began when a user pasted the value of the jsText variable in the address bar. The script create a new script DOM element and append it to head injecting the malicious links (so that there is no more need to run the bookmarklet-like link.)

The problem here is that the (old) Facebook prompt_page.php page:

http://www.facebook.com/connect/prompt_feed.php

doesn't sanitize feed_info[action_links][0][href] allowing javascript: links.

comment 15y ago · link · parent

I started using LaTeX after I adopted Emacs as my default text editor. This was my research path: info -> Texinfo -> LaTeX -> XeLaTeX.

Now I use the swiss-knife Memoir class for nearly everything and I have understood the importance of beautiful typesetting.

Worth reading:

http://www.ctan.org/tex-archive/info/memdesign (the memoir manual of style)

The Elements of Typographic Style, Robert Bringhurst (the bible)

comment 15y ago · link · parent

In a standard italian keyboard layout the '\' is placed between TAB and ESC, and '/' is shift+7.

A lot of people think that '\' is the slash and '/' the backslash leading to some confusion among non-programmers (and some escaped characters here and there.)

comment 15y ago · link · parent

Missing examples:

C-x z, the command that repeat the last command for every 'z' you type. This is in my opinion one of the most important feature of Emacs

M-s o, the 'occur' command that show all the lines that match a specified regexp

File variables: http://www.gnu.org/software/emacs/manual/html_node/emacs/Spe...

comment 15y ago · link · parent

At least now IE supports border-radius.

comment 15y ago · link · parent

From TUAW and AppleInsider citing a poll made by Piper Jaffray.

http://www.tuaw.com/2011/03/14/70-percent-of-ipad-2-buyers-a...

http://www.appleinsider.com/articles/11/03/13/apple_attracts...

comment 15y ago · link · parent

I have used LaTeX, TeX and ConTeX for years as my only programming language for writing beautiful docs and I think that nowadays there isn't a good alternative if you write technical documents that have math inside.

Today I use XeTeX together with the swiss-knife memoir class and a huge preamble that I have built over the years. XeTeX is modern and lets you write your docs in UTF8 with ease. I have stopped writing a lot of commands by hand cause there are a lot of modern editors out there (TeXShop on the Mac, TeXworks/TeXnicCenter on Windows, Kile and a bunch of others in Linux.)

When you enter the TeX world you cannot go back cause you start to see typographical errors everywhere: wrong kerning, missing ligatures, wrong align in formulas, wrong page dimensions and others. As Don Knuth says: "I can't go to a restaurant and order food because I keep looking at the fonts on the menu."

The beauty of LaTeX (XeLaTeX in this case): http://nitens.org/taraborelli/latex

comment 15y ago · link · parent

The most interesting thing is that 70% customers purchasing the iPad 2 are first-time iPad buyers.
1
45678