Friday, May 30, 2008

Linux - Recovering grub and root password


If you have, a password protected grub boot loader and you forgot both root and grub password, then you can recover grub-boot loader password.


The best way to recovering (or reset) a password (and to solve many other problem) is to use Knoppix Live CD. First downloaded knoppix and then burn it on CD. Put CD into CD/DVD rom and boot system. You need to boot system into single user mode, at boot: prompt type linux single:

boot: linux single


You need to mount a partition where you grub configuration file is stored. Depend upon Linux distribution the location of Grub configuration file changes. Following list summaries Grub configuration file location:


Debian Linux Grub configuration file location: /boot/grub/menu.lst

Suse Linux Grub configuration file location: /etc/grub.conf

Red Hat/Fedora Linux Grub configuration file location: /boot/grub/grub.conf


 


If you forgot partition name use fdisk -l command to obtained partition list.

# fdisk -l


Mount your partition:

# mount /dev/sdb1 /mnt


a) If you are using Debian Linux you need to modify /boot/grub/menu.lst file:

# cd /mnt/boot/grub

# vi menu.lst



b) If you are using Suse Linux you need to modify /etc/grub.conf file

# cd /mnt/etc

# vi grub.conf


c) If you are using Red Hat / Fedora Linux you need to modify /boot/grub/grub.conf file

# cd /mnt/boot/grub

# vi grub.conf


Once file opened using text editor, locate password line and remove it:

password --md5 $1$9sdflksdf/sdf44k


Save file and reboot the system.

# sync; sync

# cd /

# umount /mnt

# reboot


 


How to: Recovering root password


If you cannot remember your root password, you need to boot your system as linux single.


If you are using GRUB, once you have loaded the GRUB boot screen, type e for edit. You are presented with a list of items in the configuration file for the boot label you have selected.


Choose the line that starts with kernel and type e to edit this boot entry.


At the end of the kernel line, add:


single


Press to exit edit mode.


Once the GRUB screen has returned, type b to boot into single user mode.


If you are using LILO, press [Ctrl]+[x] to exit the graphical LILO screen and gain access to the LILO boot: prompt.


Next, enter linux single at the LILO boot: prompt.


Once you have booted into single user mode using either GRUB or LILO and have access to the # prompt, you must type passwd root, which allows you to enter a new password for root. At this point you can type shutdown -r now to reboot the system with the new root password.


If you cannot remember your user account password, you must become root. To become root, type su - and enter your root password when prompted. Then, type passwd <username>. This allows you to enter a new password for the specified user account.


 

Using a non interactive Bash Script to Create Users And Change Passwords in LINUX

Using a non interactive Bash Script to Create Users And Change Passwords in LINUX


These two scripts are very important for the system admin who regularly works with mail servers and somehow forgets to backup his system username and password! Let’s say somehow we lost the usernames and passwords of the mail server. In this case the admin has to manually create all the users and then change the passwords for all the users. Tedious job. Let’s make our life easier.


First create a file which contains all the user name. Something like this:


user1


user2


user3


user4


user5


Save the file as userlist.txt. Now create the following bash file:


#!/bin/sh

for i in `more userlist.txt `

do

echo $i

adduser $i

done


Save the file and exit.


chmod 755 userlist.txt


Now run the file:


./userlist.txt


This will add all the users to the system. Now we have to change the passwords. Let's say we want username123 as password. So for user nayeem the password will be nayeem123, rubi123 for user rubi and so on.


Create another bash file as follows:


#!/bin/sh

for i in `more userlist.txt `

do

echo $i

echo $i"123" passwd –-stdin "$i"

echo; echo "User $username’s password changed!"

done


Run the file. All the passwords are changed.


Monday, May 26, 2008

Microsoft Office Keyboard Shortcut Keys : MS POWERPOINT Shortcut keys

Microsoft Office Keyboard Shortcut Keys : MS POWERPOINT Shortcut keys

Apply subscript formatting - CTRL+EQUAL SIGN (=)
Apply superscript formatting - CTRL+PLUS SIGN (+)
Bold - CTRL+B
Capitalize - SHIFT+F3
Copy - CTRL+C
Delete a word - CTRL+BACKSPACE
Demote a paragraph - ALT+SHIFT+RIGHT ARROW
Find - CTRL+F
Insert a hyperlink - CTRL+K
Insert a new slide - CTRL+M
Italicize - CTRL+I
Make a duplicate of the current slide - CTRL+D
Open - CTRL+O
Open the Font dialog box - CTRL+T
Paste - CTRL+V
Print - CTRL+P
Promote a paragraph - ALT+SHIFT+LEFT ARROW
Repeat your last action - F4 or CTRL+Y
Save - CTRL+S
Select all - CTRL+A
Start a slide show - F5
Switch to the next pane (clockwise) - F6
Switch to the previous pane - SHIFT+F6
Undo - CTRL+Z
View guides - CTRL+G

