<commit_before><html lang="en">
  <head>
    <title>Design Patterns | The Strategy Pattern</title>
    <link rel="stylesheet" type="text/css" href="style/style.css">
    <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
  </head>
  <body>
    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.html">Design Patterns</a>
        </div>
        <div class="collapse navbar-collapse" id="navbar-collapse-1">
          <ul class="nav navbar-nav">
            <li class="active"><a href="patterns.html">Patterns<span class="sr-only"> (current)</span></a></li>
            <li><a href="#">About</a></li>
            <li><a href="#">Site Map</a></li>
          </ul>
        </div>
      </div>
    </nav>
    <div class="container">
      <div class="jumbotron">
        <h1>Design Pattern<br/><small>Strategy</small></h1>
      </div>
      <div class="row">
        <div class="col-md-12">
          <div class="header">
            <h1>Explained as to a 5 year old.</h1>
          </div>        
          <p>Let's say you have a new race car track playset.  The tracks come in little pieces that you, or a best friend, or mommy or daddy, 
            can put together in many different ways.  Let's say this is a <i>really cool</i> play set, and includes a big red button that
            rockets the race car onto the track.  The whole thing works great, as long as you connect the track to the big red button.
          </p>
          <p>
            You like big red buttons, so daddy makes three or four different race tracks.  You can then choose which one you want to race on next,
             and daddy plugs it in to the big red button.  All you have to do is press the button, and watch the race cars zoom along the race track.
          </p>
          <p>
            The <strong>Strategy Pattern</strong> can be seen here. An algorithm is declared (race cars can be shot down a race track by pressing a big red button).
   The type of track, the color of the cars, etc, can vary from track to track.  Each works though, as long as it connects to the big red button
    that fires them off.
          </p>
        </div>
      </div>
      <div class="row">
        <div class="header">
          Code Sample
        </div>
        <p>
          <pre>
            public interface RaceTrack() {
              public void startRace();
            }
            
            public class RaceTrackA implements RaceTrack {<commit_msg>Update strategy.html<commit_after><html lang="en">
  <head>
    <title>Design Patterns | The Strategy Pattern</title>
    <link rel="stylesheet" type="text/css" href="style/style.css">
    <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
  </head>
  <body>
    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.html">Design Patterns</a>
        </div>
        <div class="collapse navbar-collapse" id="navbar-collapse-1">
          <ul class="nav navbar-nav">
            <li class="active"><a href="patterns.html">Patterns<span class="sr-only"> (current)</span></a></li>
            <li><a href="#">About</a></li>
            <li><a href="#">Site Map</a></li>
          </ul>
        </div>
      </div>
    </nav>
    <div class="container">
      <div class="jumbotron">
        <h1>Design Pattern<br/><small>Strategy</small></h1>
      </div>
      <div class="row">
        <div class="col-md-12">
          <div class="header">
            <h1>Explained as to a 5 year old.</h1>
          </div>        
          <p>Let's say you have a new race car track playset.  The tracks come in little pieces that you, or a best friend, or mommy or daddy, 
            can put together in many different ways.  Let's say this is a <i>really cool</i> play set, and includes a big red button that
            rockets the race car onto the track.  The whole thing works great, as long as you connect the track to the big red button.
          </p>
          <p>
            You like big red buttons, so daddy makes three or four different race tracks.  You can then choose which one you want to race on next,
             and daddy plugs it in to the big red button.  All you have to do is press the button, and watch the race cars zoom along the race track.
          </p>
          <p>
            The <strong>Strategy Pattern</strong> can be seen here. An algorithm is declared (race cars can be shot down a race track by pressing a big red button).
   The type of track, the color of the cars, etc, can vary from track to track.  Each works though, as long as it connects to the big red button
    that fires them off.
          </p>
        </div>
      </div>
      <div class="row">
        <div class="header">
          <h1>Code Sample</h1>
        </div>
        <p>
          <pre>
            public interface RaceTrack() {
              public void startRace();
            }
            
            public class RaceTrackA implements RaceTrack {
{'fraction_non_alphanumeric': 0.13335455124124762, 'fraction_numerical': 0.006365372374283896, 'mean_word_length': 2.216479017400205, 'pattern_counts': {'":': 0, '<': 163, '<?xml version=': 0, '>': 163, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '623571', 'n_tokens_mistral': 1858, 'n_tokens_neox': 1797, 'n_words': 615}