tag:blogger.com,1999:blog-12878578284275104842015-09-16T08:52:15.780-07:00! Programming and Math...video games and other interestsDisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.comBlogger38125tag:blogger.com,1999:blog-1287857828427510484.post-57545210046976714362011-09-13T23:12:00.000-07:002011-09-13T23:12:41.184-07:00Converting between Number SystemsI'm finally back from an extensive summer of military training. I am finally back in school. So now I can go back to blogging and teaching what I am currently learning. Both so you as the reader can learn some neat things; and I can remember what was taught. Call it studying maybe. So one of my computer science classes is "Intro to Computer Architecture". First day I learned to convert between 4 number systems.<br /><br />I won't go into much detail about what exactly they are. But here they are.<br /><br />Decimal: Can use any number between 0 and 9.<br /><br />Hexadecimal: Can use any number between 0 and 9. Any number higher is represented by a letter. These letters are A to F. Where A = 10 and F = 15.<br /><br />Octal: Can use any number between 0 to 7.<br /><br />Decimal: Can use 0 or 1.<br /><br />One thing i will mention which is important is these number systems use a base.<br /><br />Denoted as (N)^what ever base <br /><br />Decimal is base 10. (N)^10<br /><br />Hexadecimal is base 16. (N)^16<br /><br />Octal is base 8. (N)^8<br /><br />Binary is base 2. (N)^2<br /><br /><br />The base is represented by how many numbers are in the number systems set. <br /><br />So as for converting between the numbers.<br /><br />EX Decimal to Binary<br /><br />Lets have our decimal number as 1411 as today is the 14th and the year is 2011.<br /><br />So we write (1411)^10 ---> (N)^2 to show our decimal number and what base we are converting to. <br /><br />Heres where the conversion starts. Take whatever the base is of the system you are converting two. Then divide the number you are converting by that base. Keeping the remainder each time and add it on top of your divided number. We are actually using the operator Modulo instead.<br /><br />1411 / 2 = 705+1<br />705/2 = 352+1<br />352/ 2 = 176 + 0 <br />176/2 = 88 + 0<br />88/2 = 44 + 0<br />44/2 = 22 + 0<br />22/2 = 11 + 0<br />11/2 = 5 + 1<br />5 / 2 = 2 + 1<br />2 / 2 = 1 + 0<br />1 / 2 = <i><u><b>0</b></u></i> + 1<br /><br />When we get to zero as in bold above we stop. Note that this is also similar to Euclid's algorithm. Now this is the kool part. Starting from the bottom of that long series of modulo. Take the remainders of each modulo and write those numbers next to each other as shown below. <br /><br />(10110000011) this is the binary conversion. To test to see if we did this right. Starting from the right hand side of our binary number. We go up the powers of 2 on each number. <br /><br />2^ 0 = 1 ; 2^ 1 = 2 ; 2 ^ 2 = 4; 2^ 3 = 8 ; 2 ^ 4 = 16 ; 2 ^ 5 = 32 ; 2 ^ 6 = 64 ; 2^ 7 = 128 ;<br />2 ^ 8 = 256 ; 2 ^ 9 = 512; 2 ^ 10 =1024 ; 2^ 11 = 2048 ;<br /><br />So to break our binary up into individual bits.starting from the right hand side. If it is a one you give it the power of two determined.<br /><br />1 + 2 + 128 + 256 + 1024 = 1411.<br /><br />EX conversion from octal to binary.<br /><br />This starts to get a little different. Octal has a base of 8. Which means that for each octal number binary requires 3 binary numbers. <br /><br />Lets pick good old 63.<br /><br />(63)^ 8 ---> (N)^2. Same idea but now we do each number individually. So starting at 6 then 3. <br /><br />6/2 = 3 + 0<br />3/2 = 1 + 1<br />1=2 = 0 + 1 if you notice there is our 3 binary numbers required to represent one octal number. <br /><br /><br />3/2 = 1 + 1<br />1/2 = 0 + 1<br /><br />Now in this case if you start with zero. But you know you have to have 3 numbers keep going till you have three numbers. <br /><br />3/2 = 1 + 1<br />1/2 = 0 + 1<br />0 / 2 = 0 + 0 <br /><br />So taking our 6 binary numbers. we get (110) and (011) <br /><br />Testing this out to see if we did it correctly. <br />(110) = 2+4 = 6 <br />(011) = 1+ 2 = 3<br /><br />Note that testing the two together will give you 51 and not 63. By together I mean 110011.<br /><br />Hexadecimal to Octal<br /><br />(FACE5) ^ 16 ---> (N)^8<br /><br />For these conversion we either need to change hexadecimal to binary or decimal. If you change to binary for each hexadecimal requires 4 bits( 4 binary numbers, such as how octal requires 3 bits).<br /><br />We will convert to binary.<br /><br />(FACE5)^16 ---> (N)^ 2<br /><br />F = 15 / 2 = 7 + 1<br />7 / 2 = 3 + 1<br />3 / 2 = 1 + 1<br />1 / 2 = 0 + 1<br /><br />A = 10 / 2 = 5 + 0 <br />5 / 2 = 2 + 1<br />2/2 = 1 + 0<br />1/2 = 0 + 1<br /><br />C = 12 / 2 = 6 + 0<br />6 = 2 = 3 + 0<br />3 / 2 = 1 + 1 <br />1/2 = 0 + 1<br /><br />E = 14 / 2 = 7 + 0<br />7 / 2 = 3 + 1<br />3 / 2 = 1 + 1 <br />1/2 = 0 + 1<br /><br />5/2 = 2 + 1<br />2/2 = 1 + 0<br />1/ 2 = 0 + 1<br />0 / 2 = 0 + 0<br /><br />Our binary conversion is (1111101011100101) Now becuase octal takes 3 bits per number we need to split our binary up into groups of 3 bits. <br /><br />Since theres 16/ 3 = 5 Remainder 1 Let the one remainder be the first bit. The group the rest. <br /><br />1 111 101 011 100 101. Now lets see what are octal number is. <br /><br /><br />101 = 1 + 4 = 5<br />100 = 4<br />011 = 1 + 2 = 3 <br />101 = 5<br />111 = 1 + 2 + 4 = 7<br />1 = 1<br /><br />175345<br /><br />Hope you had fun reading this. Have fun showing off to friends. <br /><br /><br /><br /><br /><br /> <img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/E6e_PeL9DCc" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com11http://disposedcheese.blogspot.com/2011/09/converting-between-number-systems.htmltag:blogger.com,1999:blog-1287857828427510484.post-53372626804614702252011-06-03T12:18:00.000-07:002011-06-03T12:18:00.420-07:00Deep WebEvery wonder how big the internet is? I have wondered this. Now the internet in it's size can never truly be determined. We can gather a rough approximation. But it grows to rapidly and unpredictable. Now here is a brain buster. All of us who use the internet has probably only visited less than 1%. Most likely smaller. his is partly in reason that web search engines only scratch what is called the surface layer of the web. This layer is all that a search engine can reach to find websites. The rest of the websites are lost down in a place called the dark web or deep web/net.<br /><br />So i have a challenge for anyone reading this. Go find a deep net search engine and explore the deep net. There is all kinds of information undiscovered waiting for you.<br /><br />Just be careful!!!<br /><br />Majority of the deep net holds criminal activity such as identity theft, cp, scams. <br /><br />So be safe and have fun<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/zswPZ-_axJ0" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com15http://disposedcheese.blogspot.com/2011/06/deep-web.htmltag:blogger.com,1999:blog-1287857828427510484.post-66935655956049724312011-06-01T22:00:00.000-07:002011-06-01T22:00:43.424-07:00Doritos and why the kind I tried, hurt!So while I was away on course. I had a weekend off and decided to skip to the next town over. This town being Owen sound, a nice beach city. I decided instead of sleeping on a cot I would buy a hotel room with some buds and sleep there. While I was staying there a younger fellow on another course came out with a bunch of weird Doritos chips. They were well weird because I have never seen them before.<br /><br />They were Doritos 1st degree burn, 2nd degree burn, and 3rd degree burn. Each bag a totally different level of spiciness. I never got to try them then. But about 2 weeks later(now) as I write this I bought some. Needless to say my mouth is still on fire from 6 hours ago when I tried them. Starting with 1st degree. <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://danbrokamp.com/wordpress/wp-content/uploads/2010/05/Doritos-1st-Degree-Burn-231x300.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://danbrokamp.com/wordpress/wp-content/uploads/2010/05/Doritos-1st-Degree-Burn-231x300.gif" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The flavor was jalapeno. Needless to say I am already weak for jalapeno's. So these chips were manageable, but I still had a nice face sweat going on along with the tip of my tongue for some reason burning. You will definitely want to try and finish this bag before continuing your quest of pain. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-x6A3lPKHLE0/Td0zMcbEXwI/AAAAAAAAAHA/F-A2AAz6bMg/s1600/burn+doritos.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-x6A3lPKHLE0/Td0zMcbEXwI/AAAAAAAAAHA/F-A2AAz6bMg/s320/burn+doritos.jpg" width="320" /></a></div><br /><br /><br /><br /><br />Next up is fiery buffalo. Now this one was surprisingly not as bad as the first for me. I was pounding them back as they had a very calm sweetness to them. Then it hit me like a wall of death. There is mad after burn with these chips. It sucks, I thought i was going to die. I drank 4 liters of milk and it still hurt. After accomplishing both 1st and 2nd degree. You have earned to try 3rd. If your not dead yet. <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://danbrokamp.com/wordpress/wp-content/uploads/2010/05/Doritos-3rd-Degree-Burn-231x300.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://danbrokamp.com/wordpress/wp-content/uploads/2010/05/Doritos-3rd-Degree-Burn-231x300.gif" /></a></div><br /><br /><br />Scorching Habanero. Now I did not have the option of buying these chips as they were out of order. But from what I have read online it was probably best that I did not. The chip bag is red and the chips apparently don't look any different. Each bite is like swallowing razors of heat. When I get the chance to buy these I will write about my trip to the hospital. As I will clearly be there.<br /><br />To the reader this may have been very exaggerated. Still eat at your own discretion. Have fun and challenge yourself with these chips. They may be hard to come by in Canada as I had a hard time finding them.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/ETDWA3cGyQA" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com7http://disposedcheese.blogspot.com/2011/06/doritos-and-why-kind-i-tried-hurt.htmltag:blogger.com,1999:blog-1287857828427510484.post-34518103761412792372011-05-28T18:12:00.000-07:002011-05-28T18:12:43.288-07:00BMQ LAND 0907So i am back for a few days before i head back to work. In my last post i did not mention what i was doing. I was currently finishing off my military boot camp course. The second portion of it. Also known as BMQ Land (Soldier Qualifications). So i will keep this post short, as my writing skill has diminished a little. "BMQ" stands for "Basic Military Qualifications". "Land" means what side of the military I am on. In this case Land is well land and not air or naval.<br /><br />Course details(what i learned):<br /><br />M72 Rocket Propelled Grenade (SRAAW (L))<br />C13 Fragmentation grenade<br />C9 Light Machine Gun<br />C6 General Purpose Machine Gun<br /><br />Platoon Attacks<br />Section Attacks<br /><br />Recce Patrols<br /><br />Offensive and Defensive Operations<br /><br />How to dig and man a trench and not sleep for a week straight<br /><br /><br />The last point was the highlight of the course. Now i will display a picture of myself and the killing tools I was trained on.<br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-UpAbexDU0xA/TeGdHfIAdyI/AAAAAAAAACc/wghMZOQSV4g/s1600/1105031916000.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-UpAbexDU0xA/TeGdHfIAdyI/AAAAAAAAACc/wghMZOQSV4g/s1600/1105031916000.jpg" /></a></div><a href="http://www.army.forces.gc.ca/land-terre/Images/2_0/39.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="193" src="http://www.army.forces.gc.ca/land-terre/Images/2_0/39.jpg" width="320" /></a><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://www.army.forces.gc.ca/land-terre/Images/2_0/24.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="186" src="http://www.army.forces.gc.ca/land-terre/Images/2_0/24.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://www.army.forces.gc.ca/land-terre/Images/2_0/37.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="193" src="http://www.army.forces.gc.ca/land-terre/Images/2_0/37.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://www.army.forces.gc.ca/land-terre/Images/2_0/43.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="193" src="http://www.army.forces.gc.ca/land-terre/Images/2_0/43.jpg" width="320" /></a></div><img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/3qnFKlUOyJA" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com11http://disposedcheese.blogspot.com/2011/05/bmq-land-0907.htmltag:blogger.com,1999:blog-1287857828427510484.post-36714685128308777562011-04-21T17:19:00.000-07:002011-04-21T17:19:47.907-07:00Leave of AbsenceHi there fellow views and followers. I am sad to inform you that I will no longer be blogging for the next 3 months. This is mainly due to I need work to pay for school. Now your probably wondering and saying, "well i work and i can blog". This may be true, but for myself I will not have the privilege of internet and computer access. In my line of work which I will not disclose with you.<br /><br />On those regards, I shall be returning August 1st or sooner. Thus you can expect to read more programming math related posts around that time. Also for the voting post. <br /><h3 class="post-title entry-title"><a href="http://disposedcheese.blogspot.com/2011/04/what-language-to-explain-and-possibly.html">What Language to explain and possibly teach?</a></h3><br />Total votes per language:<br /><br />C: 0<br />C++:7<br />Java: 7<br />HTML: 2<br />CSS: 0<br />Javascript: 0<br />PHP: 2<br />Other(aka Ruby): 1<br /><br />So as you can see it is a tie between Java and C++. Thus we need to take into consideration my vote.<br />I myself would like to learn and teach Java in the process. So in august before my object oriented programming starts. I will be getting a head start by learning java. So this is my last post. Have a good summer.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/Ix0KikrvdPg" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com39http://disposedcheese.blogspot.com/2011/04/leave-of-absence.htmltag:blogger.com,1999:blog-1287857828427510484.post-79980940144689518322011-04-19T21:09:00.000-07:002011-04-19T21:09:33.891-07:00Portal 2So finally Portal 2 came out. For those who have not even heard of Portal. You have to crawl out of your cave and game it. It has won all sorts of awards and is quite possibly the most original game I have played.<br /><br />Here is a quick writeup from our good friend Wikipedia.<br /><br />The game consists primarily of a series of puzzles that must be solved by <a class="mw-redirect" href="http://en.wikipedia.org/wiki/Teleporting" title="Teleporting"></a>teleporting the player's character and simple objects using the Aperture Science Handheld Portal Device (ASHPD, also dubbed the "portal gun"), a unit that can create inter-spatial portals between flat planes. The player character, Chell, is challenged by an AI named <a href="http://en.wikipedia.org/wiki/GLaDOS"></a>GLaDOS(Genetic Lifeform and Disk <a href="http://en.wikipedia.org/wiki/Operating_system"></a>Operating System) to complete each puzzle in the Aperture Science Computer-Aided Enrichment Center using the portal gun with the promise of receiving <a href="http://en.wikipedia.org/wiki/Cake"></a>cake when all the puzzles are completed.<br /><br />In short summary for anyone who has played. The cake is a lie. This was quite possibly the best game of 2007.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://upload.wikimedia.org/wikipedia/en/7/7e/Portalgame.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://upload.wikimedia.org/wikipedia/en/7/7e/Portalgame.jpg" /></a></div><br /><br />So besides Portal being an awesome game. Such an awesome game as a sequel. Portal 2. Now i have not played the game yet. As i am waiting for my younger brother to get off the Xbox 360, and go to bed which should have been 2 hours ago. I will soon be playing this game. I am extremely excited and I think after this post i will be kicking my brother off. Oh and obviously I will have to beat it all in one sitting. <br /><br />The game description on the back of the game case.<br /><br /><br />The single-player portion of Portal 2 introduces a cast of dynamic new characters, a host of fresh puzzle elements, and a much larger set of devious test chambers. Players will explore never-before-seen areas of the Aperture Science Labs and be reunited with GLaDOS, the occasionally murderous computer companion who guided them through the original game. <br />The game's two-player cooperative mode features its own entirely separate campaign with a unique story, test chambers, and two new player characters. This new mode forces players to reconsider everything they thought they knew about portals. Success will require them to not just act cooperatively, but to think cooperatively.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://upload.wikimedia.org/wikipedia/en/7/71/Portal2-testchamber.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="http://upload.wikimedia.org/wikipedia/en/7/71/Portal2-testchamber.jpg" width="320" /></a></div><br />Screenshot of one of the game's test chambers, showing the deterioration over the years (plant overgrowth, damaged panels and floors, etc.) Also demonstrates the crazed art left by the "Rat Man" character that reviews the events of the first game.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/uujcjVq7SPA" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com21http://disposedcheese.blogspot.com/2011/04/portal-2.htmltag:blogger.com,1999:blog-1287857828427510484.post-91741464405959947222011-04-18T00:27:00.000-07:002011-04-18T00:27:52.975-07:00What Language to explain and possibly teach?So starting this week, depending on how well comments go. I will be interacting with my fellow followers a bit. I want to see what you my followers want to see me talk about. To do this I will obviously ask you the reader to leave a nice comment/vote to determine what I talk about next. The topics I will be talking about will either be a programming language that i have not explored yet, or one that I am extremely familiar with. So this will be both a fun experience for myself and for the reader. I will hopefully brush up on some programming, or possibly learn a new language or at least better understand a language. I will also be referencing this post in my other posts so that you can get a chance to vote/comment. So I will now lay down the options for you to decide.<br /><br /><b>******* Please comment with the language you would like me to talk about</b>*********<br /><ol><li> C</li><li> C++ </li><li> HTML</li><li>CSS</li><li>JavaScript</li><li>PHP</li><li>Java</li><li>Other (state what language in comment)</li></ol>Voting will be over by Wednesday or Thursday. <br /><br /> So I look forward to talking about one of these. Also even though school is over for myself. I have always wanted to learn Big "O" in math. So i think I will teach myself that and post it about that sometime.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/0uskNUC49yE" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com20http://disposedcheese.blogspot.com/2011/04/what-language-to-explain-and-possibly.htmltag:blogger.com,1999:blog-1287857828427510484.post-25998302071043154272011-04-17T18:23:00.000-07:002011-04-18T13:41:23.954-07:00Javascript TricksI have read a few tricks across my travel through the Internets in regards to Javascript.<br /><br /><b>JavaScript</b>, also known as ECMAScript<sup class="reference" id="cite_ref-JSConf_US_5-0"><a href="http://en.wikipedia.org/wiki/JavaScript#cite_note-JSConf_US-5"></a></sup> is a <a class="mw-redirect" href="http://en.wikipedia.org/wiki/Prototype-based" title="Prototype-based">prototype-based</a>, <a href="http://en.wikipedia.org/wiki/Object-oriented_programming" title="Object-oriented programming">object-oriented</a><sup class="reference" id="cite_ref-ECMA-262_6-0"><a href="http://en.wikipedia.org/wiki/JavaScript#cite_note-ECMA-262-6"></a></sup> <a href="http://en.wikipedia.org/wiki/Scripting_language">scripting language</a> that is <a class="mw-redirect" href="http://en.wikipedia.org/wiki/Dynamic_language" title="Dynamic language">dynamic</a>, <a href="http://en.wikipedia.org/wiki/Weak_typing" title="Weak typing">weakly typed</a> and has <a href="http://en.wikipedia.org/wiki/First-class_function" title="First-class function">first-class functions</a>. - http://en.wikipedia.org/wiki/JavaScript<br /><br />Now when i say tricks i mean something that manipulates the code of a site in a non harmful way to create personal enjoyment. You can also use these to benefit yourself or show off to friends. What ever order comes first.<br /><br />All of the code presented can be copied and pasted into the URL bar. Hit enter and enjoy. Also it may help if JavaScript is turned on in your browser. <br /><br /><b>Master Editor:</b><br /><br />So anyhow here is some code to help you edit your site faster, or pretend to be editing a site in real time.<br /><br /><code>javascript:document.body.contentEditable='true'; document.designMode='on'; void 0</code><br /><br /><code>My personal favorite. Takes all images off the site and creates a Ferris wheel with them. </code><br /><br /><code><span style="font-family: Times,"Times New Roman",serif; font-size: small;"><b>Image Vortex:</b></span></code><br /><code><br /></code><br /><code>javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0);</code><br /><br /><code> </code>If you look carefully in the above code, its rotating the HTML “img” tag. Just replace it with “a” or “p” and watch some links or text rotate instead of images.<br /><br /> <b style="font-family: Times,"Times New Roman",serif;">Tremors:</b><br /><br /><span style="font-family: Times,"Times New Roman",serif;">Your screen is going to love this one.</span><br /><br /><code>avascript:function flood(n) {if (self.moveBy) {for (i = 200; i &gt; 0;i--){for (j = n; j &gt; 0; j--) {self.moveBy(1,i); self.moveBy(i,0);self.moveBy(0,-i); self.moveBy(-i,0); } } }}flood(6);{ var inp = "D-X !msagro na dah tsuj resworb rouY"; var outp = ""; for (i = 0; i &lt;= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse</code><span style="font-family: Times,"Times New Roman",serif;"> </span><b style="font-family: Times,"Times New Roman",serif;"> </b><br /><br /> <b>Sketchy Site, Inspect it:</b><br /><br />If you find a site that you feel you cannot trust. You want to verify that it is authentic. You can with this.<br /><br /><code>javascript:alert("The actual URL is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match, this may be a spoof.");</code><br /><br /><b>Roll up your broswer Katamari style:</b><br /><br /><span style="font-size: x-small;"><span class="Apple-style-span">javascript:var h='http://dl.dropbox.com/u/1881429/Katamari/',i,n,ss=['http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js',h+'Renderables.js',h+'Game.js'];for(i=0;i<ss.length;i++){n=document.createElement("script");n.src=ss[i]+'?'+Date.now();document.head.appendChild(n);}</span></span><br /><br /><span style="font-size: x-small;"><span class="Apple-style-span"><span style="font-size: small;">This code only works for chrome and safari. Thanks to "mac and me" for posting a comment about this.</span></span></span><br /><br /><code><span style="font-size: large;"><b style="font-family: Times,"Times New Roman",serif;">Basic Calculator:</b></span></code><br /><code><span style="font-size: large;"><span style="font-family: Times,"Times New Roman",serif;"> <span style="font-size: small;">Possibly the most helpful out of these tricks. </span></span></span></code><br /><br /><code>javascript: alert(69696-76543+555);</code><br /><br /><code>Change the numbers inside the alert function to create your own equations. You can also not include numbers in the function, but instead write any comment that you want displayed like. Your computer will self destruct in 10 seconds. Freak your friends out. Have fun.</code><br /><br /><div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Times,"Times New Roman",serif; font-size: small;"><code><br /></code></span><code><span style="font-size: large;"><span style="font-size: small;"> </span></span></code></div><code><span style="font-size: large;"><span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><br /></span></span></span></code><br /><code><span style="font-size: large;"><span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><br /></span></span></span></code><img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/DpxiTHr-ZTQ" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com8http://disposedcheese.blogspot.com/2011/04/javascript-tricks.htmltag:blogger.com,1999:blog-1287857828427510484.post-54419740522990812352011-04-16T00:49:00.000-07:002011-04-16T00:49:38.867-07:00PHP: File Input and OutputSo i was meddling around today will File input and output functions. These functions are relatively the same as what i have dealt with in C and C++. One thing that's bothering me is the newline command is still acting weird for me. Another thing I experimented with was getting a string or value from a user input. This involves HTML forms. Which i have very little experience with too. So today was very hectic trying to learn and correct a lot of mistakes and errors while trying to code and learn new things. I also noticed what i was coding actually required a server this time. So i used a nice program called xampp to set up a PHP server for me. So testing the code on that has been splendid. So anyhow on to the coding.<br /><br />Source Code<br />-------------------------------------------------------------------------------------------------<br /><blockquote><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><br /><head><br /> <meta http-equiv="content-type" content="text/html; charset=us-ascii" /><br /><br /> <title>form.htm</title><br /></head><br /><br /><body><br /> Form site<br /> <br /><br /><br /> <form action="fileio.php" method="post"><br /> username:<input name="name" type="text" /> <input type="submit" /><br /> </form><br /></body><br /></html></blockquote>----------------------------------------------------------------------------------------------------------------<br />Now the code that makes the least amount of sense is this.<br /><br />Source Code<br />-------------------------------------------------------------------------------------------------<blockquote> <form action="fileio.php" method="post"><br /> username:<input name="name" type="text" /> <input type="submit" /><br /> </form></blockquote>--------------------------------------------------------------------------------------------------- <br /> Now you are probably wondering what in the world is this. Well, I will start with saying it is a form. If you haven't figured that out then i don't know if programmings right for you. What this form does is allows the user to enter a string into a box. Then hit a little submit button. This is appropriate for numerous situations and can be used as a login. <br /><br />In this codes case it's to check the availability of a username. If it is free, it allows the user to use it. <br />Another important part of the form is the top where it says <br /><br /><b>action="fileio.php" method="post"</b><br /><br />the action part is when the user clicks the submit button.It will bring them to another page i called fileio.php. I will show the code for that soon. The next important thing is the method="post". This takes whatever the user entered into the text box and transfers it over to the fileio.php page. Now this may be explained poorly and i am sorry if it is. This is how i understand it. So if this is not the case as to what is going on correct me in a comment. So the user clicks submit after filling out the forms.<br /><br />Now on to the fileio.php page.<br /><br />Source Code<br />-------------------------------------------------------------------------------------------------<br /><br /><?php<br /><br />$fp = fopen("usernames.txt", "r") or die("Could not open requested file");<br /><br />$usrname = $_POST['name'];<br />$used = 0;<br />while ($str = fgets($fp)) {<br /> if ($usrname == $str) {<br /> print ("This username has already been used");<br /> $used = 1;<br /> break;<br /> }<br />}<br />fclose($fp);<br /><br />if ($used == 0) {<br /> $fp = fopen("usernames.txt", "a");<br /> fwrite($fp, "\r\n$usrname");<br /> fclose($fp);<br />}<br /><br />?> <br />----------------------------------------------------------------------------------------------------------<br />Okay so we have lots going on here in this code. I will try and touch on all bases.<br /><br />$fp = fopen("usernames.txt", "r") or die("Could not open requested file");<br /><br />This line of code has created a variable that points to a file. That file is usernames.txt and the "r" signifies that we have open that file for reading only. fopen stands for file open and takes two parameters a string and what you want to do to the file.<br /><br />$usrname = $_POST['name'];<br /><br />Remember that method="post" code from earlier. This is where that comes into play. What ever the user typed into that box is now a string held by the variable $usrname. As far as I know this is the only way to prompt the user for a variable. How neat. <br /><br /> $used = 0;<br />while ($str = fgets($fp)) {<br /> if ($usrname == $str) {<br /> print ("This username has already been used");<br /> $used = 1;<br /> break;<br /> }<br />}<br /><br />Now this big ugly control structure. The variable $used is just there to keep track of whether or not the username has been used already. where it says while( $str = fgets($fp) ). This is a loop, and the condition for that loop is keep looping while there is still a string for use to get from the file. <br /><br />$str = fgets($fp)<br /><br />in other words the condition above is using fgets(). fgets() is a function that reads a line from a file. So what is happening is it is reading a line from the file and storing that string into the variable $str. Now this function fgets will keep being called until it finds no more lines left in the file. In this case it will stop running and when this happens the loops stops looping. <br /><br />if ($usrname == $str) {<br /> print ("This username has already been used");<br /> $used = 1;<br /> break;<br /><br />This line of code is saying hey! if the username is equal to a string already in the file then lets alert the user, change the value of the variable used to one, and then stop the loop by using break. Simply right.<br /> <br />So after this comes an important function for files once they are open.<br /><br />fclose($fp);<br /><br />fclose just closes your file that is opened. In this case our file pointer $fp which points to usernames.txt.<br /><br />if ($used == 0) {<br /> $fp = fopen("usernames.txt", "a");<br /> fwrite($fp, "\r\n$usrname");<br /> fclose($fp);<br />}<br /><br />This last piece of code is saying. Hey if the username was not already used. Then lets store it in the file so it can't be used again. We determine if the username has been used already from the while loop statement and by using the variable $used. Also you will notice we are pointing to the same file again. But the difference being this time. We are opening the file for appending. Denoted by "a" in the second parameter.<br /><br />What is happening here is we have opened the file to add on to the file without erasing anything.<br /><br />The last line of code we have not seen is <br /><br />fwrite($fp, "\r\n$usrname");<br /><br />fwrite() is a function that adds a string to the file. So we are adding the username to the file in this line of code. We are also creating a newline so the username is spaced out among the others. <br /><br />So hopefully that was not too confusing and I will be adding onto this code as i progress and get better.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/tMoR7DB70Ac" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com14http://disposedcheese.blogspot.com/2011/04/php-file-input-and-output.htmltag:blogger.com,1999:blog-1287857828427510484.post-21283479220278150072011-04-14T20:23:00.000-07:002011-04-14T20:28:04.113-07:00PHP: Declaring and Printing VariablesSo i decided to go ahead and learn how to declare and display my variables in PHP. First thing i noticed is when declaring a variable you do not need to specify what type of data your variable is. Such as an integer, string, character, etc. Which i found really weird, but I got use to it. Next thing i noticed was I had a hard time using \n to create a newline in PHP. Which is a command. I just found it was a syntax error(aka parse error in PHP). But anyhow here is some code I created in order to test some things. Feel free to read the English parts of my code for non programmers. It might amuse you.<br /><br />Source Code<br />----------------------------------------------------------------------------------------------------------------------------<br /><blockquote><br /><html><br /> <br /> <body>Welcome to my PHP Test Page<br /> <?php /*Declaring and printing variables*/<br /> $var = 5; <br /> $name = "Hello World";<br /> $test = array("Hello","this","is","an","array");<br /> ?><br /><br /> <p><br /> Testing out, printing declared variables <br /><br /> <br /> printing 5 to the screen from variable <?php print('$var ');?> <br /><br /> <br /> <br /> <br /> <?php print("$var");?> <br /><br /> <br /> <br /> Well that seemed to have worked out nicely, Now wth is the code to print print a newline. <br /><br /> instead of having to use HTML's "br" to create a new line out of my php scope<br /><br /><br /> <br /> <br /> Time to print a string using echo and print command<br /><br /> <br /> <?php echo "$name"; print(" $name "); ?> <br /><br /><br /> <br /> Time to print an array<br /><br /> <br /> <?php print_r($test); ?><br /><br /> <br /> Well that was really unexpected so much for that command being of any use.<br /><br /> Maybe i used it wrong oh well time to find another way to print an array.<br /><br /> <br /> <?php for($i = 0; $i<5; $i++){print("$test[$i] ");} ?><br /><br /><br /> <br /> <br /> Well that seemed to have worked out a lot nicer. Using a loop and accessing each index of the array was nicer then print_r.<br /><br /> I think I will end the tests for this blog. Thanks for reading!<br /><br /> <br /><br /> </p><br /><br /></body><br /></html></blockquote> --------------------------------------------------------------------------------------------------------------------------<br />End of Source Code<br /><br /><br /><b> What is actually displayed here. So you can see what exactly I did. </b><br /><br /><blockquote>Welcome to my PHP Test Page <br />Testing out, printing declared variables <br />printing 5 to the screen from variable $var <br /><br />5 <br /><br />Well that seemed to have worked out nicely, Now wth is the code to print print a newline. <br />instead of having to use HTML's "br" to create a new line out of my php scope<br /><br />Time to print a string using echo and print command<br />Hello World Hello World <br /><br />Time to print an array<br />Array ( [0] => Hello [1] => this [2] => is [3] => an [4] => array ) <br />Well that was really unexpected so much for that command being of any use.<br />Maybe i used it wrong oh well time to find another way to print an array.<br />Hello this is an array <br /><br />Well that seemed to have worked out a lot nicer. Using a loop and accessing each index of the array was nicer then print_r.<br />I think I will end the tests for this blog. Thanks for reading!<br /><br /><br /></blockquote><img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/v79yGacOSWU" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com12http://disposedcheese.blogspot.com/2011/04/php-declaring-and-printing-variables.htmltag:blogger.com,1999:blog-1287857828427510484.post-43314273672700667082011-04-13T17:26:00.000-07:002011-04-13T17:26:08.463-07:00PHP Designer 7So i am done my first year of Computer Science at Lakehead University. I Finished all my exams and feel confident I did good in the classes, that I do not currently have a mark to put with. I finished my computer Programming class with an 87% so I am happy and content with an A mark. Now that I am done my math exams and I can now talk about other topics regarding more on the programming side of things. <br /><br />First thing first. I was recommended a nice IDE called PHP Designer 7. For those who do not know what an IDE is.Here is a definition.<br /><br />Integrated Development Environment. It has visual designer to allow you to put together the user interface visually, editor to let you edit the source code, compiler to compile your source to executable, debugger to debug your programs, etc.<br /><br />So many IDE's make programming a lot easier and more convenient as it's a one stop shop. So anyhow I am currently teaching myself PHP for the sake of learning the language.<br /><br />A definition of PHP :<br /><br /><b>P</b>HP: <b>H</b>ypertext <b>P</b>reprocessor. It is a recursive acronym; the first "P" stands for "PHP," and the first "P" of <i>that</i> stands for "PHP" as well, thus the cycle continues. It originally stood for Personal Home Page, but was renamed when the language fell into common use on the web, at version 3.0<br /><div style="background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;"><br />The one thing i find cool about this language is that unlike ordinary web code where you can write it in a text file then change the extension and load it up in your internet to view the outcome. PHP needs some sort of server in order for the code to become visual. Where as if you typed out your code changed the extension and went to view it you would see nothing locally. </div><div style="background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;"><br /></div><div style="background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;">This is where PHP Designer 7 comes into play. It allows you to be able to visually see what your code is doing instead of having to set up a server to view it. Which has to be the most iimportant feature of this IDE. So anyhow here is the generic Hello World code in PHP. </div><div style="background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;"><br /></div><blockquote><div style="background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br /> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br /> <br /> <!-- Fig. 26.1: first.php --><br /> <!-- Our first PHP script --><br /> <br /> <?php<br /> $name = "Hello World"; // declaration<br /> ?><br /> <br /> <html xmlns = "http://www.w3.org/1999/xhtml"><br /> <head><br /> <title>A simple PHP document</title><br /> </head><br /> <br /> <body style = "font-size: 2em"><br /> <p><br /> <strong><br /> <br /> <!-- print variable name's value --><br /> Welcome to PHP, <?php print( "$name" );?>!<br /> </strong><br /> </p><br /> </body><br /> </html></div></blockquote><div style="background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;"><br /></div>This code displays Hello World. Enjoy!<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/ltb-7J7_wik" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com21http://disposedcheese.blogspot.com/2011/04/php-designer-7.htmltag:blogger.com,1999:blog-1287857828427510484.post-29459763986825986482011-04-12T15:12:00.000-07:002011-04-12T15:28:52.114-07:00Discrete Probability and ProbabilitySo this blog will be about some of my study notes for probability and other things that i need to remember for my exam tomorrow. It will not be as informative for the most part. But it might be able to show you some cool things that math can do. <br /><br /><b>Binomial Theorem: </b><br /><br />This is helpful for if you want to find the coefficient of a large polynomial really fast. Lets say find the coefficient of<br /><br />( x + y) ^13 for x^6*y^7. Your probably going to write all of this out which would take forever factoring this equation out. To solve for the coefficient of x^6*y^7. Take a look at the exponent over the factored equation. It is 13. Now look at the exponent over your first variable x. This is 6. So your coefficient for x^6y^7 is the combination of 13 choose 6. Which happens to be 1716.<br /><br />A combination is usually left in this notation C(13 6).<br /><br /><b>Pigeon Hole:</b> This is really simple and a great way of solving probability questions. Lets say you have only k boxes(pigeon holes) and n distributable objects. Each object gets on hole. Until there is no more room for an object in a hole, then that object shares a hole with another object. By this principle there must be a box with<br /><br /><b>roundup( n/k) elements</b>. Where roundup means whatever your answer is round it up. Also known as the roof function.<br /><br /><b>Example: </b><br /><br />61 people are in a classroom. Show that at least 6 people in the room share a birthday in the same month.<br /><br />To break this down we know that there are 12 months. <br /><br />The by the formula plug in <b>roundup(61/12)</b> we get exactly 6 elements in one hole. So we know that atleast 6 people in the class share the same month for their birthday.<br /><br /><b>Indistinguishable Permutations: </b><br /><br />Count the number of ways you can re arrange the word "dispose" <br /><br />The answer is 7!.<br /><br />Now this does not work for repeating characters. Such as in the word "goodbye" .<br />Where there is two "o".<br /><br />The answer for this is the number of characters in the word. Divided by the factorial of the number of repeating characters. <br /><br />The answer is 7!/2!.<br /><br /><br /><b>Repetition allowed Combinations:</b><br /><br />Giving by the formula:<br /><br /><b>C( n - 1 r , r) </b><br /><br /><b> Example:</b> Suppose we have 10 loonies to give out to 5 children. <br /><br />Our answer is C(5-1+10 , 10) = C(14 10) = 1001 ways.<br /><br /><b>Card Problems:</b><br /><br />1. How many different 5 card hands can you make with a standard deck of cards.<br /><br />C(52 5) = 2598960 ways.<br /><br />2. 5 card hand with only spades. We know there is 13 spades in a deck. So for this just remove every other card and choose from your spade deck of 13 cards. <br /><br />C(13 5)<br /><br />3. The number of hands with 3 hearts and 2 diamonds. Split your deck into a deck of 13 hearts and 13 diamonds. Remove all spades and clubs. Pick from each deck appropriately 3 hearts and 2 diamonds. Multiple your combinations together.<br /><br />C(13 3) * C(13 2)<br /><br /><b>Fruit Basket problem:</b><br /><br />You have a basket with oranges and apples. You can only pick 4 fruit from the basket. How many ways can you pick four fruit.<br /><br />You can just count them out. <br /><br />Let O = orange and A = apples.<br /><br />4O , 4A , 3O1A, 2O2A, 1O3A. <br /><br />As you can see 5 ways.<br /><b><br /></b><br /><b>Money Troubles:</b><br /><br />You have a bag of money with different denominations: $1,2,5,10,20,50,100.<br /><br />You want to how many ways can you pick 5 bills. We know there is 7 different values of bills in the bag. Using a combination that allows repetition we get<br /><br />C(7-1+5 , 5 ) = C(11 5) = 462 ways.<br /><br /><b>Discrete Probability</b><br /><br />Possibly my more favorite area of probability.<br /><br />Must know formula :<br /><br /><b>P(E) = | E | / |S| Where P(E) = the probability of an experiment. |E| = event, |S| = sample space</b><br /><br /><b>Example:</b><br /><br />p(of drawing a queen from a standard deck) = |4| / |52| = 1/13. There is only 4 queens in a deck of 52.<br /><br /><b>Example:</b><br />If you roll two dice what is the probability that the sum of them add up to 5.<br /><br />Show the number of ways to add up to five for visual purpose. <br /><br />|E| = { 2 , 3} ,{3 , 2} , { 1 , 4 } , { 4 , 1 } = 4 ways.<br /><br />We know that two standard dice have a possibility of 36 outcomes = 6*6. <br /><br />So 36 is our sample space and 4 is our event. Therefore the answer is<br /><br />P(sum of 5) = 4/36<br /><br /><b>Discrete Card Problems</b><br /><br />Your dealt 5 cards from a 52 deck.<br /><br />1. You want to get at least one ace.For this you have to find the hands with atleast one ace and minus it off the hands with no ace. <br /><br />|E| = C(52 5 ) - C(48 5) <----removed aces from the deck<br />---------------------------<br />|S| = C(52 5) <br /><br />2. You want to get a 4 of a kind. First we need a kind. Which is C(13 1)<br />Then we need the rest of the kind C(4 4)<br />Then we need another card from he remaining cards C( 48 5) <br />So times these 3 events together to equal |E| and we know our sample space is C(52 5)<br /><br />[C(13 1)* C(4 4)* C(48 5)] / C(52 5) <br /><br /><b>Circuits:</b><br /><br /><b>Euler circuit: </b>Contains every edge once. Every vertex must have an even degree for one to exist. Must reach the same vertex. As denoted by a circuit.<br /><br /><b>Euler Path:</b> Must visit every edge exactly once.<br /><br /><b>Hamilton Circuit: </b>contains at least every vertex exactly once and returns to original as denoted by a circuit. <br /><br /><b>Hamilton Path: </b>is just visiting every vertex exactly once.<br /><br /><b>Sequences and Formulas:</b><br /><br />Just ways to determine what type of formula you should use. <br /><br /><b>Geometric: an = ar^n for n>= 0 </b><br /><b>Arithmetic an = nd + a for n>=0 </b><br /><b>Recursion: usually my favourite.</b><br /><br />Example: Find a solution to the sequence.<br /><br />2, 5, 8 , 11, 14, 17, 20 ......<br /><br />We can visually see this is incrementing by 3. <br /><br />My solution for this would be<br /><br />a0 = 2.<br />an = a(n-1) + 3 for n>=0.<br /><br />Test it or yourself.<br /><br /><b>Composition of Relations:</b><br /><br />Basically this has transitive properties.<br /><br /><b>Example:</b><br /><br />A = { x, y, z} , B = { 0, 1} , C = { a, b, c, d}<br /><br />Let R be a subset of the product of A to B. Let S be a subset of the product of B to C.<br /><br />R = { (x, 0) , (y , 1)} , S = { (0 , a), ( l, d)}.<br /><br />The the Composition of S and R denoted S o R or R o S is<br /><br />S o R = R o S = { (x , a ) , (y , d)} You may be able to see how this is transitive.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/sK1TzL1xvQg" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com16http://disposedcheese.blogspot.com/2011/04/discrete-probability-and-probability.htmltag:blogger.com,1999:blog-1287857828427510484.post-13285589311462613092011-04-11T00:25:00.000-07:002011-04-11T00:25:49.574-07:004th Prestige in Call of Duty: Black ops First on a <b>side note</b>. I changed the title of this blog to <b>Programming and Math</b>. This is mainly because of my final exams majority of my content has been about math related content in order to help me study. This content will be mostly about math for a while at least. Until i feel i can post more content like this. Now for the actual post.<br /><br />So once again i Prestige'd in COD Black Ops. This prestige round this time. I will mostly be using an assault rifle, with extended mag. Any pistol with extended mag. For grenades frag and concussion. Claymore for fun. For perks, lightweight, hardened, hacker. my objective this prestige is to be as big of a meany as possible and shoot people through walls. Shooting people through walls is the most important part of this prestige hence the perk hardened. I have had so much fun today aiming at a wall and just shooting it. Managing to pull of triple kill head shots and such. <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-7v-hebWq29U/TaKsU42Z_II/AAAAAAAAACY/HMw-Lt9r9Ak/s1600/4145608_f260.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-7v-hebWq29U/TaKsU42Z_II/AAAAAAAAACY/HMw-Lt9r9Ak/s1600/4145608_f260.jpg" /></a></div><br />Not my favorite prestige emblem. To be honest in game it looks like nothing but a blob. but whatever now I have something to work towards. That is changing it with the 5th prestige emblem.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/iLqwhF31jdw" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com31http://disposedcheese.blogspot.com/2011/04/4th-prestige-in-call-of-duty-black-ops.htmltag:blogger.com,1999:blog-1287857828427510484.post-90402281156461976442011-04-10T18:16:00.000-07:002011-04-10T18:16:42.839-07:00Rules of Inference and Basic ProofsThis is a small add-on to this post <a href="http://disposedcheese.blogspot.com/2011/03/propositional-logic-and-de-morgans-law.html">Propositional Logic and De Morgans Law</a> Knowledge of this post will be required for understanding this post. I am posting this as a hope that i will remember it for my Discrete Math Final Exam.<br /><br /><u><b>A rule of inference</b>:</u> is a rule that can be used in proving a theorem or some logic directly and polished. <br /><br /><b>Addition:</b> is you just add another proposition onto it using the Logical OR.<br /><br /><br />p = 'The sky is blue" <br />p v q = "The sky is blue or red"<br /> <br /><b>Simplification:</b> is you just subtract a proposition <br /><br />p ^ q = 2+2= 4 and grass is green<br />p = 2+2 = 4<br /><br /><b>Conjunction:</b> adding two separate propositions together.<br /><br />p = Grass is green.<br />q = Rome is in Italy<br />p^q = "Grass is green and Rome is in Italy".<br /><br /><b>Modus Ponens:</b> Basically the end result of an implication.<br /><br />P - > Q = "If I study, then i get an A".<br />Q = " I studied so i got an A"<br /><br /><b>Modus Tollens:</b> Basically the opposite of Modus Ponens. <br /><br />p - > q "If I go to the store, I buy milk" <br />~p = " I did not go to the store" Which means<br />~q = " I did not buy milk"<br /><br /><b>Hypothetical Syllogism:</b> Say this out-loud to sound cool.Visually you can see how this works.<br /><br />p -> q = "If i study, then i pass."<br />q - > r = " If i pass then i grad".<br />Therefore <br />p -> r = "If i study then i grad".<br /><br /><b>Resolution:</b><br /><br />p v q = " I will study or eat dinner".<br />~p v r "I will not study or go to the party"<br /><br />Therefore<br /> q v r = " I will eat or go to the party"<br /><br /><b>Disjunctive Syllogism: </b><br /><br />p v q = "I will study or I will eat"<br />~p = " I do not study"<br />q = "I will eat"<br /><br /><br /><u><b>Basic Proofs:</b></u><br /><br />Proofs usually involve implications. <br /><br />So two ways of solving these can be<br /><br /><b>Contra-positive:</b> p -> q this is equivalent to ~q - > ~p. So instead of proving p - > q. we test ~p - > ~q to see if this is true. If it is true then we know p - > q is true.<br /><br />Example:<br /><br />If n + 2 is odd, then n is odd. <br /><br />Suppose that "if n is even, then n + 2 is even"<br /><br />let n = 2k for some integer k. n + 2 = 2k + 2 = 2(k+1). Clearly 2(k+1) is divisible by two thus making it even. Therefore since the contra-positive is true then p -> q is true.<br /><br /><b>Contradiction:</b> This is a little more difficult. We want to prove that. p - > q is true and p -> ~q is true. <br />If both of them is true we go with the original as being true. For clearly both q and ~q cannot be true.<br /><br />Example:<br /><br />If n + 2 is odd, then n is odd.<br /><br />Assume that n is odd. Then n = 2L + 1 for some integer L. So n + 2 = 2L + 3. Which is odd. <br /><br />Suppose that If n + 2 is odd, then n is even.<br /><br />Let n = 2k for some integer k. Then n + 2 = 2k + 2. which means n is even. <br /><br />Since both is true, clearly if n + 2 is odd then n is odd is true.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/qVIOJy9Ud7Y" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com8http://disposedcheese.blogspot.com/2011/04/rules-of-inference-and-basic-proofs.htmltag:blogger.com,1999:blog-1287857828427510484.post-17239222251001317572011-04-10T00:14:00.000-07:002011-04-10T00:14:38.355-07:00Bam, Poison up in yo body!If you have not heard this yet, or you have and your confused as to where it came from. It is a line that it said in a Sims commercial and it's actually kinda hilarious. <br /><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowFullScreen='true' webkitallowfullscreen='true' mozallowfullscreen='true' width='320' height='266' src='https://www.youtube.com/embed/HTsxsYm4Sfs?feature=player_embedded' FRAMEBORDER='0' /></div><br /><br /><br />So i decided hey i enjoy hearing this guy talk in the commercial. The things he says is funny.So i decided I'm gonna make a really mediocre remix. So this is what i did. <br /><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowFullScreen='true' webkitallowfullscreen='true' mozallowfullscreen='true' width='320' height='266' src='https://www.youtube.com/embed/raR9N-wBVl0?feature=player_embedded' FRAMEBORDER='0' /></div><img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/WFtRIFBd9YQ" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com20http://disposedcheese.blogspot.com/2011/04/bam-poison-up-in-yo-body.htmltag:blogger.com,1999:blog-1287857828427510484.post-28594019684154041692011-04-08T11:57:00.000-07:002011-04-08T11:57:10.904-07:00Partial FractionsThis technique is very appropriate for integrals when you have some mess of a fraction with no hopes of being able to integrate it nicely.<br /><br />A partial fraction is just taking any fraction and breaking it up into smaller fractions that can later be added together to make the same original fraction.<br /><br />The first thing you must do to determine if you can do te partial fraction technique is see if your equation is a candidate for it. To do this you check if the degree of the numerator is less than the denominator. If it is not you have yourself an improper fraction and will need to do long polynomial division. Else you can begin doing the partial fraction technique.<br /><br />Example of an improper fraction<br /><br />2x^3 + x^2 -10 <br />----------------- <----degrees are the same<br /> x^3-3x-2 <br /><br /><b>Now to create your partial fraction:</b><br /><br /><b>***Important********</b><br /><b> </b><br />These are the forms your broken up fraction will either be. These are in a sense your formula. <b></b><br /><b><br /></b><br /><b> A Bx + C</b><br /><b> -------------- ---------------------- </b><br /><b> ( x-a)^k (x^2 + bx + y)^k</b><br /><b><br /></b><br />Where a , b, y are some values. Where k is some exponent.<br /><br />1. If the denominator contains linear fractions. Factor them out. <br /><br /> 5 5<br />----------- = -----------<br />x^2+x-6 (x-2)(x+3)<br /><br />2. Use the formulas and break up your equation appropriately. <br /><br /> 5 5 A B <br />----------- = ----------- = ------------------ + --------------------- <br />x^2+x-6 (x-2)(x+3) (x-2) (x+3)<br /> <br /> <br /><br />3. Multiple both sides by the left <br /> <br />5 = A(x+3) + B(x-2)<br /><br />4. Takes the roots(the what the x's are) and plug them in to solve for A and B.<br /><br />x = -3, 2<br /><br />If x = -3 : 5 = A(0) + B(-5) = -5B; B = -1<br /><br />If x = 2: 5 = A(5) + B(0) = 5A ; A = 1<br /><br />5. we have found our A and B. So time to fill in our partial fractions for A and B.<br /><br /> 1 -1<br />------------------ + ---------------------<br /> (x-2) (x+3)<br /><br />There you this looks like something you could integrate much easier. Enjoy.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/sby6H2YmwRw" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com19http://disposedcheese.blogspot.com/2011/04/partial-fractions.htmltag:blogger.com,1999:blog-1287857828427510484.post-59800746130810627982011-04-06T18:55:00.000-07:002011-04-06T18:55:55.633-07:00C++ Final Exam Cheat SheetSo last minute my computer science professor decides to email the class. That we are allowed to bring in a one sided cheat sheet. So seeing as my this is my final exam and is worth 42% of my mark in the class. I decided it might be a good idea to create such a sheet full of info for ease. Last time i heard the exam would only have C++ on it and will deal with mostly classes. So i took a look at all my "class" notes and came up with this cheat sheet/program that goes through everything i learned on classes this semester.<br /><br />The program i created was rewritten extremely compressed and ugly to save space for future material i decide to put on it. At the moment though here is my cheat sheet.<br /><br />Source Code<br />----------------------------------------------------------------------------------------------------------<br /><blockquote>#include <iostream><br />using namespace std;<br /><br />class study<br />{<br />public:<br /> study(){x = 0,y = 0; n++;}<br /> study(int a, int b);<br /> void print(void);<br /> void displayN(void)const;<br /> friend study change(study obj){ cin>>obj.x; cin>>obj.y; return obj;}<br /> friend int area(study);<br /> study& operator+(study);<br /> study& setX5(void){this->x = 5; return *this;}<br /> study& sety10(void){this->y = 10; return *this;}<br /> friend ostream& operator<<(ostream &output, study &obj){output<<"("<<obj.x<<","<<obj.y<<")"<<endl; return output;}//stream overloading friend<br /> ~study(){x = 0; y=0; if(n!=0){cout<<"Object deconstruction"<<" Objects remaining = "<<n--<<endl;}}<br />private://methods in here called utility function<br /> static int n;<br /> int x;<br /> int y;<br />};<br />int study::n = 0;<br /><br />void study::print(void){cout<<x<<endl; cout<<y<<endl;}<br />void study::displayN(void)const{cout<<"The number of objects created is: "<<n<<endl;}<br />study::study(int a, int b){ n++; x = a; y = b;}<br /><br />int area(study obj){ return obj.x*obj.y;}<br /><br />study& study::operator+(study obj2){this->x = this->x + obj2.x; this->y = this->y + obj2.y; return *this;}<br /><br />int main()<br />{<br /> study obj1;//x = 0 , y = 0<br /> study obj2(2,4);//x = 2 , y = 4<br /> const study obj3(5,4);<br /> study *obj4 = new study(5,5);<br /> obj1.print();//output: 0 endl 0<br /> obj2.print();//output: 2 endl 4<br /> cout<<"The area of obj2: "<<area(obj2)<<endl;//object from area function gets deconstructed<br /> obj1 = change(obj1);//x = 6 , y = 5<br /> obj1 = obj1.operator+(obj2);<br /> obj1.print();// 8, 9<br /> obj1 = obj1 + obj2;<br /> obj1.print();//10,13<br /> obj1.displayN();//3<br /> //obj3.print(); won't work because const objs can only use const methods <br /> obj1.setX5().sety10();//cascading member list<br /> obj1.print();<br /> cout<<obj1<<endl;//use of operator overloading of <<. Method has to be a friend. ostream for output. istream for input.<br /> delete obj4;<br /> return 0;<br />}<br /></blockquote>--------------------------------------------------------------------------------------------------------------<br /><br />As you can see it is pretty ugly, but should really benefit me in terms of knowing the syntax of certain programing styles/commands.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/VhXcLe_u2qU" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com20http://disposedcheese.blogspot.com/2011/04/c-final-exam-cheat-sheet.htmltag:blogger.com,1999:blog-1287857828427510484.post-27972123051833676252011-04-05T23:07:00.000-07:002011-04-05T23:07:56.758-07:00The Area of bounded functions<b>The Area and Volume of bounded functions: </b><br /><b><br /></b><br />This is not the most informative blog, but for those who have a rough idea of whats going on should be able to grasp and understand the examples shown. <b><br /></b><br /><br />Find the area between <br />y = 2 - x^2 and y = (1/2)x.<br /><br />from x = 0 to x = 1 .<br /><br /><br /><br /><br /><img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPEAAAAlCAIAAAAcBphnAAAKtElEQVR4nO2caUwT0RbHbyCpCKamIEaiYnxhScSAaFERECOCBoEPQJCAgIAS4hIkhkUE17okokGjCElRKkEiIAE+gARZBBQUQTREVNailBZBVrXQdu77MC+Tee3MdKALUPh9mnvmLueW/9zeuecUAJdZRrcA8+3AMmpjYmIiPz8/KCiIyWTi7UABQ0PD+XJSC8xO0/X19bGxsSwWS0PeLKMK1dXV6enpPB4PgP/7s65bt+4HjpCQkPj4+PlyUgso0XRtba27uzuTyVy5cqWDg0Nubi6CIHIf2TILio6ODrk/0KNHj7BrgUCwZs2aoaEhrfulPajUmZ+fz2Awrl27NjAwMDQ05OjouHHjRgjhEtE0h8MxNja+dOkShLCnp8fe3t7Kymq+nVKOoqbxnD17VrcXaUih6a6uLkNDw7t37xK0WRqahhC+ePGCxWL9+fPnyJEjra2t6enp8+2Rcig0vRQWaUih6cjIyA0bNkgkEoI2JB/Z5OQkj8dTm2sLAJlMZm5uHhAQ0Nrairfz+fy6urr58ooaCk0vhUUakml6amrKwMCAbP5kH1lERMTg4KDaXFsYBAcHu7i4KNqjoqL+/PmjfX+UQqbpJbJIQzJNFxcXAwDKy8vl7Hw+PzU1FQCQmpoqFArlmly5ckVTbs4TQqHQ09Nz9erV09PTcrdKSkpu3749L15RQ6bpmJiYhIQE7fujfYg1nZCQAAAQCAT0O7K3t+/u7saKMpnsxYsXqnqnDKlUmpCQcP78eXd395ycHNQoFAoLCwtV7PnDhw/T09ORkZEikcjExCQvL0+uwsTEhKWlpYqjaAJCTS+dRRqSafrw4cMAALFYTLOXlpYWOzs7vOXp06ddXV2qeqeM9vZ2Z2dnCOHPnz/xp+Y3btz4/PmzKj1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PDzs6+urYidKM1X8/f1zc3NVHEWNkCVRaCHlZkFBqulZpSaOjIyYmZnhd+48Hk8L+dNkcDgcFfOnIY1MFXNzc7lj+IWA4mGCRlNuFiDEmjY2NsbO22kSERFRWVmJFbXzOxdChEIhRYyAPtSZKp2dnZ6enqqPonYUNa2ulJvFArGmt23bBiEUiURHjx69ePFiSEgIFvomo7+/n/BUUjdQzFS5efMmduq8oKAOgqiYcrMoIJi8TCbz8fGBEIaFhaHHF8XFxeHh4Ur7ys3NxWdR6wyKmSoSiQT7Nl9oUGha9ZSbRQHB5Ds7O69evQohNDU1RTNFRkZG1q5dS6c7LAqlMxBmqggEgomJiflyiRoyTVOk3OgYBJPncrnoP2TBkoOlUin99A9dQl2ZKtqEUNOLcSJzBkAILSwswsLC0LJUKvXz80NfKeawTusM6spU0T5yml68E5kz/9M0AKC+vr6/vz80NLSiogK9FxYWhv6skOZ+WpdQV6aKNiFMoliME1ERACFsa2tzdnY2MDCwsLDAJ9yIRKKgoKCkpKSgoCCl5x7LLLNA0PFHdpklyLKml9E1/gsVpY2imrBOqwAAAABJRU5ErkJggg==" /><br /><br /><br /><br /><br /> Now as seen above we use integration to determine this. Basically you find the integral of the equation shown and solve for the domain of it. Which in this case is x = 0 to x = 1.<br /><br />Now the example jumps right to the answer being 17/12. The actual steps behind the seen is<br /><br />= [ 2x - (x^3 / 3) - (x^2 / 4)] from x = 0 to x = 1<br /><br />=[ (2(1) - (1^3 / 3) - ( 1^2 / 4) - (2(0) - (0^3)/3 - 0^2 / 4) ]<br /><br />= [ 2 - 1/3 - 1/4 - 0 - 0 - 0]<br /><br />= [ 2 - 1/3 - 1/4] <br /><br />= [ 6/3 - 1/3 - 1/4] = [ 5/3 - 1/4] = [20/12 - 3/12] = 17/12 units squared. YAH!<br /><br />So after these steps we have found the area between these two functions from x = 0 to x = 1.<br /><b><br /></b><br /><b>Find the area:</b><br /><br />y = x^(1/3) , and y = x^3 from x = 0 to x = 2.<br /><br />First thing we should notice about this is that they intersect at x= 1. Therefore we need to split this up into two different integrals. One from x = 0 to 1, and the other from x = 1 to 2. <br /><br /><br /><br /><br /><br /><br /><br /><img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI8AAAAlCAIAAAD0hi1MAAAHfUlEQVRoge2bfUhTXRzHD5OGFiy2YWCsRQ+zIESzDAs1I3DJTAnyDU1XLpbRC0iky1B7MYycoZBWOKkhSxISlciGtZZW0svE+sOttHTS1qYua77g2st5/rgPe253d3rv3JzBPn/d+zv3/M737rudc885dwAG+HsA/hYQ4A/MZnNra2tOTg6NRnMtJedWb29vUVERnU73krYAWBQKRUNDg1QqBQDHmkXcUiqVSUlJNBotJCRk586dMpnM4XDgJgrgRdRqNWm3WltbqVTqlStXdDrd+Pj47t27N2zYACEMuOVrSLs1PDy8evXqGzdu4NQh4JbdbheJROfPn+dyuXV1daS0BiDtlkAgYLFYVqsVp44bt6anp6VSKXKs0+nS09MhhJOTkyEhIZ5I9jFarbanp8ffKvAh59bMzExwcHBxcTFuqTu3CgoKvn//jgm+ePHiwIEDyLFIJFq/fv0/BLh+/TrRO1sCQqFwdnZ2GRoiCzm32tvbAQBdXV2YuFarFYvFAACxWGwwGDBVLl26hLm+pqYmNjb2+fPnyGlMTIzJZPLsBnxBR0dHdXW1v1XgQM6tkpISAIBeryfeQHR09JcvX1zjer0+NDQUQqjT6RISEogn9CLuBlGz2RweHu4XSQtDzq2UlBQAwPz8PMHsKpUqKioKHRkcHLx79y6EcGRkhMViQQgbGxurqqpIifYWCwyiO3bsUKlUflGFi81mEwgEqampAID8/HzMJ4bvVmRkJKnH9IqKirNnz6Ij37594/F45eXlGRkZSE948ODBjx8/kpbvVdCDKIJQKBSLxf7SQxZ8S8LCwki5tXfvXolEssAF8/PzW7duJSfN22AGUYTKysrs7OwFatlstpiYGABAc3Mzpu7yg28JjUYj5RaDwXjy5Ak6MjMzgz6Vy+UnTpzwQJ93cQ6iTu7cubN9+/aFa2k0GiaTKZFIfv/+7Ut1i4N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bOy5c+eQ47dv31KpVHQpvlsMBsPhcJBqpqCgoLu72zOJ/mJoaIjH4/lbxR84HA7nJ//y5Us2m40uxXdr27ZtEEKj0Xj48OHy8vK8vDzMwpIrY2NjWVlZ3hC8fFRVVTlnUSuQwsLCq1evoiM4btnt9rS0NAghn8/v7OyEELa3tx89enTR7DKZDLPLtZKxWq3OPmcF8vjx48TERMzkB8etoaGhy5cvQwhDQ0OnpqYghCaTad26dUTa+PDhgzekLgd6vd5sNvtbBT7Pnj3bs2eP6/thOG5JJBLktUjnxo/NZiO+bBhgibS0tCQnJ//8+RNCqNVq0UUAQsjhcPh8PnJus9kOHTqEDHQe/LYCLAW73V5WVpaQkDAwMKBWq9VqdVlZGfqC/9wCAPT29o6NjeXn58vlcqSMz+d3dHRAwuNWgCXS19cHXEBfACCEAwMD8fHxwcHBHA4HvXxpNBpzcnJKS0tzcnIWfSYMsAwE/tvzNxFw62/iX0Sw3nmi5U8nAAAAAElFTkSuQmCC" /> <br /><br />= [ 3/4 x ^(4/3) - 1/4 x ^4] from x = 0 to x = 1<br /><br />= [ 3/4 (1) ^(4/3) - 1/4 (1) ^4 - 3/4 (0) ^(4/3) - 1/4 (0) ^4<br /><br />= 3/4 - 1/4 - 0 - 0 = 3/4 - 1/4 = 2/4 = 1/2 YAH!<br /><br /><img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR4AAAAlCAIAAAAbYRFbAAALkElEQVR4nO2caUwTzR/HJxiIaKwB4gsUMT4BTJQUjxoP1OJBVa4YuYxGPDCId4jRgsrhFY0cQaPgI6BUgkQMRI0XHoh4EA9AjREUFIq2lkugIGltu/N/sf/0qXsxPXeJ/bzanZmd/c43/e3O7vy2ANqxY8cKALYF2PmD9vb29evXi0SimTNnCoXChoYGthXZMRHjQkur1YrF4qSkpMDAwKKiIitp+psJCwuLi4uDEGIYlpSUNHPmTLYV2TGRIUKrqqoqMDCQx+M5OzvPnj07KytrwYIFEMLv37+7uLjYROHfRVZW1uXLl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yXY0NTUFBQWxreIP0NP8OG44B721MdShNX36dAjh06dPExISEP/Ks62tTb+SMFw4ceKEfrWKgzCn+XHccI57awMoQkun04WFhUEIBwcHMQxDX/0oLi4mf0TEWTQajX7qxUFQ0vw4azjHvbUNFGHT1NR05MiR/1oYs7CoX2jnPnK5HP0PNG0MYpof5KrhXPbWZlCETX5+vuH/M1pkzd4OOhZP87PDCgBC6OXltWHDBnxfq9WGh4cbvsOwh5bNsEaanx22+H9oAQCePn3a1tYWExNTUVHxRwt7aNkKK6X52WEFACF8+/btggULRo4c6eXlZZiHKpVKMzIyAAAZGRn6T5rt2LGDgv2iaMeOVbCHlh07VuF/6sMnNV3vMP0AAAAASUVORK5CYII=" /><br /><br />= [ 3/4 x ^(4/3) - 1/4 x ^4] from x = 1 to x =2<br /><br />= [ 3/4 (2) ^(4/3) - 1/4 (2) ^4 - 3/4 (2) ^(4/3) - 1/4 (2)^4]<br /><br />= 4 - 3/2(2)^1/3 - 1/4 - 3/4<br /><br />= 4.5 - 1.5(2)^1/3<br /><br />So add up the values of both these integrals to get<br /><br />. 5 + 4.5 - 1.5(2)^1/3 = 3.11 approximate units squared.<br /><br />This is how you find the area between two functions bounded. <br /><br /><b></b><img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/8jp-2ExA5DE" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com20http://disposedcheese.blogspot.com/2011/04/area-of-bounded-functions.htmltag:blogger.com,1999:blog-1287857828427510484.post-73481459598859805572011-04-03T22:38:00.000-07:002011-04-04T10:05:47.307-07:00Critical NumbersCritical numbers also know as critical points are numbers that can determine what is happening in the function using derivatives. Now that was poorly explained but i will demonstrate the uses. <br /><br />Lets find the critical points of the function f(x) = 3x^5 - 20x^3.<br /><br />Step 1:<br /><br />First find the first deriviative of f(x)<br /><br />d(f(x))/dx = 15x^4 - 60x^2 <br /><br />Step 2:<br /><br />Now set the derivative to zero<br /><br />f(x)' = 15x ^4 - 60x^2 = 0<br /><br />15x^2(x^2-4) = 0<br /><br />15x^2(x+2)(x-2) = 0<br /><br />so upon inspection we see that x = -2 , 0 , 2<br /><br />These x's are ciritical numbers.<br /><br />Plugging in these found critical points into f(x) our original function we get<br /><br />f(-2) = 3(-2)^5 - 20(-2)^3 = 64<br />f(0) = 3(0)^5 - 20(0)^3 = 0<br />f(2) = 3(2)^5 - 20(2)^3 = -64 <br /><br />These numbers determine where the function has a <b>local max</b> or <b>local min</b>.<br /><br /><b>Definition:</b><br /><br /><b>Local Maximum:</b> The point where the function has the high mountain or peak in the local area of the function. Being explained the point where y is equal to a high point of the function or possibly the highest point. <br /><b><br /></b><br /><b>Local Minimum:</b> The point where the function has a low valley or canyon. where y is equal to a lower point on the graph in the local area.<br /><br />Both definitions are terrible, but if you graph the function using graphing technology you will know what i am talking about.<br /><br /> A local maximum and local minimum can be determined if the critical points found from the first derivative are plugged into the function. Such that a<br /><br />local max can be found if f(x) > 0 . By plugging in the critical points of the first derivative.<br />local min can be found if f(x) < 0 . By plugging in the critical points of the first derivative.<br /><br /><b>Concavity</b><br /><br />concavity is just a fancy way of saying does the function at a point start to turn into a mountain or into a valley. Also known as concave up or down. <br /><br />To find concavity can be just as easy as finding the local min and max. Finding concavity is also another way of finding the local min and max. So you can really kill two birds with one stone by finding the second derivative. First find the second derivative of f(x).<br /><br />d^2(f(x))/dx^2 = d(15x^4 - 60x^2)/dx = 60x^3 - 120x<br /><br />So now all you have to do is plug in the critical points from the first derivative.<br /><br />f(x)'' = 60x^3 - 120x<br /><br />f(-2)'' = 60(-2)^3 - 120(-2) = -240 <br />f(0)'' = 0 (which tells us nothing, you'll see why)<br />f(2)'' = 240<br /><br />Just like the same way of determining the local min and max. This determines both that and concavity. <br /><br /><br />local max can be found if f(x)'' < 0 . By plugging in the critical points of the first derivative.<br />local min can be found if f(x)'' > 0 . By plugging in the critical points of the first derivative.<br /><br />concave down can be found if f(x)'' > 0 . By plugging in the critical points of the first derivative.<br />concave up can be found if f(x)'' < 0 . By plugging in the critical points of the first derivative.<br /><br />We know that the function is concave up at x = 2 and has a local min.<br />We know that the function is concave down at x = -2 and has a local max.<br /><br />As far as x = 0, this does not work for our rule/theorem. <br /><br /><b>Absolute extreme values</b><br /><br />Not so extreme. In a function there has to be a maximum value and a minimum value of the function. If the function was horizontal on a graph, there would be a tie for y = constant value.<br /><br />so far we know that <br /><br />We know that the function is concave up at x = 2 and has a local min.<br />We know that the function is concave down at x = -2 and has a local max.<br /><br /> Now to find the absolute max and min. We just need to know where the function is at it's highest and where it is at it's lowest point. <br /><br />So by comparison of all our values of critical points. We can see that our local min and local max are also are absolute min and absolute max. <br /><br />Easy right!<br /><br /><br /><b>Endpoint values:</b><br /><br /><b> </b>This is pretty much the simplest of all simple. Lets say our function f(x) was continuous between the closed interval of [ -5 , 5]. For the endpoint values all you do is plug in these numbers into your equation. <br /><br />If f(5) > f(-5) then 5 is an endpoint max else 5 is an endpoint min and -5 is an endpoint max.<br /><br />simple!<br /><br /><b>Point of Inflection</b><br /><br />A point of inflection is a point such that the function mirror's itself almost. Such a function is x^2 where a point of inflection is (0,0). You can determine a point of inflection easily. To do this you need to find an x such that the second derivative f(x)'' = 0. <br /><br />So for our second derivative. A point of inflection can be determined by x = 0. <br /><br />For f(0)'' =60(0)^3 - 120(0) = 0.<br /><br />A point of inflection is a point such that ( f(x)'' = 0 , f(x)) this is equivalent to ( 0 , f(0)) <br /><br />Where f(0) = 0.<br /><br />So our point of inflection is (0, 0). Which from observation of graphing technology makes sense. For the function mirrors itself at that point.<br /><br /><b>Conclusion : </b><br />Knowing these things can help you sketch a graph of your function or understand what your function is doing at certain points. Making them of importance.<br /><br />Well hopefully this blog helped you understand Critical points. Also i hope this helped me study for my calculus final exam.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/t61x-ezH-TU" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com13http://disposedcheese.blogspot.com/2011/04/critical-numbers-and-their-importance.htmltag:blogger.com,1999:blog-1287857828427510484.post-71487031766413522452011-04-02T19:13:00.000-07:002011-04-02T19:13:27.936-07:00Intermediate Value Theorem<b> Intermediate Value Theorem</b><br /><br />If f is continuous on the closed interval [ a , b] and K is any number between f(a) and f(b), then there is at least one number c in the interval such that f(c) = K.<br /><br />You can use this theorem to determine if a polynomial has at least one real root.<br /><br />To begin using this we first need to know if<br /><br />f(a) < 0 < f(b) or f(b) < 0 < f(a)<br /><br />If either of those cases are true. We know that there is a c in the closed interval such that f(c) = 0.<br /><br />As an example:<br /><br />we set f(x) = x^2 - 2. We will now test the function for some closed interval. Lets say [1 , 2]. Then lets test these numbers 1 and 2.<br /><br />f(1) = -1 < 0 and f(2) = 2 > 0.<br /><br />Therefore we know by the theorem that there exists a number c in the interval [1 , 2] such that f(c) = 0. <br /><br />Since f increases on [1 , 2], there is only one such number. This number we can see is the square root of 2.<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/v7sfDUr9-Ug" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com5http://disposedcheese.blogspot.com/2011/04/intermediate-value-theorem.htmltag:blogger.com,1999:blog-1287857828427510484.post-52887243181483998302011-04-01T05:11:00.000-07:002011-04-01T05:11:52.927-07:00April Fools Day and my 100th FollowerFirst of all i would like to mention it is April Fools Day.So to start off this morning for my house. I decided to pull the fire alarm, run into my significant others rooms. Scream Fire at the top of my lungs. Get them running outside half nude. To realize that it's ridiculously cold outside and that i just trolled them. So have fun trolls, play safe.<br /><br />Also on a side note Donal is my 100th Follower. His blog is http://songsyoucandanceto.blogspot.com/<br />At the moment he only has two posts. But damn are they ever songs you can dance to. <img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/k_Gt7dgLepY" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com15http://disposedcheese.blogspot.com/2011/04/april-fools-day-and-my-100th-follower.htmltag:blogger.com,1999:blog-1287857828427510484.post-43238528871363573092011-03-30T20:41:00.000-07:002011-03-30T20:41:27.598-07:00Mathematical Induction<b>Mathematical induction</b> is a method of <a href="http://en.wikipedia.org/wiki/Mathematical_proof">mathematical proof</a> typically used to establish that a given statement is true of all <a href="http://en.wikipedia.org/wiki/Natural_number" title="Natural number">natural numbers</a> (non-negative <a class="mw-redirect" href="http://en.wikipedia.org/wiki/Integers" title="Integers">integers</a>). It is done by proving that the <b>first</b> statement in the infinite sequence of statements is true, and then proving that if <b>any one</b> statement in the infinite sequence of statements is true, then so is the <b>next</b> one.<br />- Stolen from http://en.wikipedia.org/wiki/Mathematical_induction<br /><br />In my own words. Mathematical Induction is the concept of having a ladder that goes on to infinite. If you know that you can reach the first rung. Then odds are you are able to reach the next rung. If you can reach the "n-th rung", then you can touch the "n+1-th rung". <br /><br />I will show how this can prove various equations to show that they are true for all values of your variable. <br /><br />Ex.<br /><br />We will prove by Mathematical Induction that the equation <br /><br />1+2+...+n = [n(n+1)]/2 is true for all n > 0.<br /><br />So to start. Let p(n) be the propostion => 1+2+...+n=[n(n+1)]/2 <br /><br />Our objective is to show that p(1) is true(the first value that n can be), and that the conditional statement p(k) implies p(k+1) also denoted as p(k) -> p(k+1), is true for all k > 0.<br /><br />So we first need to show that the proposition p(n) is true for the very first value of n. In this case 1.<br />This step is called the Basis step. <br /><br />Basis Step: verifying that p(1) is true. As seen by inspection p(1) is true for <br /><br />1 = [1(1+1)]/2 = 1(2)/2 = 2/2 = 1 <br /><br />Since the basis step is true we move onto the next step called the Inductive step. This is where all the nitty gritty algebra comes into play. <br /><br />Inductive step: In this step, we assume that p(k) holds for an arbitrary positive integer k. That is we assume that <br /><br />1+2+...+k = k(k+1)/2 <br /><br />under this assumption, it must be shown that p(k+1) is true.<br /><br />To show that p(k+1) is true we first must find what p(k+1) is. <br /><br />p(k+1) => 1+2+...+(k+1) = ((k+1)[(k+1)+1]) / 2 = [(k+1)(k+2) ]/2<br /><br />(k+1)(k+2) / 2 is the equation that we will need to show for our next step . The next step we call the Inductive Hypothesis.<br /><br />Inductive Hypothesis: This was the hypothesis that if any value of n is true then n+1 must also be true. To show this we write the proposition p(k) as the following. <br /><br />1+2+...+k+(k+1) = k(k+1)/2 + (k+1) (we added (k+1) to both sides of this equation)<br /> <br />The idea in this step is to show that the left side can equal the same answer we determined in the Inductive step. <br /><br />So as the following working with the left side of the equation.<br /><br />= k(k+1)/2 + (k+1) <br />= [ k(k+1) + 2(k+1) ] / 2 (By adding the fractions, the 2 came from the base difference of 1 and 2)<br /><br /><br />= [k^2 + k + 2k + 2 ] / 2 (Textbook feels it's unnecessary to skip this step, i find it confusing without)<br /><br /><br />= [ k^2 + 3k +2 ] / 2 ( By factoring we get) <br /><br />= [ (k+1)(k+2) ] / 2 (which hopefully looks familiar) <br /><br />The answer is the same as the Inductive step. Thus proving the hypothesis correct. <br /><br />So by Mathematical Induction we know that p(n) is true for all positive integers n. That is we have proven that<br /><br />1+2+...+n = [ n(n+1) ] / 2 for all n>0. <img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/JR9yAAGmA3Y" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com8http://disposedcheese.blogspot.com/2011/03/mathematical-induction.htmltag:blogger.com,1999:blog-1287857828427510484.post-24152093810593664832011-03-29T19:30:00.000-07:002011-03-29T19:35:30.751-07:00My Halo 3 DueltageThis a montage that features myself(Annihilate)spelled(<span style="font-family: Times,"Times New Roman",serif;">Annihi</span><b style="font-family: Times,"Times New Roman",serif;">I</b><span style="font-family: Times,"Times New Roman",serif;">ate</span>) and my former MLG team mate Beware.<br />I hope you enjoy. <br /><br /><br /><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowFullScreen='true' webkitallowfullscreen='true' mozallowfullscreen='true' width='320' height='266' src='https://www.youtube.com/embed/AOWb587LW9M?feature=player_embedded' FRAMEBORDER='0' /></div><img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/hYu0XXi2f1Q" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com16http://disposedcheese.blogspot.com/2011/03/my-halo-3-dueltage.htmltag:blogger.com,1999:blog-1287857828427510484.post-44107468713977753982011-03-27T13:40:00.000-07:002011-03-27T13:40:42.520-07:00Limits and ContinuityLimits are fundamental for both differential and integral calculus. The formal definition of a derivative involves a limit as does the definition of a definite integral.<br /><br />The limit of a function(if it exists) for some x-value, a is the height the function gets closer and closer to as x gets closer and closer to a from the left and the right. Lets take a look at what that even means. <br /><br />The limit of the function f(x) = 3x + 1 as x approaches 2. When writing a limit we denote this as the following equation.<br /><br />lim f(x) = lim 3x+1.<br />x->2 x->2<br /><br />Now for such an easy limit we can plug in the number 2 and solve this limit. Plugging in the 2 we see.<br /><br /><br />lim f(x) = lim 3(2)+1 = 7 <br />x->2 x->2<br /><br /><br /> That the limit is 7. So as x approaches 2 from the left and right side. The limit of this function is 7.<br /><br /> Now your probably think well that's silly. Any function that's continuous you just plug in and solve for x. Now limits are important for functions with holes.<br /><br /><b>Definition of a Limit:</b><br /><br />lim f(x) exists if and only if<b><br /></b><br />x -> a<br /><br />1. lim f(x) exists<br /> x->a- (a from the left side) <br /><br />2. lim f(x) exists, and<br /> x->a+(a from the right side)<br /><br /><b>3. lim f(x) = lim f(x)</b><br /><b> x -> a- x->a+</b><br /><br />Number three is the most important. <br /><br /><br /><b>A function with an infinite limit and vertical asymptotes.</b><br /><br />f(x) <b>=</b> (x+2)(x-5) / (x-3)(x+1) This function has a VA at x = 3, x = -1<br /><br />So the lim f(x) = lim (3+2)(3-5) / (3-3)(3+1) = infinity as x will never reach 0 thus it heads closer to 0 <br /> x-> 3- x->3-<br /><br />for infinity. <br /><br />From the right side the limit will be negative infinity. Thus we know by the limit definition that the limit does not exist for x approaches 3.<br /><br /><br /><b>Definition of Continuity:</b><br /><br />A function is continuous at a point x = a if the following three conditions are satsified.<br /><br />1.f(a) is defined <br />2.limf(x) exists and,<br /> x-> a <br />3. f(a) = lim f(x)<br /> x->a<br /><br /><b>Limits to Memorize:</b><br /><br />lim c = c<br />x->a<br /><br />lim 1/x = infinity<br />x-> 0+<br /><br />lim 1/x = negative infinity<br />x-> 0-<br /><br />lim 1/x = 0 <br />x -> infinity(same for both - and + infinity)<br /><br />lim sin x/x = 1<br />x->0 <br /><br />lim cos x - 1/x =0<br />x->0<br /><br />lim (1+1/x)^x = e <br />x -> infinity<br /><br /><br /><b>Plugging and Chugging Limits:</b><br /><br />Any limit where it's continuous and straight forward.<br /><br />lim (x^2 - 10) = -1 <br />x-> 3<br /><br />lim 10/x-5= 10/0 if you get an answer that has any numerator thats not zero divided by zero. The limit <br />x - > 5<br /><br />does not exist.<br /><br />Now in the below case if you get 0/0 you have a real limit problem.<br /><br />lim (x^2 - 25) / (x - 5) = 0/0 which is undefined<br />x-> 5 <br /><br />undefined is not the limit. This is not the answer we are looking for. Four things we can do to find a limit that is undefined. Calculator, algebra, limit sandwhich, L'Hopitals rule.<br /><br />I will only show the algebra and L'Hopitals rule. I will not explain L'Hopitals Rule though. <br /><br /><b>Using algebra to solve for </b><br />lim (x^2-25)/(x-5) we can rewrite this by factoring (x^2 - 5) = (x-5)(x+5) knowing this we can <br />x-> 5<br /><br />divide out the (x-5) which leaves us with the equation lim x+5 = 10<br /> x->5<br /><br /><b>Using L'Hoptials Rule</b><br /><br />lim (x^2-25)/(x-5) = lim d/dx(x^2 - 25) / d/dx(x-5) = lim 2x = 10.<br />x-> 5 x->5 x->5<br /><br /><br /><br /><br /> <br /><br /><br /><br /><br /><br /><b> </b><br /><b><br /></b><img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/XlRsrFaXIPM" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com32http://disposedcheese.blogspot.com/2011/03/limits-and-continuity.htmltag:blogger.com,1999:blog-1287857828427510484.post-32801561525145469852011-03-25T19:37:00.000-07:002011-03-25T19:59:14.709-07:00Boolean OperationsIn computer science a Boolean is a primitive data type. This data type consists of whether something is True or False. In this blog 1 or 0.<br />//section (11.1) personal note<br /><br /><b>Definitions: </b><br /> <br /><b>The Boolean compliment: </b><br /> __ __ <br />The negation of a Boolean. Denoted as 1 or 0. Spoken as 1(bar) and 0(bar).<br /><br /> 0(bar) = 1<br />1(bar) = 0 <br /><br /><b>Boolean Addition:</b><br /><br />This works exactly like the logical operator OR.<br /><br />0+0 = 0<br />0+1= 1<br />1+0= 1<br />1+1 =1<br /><br /><b>Boolean Multiplication:</b><br /><br />This works exactly like the logical operator AND.<br /><br />0*0 = 0 <br />0*1 = 0<br />1*0 = 0<br />1*1 = 1<br /><br />As you can see zeros dominate in any multiplication<br /><br /><b>Example:</b><br />__<br /> 1 *(0+1) = 0 * 1 = 0 <br />(1+1)+(1+0) = 1 + 1 = 1<img src="http://feeds.feedburner.com/~r/ProgrammingAndVideoGames/~4/Z8lnQsq8Sr4" height="1" width="1" alt=""/>DisposedCheesehttp://www.blogger.com/profile/04057663730168285400noreply@blogger.com11http://disposedcheese.blogspot.com/2011/03/boolean-operations.html