Turn off Final Markup view as default in Microsoft Word 2007

In Office 2007 the thing that really bugged me was that a word document would open up showing the markup text and symbols. You can change this setting by going to the ‘Review’ tab on the Ribbon and selecting how you want the document to display under ‘Tracking’.
 
If you just want to see the Final version of a Word 2007 document without the mark-up then do the following:
 
Office Button > Word Options > Trust Center > Trust Center Settings >
Privacy Options > Document specific settings
 
Deselect ‘Make hidden mark-up visible when opening or saving’.
 
When you next open up a word document you shouldn’t see all the markup.

Microsoft Shared View – Remote desktop sharing within a firewall

I’ve come across a very clever but little known (and free) Microsoft application called SharedView, that allows you to share your PC, for demos, remote assistance or other collaboration. You can choose to share your entire desktop or just a single application (e.g. your browser to demonstrate a web app).
 
You start up SharedView (you need a MS Live account), create a session, then send out email invites. The email contains a link that the attendee clicks to join your session (they don’t need SharedView on their PC). It allows up to 15 connections, with each attendee getting their own coloured mouse pointer with name alongside, so you can see who is pointing at what! The clever bit is that it uses a cloud-based infrastructure, so there is no direct connection between host and attendees, meaning it will work through any corporate or home firewall.
 
Just thought it might come in handy for someone.
 
URL ishttp://www.connect.microsoft.com/content/content.aspx?ContentID=6415&SiteID=94 

Embedding a web cam feed into a web page

To embed an object in HTML document, the object class ID is required. The class ID for Windows Media Player 7, 9, 10 and 11 is clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6.
 
Embedding a Windows Media File
 
The example below shows the code for embedding a Windows Media file. Note that it uses two tags: and. This is to enable maximum browser compatibility.You will need to set the file name (and other attributes if required) for both tags. Use true or false for the tag, 1 or 0 for the tag.

To get started, all you have to do is copy the code above into your web page and replacevideofilename.wmv with your own file name.
Embedding a Windows Media Stream
The example below shows the code for embedding a live Windows Media stream to one of Tatton Park’s farm web cam’s.
To get started, copy the code and replace the URL of the web cam feed with your own feed URL.

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  
Configuration
If you want to get more advanced you can alter the parameters below. Note that including extra features such as the status bar requires the player to have more height. Where applicable, we have shown the number of pixels required — if necessary, add this number of pixels to the height parameter.Autostart
If this value is set to true/1, the video will begin playback as soon as it has buffered. Otherwise it will wait for the user to pressPlay.ShowControls
If this value is set to true/1, the video transport controls will be shown (play,stop,pause, etc). If it is set to false/0, the controls will not be shown and the user will not be able to control playback at all. Obviously, in this case you would need to have autostart enabled or there will be no way to play the video.
Height: 46 pixelsShowStatusBar
If this value is set to true/1, the status bar is shown. This includes the buffering progress and playback status of the clip. Showing the status bar is a good idea as it shows the user how long they have to wait before the clip will be ready for playback
Height: 26 pixelsShowDisplay
When set to true/1, this displays information such as the file name.
Height: 74 pixels

How to change drive letters in Windows

Click on Start and then Control Panel.
(Type computer management in the search box after clicking Start. Choose Computer Management.
   2   Click on the Administrative Tools link.
   In the Administrative Tools window, open the Computer Management program.
In the Computer Management window, locate the Disk Management option on the left and left-click on it.
If the Disk Management option is not visible, look under the Storage option by clicking the small arrow next to the word Storage.
On the right-hand side of the screen, locate and right-click on the drive that you wish to change the drive letter of and choose Change Drive Letter and Paths….
In the Change Drive Letter and Paths window, click on the Change… button.
The Change Drive Letter or Path dialog box will appear. Choose the drive letter you wish to assign to this partition.
Click OK.

How to retrieve mysql data in PHP

Using PHP you can run a MySQL SELECT query to fetch the data out of the database. You have several options in fetching information from MySQL. PHP provide several functions for this. The first one ismysql_fetch_array()which fetch a result row as an associative array, a numeric array, or both.
Below is an example of fetching data from MySQL, the table contact have three columns, name, subject and message.
Example : select.php
Source code :select.phps,contact.txt

<?php
include 'config.php';
include 'opendb.php';
$query  = "SELECT name, subject, message FROM contact";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
    echo "Name :{$row['name']}
” .
         “Subject : {$row[‘subject’]}
” .
         “Message : {$row[‘message’]}

“;
}