Microsoft Office Keyboard Shortcut Keys : MS EXCEL Shortcut keys (Time saving)

Microsoft Office Keyboard Shortcut Keys MS EXCEL Shortcut keys (Time saving)
Move to next cell in row - Tab
Move to previous cell in row - Shift + Tab
Up one screen - Page Up
Down one screen - Page Down
Move to next worksheet - Ctrl + Page Down
Move to previous worksheet - Ctrl + Page Up
Go to first cell in data region - Ctrl + Home
Go to last cell in data region - Ctrl + End
Bold toggle for selection - Ctrl + B
Italic toggle for selection - Ctrl + I
Underline toggle for selection - Ctrl + U
Strikethrough for selection - Ctrl + 5
Change the font - Ctrl + Shift + F
Change the font size - Ctrl + Shift + P
Apply outline borders - Ctrl + Shift + 7
Remove all borders - Ctrl + Shift + Underline
Wrap text in same cell - Alt + Enter
Format cells - Ctrl + 1
Select font - Ctrl + Shift + F
Select point size - Ctrl + Shift + P
Format as currency - Ctrl + Shift + 4
Format as general - Ctrl + Shift + # (hash sign)
Format as percentage - Ctrl + Shift + 5
Format as number - Ctrl + Shift + 1
Autosum a range of cells - Alt + Equals Sign
Insert the date - Ctrl + ; (semi-colon)
Insert the time - Ctrl + Shift + ; (semi-colon)
Insert columns/rows - Ctrl + Shift + + (plus sign)
Insert a new worksheet - Shift + F11
Read Monitor Cell One - Alt + Shift + 1
Read Monitor Cell Two - Alt + Shift + 2
Read Monitor Cell Three - Alt + Shift + 3
Read Monitor Cell Four - Alt + Shift + 4
List Visible Cells With Data - Ctrl + Shift + D
Lists Data In Current Column - Ctrl + Shift + C
List Data In Current Row - Ctrl + Shift + R
Select Hyperlink - Ctrl + Shift + H
Move To Worksheet Listbox - Ctrl + Shift + S
Move To Monitor Cell - Ctrl + Shift + M
Select Worksheet Objects - Ctrl + Shift + O
List Cells At Page Breaks - Ctrl + Shift + B
Options Listbox - Insert + V

Postures to be followed while working on Compters way










Thursday, May 22, 2008

Microsoft Office Keyboard Shortcut Keys: MS WORD Shortcut Keys

Microsoft Office Keyboard Shortcut Keys: MS WORD Shortcut Keys

All Caps - CTRL+SHIFT+A

Annotation - ALT+CTRL+M

Auto Format - ALT+CTRL+K

Auto Text - F3 or ALT+CTRL+V

Bold - CTRL+B or CTRL+SHIFT+B

Bookmark - CTRL+SHIFT+F5

Copy - CTRL+C or CTRL+INSERT

Copy Format - CTRL+SHIFT+C

Copy Text - SHIFT+F2

Create Auto Text - ALT+F3

Date Field - ALT+SHIFT+D

Delete Back Word - CTRL+BACKSPACE

Delete Word - CTRL+DELETE

Dictionary - ALT+SHIFT+F7

Do Field Click - ALT+SHIFT+F9

Doc Maximize - CTRL+F10

Doc Move - CTRL+F7

Doc Restore - CTRL+F5

Doc Size - CTRL+F8

Grow Font - CTRL+SHIFT+.

Grow Font One Point - CTRL+]Hanging Indent - CTRL+T

Header Footer Link - ALT+SHIFT+R

Help - F1

Hidden - CTRL+SHIFT+H

Hyperlink - CTRL+K

Indent - CTRL+M

Italic - CTRL+I or CTRL+SHIFT+I

Justify Para - CTRL+J

Left Para - CTRL+L

Line Up Extend - SHIFT+UP

List Num Field - ALT+CTRL+L

Outline - ALT+CTRL+O

Outline Collapse - ALT+SHIFT+- or ALT+SHIFT+NUM -

Outline Demote - ALT+SHIFT+RIGHT

