martedì, novembre 30, 2010

SharePoint Calculated Field: CLEAN()

Wow. I wish I knew about this function years ago!
=CLEAN([myMessyTextField])
From endusersharepoint.com:
“The “CLEAN()” function is useful when moving data from one type of system to another in that it allows you to remove any characters that do not directly represent a written symbol (“Non-Printing”, or “Control” characters), but rather, represents a specific action or formatting on the data itself. Examples of this would be “line feeds” and “tabs” (or anything that doesn’t fall in the Decimal 32-127 and 128-255 ASCII ranges – “Printable” and “ASCII Extended” respectively – http://www.ascii-code.com).”

mercoledì, novembre 24, 2010

The Three Threats to Creativity

A compelling article from the Harvard Business Review.

http://blogs.hbr.org/hbsfaculty/2010/11/the-three-threats-to-creativit.html

lunedì, novembre 22, 2010

Flash Ads Are Broken

An interesting cause: asking advertisers who use Flash to learn how to use wmode.

http://www.flashadsarebroken.com/

 

mercoledì, novembre 10, 2010

XSLT - Sorting Alphabetically and Numerically

An awesome bit of XSLT at Stack Overflow for sorting alphabetically and numerically using just one xsl:foreach statement :

http://stackoverflow.com/questions/2670214/xslt-sort-alphabetically-numerically-problem

 

venerdì, novembre 05, 2010

JavaScript: Formatting Numbers for Dollars and Cents

More JavaScript goodness. This time from pageresource.com: Number.toFixed(x).

“Formats any number for "x" number of trailing decimals. The number is rounded up, and "0"s are used after the decimal point if needed to create the desired decimal length.”

Here’s a function I’m using to format several numbers on the fly.

function addDecimalPlaces(myCash) {
       myCash = myCash * 1; // Confirm that myCash is a number
       myCash = myCash.toFixed(2);
       return myCash;
}


Sorting a Multidimensional array in JavaScript

I’m noting this for myself, but I’d recommend it to all: a very useful routine courtesy of Stack Overflow:

var arr = [.....]
arr.sort((function(index){
    return function(a, b){
        return (a[index] === b[index] ? 0 : (a[index] < b[index] ? -1 : 1));
    };
})(2)); // 2 is the index

giovedì, novembre 04, 2010

Social Web Security Report Card

Wow…thought provoking stuff courtesy of OH:

Facebook and Twitter have received failing grades from Digital Society, a "digital think tank," that created an "Online Services Security Report Card" ranking "which websites protect your account and which don't."

The report card examines how vulnerable services such as eBay, Flickr, Amazon, and Facebook, are to a security breaches and provides each a grade. The ranking is particularly timely in light of concerns around Firesheep, a Firefox plugin that enables users to obtain the login information of others who may be browsing non-secure websites on unencrypted WiFi networks.

Facebook received an 'F,' as did Twitter and WordPress (no SSL). Hotmail and Flickr fared only slightly better, earning a 'D-' each. Digital Society's George Ou writes, "Permanent fixes from the likes of Facebook, Twitter, and Microsoft are long overdue."

 

lunedì, novembre 01, 2010

Silverlight x 6 = 0

LOL! “Silverlight. Silverlight. Silverlight. Silverlight. Silverlight. Is dead. Long live Silverlight! Or something.”

http://techcrunch.com/2010/11/01/silverlight-silverlight/