"]
5 |
6 | publish = false
7 | vcs = "None"
8 |
9 | [dependencies]
10 | rand = "*"
11 | text_io = "*"
12 |
13 | [[bin]]
14 | path = "src/MyBot.rs"
15 | name = "MyBot"
16 |
17 | [[bin]]
18 | path = "src/RandomBot.rs"
19 | name = "RandomBot"
20 |
--------------------------------------------------------------------------------
/airesources/Rust/runGame.bat:
--------------------------------------------------------------------------------
1 | cargo build
2 | .\halite.exe -d "30 30" "target/debug/MyBot" "target/debug/RandomBot"
3 |
--------------------------------------------------------------------------------
/airesources/Rust/runGame.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cargo build
4 | ./halite -d "30 30" "target/debug/MyBot" "target/debug/RandomBot"
5 |
--------------------------------------------------------------------------------
/airesources/Rust/src/hlt/mod.rs:
--------------------------------------------------------------------------------
1 | #![allow(warnings)]
2 |
3 | pub mod networking;
4 | pub mod types;
5 |
--------------------------------------------------------------------------------
/airesources/Scala/Bot.scala:
--------------------------------------------------------------------------------
1 | trait Bot {
2 | def getMoves(grid: Grid): Iterable[Move]
3 | }
4 |
5 | trait BotFactory {
6 | def make(id: Int): Bot
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/airesources/Scala/Direction.scala:
--------------------------------------------------------------------------------
1 | import scala.util.Random
2 |
3 | object Direction {
4 | private val random = new Random()
5 | val CARDINALS = Seq(North, East, South, West)
6 | val ALL = Seq(Still, North, East, South, West)
7 |
8 | def getRandomDir: Direction = ALL(random.nextInt(5))
9 | def getRandomCard: Direction = CARDINALS(random.nextInt(4))
10 | }
11 |
12 | class Direction(value: Int) {
13 | def getValue = value
14 | }
15 |
16 | case object Still extends Direction(0)
17 | case object North extends Direction(1)
18 | case object East extends Direction(2)
19 | case object South extends Direction(3)
20 | case object West extends Direction(4)
21 |
--------------------------------------------------------------------------------
/airesources/Scala/Move.scala:
--------------------------------------------------------------------------------
1 | case class Move(location: Location, direction: Direction)
--------------------------------------------------------------------------------
/airesources/Scala/MyBot.scala:
--------------------------------------------------------------------------------
1 | object MyBot extends BotFactory {
2 | def main(args: Array[String]): Unit = {
3 | Runner.run("scalaMyBot", this)
4 | }
5 |
6 | override def make(id: Int): Bot = new MyBot(id)
7 | }
8 |
9 | class MyBot(myId: Int) extends Bot {
10 | override def getMoves(grid: Grid): Iterable[Move] = {
11 | for {
12 | site <- grid.getMine(myId)
13 | } yield Move(site.location, Direction.getRandomDir)
14 | }
15 | }
--------------------------------------------------------------------------------
/airesources/Scala/RandomBot.scala:
--------------------------------------------------------------------------------
1 | object RandomBot extends BotFactory {
2 | def main(args: Array[String]): Unit = {
3 | Runner.run("scalaRandom", this)
4 | }
5 |
6 | override def make(id: Int): Bot = new RandomBot(id)
7 | }
8 |
9 | class RandomBot(myId: Int) extends Bot {
10 | override def getMoves(grid: Grid): Iterable[Move] = {
11 | for {
12 | site <- grid.getMine(myId)
13 | } yield Move(site.location, Direction.getRandomDir)
14 | }
15 | }
--------------------------------------------------------------------------------
/airesources/Scala/Runner.scala:
--------------------------------------------------------------------------------
1 | object Runner {
2 | def run(name: String, botFactory: BotFactory): Unit = {
3 | val id = Env.readId()
4 | val grid = Env.readInit()
5 |
6 | val bot = botFactory.make(id)
7 | Env.writeInit(name)
8 |
9 | while (true) {
10 | val occupants = Env.readFrame(grid.getWidth, grid.getHeight)
11 | grid.update(occupants)
12 | val moves = bot.getMoves(grid)
13 | Env.writeFrame(moves)
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/airesources/Scala/runGame.bat:
--------------------------------------------------------------------------------
1 | javac *.java
2 | scalac HaliteBot.scala
3 | scalac MyBot.scala
4 | scalac RandomBot.scala
5 |
6 | \halite.exe -d "30 30" "scala MyBot" "scala RandomBot"
7 |
--------------------------------------------------------------------------------
/airesources/Scala/runGame.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | scalac *.scala
4 |
5 | ./halite -d "30 30" "scala MyBot" "scala RandomBot"
6 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | # Specify version format
2 | version: "{build}"
3 |
4 | only_commits:
5 | message: /build/
6 |
7 | # Build worker image (VM template)
8 | image: Windows Server 2012 R2
9 |
10 | # clone directory
11 | clone_folder: C:\Halite
12 |
13 | # branches to build
14 | branches:
15 | only:
16 | - master
17 |
18 | #before_build:
19 | # - dir \s
20 |
21 | # scripts that run after cloning repository
22 | build_script:
23 | - cd C:\Halite\environment
24 | - .\make.bat
25 |
26 | artifacts:
27 | - path: environment\halite.exe
28 | name: halite.exe
29 |
--------------------------------------------------------------------------------
/environment/Makefile:
--------------------------------------------------------------------------------
1 | CXXFLAGS += -std=c++11 -pthread -I ./
2 | INSTALL_PATH?=/usr/local
3 | SOURCES=$(shell find . -name "*.cpp")
4 | OBJECTS=$(SOURCES:%.cpp=%.o)
5 | TARGET=halite
6 |
7 | .PHONY: all
8 | all: $(TARGET)
9 |
10 | $(TARGET): $(OBJECTS)
11 | $(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@
12 |
13 | .PHONY: clean
14 | clean:
15 | rm -f $(TARGET) $(OBJECTS)
16 |
17 | .PHONY: install
18 | install:
19 | install -m 0755 halite $(INSTALL_PATH)/bin
20 |
--------------------------------------------------------------------------------
/environment/install.sh:
--------------------------------------------------------------------------------
1 | # Install Halite environment
2 | curl "https://halite.io/downloads/environment/HaliteEnvironment-Source.zip" -o "HaliteEnvironment-Source.zip"
3 | mkdir HaliteEnvironment-Source
4 | unzip HaliteEnvironment-Source.zip -d HaliteEnvironment-Source
5 | rm HaliteEnvironment-Source.zip
6 | cd HaliteEnvironment-Source
7 | make
8 | mv halite ../
9 | cd ../
10 | rm -r HaliteEnvironment-Source
11 |
--------------------------------------------------------------------------------
/environment/make.bat:
--------------------------------------------------------------------------------
1 | SET PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
2 | CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
3 | cd environment
4 | cl.exe /O2 /MT /EHsc main.cpp core/Halite.cpp /I . networking/Networking.cpp /link /out:halite.exe
5 |
--------------------------------------------------------------------------------
/environment/tclap/Makefile.am:
--------------------------------------------------------------------------------
1 |
2 | libtclapincludedir = $(includedir)/tclap
3 |
4 | libtclapinclude_HEADERS = \
5 | CmdLineInterface.h \
6 | ArgException.h \
7 | CmdLine.h \
8 | XorHandler.h \
9 | MultiArg.h \
10 | UnlabeledMultiArg.h \
11 | ValueArg.h \
12 | UnlabeledValueArg.h \
13 | Visitor.h Arg.h \
14 | HelpVisitor.h \
15 | SwitchArg.h \
16 | MultiSwitchArg.h \
17 | VersionVisitor.h \
18 | IgnoreRestVisitor.h \
19 | CmdLineOutput.h \
20 | StdOutput.h \
21 | DocBookOutput.h \
22 | ZshCompletionOutput.h \
23 | OptionalUnlabeledTracker.h \
24 | Constraint.h \
25 | ValuesConstraint.h \
26 | ArgTraits.h \
27 | StandardTraits.h
28 |
29 |
--------------------------------------------------------------------------------
/tests/environment/Fail10Bot.py:
--------------------------------------------------------------------------------
1 | from hlt import *
2 | from networking import *
3 |
4 | # Fails on turn 10.
5 |
6 | myID, gameMap = getInit()
7 | sendInit("Fail10Bot")
8 |
9 | turn = 1
10 | hasMultipleSquares = False;
11 | while True:
12 | moves = []
13 | gameMap = getFrame()
14 | if turn == 10:
15 | break
16 | sendFrame(moves)
17 | turn += 1
--------------------------------------------------------------------------------
/tests/environment/FailInitBot.py:
--------------------------------------------------------------------------------
1 | from hlt import *
2 | from networking import *
3 |
4 | # Exits during initialization.
5 |
6 | myID, gameMap = getInit()
--------------------------------------------------------------------------------
/tests/environment/ModBot.py:
--------------------------------------------------------------------------------
1 | from hlt import *
2 | from networking import *
3 |
4 | myID, gameMap = getInit()
5 | sendInit("ModBot")
6 |
7 | turn = 1
8 | while True:
9 | moves = []
10 | gameMap = getFrame()
11 |
12 | for y in range(gameMap.height):
13 | for x in range(gameMap.width):
14 | site = gameMap.getSite(Location(x, y))
15 | if site.owner == myID:
16 | direction = -1;
17 | if site.strength < 5* site.production:
18 | direction = STILL
19 | else:
20 | for d in CARDINALS:
21 | if gameMap.getSite(Location(x, y), d).owner != myID:
22 | direction = d
23 | break
24 | if direction == -1:
25 | if turn % 4 < 2:
26 | direction = NORTH if x % 2 == 1 else SOUTH
27 | else:
28 | direction = EAST if y % 2 == 1 else WEST
29 | moves.append(Move(Location(x, y), direction))
30 |
31 | sendFrame(moves)
32 | turn += 1
--------------------------------------------------------------------------------
/tests/environment/Timeout10Bot.py:
--------------------------------------------------------------------------------
1 | from hlt import *
2 | from networking import *
3 |
4 | # Times out on turn 10.
5 |
6 | myID, gameMap = getInit()
7 | sendInit("Timeout10Bot")
8 |
9 | turn = 1
10 | hasMultipleSquares = False;
11 | while True:
12 | moves = []
13 | gameMap = getFrame()
14 | if turn == 10:
15 | while(True):
16 | pass
17 | sendFrame(moves)
18 | turn += 1
19 |
--------------------------------------------------------------------------------
/tests/environment/TimeoutInitBot.py:
--------------------------------------------------------------------------------
1 | from hlt import *
2 | from networking import *
3 |
4 | # Times out during initialization.
5 |
6 | myID, gameMap = getInit()
7 |
8 | while True:
9 | pass
--------------------------------------------------------------------------------
/tests/install.sh:
--------------------------------------------------------------------------------
1 | add-apt-repository -y ppa:ubuntu-toolchain-r/test
2 | apt-get update
3 |
4 | # Python
5 | apt-get install -y python3
6 |
7 | # Java
8 | apt-get install -y openjdk-8-jdk libjansi-java
9 |
10 | # Rust
11 | curl -sSf https://static.rust-lang.org/rustup.sh | sh
12 |
13 | # C++
14 | apt-get install -y g++-4.9
15 |
16 | # Scala
17 | wget www.scala-lang.org/files/archive/scala-2.10.4.deb
18 | dpkg -i scala-2.10.4.deb
19 | apt-get update -y
20 | apt-get install -y scala
21 | wget https://bintray.com/artifact/download/sbt/debian/sbt-0.13.6.deb
22 | dpkg -i sbt-0.13.6.deb
23 | apt-get update -y
24 | apt-get install -y sbt
25 |
26 | # Php unit
27 | wget https://phar.phpunit.de/phpunit-5.7.phar
28 | chmod +x phpunit-5.7.phar
29 | mv phpunit-5.7.phar /usr/local/bin/phpunit
30 |
31 |
32 | php -v
33 | mysql -V
34 | phpunit --version
35 |
36 | update-alternatives --set java $(update-alternatives --list java | grep java-8-openjdk)
37 | update-alternatives --set javac $(update-alternatives --list javac | grep java-8-openjdk)
38 | update-alternatives --display java
39 | update-alternatives --display javac
40 | java -version
41 | javac -version
42 |
--------------------------------------------------------------------------------
/tests/runTests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | function finish {
5 | echo "Cleaning up"
6 | cd $WORKINGDIR
7 | if [ -e ../temp.ini ]
8 | then cp temp.ini ../halite.ini;
9 | fi
10 | }
11 | trap finish EXIT
12 |
13 | echo "Setting up"
14 | WORKINGDIR=$PWD
15 | if [ -e ../halite.ini ]
16 | then cp ../halite.ini temp.ini;
17 | fi
18 | cp tests.ini ../halite.ini
19 | python3 setupMysql.py || python setupMysql.py
20 |
21 | echo "Website tests"
22 | phpunit --stderr website/
23 |
24 | echo "Worker tests"
25 | cd worker
26 | python3 testWorker.py
27 |
28 | echo "Environment tests"
29 | cd ../environment
30 | python3 testenv.py
31 |
--------------------------------------------------------------------------------
/tests/scalabilityTests/BasicJavaBot.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/tests/scalabilityTests/BasicJavaBot.zip
--------------------------------------------------------------------------------
/tests/setupMysql.py:
--------------------------------------------------------------------------------
1 | import configparser
2 | import os
3 |
4 | parser = configparser.ConfigParser()
5 | parser.read("../halite.ini")
6 |
7 | passwordField = "" if parser["database"]["password"] == "" else "-p"+parser["database"]["password"]
8 | os.system("mysql -u "+parser["database"]["username"]+" "+passwordField+" < ../website/sql/schema.sql")
9 |
--------------------------------------------------------------------------------
/tests/travisTests.ini:
--------------------------------------------------------------------------------
1 | [test]
2 | isTest = 1
3 |
4 | [hce]
5 | managerURl = http://localhost/manager/
6 | apiKey = 1234
7 | secretFolder = wrongFolder
8 |
9 | [email]
10 | email = halite@halite.io
11 | password = wrongPassword
12 |
13 | [database]
14 | hostname = 127.0.0.1
15 | username = root
16 | password =
17 | name = Halite
18 |
19 | [sso]
20 | secret = wrongSecret
21 | url = http://forums.halite.io/session/sso_login
22 |
23 | [forums]
24 | apiUsername = wrongUser
25 | apiKey = 123456789
26 |
27 | [encrypt]
28 | salt = wrongSalt
29 |
--------------------------------------------------------------------------------
/tests/website/HistoryTest.php:
--------------------------------------------------------------------------------
1 | "123", "lastNumGames" => "100", "lastNumPlayers" => "20", "versionNumber" => "1", "lastRank" => "2");
8 | class HistoryTest extends APITest {
9 | public function testGET() {
10 | $this->insertObject(HISTORY_TABLE, TEST_USER_HISTORY);
11 |
12 | $_GET['userID'] = TEST_USER_HISTORY['userID'];
13 | $_SERVER['REQUEST_METHOD'] = "POST";
14 |
15 | $returnedHistory = json_decode((new WebsiteAPI("history"))->processAPI(), true)[0];
16 |
17 | $this->assertArraySubset(TEST_USER_HISTORY, $returnedHistory);
18 | }
19 | }
20 | ?>
21 |
--------------------------------------------------------------------------------
/tests/website/testFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/tests/website/testFile.txt
--------------------------------------------------------------------------------
/tests/worker/languageBot/LANGUAGE:
--------------------------------------------------------------------------------
1 | TestLanguage
2 |
--------------------------------------------------------------------------------
/tests/worker/languageBot/MyBot.py:
--------------------------------------------------------------------------------
1 | ../../../airesources/Python/MyBot.py
--------------------------------------------------------------------------------
/tests/worker/languageBot/hlt.py:
--------------------------------------------------------------------------------
1 | ../../../airesources/Python/hlt.py
--------------------------------------------------------------------------------
/tests/worker/languageBot/networking.py:
--------------------------------------------------------------------------------
1 | ../../../airesources/Python/networking.py
--------------------------------------------------------------------------------
/tests/worker/languageBot/run.sh:
--------------------------------------------------------------------------------
1 | #Python
2 | python3 MyBot.py
3 |
--------------------------------------------------------------------------------
/tests/worker/loseBot/MyBot.py:
--------------------------------------------------------------------------------
1 | import hlt
2 | from hlt import NORTH, EAST, SOUTH, WEST, STILL, Move, Square
3 | import random
4 |
5 |
6 | myID, game_map = hlt.get_init()
7 | hlt.send_init("MyPythonBot")
8 |
9 | while True:
10 | game_map.get_frame()
11 | moves = [Move(square, random.choice((NORTH, EAST, SOUTH, WEST, STILL))) for square in game_map if square.owner == myID]
12 | hlt.send_frame(moves)
13 |
--------------------------------------------------------------------------------
/tests/worker/loseBot/hlt.py:
--------------------------------------------------------------------------------
1 | ../../../airesources/Python/hlt.py
--------------------------------------------------------------------------------
/tests/worker/loseBot/run.sh:
--------------------------------------------------------------------------------
1 | python3 MyBot.py
2 |
--------------------------------------------------------------------------------
/tests/worker/winBot/MyBot.py:
--------------------------------------------------------------------------------
1 | import hlt
2 | from hlt import NORTH, EAST, SOUTH, WEST, STILL, Move, Square
3 | import random
4 |
5 |
6 | myID, game_map = hlt.get_init()
7 | hlt.send_init("PythonBot")
8 |
9 | def assign_move(square):
10 | for direction, neighbor in enumerate(game_map.neighbors(square)):
11 | if neighbor.owner != myID and neighbor.strength < square.strength:
12 | return Move(square, direction)
13 |
14 | if square.strength < 5 * square.production:
15 | return Move(square, STILL)
16 | else:
17 | return Move(square, random.choice((WEST, NORTH)))
18 |
19 |
20 | while True:
21 | game_map.get_frame()
22 | moves = [assign_move(square) for square in game_map if square.owner == myID]
23 | hlt.send_frame(moves)
24 |
--------------------------------------------------------------------------------
/tests/worker/winBot/hlt.py:
--------------------------------------------------------------------------------
1 | ../../../airesources/Python/hlt.py
--------------------------------------------------------------------------------
/tests/worker/winBot/run.sh:
--------------------------------------------------------------------------------
1 | python3 MyBot.py
2 |
--------------------------------------------------------------------------------
/visualizer/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = tab
5 | end_of_line = lf
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 |
10 | [package.json]
11 | indent_style = space
12 | indent_size = 2
13 |
--------------------------------------------------------------------------------
/visualizer/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/visualizer/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
1 | ../../website/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/visualizer/fonts/glyphicons-halflings-regular.svg:
--------------------------------------------------------------------------------
1 | ../../website/fonts/glyphicons-halflings-regular.svg
--------------------------------------------------------------------------------
/visualizer/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
1 | ../../website/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/visualizer/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
1 | ../../website/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/visualizer/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
1 | ../../website/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/visualizer/lib/bootstrap.min.css:
--------------------------------------------------------------------------------
1 | ../../website/lib/bootstrap.min.css
--------------------------------------------------------------------------------
/visualizer/lib/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | ../../website/lib/bootstrap.min.js
--------------------------------------------------------------------------------
/visualizer/lib/jquery.min.js:
--------------------------------------------------------------------------------
1 | ../../website/lib/jquery.min.js
--------------------------------------------------------------------------------
/visualizer/lib/lodash.min.js:
--------------------------------------------------------------------------------
1 | ../../website/lib/lodash.min.js
--------------------------------------------------------------------------------
/visualizer/lib/pixi.min.js:
--------------------------------------------------------------------------------
1 | ../../website/lib/pixi.min.js
--------------------------------------------------------------------------------
/visualizer/lib/seedrandom.min.js:
--------------------------------------------------------------------------------
1 | ../../website/lib/seedrandom.min.js
--------------------------------------------------------------------------------
/visualizer/lib/xss.js:
--------------------------------------------------------------------------------
1 | ../../website/lib/xss.js
--------------------------------------------------------------------------------
/visualizer/main.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | const electron = require('electron');
3 | const fs = require('fs');
4 |
5 | const app = electron.app;
6 |
7 | // adds debug features like hotkeys for triggering dev tools and reload
8 | // require('electron-debug')();
9 |
10 | // prevent window being garbage collected
11 | let mainWindow;
12 |
13 | function onClosed() {
14 | // dereference the window
15 | // for multiple windows store them in an array
16 | mainWindow = null;
17 | }
18 |
19 | function createMainWindow() {
20 | const win = new electron.BrowserWindow({
21 | width: 1200,
22 | height: 800
23 | });
24 |
25 | win.loadURL(`file://${__dirname}/index.html`);
26 | win.on('closed', onClosed);
27 |
28 | return win;
29 | }
30 |
31 | app.on('window-all-closed', () => {
32 | if (process.platform !== 'darwin') {
33 | app.quit();
34 | }
35 | });
36 |
37 | app.on('activate', () => {
38 | if (!mainWindow) {
39 | mainWindow = createMainWindow();
40 | }
41 | });
42 |
43 | app.on('ready', () => {
44 | mainWindow = createMainWindow();
45 | });
46 |
--------------------------------------------------------------------------------
/visualizer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hailte-visualizer",
3 | "main": "main.js",
4 | "productName": "Halite-Visualizer",
5 | "version": "1.0.0",
6 | "description": "",
7 | "license": "MIT",
8 | "repository": "https://github.com/HaliteChallenge/Halite",
9 | "author": {
10 | "name": "Henry Wildermuth",
11 | "email": "hmwildermuth@gmail.com",
12 | "url": "https://github.com/FlyingGraysons"
13 | },
14 | "scripts": {
15 | "test": "xo",
16 | "start": "electron .",
17 | "build": "mkdir -p downloads/ && cd downloads/ && electron-packager ../ --all --overwrite && for i in */; do zip -r \"${i%/}.zip\" \"$i\"; done"
18 | },
19 | "files": [
20 | "main.js",
21 | "index.html",
22 | "./style/",
23 | "./script/",
24 | "./lib/"
25 | ],
26 | "keywords": [
27 | "electron-app",
28 | "electron",
29 | "halite"
30 | ],
31 | "dependencies": {
32 | "electron-debug": "^1.0.0"
33 | },
34 | "devDependencies": {
35 | "devtron": "^1.1.0",
36 | "electron": "^1.0.1",
37 | "electron-packager": "^8.2.0",
38 | "xo": "^0.16.0"
39 | },
40 | "xo": {
41 | "esnext": true,
42 | "envs": [
43 | "node",
44 | "browser"
45 | ]
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/visualizer/script/parsereplay.js:
--------------------------------------------------------------------------------
1 | ../../website/script/parsereplay.js
--------------------------------------------------------------------------------
/visualizer/script/visualizer.js:
--------------------------------------------------------------------------------
1 | ../../website/script/visualizer.js
--------------------------------------------------------------------------------
/visualizer/style/general.css:
--------------------------------------------------------------------------------
1 | ../../website/style/general.css
--------------------------------------------------------------------------------
/website/.htaccess:
--------------------------------------------------------------------------------
1 | AddOutputFilterByType DEFLATE text/plain
2 | AddOutputFilterByType DEFLATE text/html
3 | AddOutputFilterByType DEFLATE text/xml
4 | AddOutputFilterByType DEFLATE text/css
5 | AddOutputFilterByType DEFLATE application/xml
6 | AddOutputFilterByType DEFLATE application/xhtml+xml
7 | AddOutputFilterByType DEFLATE application/rss+xml
8 | AddOutputFilterByType DEFLATE application/javascript
9 | AddOutputFilterByType DEFLATE application/x-javascript
10 |
11 | ErrorDocument 404 /404.php
12 |
13 |
14 |
15 | ExpiresActive on
16 | ExpiresDefault "access plus 2 days"
17 |
18 |
19 |
--------------------------------------------------------------------------------
/website/404.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 404
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
404 Error
19 |
You might want to head back to the homepage .
20 |
The page you were looking for doesn't exist. If you think that there's a problem with our site, please email us at halite@halite.io or post on the forums .
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/website/api/manager/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | RewriteEngine On
3 | RewriteCond %{REQUEST_FILENAME} !-f
4 | RewriteCond %{REQUEST_FILENAME} !-d
5 | RewriteRule (.*)$ api.php?request=$1 [QSA,NC,L]
6 |
7 |
--------------------------------------------------------------------------------
/website/api/manager/api.php:
--------------------------------------------------------------------------------
1 | processAPI();
13 | } catch (Exception $e) {
14 | echo json_encode(Array('error' => $e->getMessage()));
15 | }
16 |
17 | ?>
18 |
--------------------------------------------------------------------------------
/website/api/manager/trueskillMatchQuality.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import trueskill
3 |
4 | sys.argv.pop(0)
5 |
6 | teams = [[trueskill.Rating(mu=float(sys.argv[a]), sigma=float(sys.argv[a+1]))] for a in range(0, len(sys.argv), 2)]
7 | print(trueskill.TrueSkill().quality(teams))
8 |
--------------------------------------------------------------------------------
/website/api/manager/updateTrueskill.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import trueskill
3 |
4 | sys.argv.pop(0)
5 |
6 | teams = [[trueskill.Rating(mu=float(sys.argv[a]), sigma=float(sys.argv[a+1]))] for a in range(0, len(sys.argv), 2)]
7 |
8 | newRatings = trueskill.rate(teams)
9 | for rating in newRatings:
10 | print(str(rating[0].mu) + " " + str(rating[0].sigma))
11 |
--------------------------------------------------------------------------------
/website/api/web/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | RewriteEngine On
3 | RewriteCond %{REQUEST_FILENAME} !-f
4 | RewriteCond %{REQUEST_FILENAME} !-d
5 | RewriteRule (.*)$ api.php?request=$1 [QSA,NC,L]
6 |
7 |
--------------------------------------------------------------------------------
/website/api/web/api.php:
--------------------------------------------------------------------------------
1 | processAPI();
13 | } catch (Exception $e) {
14 | echo json_encode(Array('error' => $e->getMessage()));
15 | }
16 |
17 | ?>
18 |
--------------------------------------------------------------------------------
/website/archiveEnvironment.sh:
--------------------------------------------------------------------------------
1 | cd ../environment
2 | zip -r HaliteEnvironment-Source *
3 | mkdir ../website/downloads/environment
4 | mv HaliteEnvironment-Source.zip ../website/downloads/environment/
5 |
--------------------------------------------------------------------------------
/website/assets/amino.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/amino.png
--------------------------------------------------------------------------------
/website/assets/combination.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/combination.png
--------------------------------------------------------------------------------
/website/assets/cornell_tech.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/cornell_tech.png
--------------------------------------------------------------------------------
/website/assets/example_vis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/example_vis.png
--------------------------------------------------------------------------------
/website/assets/favicons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/website/assets/favicons/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/android-chrome-512x512.png
--------------------------------------------------------------------------------
/website/assets/favicons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/apple-touch-icon.png
--------------------------------------------------------------------------------
/website/assets/favicons/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #002226
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/website/assets/favicons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/favicon-16x16.png
--------------------------------------------------------------------------------
/website/assets/favicons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/favicon-32x32.png
--------------------------------------------------------------------------------
/website/assets/favicons/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/favicon.ico
--------------------------------------------------------------------------------
/website/assets/favicons/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Halite",
3 | "icons": [
4 | {
5 | "src": "\/android-chrome-192x192.png",
6 | "sizes": "192x192",
7 | "type": "image\/png"
8 | },
9 | {
10 | "src": "\/android-chrome-512x512.png",
11 | "sizes": "512x512",
12 | "type": "image\/png"
13 | }
14 | ],
15 | "theme_color": "#002226",
16 | "display": "standalone"
17 | }
18 |
--------------------------------------------------------------------------------
/website/assets/favicons/mstile-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/mstile-144x144.png
--------------------------------------------------------------------------------
/website/assets/favicons/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/mstile-150x150.png
--------------------------------------------------------------------------------
/website/assets/favicons/mstile-310x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/mstile-310x150.png
--------------------------------------------------------------------------------
/website/assets/favicons/mstile-310x310.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/mstile-310x310.png
--------------------------------------------------------------------------------
/website/assets/favicons/mstile-70x70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/favicons/mstile-70x70.png
--------------------------------------------------------------------------------
/website/assets/full_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/full_logo.png
--------------------------------------------------------------------------------
/website/assets/hero.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/hero.png
--------------------------------------------------------------------------------
/website/assets/overkill-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/overkill-1.png
--------------------------------------------------------------------------------
/website/assets/overkill-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/overkill-2.png
--------------------------------------------------------------------------------
/website/assets/two_sigma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/two_sigma.png
--------------------------------------------------------------------------------
/website/assets/vettery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/vettery.png
--------------------------------------------------------------------------------
/website/assets/vis/dl_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/vis/dl_arrow.png
--------------------------------------------------------------------------------
/website/assets/vis/dr_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/vis/dr_arrow.png
--------------------------------------------------------------------------------
/website/assets/vis/l_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/vis/l_arrow.png
--------------------------------------------------------------------------------
/website/assets/vis/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/vis/pause.png
--------------------------------------------------------------------------------
/website/assets/vis/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/vis/play.png
--------------------------------------------------------------------------------
/website/assets/vis/q_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/vis/q_mark.png
--------------------------------------------------------------------------------
/website/assets/vis/r_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/assets/vis/r_arrow.png
--------------------------------------------------------------------------------
/website/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "lusitanian/oauth": "~0.3",
4 | "swiftmailer/swiftmailer": "^5.4.3",
5 | "aws/aws-sdk-php": "^3.19"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/website/cron/backupDatabase:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | TIMESTAMP=$(date +%s)
4 | mysqldump -u root Halite > "/etc/cron.hourly/dump/"$TIMESTAMP"_dump.sql"
5 | rsync -azvP /etc/cron.hourly/dump/* root@192.241.158.114:/backup/db
6 |
--------------------------------------------------------------------------------
/website/cron/backupWebsite:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | rsync -azvP /root/Halite/storage/bots/* root@192.241.158.114:/backup/web/storage/bots/
4 | rsync -azvP /root/Halite/halite.ini root@192.241.158.114:/backup/web/
5 |
--------------------------------------------------------------------------------
/website/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/favicon.ico
--------------------------------------------------------------------------------
/website/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/website/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/website/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/website/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/website/includes/dropdowns.php:
--------------------------------------------------------------------------------
1 |
2 | Learn
3 |
4 |
5 | Download
6 |
7 |
8 | Rankings
9 |
10 |
11 | Visualize
12 |
13 |
14 | Forums
15 |
16 |
17 | About
18 |
--------------------------------------------------------------------------------
/website/includes/footer.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/website/includes/header.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/website/includes/leaderTable.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | User
6 | Tier
7 | Language
8 | Level
9 | Organization
10 | Points
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/website/includes/login_form.php:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/website/includes/register_form.php:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/website/install.sh:
--------------------------------------------------------------------------------
1 | LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
2 | apt-get update
3 |
4 | apt-get install -y php5.6 php5.6-mysql apache2
5 | a2enmod rewrite expires
6 |
7 | apt-get install -y python3 python3-pip
8 |
9 | pip3 install trueskill boto paramiko pymysql
10 |
11 | apt-get install -y zip
12 |
13 | curl -sS https://getcomposer.org/installer | php
14 | mv composer.phar /usr/local/bin/composer
15 | composer install
16 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/breadcrumbs.less:
--------------------------------------------------------------------------------
1 | //
2 | // Breadcrumbs
3 | // --------------------------------------------------
4 |
5 |
6 | .breadcrumb {
7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
8 | margin-bottom: @line-height-computed;
9 | list-style: none;
10 | background-color: @breadcrumb-bg;
11 | border-radius: @border-radius-base;
12 |
13 | > li {
14 | display: inline-block;
15 |
16 | + li:before {
17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
18 | padding: 0 5px;
19 | color: @breadcrumb-color;
20 | }
21 | }
22 |
23 | > .active {
24 | color: @breadcrumb-active-color;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/close.less:
--------------------------------------------------------------------------------
1 | //
2 | // Close icons
3 | // --------------------------------------------------
4 |
5 |
6 | .close {
7 | float: right;
8 | font-size: (@font-size-base * 1.5);
9 | font-weight: @close-font-weight;
10 | line-height: 1;
11 | color: @close-color;
12 | text-shadow: @close-text-shadow;
13 | .opacity(.2);
14 |
15 | &:hover,
16 | &:focus {
17 | color: @close-color;
18 | text-decoration: none;
19 | cursor: pointer;
20 | .opacity(.5);
21 | }
22 |
23 | // Additional properties for button version
24 | // iOS requires the button element instead of an anchor tag.
25 | // If you want the anchor version, it requires `href="#"`.
26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
27 | button& {
28 | padding: 0;
29 | cursor: pointer;
30 | background: transparent;
31 | border: 0;
32 | -webkit-appearance: none;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/component-animations.less:
--------------------------------------------------------------------------------
1 | //
2 | // Component animations
3 | // --------------------------------------------------
4 |
5 | // Heads up!
6 | //
7 | // We don't use the `.opacity()` mixin here since it causes a bug with text
8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
9 |
10 | .fade {
11 | opacity: 0;
12 | .transition(opacity .15s linear);
13 | &.in {
14 | opacity: 1;
15 | }
16 | }
17 |
18 | .collapse {
19 | display: none;
20 |
21 | &.in { display: block; }
22 | tr&.in { display: table-row; }
23 | tbody&.in { display: table-row-group; }
24 | }
25 |
26 | .collapsing {
27 | position: relative;
28 | height: 0;
29 | overflow: hidden;
30 | .transition-property(~"height, visibility");
31 | .transition-duration(.35s);
32 | .transition-timing-function(ease);
33 | }
34 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/media.less:
--------------------------------------------------------------------------------
1 | .media {
2 | // Proper spacing between instances of .media
3 | margin-top: 15px;
4 |
5 | &:first-child {
6 | margin-top: 0;
7 | }
8 | }
9 |
10 | .media,
11 | .media-body {
12 | zoom: 1;
13 | overflow: hidden;
14 | }
15 |
16 | .media-body {
17 | width: 10000px;
18 | }
19 |
20 | .media-object {
21 | display: block;
22 |
23 | // Fix collapse in webkit from max-width: 100% and display: table-cell.
24 | &.img-thumbnail {
25 | max-width: none;
26 | }
27 | }
28 |
29 | .media-right,
30 | .media > .pull-right {
31 | padding-left: 10px;
32 | }
33 |
34 | .media-left,
35 | .media > .pull-left {
36 | padding-right: 10px;
37 | }
38 |
39 | .media-left,
40 | .media-right,
41 | .media-body {
42 | display: table-cell;
43 | vertical-align: top;
44 | }
45 |
46 | .media-middle {
47 | vertical-align: middle;
48 | }
49 |
50 | .media-bottom {
51 | vertical-align: bottom;
52 | }
53 |
54 | // Reset margins on headings for tighter default spacing
55 | .media-heading {
56 | margin-top: 0;
57 | margin-bottom: 5px;
58 | }
59 |
60 | // Media list variation
61 | //
62 | // Undo default ul/ol styles
63 | .media-list {
64 | padding-left: 0;
65 | list-style: none;
66 | }
67 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------------------------------
3 |
4 | // Utilities
5 | @import "mixins/hide-text.less";
6 | @import "mixins/opacity.less";
7 | @import "mixins/image.less";
8 | @import "mixins/labels.less";
9 | @import "mixins/reset-filter.less";
10 | @import "mixins/resize.less";
11 | @import "mixins/responsive-visibility.less";
12 | @import "mixins/size.less";
13 | @import "mixins/tab-focus.less";
14 | @import "mixins/reset-text.less";
15 | @import "mixins/text-emphasis.less";
16 | @import "mixins/text-overflow.less";
17 | @import "mixins/vendor-prefixes.less";
18 |
19 | // Components
20 | @import "mixins/alerts.less";
21 | @import "mixins/buttons.less";
22 | @import "mixins/panels.less";
23 | @import "mixins/pagination.less";
24 | @import "mixins/list-group.less";
25 | @import "mixins/nav-divider.less";
26 | @import "mixins/forms.less";
27 | @import "mixins/progress-bar.less";
28 | @import "mixins/table-row.less";
29 |
30 | // Skins
31 | @import "mixins/background-variant.less";
32 | @import "mixins/border-radius.less";
33 | @import "mixins/gradients.less";
34 |
35 | // Layout
36 | @import "mixins/clearfix.less";
37 | @import "mixins/center-block.less";
38 | @import "mixins/nav-vertical-align.less";
39 | @import "mixins/grid-framework.less";
40 | @import "mixins/grid.less";
41 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/alerts.less:
--------------------------------------------------------------------------------
1 | // Alerts
2 |
3 | .alert-variant(@background; @border; @text-color) {
4 | background-color: @background;
5 | border-color: @border;
6 | color: @text-color;
7 |
8 | hr {
9 | border-top-color: darken(@border, 5%);
10 | }
11 | .alert-link {
12 | color: darken(@text-color, 10%);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/background-variant.less:
--------------------------------------------------------------------------------
1 | // Contextual backgrounds
2 |
3 | .bg-variant(@color) {
4 | background-color: @color;
5 | a&:hover,
6 | a&:focus {
7 | background-color: darken(@color, 10%);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/border-radius.less:
--------------------------------------------------------------------------------
1 | // Single side border-radius
2 |
3 | .border-top-radius(@radius) {
4 | border-top-right-radius: @radius;
5 | border-top-left-radius: @radius;
6 | }
7 | .border-right-radius(@radius) {
8 | border-bottom-right-radius: @radius;
9 | border-top-right-radius: @radius;
10 | }
11 | .border-bottom-radius(@radius) {
12 | border-bottom-right-radius: @radius;
13 | border-bottom-left-radius: @radius;
14 | }
15 | .border-left-radius(@radius) {
16 | border-bottom-left-radius: @radius;
17 | border-top-left-radius: @radius;
18 | }
19 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/center-block.less:
--------------------------------------------------------------------------------
1 | // Center-align a block level element
2 |
3 | .center-block() {
4 | display: block;
5 | margin-left: auto;
6 | margin-right: auto;
7 | }
8 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/clearfix.less:
--------------------------------------------------------------------------------
1 | // Clearfix
2 | //
3 | // For modern browsers
4 | // 1. The space content is one way to avoid an Opera bug when the
5 | // contenteditable attribute is included anywhere else in the document.
6 | // Otherwise it causes space to appear at the top and bottom of elements
7 | // that are clearfixed.
8 | // 2. The use of `table` rather than `block` is only necessary if using
9 | // `:before` to contain the top-margins of child elements.
10 | //
11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/
12 |
13 | .clearfix() {
14 | &:before,
15 | &:after {
16 | content: " "; // 1
17 | display: table; // 2
18 | }
19 | &:after {
20 | clear: both;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/hide-text.less:
--------------------------------------------------------------------------------
1 | // CSS image replacement
2 | //
3 | // Heads up! v3 launched with only `.hide-text()`, but per our pattern for
4 | // mixins being reused as classes with the same name, this doesn't hold up. As
5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
6 | //
7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
8 |
9 | // Deprecated as of v3.0.1 (has been removed in v4)
10 | .hide-text() {
11 | font: ~"0/0" a;
12 | color: transparent;
13 | text-shadow: none;
14 | background-color: transparent;
15 | border: 0;
16 | }
17 |
18 | // New mixin to use as of v3.0.1
19 | .text-hide() {
20 | .hide-text();
21 | }
22 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/image.less:
--------------------------------------------------------------------------------
1 | // Image Mixins
2 | // - Responsive image
3 | // - Retina image
4 |
5 |
6 | // Responsive image
7 | //
8 | // Keep images from scaling beyond the width of their parents.
9 | .img-responsive(@display: block) {
10 | display: @display;
11 | max-width: 100%; // Part 1: Set a maximum relative to the parent
12 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
13 | }
14 |
15 |
16 | // Retina image
17 | //
18 | // Short retina mixin for setting background-image and -size. Note that the
19 | // spelling of `min--moz-device-pixel-ratio` is intentional.
20 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
21 | background-image: url("@{file-1x}");
22 |
23 | @media
24 | only screen and (-webkit-min-device-pixel-ratio: 2),
25 | only screen and ( min--moz-device-pixel-ratio: 2),
26 | only screen and ( -o-min-device-pixel-ratio: 2/1),
27 | only screen and ( min-device-pixel-ratio: 2),
28 | only screen and ( min-resolution: 192dpi),
29 | only screen and ( min-resolution: 2dppx) {
30 | background-image: url("@{file-2x}");
31 | background-size: @width-1x @height-1x;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/labels.less:
--------------------------------------------------------------------------------
1 | // Labels
2 |
3 | .label-variant(@color) {
4 | background-color: @color;
5 |
6 | &[href] {
7 | &:hover,
8 | &:focus {
9 | background-color: darken(@color, 10%);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/list-group.less:
--------------------------------------------------------------------------------
1 | // List Groups
2 |
3 | .list-group-item-variant(@state; @background; @color) {
4 | .list-group-item-@{state} {
5 | color: @color;
6 | background-color: @background;
7 |
8 | a&,
9 | button& {
10 | color: @color;
11 |
12 | .list-group-item-heading {
13 | color: inherit;
14 | }
15 |
16 | &:hover,
17 | &:focus {
18 | color: @color;
19 | background-color: darken(@background, 5%);
20 | }
21 | &.active,
22 | &.active:hover,
23 | &.active:focus {
24 | color: #fff;
25 | background-color: @color;
26 | border-color: @color;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/nav-divider.less:
--------------------------------------------------------------------------------
1 | // Horizontal dividers
2 | //
3 | // Dividers (basically an hr) within dropdowns and nav lists
4 |
5 | .nav-divider(@color: #e5e5e5) {
6 | height: 1px;
7 | margin: ((@line-height-computed / 2) - 1) 0;
8 | overflow: hidden;
9 | background-color: @color;
10 | }
11 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/nav-vertical-align.less:
--------------------------------------------------------------------------------
1 | // Navbar vertical align
2 | //
3 | // Vertically center elements in the navbar.
4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
5 |
6 | .navbar-vertical-align(@element-height) {
7 | margin-top: ((@navbar-height - @element-height) / 2);
8 | margin-bottom: ((@navbar-height - @element-height) / 2);
9 | }
10 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/opacity.less:
--------------------------------------------------------------------------------
1 | // Opacity
2 |
3 | .opacity(@opacity) {
4 | opacity: @opacity;
5 | // IE8 filter
6 | @opacity-ie: (@opacity * 100);
7 | filter: ~"alpha(opacity=@{opacity-ie})";
8 | }
9 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/pagination.less:
--------------------------------------------------------------------------------
1 | // Pagination
2 |
3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
4 | > li {
5 | > a,
6 | > span {
7 | padding: @padding-vertical @padding-horizontal;
8 | font-size: @font-size;
9 | line-height: @line-height;
10 | }
11 | &:first-child {
12 | > a,
13 | > span {
14 | .border-left-radius(@border-radius);
15 | }
16 | }
17 | &:last-child {
18 | > a,
19 | > span {
20 | .border-right-radius(@border-radius);
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/panels.less:
--------------------------------------------------------------------------------
1 | // Panels
2 |
3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
4 | border-color: @border;
5 |
6 | & > .panel-heading {
7 | color: @heading-text-color;
8 | background-color: @heading-bg-color;
9 | border-color: @heading-border;
10 |
11 | + .panel-collapse > .panel-body {
12 | border-top-color: @border;
13 | }
14 | .badge {
15 | color: @heading-bg-color;
16 | background-color: @heading-text-color;
17 | }
18 | }
19 | & > .panel-footer {
20 | + .panel-collapse > .panel-body {
21 | border-bottom-color: @border;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/progress-bar.less:
--------------------------------------------------------------------------------
1 | // Progress bars
2 |
3 | .progress-bar-variant(@color) {
4 | background-color: @color;
5 |
6 | // Deprecated parent class requirement as of v3.2.0
7 | .progress-striped & {
8 | #gradient > .striped();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/reset-filter.less:
--------------------------------------------------------------------------------
1 | // Reset filters for IE
2 | //
3 | // When you need to remove a gradient background, do not forget to use this to reset
4 | // the IE filter for IE9 and below.
5 |
6 | .reset-filter() {
7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
8 | }
9 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/reset-text.less:
--------------------------------------------------------------------------------
1 | .reset-text() {
2 | font-family: @font-family-base;
3 | // We deliberately do NOT reset font-size.
4 | font-style: normal;
5 | font-weight: normal;
6 | letter-spacing: normal;
7 | line-break: auto;
8 | line-height: @line-height-base;
9 | text-align: left; // Fallback for where `start` is not supported
10 | text-align: start;
11 | text-decoration: none;
12 | text-shadow: none;
13 | text-transform: none;
14 | white-space: normal;
15 | word-break: normal;
16 | word-spacing: normal;
17 | word-wrap: normal;
18 | }
19 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/resize.less:
--------------------------------------------------------------------------------
1 | // Resize anything
2 |
3 | .resizable(@direction) {
4 | resize: @direction; // Options: horizontal, vertical, both
5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
6 | }
7 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/responsive-visibility.less:
--------------------------------------------------------------------------------
1 | // Responsive utilities
2 |
3 | //
4 | // More easily include all the states for responsive-utilities.less.
5 | .responsive-visibility() {
6 | display: block !important;
7 | table& { display: table !important; }
8 | tr& { display: table-row !important; }
9 | th&,
10 | td& { display: table-cell !important; }
11 | }
12 |
13 | .responsive-invisibility() {
14 | display: none !important;
15 | }
16 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/size.less:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | .size(@width; @height) {
4 | width: @width;
5 | height: @height;
6 | }
7 |
8 | .square(@size) {
9 | .size(@size; @size);
10 | }
11 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/tab-focus.less:
--------------------------------------------------------------------------------
1 | // WebKit-style focus
2 |
3 | .tab-focus() {
4 | // WebKit-specific. Other browsers will keep their default outline style.
5 | // (Initially tried to also force default via `outline: initial`,
6 | // but that seems to erroneously remove the outline in Firefox altogether.)
7 | outline: 5px auto -webkit-focus-ring-color;
8 | outline-offset: -2px;
9 | }
10 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/table-row.less:
--------------------------------------------------------------------------------
1 | // Tables
2 |
3 | .table-row-variant(@state; @background) {
4 | // Exact selectors below required to override `.table-striped` and prevent
5 | // inheritance to nested tables.
6 | .table > thead > tr,
7 | .table > tbody > tr,
8 | .table > tfoot > tr {
9 | > td.@{state},
10 | > th.@{state},
11 | &.@{state} > td,
12 | &.@{state} > th {
13 | background-color: @background;
14 | }
15 | }
16 |
17 | // Hover states for `.table-hover`
18 | // Note: this is not available for cells or rows within `thead` or `tfoot`.
19 | .table-hover > tbody > tr {
20 | > td.@{state}:hover,
21 | > th.@{state}:hover,
22 | &.@{state}:hover > td,
23 | &:hover > .@{state},
24 | &.@{state}:hover > th {
25 | background-color: darken(@background, 5%);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/text-emphasis.less:
--------------------------------------------------------------------------------
1 | // Typography
2 |
3 | .text-emphasis-variant(@color) {
4 | color: @color;
5 | a&:hover,
6 | a&:focus {
7 | color: darken(@color, 10%);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/mixins/text-overflow.less:
--------------------------------------------------------------------------------
1 | // Text overflow
2 | // Requires inline-block or block for proper styling
3 |
4 | .text-overflow() {
5 | overflow: hidden;
6 | text-overflow: ellipsis;
7 | white-space: nowrap;
8 | }
9 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/pager.less:
--------------------------------------------------------------------------------
1 | //
2 | // Pager pagination
3 | // --------------------------------------------------
4 |
5 |
6 | .pager {
7 | padding-left: 0;
8 | margin: @line-height-computed 0;
9 | list-style: none;
10 | text-align: center;
11 | &:extend(.clearfix all);
12 | li {
13 | display: inline;
14 | > a,
15 | > span {
16 | display: inline-block;
17 | padding: 5px 14px;
18 | background-color: @pager-bg;
19 | border: 1px solid @pager-border;
20 | border-radius: @pager-border-radius;
21 | }
22 |
23 | > a:hover,
24 | > a:focus {
25 | text-decoration: none;
26 | background-color: @pager-hover-bg;
27 | }
28 | }
29 |
30 | .next {
31 | > a,
32 | > span {
33 | float: right;
34 | }
35 | }
36 |
37 | .previous {
38 | > a,
39 | > span {
40 | float: left;
41 | }
42 | }
43 |
44 | .disabled {
45 | > a,
46 | > a:hover,
47 | > a:focus,
48 | > span {
49 | color: @pager-disabled-color;
50 | background-color: @pager-bg;
51 | cursor: @cursor-disabled;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/responsive-embed.less:
--------------------------------------------------------------------------------
1 | // Embeds responsive
2 | //
3 | // Credit: Nicolas Gallagher and SUIT CSS.
4 |
5 | .embed-responsive {
6 | position: relative;
7 | display: block;
8 | height: 0;
9 | padding: 0;
10 | overflow: hidden;
11 |
12 | .embed-responsive-item,
13 | iframe,
14 | embed,
15 | object,
16 | video {
17 | position: absolute;
18 | top: 0;
19 | left: 0;
20 | bottom: 0;
21 | height: 100%;
22 | width: 100%;
23 | border: 0;
24 | }
25 | }
26 |
27 | // Modifier class for 16:9 aspect ratio
28 | .embed-responsive-16by9 {
29 | padding-bottom: 56.25%;
30 | }
31 |
32 | // Modifier class for 4:3 aspect ratio
33 | .embed-responsive-4by3 {
34 | padding-bottom: 75%;
35 | }
36 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/thumbnails.less:
--------------------------------------------------------------------------------
1 | //
2 | // Thumbnails
3 | // --------------------------------------------------
4 |
5 |
6 | // Mixin and adjust the regular image class
7 | .thumbnail {
8 | display: block;
9 | padding: @thumbnail-padding;
10 | margin-bottom: @line-height-computed;
11 | line-height: @line-height-base;
12 | background-color: @thumbnail-bg;
13 | border: 1px solid @thumbnail-border;
14 | border-radius: @thumbnail-border-radius;
15 | .transition(border .2s ease-in-out);
16 |
17 | > img,
18 | a > img {
19 | &:extend(.img-responsive);
20 | margin-left: auto;
21 | margin-right: auto;
22 | }
23 |
24 | // Add a hover state for linked versions only
25 | a&:hover,
26 | a&:focus,
27 | a&.active {
28 | border-color: @link-color;
29 | }
30 |
31 | // Image captions
32 | .caption {
33 | padding: @thumbnail-caption-padding;
34 | color: @thumbnail-caption-color;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/utilities.less:
--------------------------------------------------------------------------------
1 | //
2 | // Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // Floats
7 | // -------------------------
8 |
9 | .clearfix {
10 | .clearfix();
11 | }
12 | .center-block {
13 | .center-block();
14 | }
15 | .pull-right {
16 | float: right !important;
17 | }
18 | .pull-left {
19 | float: left !important;
20 | }
21 |
22 |
23 | // Toggling content
24 | // -------------------------
25 |
26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1
27 | .hide {
28 | display: none !important;
29 | }
30 | .show {
31 | display: block !important;
32 | }
33 | .invisible {
34 | visibility: hidden;
35 | }
36 | .text-hide {
37 | .text-hide();
38 | }
39 |
40 |
41 | // Hide from screenreaders and browsers
42 | //
43 | // Credit: HTML5 Boilerplate
44 |
45 | .hidden {
46 | display: none !important;
47 | }
48 |
49 |
50 | // For Affix plugin
51 | // -------------------------
52 |
53 | .affix {
54 | position: fixed;
55 | }
56 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/bootstrap/wells.less:
--------------------------------------------------------------------------------
1 | //
2 | // Wells
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .well {
8 | min-height: 20px;
9 | padding: 19px;
10 | margin-bottom: 20px;
11 | background-color: @well-bg;
12 | border: 1px solid @well-border;
13 | border-radius: @border-radius-base;
14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
15 | blockquote {
16 | border-color: #ddd;
17 | border-color: rgba(0,0,0,.15);
18 | }
19 | }
20 |
21 | // Sizes
22 | .well-lg {
23 | padding: 24px;
24 | border-radius: @border-radius-large;
25 | }
26 | .well-sm {
27 | padding: 9px;
28 | border-radius: @border-radius-small;
29 | }
30 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/build.less:
--------------------------------------------------------------------------------
1 | @import "bootstrap/bootstrap.less";
2 | @import "variables.less";
3 | @import "bootswatch.less";
4 |
--------------------------------------------------------------------------------
/website/lib/bootstrap/build.sh:
--------------------------------------------------------------------------------
1 | lessc -clean-css build.less > ../bootstrap.min.css
2 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/.gitattributes:
--------------------------------------------------------------------------------
1 | *.crt -crlf
2 | *.key -crlf
3 | *.srl -crlf
4 | *.pub -crlf
5 | *.priv -crlf
6 | *.txt -crlf
7 |
8 | # ignore /notes in the git-generated distributed .zip archive
9 | /notes export-ignore
10 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/.gitignore:
--------------------------------------------------------------------------------
1 | /tests/acceptance.conf.php
2 | /tests/smoke.conf.php
3 | /build/*
4 | /vendor/
5 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | sudo: false
4 |
5 | before_script:
6 | - cp tests/acceptance.conf.php.default tests/acceptance.conf.php
7 | - cp tests/smoke.conf.php.default tests/smoke.conf.php
8 | - composer self-update
9 | - composer update --no-interaction --prefer-source
10 | - gem install mime-types -v 2.99.1
11 | - gem install mailcatcher
12 | - mailcatcher --smtp-port 4456
13 |
14 | script:
15 | - phpunit --verbose
16 |
17 | matrix:
18 | include:
19 | - php: 5.3
20 | - php: 5.4
21 | - php: 5.5
22 | - php: 5.6
23 | - php: 7.0
24 | - php: hhvm
25 | allow_failures:
26 | - php: 7.0
27 | - php: hhvm
28 | fast_finish: true
29 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013-2016 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/README:
--------------------------------------------------------------------------------
1 | Swift Mailer
2 | ------------
3 |
4 | Swift Mailer is a component based mailing solution for PHP 5.
5 | It is released under the MIT license.
6 |
7 | Homepage: http://swiftmailer.org
8 | Documentation: http://swiftmailer.org/docs
9 | Bugs: https://github.com/swiftmailer/swiftmailer/issues
10 | Repository: https://github.com/swiftmailer/swiftmailer
11 |
12 | Swift Mailer is highly object-oriented by design and lends itself
13 | to use in complex web application with a great deal of flexibility.
14 |
15 | For full details on usage, see the documentation.
16 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/VERSION:
--------------------------------------------------------------------------------
1 | Swift-5.4.2
2 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "swiftmailer/swiftmailer",
3 | "type": "library",
4 | "description": "Swiftmailer, free feature-rich PHP mailer",
5 | "keywords": ["mail","mailer","email"],
6 | "homepage": "http://swiftmailer.org",
7 | "license": "MIT",
8 | "authors": [{
9 | "name": "Chris Corbyn"
10 | },{
11 | "name": "Fabien Potencier",
12 | "email": "fabien@symfony.com"
13 | }
14 | ],
15 | "require": {
16 | "php": ">=5.3.3"
17 | },
18 | "require-dev": {
19 | "mockery/mockery": "~0.9.1,<0.9.4"
20 | },
21 | "autoload": {
22 | "files": ["lib/swift_required.php"]
23 | },
24 | "autoload-dev": {
25 | "psr-0": {
26 | "Swift_": "tests/unit"
27 | }
28 | },
29 | "extra": {
30 | "branch-alias": {
31 | "dev-master": "5.4-dev"
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php:
--------------------------------------------------------------------------------
1 | getPath())) === false) {
27 | throw new Swift_IoException('Failed to get temporary file content.');
28 | }
29 |
30 | return $content;
31 | }
32 |
33 | public function __destruct() {
34 | if (file_exists($this->getPath())) {
35 | @unlink($this->getPath());
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php:
--------------------------------------------------------------------------------
1 | getSource();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/Events/TransportExceptionEvent.php:
--------------------------------------------------------------------------------
1 | _exception = $ex;
33 | }
34 |
35 | /**
36 | * Get the TransportException thrown.
37 | *
38 | * @return Swift_TransportException
39 | */
40 | public function getException() {
41 | return $this->_exception;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php:
--------------------------------------------------------------------------------
1 | createDependenciesFor('transport.failover')
27 | );
28 |
29 | $this->setTransports($transports);
30 | }
31 |
32 | /**
33 | * Create a new FailoverTransport instance.
34 | *
35 | * @param Swift_Transport[] $transports
36 | *
37 | * @return Swift_FailoverTransport
38 | */
39 | public static function newInstance($transports = array()) {
40 | return new self($transports);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/FileStream.php:
--------------------------------------------------------------------------------
1 | createDependenciesFor('transport.mail')
27 | );
28 |
29 | $this->setExtraParams($extraParams);
30 | }
31 |
32 | /**
33 | * Create a new MailTransport instance.
34 | *
35 | * @param string $extraParams To be passed to mail()
36 | *
37 | * @return Swift_MailTransport
38 | */
39 | public static function newInstance($extraParams = '-f%s') {
40 | return new self($extraParams);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php:
--------------------------------------------------------------------------------
1 | 'Foo') or ('foo@bar' => NULL).
27 | *
28 | * @return array
29 | */
30 | public function nextRecipient();
31 | }
32 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * Pretends messages have been sent, but just ignores them.
13 | *
14 | * @author Fabien Potencier
15 | */
16 | class Swift_NullTransport extends Swift_Transport_NullTransport{
17 | /**
18 | * Create a new NullTransport.
19 | */
20 | public function __construct() {
21 | call_user_func_array(
22 | array($this, 'Swift_Transport_NullTransport::__construct'),
23 | Swift_DependencyContainer::getInstance()
24 | ->createDependenciesFor('transport.null')
25 | );
26 | }
27 |
28 | /**
29 | * Create a new NullTransport instance.
30 | *
31 | * @return Swift_NullTransport
32 | */
33 | public static function newInstance() {
34 | return new self();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php:
--------------------------------------------------------------------------------
1 | _isHtml = $isHtml;
27 | }
28 |
29 | /**
30 | * Add a log entry.
31 | *
32 | * @param string $entry
33 | */
34 | public function add($entry) {
35 | if ($this->_isHtml) {
36 | printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), ' ', PHP_EOL);
37 | } else {
38 | printf('%s%s', $entry, PHP_EOL);
39 | }
40 | }
41 |
42 | /**
43 | * Not implemented.
44 | */
45 | public function clear() {
46 | }
47 |
48 | /**
49 | * Not implemented.
50 | */
51 | public function dump() {
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php:
--------------------------------------------------------------------------------
1 |
18 | *
19 | * @deprecated
20 | */
21 | class Swift_SignedMessage extends Swift_Message{
22 | }
23 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/Signer.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | interface Swift_Signer{
18 | public function reset();
19 | }
20 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/Signers/BodySigner.php:
--------------------------------------------------------------------------------
1 |
15 | */
16 | interface Swift_Signers_BodySigner extends Swift_Signer{
17 | /**
18 | * Change the Swift_Signed_Message to apply the singing.
19 | *
20 | * @param Swift_Message $message
21 | *
22 | * @return Swift_Signers_BodySigner
23 | */
24 | public function signMessage(Swift_Message $message);
25 |
26 | /**
27 | * Return the list of header a signer might tamper.
28 | *
29 | * @return array
30 | */
31 | public function getAlteredHeaders();
32 | }
33 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/SpoolTransport.php:
--------------------------------------------------------------------------------
1 |
6 | *
7 | * For the full copyright and license information, please view the LICENSE
8 | * file that was distributed with this source code.
9 | */
10 |
11 | /**
12 | * Stores Messages in a queue.
13 | *
14 | * @author Fabien Potencier
15 | */
16 | class Swift_SpoolTransport extends Swift_Transport_SpoolTransport{
17 | /**
18 | * Create a new SpoolTransport.
19 | *
20 | * @param Swift_Spool $spool
21 | */
22 | public function __construct(Swift_Spool $spool) {
23 | $arguments = Swift_DependencyContainer::getInstance()
24 | ->createDependenciesFor('transport.spool');
25 |
26 | $arguments[] = $spool;
27 |
28 | call_user_func_array(
29 | array($this, 'Swift_Transport_SpoolTransport::__construct'),
30 | $arguments
31 | );
32 | }
33 |
34 | /**
35 | * Create a new SpoolTransport instance.
36 | *
37 | * @param Swift_Spool $spool
38 | *
39 | * @return Swift_SpoolTransport
40 | */
41 | public static function newInstance(Swift_Spool $spool) {
42 | return new self($spool);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/classes/Swift/StreamFilter.php:
--------------------------------------------------------------------------------
1 |
14 | */
15 | class Swift_Validate{
16 | /**
17 | * Grammar Object.
18 | *
19 | * @var Swift_Mime_Grammar
20 | */
21 | private static $grammar = null;
22 |
23 | /**
24 | * Checks if an e-mail address matches the current grammars.
25 | *
26 | * @param string $email
27 | *
28 | * @return bool
29 | */
30 | public static function email($email) {
31 | if (self::$grammar === null) {
32 | self::$grammar = Swift_DependencyContainer::getInstance()
33 | ->lookup('mime.grammar');
34 | }
35 |
36 | return (bool) preg_match(
37 | '/^'.self::$grammar->getDefinition('addr-spec').'$/D',
38 | $email
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/dependency_maps/cache_deps.php:
--------------------------------------------------------------------------------
1 | register('cache')
5 | ->asAliasOf('cache.array')
6 |
7 | ->register('tempdir')
8 | ->asValue('/tmp')
9 |
10 | ->register('cache.null')
11 | ->asSharedInstanceOf('Swift_KeyCache_NullKeyCache')
12 |
13 | ->register('cache.array')
14 | ->asSharedInstanceOf('Swift_KeyCache_ArrayKeyCache')
15 | ->withDependencies(array('cache.inputstream'))
16 |
17 | ->register('cache.disk')
18 | ->asSharedInstanceOf('Swift_KeyCache_DiskKeyCache')
19 | ->withDependencies(array('cache.inputstream', 'tempdir'))
20 |
21 | ->register('cache.inputstream')
22 | ->asNewInstanceOf('Swift_KeyCache_SimpleKeyCacheInputStream')
23 | ;
24 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/dependency_maps/message_deps.php:
--------------------------------------------------------------------------------
1 | register('message.message')
5 | ->asNewInstanceOf('Swift_Message')
6 |
7 | ->register('message.mimepart')
8 | ->asNewInstanceOf('Swift_MimePart')
9 | ;
10 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/preferences.php:
--------------------------------------------------------------------------------
1 | setCharset('utf-8');
13 |
14 | // Without these lines the default caching mechanism is "array" but this uses a lot of memory.
15 | // If possible, use a disk cache to enable attaching large attachments etc.
16 | // You can override the default temporary directory by setting the TMPDIR environment variable.
17 | if (@is_writable($tmpDir = sys_get_temp_dir())) {
18 | $preferences->setTempDir($tmpDir)->setCacheType('disk');
19 | }
20 |
21 | // this should only be done when Swiftmailer won't use the native QP content encoder
22 | // see mime_deps.php
23 | if (version_compare(phpversion(), '5.4.7', '<')) {
24 | $preferences->setQPDotEscape(false);
25 | }
26 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/lib/swift_init.php:
--------------------------------------------------------------------------------
1 | content .= $arg;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/SwiftMailerTestCase.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/_samples/files/swiftmailer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/lib/swiftmailer/tests/_samples/files/swiftmailer.png
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/_samples/smime/CA.srl:
--------------------------------------------------------------------------------
1 | D42DA34CF90FA0DE
2 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/_samples/smime/ca.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDazCCAlOgAwIBAgIJAKJCGQYLxWT1MA0GCSqGSIb3DQEBBQUAMEwxFzAVBgNV
3 | BAMMDlN3aWZ0bWFpbGVyIENBMRQwEgYDVQQKDAtTd2lmdG1haWxlcjEOMAwGA1UE
4 | BwwFUGFyaXMxCzAJBgNVBAYTAkZSMB4XDTEzMTEyNzA4MzkxMFoXDTE3MTEyNjA4
5 | MzkxMFowTDEXMBUGA1UEAwwOU3dpZnRtYWlsZXIgQ0ExFDASBgNVBAoMC1N3aWZ0
6 | bWFpbGVyMQ4wDAYDVQQHDAVQYXJpczELMAkGA1UEBhMCRlIwggEiMA0GCSqGSIb3
7 | DQEBAQUAA4IBDwAwggEKAoIBAQC7RLdHE3OWo9aZwv1xA/cYyPui/gegxpTqClRp
8 | gGcVQ+jxIfnJQDQndyoAvFDiqOiZ+gAjZGJeUHDp9C/2IZp05MLh+omt9N8pBykm
9 | 3nj/3ZwPXOAO0uyDPAOHhISITAxEuZCqDnq7iYujywtwfQ7bpW1hCK9PfNZYMStM
10 | kw7LsGr5BqcKkPuOWTvxE3+NqK8HxydYolsoApEGhgonyImVh1Pg1Kjkt5ojvwAX
11 | zOdjfw5poY5NArwuLORUH+XocetRo8DC6S42HkU/MoqcYxa9EuRuwuQh7GtE6baR
12 | PgrDsEYaY4Asy43sK81V51F/8Q1bHZKN/goQdxQwzv+/nOLTAgMBAAGjUDBOMB0G
13 | A1UdDgQWBBRHgqkl543tKhsVAvcx1I0JFU7JuDAfBgNVHSMEGDAWgBRHgqkl543t
14 | KhsVAvcx1I0JFU7JuDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAz
15 | OJiEQcygKGkkXXDiXGBvP/cSznj3nG9FolON0yHUBgdvLfNnctRMStGzPke0siLt
16 | RJvjqiL0Uw+blmLJU8lgMyLJ9ctXkiLJ/WflabN7VzmwYRWe5HzafGQJAg5uFjae
17 | VtAAHQgvbmdXB6brWvcMQmB8di7wjVedeigZvkt1z2V0FtBy8ybJaT5H6bX9Bf5C
18 | dS9r4mLhk/0ThthpRhRxsmupSL6e49nJaIk9q0UTEQVnorJXPcs4SPTIY51bCp6u
19 | cOebhNgndSxCiy0zSD7vRjNiyB/YNGZ9Uv/3DNTLleMZ9kZgfoKVpwYKrRL0IFT/
20 | cfS2OV1wxRxq668qaOfK
21 | -----END CERTIFICATE-----
22 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/_samples/smime/encrypt.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDFjCCAf4CCQDULaNM+Q+g3TANBgkqhkiG9w0BAQUFADBMMRcwFQYDVQQDDA5T
3 | d2lmdG1haWxlciBDQTEUMBIGA1UECgwLU3dpZnRtYWlsZXIxDjAMBgNVBAcMBVBh
4 | cmlzMQswCQYDVQQGEwJGUjAeFw0xMzExMjcwODM5MTFaFw0xNzExMjYwODM5MTFa
5 | ME4xGTAXBgNVBAMMEFN3aWZ0bWFpbGVyLVVzZXIxFDASBgNVBAoMC1N3aWZ0bWFp
6 | bGVyMQ4wDAYDVQQHDAVQYXJpczELMAkGA1UEBhMCRlIwggEiMA0GCSqGSIb3DQEB
7 | AQUAA4IBDwAwggEKAoIBAQCcNO+fVZBT2znmVwXXZ08n3G5WA1kyvqh9z4RBBZOD
8 | V46Gc1X9MMXr9+wzZBFkAckKaa6KsTkeUr4pC8XUBpQnakxH/kW9CaDPdOE+7wNo
9 | FkPfc6pjWWgpAVxdkrtk7pb4/aGQ++HUkqVu0cMpIcj/7ht7H+3QLZHybn+oMr2+
10 | FDnn8vPmHxVioinSrxKTlUITuLWS9ZZUTrDa0dG8UAv55A/Tba4T4McCPDpJSA4m
11 | 9jrW321NGQUntQoItOJxagaueSvh6PveGV826gTXoU5X+YJ3I2OZUEQ2l6yByAzf
12 | nT+QlxPj5ikotFwL72HsenYtetynOO/k43FblAF/V/l7AgMBAAEwDQYJKoZIhvcN
13 | AQEFBQADggEBAJ048Sdb9Sw5OJM5L00OtGHgcT1B/phqdzSjkM/s64cg3Q20VN+F
14 | fZIIkOnxgyYWcpOWXcdNw2tm5OWhWPGsBcYgMac7uK/ukgoOJSjICg+TTS5kRo96
15 | iHtmImqkWc6WjNODh7uMnQ6DsZsscdl7Bkx5pKhgGnEdHr5GW8sztgXgyPQO5LUs
16 | YzCmR1RK1WoNMxwbPrGLgYdcpJw69ns5hJbZbMWwrdufiMjYWvTfBPABkk1JRCcY
17 | K6rRTAx4fApsw1kEIY8grGxyAzfRXLArpro7thJr0SIquZ8GpXkQT/mgRR8JD9Hp
18 | z9yhr98EnKzITE/yclGN4pUsuk9S3jiyzUU=
19 | -----END CERTIFICATE-----
20 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/_samples/smime/encrypt2.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDFzCCAf8CCQDULaNM+Q+g3jANBgkqhkiG9w0BAQUFADBMMRcwFQYDVQQDDA5T
3 | d2lmdG1haWxlciBDQTEUMBIGA1UECgwLU3dpZnRtYWlsZXIxDjAMBgNVBAcMBVBh
4 | cmlzMQswCQYDVQQGEwJGUjAeFw0xMzExMjcwODM5MTJaFw0xNzExMjYwODM5MTJa
5 | ME8xGjAYBgNVBAMMEVN3aWZ0bWFpbGVyLVVzZXIyMRQwEgYDVQQKDAtTd2lmdG1h
6 | aWxlcjEOMAwGA1UEBwwFUGFyaXMxCzAJBgNVBAYTAkZSMIIBIjANBgkqhkiG9w0B
7 | AQEFAAOCAQ8AMIIBCgKCAQEAw4AoYVYss2sa1BWJAJpK6gVemjXrp1mVXVpb1/z6
8 | SH15AGsp3kiNXsMpgvsdofbqC/5HXrw2G8gWqo+uh6GuK67+Tvp7tO2aD4+8CZzU
9 | K1cffj7Pbx95DUPwXckv79PT5ZcuyeFaVo92aug11+gS/P8n0WXSlzZxNuZ1f3G2
10 | r/IgwfNKZlarEf1Ih781L2SwmyveW/dtsV2pdrd4IZwsV5SOF2zBFIXSuhPN0c+m
11 | mtwSJe+Ow1udLX4KJkAX8sGVFJ5P5q4s2nS9vLkkj7X6YRQscbyJO9L7e1TksRqL
12 | DLxZwiko6gUhp4/bIs1wDj5tzkQBi4qXviRq3i7A9b2d0QIDAQABMA0GCSqGSIb3
13 | DQEBBQUAA4IBAQAj8iARhPB2DA3YfT5mJJrgU156Sm0Z3mekAECsr+VqFZtU/9Dz
14 | pPFYEf0hg61cjvwhLtOmaTB+50hu1KNNlu8QlxAfPJqNxtH85W0CYiZHJwW9eSTr
15 | z1swaHpRHLDUgo3oAXdh5syMbdl0MWos0Z14WP5yYu4IwJXs+j2JRW70BICyrNjm
16 | d+AjCzoYjKMdJkSj4uxQEOuW2/5veAoDyU+kHDdfT7SmbyoKu+Pw4Xg/XDuKoWYg
17 | w5/sRiw5vxsmOr9+anspDHdP9rUe1JEfwAJqZB3fwdqEyxu54Xw/GedG4wZBEJf0
18 | ZcS1eh31emcjYUHQa1IA93jcFSmXzJ+ftJrY
19 | -----END CERTIFICATE-----
20 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/_samples/smime/intermediate.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDFjCCAf4CAQEwDQYJKoZIhvcNAQEFBQAwTDEXMBUGA1UEAwwOU3dpZnRtYWls
3 | ZXIgQ0ExFDASBgNVBAoMC1N3aWZ0bWFpbGVyMQ4wDAYDVQQHDAVQYXJpczELMAkG
4 | A1UEBhMCRlIwHhcNMTQxMTIwMTMyNTQxWhcNMTgxMTE5MTMyNTQxWjBWMSEwHwYD
5 | VQQDDBhTd2lmdG1haWxlciBJbnRlcm1lZGlhdGUxFDASBgNVBAoMC1N3aWZ0bWFp
6 | bGVyMQ4wDAYDVQQHDAVQYXJpczELMAkGA1UEBhMCRlIwggEiMA0GCSqGSIb3DQEB
7 | AQUAA4IBDwAwggEKAoIBAQDSgEhftX6f1wV+uqWl4J+zwCn8fHaLZT6GZ0Gs9ThE
8 | 4e+4mkLG1rvSEIJon8U0ic8Zph1UGa1Grveh5bgbldHlFxYSsCCyDGgixRvRWNhI
9 | KuO+SxaIZChqqKwVn3aNQ4BZOSo/MjJ/jQyr9BMgMmdxlHR3e1wkkeAkW//sOsfu
10 | xQGF1h9yeQvuu/GbG6K7vHSGOGd5O3G7bftfQ7l78TMqeJ7jV32AdJeuO5MD4dRn
11 | W4CQLTaeribLN0MKn35UdSiFoZxKHqqWcgtl5xcJWPOmq6CsAJ2Eo90kW/BHOrLv
12 | 10h6Oan9R1PdXSvSCvVnXY3Kz30zofw305oA/KJk/hVzAgMBAAEwDQYJKoZIhvcN
13 | AQEFBQADggEBABijZ2NNd05Js5VFNr4uyaydam9Yqu/nnrxbPRbAXPlCduydu2Gd
14 | d1ekn3nblMJ87Bc7zVyHdAQD8/AfS1LOKuoWHpTzmlpIL+8T5sbCYG5J1jKdeLkh
15 | 7L/UD5v1ACgA33oKtN8GzcrIq8Zp73r0n+c3hFCfDYRSZRCxGyIf3qgU2LBOD0A3
16 | wTff/N8E/p3WaJX9VnuQ7xyRMOubDuqJnlo5YsFv7wjyGOIAz9afZzcEbH6czt/t
17 | g0Xc/kGr/fkAjUu+z3ZfE4247Gut5m3hEVwWkpEEzQo4osX/BEX20Q2nPz9WBq4a
18 | pK3qNNGwAqS4gdE3ihOExMWxAKgr9d2CcU4=
19 | -----END CERTIFICATE-----
20 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/_samples/smime/sign.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDFjCCAf4CCQDULaNM+Q+g3DANBgkqhkiG9w0BAQUFADBMMRcwFQYDVQQDDA5T
3 | d2lmdG1haWxlciBDQTEUMBIGA1UECgwLU3dpZnRtYWlsZXIxDjAMBgNVBAcMBVBh
4 | cmlzMQswCQYDVQQGEwJGUjAeFw0xMzExMjcwODM5MTBaFw0xNzExMjYwODM5MTBa
5 | ME4xGTAXBgNVBAMMEFN3aWZ0bWFpbGVyLVVzZXIxFDASBgNVBAoMC1N3aWZ0bWFp
6 | bGVyMQ4wDAYDVQQHDAVQYXJpczELMAkGA1UEBhMCRlIwggEiMA0GCSqGSIb3DQEB
7 | AQUAA4IBDwAwggEKAoIBAQCTe8ZouyjVGgqlljhaswYqLj7icMoHq+Qg13CE+zJg
8 | tl2/UzyPhAd3WWOIvlQ0lu+E/n0bXrS6+q28DrQ3UgJ9BskzzLz15qUO12b92AvG
9 | vLJ+9kKuiM5KXDljOAsXc7/A9UUGwEFA1D0mkeMmkHuiQavAMkzBLha22hGpg/hz
10 | VbE6W9MGna0szd8yh38IY1M5uR+OZ0dG3KbVZb7H3N0OLOP8j8n+4YtAGAW+Onz/
11 | 2CGPfZ1kaDMvY/WTZwyGeA4FwCPy1D8tfeswqKnWDB9Sfl8hns5VxnoJ3dqKQHeX
12 | iC4OMfQ0U4CcuM5sVYJZRNNwP7/TeUh3HegnOnuZ1hy9AgMBAAEwDQYJKoZIhvcN
13 | AQEFBQADggEBAAEPjGt98GIK6ecAEat52aG+8UP7TuZaxoH3cbZdhFTafrP8187F
14 | Rk5G3LCPTeA/QIzbHppA4fPAiS07OVSwVCknpTJbtKKn0gmtTZxThacFHF2NlzTH
15 | XxM5bIbkK3jzIF+WattyTSj34UHHfaNAmvmS7Jyq6MhjSDbcQ+/dZ9eo2tF/AmrC
16 | +MBhyH8aUYwKhTOQQh8yC11niziHhGO99FQ4tpuD9AKlun5snHq4uK9AOFe8VhoR
17 | q2CqX5g5v8OAtdlvzhp50IqD4BNOP+JrUxjGLHDG76BZZIK2Ai1eBz+GhRlIQru/
18 | 8EhQzd94mdFEPblGbmuD2QXWLFFKLiYOwOc=
19 | -----END CERTIFICATE-----
20 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/_samples/smime/sign2.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDGTCCAgECAQEwDQYJKoZIhvcNAQEFBQAwVjEhMB8GA1UEAwwYU3dpZnRtYWls
3 | ZXIgSW50ZXJtZWRpYXRlMRQwEgYDVQQKDAtTd2lmdG1haWxlcjEOMAwGA1UEBwwF
4 | UGFyaXMxCzAJBgNVBAYTAkZSMB4XDTE0MTEyMDEzMjYyNloXDTE4MTExOTEzMjYy
5 | NlowTzEaMBgGA1UEAwwRU3dpZnRtYWlsZXItVXNlcjIxFDASBgNVBAoMC1N3aWZ0
6 | bWFpbGVyMQ4wDAYDVQQHDAVQYXJpczELMAkGA1UEBhMCRlIwggEiMA0GCSqGSIb3
7 | DQEBAQUAA4IBDwAwggEKAoIBAQDbr1m4z/rzFS/DxUUQIhKNx19oAeGYLt3niaEP
8 | twfvBMNB80gMgM9d+XtqrPAMPeY/2C8t5NlChNPKMcR70JBKdmlSH4/aTjaIfWmD
9 | PoZJjvRRXINZgSHNKIt4ZGAN/EPFr19CBisV4iPxzu+lyIbbkaZJ/qtyatlP7m/q
10 | 8TnykFRlyxNEveCakpcXeRd3YTFGKWoED+/URhVc0cCPZVjoeSTtPHAYBnC29lG5
11 | VFbq6NBQiyF4tpjOHRarq6G8PtQFH9CpAZg5bPk3bqka9C8mEr5jWfrM4EHtUkTl
12 | CwVLOQRBsz/nMBT27pXZh18GU0hc3geNDN4kqaeqgNBo0mblAgMBAAEwDQYJKoZI
13 | hvcNAQEFBQADggEBAAHDMuv6oxWPsTQWWGWWFIk7QZu3iogMqFuxhhQxg8BE37CT
14 | Vt1mBVEjYGMkWhMSwWBMWuP6yuOZecWtpp6eOie/UKGg1XoW7Y7zq2aQaP7YPug0
15 | 8Lgq1jIo7iO2b6gZeMtLiTZrxyte0z1XzS3wy7ZC9mZjYd7QE7mZ+/rzQ0x5zjOp
16 | G8b3msS/yYYJCMN+HtHln++HOGmm6uhvbsHTfvvZvtl7F5vJ5WhGGlUfjhanSEtZ
17 | 1RKx+cbgIv1eFOGO1OTuZfEuKdLb0T38d/rjLeI99nVVKEIGtLmX4dj327GHe/D3
18 | aPr2blF2gOvlzkfN9Vz6ZUE2s3rVBeCg2AVseYQ=
19 | -----END CERTIFICATE-----
20 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/acceptance/Swift/AttachmentAcceptanceTest.php:
--------------------------------------------------------------------------------
1 | listItems() as $itemName) {
11 | try {
12 | $di->lookup($itemName);
13 | } catch (Swift_DependencyException $e) {
14 | $this->fail($e->getMessage());
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/acceptance/Swift/EmbeddedFileAcceptanceTest.php:
--------------------------------------------------------------------------------
1 | assertEquals('7bit', $encoder->getName());
9 | }
10 |
11 | public function testGet8BitEncodingReturns8BitEncoder() {
12 | $encoder = Swift_Encoding::get8BitEncoding();
13 | $this->assertEquals('8bit', $encoder->getName());
14 | }
15 |
16 | public function testGetQpEncodingReturnsQpEncoder() {
17 | $encoder = Swift_Encoding::getQpEncoding();
18 | $this->assertEquals('quoted-printable', $encoder->getName());
19 | }
20 |
21 | public function testGetBase64EncodingReturnsBase64Encoder() {
22 | $encoder = Swift_Encoding::getBase64Encoding();
23 | $this->assertEquals('base64', $encoder->getName());
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/acceptance/Swift/Mime/HeaderEncoder/Base64HeaderEncoderAcceptanceTest.php:
--------------------------------------------------------------------------------
1 | _encoder = new Swift_Mime_HeaderEncoder_Base64HeaderEncoder();
8 | }
9 |
10 | public function testEncodingJIS() {
11 | if (function_exists('mb_convert_encoding')) {
12 | // base64_encode and split cannot handle long JIS text to fold
13 | $subject = '長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い件名';
14 |
15 | $encodedWrapperLength = strlen('=?iso-2022-jp?'.$this->_encoder->getName().'??=');
16 |
17 | $old = mb_internal_encoding();
18 | mb_internal_encoding('utf-8');
19 | $newstring = mb_encode_mimeheader($subject, 'iso-2022-jp', 'B', "\r\n");
20 | mb_internal_encoding($old);
21 |
22 | $encoded = $this->_encoder->encodeString($subject, 0, 75 - $encodedWrapperLength, 'iso-2022-jp');
23 | $this->assertEquals(
24 | $encoded, $newstring,
25 | 'Encoded string should decode back to original string for sample '
26 | );
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/acceptance/Swift/MimePartAcceptanceTest.php:
--------------------------------------------------------------------------------
1 | register('properties.charset')->asValue(null);
10 |
11 | return Swift_MimePart::newInstance();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/BasicSocketAcceptanceTest.php:
--------------------------------------------------------------------------------
1 | markTestSkipped(
10 | 'Cannot run test without an SMTP host to connect to (define '.
11 | 'SWIFT_SMTP_HOST in tests/acceptance.conf.php if you wish to run this test)'
12 | );
13 | }
14 | parent::setUp();
15 | }
16 |
17 | protected function _initializeBuffer() {
18 | $parts = explode(':', SWIFT_SMTP_HOST);
19 | $host = $parts[0];
20 | $port = isset($parts[1]) ? $parts[1] : 25;
21 |
22 | $this->_buffer->initialize(array(
23 | 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET,
24 | 'host' => $host,
25 | 'port' => $port,
26 | 'protocol' => 'tcp',
27 | 'blocking' => 1,
28 | 'timeout' => 15,
29 | ));
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/ProcessAcceptanceTest.php:
--------------------------------------------------------------------------------
1 | markTestSkipped(
10 | 'Cannot run test without a path to sendmail (define '.
11 | 'SWIFT_SENDMAIL_PATH in tests/acceptance.conf.php if you wish to run this test)'
12 | );
13 | }
14 |
15 | parent::setUp();
16 | }
17 |
18 | protected function _initializeBuffer() {
19 | $this->_buffer->initialize(array(
20 | 'type' => Swift_Transport_IoBuffer::TYPE_PROCESS,
21 | 'command' => SWIFT_SENDMAIL_PATH.' -bs',
22 | ));
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 | allowMockingNonExistentMethods(false);
11 |
12 | if (is_file(__DIR__.'/acceptance.conf.php')) {
13 | require_once __DIR__.'/acceptance.conf.php';
14 | }
15 | if (is_file(__DIR__.'/smoke.conf.php')) {
16 | require_once __DIR__.'/smoke.conf.php';
17 | }
18 | require_once __DIR__.'/StreamCollector.php';
19 | require_once __DIR__.'/IdenticalBinaryConstraint.php';
20 | require_once __DIR__.'/SwiftMailerTestCase.php';
21 | require_once __DIR__.'/SwiftMailerSmokeTestCase.php';
22 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/bug/Swift/Bug118Test.php:
--------------------------------------------------------------------------------
1 | _message = new Swift_Message();
8 | }
9 |
10 | public function testCallingGenerateIdChangesTheMessageId() {
11 | $currentId = $this->_message->getId();
12 | $this->_message->generateId();
13 | $newId = $this->_message->getId();
14 |
15 | $this->assertNotEquals($currentId, $newId);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/bug/Swift/Bug274Test.php:
--------------------------------------------------------------------------------
1 | setExpectedException('Swift_IoException', 'The path cannot be empty');
7 | $message->attach(Swift_Attachment::fromPath(''));
8 | }
9 |
10 | public function testNonEmptyFileNameAsAttachment() {
11 | $message = new Swift_Message();
12 | try {
13 | $message->attach(Swift_Attachment::fromPath(__FILE__));
14 | } catch (Exception $e) {
15 | $this->fail('Path should not be empty');
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/bug/Swift/Bug518Test.php:
--------------------------------------------------------------------------------
1 | setTo('foo@bar.com');
10 |
11 | $that = $this;
12 | $messageValidation = function ($m) use ($that) {
13 | //the getTo should return the same value as we put in
14 | $that->assertEquals('foo@bar.com', key($m->getTo()), 'The message has changed after it was put to the memory queue');
15 |
16 | return true;
17 | };
18 |
19 | $transport = m::mock('Swift_Transport');
20 | $transport->shouldReceive('isStarted')->andReturn(true);
21 | $transport->shouldReceive('send')
22 | ->with(m::on($messageValidation), $failedRecipients)
23 | ->andReturn(1);
24 |
25 | $memorySpool = new Swift_MemorySpool();
26 | $memorySpool->queueMessage($message);
27 |
28 | /*
29 | * The message is queued in memory.
30 | * Lets change the message
31 | */
32 | $message->setTo('other@value.com');
33 |
34 | $memorySpool->flushQueue($transport, $failedRecipients);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/bug/Swift/Bug71Test.php:
--------------------------------------------------------------------------------
1 | _message = new Swift_Message('test');
8 | }
9 |
10 | public function testCallingToStringAfterSettingNewBodyReflectsChanges() {
11 | $this->_message->setBody('BODY1');
12 | $this->assertRegExp('/BODY1/', $this->_message->toString());
13 |
14 | $this->_message->setBody('BODY2');
15 | $this->assertRegExp('/BODY2/', $this->_message->toString());
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/bug/Swift/BugFileByteStreamConsecutiveReadCallsTest.php:
--------------------------------------------------------------------------------
1 | read(100);
13 | } catch (\Swift_IoException $exc) {
14 | $fbs->read(100);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/fixtures/MimeEntityFixture.php:
--------------------------------------------------------------------------------
1 | level = $level;
10 | $this->string = $string;
11 | $this->contentType = $contentType;
12 | }
13 |
14 | public function getNestingLevel() {
15 | return $this->level;
16 | }
17 |
18 | public function toString() {
19 | return $this->string;
20 | }
21 |
22 | public function getContentType() {
23 | return $this->contentType;
24 | }
25 |
26 | // These methods are here to account for the implemented interfaces
27 | public function getId() {
28 | }
29 | public function getHeaders() {
30 | }
31 | public function getBody() {
32 | }
33 | public function setBody($body, $contentType = null) {
34 | }
35 | public function toByteStream(Swift_InputByteStream $is) {
36 | }
37 | public function charsetChanged($charset) {
38 | }
39 | public function encoderChanged(Swift_Mime_ContentEncoder $encoder) {
40 | }
41 | public function getChildren() {
42 | }
43 | public function setChildren(array $children) {
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/smoke/Swift/Smoke/AttachmentSmokeTest.php:
--------------------------------------------------------------------------------
1 | _attFile = __DIR__.'/../../../_samples/files/textfile.zip';
11 | }
12 |
13 | public function testAttachmentSending() {
14 | $mailer = $this->_getMailer();
15 | $message = Swift_Message::newInstance()
16 | ->setSubject('[Swift Mailer] AttachmentSmokeTest')
17 | ->setFrom(array(SWIFT_SMOKE_EMAIL_ADDRESS => 'Swift Mailer'))
18 | ->setTo(SWIFT_SMOKE_EMAIL_ADDRESS)
19 | ->setBody('This message should contain an attached ZIP file (named "textfile.zip").'.PHP_EOL.
20 | 'When unzipped, the archive should produce a text file which reads:'.PHP_EOL.
21 | '"This is part of a Swift Mailer v4 smoke test."'
22 | )
23 | ->attach(Swift_Attachment::fromPath($this->_attFile))
24 | ;
25 | $this->assertEquals(1, $mailer->send($message),
26 | '%s: The smoke test should send a single message'
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/smoke/Swift/Smoke/BasicSmokeTest.php:
--------------------------------------------------------------------------------
1 | _getMailer();
9 | $message = Swift_Message::newInstance()
10 | ->setSubject('[Swift Mailer] BasicSmokeTest')
11 | ->setFrom(array(SWIFT_SMOKE_EMAIL_ADDRESS => 'Swift Mailer'))
12 | ->setTo(SWIFT_SMOKE_EMAIL_ADDRESS)
13 | ->setBody('One, two, three, four, five...'.PHP_EOL.
14 | 'six, seven, eight...'
15 | )
16 | ;
17 | $this->assertEquals(1, $mailer->send($message),
18 | '%s: The smoke test should send a single message'
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php:
--------------------------------------------------------------------------------
1 | _attFile = __DIR__.'/../../../_samples/files/textfile.zip';
11 | }
12 |
13 | public function testAttachmentSending() {
14 | $mailer = $this->_getMailer();
15 | $message = Swift_Message::newInstance('[Swift Mailer] HtmlWithAttachmentSmokeTest')
16 | ->setFrom(array(SWIFT_SMOKE_EMAIL_ADDRESS => 'Swift Mailer'))
17 | ->setTo(SWIFT_SMOKE_EMAIL_ADDRESS)
18 | ->attach(Swift_Attachment::fromPath($this->_attFile))
19 | ->setBody('This HTML-formatted message should contain an attached ZIP file (named "textfile.zip").'.PHP_EOL.
20 | 'When unzipped, the archive should produce a text file which reads:
'.PHP_EOL.
21 | 'This is part of a Swift Mailer v4 smoke test.
', 'text/html'
22 | )
23 | ;
24 | $this->assertEquals(1, $mailer->send($message),
25 | '%s: The smoke test should send a single message'
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/unit/Swift/Events/CommandEventTest.php:
--------------------------------------------------------------------------------
1 | _createEvent($this->_createTransport(), "FOO\r\n");
6 | $this->assertEquals("FOO\r\n", $evt->getCommand());
7 | }
8 |
9 | public function testSuccessCodesCanBeFetchedViaGetter() {
10 | $evt = $this->_createEvent($this->_createTransport(), "FOO\r\n", array(250));
11 | $this->assertEquals(array(250), $evt->getSuccessCodes());
12 | }
13 |
14 | public function testSourceIsBuffer() {
15 | $transport = $this->_createTransport();
16 | $evt = $this->_createEvent($transport, "FOO\r\n");
17 | $ref = $evt->getSource();
18 | $this->assertEquals($transport, $ref);
19 | }
20 |
21 | // -- Creation Methods
22 |
23 | private function _createEvent(Swift_Transport $source, $command, $successCodes = array()) {
24 | return new Swift_Events_CommandEvent($source, $command, $successCodes);
25 | }
26 |
27 | private function _createTransport() {
28 | return $this->getMock('Swift_Transport');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/unit/Swift/Events/EventObjectTest.php:
--------------------------------------------------------------------------------
1 | _createEvent($source);
7 | $ref = $evt->getSource();
8 | $this->assertEquals($source, $ref);
9 | }
10 |
11 | public function testEventDoesNotHaveCancelledBubbleWhenNew() {
12 | $source = new stdClass();
13 | $evt = $this->_createEvent($source);
14 | $this->assertFalse($evt->bubbleCancelled());
15 | }
16 |
17 | public function testBubbleCanBeCancelledInEvent() {
18 | $source = new stdClass();
19 | $evt = $this->_createEvent($source);
20 | $evt->cancelBubble();
21 | $this->assertTrue($evt->bubbleCancelled());
22 | }
23 |
24 | // -- Creation Methods
25 |
26 | private function _createEvent($source) {
27 | return new Swift_Events_EventObject($source);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/unit/Swift/Events/TransportChangeEventTest.php:
--------------------------------------------------------------------------------
1 | _createTransport();
6 | $evt = $this->_createEvent($transport);
7 | $ref = $evt->getTransport();
8 | $this->assertEquals($transport, $ref);
9 | }
10 |
11 | public function testSourceIsTransport() {
12 | $transport = $this->_createTransport();
13 | $evt = $this->_createEvent($transport);
14 | $ref = $evt->getSource();
15 | $this->assertEquals($transport, $ref);
16 | }
17 |
18 | // -- Creation Methods
19 |
20 | private function _createEvent(Swift_Transport $source) {
21 | return new Swift_Events_TransportChangeEvent($source);
22 | }
23 |
24 | private function _createTransport() {
25 | return $this->getMock('Swift_Transport');
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/Base64HeaderEncoderTest.php:
--------------------------------------------------------------------------------
1 | assertEquals('B', $encoder->getName());
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/unit/Swift/Mime/SimpleMimeEntityTest.php:
--------------------------------------------------------------------------------
1 | add('>> Foo');
8 | $data = ob_get_clean();
9 |
10 | $this->assertEquals('>> Foo'.PHP_EOL, $data);
11 | }
12 |
13 | public function testAddingEntryDumpsEscapedLineWithHtml() {
14 | $logger = new Swift_Plugins_Loggers_EchoLogger(true);
15 | ob_start();
16 | $logger->add('>> Foo');
17 | $data = ob_get_clean();
18 |
19 | $this->assertEquals('>> Foo '.PHP_EOL, $data);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/website/lib/swiftmailer/tests/unit/Swift/Signers/OpenDKIMSignerTest.php:
--------------------------------------------------------------------------------
1 | markTestSkipped(
10 | 'Need OpenDKIM extension run these tests.'
11 | );
12 | }
13 | }
14 |
15 | public function testBasicSigningHeaderManipulation() {
16 | }
17 |
18 | // Default Signing
19 | public function testSigningDefaults() {
20 | }
21 |
22 | // SHA256 Signing
23 | public function testSigning256() {
24 | }
25 |
26 | // Relaxed/Relaxed Hash Signing
27 | public function testSigningRelaxedRelaxed256() {
28 | }
29 |
30 | // Relaxed/Simple Hash Signing
31 | public function testSigningRelaxedSimple256() {
32 | }
33 |
34 | // Simple/Relaxed Hash Signing
35 | public function testSigningSimpleRelaxed256() {
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/website/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /cron
3 | Disallow: /sql
4 | Disallow: /vendor
5 | Allow: /
6 | Sitemap: https://halite.io/sitemap.xml
7 |
--------------------------------------------------------------------------------
/website/script/basics_intro_halite.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | textFromURL("ar1481484242-3993659735.hlt", $("#gameReplay"), function(data) {
3 | console.log(data)
4 | if(data != null) {
5 | showGame(data, $("#gameReplay"), null, 500, true, true);
6 | }
7 | });
8 | })
9 |
--------------------------------------------------------------------------------
/website/script/game.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | var replayName = getGET("replay");
3 | if(replayName != null && replayName != undefined) {
4 | $("#pageContent").html(" Loading replay... ");
5 | var data = textFromURL(replayName, $("#pageContent"), function(data) {
6 | console.log(data)
7 | if(data != null) {
8 | showGame(data, $("#pageContent"), null, null, true, false);
9 | }
10 | });
11 | } else {
12 | $("#pageContent").append($("An unexpected error occured. If this error persists, please post on the forums or email us at halite@halite.io. "));
13 | }
14 | })
15 |
--------------------------------------------------------------------------------
/website/script/index.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | $("#numUsers").html(getNumActiveUsers());
3 | var data = textFromURL("ar1482947270-2437412300.hlt", $("#gameReplay"), function(data) {
4 | console.log(data)
5 | if(data != null) {
6 | showGame(data, $("#gameReplay"), null, 500, true, true, true, 30);
7 | }
8 | });
9 | })
10 |
--------------------------------------------------------------------------------
/website/script/localVisualizer.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 | var $dropZone = $("html");
3 | var $filePicker = $("#filePicker");
4 | function handleFiles(files) {
5 | // only use the first file.
6 | file = files[0];
7 | console.log(file)
8 | var reader = new FileReader();
9 |
10 | reader.onload = (function(filename) { // finished reading file data.
11 | return function(e2) {
12 | $("#displayArea").empty();
13 | $("label[for=filePicker]").text("Select another file");
14 | var fsHeight = $("#fileSelect").outerHeight();
15 | showGame(textToGame(e2.target.result, filename), $("#displayArea"), null, -fsHeight, true, false, true);
16 | };
17 | })(file.name);
18 | reader.readAsText(file); // start reading the file data.
19 | }
20 |
21 | $dropZone.on('dragover', function(e) {
22 | e.stopPropagation();
23 | e.preventDefault();
24 | });
25 | $dropZone.on('drop', function(e) {
26 | e.stopPropagation();
27 | e.preventDefault();
28 | var files = e.originalEvent.dataTransfer.files; // Array of all files
29 | handleFiles(files)
30 | });
31 | $filePicker.on('change', function(e) {
32 | var files = e.target.files
33 | handleFiles(files)
34 | });
35 | })
36 |
--------------------------------------------------------------------------------
/website/sql/dummyData.sql:
--------------------------------------------------------------------------------
1 | DELETE FROM User;
2 |
3 | INSERT INTO User (userID, username, email, compileStatus, isRunning, language, organization) VALUES (2609, 'erdman', 'abc@gmail.com', 0, 1, 'Python', 'Other'), (1017, 'djma', 'abc@gmail.com', 0, 1, 'Java', 'Other'), (3063, 'daniel-shields', 'abc@gmail.com', 0, 1, 'Python', 'Other');
4 | INSERT INTO Worker (apiKey, ipAddress) VALUES (1, "127.0.0.1");
5 |
--------------------------------------------------------------------------------
/website/sql/importDummyData.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo "drop database Halite; create database Halite;" | mysql -u root -p
4 | mysql -u root Halite < schema.sql -p
5 | mysql -u root Halite < dummyData.sql -p
6 |
--------------------------------------------------------------------------------
/website/sql/install.sh:
--------------------------------------------------------------------------------
1 | sudo apt-get install -y mysql-server
2 |
3 | echo "Starting MySql setup"
4 | ./importDummyData.sh
5 |
--------------------------------------------------------------------------------
/website/style/general.css:
--------------------------------------------------------------------------------
1 | #jHeader {
2 | font-size: 50px;
3 | }
4 |
5 | #myFile {
6 | display:none;
7 | }
8 |
9 | #gameFile {
10 | display:none;
11 | }
12 |
13 | #navCont {
14 | margin:0 auto;
15 | width:90%;
16 | }
17 |
18 | #loginNav {
19 | display:inline;
20 | }
21 |
22 | #logoutNav {
23 | display:none;
24 | }
25 |
26 | #archivedTag {
27 | display:none;
28 | }
29 |
30 | .gameRow {
31 | display:none;
32 | }
33 |
34 | #leaderTable {
35 | padding-bottom:0px;
36 | margin-bottom:0px;
37 | }
38 |
39 | .gameRow {
40 | background-color:#F8F8F8;
41 | }
42 |
43 | .arrow {
44 | height: 16px;
45 | width: 16px;
46 | cursor: pointer;
47 | }
48 |
49 | .file-icon {
50 | height: 16px;
51 | width: 16px;
52 | }
53 |
54 |
55 | .jumbotron-btn {
56 | margin-top: 2px;
57 | margin-bottom: 2px;
58 | }
59 |
60 | .videoWrapper {
61 | position: relative;
62 | padding-bottom: 56.25%; /* 16:9 */
63 | padding-top: 25px;
64 | height: 0;
65 | }
66 | .videoWrapper iframe {
67 | position: absolute;
68 | top: 0;
69 | left: 0;
70 | width: 100%;
71 | height: 100%;
72 | }
73 |
74 | .has-hover-text {
75 | cursor: pointer;
76 | }
77 |
--------------------------------------------------------------------------------
/website/style/learn.css:
--------------------------------------------------------------------------------
1 | ul:not(.nav), p {
2 | line-height: 1.5em;
3 | }
4 |
5 | h1 {
6 | padding-top: 20px;
7 | padding-bottom: 9px;
8 | margin-bottom: 20px;
9 | border-bottom: 1px solid #003736;
10 | margin-top: 0;
11 | }
12 |
--------------------------------------------------------------------------------
/website/tutorials/basic/BasicBot.py:
--------------------------------------------------------------------------------
1 | from hlt import *
2 | from networking import *
3 |
4 | myID, gameMap = getInit()
5 | sendInit("BasicPythonBot")
6 |
7 | while True:
8 | moves = []
9 | gameMap = getFrame()
10 |
11 | for y in range(gameMap.height):
12 | for x in range(gameMap.width):
13 | site = gameMap.getSite(Location(x, y))
14 | if site.owner == myID:
15 | direction = random.randint(0, 5)
16 | if site.strength < 5*site.production:
17 | direction = STILL
18 | else:
19 | for d in CARDINALS:
20 | if gameMap.getSite(Location(x, y), d).owner != myID:
21 | direction = d
22 | break
23 | moves.append(Move(Location(x, y), direction))
24 |
25 | sendFrame(moves)
26 |
--------------------------------------------------------------------------------
/website/tutorials/machinelearning/my_model_weights.h5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HaliteChallenge/Halite/822cfb6938437ae8fd607dc5cc0d1b5a62394289/website/tutorials/machinelearning/my_model_weights.h5
--------------------------------------------------------------------------------
/website/tutorials/random/ImprovedRandom.py:
--------------------------------------------------------------------------------
1 | from hlt import *
2 | from networking import *
3 |
4 | myID, gameMap = getInit()
5 | sendInit("PythonBot")
6 |
7 | while True:
8 | moves = []
9 | gameMap = getFrame()
10 | for y in range(gameMap.height):
11 | for x in range(gameMap.width):
12 | if gameMap.getSite(Location(x, y)).owner == myID:
13 |
14 | movedPiece = False
15 |
16 | for d in CARDINALS:
17 | if gameMap.getSite(Location(x, y), d).owner != myID and gameMap.getSite(Location(x, y), d).strength < presentMap.getSite(Location(x, y)).strength:
18 | moves.append(Move(Location(x, y), d))
19 | movedPiece = True
20 | break
21 |
22 | if not movedPiece and gameMap.getSite(Location(x, y)).strength < gameMap.getSite(Location(x, y)).production * 5:
23 | moves.append(Move(Location(x, y), STILL))
24 | movedPiece = True
25 |
26 | if not movedPiece:
27 | moves.append(Move(Location(x, y), NORTH if bool(int(random.random() * 2)) else WEST))
28 | movedPiece = True
29 |
30 | sendFrame(moves)
--------------------------------------------------------------------------------
/worker/buildDocker.sh:
--------------------------------------------------------------------------------
1 | docker build -t 'mntruell/halite_sandbox:latest' - < Dockerfile
2 |
--------------------------------------------------------------------------------
/worker/changeAPIKey.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import configparser
3 |
4 | apiKey = sys.argv[1]
5 | iniFile = "../halite.ini"
6 |
7 | parser = configparser.ConfigParser()
8 | parser.read(iniFile)
9 | parser["hce"]["apiKey"] = str(apiKey)
10 | parser.write(open(iniFile, "w"))
11 |
--------------------------------------------------------------------------------
/worker/startWorkerScreen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if ! screen -list | grep -q "worker"; then
4 | screen -S worker -Ldm bash -c "cd ~/Halite/worker; sudo python3 worker.py"
5 | fi
6 |
--------------------------------------------------------------------------------
/worker/stopWorkerScreen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | pkill screen
4 | docker kill $(docker ps -aq)
5 | docker rm $(docker ps -aq)
6 |
--------------------------------------------------------------------------------