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
"use strict"; | |
let UserSession = require('./UserSession'); | |
let TripDAO = require('./TripDAO'); | |
class TripService { | |
getTripsByUser(user) { | |
let tripList = []; | |
let loggedUser = UserSession.getLoggedUser(); | |
let isFriend = false; |
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
const navHeight = document.querySelector('nav'); | |
const options = { | |
root: null, | |
rootMargin: `-${navHeight}px 0px 0px 0px`, | |
threshold: [0] | |
} |
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
const observer = new IntersectionObserver(callback, options); |
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
var DNA_LENGTH = 500; // 每個火箭的基因長度 | |
var SIZE = 30; // 每一個世代的火箭個數 | |
var rockets = []; // 存放所有的火箭 | |
// 初始化所有的火箭 | |
for (var i = 0; i < SIZE; i++) { | |
var rocket = new Rocket(); | |
rocket.gens = randomGens(); | |
rocket.fire(); | |
rockets.push(rocket); |
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
{ | |
"undefined": [ | |
0, | |
0 | |
], | |
"-1:-32": [ | |
0, | |
0 | |
], | |
"-1:-31": [ |
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.3' | |
services: | |
db: | |
image: mysql:5.7 | |
restart: always | |
environment: | |
MYSQL_DATABASE: ${DB_DATABASE:-werewolves} | |
MYSQL_USER: ${DB_USERNAME:-user} | |
MYSQL_PASSWORD: ${DB_PASSWORD:-password} | |
MYSQL_ROOT_PASSWORD: 'password' |
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
image: lorisleiva/laravel-docker:latest | |
stages: | |
- testing | |
- deployment | |
unit_test: | |
stage: testing | |
script: | |
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts |
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
image: lorisleiva/laravel-docker:latest | |
production_deploy: | |
variables: | |
HEROKU_PROJECT_NAME: $HEROKU_PRODUCTION_PROJECT_NAME | |
HEROKU_API_KEY: $HEROKU_PRODUCTION_API_KEY | |
before_script: | |
- apk add ruby ruby-dev ruby-irb ruby-rake ruby-io-console ruby-bigdecimal ruby-json ruby-bundler yarn ruby-rdoc >> /dev/null | |
- apk update | |
- gem install dpl >> /dev/null |
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
<?php | |
namespace Tests\Unit; | |
use Tests\TestCase; | |
use Illuminate\Foundation\Testing\RefreshDatabase; | |
class ExampleTest extends TestCase | |
{ | |
/** |
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
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 |
NewerOlder