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
setBackdrop("bg.png"); | |
var tree_1 = createSprite("tree_2.png"); | |
var tree_2 = createSprite("tree_1.png"); | |
var tree_3 = createSprite("tree_2.png"); | |
var tree_4 = createSprite("tree_1.png"); | |
tree_1.x = 80; | |
tree_1.y = 320; | |
tree_2.x = 210; | |
tree_2.y = 400; |
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
var names = ["Nick","Kevin","Lily","Albert","Doris","Visa","Winnis","Karl","Amber","Wade"]; | |
// * 預設 資料表名稱為studentCollection,如不是 請自行修改 | |
studentCollection.remove(); | |
for(var i=0 ;i<10; i++){ | |
studentCollection.insert({ | |
name: names[i], | |
age: i | |
}); | |
} | |
studentCollection.save(); |
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
var plane = createSprite(["plane.png","bomb.png"]); | |
forever(function(){ | |
plane.toward(cursor); | |
plane.stepForward(3); | |
if( plane.touched(cursor) ){ | |
plane.costumeId = 1; | |
stop(); | |
} | |
}); |
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
#include<Servo.h> | |
Servo servo0, servo1, servo2, servo3; | |
char type; | |
int val,value = 0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
servo0.attach(3); | |
servo1.attach(5); | |
servo2.attach(6); |
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
<div class="container main"> | |
<div class="row title"> | |
<h1>查詢近十筆資料</h1> | |
</div> | |
<div class="row" > | |
<table class="table table-bordered table-striped" > | |
<thead> | |
<tr> | |
<td>#</td> | |
<td>日期</td> |
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 assert = require('assert'); | |
const jsonfile = require('jsonfile') | |
const FB = require('fb') | |
const filePath = 'record/normal.json'; | |
const fb_access_token = "EAACEdEose0cBACPcXL0ZC70CBrgxe7DskbyWZAA3M3ALCjvabGhFcxLGNWlsaUXU9InlDTu2ZCF96kQXZCG70oDRAvuAToLPVuaOFvHdWVHnXpiKTeZChqvJnSgFopEypq0MkXoRzJdbSl8aSZBY7pA4dbaz55ZAqFMMKvKSovBtSdlYCiFaA3IuaZCyQcqfXjOsDOaGZC3Kq6QZDZD"; | |
let record; | |
describe('unLogin', function () { | |
before(function(){ | |
function createEmptyRecord(){ | |
record = {}; |
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
function selected(selector,value){ | |
$(`${selector} option:selected`).removeAttr('selected') | |
$(`${selector} option[value="${value}"]`).attr("selected","selected") | |
} | |
function selectedByText(selector,text){ | |
$(`${selector} option:selected`).removeAttr('selected') | |
$(`${selector} option:contains("${text}")`).attr("selected", "selected") | |
} |
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 json | |
import requests | |
import sys | |
if __name__ == '__main__': | |
# The API key must be provided on the command line, abort otherwise. | |
api_key = '< input your api key>' | |
# Google Distance Matrix base URL to which all other parameters are attached |
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
image: lorisleiva/laravel-docker:latest | |
stages: | |
- test | |
unit_test: | |
stage: test | |
script: | |
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts | |
- ./vendor/bin/phpunit --testsuit Unit --coverage-text --colors=never |
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
image: lorisleiva/laravel-docker:latest | |
unit_test: | |
script: | |
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts | |
- ./vendor/bin/phpunit --testsuit Unit --coverage-text --colors=never |