Skip to content

Instantly share code, notes, and snippets.

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;
@Nick0603
Nick0603 / gist:469453122c8fab4d6379d3e27f4be37d
Created October 20, 2017 12:24
自動新增資料程式
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();
var plane = createSprite(["plane.png","bomb.png"]);
forever(function(){
plane.toward(cursor);
plane.stepForward(3);
if( plane.touched(cursor) ){
plane.costumeId = 1;
stop();
}
});
@Nick0603
Nick0603 / arduino.ino
Last active November 17, 2017 02:01
controkP5
#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);
<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>
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 = {};
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")
}
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
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
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