Jump to content
xisto Community

turbopowerdmaxsteel

Members
  • Content Count

    460
  • Joined

  • Last visited

Everything posted by turbopowerdmaxsteel

  1. To do that you have to edit the template files (header.php, index.php, footer.php, siderbar.php) for the theme. It might be a bit tricky to get started, but by experimenting with small modifications on your local host, you should be able to easily do whatever you like.
  2. Well, there are a lot of themes to choose from not to mention the huge array of plugins for wordpress. Wordpress Themes: https://wordpress.org/themes/ Wordpress Plugins: https://wordpress.org/plugins/ You might as well want to create your own theme to add that personal touch to your blog. Check out https://codex.wordpress.org/Theme_Development for details on how to do it.
  3. Even though I am 200 odd credits short, I am hopeful of grabbing this opportunity by working overtime. I wonder how soon the offer will reach Xisto.
  4. Just patched the version to suite your needs. You can get it from http://forums.xisto.com/no_longer_exists/ Thanx, Nice Idea. I'll try to implement it.
  5. You are correct. I didn't imagine that 7-Zip could achieve better compression ratios than Win Zip, despite using the same compression algorithms - BZip 2 & PPMD. It also beats the RAR format with the LZMA format. Here goes the statistics:- 7-Zip BZip 2 --> 41.9 7-Zip PPMD --> 39.5 7-Zip LZMA --> 37.2 7-Zip Solid BZip 2 --> 41.0 7-Zip Solid PPMD --> 37.7 7-Zip Solid LZMA --> 33.2
  6. I've got to attribute it all to a software named Webshots Photo Downloader which could be used to automate the process of downloading wallpapers from the Webshots gallery. Even though a bit buggy, that software to me was really revolutionary with its Web Browser simulation technique. It was built in VB and I tried to decompile it inorder to overcome its shortcomings. Although, all I managed to get was the code for the user interface. Despite failing, I did have a vague idea of its working and I managed to create the Webshots Photo Downloader of my own. Since, then I have created a number of such applications, including the Photo Downloader and the Topic Signature script (currently in alpha) which I've used to generate my signature image, based on the same browser simulation technique. Next, I plan to make a software that would allow users to automate such processes without having to write codes. I did show it to m^e who was quite impressed. But, I don't know if they would want the script to be put on the site; not when they can do the job with greater ease and lesser problems, by directly accessing the forum database.
  7. The script has now been updated with the following changes:- > Added new technique to search for hosted members. > Validates link address and only shows the links if the link appears valid. > Patched Non Internet Explorer browser bug - Non IE Browser will show site status as text instead of the Green and Red images. > Improved Overall Speed of operation. View Script
  8. Thanks for the feedback. It is not necessary for me to be logged in to the forum. The script seems to hang once in a while because of relying heavily on Java Script. Pure HTML, I should say. I'll make sure to do that.
  9. Basically, it simulates browser activity, navigates through the forums and grabs the names of the members along with the site address. Not all of the Hosting requests are properly structured and moved to the APPROVED ACCOUNTS forum. As a result, many users are not listed. In your case, the approved request does not exists under the approved accounts forum. Another technique I employed was to get the list of all the hosted members through the memberlist panel and look for their account request posts. Actually, that was the prototype to the current directory listing process. It can be accessed at http://forums.xisto.com/no_longer_exists/
  10. I wanted to grab a look at how the other members' sites looked. Searching through the forums is good enough to retrieve the address of their websites. However, quite a few of the links are dead. So, I decided to make a script to do this job for me. Here's a screenshot of the directory listing process. Xisto Directory Lister
  11. I don't have much idea about that but from what I have seen:- It seems to me like you will have to wait for a while. You might consider building some decent amount of credits before the excellent service is fully at your disposal.
  12. Yes, inorder to use forum.urban-threads.info/forum, I believe you need to create subdomain first. While, by default urban-threads.info/forum would be the one you'll be working with. By the way, make sure to replace the default index.html file under www or public_html. If you want your forum to be accessed as http://forums.xisto.com/no_longer_exists/ then just upload VB to the www folder and not under www/forums.
  13. I presume you are confused by the folders you see in your Xisto account, namely - .cpanel-datastore, .fantasticodata, .htpasswds, .trash, _notes, downloads, etc, mail, public_ftp, public_html, tmp, www Well, any folder under public_html will be accessed as yoursubdomain.astahost.com/foldername/ or yoursubdomain.yourdomain.com/foldername/ You can also use the shortcut folder www which basically points to the public_html folder.
  14. Ideally, applications connected in parallel circuit should not cause a drop in voltage when one of them is switched ON or OFF. As I mentioned before, most places in the subcontinent nations have poor supply of electricity, be it the local transformers or the wirinngs themselves. These render the power supply a nightmare for computers. You should use seperate wirings for those machines. The lesser is the load on the UPS, greater is the chance that it will stay put on power cuts. I don't think the Hard Disk is as big a factor as the printers and the copier.
  15. At the time I made those earlier statistics, I didn't try the RAR compression format. Check out the latest statistic on Panda Anti Virus 2007. I have covered most of the formats there. 7zip is basically a format to store the compressed files in, it doesn't have a compression algorithm of its own. Yes. I presume they figured that having a trial version out would've left them at the mercy of the crackers. I don't believe they have a completely automated process to package the setup. I have heard that they take the setup files from the vendors, study the files, apply appropriate compression to the files (like UPX for EXEs & LZA for text files), reduce size overhead due to duplication by having only single compressed code for such files. Yeah, I have read that article on how they might have just re-named the header of the UPX format.
  16. The problem is related to the power supply of your area, a common problem in the subcontinent nations. Quite often, the earthing provided by the electricity board isn't there at all. Switching heavy appliances on and off result in major voltage drops, which is often too much for the poor UPS to bear. Getting rid of the problems is almost impossible, unless off course you plan to use a generator for the household power supply. However, you can surely reduce the number of bad shutdowns by following certain tricks that I discovered. Reduce the load from the UPS by removing printers, speakers or any other hardware that are not vulnerable to power surges. You might also remove the Monitor from the UPS considering that its a 17 inch one and you have a heavy dual core processor. Off course you'll not be able to see anything on the monitor during power cutoffs. Assigning the shutdown action to the power button is a good way out. Better still, use hibernate to save both time and your work. Unless the voltage is too low for the Computer to operate, you shouldn't use additional voltage regulators. Most UPS these days have an in-built Automatic Voltage Regulator. When using the regulators, the fluctuations are amplified. A 5 Volt fluctuation may cause a 30 volt effect on the UPS. When the voltage in our area used to be extremely low, I used 2 - 3 additional regulators (connected in series) to get to the desired voltage output. But, just imagine the fluctuation in that case. The bad shutdown probability is highly dependent on the load your CPU is in. When playing high-end games, you are most likely to get restarts. So, run your applications carefully. Play games at late nights or early mornings, when the overall load on the local transformer is low. Upgrade to a single high capacity drive. It isn't worth to have 2 80 GB Hard Disks draining double power when you can get a 160 GB for just a modest amount of price. I have had problems with a 550 watt SMPS on my 3.0 HT processor and 350 surely isn't enough for your system. Also choose the SMPS carefully, brand does matter. I don't think these will completely solve your problem, but they sure can help decrease it.
  17. Panda Internet Security has done it again. They have continued with the FEAD Optimizer they employed in the 2006 edition of their product. The FEAD optimizer seems to have been upgraded as the new version finally has the cancel button which was painfully lacking on the previous one. Also comes the handy ability to pause the recomposition process. As before I'll offer the same compression statistic:- Panda Antivirus Titanium 2006 Total Files---> 289 Total Size---> 90.6 MB Portable Zip---> 45.2 MB Enhanced Deflate---> 44.6 MB Bzip 2---> 43.9 MB PPMD---> 40.7 MB RAR (Good) ---> 38.9 MB RAR (Best) ---> 38.9 MB LZX---> 38.0 MB RAR (Good + Solid) ---> 36.1 MB RAR (Best + Solid) ---> 36.0 MB FEAD---> 28.7 MB
  18. There were better Speech recognition softwares than what Microsoft had to offer. At least when I was very much into that technology. If I recall correctly, there was this Dragon Speech Recognition software which was very famous in our area. After going through lots of sample reading, the recognition accuracy reached commendable heights. It was then that I realized the problems the process has to face. The amount of noise exponentiates the performance issues. Although rarely a factor, because of work areas being relatively calmer. Another factor is the quality and type of the microphone. A poor quality microphone has the same effect as noise. Headset Microphones are the best since they maintain the distance between the mouth and the Mic which is harder to accomplish on the desktop ones. These problem can be taken care of, but the others pertaining to our own voice are difficult to. Often, the software would recognize speech very well. Especially after it has just finished analyzing your voice based on the sample reading. Come back an hour later and it would all go bonkers. I guess it was due to the fact that the pitch, tone & style of my voice changed during the interval. I am not sure if this happens to others, but this for me was the greatest drawback in such systems. As more and more research is done, we will head to the age when keyboards will become an extinct technology. No No , You posted that thing before me, while I was denied by "Some Files are Missing Error".
  19. Encapsulation & Abstraction Two concepts that go together in the object oriented approach are Encapsulation & Abstraction. Abstraction is the representation of only the essential features of an object, while Encapsulation is the hiding of the non-essential features. Think of a person driving a car. He does not need to know the internal working of the engine or the way gear changes work, to be able to drive the car (Encapsulation). Instead, he needs to know things such as how much turning the steering wheel needs, etc (Abstraction). Consider the example from the programmerâs perspective who wants to allow the user to add items to a list. The user only needs to click a button to add an item (Abstraction). The mechanism of how the item is added to the list is not essential for him (Encapsulation). Below is a graphical representation of Encapsulation for the car class. Implementing Encapsulation & Abstraction Consider the countless advertisements being bombarded to viewers. The viewer does not listen to each one of them, rather only those heâs curious about. We use access specifiers to restrict the scope (visibility) of the class members. Types of Access Specifiers public - The members (Functions & Variables) declared as public can be accessed from anywhere. private - Private members cannot be accessed from outside the class. This is the default access specifier for a member, i.e if you do not specify an access specifier for a member (variable or function), it will be private. Therefore, string PhoneNumber; is equivalent to private string PhoneNumber; protected - Protected members can be accessed only from the child classes. internal - Internal members can be accessed from anywhere within the application. This is the default access specifier for a class. Both these classes are equivalent. class MyClass{} internal class MyClass{} protected internal - Similar to protected, protected internal members can be accessed from the child classes but only within the application.Note: The members are always accessible to its own member functions, irrespective of the access specifier. Lets see an example:- class House{ // Data Members public string DrawingRoom; private string Kitchen; // Member Functions private bool EnterDrawingRoom() { DrawingRoom = "The Drawing Room"; } public bool EnterKitchen() { Kitchen = "The Kitchen"; /* Even though Kitchen is declared Private, EnterKitchen function can modify it because the member function itself has access to all other members. */ }} class MainClass{ public static void Main() { House TheBlackHouse = new House(); TheBlackHouse.DrawingRoom = "Main Drawing Room"; /* OK - Public Data Member is accessible from outside the class */ TheBlackHouse.Kitchen = "Main Kitchen"; /* Error - Private Data Member is not accessible from outside the class. */ TheBlackHouse.EnterDrawingRoom(); /* Error - Private Member Function is not accessible // from outside the class. */ TheBlackHouse.EnterKitchen(); /* OK - Public Data Member is accessible from outside the class. */ }}Lets study the code. Inside the main function we declare an object TheBlackHouse of the House class. Thereafter, we set the value of the data member DrawingRoom for TheBlackHouse to "Main Drawing Room". Since, DrawingRoom is declared as public, the above step works without any error. On the next line, TheBlackHouse.Kitchen = "Main Kitchen"; we are trying to assign the value "Main Kitchen" to the Kitchen variable of TheBlackHouse object. However, Kitchen is declared as private. Hence, this step generates an error. In the next line, we are trying to call the private method EnterDrawingRoom for the object. This generates an error as well. Finally, we are calling the EnterKitchen function which is declared as public. Notice that inside the EnterKitchen function, we are assigning the value "The Kitchen" to the private variable Kitchen. This does not generate an error because the EnterKitchen method belongs to the same class and it has access to all the members inside the class, irrespective of the access specifier. Why do we need Encapsulation & Abstraction? Programming is all about concepts, different from coding where we basically translate the logic to language specific codes. When given a problem statement, there might be a number of ways to solve it. The logic devised to solve it will depend of the programmer. What we must learn to implement is the most efficient approach; efficient in terms of time, memory & cost. Object oriented methodologies such as these are what allow us to maintain efficiency. By using encapsulation & abstraction, we reduce complexity by ignoring unimportant details and we maintain effectiveness by representing important ones. Previous Tutorial - Lesson 4 - Object Oriented Programming Next Tutorial - Lesson 6 - Creating Value Types & Reference Types - Part I Lesson: 1 2 3 4 5 6 7
  20. To tell you the truth, I haven't had an Anti-virus for quite some time. Its all because of the performance issues associated with any anti-virus system. I multitask quite a lot and during coding times, running more than 10 heavy applications is not uncommon. The 512 MB DDR is just not capable enough for smooth performance with them and the anti-virus running together. Although, once in a while (2 - 3 months), I do install an anti-virus, but only for doing a full PC scan.The thought of having my PC infected by the spy-wares that you speak of, is really frightening.
  21. Object Oriented Programming Object Oriented Programming is a methodology modeled on real life. It comprises of the basic unit, an object, being used in implementing a program. Think of all the objects around you - cars, buses, birds, trees, etc. You will find countless ones of them, everywhere you go. In order to tackle this huge number, we started classifying them, thus came the term Class. Class A class is a composition of the theoretic characteristics (attributes and properties) of an object and the things it can do - behaviors, methods and features. Take the Car as an example. Its characteristics can include speed, color, number of gears, etc and it exhibits behaviors such as accelerate, brake and gear-change. Object An object is an instance of a class. Consider the Car class above, the Aston Martin that was used in the movie - Die another Day is an object of the car class. One point to note is that each object has at least one attribute that makes it unique. Message Passing Objects do not exist in isolation. They interact with other objects. These interactions take place through messages. Message passing is the process by which an object (sender) sends data to another object (receiver) or asks the other object to invoke a method. Thus, each message has a sender and a receiver. Behavior It is how an object acts and reacts, in terms of its state changes and message passing. For example, when the driver applies the break, the car comes to a stop. This was all about the object oriented methodology. Now, let us take a look on how OOP is used in C# Declaring Classes We declare classes using the following syntax:- class < Class Name > { data members⦠member functions⦠} Here class is a keyword. Class name can be anything that follows the naming rules. Rules for naming classes A class name must begin with a letter & can be followed by a sequence of letters (A-Z), digits (0-9) or underscore (_) Special Characters such as ? - + * / \ ! @ # $ % ^ ( ) [ ] { } , ; : . cannot be used in the class name. A class name must not be the same as a reserved keyword such as using, public, etc. Conventions for naming classes Class Name must be meaningful, ideally a noun. Naming of classes can be done using either the Pascal case, where the first character is capital and the rest are in small letters or using the Camel Case in which the first letter is in small case but the first letter of each successive word is in caps. Example:- Pascal Case: Classone Camel Case: classOne The conventions are not mandatory but best practices, abiding by which allows others to easily understand our code. Data members are the variables or other objects declared inside the class while member functions are the functions declared in it. Example Class:- class Student{ // Data Members public string Name; public int Age; // Member Function public void Display() { Console.WriteLine("Name {0}\n Age {1}", Name, Age); }}The public access specifier has been used in order to allow the data members & functions to be visible from outside the class. The access specifiers will be explained in the forthcoming tutorials. Declaring & Instantiating Objects Creating objects is similar to declaring variables and can be done using the syntax:- <Class Name> <Object Name>; Example: Student S1; Before we start using the object, we need to instantiate it. Instantiation involves memory allocation and other basic initializations contained in the objectâs constructor. We use the new keyword to instantiate objects. The syntax for which is given below:- Note: Constructor is a special member function of a class that is used to initialize the data members. It will be dealt with, in later tutorials. <Object Name> = new <Class Name>; Example Usage: S1 = new Student(); These two steps can be done in a single line of code as Student S1 = new Student(); Using the Objects We use the . (Dot) operator to access the members of the object. For example, to call the display method for the student classâs S1 object we write S1.Display(); Data members can be accessed in the similar fashion S1.Name = “Kenshin Himura”; Releasing Memory To release the memory occupied by the object we use S1 = null; Example Program:- using System;namespace CSTutorials{ class Student { // Data Members public string Name; public int Age; // Member Function public void Display() { Console.WriteLine("Name {0}\n Age {1}", Name, Age); } } class Program { static void Main(string[] args) { Student S1; // Declaration S1 = new Student(); // Instantiation Student S2 = new Student(); // Single line Declaration & Instantiation // Assigning value to member variables S1.Name = "Michael"; S1.Age = 37; S1.Name = "Kimi"; S2.Age = 25; // Invoking member function S1.Display(); S2.Display(); Console.ReadLine(); } }} Benefits of Object Oriented Programming Realistic Modeling: Living in a âWorld of Objectsâ, the model built on real life is a much better approach because it allows issues to be tackled with greater accuracy. Re-usability of code: Think of a scenario where a car making company specialized in two seaters decides to launch a four seater model. Converting the two seater model to a four seater is easier than designing a new model altogether. Resilience to change: Being compartmentalized, individual objects can be improved without having to re-package the entire software. Polymorphism: The behavior of an object can depend upon the state its in, thus exhibiting Polymorphism. Consider a car colliding with a wall. The impact of the process would depend upon the approach speed of the car, the Angle it strikes in, the strength of the wall and so on. If two cars were to collide, the results would be much different, with both of them receiving considerable damage. Previous Tutorial - Lesson 3 - Programming Constructs Next Tutorial - Lesson 5 - Encapsulation & Abstraction Lesson: 1 2 3 4 5 6 7
  22. Conditional Branching By branching we imply, having different paths for execution. Conditions are used to determine which statements need to be executed. Suppose, you have a program to store the details of employees. Depending upon the post of the employee, there would be various fields associated with it. A department head, for example, would have a property denoting the department he heads, etc. We use conditional branching in such a scenario. C# provides the following conditional constructs:- if .. else Syntax:- if ( < condition > ) { statements } else { statements } The else part is optional and can be omitted. The working of if .. else construct is very simple and follows the pattern - If this is true Iâll do that or else Iâll do something else. The statements included within the if block are executed when the condition specified in if, is true, otherwise the statements inside the else block are executed. In case, there is no else statement, the execution flow continues to the proceeding statements. Hereâs an example:- Console.WriteLine("Enter your age:");int Age = Convert.ToInt32(Console.ReadLine());if (Age < 18){ Console.WriteLine("You are not permitted in here.");}else{ Console.WriteLine("You may come in.");} Lets step through the code. Line 1 displays a message Enter your age. At line 2, the age entered by the user is read using ReadLine() (as a string) and converted to an integer using the ToInt32 function. Finally the value is stored in the integer variable Age. When the execution reaches line 3, the expression inside if is evaluated. If the user supplied an age less than 18, the execution flow would move to line 5 - Console.WriteLine("You are not permitted in here."); and the message You are not permitted in here would be displayed. In the other scenario, when the age would be either equal to or greater than 18, line 7 would be executed and the message You may come in will be displayed. The condition inside the if statement can be composed of a complex expression chained by the logical operators. For Example:- Console.WriteLine("Enter your age:");int Age = Convert.ToInt32(Console.ReadLine());Console.WriteLine("Are you with your guardian? (True/False)");bool WithGuardian = Convert.ToBoolean(Console.ReadLine());if ((Age < 18 ) && (WithGuardian = false)){ Console.WriteLine("You are not permitted in here.");}else{ Console.WriteLine("You may come in.");} At line 4 the user's response of whether he/she is with a guardian would be stored inside the boolean variable WithGuardian. Notice that ToBoolean function is used to convert the input to boolean (True/False) value. At line 5, the complex expression will be evaluated. The expression is made up of two sub-expressions: Age < 18 and WithGuardian = false. These two expressions are joined with the logical AND operator (&&). Therefore, when both of the expressions amount to true, the entire expression would evaluate to true and the message - You are not permitted in here will be displayed. For any other combination, the final expression would be equivalent to false and the message - You may come in will be displayed. A number of conditions can be chained by using else if as follows:- Console.WriteLine("Enter your salary");int Salary = Convert.ToInt32(Console.ReadLine());if (Salary > 250000){ Console.WriteLine("Welcome Mr. CEO");}else if (Salary > 200000){ Console.WriteLine("Welcome Mr. Chairman");}else if (Salary > 0){ Console.WriteLine("Welcome Programmer");}else{ Console.WriteLine("Welcome dear Customer");} In this case, if the salary supplied by the user is greater than 250000, the message - Welcome Mr. CEO will be displayed otherwise if the Salary is greater than 2000000 then the output will be Welcome Mr. Chairman else if the salary is greater than 0, the message - Welcome Programmer will be displayed. For any other value (Salary less than 1), the statements inside the else block would be executed and Welcome dear Customer will be the output. switch .. case Construct Switch case facilitates easy branching when the condition is pertaining to a single expression. Each supplied Value is preceded by a case construct. Syntax:- switch (< expression >) { case Expression_1; statements break; case Expression_2; statements break; âŚ. } break is a C# keyword, which is used to exit the body of a switch, for or while loop. Equivalent to the else construct is the default case. Statements within the default case are executed when no other condition holds true. Example:- Console.WriteLine("Enter the month (mm)");int Month = Convert.ToInt32(Console.ReadLine());switch (Month){ case 1: Console.WriteLine("January"); break; case 2: Console.WriteLine("February"); break; case 3: Console.WriteLine("March"); break; case 4: Console.WriteLine("April"); break; case 5: Console.WriteLine("May"); break; case 6: Console.WriteLine("June"); break; case 7: Console.WriteLine("July"); break; case 8: Console.WriteLine("August"); break; case 9: Console.WriteLine("September"); break; case 10: Console.WriteLine("October"); break; case 11: Console.WriteLine("November"); break; case 12: Console.WriteLine("December"); break; default: Console.WriteLine("There are only 12 Months."); break;} Depending on the value entered by the user (1-12), the appropriate month will be displayed. For any other value, the default case will be executed and the message There are only 12 Months. will be displayed. Multiple Values can be made to lead to the same block of statements by excluding the break statement. Console.WriteLine("Enter a number (1-10)");int Num = Convert.ToInt32(Console.ReadLine());switch (Num){ case 2: case 3: case 5: case 7: Console.WriteLine("The number is prime."); break; case 1: case 9: Console.WriteLine("The number is odd."); break; case 4: case 6: case 8: Console.WriteLine("The number is Even"); break; default: Console.WriteLine("The number is not in range."); break;} Looping A Set of instructions that are repeated is called a loop. Suppose you want to print numbers from 1 - 10. You could do that using Console.WriteLine statement for each of the 10 numbers. But, what if you had to print numbers from 1 - 1000? Using the computerâs iterative power is a much better approach. C# supports 3 kinds of loops which are discussed below:- The for loop This loop is generally used for arithmetic operations, where we are aware of the starting and end point of the loop. Syntax of for loop is as follows:- for(< initialization >;< condition >;< increment/decrement >) { statements } To print numbers within a range, say 1 - 1000, we declare a counter variable (preferably single character variable like I), initialize it to the starting number (1) and keep incrementing its value by 1 until the number exceeds the end point (1000). Off course, we would have the body of the loop where the operation would be done, in this case, displaying the numbers on screen. for(int I = 1; I <= 1000; I++){ Console.WriteLine(I);} Lets break the for statement down:-Initialization: int I = 1 Condition: I <= 1000 Increment: I++ All the parts here are optional and can be left out. So, you can initialize the variable I, above the for statement and leave out the initialization block. The code would look like this (; I <= 1000; I++). Similarly, you could remove the condition part to make the loop infinite or you can include the increment statement within the body of the for statement itself (inside the { and } brackets). Another variation of a for statement is the empty loop which does not contain any body: for(int I = 1; I <= 1000; I++); Such a for statement is followed by the semicolon. The while loop The for loop cannot be used when the range of the loop is unknown (Well, actually it can, but the approach would not be logical). Say, you want to continue inputting values from the user as long he wishes to. This can be easily implemented by the while statement. Syntax:- while(< condition >) { statements } We donât have initialization and increment/decrement slot over here. These need to be implemented additionally. Take a look at the code snippet below. bool Continue = true;while(Continue == true){ int A; Console.WriteLine("Please Enter a Number"); A = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Continue (True/False)"); Continue = Convert.ToBoolean(Console.ReadLine());} We have declared a boolean variable Continue which we use to check whether to continue repeating the process. It has been initialized to true, so that the loop is executed for the first time. The userâs choice of whether to continue with the loop or not, is stored in Continue. As long as the user enters true, the statements within the body of the while loop would keep on executing. Anything that can be implemented using for loop, can also be done using the while loop. Below is the code to print numbers from 1 - 1000 using while. int I = 1;while(I <= 1000){ Console.WriteLine(I); I++;} The do while loopThe do while loop is a variation of the while loop in which the condition is evaluated at the end of the loop. Thus, the loop is executed at least once. Recall the first while program we did. The bool variable continue stores the userâs choice. However, for the first iteration, it does not store the choice. In such a scenario, we had to initialize continue with the value true so that the loop is executed for the first time. A better approach would be to use the do while loop and check the condition at the end. The code for which is given below. bool Continue;do{ int A; Console.WriteLine("Please Enter a Number"); A = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Continue (True/False)"); Continue = Convert.ToBoolean(Console.ReadLine());}while(Continue == true); Note: The while part in the do while loop needs to be terminated with the semicolon. Although, either of the three types of loops can be used to do an iteration, one needs to use the appropriate loop for the job. Use the for loop for arithmetic operations, while loop for non-arithmetic ones and the do-while loop when the loop must execute at least once. Previous Tutorial - Lesson 2 - Variables & Operators Next Tutorial - Lesson 4 - Object Oriented Programming Lesson: 1 2 3 4 5 6 7
  23. That might be the case. Being the most popular website on the planet, they have to have excellent phone tech support. However, I believe that E-Mail is the best way to express myself and let my thoughts be known; especially when there is no toll free tech support line. My apologies for not being sarcastic enough! What I meant was, anyone with fair bit of intelligence would have figured that one out and that information was really not necessary.
  24. It all seems pretty logical. But, I have a feeling that its all because they want to delay the room cycler bots. OK, I'll drop by. I was kind of concentrating on other areas, more importantly, the new plugin architecture for Pika Bot.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.