This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div>value transformed from 1 -> 2 -> 3 when input focused and button clicked</div> | |
<input blur.trigger="onBlur() & debounce:100" focus.trigger="onFocus() & debounce:100" /> | |
<button click.delegate="clickHandler()" style="width: 50px">${value}</button> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function NBRBRates(currency, date) { | |
var formattedDate = Utilities.formatDate(date, Session.getScriptTimeZone(), "yyyy-M-d"); | |
var url = Utilities.formatString("http://www.nbrb.by/API/ExRates/Rates/%s?onDate=%s&ParamMode=2", currency, formattedDate); | |
var res = UrlFetchApp.fetch(url); | |
res = JSON.parse(res); | |
return res.Cur_OfficialRate; | |
} | |
// how to use | |
// =NBRBRates("EUR";TODAY()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
pg_namespace_parent.nspname as parent_schema, pg_class_parent.relname as parent_table, pg_attribute_parent.attname as parent_column, | |
pg_namespace_child.nspname as child_schema, pg_class_child.relname as child_table, pg_attribute_child.attname as child_column | |
from | |
( | |
select | |
pg_constraint.conrelid as "parent_table_id", | |
unnest(pg_constraint.conkey) as "parent_column_id", | |
pg_constraint.confrelid as "child_table_id", | |
unnest(pg_constraint.confkey) as "child_column_id" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./custom"></require> | |
<custom> | |
<button click.delegate="doSmth()">First slot</button> | |
</custom> | |
<custom> | |
<!--comment here--> | |
</custom> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./custom"></require> | |
<h2>Example 1: (rendered)</h2> | |
<custom> | |
<div slot="first"> | |
<p>First slot</p> | |
</div> | |
</custom> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./stringify"></require> | |
<table> | |
<tbody> | |
<tr><td>1 row ${{row: 1} | stringify}</td></tr> | |
<tr><td>2 row</td></tr> | |
</tbody> | |
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./stringify"></require> | |
<table> | |
<tbody> | |
<tr><td>1 row ${{row: 1} | stringify}</td></tr> | |
<tr><td>2 row</td></tr> | |
</tbody> | |
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="value-proxy"></require> | |
<value-proxy view-model.ref="personJson" value.bind="stringify(person)"></value-proxy> | |
${personJson.value} | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>${message}</h1> | |
<h2>${prop}</h2> | |
<div>${'val1' & t}</div> | |
<div>${'val1' & t}</div> | |
<hr/> | |
<div> | |
<!--<compose containerless view.bind="'custom-view.html'"></compose>--> | |
</div> | |
<hr/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>${message}</h1> | |
<require from="./object-values-value-converter"></require> | |
<div repeat.for="value of object | objectValues"> | |
${value} | |
</div> | |
</template> |
NewerOlder