tag:blogger.com,1999:blog-64314887942154657502024-03-12T19:46:12.829-07:00KAMRAN-UL-HAQUEKAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-6431488794215465750.post-45979950036455790392008-07-09T07:18:00.000-07:002008-12-08T15:40:22.157-08:00<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJKot5aAfyCbNlyEx-g6IBgNYFSdH0Zj9VbyoVK-nKZLLYprskLMD3_yax7YiGmxQg2LuFxGXJ8AiAj7NWWU5AAe1kXNL71AKF8piz-xEa4D8t8x0PkZRcFRIHPB7Rj71gE6xzSAOlwErp/s1600-h/MCP%20Certificate.jpg"><img id="BLOGGER_PHOTO_ID_5221018745267339762" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJKot5aAfyCbNlyEx-g6IBgNYFSdH0Zj9VbyoVK-nKZLLYprskLMD3_yax7YiGmxQg2LuFxGXJ8AiAj7NWWU5AAe1kXNL71AKF8piz-xEa4D8t8x0PkZRcFRIHPB7Rj71gE6xzSAOlwErp/s400/MCP%2520Certificate.jpg" border="0" /></a><br /><div></div>KAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.com0tag:blogger.com,1999:blog-6431488794215465750.post-20165080074398959362008-07-09T07:16:00.000-07:002008-07-09T07:17:59.110-07:00KAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.com0tag:blogger.com,1999:blog-6431488794215465750.post-79409116735121060432007-09-10T02:03:00.000-07:002007-09-10T02:09:13.177-07:00Microsoft Dynamics<strong><u>RECURSION IN AXAPTA</u></strong><br /><br />Axapta can handle recursive method calls and you can see the standard application making use of it in some places, for example in \Classes\ReqTransFormExplosion\treeBuildNode. But just deep can you go before it bugs out?<br /> <br />Let’s take a classic example of recursive programming: Towers of Hanoi.<br /> <br />The Tower of Hanoi puzzle was invented by the French mathematician Edouard Lucas in 1883. We are given three pegs and a tower of n disks, initially stacked in increasing size on one of three pegs. The objective is to transfer the entire tower to one of the other pegs, moving only one disk at a time and never a larger one onto a smaller.<br /> <br />The code to solve this puzzle is minimal, very intuitive – and recursive.<br /> <br />static void TowersOfHanoi(Args _args)<br />{<br /> void move(int _n,str _from, str _to, str _transfer)<br /> {<br /> if (_n > 1)<br /> {<br /> move(_n-1,_from,_transfer,_to);<br /> move(1,_from,_to,_transfer);<br /> move(_n-1,_transfer,_to,_from);<br /> }<br /> else<br /> print strfmt("%1 -> %2",_from, _to);<br /> }<br /> ;<br /> <br /> move(3,"Peg #1","Peg #3","Peg #2");<br /> pause;<br />}<br /> <br />The parameters instruct the function to move 3 discs from peg #1 to peg #3 and use peg #2 as a buffer.<br />The solution is to move n-1 discs to the buffer, the last (biggest) disc to the destination and then move the rest from the buffer to the destination. How do you move the rest from the buffer to the destination? Well, you move n-1 discs… you get the point.<br /> <br />Back to original question: How far can you go before it crashes? The answer is 400. Try it out. Change _n from 3 to 400 and run the job. No problem. It will take a long time to finish, so unless you really need to know how to move 400 discs, I suggest you interrupt with Ctrl+Break :-).<br />Now change _n to 401. It crashes almost instantly.<br />Each call to move adds one level of recursion (if _n > 1), so that’s 399 + 1 for the initial call = 400.<br /> <br />Btw: Don’t use info() for the output. You would run into a whole other limitation with the infolog.KAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.com1tag:blogger.com,1999:blog-6431488794215465750.post-73657975896972789042006-12-13T02:45:00.000-08:002008-12-08T15:40:22.392-08:00POSITION HOLDERS :) (from the Last)<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcd1McvpAaK1k2yD8di3EYtsn2HmegZRWQNxQBC-JA_6kWW_x6VVGAwFEABro188hUXkBEbYzNeO6Ky4zhhJvnGkBnJqWA0U784gQCBcF-TxfPQldqJaAw3cYFoJap84FSt3zAWSKOKCRp/s1600-h/CIMG3838.JPG"><img id="BLOGGER_PHOTO_ID_5007961555884443666" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcd1McvpAaK1k2yD8di3EYtsn2HmegZRWQNxQBC-JA_6kWW_x6VVGAwFEABro188hUXkBEbYzNeO6Ky4zhhJvnGkBnJqWA0U784gQCBcF-TxfPQldqJaAw3cYFoJap84FSt3zAWSKOKCRp/s400/CIMG3838.JPG" border="0" /></a><br /><div></div><br />YES!! We got Position 1st, 2nd and 3rd :pKAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.com0tag:blogger.com,1999:blog-6431488794215465750.post-57852104238481822022006-12-02T09:42:00.000-08:002008-12-08T15:40:23.204-08:00Me, My Friends and University<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh87s7IqBF5hwGFIhVsOaXLRl4QX02CM7Zg8i1_DpboRvOKEuUH7xX8BcS1bwIqYv3mFLqEIySpVtLqH2x5WMKHo_iyNxmxIzKilmxjfKwpX0DSn5GNKzJEwwAATaY3GsLPpFrx5mnyPAme/s1600-h/DSC03774.JPG"><img id="BLOGGER_PHOTO_ID_5003995764158047970" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh87s7IqBF5hwGFIhVsOaXLRl4QX02CM7Zg8i1_DpboRvOKEuUH7xX8BcS1bwIqYv3mFLqEIySpVtLqH2x5WMKHo_iyNxmxIzKilmxjfKwpX0DSn5GNKzJEwwAATaY3GsLPpFrx5mnyPAme/s320/DSC03774.JPG" border="0" /></a><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf8KvXGi4sSr1Ok1Nk16KXlWifLThKIuAS_o9djHNmZGp5QaxchIVO_jVsHi293uJCsThQnjwmFCphw66Jarh1_0fjlGxmSTyAr9HGNO_6ddjY6O-l5wKYo2kW-DWwNV1fP_bGfhCxKUBv/s1600-h/CIMG4093.JPG"><img id="BLOGGER_PHOTO_ID_5003994883689752274" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf8KvXGi4sSr1Ok1Nk16KXlWifLThKIuAS_o9djHNmZGp5QaxchIVO_jVsHi293uJCsThQnjwmFCphw66Jarh1_0fjlGxmSTyAr9HGNO_6ddjY6O-l5wKYo2kW-DWwNV1fP_bGfhCxKUBv/s320/CIMG4093.JPG" border="0" /></a><br /><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhejhQZt8tyPVT8b5GgANS9JX9pnktY9R7EjLuXDozSZkFJ0SI7hnGpZxGbAoqNIL_0P488kCNBdr72dXc0ZNo3CGnOwhL0OOkPVu2OILDVzhv_x6jj03pTsjysAlJEh7dGS3nTQpvsrAkT/s1600-h/CIMG4099.JPG"><img id="BLOGGER_PHOTO_ID_5003994153545311938" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhejhQZt8tyPVT8b5GgANS9JX9pnktY9R7EjLuXDozSZkFJ0SI7hnGpZxGbAoqNIL_0P488kCNBdr72dXc0ZNo3CGnOwhL0OOkPVu2OILDVzhv_x6jj03pTsjysAlJEh7dGS3nTQpvsrAkT/s320/CIMG4099.JPG" border="0" /></a><br /><br /><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrTFcVvuuxQZNlqwZvn7qS4kK1EPbuvDMsjjiaZ0Xj0EEq8OiDxzXQgiOZVyEZDDVnFDesueeZw_p9T3lds-UvipA7hQSEuZoDTLr2iJUE6yTPiszyHooVrhi7VLNUqlgIS9au-LRs2J9N/s1600-h/CIMG4024.JPG"><img id="BLOGGER_PHOTO_ID_5003993419105904306" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrTFcVvuuxQZNlqwZvn7qS4kK1EPbuvDMsjjiaZ0Xj0EEq8OiDxzXQgiOZVyEZDDVnFDesueeZw_p9T3lds-UvipA7hQSEuZoDTLr2iJUE6yTPiszyHooVrhi7VLNUqlgIS9au-LRs2J9N/s320/CIMG4024.JPG" border="0" /></a><br /><br /><br /><br /><div><em>the pictures of me and my friends, refreshes the sweet memories of my NED University, my second home...........</em></div></div></div></div>KAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.com1tag:blogger.com,1999:blog-6431488794215465750.post-61125425755173960162006-11-25T08:30:00.000-08:002006-11-25T08:35:39.928-08:00ACADEMIC PROJECTS<ul><li>An Intelligent graphical solution of Towers of Hanoi in Turbo C++ using Object Oriented Paradigm. </li></ul><p> </p><ul><li>Designed an ATM Banking system with backend tool Oracle and front end Forms Developer6i. <br /></li><li>Designed a website which handles Online Result Management System using ASP.net and DreamweaverMX.<br /></li><li>Designed Fingerprint Recognition System (biometrics) in JAVA.<br /></li><li>Working on e-Election Management System of Pakistan. </li></ul>KAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.com0tag:blogger.com,1999:blog-6431488794215465750.post-2444309910084538132006-11-25T08:25:00.000-08:002006-11-25T08:30:12.281-08:00Achievments<ul><li><em>Represented BCIT at Code Run 2006 (NED Karachi) in programming Competitions. </em></li></ul><p><em></em> </p><ul><li><em><strong>4th Position</strong> at SPARC 2005 (Muhammad Ali Jinnah University) in Programming Competition.</em></li></ul><div align="left"> </div><ul><li><div align="left"><em><strong>1st Position</strong> in SENTEC 2006 Software Competition and Science Fair Conducted in </em><em>NED University of Engineering and Technology</em></div></li></ul>KAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.com0tag:blogger.com,1999:blog-6431488794215465750.post-1623865860793232922006-11-18T06:46:00.000-08:002006-11-18T06:51:08.915-08:00About MyselfMy Name is Kamran-Ul-Haque, Born in 05, February 1985. I am a Computer Science Graduate from NED University of Engineering And Technology, Karachi (BATCH : 2002-2003).KAMRAN-UL-HAQUEhttp://www.blogger.com/profile/01866194369572768112noreply@blogger.com0