Skip to content

Instantly share code, notes, and snippets.

View anypossiblew's full-sized avatar

Tiven Wang anypossiblew

View GitHub Profile
/**
* @license
* Copyright (c) 2009 Ben Leslie
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>MVC is Fun</title>
<style type="text/css">
#map-canvas {
height: 500px;
}
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: relative;
@anypossiblew
anypossiblew / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
@anypossiblew
anypossiblew / designer.html
Last active August 29, 2015 14:25
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<polymer-element name="my-element">
<template>
<style>
:host {
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
@anypossiblew
anypossiblew / generator.ts
Created June 27, 2017 02:53
User login and get apps flow using Generator
var CloudController = {
getInfo: function() {
console.log('get infomation');
return new Promise(function(reslove, reject) {
setTimeout(function() {
reslove({
authorization_endpoint: ''
});
}, 0);
});
@anypossiblew
anypossiblew / tj-co.js
Created June 27, 2017 03:01
Automatic generator execution flow
var co = require('co');
var CloudController = {
getInfo: function() {
console.log('get infomation');
return new Promise(function(reslove, reject) {
setTimeout(function() {
reslove({
authorization_endpoint: ''
});
@anypossiblew
anypossiblew / async-await.ts
Created June 27, 2017 06:26
Async/Await demo code
var CloudController = {
getInfo: ()=> {
console.log('get infomation');
return new Promise((reslove, reject)=> {
setTimeout(()=> {
reslove({
authorization_endpoint: ''
});
}, 0);
});