This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
/** | |
* Simple snippet for printing free book summaries on https://www.blinkist.com/nc/daily | |
* Open the book and use following code via browser console. | |
*/ | |
$('.page main header, main .daily__top-menu, .reader__container > .reader__container__left, .reader__container__content .chapter.promotion, .reader__container__content .reader__container__buttons, .reader__container .reader__container__full__bottom_bar, .reader__container .reader__container__partial__bottom_bar').remove(); | |
$('.reader__container__right .reader__container__content .chapter').css('display', 'block'); | |
$('.chapter.supplement h1').css('margin-top', '0'); |
// convert a query to an array of structs | |
// credit: http://www.bennadel.com/blog/2367-coldfusion-10---looping-over-queries-using-a-for-in-loop-in-cfscript.htm | |
function queryToArray( required query query ){ | |
var queryAsArray = []; | |
for (var row in query){ | |
arrayAppend( queryAsArray, row ); | |
} | |
return(queryAsArray); | |
} |
This is the latest version of an email which I send periodically, offering customers the opportunity to pre-pay for SaaS in return for a discount. The benefits to the SaaS company are better cash flow and reduced churn rate. The benefits to the customer are, well, in the email. This genre of email has produced hundreds of thousands of dollars in pre-pays for some companies I work with, and it rarely requires any more work than this example.
I've put $79 is as a placeholder for the cost of the user's plan. We calculate that for each account, naturally, along with the billing contact's name.
Subject: Save $79 on Appointment Reminder (and get a tax write-off) Formatting: 100% plain text. Gmail automatically links up the central link. From: Patrick McKenzie (Appointment Reminder) patrick@appointmentreminder.org
<cfoutput> | |
<cfscript> | |
// Access all of the current content bean's extended attributes | |
$.content().getExtendedAttributes(); | |
// Access a specific Extend Set's attributes of the current content bean | |
$.content().getExtendedAttributes(name='Your Extend Set Name Goes Here'); | |
// Access a query/recordset of the current content bean's extended attributes | |
$.content().getExtendedAttributesQuery(); |