Skip to main content

Posts

Showing posts from 2012

GWT: Emulate tab on Enter

Sometimes users expect text boxes to move focus on to the next element after pressing Enter, similar to most spreadsheets. If you are using GWT and jQuery, here is a little snippet to help you along:



publicclassAutoTabbedTextBoxextendsTextBoximplements KeyUpHandler { public AutoTabbedTextBox() { super();         addKeyUpHandler(this);     }
@Override publicvoid onKeyUp(KeyUpEvent event) { // emulate tab on key if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)             focusNext(event.getNativeEvent());     }
publicnativevoid focusNext(NativeEvent event)/*-{ var inputs = $wnd.$(':input:visible');             inputs.eq(inputs.index(event.target) + 1).focus();     }-*/; }

Microsoft Error Reporting crashed on Mac!

Just got this on my Mac:
Should I report the crash of the Microsoft Error Reporting to Apple??

System Overload!

Neil deGrasse Tyson on Science and Faith: Plain Wrong

In the video, an argument seems to have been made that Science and Faith can not only easily co-exist, but the idea of any conflict between the two paradigm is largely non existing. 


By definition, science is the knowledge obtain by rigorousempirical evidence - a body of knowledge that is continually updated, proved, dis-proved and tinkered with. Science fundamentally does not claim to know anything nor does it guarantee an answer to every question that one can pose. It is a way of thinking with clarity, without dogma and and without an overriding theology.

Contrast this with what faith in essence is - an adherence to a belief based on authority and to a large degree, fear of uncertainty.

For a renowned personality like Tyson to dismiss the contrast and make little of the very fundamental impedance mismatch is, to my mind, just amazing.