This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Pool 1: Rank 1, 8, 9, 16, 17 | |
* Pool 2: Rank 2, 7, 10, 15 | |
* Pool 3: Rank 3, 6, 11, 14 | |
* Pool 4: Rank 4, 5, 12, 13 | |
*/ | |
function seed_partition(array $teams, $groups = 1) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//default.htm | |
<button type="button" class="btn btn-primary" | |
data-request="onGetExample" | |
data-request-data="id: 1" <!-- can be dynamic content {{ e.id }} --> | |
data-request-update="'{{ __SELF__ }}::modalPartial': '#result'" | |
data-toggle="modal" | |
data-target="#exampleModal"> | |
Launch Team Modal | |
</button> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload = function () { | |
var divsToHide = document.getElementsByClassName("ProductList-item sold-out"); | |
for(var i = 0; i < divsToHide.length; i++){ | |
if(window.location.href.indexOf("Retired") > -1) { | |
return; | |
} | |
divsToHide[i].style.visibility = "hidden"; | |
divsToHide[i].style.display = "none"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Thanks https://en.wikipedia.org/wiki/Round-robin_tournament#Scheduling_algorithm | |
* | |
* @param int $weeks | |
* @param array $teams | |
* @return array | |
*/ | |
function generateRoundRobin($rounds = 4, $teams) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
fmt.Println(schedule(7, []int{1, 2, 3, 4, 5, 6, 7, 8})) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Cleanse\League; | |
use Redirect; | |
use Route; | |
use Cleanse\League\Models\Tournament; | |
Route::get('tournament/{id}/{slug?}', function ($tourneyId, $tourneySlug = null) { | |
$tournament = Tournament::where('id', $tourneyId)->first(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Cleanse\Urls\Classes; | |
use ApplicationException; | |
class ShortIds | |
{ | |
public $radix; | |
public $words; | |
public function __construct() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title = "Article Post" | |
url = "/article/:slug" | |
layout = "basic" | |
description = "Viewing a single article post." | |
is_hidden = 0 | |
[blogPost] | |
slug = "{{ :slug }}" | |
categoryPage = "article/category" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bot.on('message', function(message) | |
{ | |
if (message.content.indexOf("!color") === 0) { | |
//check if the message length is satisfactory | |
if (message.content.split(" ").length === 3) { | |
var colorDecimal = message.content.split(" ")[2]; | |
if (message.channel.server.roles.get("name", message.content.split(" ")[1])) { | |
var role = message.channel.server.roles.get("name", message.content.split(" ")[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Atlanta(6)-vs-New_Orleans(28)": "Atlanta (Spread: NO +3.5)", | |
"Washington(17)-vs-NY_Jets(7)": "NY Jets (Spread: NYJ -5.5)", | |
"Arizona(4)-vs-Pittsburgh(12)": "Arizona (Spread: PIT -3.5)", | |
"Kansas_City(25)-vs-Minnesota(9)": "Minnesota (Spread: MIN -3.5)", | |
"Cincinnati(3)-vs-Buffalo(13)": "Cincinnati (Spread: BUF +2.5)", | |
"Chicago(20)-vs-Detroit(31)": "Chicago (Spread: DET -3.5)", | |
"Denver(5)-vs-Cleveland(18)": "Denver (Spread: CLE +4.5)", | |
"Houston(30)-vs-Jacksonville(32)": "Houston (Spread: JAC +1.5)", | |
"Miami(24)-vs-Tennessee(29)": "Tennessee (Spread: TEN -2.5)", |
NewerOlder