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
class MyClass{ | |
static MyClass _ref; | |
static MyClass get context() => _ref == null ? new MyClass() : _ref; | |
factory MyClass(){ | |
if (_ref != null) return _ref; | |
_ref = new MyClass._internal(); | |
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
void main(){var c="DEF>G~DEH>I~DEJK)L>~DEB>M~DENO~DE=PQ)R>~~";var d="STU9V*W~XYZ[\\~]^_#N`~abc&dZef~g&'h)iEj`~";var e="~DEvDEF~x>t~";var o='';' !"#\$~%&\'()*+,~-./0123~%456789:~,;<=>?1@~AB>C~~$c${d}kl>mn?1@~o=np^q#r~~$c${c}sF>t~sF>t~u${e}u$e~$d~,;<=>?1@~AB>C~~$c$c$c'.charCodes().forEach((i)=>o+=i==126?'\n':'${"We're no strangers to love You know the rules and so do I A full commitment's what I'm thinking of wouldn't get this from any other guy just wanna tell you how feeling Gotta make understand Never gonna give up let down run around desert cry say goodbye a lie hurt We've known each for long Your heart's been aching but You're too shy it Inside we both what's going on We game we're play And if ask me Don't you're blind see (Ooh, up) (Ooh) give, never (Give".split(' ')[i-32]} ');print(o);} |
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
// In CSS: body{margin:0px;padding:0px} | |
// given this main template (would be in your HTML file typically) | |
String t = | |
''' | |
<dockpanel halign='stretch' valign='stretch'> | |
<!-- menu strips (in other templates) will bind to this border --> | |
<border dockpanel.dock='top' content='{data menuStripContent}'></border> | |
<!-- controls will bind to this border --> |
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
class Vector3 extends Control | |
{ | |
FrameworkProperty xProperty; | |
FrameworkProperty yProperty; | |
FrameworkProperty zProperty; | |
final FrameworkEvent<VectorChangedEventArgs> changed = | |
new FrameworkEvent<VectorChangedEventArgs>(); |
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
<!-- | |
We declare a defult namespace which tells the framework | |
which platform elements are in-scope by default. | |
--> | |
<template xmlns='http://buckshotui.org/platforms/html'> | |
<!-- | |
without the above namespace declaration, this element | |
will not be found by the template parser | |
--> | |
<textblock text='hello world' /> |
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
<!-- | |
In addition to the default namespace, we add another named namespace | |
which declares that anything prefixed with 'custom' should be part of | |
that namespace scope. | |
--> | |
<template xmlns='http://buckshotui.org/platforms/html' | |
xmlns:custom='http://buckshotui.org/sprockets'> | |
<!-- elements in the default namespace work just fine. --> | |
<stack> | |
<textblock text='Here is that sprocket that you ordered:' /> |
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
<!-- here is what an CollectionPresenter might look like before namespaces --> | |
<stack> | |
<textblock text='Here is that list of fruit you ordered.' /> | |
<collectionpresenter collection='{data fruit}'> | |
<itemstemplate> | |
<textblock text='{data}' fontsize='20' foreground='Green' /> | |
</itemstemplate> | |
</collectionpresenter> | |
</stack> |
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
<!-- notice the xmlns declaration for the '/svg' namespace --> | |
<template xmlns='http://buckshotui.org/platforms/svg'> | |
<!-- ... which brings all the SVG platform elements into scope --> | |
<group> | |
<rect x='10' y='10' width='100' height='50' fill='Blue' stroke='Black' strokewidth='3' /> | |
<ellipse opacity='.75' cx='75' cy='75' rx='50' ry='100' fill='Orange' stroke='Black' strokewidth='5' /> | |
</group> | |
</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 xmlns='http://buckshotui.org/platforms/html'> | |
<border name='box1' width='50' height='50' background='Blue'> | |
<actions> | |
<!-- declaratively specifying a trigger to play the animation --> | |
<playanimation event='click' animation='anim1' /> | |
</actions> | |
</border> | |
<resourcecollection> | |
<animationresource key='anim1'> | |
<keyframes> |
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
<link rel="import" href="../cool-clock/cool-clock.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |