In high-profile knock-out tournament matches, teams tend to play defensively if the game remains drawn towards the end. As extra time and penalties loom, teams sometimes play /for/ penalties, knowing that whilst they may not be able to score from free play, they /might/ win the penalty shoot-out. This tends to make the game less entertaining for spectators, and can result in a result which some may deem didn't fairly reflect the balance of play. FIFA have stated they would like to see penalty shoot-outs ended, but previous solutions (the ‘golden’ and ‘silver’ goals) have proven unpopular, and have since been largely dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% if Spree::Config[:address_requires_state] %> | |
| <p class="field" id=<%="#{address_id}state" %>> | |
| <% have_states = !address.country.states.empty? %> | |
| <%= form.label :state, Spree.t(:state) %><span class='required' id=<%="#{address_id}state-required"%>>*</span><br/> | |
| <% state_elements = [ | |
| form.collection_select(:state_id, address.country.states, | |
| :id, :name, | |
| {:include_blank => true}, | |
| {:class => have_states ? 'required' : 'hidden', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source "http://rubygems.org" | |
| ruby "2.0.0" | |
| gem "rails", "~> 3.2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.process_randoms(text) | |
| stack = [] | |
| stored_string = "" | |
| random_choices = [] | |
| scanner = StringScanner.new(text) | |
| while match = scanner.scan_until(/[\{\}\|]|\[(one of|or|at random)\]/) | |
| stored_string << match.slice(0, match.length - scanner.matched_size) | |
| case scanner.matched | |
| when "{", "[one of]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // convenience method for applying a transition class, with a callback | |
| // usage: | |
| // $('div.foo').transition('zoomed', function(){ console.log('your div is now zoomed!'); }); | |
| // $('div.bar.faded').transition('!faded', function(){ console.log('your div is no longer faded'); }); | |
| jQuery.fn.transition = function(className, callback) { | |
| var element = $(this), | |
| transitionEndEvents = 'webkitTransitionEnd mozTransitionEnd msTransitionEnd oTransitionEnd transitionEnd transitionend', | |
| transitionCallback = function transitionCallback(){ | |
| element.unbind(transitionEndEvents); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def next_power_two(number) | |
| number.to_s(2).split("").inject("") {|s, c| s+= "1" }.to_i(2) + 1 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <style> | |
| @scope 'body > div:nth-child(2)' { | |
| div { color: red; } | |
| span { color: green; } | |
| } | |
| </style> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyApp < Sinatra::Base | |
| Tilt.register Tilt::ERBTemplate, :html | |
| module TemplateHelpers | |
| def html(*args) | |
| render :html, *args | |
| end | |
| end | |
| helpers TemplateHelpers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title>Admin Home</title> | |
| <style type="text/css"> | |
| html, body { height:100%; margin:0; padding:0; } | |
| body | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html><head><title></title></head> | |
| <script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| function AddField(){ | |
| var d_name = $("#d_name").val(); | |
| var d_number = $("#d_number").val(); | |
| var field = $("#field").val(); |