Monday, June 7, 2010

>> Top 10 Useful Excel Tips And Tricks >> How To Create My Own Web Page Using Html Code >> How To Create a mySQL Database Using PHP

Copyright Footer note

The above code will give output in your browser as we’ve planned to (see the first image). Playing with the tags makes you further clear and adapted to web designing using HTML.

Adding images and other hyperlinks.

After making simple page, you can add images, colored fonts, hyperlinks etc to make it more user friendly.

You can use and tags to include hyper links and images.

See the example below(put it under the content body tag):

http://www.google.com”>

<img border=”0″ src=”http://www.google.com.np/intl/en_com/images/logo_plain.png”/>

is the most popular search engine in this world.


http://www.google.com”>Click here to go to Google.com

In the above example, Google’s logo image will be loaded using, tag and that tag is enveloped under tag which enables the image to be clicked.

Similarly you can envelope text to create hyperlinks.

You can also change the size and font colors by applying the following syntax.

FONT TO BE FORMATED

To create lists of texts or navigation,

Example:

    tag creates a list block and
  • lists them in proper line break. In above example, we’ve listed the text with hyperlinks.

    After tweaking and playing with the tags you may get the good result.

    For instance take the sample from below:

Top 10 Useful Excel Tips And Tricks

Posted: 23 Mar 2010 02:57 AM PDT

I’ve collected some popular tips and tricks that might be useful and interesting for you.

1. Wrapping texts in a single cell.
You can wrap texts in a cell. Doing this, it will display multiple lines with in the
cell. You can wrap texts in a cell by pressing ALT + Enter in the cell. Or you can go to
Format –> Cells –> Alignment and select Wrap Text.


2. use of Enter key
When you hit the ENTER key in Excel, you will automatically drop down to the
cell just below it. But you can change this default and change this feature.
a. Go to Tools -> Option
b. Select the Edit Tab
c. Under Move Selection after Enter, you can either select a different
Direction for the drop down box, or remove the check in front of the option according to your need.
Note: If uncheck it, the ENTER key will not move
you to another cell rather you’ll need to use the arrow keys to move around.

3. Current date or time
You can use the following formula to get current date with time in excel.
=NOW() ?shows both, current date and time.
=TODAY() ?shows only today’s date.

In bonus with this trick, =Time(hours, minutes, seconds) value gives you the time you entered in specific format.

For example: =TIME(1,2,3) outputs, 1:02 AM
=TIME(21,2,3) outputs, 9:02 AM

4. Shading the rows alternately
This tips can be helpful if you most of the time gets confused on the rows you are watching. Applying shades as you have seen in most of the graphical representation papers around you helps you to avoid confusion.

To do this,
• Highlight the range of cells or rows or columns that you want to format by left clicking and dragging the area.
• Go to Format–>Conditional Formatting

• In the Conditional Formatting dialogue box, select Formula Is from the first drop-down list box, and enter=MOD(ROW(),2)=0 in the second box.

• Click the Format button to bring up the Format Cells dialog box.
• Select the Patterns tab and specify a color for the shaded rows.

• Click OK twice to return to your worksheet.

5. Change the color of sheet names:

Right click on sheet you want to change the color of and select “Tab color” option to change the worksheet tab colors. Group them with similar colors if you have lot of sheets, it lets you to easily recognize the specific sheet.

6. Sort the texts from Left to right instead of up to bottom

If your data flows from left to right instead of top to bottom, just change the sort orientation from “sort options” in the Data –> sort menu–> Option.

7. Move or copy a worksheet
You may know that you can just drag and drop a worksheet to a different spot in the workbook. But for you folks who get joy from dialog boxes (and truthfully, this one gives you more options), here you go:
To move or copy a worksheet
1. Right-click a tab, and then click Move or Copy on the shortcut menu.
2. In the Move or Copy dialog box, you have options:
o To move the worksheet to a spot within its own workbook, select a sheet in the Before sheet box.
o To move the worksheet to another open workbook, select the workbook in the To book list and then click OK.
o To keep a copy of the worksheet you’re moving in this workbook (rather than just moving it), select the Create a copy box.

8. Insert a line break in a cell
Press ALT+ENTER to start a new line while you’re typing or editing data.

9. Skip through your worksheet using shortcut
As you use ALT + TAB to skip through the opened program window in windows you can skip through the worksheets.
To move one worksheet to the right
* Press CTRL+PAGE DOWN.

To move one worksheet to the left
* Press CTRL+PAGE UP.

10. Calculator in excel toolbar
Excel is the master of calculator, but sometimes you need a handy calculator. To get the calculator in the toolbar,
• On the View menu, click Toolbars, and then click Customize.
• Click the Commands tab.
• In the Categories: list, click Tools, and in the Commands: list, click Custom (Important: The one with the gray calculator graphic!).
• Drag the selected command from the Commands: list to a toolbar.
• Click Close.

