This file contains hidden or 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
#登入的角色 | |
RoleArray=["Papa","MAMA","ELSA"] | |
randRole=RoleArray[new Random().nextInt(RoleArray.length)] | |
mFirebaseAnalytics.setUserProperty("Role", randRole); | |
#用戶本身訂購身分 | |
AuthforArray=["電影199/好萊塢199","電影199","好萊塢199"] | |
randAuthfor=AuthforArray[new Random().nextInt(AuthforArray.length)] | |
mFirebaseAnalytics.setUserProperty("Authfor", randAuthfor); | |
#############以上只要設定一次,每次進電影館就重新設定一次,模擬不同用戶,但同一個對話中不用多次設定################## |
This file contains hidden or 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
def favorite_colors() -> List[Dict]: | |
config = { | |
'user': 'root', | |
'password': 'root', | |
'host': 'db', | |
'port': '3306', | |
'database': 'knights', | |
'auth_plugin':'mysql_native_password' | |
} | |
connection = mysql.connector.connect(**config) |
This file contains hidden or 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
def favorite_colors() -> List[Dict]: | |
config = { | |
'user': 'root', | |
'password': 'root', | |
'host': 'db', | |
'port': '3306', | |
'database': 'knights' | |
} | |
connection = mysql.connector.connect(**config) | |
cursor = connection.cursor() |
This file contains hidden or 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
Creating python-mysql-docker_db_1 ... error | |
ERROR: for python-mysql-docker_db_1 Cannot create container for service db: b'Drive has not been shared' | |
ERROR: for db Cannot create container for service db: b'Drive has not been shared' | |
ERROR: Encountered errors while bringing up the project. |
This file contains hidden or 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
version: '3' | |
services: | |
web: | |
build: . | |
ports: | |
- "5000:5000" | |
volumes: | |
- .:/code | |
redis: | |
image: "redis:5.0.3" |
This file contains hidden or 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 python:3.7.2 | |
# 從 python3.7 基礎上加工 | |
ADD . /code | |
# 將本地端程式碼複製到 container 裡面 ./code 資料夾 | |
WORKDIR /code | |
# container 裡面的工作目錄 | |
RUN pip install -r requirements.txt | |
CMD ["python", "app.py"] |
This file contains hidden or 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
{ | |
"kind": "youtube#channelListResponse", | |
"etag": "\"7991kDR-QPaa9r0pePmDjBEa2h8/1Ym_0imfWXTcQF1N7fVPwCcvX44\"", | |
"pageInfo": { | |
"totalResults": 1, | |
"resultsPerPage": 1 | |
}, | |
"items": [ | |
{ |
This file contains hidden or 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
recTangleLayer=new Layer | |
width: 395 | |
height: 223 | |
backgroundColor: "transparent" | |
style: | |
WebkitMask: "url(images/MovieSession.png)" | |
WebkitMaskSize: "cover" | |
WebkitMaskType: "alpha" | |
parent:itemLayer | |
clip: true |
This file contains hidden or 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
isGetWebInfoKey.on Events.StateSwitchStop,(from,to)-> | |
if to=="get" | |
result=JSON.parse(stringAuthResponse) | |
for item in result["data"] | |
catchplay =new CatchPlayInfo | |
catchplay.Title=item["title"] | |
catchplay.FeatureImage=item["assets"]["keyVisualUrl"] | |
catchplay.TypeLabel=item["typeLabel"] | |
CatchPlayInfos.push catchplay | |
loadDataOK.states.switch("get") |
This file contains hidden or 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
GetMovieInfo=()-> | |
r = new XMLHttpRequest | |
r.open 'GET', 'https://sunapi.catchplay.com/webcms/articles/all?limit=15&offset=1' | |
#catchplay第二個API需要把第一個API取得的資訊帶回去 | |
r.setRequestHeader('Authorization', TheKey); | |
r.setRequestHeader('Accept-Language', "zh-TW"); | |
r.onreadystatechange = -> | |
if(r.status >= 400) |
NewerOlder