Outline Expand - ALT+SHIFT+=

Outline Expand - ALT+SHIFT+NUM +

Outline Move Down - ALT+SHIFT+DOWN

Outline Move Up - ALT+SHIFT+UP

Outline Promote - ALT+SHIFT+LEFT

Outline Show First Line - ALT+SHIFT+L

Lock Fields - CTRL+3 or CTRL+F11

Web Go Back - ALT+LEFT

Web Go Forward - ALT+RIGHT

Word Left - CTRL+LEFT

Word Left Extend - CTRL+SHIFT+LEFT

Word Right - CTRL+RIGHT

Common Errors in PC & There Solution

Common Errors in PC & There Solution



1. MONITOR LED IS BLINKINGCheck all the connections like Monitor Cable, Data cables,RAM, Display Card , CPU connections.

2. CONTINUOS THREE BEEPSProblem in RAM Connection.

3. THREE BEEPS ( 1 Long 2 Short)Problem in Display Card Connection

4. THREE LONG BEEPS PERIOD WISEProblem in BIOS or RAM (Basic Input Output System)

5. CONTINUOS NON-STOP BEEPINGKey Board Problem (I.e.; Some Key is pressed for Longer time)

6. FDD LED IS GLOWING CONTINUOSLYData cable to be connected properly (twisted cable).

7. NO DISPLAY ON THE SCREEN AT ALLHard Disk cable connected wrongly. Connect rightly seeing the Red mark (Faces power supply) and then Restart.

8. POWER LED IS OFFa. Check main power cordb. Check S.M.P.S.c. Check Mother Board connection

9. SHOWING CMOS ERRORReplace 3 Volt battery of Mother Board . Set Original Settings Manually.(Refer CMOS Setup chart)Enter your search termsSubmit search form

10. SHOWING FDD ERROR OR FLOPPY DRIVE IS NOT WORKING PROPERLYCheck Power cord of FDD , Data Cables , set CMOS & Finally the Check drive.

11. SHOWING HDD ERROR OR HARD DISK FAILUREa. Check Power Cordb. Check connection of HDDc. Check Data cabled. Check Hard Disk parameters in CMOS or Auto detecting Setting Partitions by Fdisk Command, then format it to set track 0. 12. MOTHER BOARD HANGS DUE TO UNSTABILIZED POWER SUPPLYa. Check S.M.P.Sb. RAM not functioning properly.c. Software problem (due to using pirated software)d. CPU fan not functioning properly.

13. DANCING SCREENa. Check Display card connectionb. Virus Problemc. Video Memory Problem

14. SHAKING SCREENa. Earthing problemb. Magnetic waves comes around

15. CPU CABINET SHOCKa. Check Earthingb. Check main power cord.

16. NON-SYSTEM DISK ERRORa. Floppy Drive having different disk (Non-Bootable Disk) OR CMOS Parameters for Hard Disk may not be set properly.b. Hard Disk Partitions may not be created. c. Hard Disk may not be formatted.

17. MISSING OPERATING SYSTEMThe System files missing namely Ie; command.com} - User File IO.SYS & MS_DOS.SYS } - Hidden Files. These above three files required for Start up of the system that can be transferred by using SYS C: Command OR While the time of formatting by using Format c:/u/s

18. MISSING COMMAND INTERPRETORMay the file Command.com is corrupted OR Infected by Virus OR Some one has Erased it.

19. SHOWING I/O ERRORa. The type of Hard Disk in CMOS may not be set properly.b. Operating system used for formatting is not valid

20. SHOWING DIVIDE OVER- FLOW MESSAGEa. May some Directories or Files crash with other files.b. Use CHKDSK/F or SCANDISK Command to correct it.

21. HARD DISK MAKING NOISE WHILE PROCESSINGa. Unstabilized power supply.b. Check for Loose Contact.c. Do not use Y Connectors for Hard Disk.d. It may crea

22. HARD DISK HANGS WHILE PROCESSINGCheck for Bad Sector by using CHKDSK or SCANDISK Command. If found format the Hard Disk and set Partition before that area.(This is the only procedure to use Hard Disk with Bad Sector) OR (To avoid Bad Sectors use Standard Power Supply)

23. HARD DISK NOT DETECTEDa. Check Power Connectorb. Check Data Cablesc. Check Jumpers

24. PARTITION NOT SHOWNOperating System where the Hard Disk formatted is not supported with present Mother Board. For Eg: Hard Disk formatted with Pentium System will hide their partitions for 486 System