include ‘closedb.php’;
?>
Thewhile() loop will keep fetching new rows untilmysql_fetch_array()returns FALSE, which means there are no more rows to fetch. The content of the rows are assigned to the variable$row and the values in row are then printed. Always remember to put curly brackets when you want to insert an array value directly into a string.
In above example I use the constantMYSQL_ASSOCas the second argument tomysql_fetch_array(), so that it returns the row as an associative array. With an associative array you can access the field by using their name instead of using the index . Personally I think it’s more informative to use$row[‘subject’] instead of$row[1].
PHP also provide a function calledmysql_fetch_assoc() which also return the row as an associative array.

<?php
include 'config.php';
include 'opendb.php';
$query  = "SELECT name, subject, message FROM contact";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
    echo "Name :{$row['name']}
” .
         “Subject : {$row[‘subject’]}
” .
         “Message : {$row[‘message’]}

“;
}

include ‘closedb.php’;
?>
You can also use the constantMYSQL_NUM, as the second argument tomysql_fetch_array(). This will cause the function to return an array with numeric index.

<?php
include 'config.php';
include 'opendb.php';
$query  = "SELECT name, subject, message FROM contact";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
    echo "Name :{$row[0]}
” .
         “Subject : {$row[0]}
” .
         “Message : {$row[0]}

“;
}

include ‘closedb.php’;
?>
Using the constantMYSQL_NUM withmysql_fetch_array() gives the same result as the functionmysql_fetch_row().There is another method for you to get the values from a row. You can uselist(), to assign a list of variables in one operation.

<?php
include 'config.php';
include 'opendb.php';
$query  = "SELECT name, subject, message FROM contact";
$result = mysql_query($query);
while(list($name,$subject,$message)= mysql_fetch_row($result))
{
    echo "Name :$name
” .
         “Subject : $subject
” .
         “Message : $row

“;
}

include ‘closedb.php’;
?>
In above example,list() assign the values in the array returned bymysql_fetch_row() into the variable$name,$subjectand$message.
Of course you can also do it like this

<?php
include 'config.php';
include 'opendb.php';
$query  = "SELECT name, subject, message FROM contact";
$result = mysql_query($query);
while($row = mysql_fetch_row($result))
{
    $name    = $row[0];
    $subject = $row[1];
    $message = $row[2];

    echo "Name :$name
” .
         “Subject : $subject
” .
         “Message : $row

“;
}

include ‘closedb.php’;
?>
So you see you have lots of choices in fetching information from a database. Just choose the one appropriate for your program
  Freeing the memory ?
In some cases a query can return large result sets. As this results are stored in memory there’s a concern about memory usage. However you do not need to worry that you will have to call this function in all your script to prevent memory congestion. In PHP all results memory is automatically freed at the end of the script’s execution.
But you are really concerned about how much memory is being used for queries that return large result sets you can use mysql_free_result().Calling this function will free all memory associated with the result identifier ($result ).
Using the above example you can callmysql_free_result() like this :

 Convert MySQL Query Result To Excel
Using PHP to convert MySQL query result to Excel format is also common especially in web based finance applications. The finance data stored in database are downloaded as Excel file for easy viewing. There is no special functions in PHP to do the job. But you can do it easily by formatting the query result as tab separated values or put the value in an HTML table. After that set the content type toapplication/vnd.ms-excel
Example :convert.php
Source :convert.php,students.txt

<?php
include 'library/config.php';
include 'library/opendb.php';
$query  = "SELECT fname, lname FROM students";
$result = mysql_query($query) or die('Error, query failed');
$tsv  = array();
$html = array();
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
   $tsv[]  = implode("\t", $row);
   $html[] = "

” .implode(“ “, $row) .              “

“;
}
$tsv = implode(“\r\n”, $tsv);
$html = “

” . implode(“\r\n”, $html) . “

“;
$fileName = ‘mysql-to-excel.xls’;
header(“Content-type: application/vnd.ms-excel”);
header(“Content-Disposition: attachment; filename=$fileName”);
echo $tsv;
//echo $html;
include ‘library/closedb.php’;
?>
In the above example$tsv is a string containing tab separated values and$htmlcontain an HTML table. I useimplode()to join the values of$row with tab to create a tab separated string.
After the while loop implode() is used once again to join the rows using newline characters. The headers are set and the value of$tsvis then printed. This will force the browser to save the file asmysql-to-excel.xsl
Try running the script in your own computer then try commentingecho $tsv and uncommentecho $html to see the difference.