Drag and drop to the tool bar
Hope these tricks collected were useful to you.

How To Create My Own Web Page Using Html Code

Posted: 23 Mar 2010 02:04 AM PDT

Creating a simple webpage in HTML. Before you start coding, let me assume the following facts,
You know simple html tags like, HTML, BODY, TITLE, HEAD, TABLE, LISTS, etc. and some parameters like, WIDTH, HEIGHT, COLOR, BORDER, CELLSPACING, PADDING, etc.

Lets make a simple HTML page format as below:

To do so, we’ll be using TABLE, H1,H2, FONTS, HYPERLINKS, LISTS, HR etc.

Open up the notepad save it as “webpage.html” (with quotes)

And then create a table with similar format:

Your page will contain Page header, Navgation bar, Footer, Contents part.

To create a table similar to the format above, use the following tags.

Page title

PAGE HEADER

FOOTER PART

Now you have the basic layout ready. The things we need now is to fill the blank tables with appropriate contents.

For example:

NAVIGATION BAR

CONTENTS PART

Page Title


YOUR Contents goes here, type your text, insert hyperlinks, lists, images here to beautify your web page.

Page Title


http://www.google.com”><img border=”0″ src=”http://www.google.com.np/intl/en_com/images/logo_plain.png”/>

is the most popular search engine in this world.


http://www.google.com”>Click here to go to Google.com

Copyright Footer note

It will show you the page like this:

Hope this tutorial gave you some basic idea of designing webpage using notepad and HTML.

How To Create a mySQL Database Using PHP

Posted: 22 Mar 2010 06:12 PM PDT

mySQL database is most popular database system used in internet. Today I am going to show you how to create a mySQL database using PHP script.

To create a new database, we’ll be using the following syntax here;

CREATE DATABASE database_name

But, we must use the mysql_query() function to execute the above command. This mysql_query() function is used to send a query to a MySQL connection.

After we have base commands ready, we can arrange it to access and create your new MySQL database.

Before we proceed further, you must keep in mind that you must have your web host supporting at least one MySQL database connection and you have full access to your web host control panel. However we are not going to enter the controlpanel zone, but the PHP script surely will have to.

Now let’s assume the following,

$dbhost=’localhost’; // is your local host name.
$dbusername=’anup’; // is your web host username
$dbuserpass=’anup123′; // is your web host cpanel password
$dbname=’anup_database; // is your new database name to be created

The following script will create a new database named, anup_database.

$dbhost=’localhost’; // is your local host name.
$dbusername=’anup’; // is your web host username
$dbuserpass=’anup123′; // is your web host cpanel password
$dbname=’anup_database; // is your new database name to be created
$con = mysql_connect ($dbhost, $dbusername, $dbuserpass);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}

if ((“CREATE DATABASE $dbname”,$con))
{
echo “Your new Database created”;
}
else
{
echo “Error creating database: ” . mysql_error();
}

mysql_close($con);
?>

$con variable is set to connect to the database, if it fails to it outputs with Could not connect mysql error.

If it becomes successful to create new database, it outputs with Your new Database created. Else it will result Error creating database with mysql error listed.

Here, w are successfully done to create a new database.

Since we’ve created database we can create tables after then.

Let me not end this tutorial right here, else you might be smothering about what to do next.

Let me teach you how to create a table using PHP again.

To Create a table, we are using the following syntax.

CRATE TABLE table_name

(
column_name1 data_type,
column_name2 data_type,
column_name3 data_type,
….

)

It will create the specified table in the specified mysql database name.

While creating we added the CREATE DATABASE syntax in the mysql_query() function to execute it. In the same way we’ll be adding CREATE TABLE syntax to the mysql_query(function).

For an example, lets say that, we need to create a table named “people”, with three columns. And we need the column names: “FirstName”, “LastName” and “Age”.

The following command creates table with $dbname variable (it varies with variable you provide before the command executes), here in our case, anup_database, as we’ve specified $dbname=’anup_database’; as our data base name.

// Create table
mysql_select_db(“$dbname”, $con);
$sql = “CREATE TABLE people
(
FirstName varchar(15),
LastName varchar(15),
Age int
)”;

// Execute query
mysql_query($sql,$con);

mysql_close($con);

Note:The above script is not complete and your browser will never accept ist as a PHP code until your code begins and ends with

Varchar(15) data type allows you to enter only 15 characters (you can see that I’ve added it after the column FirstName and LastName). And int (in the Age column) refers to an integer.

Upto now what far we’ve reached is, with complex combinations of commands and functions, we will be able to create new database with new table and columns.

You can easily combine the both scripts in to one file, like in the example below:

$dbhost=’localhost’; // is your local host name.
$dbusername=’anup’; // is your web host username
$dbuserpass=’anup123′; // is your web host cpanel password
$dbname=’anup_database; // is your new database name to be created
$con = mysql_connect ($dbhost, $dbusername, $dbuserpass);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}

if ((“CREATE DATABASE $dbname”,$con))
{
echo “Your new Database created”;
}
else
{
echo “Error creating database: ” . mysql_error();
}

mysql_close($con);

// Create table
mysql_select_db(“$dbname”, $con);
$sql = “CREATE TABLE people
(
FirstName varchar(15),
LastName varchar(15),
Age int
)”;

// Execute query
mysql_query($sql,$con);

mysql_close($con);
?>

Hope that was pretty helpful.

Saturday, June 5, 2010

How to set up Home LAN

Posted: 21 Mar 2010 05:29 PM PDT

Enabling Home LAN will allow you to communicate between two computers and hence share or transfer files at a very fast rate (varies according to your Ethernet card speed) and also it enables you to share the internet connection between two computers. If you have two or more computers at home, then it makes sense to have them on a network. Setting up a home network is no longer a tedious task once you go through our following tutorial.

Things you’ll need:

At least 2 computers

Ethernet Cable: you can buy it from the local computer parts shop

Wireless router: this may be optional if you only want to network between two computers.

Ethernet card with driver installed on both of your computers

First of all run network configuration wizard on both computers by going to Start->Control Panel->Network connections and click on Set up home or small office network. (see below)

Click next and then follow the screenshots: (see below)

Click Next (see below)

Check on Ignore disconnected network hardware and choose your Ethernet adapter and then click next. (see below)

Choose the appropriate connection method. To connect two computers check on the second option, This computer connects to the Internet through a residential gateway or through another computer on my network. If you want to share the internet connection between two computers as well then select the first option, This computer connects directly to the internet. The other computers on my network connect to the internet through this computer.

For better understanding click on View an example link.

Type in your computer description (optional) and computer name then press Next.

Note:

To get the name of your computer accurately, go to Startà right click on My computerà Properties à Go to Computer Name Tab

Note the Full computer name, in my case it’s SAAZ-117D10A6F5 and also the WORKGROUP, it’s usuallyMSHOME.

Leave the workgroup name MSHOME (by default) and click Next

Set file sharing ON if you want to share files with other computers in network. Then click Next.

You’ll be provided the details you entered after the above procedure: (see below). Make sure that everything is ok and click Next.

Select Just finish the wizard: I don’t need to run the wizard on other computers and click Next.

Click Finish to complete wizard. The system may ask to restart your pc to load the extra drivers needed for LAN Communication.

And you are done by setting up connection between two computers.

To connect with more than two computers, the basic principal stays the same. Simply make sure that all the computers you want to set up in LAN are connected on a network via hubs, switches, etc and then simply assign a different IP Address to each machine. Just make sure that they are all on the same Subnet Mask.

Note: Usually you don’t need to enter IP Addresses and you don’t need to restart computers to make network connection in windows XP platform.

However if you need to set up the IP addresses of two computers follow these steps:

Setting up different IP addresses

Now you will have to set IP addresses on computers. You can do this by going to Start->Control panel->Network connection and right click on Local area Connection icon and left click on Properties.


In the list find Internet protocol (TPC/IP) select it then click Properties.

In the box check on Use the following IP address and set IP address and Subnet mask. IP address by default can be 192.168.0.1 and Subnet Mask 255.255.255.0. Make sure that the fourth number section of IP address is different on each computer.

For example, if first computer’s IP: 192.168.0.1 then the second computers’ must be 192.168.0.2.
Then click Ok.

Restart both computers if needed. Now you made network between two computers.

Now you can connect both or multiple computers.

Hope it helped you.

How To Truncate Text Using PHP

Posted: 21 Mar 2010 04:36 AM PDT

You may have seen the short summary of the articles in several blogspot and wordpress blogs. What if you want it in your own CMS website? Well, you can apply your own style of shortening or summarizing your content article by simply following the tutorial below.

We will be using substr() to truncate the specified number of texts you want to show. The substr() returns the portion of string specified by the start and length parameters.For example,

echo substr(‘ABCDEF’,1);
?>

Results BCDEF on your web browser.

The parameter 1 says to omit the first character, A. If no number parameter is given after that then it loads all the character “BCDEF”

On the other hand,

echo substr(‘ABCDEF’,1,3);
?>

results BCD on your browser screen.

The first parameter 1 refers to omit the first character,”A” in the given string. And the paratemeter 3 refers to show only 3 characters, “BCD” .

In this way we can limit the characters to load on the web browser. Hence we’ll be applying same principle to truncate the text.