25. MMX/DLL FILE MISSINGMay the above files may be corrupted due to power failure or Virus. Make available above files from other Computer. OR Reinstall Windows 98 Operating System. (This procedure will not make any effect on existing Data).

26. WINDOWS REGISTRY ERRORThis will happen due to sudden ON/OFF of the system. Final solution is to Reinstall Operating System

27. DISPLAY COLOUR DOES NOT MATCHa. Configure Display Card properly with their CD.b. The Standard setting for Windows is set it to 800x600 for better performance.

28. UNKNOWN DEVICE FOUNDMay the Driver utility is not provided with operating system . Insert Driver CD and install software for the above Device. (Every Device requires driver utility to set active



JavaScript - Browser & Version Redirect

If you maintain separate pages for Netscape and Internet Explorer browsers and want to additionally divide each browser's page into version pages, this script is for you. The script will create a link (or can be changed to automatically redirect) to browser[version number].html. (For example, a visitor with Netscape 4.5 would see a link to netscape4.html) Here there would be a link for msie4.html







<!-- ONE STEP TO INSTALL BROWSER & VERSION REDIRECT:

1. Add the last code into the BODY of your HTML document -->


<!-- STEP ONE: Copy this code into the BODY of your HTML document -->


<BODY>


<SCRIPT LANGUAGE="JavaScript">


<!-- Begin


var name = navigator.appName;

var vers = navigator.appVersion;

vers = vers.substring(0,1); // or 0,4 could return 4.5 instead of just 4


if (name == "Microsoft Internet Explorer")

url="msie";

else

url="netscape";

url += vers + ".html";

document.write('<center>');

document.write('<A HREF="' + url + '">Enter</A>');

document.write('</center>');


// You may make the redirection automatic by using this

// window.location=url;

// instead of the three document.write lines above


// End -->

</script>




Microsoft Windows SHORTCUT KEYS: Run Commands

Microsoft Windows SHORTCUT KEYS: Run Commands



compmgmt.msc - Computer management

devmgmt.msc - Device manager

diskmgmt.msc - Disk management

dfrg.msc - Disk defrag

eventvwr.msc - Event viewer

fsmgmt.msc - Shared folders

gpedit.msc - Group policies

lusrmgr.msc - Local users and groups

perfmon.msc - Performance monitor

rsop.msc - Resultant set of policies

secpol.msc - Local security settings

services.msc - Various Services

msconfig - System Configuration Utility

regedit - Registry Editor

msinfo32 _ System Information

sysedit _ System Edit

win.ini _ windows loading information(also system.ini)

winver _ Shows current version of windows

mailto: _ Opens default email client

command _ Opens command prompt

Tuesday, May 20, 2008

Microsoft SQL Server 2008

Microsoft SQL Server 2008
— Code name “katmai”
— Currently in Beta
— CTP available for free download
— CTP contains working features end-end
— RTM in Q3 2008

System Requirements
— Supported Operating Systems:
— Windows Server 2003 Service Pack 2
— Windows Server 2008
— Windows Vista
— Windows XP Service Pack 2
— For all download types:
— 32-bit systems:
— Intel compatible Pentium III 600 MHz (1 GHz recommended)
— 64-bit systems:
— 1 GHz CPU
— 512 MB of RAM (1 GB recommended)
— 675 MB of available hard disk space

What’s New?
— Platform Features (DBA)
— T-SQL Features
— Data Types
— Reporting Services

Platform Features
— Transparent Data Encryption
— External Key Management
— Data Auditing (change tracking)
— Hot Add CPU
— Transparent Failover
— Policy Implementation
— Auto Synchronization (conflict detection)

T-SQL Features
— Table Value Parameters
— FileStream Object Storage
— Merge
— Variable initializers
— Row constructors with >1 row
— Compound operators (+=)
— Grouping sets (extension of Group By clause)
— Intellisense added
— New Collations
— CLR UDT 2GB capacity
— Integrated Full Text Search
— Sparse Columns (Indexing)

T-SQL Data Types
— Geometery (for planar shapes, i.e. whse layout)
— Geography (for GPS coordinates)
— HierarchyID
— date
— time
— datetime2
— Datetimeoffset (timezone )

Business Intelligence
— SSRS free with SQL Server 2008
— Incorporates Dundas Controls
— Render to MS-Word
— Scale out Analysis (read-only)
— Subspace computations/aggregations
— New Cube Design Tools
— Best Practice Design Alerts
— IIS Agnostic SSRS

New Features of Visual Studio 2008 and .NET Framework 3.5

New Features of Visual Studio 2008 and .NET Framework 3.5

• Javascript Intellisense
• Javascript Debugging
• CSS Web Designer and CSS Support
• Vertical Split View Support
• Debug .NET Framework Source
• Multi-targeting support
– .NET Framework 2.0, 3.0 and 3.5


JS Intellisense



























Immediate Window



















AJAX Intellisense















Other Visual Studio 2008 Features
• In-built Silverlight Library
• WPF Support
• New AJAX Extender Controls
• Intellisense Improvements
• In-built C++ SDK
• Microsoft Popfly Support
• Nested ASP.NET Masterpages

.NET Framework 3.5 Features
• Anonymous Types
• Automatic Properties, Object Initializers and Collection Initializers
• Extension Methods
• Lambda Expressions
• LINQ to SQL
• LINQ to XML
• LINQ to Objects

Microsoft Windows XP SHORTCUT KEYS

Microsoft Windows SHORTCUT KEYS: Windows XP Shortcuts

ALT+- (ALT+hyphen) Displays the Multiple Document Interface (MDI) child window's System menu
ALT+ENTER View properties for the selected item
ALT+ESC Cycle through items in the order they were opened
ALT+F4 Close the active item, or quit the active program
ALT+SPACEBAR Display the System menu for the active window
ALT+TAB Switch between open items
ALT+Underlined letter Display the corresponding menu
BACKSPACE View the folder one level up in My Computer or Windows Explorer
CTRL+A Select all
CTRL+B Bold
CTRL+C Copy
CTRL+I Italics
CTRL+O Open an item
CTRL+U Underline
CTRL+V Paste
CTRL+X Cut
CTRL+Z Undo
CTRL+F4 Close the active document
CTRL while dragging Copy selected item
CTRL+SHIFT while dragging Create shortcut to selected iteM
CTRL+RIGHT ARROW Move the insertion point to the beginning of the next word
CTRL+LEFT ARROW Move the insertion point to the beginning of the previous word
CTRL+DOWN ARROW Move the insertion point to the beginning of the next paragraph
CTRL+UP ARROW Move the insertion point to the beginning of the previous paragraph
SHIFT+DELETE Delete selected item permanently without placing the item in the Recycle Bin
ESC Cancel the current task
F1 Displays Help
F2 Rename selected item
F3 Search for a file or folder
F4 Display the Address bar list in My Computer or Windows Explorer
F5 Refresh the active window
F6 Cycle through screen elements in a window or on the desktop
F10 Activate the menu bar in the active program
SHIFT+F10 Display the shortcut menu for the selected item
CTRL+ESC Display the Start menu
SHIFT+CTRL+ESC Launches Task Manager
SHIFT when you insert a CD Prevent the CD from automatically playing
WIN Display or hide the Start menu
WIN+BREAK Display the System Properties dialog box
WIN+D Minimizes all Windows and shows the Desktop
WIN+E Open Windows Explorer
WIN+F Search for a file or folder
WIN+F+CTRL Search for computers
WIN+L Locks the desktop
WIN+M Minimize or restore all windows
WIN+R Open the Run dialog box
WIN+TAB Switch between open items

Sunday, May 18, 2008

PHP/MySQL How to Create and use Tell a Friend Script in PHP

PHP/MySQL How to Create and use Tell a Friend Script in PHP
How to Create and use Tell a Friend Script in PHP
This Script for Tell a Friend featuring
· Page tracking for landing page
· PHP Validation
· Ability to send to muliple friends at once
· User Email/Message optional or required
This PHP script consists of 2 files
1. config.php
2. tell.php
Where config.php can be used for Site Options and configuration. Open config.php and edit it to your specification, use notepad/wordpad/frontpage/dreamweaver etc. to edit it.
Setup Options:
Require Email -> Require user to enter their email to send a TAF (Tell-a-Friend) message, 1= yes, 2=no
Require Message -> Require user to enter a message to send a TAF (Tell-a-Friend) message, 1= yes, 2=no
Multiple Emails -> Allow users to send multiple emails (separated by Comma) to friends.
Current Landing Page -> If enabled, message will include the current page to which the user sent the TAF from.
Site Title -> Title of the site, e.g.: allfree-stuff.com All Free Stuff for you
Site URL -> URL of the site, e.g.: http://www.allfree-stuff.com
Site Email -> To be used for Reply to and From headers
Email Charset -> UTF-8 should suit most, but you can localize it if needed
Email Type -> text/plain (text only) or text/html (html+text)
Email Subject -> Subject of Email sent
Email Template -> Email to be sent to user
To Use this Script in your website
To use this script, place this code andwhere where you want the counter to appear:
Create the following 2 files and upload them in your website.
CONFIG.PHP
//Site Options and configuration
//Require user to enter their email -> 1=yes,2=no
$REQUIRE_EMAIL = 1;
//Require user to enter a message -> 1=yes,2=no
$REQUIRE_MESS = 1;
//Allow Multiple emails be sent -> 1=yes,2=no
//Multiple emails separated comma
$MULTIPLE_EMAILS = 1;
//Send current page in email -> 1=yes,2=no
$CUR_PAGE = 1;
//Site title
$EMAIL_OPTIONS['TITLE'] = 'Demo of Tell A Friend PHP Script ' ;
//Site URL
$EMAIL_OPTIONS['URL'] = 'http://allfree-stuff.com';
//Main email
$EMAIL_OPTIONS['FROM'] = 'webmaster@allfree-stuff.com';
//Charset
$EMAIL_OPTIONS['CHARSET'] = 'utf-8';
//Type -> HTML=text/html Text = text/plain
$EMAIL_OPTIONS['TYPE'] = 'text/html';
//Email subjects
$EMAIL_OPTIONS['EMAIL_SUBJECT'] = 'Tell A Friend For You' ;
/*
For Templates you can use the following variables:
$+name+$ -> User Name Sending Contact
$+page_send+$ -> Page user is comming from
$+message_text+$ -> Contact Message
*/
//EMAIL Template
$EMAIL_TEMPLATE = 'Hello,
Your friend $+name+$ decided to sent you a tell-a-friend notice.';
if($CUR_PAGE == 1){
$EMAIL_TEMPLATE .= 'You can visit the page your friend sent his email: $+page_send+$';
}
if($REQUIRE_MESS == 1){
$EMAIL_TEMPLATE .= 'Your friend\'s message was: $+message_text+$';
}
$EMAIL_TEMPLATE .= 'You can visit our main url @ '.$EMAIL_OPTIONS['URL'].',
'.$EMAIL_OPTIONS['TITLE'].'';
/* +++++++++++++++++++++++++++++++++++++
END FILE CONFIGURATION
---------------------------------------*/
?>
TELL.PHP
//Include configuration file and function file
//(default location is in the same directory)
include_once('config.php') ;
//Function to check for valid email
function is_valid_email($string) {
return preg_match('/^[.\w-]+@([\w-]+\.)+[a-zA-Z]{2,6}$/', $string) ;
}
//Check cur page
if($_POST['this_page'] == NULL){$_POST['this_page'] = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; }
//If contact is being sent:
if($_POST['submit_id'] == 1){
//Check name entered
if($_POST['name'] == NULL){ $message = 'Please enter your name.';}
//check if email is enetered
if($message == NULL && $REQUIRE_EMAIL == 1 && is_valid_email($_POST['email']) == false ){ $message = 'Please enter a valid email.';}
//check if message is entered
if($message == NULL && $REQUIRE_MESS == 1 && $_POST['message_text'] == NULL){ $message = 'Please enter a comment.';}
//check to send emails
if($message == NULL)
{
if($MULTIPLE_EMAILS == 1){
//multiple emails
$valid_emails = array();
$emails = explode(',',$_POST['toemails']);
foreach($emails as $email){
$email = trim($email);
if($email != NULL){
if(is_valid_email($email) == false ){
$temp_message .= 'We couldn\'t send and email to: '.$email.' because it is not valid.';
} else {
array_push($valid_emails,$email);
}
}
}
if(count($valid_emails) <=0 ){
$message = 'Please enter at least one email to send message to.';
}
} else {
//one email
if(is_valid_email($_POST['toemails']) == false ){ $message = 'Please enter a valid friend\'s email.';}
}
}
//End verifications, start processing
if($message == NULL){
//compose user message templates replaces
$do_search = array('$+name+$','$+page_send+$','$+message_text+$');
$do_replace = array($_POST['name'],$_POST['this_page'],$_POST['message_text']);
$subject = str_replace($do_search,$do_replace,$EMAIL_TEMPLATE);
//Set Headers
$headers = "Return-Path: ".$EMAIL_OPTIONS['TITLE']." <".$EMAIL_OPTIONS['FROM'].">\r\n";
$headers .= "From: ".$EMAIL_OPTIONS['TITLE']." <".$EMAIL_OPTIONS['FROM'].">\r\n";
$headers .= "Content-Type: ".$EMAIL_OPTIONS['TYPE']."; charset=".$EMAIL_OPTIONS['CHARSET'].";\n\n\r\n";
if($MULTIPLE_EMAILS == 1){
foreach($valid_emails as $this_email){
// mail ($this_email,$EMAIL_OPTIONS['EMAIL_SUBJECT'],$subject,$headers);
$one_pass = true ;
}
} else {
mail ($_POST['toemails'],$EMAIL_OPTIONS['EMAIL_SUBJECT'],$subject,$headers);
}
$message = 'Your emails have been sent, thank you.';
$message .= $temp_message ;
$_POST = NULL ;
}
}
if($message != NULL){
?>
" method=post>
Your name:
" name=name>
if($REQUIRE_EMAIL == 1){?>
Your Email:
" name=email>
Your Friend's emails:
Separated by comma
Your Friend's email:
" name=toemails>
if($REQUIRE_MESS == 1){?>
Message:

" name=this_page>

Microsoft Windows SHORTCUT KEYS : Run Commands To Access The Control Panel

Microsoft Windows SHORTCUT KEYS : Run Commands To Access The Control Panel

Add/Remove Programs control appwiz.cpl

Date/Time Properties control timedate.cpl


Display Properties control desk.cpl


FindFast control findfast.cpl


Fonts Folder control fonts


Internet Properties control inetcpl.cpl


Keyboard Properties control main.cpl keyboard


Mouse Properties control main.cpl

Multimedia Properties control mmsys.cpl

Network Properties control netcpl.cpl

Password Properties control password.cpl

Printers Folder control printers

Sound Properties control mmsys.cpl sounds

System Properties control sysdm.cpl

Changing MySQL root user password using mysql sql command

Changing MySQL root user password using mysql sql command

This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user kamal:

1) Login to mysql server, type following command at shell prompt:
$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt):
mysql> use mysql;

3) Change password for user kamal:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='kamal';

4) Reload privileges:mysql> flush privileges;mysql> quit
This method you need to use while using PHP or Perl scripting.

