<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Arrays and Hashes</title>
  <link rel="stylesheet" type="text/css" href="../stylesheets/default.css">
  <link rel="stylesheet" type="text/css" href="../stylesheets/blog.css">
</head>

<body>
  <header>
    <A NAME="top">
      <nav class="nav">
        <ul class=>
          <li><a href="http://github.com/JP5486/JP5486.github.io/blog/index.html">Home</a></li>
          <li><a href="#about">About</a></li>
          <li><a href="blog/index.html">Blog</a></li>
          <li><a href="#portfolio">Portfolio</a></li>
          <li><a href="#resume">Resume</a></li>
          <li><a href="mailto:<EMAIL>">Contact</a></li>
        </ul>
      </nav>
  </header>

  <main class="h-line">
    <h1>Arrays and Hashes</h1>
    <span>
      <h4>Oct 4, 2015</h4>
<!--       <h4 class="tag"><a href="#">tags</a></h4>
      <h4 class="tag"><a href="#">tags</a></h4> -->
    </span>

    <article>
      <p>Today we will discuess the differences between arrays and hashes and provide some examples of how to use each</p>
      <p>By definition an array is an ordered, integer-indexed collection of objects; and a hash is a dictionary-like collection of uniqure keys and their values. <br>Now what does that mean?</p>
      <p>In its simpliest sense, an array is a store set of objects. These objects can be strings, integers, floats or even other arrays. A hash is a more defined version of an array in that is has a key and value pair, similar to a dictionary. In a dictionary you have a word and a description of that word. The key is like a word and the value being the description. You access the value(or definition) of a key(or word). </p>
      <h4>Lets look at some examples of each.</h4>
      <img src="../imgs/array_example.png">
      <p>Here is an example of an array called "my_family". I have stored 5 strings inside. At the 0 placeholder(the very first place in the list since we start counting from 0) I have stored the string "my name". "father" is in the 1 placeholder </p>
      <p> Now on line 3 we call the entire value of the my_family array and line 5 the value of the 0 placeholder. Replace the number to choose which spot you want. Below we see the output.</p>
      <img src="../imgs/array_example_answer.png">
      <p>The entire array is called in response to line 3 and just the very first string value is called in response to line 5.</p>

      <h4>Now lets look over some Hash Examples</h4>
      <img src="../imgs/hash_example.png">
      <p>Here we have a hash called my_family_hash with various assignments for each name. The definition for my_name is Jeremy, father is Ernie, mother is Carol, etc. Again, we call the entire hash variable on line 11 and the definition for the first assignment on line 13.</p>
      <img src="../imgs/hash_example_answer.png">
      <p>Here are the responses from our terminal. We see the entire hash printed out and the first definition on the next line, Perfect!</p>
      <p>Even though this is not a comprehensive article, we can start see the subtle differences between an array and hash. You can see the key:value or word:definition relationship in an array as well, the only difference is you cannot chose the keys. They are fixed as integers counting upwards from 0. In a hash you are able to write the key and value for each one.</p>
      <p>Please refer to the Ruby documentation online for a more in depth breakdown of all the features that arrays and hashes are capable of.</p>
      <footer>
        <address>
          By <a href="mailto:<EMAIL>"><NAME></a>
        </address>
        <p>Copyright <NAME> 2015</p>
      </footer>
    </article>

    <a href="#" id="back button" alt="Previous"><img src="#"></a>
    <a href="#" id="next button" alt="Next"><img src="#"></a>
  </main>

  <footer class= "nav h-line">
    <ul class="">
      <li class=""><a href="https://github.com/jp5486"><img src="imgs/GitHub-Mark-32px.png"></a></li>
      <li class=""><a href="http://www.facebook.com/jp5486"><img src="imgs/facebook-32.png"></a></li>
      <li class=""><a href="http://twitter.com/jp5486"><img src="imgs/twitter-32.png"></a></li>
      <li class=""><a href="mailto:<EMAIL>"><img src="imgs/email-32.png"></a></li>
    </ul>
  </footer>
</body>
</html>


  <article></article>
  <nav></nav><commit_msg>fix footer nav image paths<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Arrays and Hashes</title>
  <link rel="stylesheet" type="text/css" href="../stylesheets/default.css">
  <link rel="stylesheet" type="text/css" href="../stylesheets/blog.css">