Let’s say the we have a variable “$myText” which contains the texts that are needed to be truncated.

The above code sample will load only 25 characters (including space) from the begining.

If you try the above sample code in your browser it will give the following result:

“this is textthis is textt…”

If you are familar with few php scripts then you may also know that the external text files can be loaded in the variable “$myText” for a simple example, you can use; $string = fopen(“textfile.txt”,”r”);

You may also add, permalinks after the summary.

Hope it was helpful.

Tuesday, June 1, 2010

How to Watch NCAA Basketball Online

Posted: 19 Mar 2010 02:45 PM PDT

Want to watch america’s most popular sporting events ? In this aricle I will show you how to watch NCAA basketball online.

1)Go to http://mmod.ncaa.com/

2) You need to check is your browser ready and compatible for the High Quality viewer.If it’s ready you’ll see message as below

If your browser isn’t ready you need to install Silverlight. To install Silverlight, click on the “Get HQ” button and follow the prompts to download and install Silverlight

3)To start watch NCAA Basketball click on launch button

4) “Boss Button” at the top right can be very useful for those who watch NCAA Basketball at work . Clicking on the “Boss Button” will open a fake Office document so it may appear at first glance like you’re actually doing legitimate work. To return to the game, click anywhere on the screen with your mouse.

Sunday, May 30, 2010

>> How To Unlock Windows 7 Hidden Themes >> Blogger Hacks

How To Unlock Windows 7 Hidden Themes

Posted: 15 Mar 2010 07:43 AM PDT

Did you know that Windows 7 has hidden themes for different regions like Australia, Canada, Great Britain, United States and South Africa?Here is simple windows 7 tweak, which will show you how to unlock windows 7 hidden themes

1) Go to windows Explorer

2)Click on Organize -> Folder and Search Options

3) In Folder options click on View tab and select Show hidden files, folders and drivers and uncheck Hide protected operating system files (Recommended). If prompted with confirmation, click Yes.

4)Browse to \Windows\Globalization\MCT\ (just type \Windows\Globalization\MCT\ in windows 7 search field ) . There are five folders in the name with format MCT-XX . Go into the folder that you want to activate its theme and double click on the XX.theme file to apply the theme to the Windows 7 desktop system. Once a theme is ran and activated, the theme will be remembered and saved into Personalization options

Blogger Hacks

Posted: 14 Mar 2010 08:48 PM PDT

Here you will find great blogger hacks which are useful to bloggers using the Blogger platform. Enjoy!

Expandable Posts or Read More Hack

Here is classic way of expanding posts which takes the reader to the post page upon clicking “Read more” link.

1) Login to blogger dashboard and go to Layout->Edit Html

2) Find and add this code before it


<b:if cond=’data:blog.pageType != “item”‘>
<script type=”text/javascript”>

var fade = false;
function showFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName(’span’);
for (var i = 0; i &lt; spans.length; i++) {
if (spans[i].id == “fullpost”) {
if (fade) {
spans[i].style.background = peekaboo_bgcolor;
Effect.Appear(spans[i]);
} else spans[i].style.display = ‘inline’;
}
if (spans[i].id == “showlink”)
spans[i].style.display = ‘none’;
if (spans[i].id == “hidelink”)
spans[i].style.display = ‘inline’;
}
}

function hideFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName(’span’);
for (var i = 0; i &lt; spans.length; i++) {
if (spans[i].id == “fullpost”) {
if (fade) {
spans[i].style.background = peekaboo_bgcolor;
Effect.Fade(spans[i]);
} else spans[i].style.display = ‘none’;
}
if (spans[i].id == “showlink”)
spans[i].style.display = ‘inline’;
if (spans[i].id == “hidelink”)
spans[i].style.display = ‘none’;
}
post.scrollIntoView(true);
}

function checkFull(id) {
var post = document.getElementById(id);
var spans = post.getElementsByTagName(’span’);
var found = 0;
for (var i = 0; i &lt; spans.length; i++) {
if (spans[i].id == “fullpost”) {
spans[i].style.display = ‘none’;
found = 1;
}
if ((spans[i].id == “showlink”) &amp;&amp; (found == 0))
spans[i].style.display = ‘none’;
}
}

</script>
</b:if>

3) Find this div for the post-body and add the portion of code in red color.

   
expr:id='"post-" + data:post.id' >

Read More......

4)Go to Settings->Formatting-> Post Template

In Post Template copy/paste these lines and save settings

Type your summary here

Type rest of the post here

5)If you create new post you will see area where you should type summary and where to type rest of post

Remove NavBar in Blogger


If you one of these who hate blogger navbar , you came to the right place , here I will show you how to remove it.

1) Login to blogger dashboard and go to Layout->Edit Html

2)Add the following CSS anywhere in your template between the