Microsoft Windows SHORTCUT KEYS : Command Prompt

Microsoft Windows SHORTCUT KEYS : Command Prompt


ANSI.SYS Defines functions that change display graphics, control cursor movement, and reassign keys.

APPEND Causes MS-DOS to look in other directories when editing a file or running a command.

ARP Displays, adds, and removes arp information from network devices.

ASSIGN Assign a drive letter to an alternate letter.

ASSOC View the file associations.

AT Schedule a time to execute commands or programs.

ATMADM Lists connections and addresses seen by Windows ATM call manager.

ATTRIB Display and change file attributes.

BATCH Recovery console command that executes a series of commands in a file.

BOOTCFG Recovery console command that allows a user to view, modify, and rebuild the boot.ini

BREAK Enable / disable CTRL + C feature.

CACLS View and modify file ACL's.

CALL Calls a batch file from another batch file.

CD Changes directories.

CHCP Supplement the International keyboard and character set information.

CHDIR Changes directories.

CHKDSK Check the hard disk drive running FAT for errors.

CHKNTFS Check the hard disk drive running NTFS for errors.

CHOICE Specify a listing of multiple options within a batch file.

CLS Clears the screen.

CMD Opens the command interpreter.

COLOR Easily change the foreground and background color of the MS-DOS window.

