Hash Tables Tutorial — File Browser

HashTablesTutorialv1.0 / HashTablesTutorialv1.0 / HT-Tutorial / Hash Tables / howiuse-make.htm

howiuse-make.htm — 4.01 KB — Download this file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Hash Tables - How I Use</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {
	font-family: Tahoma;
	font-size: 12px;
}
.style2 {color: #0000CC}
.style3 {
	color: #0000FF;
	font-weight: bold;
}
.style4 {color: #0000FF}
.style5 {
font-family: Tahoma;
font-size: 24px;
-->
</style>
</head>

<body bgcolor="#F2FDFF" text="#000000">


<div align="center">
  <table width="500" border="0">
    <tr>
      <th width="500" scope="col"><div align="left">
        <p align="center" class="style5"><u>HOW I MAKE AND LOAD </u></p>
	    <p align="left" class="style1">If you have looked at the commands, you will see before you add anything to a hash table, you need to <span class="style2">&quot;make&quot;</span> the hash table to begin with. This is acheived threw the command <span class="style2">&quot;hmake&quot; </span></p>
	    <p align="left" class="style1">Since with hash tables you have to make the table and then load the previous table that you saved before. I use a alias like the one below to acheive this.</p>
	    <p align="left" class="style2">alias fserv.main.make { hmake fserv.main | hload fserv.main $+(&quot;,$scriptdirhashtables\fservmain.hsh,&quot;) }<br>
	    </p>
	    <p align="left" class="style1">As you can see, this makes a hash table called <span class="style2">fserv.main</span> and loads into that table, the contents found in <span class="style2">fservmain.hsh</span> . </p>
	    <p align="left" class="style1">To explain the <span class="style2">$+(&quot;,$scriptdirhashtables\fservmain.hsh,&quot;)</span> part . The remote that you are codeing into, is obviouslly stored in a specfic folder within your main mirc directory. The <span class="style2">$scriptdir</span> command takes you straight to that folder. Hense I have everything in a folder marked <span class="style2">System</span>. Within that folder is the remote .mrc file that im codeing on. Also within the System folder is another folder marked <span class="style2">hashtables</span>. The codeing above for $scriptdir, will go straight to the folder system which contains my .mrc file and then go into the hashtable folder and will look for the fservmain.hsh file in there. The <span class="style2">$+(&quot;,,&quot;</span>) part makes this work when there spaces in the path as well. </p>
	    <p align="left" class="style1">Now here I'll get you to run a test here</p>
	    <p align="left" class="style1">In your mirc type <span class="style2">/hmake -s testing</span> </p>
	    <p align="left" class="style1">You should see <span class="style2">* Made hash table 'testing' (100)</span></p>
	    <p align="left" class="style1">The <span class="style2">(100)</span> part is what im interested in here. When you make a hash table, you can define a number which dictates how many items you can add to the table. But with what you just typed. i didn't define a number there, so mirc used the default number of <span class="style2">100 </span>which equals <span class="style2">1000 items</span> that can be added. I never bother with adding a number in as the default number is always going be more than sufficent.</p>
	    <p align="left" class="style1">To define a number of items, You would do this</p>
	    <p align="left" class="style2">/hmake -s testing 50</p>
	    <p align="left" class="style1">This means you can add 500 items then</p>
	    <p align="left" class="style1">Last thing, in your codeing, i would advise not having the <span class="style2">-s</span> switch, as this shows the hash table being made and loaded, which users of the addon or script your making, won't wish to see this all the time </p>
	    <p align="left" class="style1">&nbsp;</p>
	    <p align="left" class="style1">&nbsp; </p>
	    <p align="left" class="style1">&nbsp;</p>
	    <p align="left" class="style1">&nbsp;</p>
      </div></th>
    </tr>
  </table>
</div>
</body>
</html>