steal('can/util',
'can/view/scope',
'can/view',
'can/view/scanner.js',
'can/compute',
'can/view/render.js',
'can/view/bindings',
function (can) {
steal('can/util',
'can/view/scope',
'can/view',
'can/view/scanner.js',
'can/compute',
'can/view/render.js',
'can/view/bindings',
function (can) {
can.Mustache
: The Mustache templating engine.
See the Transformation section within Scanning Helpers for a detailed explanation of the runtime render code design. The majority of the Mustache engine implementation occurs within the Transformation scanning helper.
can.view.ext = ".mustache";
An alias for the context variable used for tracking a stack of contexts. This is also used for passing to helper functions to maintain proper context.
var SCOPE = 'scope',
An alias for the variable used for the hash object that can be passed
to helpers via options.hash
.
HASH = '___h4sh',
An alias for the most used context stacking call.
CONTEXT_OBJ = '{scope:' + SCOPE + ',options:options}',
a context object used to incidate being special
SPECIAL_CONTEXT_OBJ = '{scope:' + SCOPE + ',options:options, special: true}',
argument names used to start the function (used by scanner and steal)
ARG_NAMES = SCOPE + ",options",
matches arguments inside a {{ }}
argumentsRegExp = /((([^'"\s]+?=)?('.*?'|".*?"))|.*?)\s/g,
matches a literal number, string, null or regexp
literalNumberStringBooleanRegExp = /^(('.*?'|".*?"|[0-9]+\.?[0-9]*|true|false|null|undefined)|((.+?)=(('.*?'|".*?"|[0-9]+\.?[0-9]*|true|false)|(.+))))$/,
returns an object literal that we can use to look up a value in the current scope
makeLookupLiteral = function (type) {
return '{get:"' + type.replace(/"/g, '\\"') + '"}';
},
returns if the object is a lookup
isLookup = function (obj) {
return obj && typeof obj.get === "string";
},
/*
* Checks whether an object is like a can.Map. This takes into
* fact that can.route is can.Map like.
* @param {[can.Map]} observable
* @return {Boolean} returns if the object is observable like.
*/
isObserveLike = function (obj) {
return obj instanceof can.Map || (obj && !! obj._get);
},
/*
* Tries to determine if the object passed is an array.
* @param {Array} obj The object to check.
* @return {Boolean} returns if the object is an array.
*/
isArrayLike = function (obj) {
return obj && obj.splice && typeof obj.length === 'number';
},
used to make sure .fn and .inverse are always called with a Scope like object
makeConvertToScopes = function (original, scope, options) {
var originalWithScope = function(ctx, opts){
return original(ctx || scope, opts);
};
return function (updatedScope, updatedOptions) {
if (updatedScope !== undefined && !(updatedScope instanceof can.view.Scope)) {
updatedScope = scope.add(updatedScope);
}
if (updatedOptions !== undefined && !(updatedOptions instanceof can.view.Options)) {
updatedOptions = options.add(updatedOptions);
}
return originalWithScope(updatedScope, updatedOptions || options);
};
};
/**
* @hide
* The Mustache templating engine.
* @param {Object} options Configuration options
*/
var Mustache = function (options, helpers) {
Support calling Mustache without the constructor. This returns a function that renders the template.
if (this.constructor !== Mustache) {
var mustache = new Mustache(options);
return function (data, options) {
return mustache.render(data, options);
};
}
If we get a function
directly, it probably is coming from
a steal
-packaged view.
if (typeof options === "function") {
this.template = {
fn: options
};
return;
}
Set options on self.
can.extend(this, options);
this.template = this.scanner.scan(this.text, this.name);
};
/**
* @add can.MustacheConstructor
*/
Put Mustache on the can
object.
can.Mustache = can.global.Mustache = Mustache;
/**
* @prototype
*/
Mustache.prototype.
/**
* @function can.MustacheConstructor.prototype.render render
* @parent can.MustacheConstructor.prototype
* @signature `mustache.render( data [, helpers] )`
* @param {Object} data Data to interpolate into the template.
* @return {String} The template with interpolated data, in string form.
* @hide
*
* @body
* Renders an object with view helpers attached to the view.
*
* new Mustache({text: "<%= message %>"}).render({
* message: "foo"
* })
*/
render = function (data, options) {
if (!(data instanceof can.view.Scope)) {
data = new can.view.Scope(data || {});
}
if (!(options instanceof can.view.Options)) {
options = new can.view.Options(options || {});
}
options = options || {};
return this.template.fn.call(data, data, options);
};
can.extend(Mustache.prototype, {
Share a singleton scanner for parsing templates.
scanner: new can.view.Scanner({
A hash of strings for the scanner to inject at certain points.
text: {
This is the logic to inject at the beginning of a rendered template.
This includes initializing the context
stack.
start: "", //"var "+SCOPE+"= this instanceof can.view.Scope? this : new can.view.Scope(this);\n",
scope: SCOPE,
options: ",options: options",
argNames: ARG_NAMES
},
An ordered token registry for the scanner. This needs to be ordered by priority to prevent token parsing errors. Each token follows the following structure:
[
// Which key in the token map to match.
"tokenMapName",
// A simple token to match, like "{{".
"token",
// Optional. A complex (regexp) token to match that
// overrides the simple token.
"[\\s\\t]*{{",
// Optional. A function that executes advanced
// manipulation of the matched content. This is
// rarely used.
function(content){
return content;
}
]
tokens: [
/**
* @function can.mustache.tags.escaped {{key}}
*
* @description Insert the value of the [can.mustache.key key] into the
* output of the template.
*
* @parent can.mustache.tags 0
*
* @signature `{{key}}`
*
* @param {can.mustache.key} key A key that references one of the following:
*
* - A [can.mustache.registerHelper registered helper].
* - A value within the current or parent
* [can.mustache.context context]. If the value is a function or [can.compute], the
* function's return value is used.
*
* @return {String|Function|*}
*
* After the key's value is found (and set to any function's return value),
* it is passed to [can.view.txt] as the result of a call to its `func`
* argument. There, if the value is a:
*
* - `null` or `undefined` - an empty string is inserted into the rendered template result.
* - `String` or `Number` - the value is inserted into the rendered template result.
* - `Function` - A [can.view.hook hookup] attribute or element is inserted so this function
* will be called back with the DOM element after it is created.
*
* @body
*
* ## Use
*
* `{{key}}` insert data into the template. It most commonly references
* values within the current [can.mustache.context context]. For example:
*
* Rendering:
*
*
{{name}}

*
* With:
*
* {name: "Austin"}
*
* Results in:
*
*
Austin

*
* If the key value is a String or Number, it is inserted into the template.
* If it is `null` or `undefined`, nothing is added to the template.
*
*
* ## Nested Properties
*
* Mustache supports nested paths, making it possible to
* look up properties nested deep inside the current context. For example:
*
* Rendering:
*
*
{{book.author}}

*
* With:
*
* {
* book: {
* author: "Ernest Hemingway"
* }
* }
*
* Results in:
*
*
Ernest Hemingway

*
* ## Looking up values in parent contexts
*
* Sections and block helpers can create their own contexts. If a key's value
* is not found in the current context, it will look up the key's value
* in parent contexts. For example:
*
* Rendering:
*
* {{#chapters}}
*
{{title}} - {{name}}

* {{/chapters}}
*
* With:
*
* {
* title: "The Book of Bitovi"
* chapters: [{name: "Breakdown"}]
* }
*
* Results in:
*
*
The Book of Bitovi - Breakdown

*
*
*/
Return unescaped
["returnLeft", "{{{", "{{[{&]"],
Full line comments
["commentFull", "{{!}}", "^[\\s\\t]*{{!.+?}}\\n"],
/**
* @function can.mustache.tags.comment {{!key}}
*
* @parent can.mustache.tags 7
*
* @description A comment that doesn't get inserted into the rendered result.
*
* @signature `{{!key}}`
*
* The comment tag operates similarly to a `<!-- -->` tag in HTML. It exists in your template but never shows up.
*
* @param {can.mustache.key} key Everything within this tag is completely ignored.
* @return {String}
*
*/
Inline comments
["commentLeft", "{{!", "(\\n[\\s\\t]*{{!|{{!)"],
/**
* @function can.mustache.tags.unescaped {{{key}}}
*
* @parent can.mustache.tags 1
*
* @description Insert the unescaped value of the [can.mustache.key key] into the
* output of the template.
*
* @signature `{{{key}}}`
*
* Behaves just like [can.mustache.tags.escaped {{key}}] and [can.mustache.helpers.helper {{helper}}] but does not
* escape the result.
*
* @param {can.mustache.key} key A key that references a value within the current or parent
* context. If the value is a function or can.compute, the function's return value is used.
* @return {String|Function|*}
*
*
*/
/**
* @function can.mustache.tags.unescaped2 {{&key}}
*
* @parent can.mustache.tags 2
*
* @description Insert the unescaped value of the [can.mustache.key key] into the
* output of the template.
*
* @signature `{{&key}}`
*
* The `{{&key}}` tag is an alias for [can.mustache.tags.unescaped {{{key}}}], behaving just
* like [can.mustache.tags.escaped {{key}}] and [can.mustache.helpers.helper {{helper}}] but does not
* escape the result.
*
* @param {can.mustache.key} key A key that references a value within the current or parent
* context. If the value is a function or can.compute, the function's return value is used.
* @return {String|Function|*}
*
*/
Full line escapes This is used for detecting lines with only whitespace and an escaped tag
["escapeFull", "{{}}", "(^[\\s\\t]*{{[#/^][^}]+?}}\\n|\\n[\\s\\t]*{{[#/^][^}]+?}}\\n|\\n[\\s\\t]*{{[#/^][^}]+?}}$)",
function (content) {
return {
before: /^\n.+?\n$/.test(content) ? '\n' : '',
content: content.match(/\{\{(.+?)\}\}/)[1] || ''
};
}
],
Return escaped
["escapeLeft", "{{"],
Close return unescaped
["returnRight", "}}}"],
Close tag
["right", "}}"]
],
This is an array of helpers that transform content that is within escaped tags like {{token}}
. These helpers are solely for the scanning phase; they are unrelated to Mustache/Handlebars helpers which execute at render time. Each helper has a definition like the following:
{
// The content pattern to match in order to execute.
// Only the first matching helper is executed.
name: /pattern to match/,
// The function to transform the content with.
// @param {String} content The content to transform.
// @param {Object} cmd Scanner helper data.
// {
// insert: "insert command",
// tagName: "div",
// status: 0
// }
fn: function(content, cmd) {
return 'for text injection' ||
{ raw: 'to bypass text injection' };
}
}
helpers: [
Partials begin with a greater than sign, like {{> box}}.
 Just avoid infinite loops.
For example, this template and partial:
base.mustache:

Names

{{#names}}
{{> user}}
{{/names}}
user.mustache:
{{name}}
{
name: /^>[\s]*\w*/,
fn: function (content, cmd) {
Get the template name and call back into the render method, passing the name and the current context.
var templateName = can.trim(content.replace(/^>\s?/, ''))
.replace(/["|']/g, "");
return "can.Mustache.renderPartial('" + templateName + "'," + ARG_NAMES + ")";
}
},
This will attach the data property of this
to the element
its found on using the first argument as the data attribute
key.
For example:

then later you can access it like:
can.$('#nameli').data('name');
/**
* @function can.mustache.helpers.data {{data name}}
* @parent can.mustache.htags 7
* @signature `{{data name}}`
*
* Adds the current [can.mustache.context context] to the
* element's [can.data].
*
* @param {String} name The name of the data attribute to use for the
* context.
*
* @body
*
* ## Use
*
* It is common for you to want some data in the template to be available
* on an element. `{{data name}}` allows you to save the
* context so it can later be retrieved by [can.data] or
* `$.fn.data`. For example,
*
* The template:
*
*

*
{{name}}

*

*
* Rendered with:
*
* document.body.appendChild(
* can.view.mustache(template,{ person: { name: 'Austin' } });
*
* Retrieve the person data back with:
*
* $("#person").data("person")
*
*/
{
name: /^\s*data\s/,
fn: function (content, cmd) {
var attr = content.match(/["|'](.*)["|']/)[1];
return a function which calls can.data
on the element
with the attribute name with the current context.
return "can.proxy(function(__){" +
“var context = this[this.length-1];” + “context = context.” + STACKED + “ ? context[context.length-2] : context; console.warn(this, context);” +
"can.data(can.$(__),'" + attr + "', this.attr('.')); }, " + SCOPE + ")";
}
}, {
name: /\s*\(([\$\w]+)\)\s*->([^\n]*)/,
fn: function (content) {
var quickFunc = /\s*\(([\$\w]+)\)\s*->([^\n]*)/,
parts = content.match(quickFunc);
find
return "can.proxy(function(__){var " + parts[1] + "=can.$(__);with(" + SCOPE + ".attr('.')){" + parts[2] + "}}, this);";
}
},
This transforms all content to its interpolated equivalent, including calls to the corresponding helpers as applicable. This outputs the render code for almost all cases.
context
- This is the object that the current rendering context operates within.
Each nested template adds a new context
to the context stack.stack
- Mustache supports nested sections,
each of which add their own context to a stack of contexts.
Whenever a token gets interpolated, it will check for a match against the
last context in the stack, then iterate through the rest of the stack checking for matches.
The first match is the one that gets returned.Mustache.txt
- This serializes a collection of logic, optionally contained within a section.
If this is a simple interpolation, only the interpolation lookup will be passed.
If this is a section, then an options
object populated by the truthy (options.fn
) and
falsey (options.inverse
) encapsulated functions will also be passed. This section handling
exists to support the runtime context nesting that Mustache supports.Mustache.get
- This resolves an interpolation reference given a stack of contexts.options
- An object containing methods for executing the inner contents of sections or helpers.options.fn
- Contains the inner template logic for a truthy section.options.inverse
- Contains the inner template logic for a falsey section.options.hash
- Contains the merged hash object argument for custom helpers.This covers the design of the render code that the transformation helper generates.
A detailed explanation is provided in the following sections, but here is some brief pseudocode
that gives a high level overview of what the generated render code does (with a template similar to"{{#a}}{{b.c.d.e.name}}{{/a}}" == "Phil"
).
Initialize the render code.
view = []
context = []
stack = fn { context.concat([this]) }
Render the root section.
view.push( "string" )
view.push( can.view.txt(
Render the nested section with can.Mustache.txt
.
txt(
Add the current context to the stack.
stack(),
Flag this for truthy section mode.
"#",
Interpolate and check the a
variable for truthyness using the stack with can.Mustache.get
.
get( "a", stack() ),
Include the nested section’s inner logic.
The stack argument is usually the parent section’s copy of the stack,
but it can be an override context that was passed by a custom helper.
Sections can nest 0..n
times – NESTCEPTION.
{ fn: fn(stack) {
Render the nested section (everything between the {{#a}}
and {{/a}}
tokens).
view = []
view.push( "string" )
view.push(
Add the current context to the stack.
stack(),
Flag this as interpolation-only mode.
null,
Interpolate the b.c.d.e.name
variable using the stack.
get( "b.c.d.e.name", stack() ),
)
view.push( "string" )
Return the result for the nested section.
return view.join()
}}
)
))
view.push( "string" )
Return the result for the root section, which includes all nested sections.
return view.join()
Each rendered template is started with the following initialization code:
var ___v1ew = [];
var ___c0nt3xt = [];
___c0nt3xt.__sc0pe = true;
var __sc0pe = function(context, self) {
var s;
if (arguments.length == 1 && context) {
s = !context.__sc0pe ? [context] : context;
} else {
s = context && context.__sc0pe
? context.concat([self])
: __sc0pe(context).concat([self]);
}
return (s.__sc0pe = true) && s;
};
The ___v1ew
is the the array used to serialize the view.
The ___c0nt3xt
is a stacking array of contexts that slices and expands with each nested section.
The __sc0pe
function is used to more easily update the context stack in certain situations.
Usually, the stack function simply adds a new context (self
/this
) to a context stack.
However, custom helpers will occasionally pass override contexts that need their own context stack.
Each section, {{#section}} content {{/section}}
, within a Mustache template generates a section
context in the resulting render code. The template itself is treated like a root section, with the
same execution logic as any others. Each section can have 0..n
nested sections within it.
Here’s an example of a template without any descendent sections.
Given the template: "{{a.b.c.d.e.name}}" == "Phil"
Would output the following render code:
___v1ew.push("\"");
___v1ew.push(can.view.txt(1, '', 0, this, function() {
return can.Mustache.txt(__sc0pe(___c0nt3xt, this), null,
can.Mustache.get("a.b.c.d.e.name",
__sc0pe(___c0nt3xt, this))
);
}));
___v1ew.push("\" == \"Phil\"");
The simple strings will get appended to the view. Any interpolated references (like {{a.b.c.d.e.name}}
)
will be pushed onto the view via can.view.txt
in order to support live binding.
The function passed to can.view.txt
will call can.Mustache.txt
, which serializes the object data by doing
a context lookup with can.Mustache.get
.
can.Mustache.txt
‘s first argument is a copy of the context stack with the local context this
added to it.
This stack will grow larger as sections nest.
The second argument is for the section type. This will be "#"
for truthy sections, "^"
for falsey,
or null
if it is an interpolation instead of a section.
The third argument is the interpolated value retrieved with can.Mustache.get
, which will perform the
context lookup and return the approriate string or object.
Any additional arguments, if they exist, are used for passing arguments to custom helpers.
For nested sections, the last argument is an options
object that contains the nested section’s logic.
Here’s an example of a template with a single nested section.
Given the template: "{{#a}}{{b.c.d.e.name}}{{/a}}" == "Phil"
Would output the following render code:
___v1ew.push("\"");
___v1ew.push(can.view.txt(0, '', 0, this, function() {
return can.Mustache.txt(__sc0pe(___c0nt3xt, this), "#",
can.Mustache.get("a", __sc0pe(___c0nt3xt, this)),
[{
_: function() {
return ___v1ew.join("");
}
}, {
fn: function(___c0nt3xt) {
var ___v1ew = [];
___v1ew.push(can.view.txt(1, '', 0, this,
function() {
return can.Mustache.txt(
__sc0pe(___c0nt3xt, this),
null,
can.Mustache.get("b.c.d.e.name",
__sc0pe(___c0nt3xt, this))
);
}
));
return ___v1ew.join("");
}
}]
)
}));
___v1ew.push("\" == \"Phil\"");
This is specified as a truthy section via the "#"
argument. The last argument includes an array of helper methods used with options
.
These act similarly to custom helpers: options.fn
will be called for truthy sections, options.inverse
will be called for falsey sections.
The options._
function only exists as a dummy function to make generating the section nesting easier (a section may have a fn
, inverse
,
or both, but there isn’t any way to determine that at compilation time).
Within the fn
function is the section’s render context, which in this case will render anything between the {{#a}}
and {{/a}}
tokens.
This function has ___c0nt3xt
as an argument because custom helpers can pass their own override contexts. For any case where custom helpers
aren’t used, ___c0nt3xt
will be equivalent to the __sc0pe(___c0nt3xt, this)
stack created by its parent section. The inverse
function
works similarly, except that it is added when {{^a}}
and {{else}}
are used. var ___v1ew = []
is specified in fn
and inverse
to
ensure that live binding in nested sections works properly.
All of these nested sections will combine to return a compiled string that functions similar to EJS in its uses of can.view.txt
.
{
name: /^.*$/,
fn: function (content, cmd) {
var mode = false,
result = {
content: "",
startTxt: false,
startOnlyTxt: false,
end: false
};
Trim the content so we don’t have any trailing whitespace.
content = can.trim(content);
Determine what the active mode is.
#
- Truthy section^
- Falsey section/
- Close the prior sectionelse
- Inverted section (only exists within a truthy/falsey section) if (content.length && (mode = content.match(/^([#^/]|else$)/))) {
mode = mode[0];
switch (mode) {
/**
* @function can.mustache.helpers.section {{#key}}
* @parent can.mustache.tags 3
*
* @signature `{{#key}}BLOCK{{/key}}`
*
* Render blocks of text one or more times, depending
* on the value of the key in the current context.
*
* @param {can.mustache.key} key A key that references a value within the current or parent
* [can.mustache.context context]. If the value is a function or [can.compute], the
* function's return value is used.
*
*
* @return {String}
*
* Depending on the value's type, the following actions happen:
*
* - `Array` or [can.List] - the block is rendered for
* each item in the array. The [can.mustache.context context] is set to
* the item within each block rendering.
* - A `truthy` value - the block is rendered with the [can.mustache.context context]
* set to the value.
* - A `falsey` value - the block is not rendered.
*
* The rendered result of the blocks, block or an empty string is returned.
*
* @body
*
* Sections contain text blocks and evaluate whether to render it or not. If
* the object evaluates to an array it will iterate over it and render the block
* for each item in the array. There are four different types of sections.
*
* ## Falseys or Empty Arrays
*
* If the value returns a `false`, `undefined`, `null`, `""` or `[]` we consider
* that a *falsey* value.
*
* If the value is falsey, the section will **NOT** render the block.
*
* {
* friends: false
* }
*
* {{#friends}}
* Never shown!
* {{/friends}}
*
*
* ## Arrays
*
* If the value is a non-empty array, sections will iterate over the
* array of items, rendering the items in the block.
*
* For example, a list of friends will iterate
* over each of those items within a section.
*
* {
* friends: [
* { name: "Austin" },
* { name: "Justin" }
* ]
* }
*
*

* {{#friends}}
*
{{name}}

* {{/friends}}
*

*
* would render:
*
*

*
Austin

*
Justin

*

*
* Reminder: Sections will reset the current context to the value for which it is iterating.
* See the [basics of contexts](#Basics) for more information.
*
* ## Truthys
*
* When the value is a non-falsey object but not a list, it is considered truthy and will be used
* as the context for a single rendering of the block.
*
* {
* friends: { name: "Jon" }
* }
*
* {{#friends}}
* Hi {{name}}
* {{/friends}}
*
* would render:
*
* Hi Jon!
*
* ## Understanding when to use Sections with lists
*
* Section iteration will re-render the entire section for any change in the list. It is the prefered method to
* use when a list is replaced or changing significantly. Whereas [can.stache.helpers.each {{#each key}}] iteration
* will do basic diffing and aim to only update the DOM where the change occured. When doing single list item
* changes frequently, [can.stache.helpers.each {{#each key}}] iteration is the faster choice.
*
* For example, assuming "list" is a can.List instance:
*
* {{#if list}} will check for the truthy value of list. This is akin to checking for the truthy value of any JS object and will result to true, regardless of list contents or length.
*
* {{#if list.length}} will check for the truthy value of the length attribute. If you have an empty list, the length will be 0, so the #if will result to false and no contents will be rendered. If there is a length >= 1, this will result to true and the contents of the #if will be rendered.
*
* {{#each list}} and {{#list}} both iterate through an instance of can.List, however we setup the bindings differently.
*
* {{#each list}} will setup bindings on every individual item being iterated through, while {{#list}} will not. This makes a difference in two scenarios:
*
* 1) You have a large list, with minimal updates planned after initial render. In this case, {{#list}} might be more advantageous as there will be a faster initial render. However, if any part of the list changes, the entire {{#list}} area will be re-processed.
*
* 2) You have a large list, with many updates planned after initial render. A grid with many columns of editable fields, for instance. In this case, you many want to use {{#each list}}, even though it will be slower on initial render(we're setting up more bindings), you'll have faster updates as there are now many sections.
*/
/**
* @function can.mustache.helpers.helper {{helper args hashes}}
* @parent can.mustache.htags 0
*
* @description Calls a mustache helper function and inserts its return value into
* the rendered template.
*
* @signature `{{helper [args...] [hashProperty=hashValue...]}}`
*
* Calls a mustache helper function or a function. For example:
*
* The template:
*
*
{{madLib "Lebron James" verb 4 foo="bar"}}

*
* Rendered with:
*
* {verb: "swept"}
*
* Will call a `madLib` helper with the following arguements:
*
* can.mustache.registerHelper('madLib',
* function(subject, verb, number, options){
* // subject -> "Lebron James"
* // verb -> "swept"
* // number -> 4
* // options.hash.foo -> "bar"
* });
*
* @param {can.mustache.key} helper A key that finds a [can.mustache.helper helper function]
* that is either [can.mustache.registerHelper registered] or found within the
* current or parent [can.mustache.context context].
*
* @param {...can.mustache.key|String|Number} [args] Space seperated arguments
* that get passed to the helper function as arguments. If the key's value is a:
*
* - [can.Map] - A getter/setter [can.compute] is passed.
* - [can.compute] - The can.compute is passed.
* - `function` - The function's return value is passed.
*
* @param {String} hashProperty
*
* A property name that gets added to a [can.mustache.helperOptions helper options]'s
* hash object.
*
* @param {...can.mustache.key|String|Number} hashValue A value that gets
* set as a property value of the [can.mustache.helperOptions helper option argument]'s
* hash object.
*
* @body
*
* ## Use
*
* The `{{helper}}` syntax is used to call out to Mustache [can.mustache.helper helper functions] functions
* that may contain more complex functionality. `helper` is a [can.mustache.key key] that must match either:
*
* - a [can.mustache.registerHelper registered helper function], or
* - a function in the current or parent [can.mustache.context contexts]
*
* The following example shows both cases.
*
* The Template:
*
*
{{greeting}} {{user}}

*
* Rendered with data:
*
* {
* user: function(){ return "Justin" }
* }
*
* And a with a registered helper like:
*
* can.mustache.registerHelper('greeting', function(){
* return "Hello"
* });
*
* Results in:
*
*
Hello Justin

*
* ## Arguments
*
* Arguments can be passed from the template to helper function by
* listing space seperated strings, numbers or other [can.mustache.key keys] after the
* `helper` name. For example:
*
* The template:
*
*
{{madLib "Lebron James" verb 4}}

*
* Rendered with:
*
* {verb: "swept"}
*
* Will call a `madLib` helper with the following arguements:
*
* can.mustache.registerHelper('madLib',
* function(subject, verb, number, options){
* // subject -> "Lebron James"
* // verb -> "swept"
* // number -> 4
* });
*
* If an argument `key` value is a [can.Map] property, the Observe's
* property is converted to a getter/setter [can.compute]. For example:
*
* The template:
*
*
What! My name is: {{mr user.name}}

*
* Rendered with:
*
* {user: new can.Map({name: "Slim Shady"})}
*
* Needs the helper to check if name is a function or not:
*
* can.mustache.registerHelper('mr',function(name){
* return "Mr. "+ (typeof name === "function" ?
* name():
* name)
* })
*
* This behavior enables two way binding helpers and is explained in more detail
* on the [can.mustache.helper helper functions] docs.
*
* ## Hash
*
* If enumerated arguments isn't an appropriate way to configure the behavior
* of a helper, it's possible to pass a hash of key-value pairs to the
* [can.mustache.helperOptions helper option argument]'s
* hash object. Properties and values are specified
* as `hashProperty=hashValue`. For example:
*
* The template:
*
*
My {{excuse who=pet how="shreded"}}

* `
* And the helper:
*
* can.mustache.registerHelper("excuse",function(options){
* return ["My",
* options.hash.who || "dog".
* options.hash.how || "ate",
* "my",
* options.hash.what || "homework"].join(" ")
* })
*
* Render with:
*
* {pet: "cat"}
*
* Results in:
*
*
My cat shareded my homework

*
* ## Returning an element callback function
*
* If a helper returns a function, that function is called back after
* the template has been rendered into DOM elements. This can
* be used to create mustache tags that have rich behavior. Read about it
* on the [can.mustache.helper helper function] page.
*
*/
/**
* @function can.mustache.helpers.sectionHelper {{#helper args hashes}}
* @parent can.mustache.htags 1
*
* Calls a mustache helper function with a block, and optional inverse
* block.
*
* @signature `{{#helper [args...] [hashName=hashValue...]}}BLOCK{{/helper}}`
*
* Calls a mustache helper function or a function with a block to
* render.
*
* The template:
*
*
{{#countTo number}}{{num}}{{/countTo}}

*
* Rendered with:
*
* {number: 5}
*
* Will call the `countTo` helper:
*
* can.mustache.registerHelper('countTo',
* function(number, options){
* var out = [];
* for(var i =0; i < number; i++){
* var docFrag = options.fn({num: i+1});
* out.push( docFrag.textContent );
* }
* return out.join(" ");
* });
*
* Results in:
*
*
1 2 3 4 5

*
* @param {can.mustache.key} helper A key that finds a [can.mustache.helper helper function]
* that is either [can.mustache.registerHelper registered] or found within the
* current or parent [can.mustache.context context].
*
* @param {...can.mustache.key|String|Number} [args] Space seperated arguments
* that get passed to the helper function as arguments. If the key's value is a:
*
* - [can.Map] - A getter/setter [can.compute] is passed.
* - [can.compute] - The can.compute is passed.
* - `function` - The function's return value is passed.
*
* @param {String} hashProperty
*
* A property name that gets added to a [can.mustache.helperOptions helper options]'s
* hash object.
*
* @param {...can.mustache.key|String|Number} hashValue A value that gets
* set as a property value of the [can.mustache.helperOptions helper option argument]'s
* hash object.
*
* @param {mustache} BLOCK A mustache template that gets compiled and
* passed to the helper function as the [can.mustache.helperOptions options argument's] `fn`
* property.
*
*
* @signature `{{#helper [args...] [hashName=hashValue...]}}BLOCK{{else}}INVERSE{{/helper}}`
*
* Calls a mustache helper function or a function with a `fn` and `inverse` block to
* render.
*
* The template:
*
*
The bed is
* {{#isJustRight firmness}}
* pefect!
* {{else}}
* uncomfortable.
* {{/justRight}}

*
* Rendered with:
*
* {firmness: 45}
*
* Will call the `isJustRight` helper:
*
* can.mustache.registerHelper('isJustRight',
* function(number, options){
* if(number > 50){
* return options.fn(this);
* } else {
* return options.inverse(this);
* }
* });
*
* Results in:
*
*
The bed is uncomfortable.

*
* @param {can.mustache.key} helper A key that finds a [can.mustache.helper helper function]
* that is either [can.mustache.registerHelper registered] or found within the
* current or parent [can.mustache.context context].
*
* @param {...can.mustache.key|String|Number} [args] Space seperated arguments
* that get passed to the helper function as arguments. If the key's value is a:
*
* - [can.Map] - A getter/setter [can.compute] is passed.
* - [can.compute] - The can.compute is passed.
* - `function` - The function's return value is passed.
*
* @param {String} hashProperty
*
* A property name that gets added to a [can.mustache.helperOptions helper options]'s
* hash object.
*
* @param {...can.mustache.key|String|Number} hashValue A value that gets
* set as a property value of the [can.mustache.helperOptions helper option argument]'s
* hash object.
*
* @param {mustache} BLOCK A mustache template that gets compiled and
* passed to the helper function as the [can.mustache.helperOptions options argument's] `fn`
* property.
*
* @param {mustache} INVERSE A mustache template that gets compiled and
* passed to the helper function as the [can.mustache.helperOptions options argument's] `inverse`
* property.
*
*
* @body
*
* ## Use
*
* Read the [use section of {{helper}}](can.mustache.helpers.helper.html#section_Use) to better understand how:
*
* - [Helper functions are found](can.mustache.helpers.helper.html#section_Arguments)
* - [Arguments are passed to the helper](can.mustache.helpers.helper.html#section_Arguments)
* - [Hash values are passed to the helper](can.mustache.helpers.helper.html#section_Hash)
*
* Read how [helpers that return functions](can.mustache.helper.html#section_Returninganelementcallbackfunction) can
* be used for rich behavior like 2-way binding.
*
*/
Open a new section.
case '#':
/**
* @function can.mustache.helpers.inverse {{^key}}
* @parent can.mustache.tags 5
*
* @signature `{{^key}}BLOCK{{/key}}`
*
* Render blocks of text if the value of the key
* is falsey. An inverted section syntax is similar to regular
* sections except it begins with a caret rather than a
* pound. If the value referenced is falsey, the section will render.
*
* @param {can.mustache.key} key A key that references a value within the current or parent
* [can.mustache.context context]. If the value is a function or [can.compute], the
* function's return value is used.
*
* @return {String}
*
* Depending on the value's type, the following actions happen:
*
* - A `truthy` value - the block is not rendered.
* - A `falsey` value - the block is rendered.
*
* The rendered result of the block or an empty string is returned.
*
* @body
*
* ## Use
*
* Inverted sections match falsey values. An inverted section
* syntax is similar to regular sections except it begins with a caret
* rather than a pound. If the value referenced is falsey, the section
* will render. For example:
*
*
* The template:
*
*

* {{#friends}}
*
{{name}}

* {{/friends}}
* {{^friends}}
*
No friends.

* {{/friends}}
*

*
* And data:
*
* {
* friends: []
* }
*
* Results in:
*
*
*

*
No friends.

*

*/
case '^':
if (cmd.specialAttribute) {
result.startOnlyTxt = true;
result.push(cmd.insert + ‘can.view.onlytxt(this,function(){ return ‘);
} else {
result.startTxt = true;
sections should never be escaped
result.escaped = 0;
result.push(cmd.insert + ‘can.view.txt(0,\’’ + cmd.tagName + ‘\’,’ + cmd.status + ‘,this,function(){ return ‘);
}
break;
Close the prior section.
/**
* @function can.mustache.helpers.close {{/key}}
* @parent can.mustache.tags 4
*
* @signature `{{/key}}`
*
* Ends a [can.mustache.helpers.section {{#key}}] or [can.mustache.helpers.sectionHelper {{#helper}}]
* block.
*
* @param {can.mustache.key} [key] A key that matches the opening key or helper name. It's also
* possible to simply write `{{/}}` to end a block.
*/
case '/':
result.end = true;
result.content += 'return ___v1ew.join("");}}])';
return result;
}
Trim the mode off of the content.
content = content.substring(1);
}
else
helpers are special and should be skipped since they don’t
have any logic aside from kicking off an inverse
function.
if (mode !== 'else') {
var args = [],
hashes = [],
i = 0,
m;
Start the content render block.
result.content += 'can.Mustache.txt(\n' +
(cmd.specialAttribute ? SPECIAL_CONTEXT_OBJ : CONTEXT_OBJ ) +
',\n' + (mode ? '"' + mode + '"' : 'null') + ',';
Parse the helper arguments. This needs uses this method instead of a split(/\s/) so that strings with spaces can be correctly parsed.
(can.trim(content) + ' ')
.replace(argumentsRegExp, function (whole, arg) {
Check for special helper arguments (string/number/boolean/hashes).
if (i && (m = arg.match(literalNumberStringBooleanRegExp))) {
Found a native type like string/number/boolean.
if (m[2]) {
args.push(m[0]);
}
Found a hash object.
else {
Addd to the hash object.
hashes.push(m[4] + ":" + (m[6] ? m[6] : makeLookupLiteral(m[5])));
}
}
Otherwise output a normal interpolation reference.
else {
args.push(makeLookupLiteral(arg));
}
i++;
});
result.content += args.join(",");
if (hashes.length) {
result.content += ",{" + HASH + ":{" + hashes.join(",") + "}}";
}
}
Create an option object for sections of code.
if (mode && mode !== 'else') {
result.content += ',[\n\n';
}
switch (mode) {
Truthy section
case '^':
case '#':
result.content += ('{fn:function(' + ARG_NAMES + '){var ___v1ew = [];');
break;
If/else section Falsey section
/**
* @function can.mustache.helpers.else {{else}}
* @parent can.mustache.htags 3
*
* @signature `{{#helper}}BLOCK{{else}}INVERSE{{/helper}}`
*
* Creates an `inverse` block for a [can.mustache.helper helper function]'s
* [can.mustache.helperOptions options argument]'s `inverse` property.
*
* @param {can.mustache} INVERSE a mustache template coverted to a
* function and set as the [can.mustache.helper helper function]'s
* [can.mustache.helperOptions options argument]'s `inverse` property.
*
* @body
*
* ## Use
*
* For more information on how `{{else}}` is used checkout:
*
* - [can.mustache.helpers.if {{if key}}]
* - [can.mustache.helpers.sectionHelper {{#helper}}]
*
*/
case 'else':
result.content += 'return ___v1ew.join("");}},\n{inverse:function(' + ARG_NAMES + '){\nvar ___v1ew = [];';
break;
Not a section, no mode
default:
result.content += (')');
break;
}
if (!mode) {
result.startTxt = true;
result.end = true;
}
return result;
}
}
]
})
});
Add in default scanner helpers first. We could probably do this differently if we didn’t ‘break’ on every match.
var helpers = can.view.Scanner.prototype.helpers;
for (var i = 0; i < helpers.length; i++) {
Mustache.prototype.scanner.helpers.unshift(helpers[i]);
}
/**
* @function can.MustacheConstructor.txt
* @hide
*
* Evaluates the resulting string based on the context/name.
*
* @param {Object|Array} context The context stack to be used with evaluation.
* @param {String} mode The mode to evaluate the section with: # for truthy, ^ for falsey
* @param {String|Object} name The string (or sometimes object) to pass to the given helper method.
*/
Mustache.txt = function (scopeAndOptions, mode, name) {
here we are going to cache the lookup values so future calls are much faster
var scope = scopeAndOptions.scope,
options = scopeAndOptions.options,
args = [],
helperOptions = {
fn: function () {},
inverse: function () {}
},
hash,
context = scope.attr("."),
getHelper = true,
helper;
convert lookup values to actual values in name, arguments, and hash
for (var i = 3; i < arguments.length; i++) {
var arg = arguments[i];
if (mode && can.isArray(arg)) {
merge into options
helperOptions = can.extend.apply(can, [helperOptions].concat(arg));
} else if (arg && arg[HASH]) {
hash = arg[HASH];
get values on hash
for (var prop in hash) {
if (isLookup(hash[prop])) {
hash[prop] = Mustache.get(hash[prop].get, scopeAndOptions, false, true);
}
}
} else if (arg && isLookup(arg)) {
args.push(Mustache.get(arg.get, scopeAndOptions, false, true, true));
} else {
args.push(arg);
}
}
if (isLookup(name)) {
var get = name.get;
name = Mustache.get(name.get, scopeAndOptions, args.length, false);
Base whether or not we will get a helper on whether or not the original name.get and Mustache.get resolve to the same thing. Saves us from running into issues like {{text}} / {text: ‘with’}
getHelper = (get === name);
}
overwrite fn and inverse to always convert to scopes
helperOptions.fn = makeConvertToScopes(helperOptions.fn, scope, options);
helperOptions.inverse = makeConvertToScopes(helperOptions.inverse, scope, options);
if mode is ^, swap fn and inverse
if(mode === '^') {
var tmp = helperOptions.fn;
helperOptions.fn = helperOptions.inverse;
helperOptions.inverse = tmp;
}
Check for a registered helper or a helper-like function.
if (helper = (getHelper && (typeof name === "string" && Mustache.getHelper(name, options)) || (can.isFunction(name) && !name.isComputed && {
fn: name
}))) {
Add additional data to be used by helper functions
can.extend(helperOptions, {
context: context,
scope: scope,
contexts: scope,
hash: hash
});
args.push(helperOptions);
Call the helper.
return function () {
var result = helper.fn.apply(context, args);
return result == null ? '' : result;
};
}
/*if( !mode && !args.length && can.isFunction(name) && name.isComputed ) {
if(!scopeAndOptions.special) {
name.canReadForChangeEvent = false;
}
return name;
}*/
return function () {
{{#foo.bar zed ted}}
var value;
if (can.isFunction(name) && name.isComputed) {
value = name();
} else {
value = name;
}
An array of arguments to check for truthyness when evaluating sections.
var validArgs = args.length ? args : [value],
Whether the arguments meet the condition of the section.
valid = true,
result = [],
i, argIsObserve, arg;
Validate the arguments based on the section mode.
if (mode) {
for (i = 0; i < validArgs.length; i++) {
arg = validArgs[i];
argIsObserve = typeof arg !== 'undefined' && isObserveLike(arg);
Array-like objects are falsey if their length = 0.
if (isArrayLike(arg)) {
Use .attr to trigger binding on empty lists returned from function
if (mode === '#') {
valid = valid && !! (argIsObserve ? arg.attr('length') : arg.length);
} else if (mode === '^') {
valid = valid && !(argIsObserve ? arg.attr('length') : arg.length);
}
}
Otherwise just check if it is truthy or not.
else {
valid = mode === '#' ? valid && !! arg : mode === '^' ? valid && !arg : valid;
}
}
}
Otherwise interpolate like normal.
if (valid) {
if (mode === "#") {
if (isArrayLike(value)) {
var isObserveList = isObserveLike(value);
Add the reference to the list in the contexts.
for (i = 0; i < value.length; i++) {
result.push(helperOptions.fn(
isObserveList ? value.attr('' + i) : value[i]));
}
return result.join('');
}
Normal case.
else {
return helperOptions.fn(value || {}) || '';
}
} else if (mode === "^") {
return helperOptions.inverse(value || {}) || '';
} else {
return '' + (value != null ? value : '');
}
}
return '';
};
};
/**
* @function can.MustacheConstructor.get
* @hide
*
* Resolves a key for a given object (and then a context if that fails).
*
* obj = this
* context = { a: true }
* ref = 'a.b.c'
* => obj.a.b.c || context.a.b.c || ''
*
* This implements the following Mustache specs:
* Deeply Nested Contexts
* All elements on the context stack should be accessible.
*
* {{#bool}}B {{#bool}}C{{/bool}} D{{/bool}}
* { bool: true }
* => "B C D"
*
* Basic Context Miss Interpolation
* Failed context lookups should default to empty strings.
*
* {{cannot}}
* => ""
*
* Dotted Names - Broken Chains
* Any falsey value prior to the last part of the name should yield ''.
* {{a.b.c}}
* { a: { d: 1 } }
* => ""
*
* @param {can.mustache.key} key The reference to check for on the obj/context.
* @param {Object} obj The object to use for checking for a reference.
* @param {Object} context The context to use for checking for a reference if it doesn't exist in the object.
* @param {Boolean} [isHelper] Whether the reference is seen as a helper.
*/
Mustache.get = function (key, scopeAndOptions, isHelper, isArgument, isLookup) {
Cache a reference to the current context and options, we will use them a bunch.
var context = scopeAndOptions.scope.attr('.'),
options = scopeAndOptions.options || {};
If key is called as a helper,
if (isHelper) {
try to find a registered helper.
if (Mustache.getHelper(key, options)) {
return key;
}
Support helper-like functions as anonymous helpers. Check if there is a method directly in the “top” context.
if (scopeAndOptions.scope && can.isFunction(context[key])) {
return context[key];
}
!steal-remove-start
can.dev.warn('can/view/mustache/mustache.js: Unable to find helper "' + key + '".');
!steal-remove-end
}
Get a compute (and some helper data) that represents key’s value in the current scope
var computeData = scopeAndOptions.scope.computeData(key, {
isArgument: isArgument,
args: [context, scopeAndOptions.scope]
}),
compute = computeData.compute;
Bind on the compute to cache its value. We will unbind in a timeout later.
can.compute.temporarilyBind(compute);
computeData gives us an initial value
var initialValue = computeData.initialValue,
helperObj = Mustache.getHelper(key, options);
!steal-remove-start
if (initialValue === undefined && !isHelper && !helperObj) {
can.dev.warn('can/view/mustache/mustache.js: Unable to find key "' + key + '".');
}
!steal-remove-end
Use helper over the found value if the found value isn’t in the current context
if (!isLookup && (initialValue === undefined || computeData.scope !== scopeAndOptions.scope) && Mustache.getHelper(key, options)) {
return key;
}
If there are no dependencies, just return the value.
if (!compute.computeInstance.hasDependencies) {
return initialValue;
} else {
return compute;
}
};
/**
* @hide
*
* Resolves an object to its truthy equivalent.
*
* @param {Object} value The object to resolve.
* @return {Object} The resolved object.
*/
Mustache.resolve = function (value) {
if (isObserveLike(value) && isArrayLike(value) && value.attr('length')) {
return value;
} else if (can.isFunction(value)) {
return value();
} else {
return value;
}
};
/**
* @static
*/
Helpers are functions that can be called from within a template. These helpers differ from the scanner helpers in that they execute at runtime instead of during compilation.
Custom helpers can be added via can.Mustache.registerHelper
,
but there are also some built-in helpers included by default.
Most of the built-in helpers are little more than aliases to actions
that the base version of Mustache simply implies based on the
passed in object.
Built-in helpers:
data
- data
is a special helper that is implemented via scanning helpers.
It hooks up the active element to the active data object:

if
- Renders a truthy section: {{#if var}} render {{/if}}
unless
- Renders a falsey section: {{#unless var}} render {{/unless}}
each
- Renders an array: {{#each array}} render {{this}} {{/each}}
with
- Opens a context section: {{#with var}} render {{/with}}
Mustache._helpers = {};
/**
* @function can.mustache.registerHelper
* @parent can.mustache.methods
* @description Register a helper.
* @function can.mustache.registerHelper registerHelper
* @signature `Mustache.registerHelper(name, helper)`
* @param {String} name The name of the helper.
* @param {can.mustache.helper} helper The helper function.
*
* @body
* Registers a helper with the Mustache system.
* Pass the name of the helper followed by the
* function to which Mustache should invoke.
* These are run at runtime.
*/
Mustache.registerHelper = function (name, fn) {
this._helpers[name] = {
name: name,
fn: fn
};
};
/**
* @function can.mustache.registerSimpleHelper
* @parent can.mustache.methods
* @description Register a simple helper.
* @function can.mustache.registerSimpleHelper registerSimpleHelper
* @signature `Mustache.registerSimpleHelper(name, helper)`
* @param {String} name The name of the helper.
* @param {can.mustache.simplehelper} helper The simple helper function.
*
* @body
* Registers a helper with the Mustache system that passes the values
* instead of computes as arguments. This is useful if your helper does not
* modify the argument computes and you only need the actual values.
* Pass the name of the helper followed by the
* function to which Mustache should invoke.
* These are run at runtime.
*/
Mustache.registerSimpleHelper = function(name, fn) {
Mustache.registerHelper(name, can.view.simpleHelper(fn));
};
/**
* @hide
* @function can.MustacheConstructor.getHelper getHelper
* @description Retrieve a helper.
* @signature `Mustache.getHelper(name)`
* @param {String} name The name of the helper.
* @return {Function|null} The helper, or `null` if
* no helper by that name is found.
*
* @body
* Returns a helper given the name.
*/
Mustache.getHelper = function (name, options) {
var helper;
if (options) {
helper = options.get("helpers." + name,{proxyMethods: false});
}
return helper ? {
fn: helper
} : this._helpers[name];
};
/**
* @function can.MustacheConstructor.static.render render
* @hide
* @parent can.Mustache.static
* @signature `Mustache.render(partial, context)`
* @param {Object} partial
* @param {can.view.Scope} scope
*
* @body
* `Mustache.render` is a helper method that calls
* into `can.view.render` passing the partial
* and the context object.
*
* Its purpose is to determine if the partial object
* being passed represents a template like:
*
* partial === "movember.mustache"
*
* or if the partial is a variable name that represents
* a partial on the context object such as:
*
* context[partial] === "movember.mustache"
*/
Mustache.render = function (partial, scope, options) {
TOOD: clean up the following If there is a “partial” property and there is not an already-cached partial, we use the value of the property to look up the partial
if this partial is not cached …
if (!can.view.cached[partial]) {
we don’t want to bind to changes so clear and restore reading
can.__notObserve(function(){
var scopePartialName = scope.attr(partial);
if (scopePartialName) {
partial = scopePartialName;
}
})();
}
Call into can.view.render
passing the
partial and scope.
return can.view.render(partial, scope, options);
};
/**
* @function can.mustache.safeString
* @parent can.mustache.methods
*
* @signature `can.mustache.safeString(str)`
*
* @param {String} str A string you don't want to become escaped.
* @return {String} A string flagged by `can.mustache` as safe, which will
* not become escaped, even if you use [can.mustache.tags.unescaped](triple slash).
*
* @body
* If you write a helper that generates its own HTML, you will
* usually want to return a `can.mustache.safeString.` In this case,
* you will want to manually escape parameters with `[can.esc].`
*
* ```
* can.mustache.registerHelper('link', function(text, url) {
* text = can.esc(text);
* url = can.esc(url);
*
* var result = '<a href="' + url + '">' + text + '</a>';
* return can.mustache.safeString(result);
* });
* ```
*
* Rendering:
* ```
* <div>{{link "Google", "http://google.com"}}</div>
* ```
*
* Results in:
*
* ```
* <div><a href="http://google.com">Google</a></div>
* ```
*
* As an anchor tag whereas if we would have just returned the result rather than a
* `can.mustache.safeString` our template would have rendered a div with the escaped anchor tag.
*
*/
Mustache.safeString = function (str) {
return {
toString: function () {
return str;
}
};
};
Mustache.renderPartial = function (partialName, scope, options) {
var partial = options.get("partials." + partialName,{proxyMethods: false});
if (partial) {
return partial.render ? partial.render(scope, options) :
partial(scope, options);
} else {
return can.Mustache.render(partialName, scope, options);
}
};
The built-in Mustache helpers.
can.each({
Implements the if
built-in helper.
/**
* @function can.mustache.helpers.if {{#if key}}
* @parent can.mustache.htags 2
* @signature `{{#if key}}BLOCK{{/if}}`
*
* Renders the `BLOCK` template within the current template.
*
* @param {can.mustache.key} key A key that references a value within the current or parent
* context. If the value is a function or can.compute, the function's return value is used.
*
* @param {can.mustache} BLOCK A mustache template.
*
* @return {String} If the key's value is truthy, the `BLOCK` is rendered with the
* current context and its value is returned; otherwise, an empty string.
*
* @body
*
* ## Use
*
* `{{#if key}}` provides explicit conditional truthy tests. For example,
*
* The template:
*
* {{#if user.isFemale}}
* {{#if user.isMarried}}
* Mrs
* {{/if}}
* {{#if user.isSingle}}
* Miss
* {{/if}}
* {{/if}}
*
* Rendered with:
*
* {user: {isFemale: true, isMarried: true}}
*
* Results in:
*
* Mrs
*
* If can be used with [can.mustache.helpers.else {{else}}] too. For example,
*
* {{#if user.isFemale}}
* {{#if user.isMarried}}
* Mrs
* {{else}}
* Miss
* {{/if}}
* {{/if}}
*
* Rendered with:
*
* {user: {isFemale: true, isMarried: false}}
*
* Results in:
*
* Miss
*/
'if': function (expr, options) {
var value;
if it’s a function, wrap its value in a compute that will only change values from true to false
if (can.isFunction(expr)) {
value = can.compute.truthy(expr)();
} else {
value = !! Mustache.resolve(expr);
}
if (value) {
return options.fn(options.contexts || this);
} else {
return options.inverse(options.contexts || this);
}
},
/**
* @function can.stache.helpers.is {{#is expr1 expr2 expr3}}
* @parent can.stache.htags 12
*
* @signature `{{#is expr1 expr2}}BLOCK{{/is}}`
*
* Renders the `BLOCK` template within the current template.
*
* @param {can.stache.expression} [expr...] An expression or key that references a
* value within the current or parent
*
* @param {can.stache} BLOCK A template that is rendered
* if the result of comparsion `expr1` and `expr2` value is truthy.
*
* @return {DocumentFragment} If the key's value is truthy, the `BLOCK` is rendered with the
* current context and its value is returned; otherwise, an empty string.
*
* @body
*
* The `is` helper compares expr1 and expr2 and renders the blocks accordingly.
*
* {{#is expr1 expr2}}
* // truthy
* {{else}}
* // falsey
* {{/is}}
*/
'is': function() {
var lastValue, curValue,
options = arguments[arguments.length - 1];
if (arguments.length - 2 <= 0) {
return options.inverse();
}
for (var i = 0; i < arguments.length - 1; i++) {
curValue = Mustache.resolve(arguments[i]);
curValue = can.isFunction(curValue) ? curValue() : curValue;
if (i > 0) {
if (curValue !== lastValue) {
return options.inverse();
}
}
lastValue = curValue;
}
return options.fn();
},
'eq': function() {
return Mustache._helpers.is.fn.apply(this, arguments);
},
Implements the unless
built-in helper.
/**
* @function can.mustache.helpers.unless {{#unless key}}
* @parent can.mustache.htags 4
*
* @signature `{{#unless key}}BLOCK{{/unless}}`
*
* Render the block of text if the key's value is falsey.
*
* @param {can.mustache.key} key A key that references a value within the current or parent
* context. If the value is a function or can.compute, the function's
* return value is used.
*
* @param {can.mustache} BLOCK A template that is rendered
* if the `key`'s value is falsey.
*
* @body
*
* The `unless` helper evaluates the inverse of the value
* of the key and renders the block between the helper and the slash.
*
* {{#unless expr}}
* // unless
* {{/unless}}
*/
'unless': function (expr, options) {
return Mustache._helpers['if'].fn.apply(this, [expr, can.extend({}, options, {
fn: options.inverse,
inverse: options.fn
})]);
},
Implements the each
built-in helper.
/**
* @function can.mustache.helpers.each {{#each key}}
* @parent can.mustache.htags 5
*
* @signature `{{#each key}}BLOCK{{/each}}`
*
* Render the block of text for each item in key's value.
*
* @param {can.mustache.key} key A key that references a value within the current or parent
* context. If the value is a function or can.compute, the function's
* return value is used.
*
* If the value of the key is a [can.List], the resulting HTML is updated when the
* list changes. When a change in the list happens, only the minimum amount of DOM
* element changes occur.
*
* If the value of the key is a [can.Map], the resulting HTML is updated whenever
* attributes are added or removed. When a change in the map happens, only
* the minimum amount of DOM element changes occur.
*
* @param {can.mustache} BLOCK A template that is rendered for each item in
* the `key`'s value. The `BLOCK` is rendered with the context set to the item being rendered.
*
* @body
*
* ## Use
*
* Use the `each` helper to iterate over a array
* of items and render the block between the helper and the slash. For example,
*
* The template:
*
*

* {{#each friends}}
*
{{name}}

* {{/each}}
*

*
* Rendered with:
*
* {friends: [{name: "Austin"},{name: "Justin"}]}
*
* Renders:
*
*

*
Austin

*
Justin

*

*
* ## Object iteration
*
* As of 2.1, you can now iterate over properties of objects and attributes with
* the `each` helper. When iterating over [can.Map] it will only iterate over the
* map's [keys](can.Map.keys.html) and none of the hidden properties of a can.Map. For example,
*
* The template:
*
*

* {{#each person}}
*
{{.}}

* {{/each}}
*

*
* Rendered with:
*
* {person: {name: 'Josh', age: 27}}
*
* Renders:
*
*

*
Josh

*
27

*

*
* ## Understanding when to use #each with lists
*
* {{#each key}} iteration will do basic diffing and aim to only update the DOM where the change occured. Whereas
* [can.stache.Sections Sections] iteration will re-render the entire section for any change in the list.
* [can.stache.Sections Sections] iteration is the prefered method to use when a list is replaced or changing significantly.
* When doing single list item changes frequently, {{#each key}} iteration is the faster choice.
*
* For example, assuming "list" is a can.List instance:
*
* {{#if list}} will check for the truthy value of list. This is akin to checking for the truthy value of any JS object and will result to true, regardless of list contents or length.
*
* {{#if list.length}} will check for the truthy value of the length attribute. If you have an empty list, the length will be 0, so the #if will result to false and no contents will be rendered. If there is a length >= 1, this will result to true and the contents of the #if will be rendered.
*
* {{#each list}} and {{#list}} both iterate through an instance of can.List, however we setup the bindings differently.
*
* {{#each list}} will setup bindings on every individual item being iterated through, while {{#list}} will not. This makes a difference in two scenarios:
*
* 1) You have a large list, with minimal updates planned after initial render. In this case, {{#list}} might be more advantageous as there will be a faster initial render. However, if any part of the list changes, the entire {{#list}} area will be re-processed.
*
* 2) You have a large list, with many updates planned after initial render. A grid with many columns of editable fields, for instance. In this case, you many want to use {{#each list}}, even though it will be slower on initial render(we're setting up more bindings), you'll have faster updates as there are now many sections.
*/
'each': function (expr, options) {
Check if this is a list or a compute that resolves to a list, and setup the incremental live-binding
First, see what we are dealing with. It’s ok to read the compute because can.view.text is only temporarily binding to what is going on here. Calling can.view.lists prevents anything from listening on that compute.
var resolved = Mustache.resolve(expr),
result = [],
keys,
key,
i;
When resolved === undefined, the property hasn’t been defined yet Assume it is intended to be a list
if (can.view.lists && (resolved instanceof can.List || (expr && expr.isComputed && resolved === undefined))) {
return can.view.lists(expr, function (item, index) {
return options.fn(options.scope.add({
"@index": index
})
.add(item));
});
}
expr = resolved;
if ( !! expr && isArrayLike(expr)) {
for (i = 0; i < expr.length; i++) {
result.push(options.fn(options.scope.add({
"@index": i
})
.add(expr[i])));
}
return result.join('');
} else if (isObserveLike(expr)) {
keys = can.Map.keys(expr);
listen to keys changing so we can livebind lists of attributes.
for (i = 0; i < keys.length; i++) {
key = keys[i];
result.push(options.fn(options.scope.add({
"@key": key
})
.add(expr[key])));
}
return result.join('');
} else if (expr instanceof Object) {
for (key in expr) {
result.push(options.fn(options.scope.add({
"@key": key
})
.add(expr[key])));
}
return result.join('');
}
},
Implements the with
built-in helper.
/**
* @function can.mustache.helpers.with {{#with key}}
* @parent can.mustache.htags 6
*
* @signature `{{#with key}}BLOCK{{/with}}`
*
* Changes the context within a block.
*
* @param {can.mustache.key} key A key that references a value within the current or parent
* context. If the value is a function or can.compute, the function's
* return value is used.
*
* @param {can.mustache} BLOCK A template that is rendered
* with the context of the `key`'s value.
*
* @body
*
* Mustache typically applies the context passed in the section
* at compiled time. However, if you want to override this
* context you can use the `with` helper.
*
* {{#with arr}}
* // with
* {{/with}}
*/
'with': function (expr, options) {
var ctx = expr;
expr = Mustache.resolve(expr);
if ( !! expr) {
return options.fn(ctx);
}
},
/**
* @function can.mustache.helpers.log {{log}}
* @parent can.mustache.htags 9
*
* @signature `{{#log [message]}}`
*
* Logs the context of the current block with an optional message.
*
* @param {*} message An optional message to log out in addition to the
* current context.
*
*/
'log': function (expr, options) {
if(typeof console !== "undefined" && console.log) {
if (!options) {
console.log(expr.context);
} else {
console.log(expr, options.context);
}
}
},
/**
* @function can.mustache.helpers.elementCallback {{(el)->CODE}}
*
* @parent can.mustache.htags 8
*
* @signature `{{(el) -> CODE}}`
*
* Executes an element callback with the inline code on the element.
*
* @param {String} code The inline code to execute on the element.
*
* @body
*
* ## Use
*
* It is common for you to want to execute some code on a given
* DOM element. An example would be for initializing a jQuery plugin
* on the new HTML.
*
*
 el.jquery_tabs()}}>

*
*/
/**
* @function can.mustache.helpers.index {{@index}}
*
* @parent can.mustache.htags 10
*
* @signature `{{@index [offset]}}`
*
* Insert the index of an Array or can.List we are iterating on with [#each](can.mustache.helpers.each)
*
* @param {Number} offset The number to optionally offset the index by.
*
* @body
*
* ## Use
*
* When iterating over and array or list of items, you might need to render the index
* of the item. Use the `@index` directive to do so. For example,
*
* The template:
*
*

* {{#each items}}
*
 {{@index}} - {{.}}

* {{/each}}
*

*
* Rendered with:
*
* { items: ['Josh', 'Eli', 'David'] }
*
* Renders:
*
*

*
 0 - Josh

*
 1 - Eli

*
 2 - David

*

*
*/
"@index": function(offset, options) {
if (!options) {
options = offset;
offset = 0;
}
var index = options.scope.read("@index",{isArgument: true}).value;
return ""+((can.isFunction(index) ? index() : index) + offset);
}
/**
* @function can.mustache.helpers.key {{@key}}
*
* @parent can.mustache.htags 11
*
* @signature `{{@key}}`
*
* Insert the property name of an Object or attribute name of a can.Map that we iterate over with [#each](can.mustache.helpers.each)
*
* @body
*
* ## Use
*
* Use `{{@key}}` to render the property or attribute name of an Object or can.Map, when iterating over it with [#each](can.mustache.helpers.each). For example,
*
* The template:
*
*

* {{#each person}}
*
 {{@key}}: {{.}}

* {{/each}}
*

*
* Rendered with:
*
* { person: {name: 'Josh', age: 27, likes: 'Mustache, JavaScript, High Fives'} }
*
* Renders:
*
*

*
 name: Josh

*
 age: 27

*
 likes: Mustache, JavaScript, High Fives

*

*
*/
}, function (fn, name) {
Mustache.registerHelper(name, fn);
});
can.view.register({
suffix: "mustache",
contentType: "x-mustache-template",
Returns a function
that renders the view.
script: function (id, src) {
return "can.Mustache(function(" + ARG_NAMES + ") { " + new Mustache({
text: src,
name: id
})
.template.out + " })";
},
renderer: function (id, text) {
return Mustache({
text: text,
name: id
});
}
});
can.mustache.registerHelper = can.proxy(can.Mustache.registerHelper, can.Mustache);
can.mustache.safeString = can.Mustache.safeString;
return can;
});


The Avengers (1998) Ralph Fiennes ,Uma Thurman, Sean Connery, Jim Broadbent, Fiona Shaw, Eddie Izzard, Eileen Atkins, John Wood, Patrick Macnee. Screenplay by Don MacPherson. Directed by Jeremiah S. Chechik. 90 minutes. Rated PG-13, 0.5 stars (out of five stars)
Review by Ed Johnson-Ott, NUVO Newsweekly www.nuvo-online.com/film/ Archive reviews at http://us.imdb.com/M/reviews_by?Edward+Johnson-ott To receive reviews by e-mail at no charge, send subscription requests to<EMAIL_ADDRESS>Even after reading the pathetic excuses from the Warner Brothers spin doctors for withholding one of the summers most anticipated films from critics, I went into "The Avengers" hoping for the best. Maybe they really had withheld the film so that audiences could "discover" it on their own. Sadly, the negative buzz turned out to be true. "The Avengers" is a strong candidate for worst movie of the year. In addition, it's absolutely the most dreadful big screen adaptation of a TV series I have ever witnessed, taking the ultra-stylish, clever 60's spy show and turning into a disjointed, garish train wreck of a movie.
So what went wrong? Virtually everything. Let's start with the central characters. As played by Patrick Macnee, John Steed was a conservative, dapper fellow and formidable foe. His droll wit and assured smile reflected the confidence of a consummate renaissance man. In the hands of the usually excellent Ralph Fiennes, Steed merely seems constipated. Wearing a smirk for most of the film, his performance is far too wispy and tentative for a character of such substance.
As for Mrs. Peel, the results are even more painful. Diana Riggs turned the character into the epitome of chic, combining razor sharp intelligence, a keen sense of humor, killer fighting skills and a devastating smoky sexuality. Uma Thurman simply hasn't a clue. While her Mrs. Peel possesses the appropriate looks and wardrobe, everything else is missing. More often than not, she comes off like a coy model or simply a victim.
In the series, the relationship between John Steed and Mrs. Peel simmered beautifully. Here they kiss, effectively killing the romantic and sexual tension the original maintained for years. Imagine if Mulder and Scully had smooched in the first episode of "The X Files" and you'll have an idea of the dampening effect this kiss has on the duo.
As for the legendary banter between the characters, most of the lines here are as stilted and leaden as the scripted exchanges between Academy Award presenters before they open the envelopes. What passes for wit is often beyond embarrassing. The film contains a scene where Mrs. Peel falls through a hole in the earth and plummets into the villain's lair. When he greets her, she actually says "I thought I'd drop in." This is humor? For God's sake, cartoons don't even use that line anymore!
Speaking of villains, the bad guy here is Sir August De Wynter (Sean Connery, in a blustery performance), a megalomaniac bent on taking over the world with a purloined weather-controlling machine. The plot, for lack of a better word, involves clones, criminals dressed as bulky teddy bears, giant mechanical bees, and enough outrageously fake looking snow, cut-rate CGI and cheesy special effects for a dozen low budget syndicated sci-fi TV shows (hell, even the blue screen scenes look phony).
Add a lot of big, showy sets and costumes to the aforementioned mess and what have you got? A disaster strongly resembling last years horrible "Batman and Robin," except that, hard is it may be to believe, this one is even worse. Reportedly, the studio chopped a great deal of footage from the film following disastrous test screenings, resulting in a final 90 minute version that feels like three hours.
The edit renders the comic book plot incomprehensible at times, as characters appear and disappear from various locales for no discernible reason. A perfect example is a scene where Mrs. Peel enters a phone booth on the estate of her enemy and states the code words to trigger a secret entry mechanism. How does she know the villain's code? Why is there a phone booth in the middle of a sprawling estate? And most importantly, how did they take a wicked good TV series and turn it into such a godawful movie?
Stay away from "The Avengers." Episodes of the original series are due on video shortly and it's likely that some cable network will rerun the series to capitalize on the publicity from this travesty. Seek out the show and you can enjoy one of the highlights of 60's pop culture entertainment while avoiding one of the low points of the 90's.
© 1998, Ed Johnson-Ott
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Examin - Education and LMS Template
Live Preview
Multipage
Onepage
Home Version One
Home Version Two
Home Version Three
Home Version Four
Home Version Five
Version Six
Version Serven
Home Version One
Home Version Two
Home Version Three
Home Version Four
Home Version Five
Version Six


CHILLCAFÈ is more than an internet cafe,
we offer you the best internet expearience,
comfortable place for you to enjoy your day!
we offer you the fastest and the best internet expearience.
we have a collection of drinks and snaks that you can enjoy!
we are inviting you to try our latest PC Terminals avilable in the market.
Now you can upgrade your membership and enjoy our VIP class!
We are inviting you to visit us by contacting us on..
+63-9270-653-468


Improve your UX design with our curated content from top industry leaders delivered right to your inbox.
Our newsletters will help you discover the world of UX and usability, enhance your user interface design and strategy, and meet the needs of your customers. You can unsubscribe in one click and we will never share your email address.
If you are already subscribed to any of our newsletters, visit this page to edit your preferences.


Ranges for automatic IP allocation
If SSL or FTP virtual hosts will be created using this template, you may specify a range of IP addresses to allocate from. Both SSL and FTP virtual hosts require a dedicated IP address, because neither supports name-based virtual hosting.


Organised by SIGLEX and SIGSEM.
*SEM (pronounced "starsem") is a series of conferences that bring together researchers interested in the semantics of natural languages and its computational modeling. The conference embraces symbolic and probabilistic approaches, and everything in between; theoretical contributions as well as practical applications are welcome. The long-term goal of *SEM is to provide a stable forum for the growing number of NLP researchers working on all aspects of semantics.


add_shopping_cartAdd to cart 50 $
Small description about this dress.
add_shopping_cartAdd to cart 500 $
Small description about this bag.
add_shopping_cartAdd to cart 1000 $
Small description about this belt.
add_shopping_cartAdd to cart 300 $
add_shopping_cartAdd to cart 250 $
Small description about this Shades.
add_shopping_cartAdd to cart 350 $


---
layout: post
title: 100-day plan
date: '2014-03-09T21:43:00.001-06:00'
author: Jacob .
tags:
- progress-reports
- front-page
modified_time: '2014-03-09T21:43:40.347-06:00'
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-2024269538246810346
blogger_orig_url: http://www.svlark.com/2014/03/100-day-plan.html
---
You know what we need? We need a hundred-day plan.
Here it is:
- figure out how to continue paying for this project
- figure out where we can go do that where there are lots of boats
- get rid of nearly everything
- pack what's left
- go to the aforementioned place
Simple, really.
101 days left.


GitHub's free page hosting and Google's free spreadsheets, make a live site and database easier than you may think.
Using a spreadsheet as a database is an easy to manage and share way to start collecting data and organizing.
Below are ready-made templates for you to fork so that you can get up and running quickly. Rapid response!
Click on the GitHub repository links for the full README.md
.
Site with labels and short descriptions with link to an article — By @jllord.
GitHub RepositoryDemoSite displays your spreadsheet as a table (add your own styles) — By @jllord.
GitHub RepositoryDemoHave an example? Add it with a pull request. Want a badge/ribbon thing? Here are some spiffy colors.
You'll need a free GitHub and Google account to make these sites. Then you'll utilize the free hosting and spreadsheet services from the two.
Once you have accounts ready, select a template above and click to read the instructions on its GitHub repository
Oraganize a local group with a shared spreadsheet. Collect links to articles to record what the government is doing. Collect links to resoruces for activism.
If you questions, open an Issue on this repsitory or reach out on Twitter: @jllord.
If you're a web designer or developer and know HTML/CSS and a little JS then you can create a template that can be used for these projects. Add your template to this site with a pull request. You can start by forking the Simple Table template.


Hello, I'm Zachary. I provide full-stack web and Android development consulting to web companies of all sizes, as well as some design work.
I have over ten years' experience building on the web with all kinds of technologies. Over my career I've been fortunate to work with several great companies, including:
I am available for new work beginning January 2016. If you'd like to work together, please shoot me an email with some details about what you'd like to build.
Other technologies I'm familiar with include ActionScript, Adobe AIR, Adobe Photoshop, Agile and Scrum, Apache, Celery task queue, D3.js, Git, Jasmine, MongoDB, MySQL, Node.js, Objective-C, PostgreSQL, Ruby on Rails, Selenium, Sketch, Subversion, Swift, Ubuntu, quantitative finance concepts, and test-driven and behavior-driven development.


--- layout: page excerpt: "A simple and clean responsive Jekyll theme for words and photos." search_omit: true ---


The ratio of photos you've taken where you're the only one tagged to total tagged photos
What words are most common in your status updates? This ignores words such as 'the'
Where are you posting photos and status updates? Based off items with location tags


About Mulberry
What's New in Version 4
Menus Toolbars Shortcuts
Subscribed Mailboxes Cabinets Display Hierarchies Identities Matching Disconnected IMAP
Get more help?


This How To guide provides instructions for COINS system administrators on the steps required to enter a new opportunity from within COINS. Always test this process in an up to date, non-live environment before attempting it on a LIVE environment. When performing this process on a LIVE environment we recommend that you have a working, complete backup of the LIVE environment.
Navigate to the Amteck CRM Desktop > Click on the Opportunities Red Tile
----------------------------------------------------------------------------------------- Version 0.0.1 - Nov 5th, 2019 (Nicholas Knight) ----------------------------------------------------------------------------------------- - Updated Lead Entry - Update opportunity Updating - TODO: Add reporting for existing opportunities.


| @(Backup databases + settings) | @(Backup now) |
| @(Backup full website) | @(Backup now) |
| @(Clear all pages) | @(Clear now) |
| @(Clear all widgets) | @(Clear now) |
| @(Clear all files) | @(Clear now) |
| @(Clear newsletter list) | @(Clear now) |
| @(Clear visitor stats) | @(Clear now) |


THREESOME (1994) A Film Review Copyright Dragan Antulov 2001
Tastes and morals may change, but one thing remains the same throughout history - among all works of art the most controversial ones are those that explore how far a human being can go before he/she reaches happiness. Since that happiness often corresponds with active love life, controversy often comes from the depiction of sexuality - either unconventional display of sexuality or display of unconventional forms of sexuality. Interestingly enough, THREESOME, 1994 romantic drama by Andrew Fleming, hardly caused any controversy despite satisfying both of aforementioned criteria.
The plot takes place on unnamed American college where shy, bookwormish student Eddy (played by Josh Charles) shares two thirds of dormitory suite with Stuart (played by Stephen Baldwin), typical jock. Two of them, despite differences in character and views on world, become best friend, but their relationship becomes complicated when, due to bureacratic mistake, remaining third of their suite gets occupied by a female student, Alex (played by Lara Flynn Boyle).  However, despite triple case of unrequited love, all three become great friends and enjoy time with each other. But the unresolved sexual tension is still present and threatens their unusual relationship.
THREESOME didn't cause much of a controversy because it was made during the zenith of "political correctness" when homosexual desires as integral part of love triangle didn't look as shocking as in previous eras. Furthermore, this film at first glance didn't look very different from the standard romantic comedies from Hollywood and for many the unusual love triangle was nothing more than "high concept" for formulaic and predictable Hollywood product. However, writer-director Fleming approached this farcical situation with a great deal of seriousness. There are some truly funny moments in this film, but THREESOME is melodrama in its nature, obviously inspired by Truffaut's classic JULES ET JIM (which is explicitly referenced in this film), and Fleming is not afraid to counter mostly benign humour with some darker overtones in the plot. The actors who appeared in this film seemed perfect for the part - Josh Charles is very good in his role, while Stephen Baldwin plays very convincing jock. Lara Flynn Boyle is also very good as the only female in this triangle and plays her role with a lot of natural ease, which wasn't such easy thing do considering that she had to appear not only naked in front of camera, but also to play love scene that features certain sexual activity that used to belong only in the domain of X-rated movies. The ending of this film, however, seems somewhat forced and diminshes generally good impression of this film. However, even when the novelty of its basic premise wears off, THREESOME is still going to be interesting and entertaining movie experience.
RATING: 7/10 (+++)
Review written on September 30th 2001
Dragan Antulov a.k.a. Drax E-mail<EMAIL_ADDRESS>http://www.film.purger.com - Filmske recenzije na hrvatskom/Movie Reviews in Croatian
========== X-RAMR-ID: 29653 X-Language: en X-RT-ReviewID: 252413 X-RT-TitleID: 1049712 X-RT-AuthorID: 1307 X-RT-RatingText: 7/10
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Mallinckrodt receives SEC subpoena over Acthar gel lawsuit
(Reuters) - Mallinckrodt Plc said on Tuesday it has received a subpoena from the U.S. Securities and Exchange Commission for documents related to the drugmaker’s lawsuit against the U.S. Department of Health and Human Services (HHS).
The lawsuit against the HHS and the Centers for Medicare and Medicaid Services was filed in May over changes in the calculation of Medicaid discounts for Acthar gel, the company's biggest money-spinner. (bit.ly/2PNaeFz)
Changes to the Medicaid rebate calculations could result in a near 10% hit to annual sales of Acthar, its costly treatment for multiple sclerosis and a rare infant seizure disorder, the company said in May.
The drugmaker on Tuesday reported a 20.8% fall in sales of Acthar gel for the quarter ended Sept. 27 due to the continued reimbursement challenges.
Mallinckrodt, among opioid manufacturers facing thousands of lawsuits seeking to hold them responsible for fueling an addiction crisis in the United States, is also grappling with an industrywide decline in generic drug prices and competition to two of its important drugs.
Against this backdrop, the company in August suspended plans to spin off its specialty generics unit, citing opioid litigation uncertainties, and also warned Acthar gel revenue was unlikely to exceed $1 billion this year.
Shares of the company, which in September agreed to sell its contract manufacturing unit to reduce debt, have slumped nearly 80% so far this year.


© {{ now.Format "2006" }} {{ .Site.Author.name }}{{ .Site.Params.footerCopyright | safeHTML }}
Made with Hugo · Recluse Theme {{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }} · {{ end }}


Conway's Game of Life
Statistics will appear here. Use the arrow keys to pan
Your browser does not support canvas.
Pause/Play
Step
Randomize


Hashrange Profit Simulator
Simulator
Day 0
₿ 0.0
$ 0
Balances
+ $0
- $0
= $0 made on day 0
Totals
Total Spent: $0
Plans: 0
Adjust Profit Difficulty
Adjust BTC Price
1 btc = 🌜
Play
Current Plans
Plans Available
Test
$5
Daily Profit
Days
Beginner V3
$13
Daily Profit
Days
Beginner V4
$27
Daily Profit
Days
Basic V3
$128
Daily Profit
Days
Basic V4
$260
Daily Profit
Days
Import Plans
Go select all, then copy on hashrange.com > My Offline Miners
My Offline Miners Bitcoin Your Active Plans 15 Total TH of Plans 75 TH/S Your Daily Profit ≈ 0.00037596 BTC Mining 74.9981 TH/S Last 3 minutes Processed Hash and Profit Last 30 days My Plans Tera Hashes per Second Started at Expiration Beginner V3 5 TH 2020-09-23 01:25:56 89d 46m 32s Beginner V3 5 TH 2020-09-20 01:41:22 86d 1h 1m 58s Beginner V3 5 TH 2020-09-17 09:26:12 83d 8h 46m 48s Beginner V3 5 TH 2020-09-13 01:15:14 79d 35m 50s Beginner V3 5 TH 2020-09-10 00:41:41 76d 2m 17s Beginner V3 5 TH 2020-09-07 19:55:49 73d 19h 16m 25s Beginner V3 5 TH 2020-09-06 01:05:23 72d 25m 59s Beginner V3 5 TH 2020-09-06 01:04:57 72d 25m 33s Beginner V3 5 TH 2020-09-06 01:01:01 72d 21m 37s Beginner V3 5 TH 2020-09-05 01:47:34 71d 1h 8m 10s Beginner V3 5 TH 2020-09-05 01:46:59 71d 1h 7m 35s Beginner V3 5 TH 2020-08-31 00:45:58 67d 6m 34s Beginner V3 5 TH 2020-08-31 00:45:28 67d 6m 4s Beginner V3 5 TH 2020-08-24 10:05:31 60d 9h 26m 7s Beginner V3 5 TH 2020-08-21 20:59:18 57d 20h 19m 54s Test old 1 TH 2020-06-03 02:18:41 Expired at 2020-09-03 02:18:41
Import
Export
CSV Data


A free, open-source API for generating random user data. Like Lorem Ipsum, but for people.
Number of profiles to display: 5


My name is Harshit Singh, and I am an indian national by birth. I am individual with strong analytical and fluent bilingual communication skills, alongside strong memory, hardworking, deterministic and optimistic nature added to my technical skill-set
With my ancestory tree starting from north eastern india and ending in central india. I was born and raised in central india, though I quite of often my place of birth of my ancestory, I myself have spent majority part of my life in central india.
Speaking of my birth, you can surely refer to me as live example of byproduct of marriage between science and arts. As my father holds a doctorate of philosophy in the field of food science and mother holds a doctorate of philosophy in the field of arts.
My thought process is learning-based. I utilize my spare time to perform self-analysis to understand why i did wrong or how i did it right. I am a good listener and so I listen when other people share something and later do an learning analysis of what i can learn from their experience further try and realize value of knowledge shared so in order to determine it's effective implementation.
One's thought process is not just a thought process, it's mirror image of the surronding one is raised in and impression of people who contributed to that surrounding and so on that note, I would say I am privleged to always have been surrounded by highly intellectual mind which includes my family members, close relative, friends and senior who from the day one made sure that they share with me what was once taught to them by some of their elder because they cared about them, and slso for simple reason being that someday i could make contribution of equivalent importance as once they made in my life by sharing that valuable knowledge
A few good thing people praise about me are my kind-heartedness, time-management, confidence, communication skills, hardwork, creativity, determination, oratorial skills and obidience. I know no one is flawless and so neither am I and so certain suggested areas of improvements for me are Mathematics, emotional quotient, and logical reasoning


{% import 'admin/static.html' as admin_static with context %} {% import 'admin/lib.html' as lib with context %} {% import 'flask-admin/adminlte/forms.html' as forms with context %} {% block body %}


If you are experiencing choppy, stuttering, or broken up playback when viewing HEVC video on your Samsung Z, it is probably because your device doesn’t support the new HEVC H.265 codec, or your video has high specifications that your Samsung Z cannot handle. If that’s the case, converting the HEVC video to a format that is compatible with your Samsung Z would be a workable solution.
The Samsung Z runs Tizen 2.2.1 and is powered by a 2600mAh non removable battery. It measures 138.20 x 69.80 x 8.50 (height x width x thickness) and weigh 136.00 grams.
Founded back in 1969 as Samsung Electric Industries, Suwon, South Korea-headquartered Samsung Electronics today makes everything from televisions to semiconductors. It released its first Android smartphone in 2009, and can be credited with the launch of the first Android tablet back in 2010. The company is among the biggest players in the smartphone market in the world. It has recently developed smartphones running Tizen OS, as an alternative to its Android-based smartphones.
If your movie contains a audio codec that is not supported by Samsung Z, you may probably encounter audio lost issues when playing it. If that’s the case, we would recommend converting the movie to a format that is compatible with your Samsung Z first, such as H.264 AAC encoded MP4, which Samsung Z will recognize and handle well. Learn how to process file conversion below.
Part 1:
How to convert hevc videos for Samsung Z on Windows?
Part 2:
How to convert hevc videos for Samsung Z on Mac?
[pt_view id="2e16a40sux"]
Part 1. How to convert hevc videos for Samsung Z on Windows?
To convert hevc videos for Samsung Z playback on Windows, do as below:
Step 1: Import video files
Click “Add File” to load video files that you want to convert into this program.
Step 2: Select output format for Samsung Z
Click "Profile" to select
"Samsung" > "Samsung Galaxy S5(*.mp4)" as output format. This format profile will ensure a good performance while playing with Z.
Tips:
If necessary, you can click "Settings" button to modify video and audio parameters like encoder, resolution, frame rate, bitrate, aspect ratio, sample rate, and audio channels. You can also “Enable 3D Settings” to add 3D effect to your source media.
Step 3: Click “Convert” to start hevc video to Samsung Z conversion on Windows.
As soon as the conversion is complete, click “Open Folder” to get the generated
MP4 files that are suitable for playing on your Samsung Z. No audio lost issues will occur any more.
Part 2. How to convert hevc videos for Samsung Z on Mac?
To convert hevc videos for Samsung Z playback on Mac, do as below:
Step 1: Import video files
Click “Add File” to load video files that you want to convert into this program.
Step 2: Select output format for Samsung Z
Click "Profile" to select
"Samsung" > "Samsung Galaxy S5(*.mp4)" as output format. This format profile will ensure a good performance while playing with Z.
Tips:
If necessary, you can click "Settings" button to modify video and audio parameters like encoder, resolution, frame rate, bitrate, aspect ratio, sample rate, and audio channels. You can also “Enable 3D Settings” to add 3D effect to your source media.
Step 3: Click “Convert” to start hevc video to Samsung Z conversion on Mac.
As soon as the conversion is complete, click “Open Folder” to get the generated
MP4 files that are suitable for playing on your Samsung Z. No audio lost issues will occur again.
Also read:
Samsung Galaxy Note 8 won’t play HEVC H.265 media, how to fix?


You can configure the Toolbox update installer to automatically search for updates on a periodic basis. You can configure how these updates are scheduled and performed from the Automatic Update preferences page. Checking the box at the top of the page enables automatic searching for and notification of available updates.
You can also opt-in to receive experimental features of the TLA Toolbox and TLC. Note though, that experimental features might not work as intended and can lead to bogus behavior. Not for the faint-hearted.
The rest of the preference page then allows you to schedule the search and notification.You can choose among the following schedules for checking for updates:
If the Toolbox is not running at the scheduled time, the search will be done when the Toolbox is next started.
If you schedule for updates to be checked, you can choose whether or not to download (but not install) the new updates before notifying you.
When a notification popup appears, you have the choice of either updating or deferring. If you defer the update, a preference determines if the notification pops up again and, if so, when.
When using the Manual provider there are three predefined schemas to set settings for: HTTP, HTTPS and SOCKS. Configuration for each schema is displayed in the Proxy entries table. To edit settings for a particular schema double-click the entry or select the entry and click Edit... button.
The Proxy bypass table is only relevant for advanced use cases when different proxies need to be configured to access different computers on the internet. Most users can ignore the Proxy bypass table.
Please ask your network administrator if the Toolbox fails to access the internet and you do not know what to enter.


Please provide your AssetChain password to open your vault.
AssetCha.in is a 'smart property' service built on an online public ledger called the bitcoin blockchain. It allows you to associate items of value to a verified personal account for 'proof of ownership' and to guarantee their authenticity.
AssetCha.in is an Outlier Ventures solution. We specialise in building technology that leverages something very clever called The Blockchain. The Blockchain allows for the semi-anonymous transfer of ownership of an asset via an online public ledger between two parties. It's semi-anonymous because the two people can have full view of the other parties credentials only with another's permission but the ledger and the network that validates the transaction regards them as anonymous.
The most common use is of The Blockchain is the transfer of Bitcoins a digital form of currency. But we use it to transfer the ownership of real world assets such as cars, watches and jewellery. Like a Bitcoin when we record your asset on The Blockchain we associate it to your unique account after verifying you are who you say you are and that you do indeed own the asset.


Using Deep Kernels in Time Varying Networks for
Reverse-Engineering of Gene Interaction
(Course: Probabilistic Graphical Models)
(Course: Probabilistic Graphical Models)
We explore the performance of deep kernels on graphical models,
which incorporates both the structural properties of deep learning architectures
with non-parametric flexibility of kernels.
In our project, we aim to solve the task of reverse-engineering of gene interaction.
Inspired by KELLER, Pairwise MRF is used to model interactions between genes.
Deep kernels, constructed from neural network and LSTM are used for learning
parameters of the Pairwise MRF.


PHY 132-02 Mentor Webpage
3-6-2019: Introduction to Magnetism
Worksheet #12
Answer Key #12
2-25-2019: Kirchhoff's Laws and Capacitors
Worksheet #10
Answer Key #10
2-25-2019: Complex Circuits
Worksheet #9
Answer Key #9
2-20-2019: Ohm's Law and Kirchhoff's Voltage Rule
Worksheet #8
Answer Key #8
2-17-2019: Electric Potential and Potential Energy
Worksheet #7
Answer Key #7
2-13-2019: Graphing Electrical Fields Using Gauss
Worksheet #6
Answer Key #6
2-10-2019: Gauss's Law and Spherical Charge Densities
Worksheet #5
Answer Key #5
2-6-2019: Electric Flux and Gauss's Law
Worksheet #4
Answer Key #4
2-3-2019: Electric Field Continuous Charge Distribution
Worksheet #3
Answer Key #3
1-30-2019: Electric Fields
Worksheet #2
Answer Key #2
1-27-2019: Electric Charges and Coulomb's Law
Worksheet #1
Answer Key #1