COMP Compares files.

COMPACT Compresses and uncompress files.

CONTROL Open control panel icons from the MS-DOS prompt.

CONVERT Convert FAT to NTFS.

COPY Copy one or more files to an alternate location.

CTTY Change the computers input/output devices.

DATE View or change the systems date.

DEBUG Debug utility to create assembly programs to modify hardware settings.

DEFRAG Re-arrange the hard disk drive to help with loading programs.

DEL Deletes one or more files.

DELETE Recovery console command that deletes a file.

DELTREE Deletes one or more files and/or directories.

DIR List the contents of one or more directory.

DISABLE Recovery console command that disables Windows system services or drivers.

DISKCOMP Compare a disk with another disk.

DISKCOPY Copy the contents of one disk and place them on another disk.

DOSKEY Command to view and execute commands that have been run in the past.

DOSSHELL A GUI to help with early MS-DOS users.

DRIVPARM Enables overwrite of original device drivers.

ECHO Displays messages and enables and disables echo.

EDIT View and edit files.

EDLIN View and edit files.

EMM386 Load extended Memory Manager.

ENABLE Recovery console command to enable a disable service or driver.

ENDLOCAL Stops the localization of the environment changes enabled by the setlocal command.

ERASE Erase files from computer.

EXIT Exit from the command interpreter.