</head>

<body>
  <header>
    <A NAME="top">
      <nav class="nav">
        <ul class=>
          <li><a href="http://github.com/JP5486/JP5486.github.io/blog/index.html">Home</a></li>
          <li><a href="#about">About</a></li>
          <li><a href="blog/index.html">Blog</a></li>
          <li><a href="#portfolio">Portfolio</a></li>
          <li><a href="#resume">Resume</a></li>
          <li><a href="mailto:<EMAIL>">Contact</a></li>
        </ul>
      </nav>
  </header>

  <main class="h-line">
    <h1>Arrays and Hashes</h1>
    <span>
      <h4>Oct 4, 2015</h4>
<!--       <h4 class="tag"><a href="#">tags</a></h4>
      <h4 class="tag"><a href="#">tags</a></h4> -->
    </span>

    <article>
      <p>Today we will discuess the differences between arrays and hashes and provide some examples of how to use each</p>
      <p>By definition an array is an ordered, integer-indexed collection of objects; and a hash is a dictionary-like collection of uniqure keys and their values. <br>Now what does that mean?</p>
      <p>In its simpliest sense, an array is a store set of objects. These objects can be strings, integers, floats or even other arrays. A hash is a more defined version of an array in that is has a key and value pair, similar to a dictionary. In a dictionary you have a word and a description of that word. The key is like a word and the value being the description. You access the value(or definition) of a key(or word). </p>
      <h4>Lets look at some examples of each.</h4>
      <img src="../imgs/array_example.png">
      <p>Here is an example of an array called "my_family". I have stored 5 strings inside. At the 0 placeholder(the very first place in the list since we start counting from 0) I have stored the string "my name". "father" is in the 1 placeholder </p>
      <p> Now on line 3 we call the entire value of the my_family array and line 5 the value of the 0 placeholder. Replace the number to choose which spot you want. Below we see the output.</p>
      <img src="../imgs/array_example_answer.png">
      <p>The entire array is called in response to line 3 and just the very first string value is called in response to line 5.</p>

      <h4>Now lets look over some Hash Examples</h4>
      <img src="../imgs/hash_example.png">
      <p>Here we have a hash called my_family_hash with various assignments for each name. The definition for my_name is Jeremy, father is Ernie, mother is Carol, etc. Again, we call the entire hash variable on line 11 and the definition for the first assignment on line 13.</p>
      <img src="../imgs/hash_example_answer.png">
      <p>Here are the responses from our terminal. We see the entire hash printed out and the first definition on the next line, Perfect!</p>
      <p>Even though this is not a comprehensive article, we can start see the subtle differences between an array and hash. You can see the key:value or word:definition relationship in an array as well, the only difference is you cannot chose the keys. They are fixed as integers counting upwards from 0. In a hash you are able to write the key and value for each one.</p>
      <p>Please refer to the Ruby documentation online for a more in depth breakdown of all the features that arrays and hashes are capable of.</p>
      <footer>
        <address>
          By <a href="mailto:<EMAIL>"><NAME></a>
        </address>
        <p>Copyright <NAME> 2015</p>
      </footer>
    </article>

    <a href="#" id="back button" alt="Previous"><img src="#"></a>
    <a href="#" id="next button" alt="Next"><img src="#"></a>
  </main>

  <footer class= "nav h-line">
    <ul class="">
      <li class=""><a href="https://github.com/jp5486"><img src="../imgs/GitHub-Mark-32px.png"></a></li>
      <li class=""><a href="http://www.facebook.com/jp5486"><img src="../imgs/facebook-32.png"></a></li>
      <li class=""><a href="http://twitter.com/jp5486"><img src="../imgs/twitter-32.png"></a></li>
      <li class=""><a href="mailto:<EMAIL>"><img src="../imgs/email-32.png"></a></li>
    </ul>
  </footer>
</body>
</html>


  <article></article>
  <nav></nav>
{'fraction_non_alphanumeric': 0.1456877791776429, 'fraction_numerical': 0.014660405451838278, 'mean_word_length': 3.1960595867371455, 'pattern_counts': {'":': 0, '<': 279, '<?xml version=': 0, '>': 279, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '7521578', 'n_tokens_mistral': 2759, 'n_tokens_neox': 2631, 'n_words': 1057}