2018年6月27日 星期三

HWU VR Project


1. Download html folder
2. Unzip html
3. cmd
4. cd E:\Course1062\project
5. ipconfig
6. dotnet new web -o html

7. 修改 Program.cs
     .UseUrls("http://192.168.225.xxx:5000")
8. 修改 Startup,cs
     app.UseStaticFiles();

9. Copy html into html

10. cd html
11 dotnet run
12. Chrome http://192.168.225.xxx:5000/s1.html

13. iphone http://192.168.225.xxx:5000/s1.html
14. Android http://192.168.225.xxx:5000/s1.html

2018年6月23日 星期六

Taipei city open data example (python)

Ref: https://youtu.be/sUzR3QVBKIo

ASUS X450J @ Windows 10 x 64
Visual Studio 2017 (python)

data ID
http://data.taipei/opendata/datalist/datasetMeta/outboundDesc;jsessionid=D984042CBA68D2341286C1DA0E9DE9C1?id=15c3e1ae-899b-466c-a536-208497e3a369&rid=296acfa2-5d93-4706-ad58-e83cc951863c

取得格式 (http://data.taipei/opendata/developer)
取得全部資料
您可以透過以下取得資料項目id為35aa3c53-28fb-423c-91b6-2c22432d0d70的全部內容:
http://data.taipei/opendata/datalist/apiAccess?scope=resourceAquire
&rid=35aa3c53-28fb-423c-91b6-2c22432d0d70


1. Code
import urllib.request as request
import json
src = "http://data.taipei/opendata/datalist/apiAccess?scope=resourceAquire&rid=296acfa2-5d93-4706-ad58-e83cc951863c"
with request.urlopen(src) as response:
    data = json.load(response)
# 取得公司名稱列表
clist = data["result"]["results"]
with open("data.txt", "w", encoding="utf-8") as file:
  for company in clist:
    file.write(company["公司名稱"] + "\r\n")
2. 說明
使用 urllib / json 模組
台北市公開資料 (src)
資料首列
{"result":{"offset":0,"limit":10000,"count":5225,"sort":"","results":[{"_id":"1","統編":"04474768","公司名稱":"優鐠電子股份有限公司","公司地址":"114臺北市內湖區瑞光路258巷2號10樓","ADDR_X":"308051.826","ADDR_Y":"2774219.522"}
...
3. 結果



2018年6月16日 星期六

Google app maker

Ref:
https://www.ithome.com.tw/news/123911
https://developers.google.com/appmaker/tutorials/hello-appmaker/

1. login @go.ntaipei.edu.tw
2. https://appmaker.google.com/
3.
Create your app
Sign in to the G Suite account provided by your employer or school.
Open App Maker.
Create a blank app:
If App Maker displays the welcome dialog, click Create New App.
Otherwise, click Menu menu chevron_right New chevron_right Blank Application.
Rename the app. Delete the default name, Untitled App, and enter Hello App Maker.
4. Add TextBox, Button and Label

5. Add Button1.Click
6. Preview
7. Publish
iOS Chrome
Android Chrome