EXPAND Expand a M*cros*ft Windows file back to it's original format.

EXTRACT Extract files from the M*cros*ft Windows cabinets.

FASTHELP Displays a listing of MS-DOS commands and information about them.

FC Compare files.

FDISK Utility used to create partitions on the hard disk drive.

FIND Search for text within a file.

FINDSTR Searches for a string of text within a file.

FIXBOOT Writes a new boot sector.

FIXMBR Writes a new boot record to a disk drive.

FOR Boolean used in batch files.

FORMAT Command to erase and prepare a disk drive.

FTP Command to connect and operate on a FTP server.

FTYPE Displays or modifies file types used in file extension associations.

GOTO Moves a batch file to a specific label or location.

GRAFTABL Show extended characters in graphics mode.

HELP Display a listing of commands and brief explanation.

IF Allows for batch files to perform conditional processing.

IFSHLP.SYS 32-bit file manager.

IPCONFIG Network command to view network adapter settings and assigned values.

KEYB Change layout of keyboard.

LABEL Change the label of a disk drive.

LH Load a device driver in to high memory.

LISTSVC Recovery console command that displays the services and drivers.

LOADFIX Load a program above the first 64k.

LOADHIGH Load a device driver in to high memory.

LOCK Lock the hard disk drive.

LOGON Recovery console command to list installations and enable administrator login.

