Posts

Showing posts from November 3, 2013

Guido Says: Python 3 Things Still Unsolved: Multi-Line Lambda

lol. In Guido's python 3 retrospect, his last item is: “Things still unsolved: Multi-line lambda”.〔Python 2 vs. Python 3: A retrospective2013-11-09 By Guido Van Rossum. @ www.dropbox.com…〕See also:Lambda in Python 3000Why Python's Lambda is Broken and Can't be FixedThe Fate of Lambda in Python 3000 and Scheme v300Python Unicode Tutorial 🐍

Example of JavaScript Sort Method Using Custom Sort Function

Example of JavaScript Sort Method Using Custom Predicate// array sort example varaa = ["a1", "a70", "a8", "A2"]; // default sort. element compared as string aa.sort(); console.log(aa); // [ 'A2', 'a1', 'a70', 'a8' ] // sort by comparing as numbers after first char aa.sort(ff); console.log(aa); // [ 'a1', 'A2', 'a8', 'a70' ] functionff (x,y) { varnx = parseInt(x.slice(1)); // remove first char. consider rest as number varny = parseInt(y.slice(1)); if ( nx < ny ) { return -1; } if ( nx > ny ) { return 1; } if ( nx == ny ) { return 0; } }see more at JavaScript Array Methods

How to Connect BlackBerry PlayBook to Linux

Perm URL with updates: http://xahlee.info/comp/blackberry_playbook_unable_to_delete_file.html• plug in the USB between PlayBook and Linux machine.• on PlayBook, go to 〖About〗, find the USB IP address of the PlayBook. In the About screen, the Network menu. Note, it's the USB'S IP address, not the wifi ip address.• on PlayBook, go to 〖storage & sharing〗, set the menu “USB Connections” to “Connect to Window”. In the “File Sharing” section, turn it on.on Linux, just open a folder, and in the address type smb://169.254.134.77/, where the IP is your IP.BlackBerry PlayBook is the worst tablet.