Sunday 28 June 2009

Creating a website in 10 minutes

Hi all,
Lets deploy a website made with PHP and a MySQL database. Follow these steps carefully...

Installing the business tier
1. Download XAMPP by clicking http://www.apachefriends.org/en/xampp-windows.html
2. Install XAMPP by selecting Apache, MySQL and FileZilla AS SERVICE.
3. Click next for all other windows that appear.
4. Start XAMPP and start Apache, MySQL and FileZilla.
5. Disable your windows firewall by navigating to control panel.
6. Type localhost in your browser and see if XAMPP site is opening.

Installing Access tier
1. Download MySQL Gui tools from http://dev.mysql.com/downloads/gui-tools/5.0.html
2. Pick a mirror based on your platform type. Its generally x86.
3. Either register or, click on No thanks! Generally i prefer the second one! ;)
4. Choose a location and click https.
5. Download it.
6. Install it by clicking Next to all that follows.
7. Your Back end is ready.

Create your first web-coding (name it index.php) by following the instructions in the link,
http://www.w3schools.com/html/default.asp

and put your file in a Newfolder (Give it a name) in C:\xampp\htdocs.
Now open your browser and type, localhost/NewFolder(the folder name that you gave) and press enter. Tada! the html file appears...
Now try some php coding by using this link,
http://www.w3schools.com/php/default.asp
Now try combining MySQL queries by following the appropriate links that appear in the above mentioned link.

Saturday 27 June 2009

XAMPP didn't work - solution

Hi ppl,
I had installed my xampp and deployed my website in the htdocs! I was able to access it by typing localhost/website-name but not using the ip or website address... I worked on that for a few hours and found out that windows firewall was blocking it. If you get the same problem, disable the windows firewall and try testing your ip...
It works

Monday 22 June 2009

Clearing screen using GCC or G++

When you use the conventional compilers such as TurboC, you can use the conio.h function clrscr(). But when you're using GCC or G++, we can't go with clrscr(). Hence try theses
for windows - system("cls");
for unix, linux and others - system("clear");

Saturday 6 June 2009

Time change between Linux Fedora and XP / Vista

Hello guys,
For visitors from some Search Engine : You're so punctual hm? Tending to synchronise time, technology, etc,etc!!! Great man! Anyways! You can find the necessary solution here! Take sometime to read it!

Fedora has been doing really great these days and many of my friends have started moving towards fedora! After quite a few days of our consistent use, we found that the time was not synchronised in many of the laptops running dual boot between Vista/XP with Linux Fedora/Ubuntu. We were trying to find a solution for this and here it is!!

Goto your linux system.
Goto System > Administration > Date and Time > Time Zone.
Below this, you may see a check box telling about some UTC and stuff!
Uncheck it. Close and reset your system time and date! Tada! Everything will work fine from now!

Wednesday 3 June 2009

Finding out the number of Zeroes at the end of Factorial for a number

There is a unique formula to find out the number of zeroes at the end of a factorial of a given number.
Divide the number by power of 5s and add the sum.
For eg.
Take the number 60.
= (60/5) + (60/25 ) + (60/125) + ...
= 12 + 2 + 0 + ..
= 14.

you can stop the series once the power of 5 exceeds the number.

C++ program for the logic:

#include
#include
using namespace std;

int main()
{
int tc,i;
long int count,num5,inp;
vector output;
cin>>tc;
for(i=0;i>inp;
num5=5;
count=0;
while(inp >= num5)
{
count += inp / num5;
num5*=5;
}
output.push_back(count);
}
for(i=0;i
cout<<
//system("pause");
return 0;
}

Wifi at SASTRA

Its 9:40 p.m. and Oh my GOD!!!, I'm browsing internet at the speed of my thoughts! Pages are opening faster than my explorer. Morning, I had my Gmail showing the mails even before the booting was complete! Man! this is the real power of an 18mbps internet! Thank you SASTRA! Such a great initiative!

Writing a wiki page

I started learning quite a while about the wiki pages and the commands used for various functions! Its actually a fun to script in the wikis. This link should do the magic for you! Since only a limited number of tutorials are available on the net, its a little difficult for a beginner like me to understand the core completely. For instance, I was stuck up with creating an infobox, which has a very limited or less information on the net!
Try my wiki - mywiki.