MAP Displays the device name of a drive.

MD Command to create a new directory.

MEM Display memory on system.

MKDIR Command to create a new directory.

MODE Modify the port or display settings.

MORE Display one page at a time.

MOVE Move one or more files from one directory to another directory.

MSAV Early M*cros*ft Virus scanner.

MSD Diagnostics utility.

MSCDEX Utility used to load and provide access to the CD-ROM.

NBTSTAT Displays protocol statistics and current TCP/IP connections using NBT

NET Update, fix, or view the network or network settings

NETSH Configure dynamic and static network information from MS-DOS.

NETSTAT Display the TCP/IP network protocol statistics and information.

NLSFUNC Load country specific information.

NSLOOKUP Look up an IP address of a domain or host on a network.

PATH View and modify the computers path location.

PATHPING View and locate locations of network latency.

PAUSE Command used in batch files to stop the processing of a command.

PING Test / send information to another network computer or network device.

POPD Changes to the directory or network path stored by the pushd command.

POWER Conserve power with computer portables.

PRINT Prints data to a printer port.

PROMPT View and change the MS-DOS prompt.

PUSHD Stores a directory or network path in memory so it can be returned to at any time.

QBASIC Open the QBasic.

RD Removes an empty directory.

REN Renames a file or directory.

RENAME Renames a file or directory.

RMDIR Removes an empty directory.

ROUTE View and configure windows network route tables.

RUNAS Enables a user to execute a program on another computer.

SCANDISK Run the scandisk utility.

SCANREG Scan registry and recover registry from errors.

SET Change one variable or string to another.

SETLOCAL Enables local environments to be changed without affecting anything else.

SETVER Change MS-DOS version to trick older MS-DOS programs.

SHARE Installs support for file sharing and locking capabilities.

SHIFT Changes the position of replaceable parameters in a batch program.

SHUTDOWN Shutdown the computer from the MS-DOS prompt.

SMARTDRV Create a disk cache in conventional memory or extended memory.

SORT Sorts the input and displays the output to the screen.

START Start a separate window in Windows from the MS-DOS prompt.

SUBST Substitute a folder on your computer for another drive letter.

SWITCHES Remove add functions from MS-DOS.

SYS Transfer system files to disk drive.

TELNET Telnet to another computer / device from the prompt.

TIME View or modify the system time.

TITLE Change the title of their MS-DOS window.

TRACERT Visually view a network packets route across a network.

TREE View a visual tree of the hard disk drive.

TYPE Display the contents of a file.

UNDELETE Undelete a file that has been deleted.

UNFORMAT Unformat a hard disk drive.

UNLOCK Unlock a disk drive.

VER Display the version information.

VERIFY Enables or disables the feature to determine if files have been written properly.

VOL Displays the volume information about the designated drive.

XCOPY Copy multiple files, directories, and/or drives from one location to another.

TRUENAME When placed before a file, will display the whole directory in which it exists

TASKKILL It allows you to kill those unneeded or locked up applications