|
|
Posted in Computers & Tech / Networking
Author: soleimanian Total-Replies: 3 Playing text or message to user, when Windows is loading. This message is useful for Admin. Os: Win98/Me First address: HKEY_Local_Machine\Software\Microsoft\Windows\CurrentVersion\WinLogOn Os: WinXp/2000 Second address: HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\WinLogOn Kind: String Value Command : LegalNoticeText, LegalNoticeCaption Note: 1- user can't remove or edit this message at all. 2- When windows is loading, user must read this message, and click ok.
Fri Sep 10, 2004
Reply New Discussion
Posted in Computers & Tech / Programming / Scripting / PHP
Author: akSTALKER Total-Replies: 1 hey private message me if you still need help. i can give you my msn or other email and try to assist you with it....ive made a few browser/text based games. ill try to dig up some books and get names for you.
Sun Dec 30, 2007
Reply New Discussion
Posted in Others / Gaming / Online Multiplayer RPG Games
Author: techocian Total-Replies: 5 OK lets skip the Direct X and move back to 3rd world entertainment - MUDs. === Introduction === The definition of a MUD is Multi-user dungeon. Most people would call it a "text game". By far it is known as one of the most boring games on the net. ome people who try it out - like me ( ===Why play MUDs?=== Haha! Let's go straight to the point. Can you "kick" an npc and make him hurt in graphic games? Can you wear tattoos or dress yourself up your own way, your own style? What about battling? In most games, there is only one "method" to kill. In MUDs, you get to "jab, punch, kick, hammer, smash, crush..etc...". You also get more skills and things to do as the producers don't have to go to the trouble in generating the graphics. === Controls === OK I told you what it was like now what are you thinking? "It's just a bunch of letters, and besides, how am i supposed to even MOVE in this game...?" OK firstly, all MUDs maneuver by the words: (N)orth, (S)outh, (E)ast, (W)est. So if you want to move towards the north, you type "n" and you will be transfered to another map to the north. Simple right? What about talking? To talk you would type "say <message>" or just a (') quotation will do and then your message. To send private messages are usually different. In many MUDs, you would have to type "tell <username><message>". Sometimes, you would get a post office in towns for you to send mail. All the rest of the controls you would learn soon enough when you play the MUD itself. === What next? === Well I would suggest you go with an easy-going MUD first. In my opinion, Ancient Anguish would be a good start. They do not have a newbie tutorial but they DO have a newbie guide online which you can read. Ancient Anguish is a quite "Straight forward" MUD. It has all the features of a normal MUD and newbie-friendly too. After AA, and you think you could do better, move on to Achaea. Achaea is a more "dedicated" MUD. You have to take tests and pass them in order to be a full guild member or class. I personally like their races too. I chose atavian on my first character in Achaea. Atavians are flying beasts which look like humans but have wings. I had SOO much fun flying on them over seas and rivers and mountains. Especially if some "Jesters"(Another class who dedicates their lives to playing pranks) started "accidentally" dropping banana peels on the floor and you slip. That will make them laugh their heels off. Flying equals you won't get seen and won't drown in deep waters. (But there IS a chance of falling when there are high winds... === Played it, tried it, HATE IT!! === Well if thats the truth, then don't think you're not normal. You're just not one who likes to read much... === Thanks for being a patient reader === P.S It will be best if you do not use the telnet client or the Java client. I suggest using gosclient. It's a GREAT client and has all the tools i will ever need to play MUDs. Hope you enjoyed my guide to influence more people to play MUDs. I hope ya'll enjoy it. ( a.k.a at least, if your fingers don't get tired of all that typing!)
Mon Jan 31, 2005
Reply New Discussion
Posted in Others / Gaming / Text Based Games
Author: Eclipse13k6 Total-Replies: 5 Well, almost two years ago I posted a topic here asking for help for my text based game. I was told to go actually learn the language (go figure) so i familiarized myself with php between school and work. At this point I can mostly read it, but I can't write. My friend, however, actually know the language and decided to help with my project, so I can learn as I go. Now, here is a dilema we have reached. Almost all of the basics are functional, except for the forums. At the moment we have an off-site forum working, but that requires seperate registartion, and has no links around the site. I want a message board, doesn't need to be anything fancy, for the members to come and chat, so on etc. I would like it to be on-site, with all the game headers etc. still there so that they are still playing the game while in the forums. I am pretty sure you all know what I am talking about. Most text-based games have this, but I cannot find a file for this anywhere on google. Maybe I'm not looking hard enough or I totally missed it, most likely the latter since i pent about 2 hours yesterday trying to find a php file to use for the message boards. Anyone have a link to a free php file that would suit my needs? Or willing to share theirs? I would like to allow use of BBCode.
Thu Dec 30, 2010
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Programming / PHP
Author: 8ennett Total-Replies: 2 Ok so now we're going to make our very own shoutbox (mini chatroom) using PHP and MySQL. First we need to create a .htm file with a form for accepting a users name and message with a submit button. A seperate PHP document will connect to the database and insert the values in to the table. At the same time it will fetch the last ten records from the table and will display them on the screen. But before that we need to create a table which will store the users name, message and time the message was posted. To create the table run the following MySQL query either in the console or phpMyAdmin: CREATE TABLE shoutbox ( `user-id` int(11) NOT NULL auto_increment, `user-name` text NOT NULL, `message` longtext NOT NULL, `time` text NOT NULL, PRIMARY KEY (`user-id`) ) engine="innodb"; Now you have your MySQL table we can create the first document which is going to be called shoutBox.html document: CODE<html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>ShoutBox</title> </head> <body> <form action="shoutBox.php" method="post" > Name: <input type="text" name="name" size=30 maxlength='100'></input><br/> Message: <input type="text" name="message" size=30 maxlength='100'></input><br/> <input type="submit" name="submit" value="submit"></input> </form> </body> </html> Now create a new document and call it shoutBox.php then copy and paste the following code: CODE<?phpmysql_connect("localhost","root",""); mysql_select_db("Bennett"); $name=$_POST['name']; $message=$_POST['message']; $time=date("h:ia d/j/y"); $result=mysql_query("INSERT INTO shoutbox (id,name,message,time) VALUES ('NULL','$name', '$message','$time')"); $result = mysql_query("SELECT * FROM shoutbox ORDER BY id DESC LIMIT 10 "); while($r=mysql_fetch_array($result)){ $time=$r["time"]; $id=$r["id"]; $message=$r["message"]; $name=$r["name"]; echo $name."<br/>".$message."<br/>".$time."<br/>"; } ?> Ok now you can test it out by opening your html document in a web server. Clicking on the submit button 5 times will display the following: Bennett this is new text 11:07am 28/01/09 Bennett this is new text 11:03am 28/01/09 Bennett this is new text 11:03am 28/01/09 Bennett this is new text 11:03am 28/01/09 Bennett this is new text 11:03am 28/01/09 This will display up to ten messages entered in the database starting with the most recently submitted. Play around with it and find different ways of integrating it in to your own site.
Mon Feb 1, 2010
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Programming / PHP
Author: 8ennett Total-Replies: 8 Before starting on this tutorial be sure to run through the first 4. Part 1: Advanced User Account System Part 2: Welcome Home Part 3: Administrative Part 4: Profiles ######################## Part 5: Messaging & Inventory ######################## Download Example5.rar Now this tutorial is going to cover quite a lot. I thought I'd best pick up the pace so you can get learning in larger chunks now you are starting to understand the code. In this tutorial we are going to introduce a few new things, such as cron jobs and javascript. Also you will notice I have changed the design of the example site. Here is a list of all the features added in this next tutorial. Messaging System
First of all it turns off the server, logging everyone out so it can run through quickly without causing drag on the server and offers an equal chance to all players for our dailies (which we haven't got any of yet). Next it decides randomly how much strength and defense to take off each player. As with real life, players will need to maintain their training (in the gym we haven't built yet) otherwise their stats will go down. This is another form of evening the playing field. It would be unfair if someone who was new to playing going against a player who hasn't been on in a long time but has started playing again. After this we delete all the item prices for yesterday and change the current days prices to 2 which means yesterday. Then we can loop through and create the new prices for the new day for each item. It creates the new price by creating a random figure between 90% and 110% of the items average price. So if you create an item with an average price of $100, then the new days price would be between $90 and $110. This helps to prevent the market from getting stagnant and encourages players to buy large quantities of goods and hold them until they can sell them again for a profit. Next up, the cron job we switch the server back on so people can log back in again and start playing the new day. We will need to put our crons in a place where they can't be accessed by anyone who visits your site, so putting them in your root directory in a file named crons so you can simply type in http://www.mysite.com/crons/five.php to refill your health wouldn't be advisable. Instead put them outside your public_html directory (also htdocs, www depending on your server). So create a new folder outside your public_html folder named crons and place the day.php and five.php documents in the archive in to this directory. Next edit line 3 in five.php and lines 3 and 43 in day.php to point towards your config file. So on an astahost server you would change this to '../public_html/lib/config.php'. I'll show you how to get the cron running on cPanel X on astahost. First of all you need to open the cron jobs section and create two new crons. Here is how each should be configured:
Daily Cron
Minute = 0 Hour = 0 Day = * Month = * Weekday = * Command: php /home/mysite/Crons/day.php
Five Minute Cron
Minute = */5 Hour = * Day = * Month = * Weekday = * Command: php /home/mysite/Crons/five.php Each of these crons should now run both daily and every five minutes. You can try them out by editing the database to reduce your health and energy and watch them increase every 5th minute. Next up we have our messaging system. For this we created a new folder in the modules directory called inbox and also inserted a new menu item for the inbox as well. We have also created a new feature for a menu item where if the user has unread email in his/her inbox then it will be displayed next to the link as shown below.
This image shows the inbox displaying messages in ascending order from the date they were received, however I have changed this to descending so the newest is on the top of the list. So we have our list of messages in our inbox. We are able to open these messages by clicking the subject or delete these messages by clicking on the X next to them. We can also create a new message, there is another button for turning off/on our inbox and choose who we accept messages from. Click the "Accept Messages From Anyone" button will change your inbox settings and the button will change to "Accept Messages From Friends Only".
Below is what is displayed if we click on a messages subject.
So here we have a display of our message. The date and time, a clickable link with the senders name, the subject, the messages content (with full bbcode processing) and our message controls. Clicking the "Mark as Unread" button will take us back to the inbox and obviously mark our message as unread. "Delete" deletes it and etc. Now if we click on the reply button this will take us to the same page as the "Compose New" button in the inbox however the users id field has already been filled in.
Also, there is a new button on the user profile page called "Send Message" which also fills in the user id field. So here we have our message creation system. We can write our bbcode as well as our message in to the message field. Now our subject field is fairly interesting, if we are replying to a message it will add "Re:" however if the message subject already contains "Re:" or any variation it will remove these first then add its own "Re:" to prevent message subjects from becoming something like "Re: Re: Re: Re: Just another example".
Here we have our events list found on the menu. This is subject to the same tests as the inbox link where a box is displayed with the amount of new events eg. [5 new]. So when ever a user has had some interaction with your account we can send the user an event alert to let them know what it is. Now as you can see above we also have a clear events button. This will delete any and all events the user has had. Like the emails however, this will not actually delete them but instead set the status to deleted so admins are able to view everything before it is deleted from the server. We haven't written in to the cron to delete messages or events over a a certain amount of time, I thought I needed to break this process up a bit as this is quite an extensive part of the tutorial already. Another feature of the events list is listing our events in pages. If there are more than 10 events then a button will be displayed saying next page, this takes us back to this page but with the $_GET['page'] variable set. If this variable is more than 1 then a previous page button is displayed. Next we can move on to the inventory system.
So here we have five different types of items. Weapon, Armour, Consumable, Drug and Other. Each item has its own options (although drugs and other are the same for now) which for now are hard coded in to the inventory.php file in the modules directory. Each item has several values in the database numbered 1-5. These will have different effects depending on the item type but this will be explained in the admin item editor later. So you can see we can equip our weapons and armour which will place them in the equipped armour and weapon slots at the top. We can also unequip them. Another thing we have to remember is if we have an item equipped but then we sell it, we will then have to unequip that item as well. Clicking each items image will open a pop-up window containing all the information about the item except current and previous prices.
So the values listed in the database each have their own property for a consumable item as show above. It also displays the average price of the item, although the current price could be anywhere from 90% to 110% of this items average price. We may later want to create items that get us out of hospital faster, prison or some other thing but this will be covered in another tutorial. So if we choose to sell an item we will see this.
So like we covered earlier, you can see todays price and yesterdays price with arrows letting us know the difference more easily. Ok moving on to sending an item to a person.
So here we have our live search example. By entering a full or partial users name in the input field a list of results (up to 10 max) will be displayed underneath. Clicking one of these names will complete the input field allowing you to send the item. This will also to check to make sure the users inventory is not full. Another check that is performed during the transfer is wether or not the user sending the item has the same last ip as the user receiving the item. If so we then check to see if both user accounts use the same password. If not then it is not likely the user accounts are owned by the same user and so an alert is put in to the admin inbox (both users might just be on the same network) and then the admin can decide if they want to ban the accounts or not. If the passwords do match then the accounts are both automatically disabled for 6 months and the user will be logged out. An alert will also be sent to the admin inbox (which we are yet to build) if this happens. So that is the basics of our inventory system. Next we need a way to create and edit items. Now we have our new game editors button on the admin panel and two new editors. We can either edit and create new items or send created items to different users.
So as stated earlier, when we are creating a new item and change the item type, it also changes the values 1-5 input fields using javascript.
Also the new item will not be created unless a valid image has been selected to upload as well. Now I have included five items to get you started, also I have given you a template item image which is just the green background. You can find it in images/inventory/template.png. Now when we select an item to edit we see the below screen. Changing the items type will change the fields the same as creating a new item. You can also choose to delete the item or upload a new image. If you make changes to the item but do not select a new image then the old one will stay the same. Next we have the send item option. This merely sends whatever item you choose to a user and inputs an alert in to that users events. There is also another link on a users profile for admins sending items to users and automatically fills in the user id field using the $_GET variable. The admin control panel will appear on a users profile if you are an admin or a super admin (obviously). So I think that's about all covered in this next part. As usual leave any comments or questions. Also sorry about having to post some of the images links instead of images but the forum won't allow too many images.
Mon Jan 24, 2011
Reply New Discussion
Posted in Computers & Tech / Programming / Scripting / PHP
Author: nightfox Total-Replies: 1 I'm creating my own friend network script which is going to be a combo of MySpace/Facebook and an AIM profile. One of the most important features is the adding of friends. The way to do this is probably simple & I'll kick myself when I see the code to do it. What needs to happen is a friend clicks a link which sends an internal message through the scripts messaging system (like a PM on a forum) to the other person to approve or deny the request. In that message, there needs to be a link to a page which executes a PHP script which updates the database adding both users to each other's friend list. I'm going to try and play with it a bit, but I doubt I'll be able to do it. BTW- I'm creating this to try and expand my PHP knowledge from beginner to moderate. All my PHP books are beginner based... looks like I should circulate my Amazon wish list to see if someone would be kind to buy me the PHP books I should be reading... Thanks for ANY help. I'm currently going to finish up on the login system with access rights and try and get that working. Then I have to also get the message system working too. Then I can provide any database tables needed much more easily. [N]F
Sat Jul 8, 2006
Reply New Discussion
Posted in Computers & Tech / Software / Freeware
Author: Illustrious Total-Replies: 19 I just used it to text my Textfree number on my iPod touch and it seems to be working perfectly
Sun Oct 31, 2010
Reply New Discussion
Posted in Computers & Tech / Designing / Web Design and HTML
Author: marijnnn Total-Replies: 2 ok, that was stupid of me. i was writing them myself when i found the site mastercomputers mentioned. i copy-pasted it and forgot to mention my source. really sorry about that. back to the topic now. post the things you find most irritating about websites. most of them will probably be mentioned in the list at the mentioned site, but you might want to tell why -to much animation. i want to read the site relaxed. if i'm reading an interesting text, animations will kill my attention. also, people will be less focused on what you have to say. i'd say: use max. 1 animation, and use it only to draw the attention for an important message. -a picture as background. you know, a colourfull, crowdy picture of a field of flowers or something like that. it's hard to read with such a background. -a green background and a blue font: make sure there is a lot of contrast between text and background. white with black text or something like that. -use light backgrounds, it makes the user more relaxed. -don't use music on your site, or give the user the option to turn it off. most of the people already have some music playing when they are surfing the net. -crazy looking fonts are cool... but sometimes hard to read. use them for titles and logos, not for long texts. -adjust your pictures for the web. use only gif, jpg or png. resize them so they fit in a window. they have to load fast. keep their size under 70kb. a tutorial can be found in the graphics section (for photoshop). if the page loads too slow, users get nervous and often just leave. -thumbnails should be seperate images. don't just use height="100" width="100" properties in the img tags. make a tiny image with your photo program or by scripting language (php does the job easily) -about hyperlinks: adjust their style, blue underlined often doesn't fit nice in your site. but make sure users can still easily detect them. don't make them the same as the rest of the text! links to other pages of your site should open in the same window. links to other people's sites should open in a new window. now add yours!
Fri Sep 24, 2004
Reply New Discussion
Posted in Computers & Tech / Designing / Graphics Design
Author: yordan Total-Replies: 9 OK, you have two answers, both answers point to a nice artistical fact : what do you want to express ? The drawing is nice, now we have to go to the next step, is the drawing made in order to sustain a message or a written text, then we need to go to the next step and see if the drawing and the text match. Personnally I feel that the loading time is too much, so if you want people to see the drawing, maybe you should consider using a slower resolution in order to improve the downloading time. Regards Yordan
Wed May 17, 2006
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Programming / MISC (not applicable to above ..
Author: RGF Total-Replies: 35 I'm writing this tutorial for all that don't know what batch files are or how to make them. So lets start at the beginning What is a batch file? A batch is a list command line instructions that have been batched together ( Kinda like the name says ) into one file. They're not really programs, but they are the backbone of windows... don't believe me see for yourself go into your C:\windows folder there are a lot of .bat \ .sys \ .cfg \ .INF and other types of files. But I wouldn't delete any of them because if you do you may disable your OS So now lets get to some of the commands used in making a batch file: echo - displays a text message in the DOS window like " HI ALL" if you put @ before it means not to echo that line cls - clears the screen ( DOS window not the monitor) del - deletes a file deltree - its kinda like del but deletes all of the files in a folder copy - this copies the batch file to a directory ( folder ) end - ends the script start - starts a program.exe [ example ] say I wanted to start notepad it would look something like this Start C:\windows\system32\notepad.exe or just start notepad.exe ( cool eh? ) pause - it pauses the commands until you hit a button call - calls up another batch file from in a folder or somewhere else on the computer color - changes the color of the font and/or the background [ example ] 0 = Black 8 = Gray 1 = Blue 9 = Light Blue 2 = Green A = Light Green 3 = Aqua B = Light Aqua 4 = Red C = Light Red 5 = Purple D = Light Purple 6 = Yellow E = Light Yellow 7 = White F = Bright White so something like this [ color 0C ] ren - renames a file or folder there are more commands, but I'm still learning them all myself. So anyway lets make something with what we just learned: @echo on color 2 echo "Hello, I hope you enjoy this tutorial" copy C:\Program Files\new folder del C:\Program Files\new folder pause cls Start notepad.exe End OK save it as [ test.bat ] and look at that your very own batch file what you think? well that's all for me tonight I hope you enjoyed learning something new.
Tue Jan 11, 2005
Reply New Discussion
Posted in Astahost / Your Voice! Your Review..
Author: Habble Total-Replies: 7 Anyone here use google Apps? If you don't you should. Some of the features are: Use Gmail with your domain. Your email address is yourname@yourdomain.com, and you get to use the GMail WYSIWYG editor to create emails. It has powerful Spam protection also. In all my time of using Gmail (With and without google Apps) I've never had any Spam go unfiltered. Another feature of Gmail is conversations. If you've replied to an email, and someone's relied back, and so-on and so-forth, you can view all emails in one window, and they appear as one email, instead of cluttering your inbox. Also, if you're replying to an email, or reading it, if the person replies, a message will popup and you can view their reply right away. Chat You can also use Google chat to chat to people with email accounts at your domain. Google Chat is a Instant Messenger program that usually allows you to chat with other Gmail users. In this case however, you chat with other people from your domain. Google Chat also has the additional feature of notifying you when you have new mail on Gmail, and allowing you to access it on-the-spot. Pages Google also have their own WYSIWYG Web Editor, you can choose from a variety of templates, then create, move, edit and delete elements such as text, images etc. anywhere on the page. Great for beginners at HTML who want their site to look professional! Docs & Spreadsheets Pretty much Google's online answer to Microsoft Word and Excel! You can create advanced online documents and spreadsheets, and save them! Great when you need to create Documents/spreadsheets on-the-go, on computers that don't have any good office programs, or in internet cafes What's even better, is you can either access them via google, or point them at your own domain/subdomain! E.g. for your email, you can access it via mail.google.com/a/yourdomain.com, or email.yourdomain.com! If you're having trouble configuring it to work with your website, don't worry! Google has specific walkthroughs for many different webhosts! To sign up, go to http://www.google.com/a/ Note: It takes some time for Google's servers to update, and get your domain working 100%, but this should only take a few hours if you configured it correctly.
Tue Jun 19, 2007
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Programming / PHP
Author: 8ennett Total-Replies: 6 Now before we begin this tutorial please ensure you have run through parts 1 and 2 and made sure you understand everything that has been said. Feel free to comment on each tutorial with any questions and I will help you out as best I can. Part 1: Advanced User Account System Part 2: Welcome Home Also for this tutorial you will need to download the updated files archive which contains all the new files included in this tutorial as well as all the previous files and the mysql tables document which you will need to run. As with the other tutorials once you have created your database and run the tables query you will need to change the config file located in lib/config.php. I'd also like to point out to everyone that there has been no change to the table structure in this tutorial so you don't need to overwrite your current example database if you have one. ############### Part 1: Administrative ############### So here we are, we are going to work on our new admin panel. In this tutorial we will cover the site config editor and a special button for turning our server online and offline. When we turn our server offline that means that no body can register with your site and cannot login either. Also anyone who is already logged in will be logged out, except of course admins and super admins. So what you need to do first is ensure you are registered with your site and logged in. If you haven't done so already you will also need to change your account type to "Super" so you have the master account. Change the account type in your database under the "type" column. Now you are an administrator you will notice now you can see an additional item on the home menu. ![]() This link will appear only if you are an admin or super admin and is a link to the admin panel. If you look in the home.php file and scroll through the code to the menu you can see how simple it is to do this, simply by checking the $_SESSION['user'] variable. As usual the lines are all commented to run you through how to do this. So now we are in our new admin panel you will see two buttons, Site Config and the On/Off switch for our server. I coloured the button text using the css file, have a quick look through the page code and the css file just to see how it's done. When toggling this switch the colour of the button changes from red to green and back again. ![]() If you click on the site config button then the site config settings will appear in a form below the admin panel. If you look closer at the php files you will notice the config settings editor is in a seperate php file to admin.php in the admin directory under modules. This file cannot be accessed by any other page other than our admin.php, this is because it also checks if the home include variable has been set the same as normal module pages (bank.php and home.php) so it can only be displayed if it's included in the home page, but because of the way we setup our module system they cannot access it by manipulating the $_GET variables either. ![]() If you have a look through our config.php file in the admin module directory you can see how we have processed the form data using php. Obviously since we aren't writing anything to the database then we don't need to escape the characters and so on, but we still need to do a couple of checks on each post variable. We also need to output error messages in case one of these checks fails and we can identify which field we entered an incorrect value. I have also added the TITLE tags to each form input. Now when you mouse over each field in the form it will bring up a description of what that setting is. Once all our form checks are complete and everything is ok then we re-write the config file in the lib folder with our new values. I also had it write all the original comments in case you want to change something manually in the config file and need help remembering what each setting does. So that's pretty much it for this tutorial. In future tutorials when we create new values in our config file we will also be adding them to our admin file config editor. Also we will be creating more features in the admin panel itself once we have made them elsewhere, including an in-game content editor (items, houses, weapons, animals and so on) and also a user editor. As usual any questions or comments are welcome. I won't be writing another tutorial now until the new year, although I might start one in a day or two. In the mean time keep examining the code to work out how to write your own version.
Sun Dec 19, 2010
Reply New Discussion
Posted in Computers & Tech / Operating Systems / GNU/Linux
Author: Jeigh Total-Replies: 9 Yea I would say just look through a few tutorials, and remember that typing man command will give you the manual for whatever command you give it, this helps alot if you like to explore things on your own. Few quick tips: ls - lists all files in current directory rm/rmdir - remove a file or directory respectivly... DOES NOT GIVE YOU A "are you sure you want to delete?" type message. So be careful lol. cd directory will move you around the directories. so yes, read some tutorials, play around, and enjoy. Once you can use the terminal its got some awesome fun stuff to use
Tue Oct 25, 2005
Reply New Discussion
Posted in Computers & Tech / How-To's and Tutorials / Programming
Author: docduke Total-Replies: 2 If you follow this tutorial you will: 1. Install Python 2.5.1 on Microsoft Windows 2. Run a one-line "Hello World" interactive program 3. Pop up a "Hello World" Windows Message Box. 4. Pop up a two-button Windows dialog box which interacts with your program. 5. Learn where to find more tutorials and documentation The first 4 of these can be done in 3 minutes if you are focused! This is a cookbook. Before "cooking" the recipe, you need a few ingredients: 1. Get the python installer at Python 2.5.1 Windows installer. 2. Create a folder, and know its location. Mine is at D:\b\Wins 3. Copy the following program, paste it into an editor and save it as a file in the folder. CODEfrom Tkinter import *class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", bg="yellow", command=master.destroy) self.button.pack(side=LEFT) self.hello = Button(frame, text="Hello", command=self.say_hi) self.hello.pack() def say_hi(self): print "Hello, new Python programmer!" root = Tk() app = App(root) root.mainloop() I saved it as D:\b\Wins\Buttons.py Do the preceding things to prepare for the 3 minutes. There are additional items you may need if you are on an earlier Windows platform. If your platform does not recognize a .msi Windows installer file, you may need Windows Installer 2.0 Redistributable for Windows 95, 98, and Me, or a later version for Windows 2000 or NT. The text editor you use to save the program should not convert blanks to tabs. White space is significant in Python programs, and there is no standard for how many blanks equals one tab. Recipe: Ready to go? Start your stopwatch! 1. Double-click the Python installer. (Take all defaults.)
CODEfrom Tkinter import *root = Tk() w = Label(root, text="Hello world!") w.pack() root.mainloop() This five-line program creates a label window using standard Windows system calls and messages. The iconize, minimize, and close buttons function as usual. Clicking the top-left corner of the window produces the same menu as right-clicking the task bar button. If you want to play with it some more, do the following: Copy the text (from here, not from the Shell). From the menu on the Buttons.py window, select File | New Window and paste the text into that window. Then select File | Save As and give it a File Name ending in ".py". It will be saved in the same folder as Buttons.py. The Buttons.py program puts two buttons in a frame. One, which closes the window, is given unusual colors. The other performs a "call-back," executing the "say_hi" method when it is pressed. I have been programming for 50 years. Python is by far the easiest, most productive, least-error-prone language I have ever used. However, like any language, it must be learned. More complex tasks require more study. Fortunately, there are many excellent tutorials, and comprehensive documentation. Here are a few resources: In any Python window, click Help | Python Docs | Tutorial. Alternatively, when any Python window has focus, press the F1 function key. The tutorial will introduce you to basic, and not-so-basic Python tools. The Global Module Index introduces you to many available resources, like Tkinter. And yes, all of this came in that 10 MB package you installed! For the essentials of pop-up windows on a Microsoft platform, see: An Introduction to Tkinter . Most of these programming tools also work on Linux, Mac, Java, .NET and many other platforms. Enjoy!
Thu Feb 21, 2008
Reply New Discussion
|