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
import 'dart:async'; | |
import 'package:postgresql/postgresql.dart'; | |
void main() { | |
var username = "TheRightMan"; | |
var password = "WithTheRightSecret"; | |
var DBname = "AtTheRightPlace"; | |
var uri = 'postgres://$username:$password@localhost:5432/$DBname'; | |
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 InterfaceTransformer extends Transformer with ResolverTransformer { | |
final Resolvers resolvers; | |
InterfaceTransformer(this.resolvers); | |
Future<bool> isPrimary(AssetId id) => new Future.value(id.extension == '.dart'); | |
Future<bool> shouldApplyResolver(Asset asset) { | |
return asset.readAsString().then((contents) { | |
var cu = parseCompilationUnit(contents, suppressErrors: true); |
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
/// Returns a [Duration] if another attempt needs to be made after | |
/// waiting for the returned [Duration]. Returns the error object | |
/// that instructs the retry mechanism to stop trying and report error | |
/// immediately. | |
typedef dynamic OnErrorFunc(Object err, int retry, Duration elapsed); | |
/// `onError` returns either [Duration] or an error object. If [Duration] | |
/// is returned, the `attempt` function will be retried after waiting | |
/// for the returned duration, otherwise the retry mechanism gives up | |
/// and evaluates the [Future] with the the error object. | |
Future start( |
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="bower_components/polymer/polymer.html"> | |
<dom-module id="quick-alert"> | |
<style> | |
:host { | |
display: block; | |
position: fixed; | |
top: 0; | |
left: 0; | |
right: 0; |
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
Polymer({ | |
is: 'x-foo', | |
ready() { | |
// provides a FooService to descendents | |
this.provideInstance('foo-service', new FooService()); | |
}, | |
attached() { | |
// requests a BarService from an ancestor, re-requests if moved |
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
{ | |
"polymer": "https://raw.githubusercontent.com/Polymer/polymer/v1.0.7/", | |
"webcomponentsjs": "https://raw.githubusercontent.com/webcomponents/webcomponentsjs/v0.7.7/" | |
} |
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
{ | |
"font-roboto": "https://raw.githubusercontent.com/PolymerElements/font-roboto/v1.0.1/", | |
"iron-flex-layout": "https://raw.githubusercontent.com/PolymerElements/iron-flex-layout/v1.0.2/", | |
"paper-material": "https://raw.githubusercontent.com/PolymerElements/paper-material/v1.0.1/", | |
"paper-styles": "https://raw.githubusercontent.com/PolymerElements/paper-styles/v1.0.10/", | |
"polymer": "https://raw.githubusercontent.com/Polymer/polymer/v1.0.7/", | |
"webcomponentsjs": "https://raw.githubusercontent.com/webcomponents/webcomponentsjs/v0.7.7/" | |
} |
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="../polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
<!doctype html> | |
<html> | |
<head> | |
<script src="shadow-root.js"></script> | |
</head> | |
<div> | |
<div slot="main"> | |
I'm some projected content. | |
</div> | |
<shadow-root> |
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
const NativeHTMLElement = window.HTMLElement; | |
const documentWrite = document.write; | |
const documentOpen = document.open; | |
window.HTMLElement = class extends NativeHTMLElement { | |
constructor(...args) { | |
console.assert(args.length === 0); | |
super(); |
OlderNewer