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
from flask import Flask, render_template | |
import folium | |
app = Flask(__name__) | |
@app.route('/') | |
def home(): | |
return '<h1><a href="/map">Map</a></h1>' | |
@app.route('/map') | |
def map(): |
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
{% extends '/base-map.html' %} | |
{% block body %} | |
<div> | |
<p id="coords"></p> | |
<div id="mapid" style="margin: 1em;"></div> | |
</div> | |
<script type="text/python"> | |
from browser import alert, document, window, html |
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> | |
<meta charset="utf-8"> | |
<style> | |
#mapid { | |
height: 60rem; | |
background-color:white; | |
} |
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
{% extends '/base-map.html' %} | |
{% block body %} | |
<div> | |
<p id="coords"></p> | |
<div id="mapid" style="margin: 1em;"></div> | |
</div> | |
<script type="text/python"> | |
from browser import alert, document, window, html |
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
{% extends '/base-map.html' %} | |
{% block body %} | |
<div> | |
<p id="coords"></p> | |
<div id="mapid" style="margin: 1em;"></div> | |
</div> | |
<script type="text/python"> | |
from browser import alert, document, window, html |
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
{% extends '/base-map.html' %} | |
{% block body %} | |
<div> | |
<p id="coords"></p> | |
<div id="mapid" style="margin: 1em;"></div> | |
</div> | |
<script type="text/python"> | |
from browser import alert, document, window, html |
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
{% extends '/base-map.html' %} | |
{% block body %} | |
<div> | |
<p id="coords"></p> | |
<div> | |
<button id="chiangmai">ไปเชียงใหม่</button> | |
<button id="hatyai">ไปหาดใหญ่</button> | |
<button id="bankkok">ไปกรุงเทพ</button> | |
</div> | |
<div id="mapid" style="margin: 1em;"></div> |
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 A { | |
private int x; | |
public A(int x) { | |
this.x = x; | |
System.out.println("A"); | |
} | |
public void foo() { | |
System.out.println(x); |
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 java.util.*; | |
class Shape { | |
private String name; | |
public Shape(String name) { | |
this.name = name; | |
} | |
public String getName() { |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return "Hello world!" | |
if __name__ == '__main__': | |
app.debug = True |
OlderNewer