Call

Using Google Alerts to alert when you website is first indexed by the Googlebot

1
Filed under Web Developement

New websites don’t automatically appear in search engines like Google. They only get “found” when another website link to them or the site is added using Webmaster Tools.

To use Google’s Webmaster tools, you need to have a Google Account (same as Gmail).

Once you have your Google Account, use this link to use Webmaster tools.

Once you have logged in, choose the Add a site button at the bottom.  Enter your website address and choose continue. Follow the on screen instructions, or additional help is available from Google here.

http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=34592

Depending on the size of your website, Google may not index the whole site in one hit. Sometime it is useful to be alerted when Google first indexes your site. This can be achieved using Google Alerts

Go to Google alerts and create a new alter.

http://www.google.com/alerts

In the Search terms field, input a keyword that appears on every page on you website, something like you company name. Enclose you keyword in quotes and then limit the search to your website domain. For example:  “keyword” -site:yoursite.co.uk

Google Alerts Setup

The type field is not important and be left as Everthing.

Change How often field to as-it-happens.

Leave Email length to up to 20 results

Input your email in the Your email field and then choose Create Alert.

You should then receive an to confirm that you wish to receive alerts.

When the website is first crawled (indexed) by Google you should receive an email message. You may then want to log-in to Google Webmaster tools and check that the site has not got any Crawl errors (under Diagnostics on the left-hand side).  Crawl errors are details of any problems that the GoogleBot has encounter when indexing your site. You will need to address these errors in order for you website to be completely indexed by Google.

Cross-browser support for different rendering engines

1
Filed under Web Developement

Web developers are often faced with the problems associated with developing a cross-browser website or application, those developers planning to use new HTML5 and CSS3 mark-up will also have to ensure that they cater for different rending/layout engines like Webkit (Safari, Chrome) or Gecko (Firefox).

Here are a few CCS examples:

/*gradients*/

/*Firefox*/
-moz-linear-gradient (left, red, silver);

/*Safari/Chrome*/
webkit-gradient (linear, left center, right center, from(red), to(silver));

/*shadow*/

/*Firefox*/
-moz-box-shadow: 5px 5px #818181;

/*Safari/Chrome*/
-webkit-box-shadow: 5px 5px #818181;


/*Border corners*/

/*Firefox*/
-moz-border-radius: 9px 3px 9px 3px;

/*Safari/Chrome*/
-webkit-border-radius: 3px;
-webkit-border-top-left-radius: 9px;
-webkit-border-bottom-right-radius: 9px;

How to setup an iPhone on T-Mobile

1
Filed under Apple

Below is a screen shot from my iPhone which is on the T-Mobile network.

T-Mobile iphone settings

APN: general.t-mobile.uk
Username: user
Password: one2one
MMS: http:/mmsc.t-mobile.co.uk:8002/
MMS Proxy: 149.254.201.135:8080

Voicemail

T-Mobile’s voicemail setup is a little different from other networks: in addition to your mobile number you are also assigned another unique number for voicemail.

If you don’t already know your voicemail number, do the following:

Dial: *#67#

The iPhone uses push voicemail, in order to “re-program” it for T-Mobile, you need to do the following replace 123456789 with your unique number as obtained above.

Call: *5005*86*123456789#

Batch script to test if a server is responding using Ping

1
Filed under Microsoft

We were asked by a client to write a simple batch program that tests if a server is alive by using ping.

Below is a sample of the script that we created. The client used it in a Formscape project to ensure that a server was available before writting a record to a database using ODBC.

@echo off
CLS
:RETRYPING
echo Testing if 192.168.1.1 host is alive
ping 192.168.1.1 | find "Reply" > nul
if not errorlevel 1 (
echo Host is alive
) else (
echo host is down - retry in 30 Seconds
REM Poor man's sleep function - ping localhost
ping 1.0.0.0 -n 1 -w 30000 >NUL
echo Retry now
GOTO RETRYPING
)
:ENDPING

5 Tips to ensure you get the most out of mobile broadband

0
Filed under Uncategorized

1. Use a USB extension lead – this it gives you the ability to move the dongle around to ensure you give the best signal.
2. Alternatively, it may be better to use your mobile as a modem and connect to it using Bluetooth. This gives you the ability to position the mobile in the best place to get optimum signal strength.
3. To avoid DNS issues, use a third part service like http://www.opendns.com/.
4. By a SIM-free device – This will give you the ability to chop and change providers and choose the best deals.
5. Consider opting for a paid contact – some providers give preferential service to customers with a contact.

PHP Snippet: Dynamic copyright notice

0
Filed under Open Source

This how to use PHP to code a dynamic copyright notice:

<p>
<?php
$firstyear = "2009";
$currentyear = date("Y");
if ($currentyear==$firstyear)
  echo "copyright © ".$firstyear." company Limited, all rights reserved.";
else
  echo "copyright © ".$firstyear."-".$currentyear." company Limited, all rights reserved.";
?>
<p>

CSS Snippet

0
Filed under Uncategorized

This is a snippet of the CSS code I use when starting new project. The are not rquired and can be removed

body {
    margin: 0;
    padding: 0;
}

/* I don't link the link styling defaults */
body a {
    text-decoration: none;
}


body a:hover {
    text-decoration: underline;
}

/* If I want a border I use my own style */
img{
    border: none;
}


.fltrt {
    float: right;
}

.fltlft {
    float: left;
}

.clrflt {
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}

/* Used for image Opacity / Transparency styling */
img.opacity {
    opacity:0.4;
    filter:alpha(opacity=40);  
}

img.opacity:hover {
    opacity:1;
    filter:alpha(opacity=100); 
}

/* My prefered forms style */
fieldset
{
    border: 1px solid #999999;
    background-color: #F4F4F4;
    margin-top: 25px;
    margin-right: auto;
    margin-bottom: 25px;
    margin-left: auto;
}

label{
    width: 200px;
    float: left;
    text-align: left;
    margin-right: 0.5em;
    display: block;

}

input{
    border-right: #999 1px solid;
    border-top: #999 1px solid;
    border-left: #999 1px solid;
    border-bottom: #999 1px solid;
}

textarea {
    border-right: #999 1px solid;
    border-top: #999 1px solid;
    border-left: #999 1px solid;
    border-bottom: #999 1px solid;
}

Using SQL Triggers to create an audit trail on iSeries

0
Filed under IBM

We recently completed a development project to create a .NET application to populate an iSeries file. The client required an audit trail to be setup, this is how to do it:

Firstly create an audit file, ensure that the file has all the fields you wish to audit.
The best way to achieve this is to copy the original source member and use an “A” suffix.
Then add three addition fields to the end of the file:

A            TIMESMP         Z         TEXT('AUDIT TIMESTAMP')
A            AUDTYP         1          TEXT('AUDIT TYPE')
A            AUDIMG         1          TEXT('AUDIT IMAGE')

To add SQL Triggers, use the STRSQL command. Copy the sample code below substituting library, file and fields for your own details.
For new records:

CREATE TRIGGER library.trigger_name
  AFTER INSERT ON library.file_name
  REFERENCING NEW AS new_row
  FOR EACH ROW MODE DB2ROW
BEGIN
  INSERT INTO library.audit_file(field1,field2,field3,field4, audtyp, audimg)  VALUES(new_row.field1, new_row.field2, new_row.field3, new_row.field4,’I’,’ A‘ );
END

For deletions:

CREATE TRIGGER library.trigger_name
  AFTER DELETE ON library.file_name
  REFERENCING OLD AS old_row
  FOR EACH ROW MODE DB2ROW
BEGIN
  INSERT INTO library.audit_file(field1,field2,field3,field4, audtyp, audimg)  VALUES(old_row.field1, old_row.field2, old_row.field3, old_row.field4,’D’,’B’ );
END

For record changes:

CREATE TRIGGER library.trigger_name
  AFTER UPDATE ON library.file_name
  REFERENCING OLD AS old_row  
                            NEW AS new_row
  FOR EACH ROW MODE DB2ROW
BEGIN
  /* Before update*/  
  INSERT INTO library.audit_file(field1,field2,field3,field4,audtyp,audimg)  VALUES(old_row.field1, old_row.field2, old_row.field3, old_row.field4 ,‘ U‘,’B’);
  /* After update*/  
  INSERT INTO library.audit_file(field1,field2,field3,field4,audtyp,audimg)  VALUES(new_row.field1, new_row.field2, new_row.field3, new_row.field4,’U’,’A’ );
END

Removing triggers
You can remove triggers using the Remove Physical File Trigger (RMVPFTRG) command, the SQL DROP TRIGGER statement, and iSeries Navigator.

Making web pages load faster by using Google’s AJAX Libraries

0
Filed under Uncategorized

If you use a JavaScript framework like Mootools or jQuery, you may want to consider using Google’s AJAX Libraries. By utilising Google’s servers and distributing scripts across multiple hosts your webpage should load much quicker.

Firstly you will need to sign up for a Google API key for your website: http://code.google.com/apis/ajaxsearch/signup.html

Once registered, put the following in the header section of your web pages replacing the key parameter with you registered key.

<script type="text/javascript" src="http://www.google.com/jsapi?key=ABCDEFG"></script>

To use Google’s libraries use the google.load() function:
For jquery:

<script type="text/javascript">
   google.load("jquery", "1.3.2");
</script>

For MooTools (replace 1.2.4 with the version that is required):

<script type="text/javascript">
   google.load("mootools", "1.2.4");
</script>

Alternatively, you can also have an external link to the library:

For jquery:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

For MooTools:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

For a complete list of option, please see the Developer’s Guide http://code.google.com/apis/ajaxlibs/documentation/index.html#googleDotLoad

5 CSS Tips

0
Filed under Uncategorized

When creating an external CSS(Cascading Style Sheet) it is advisable to stick to the following rules:

You may, or may not be aware that it is possible to have “links” to several style sheets. It is sensible to take advantage of this and use filenames for different divisions or classes.

The filename should end with a .CSS extension.

If your website is hosted on a Linux server, please bear in mind that Linux filenames are case sensitive, so it is advisable to stick to only using lowercase.

Avoid using special characters and spaces in CSS filenames. Only use charaters a-z, number 0-9 and use underscore (_), or hyphens (-) in places of spaces.

Always check how your web pages will look in other version of Internet Explorer (IE). If you need to make a CSS change that is only applicable to a specific browser version, use a conditional comment (see below) in your HTML source. Please remember that this is only applicable to Microsoft’s IE and cannot be used with other browsers link Firefox.

<!--[if IE 7]>
<style type="text/css">
body {background-image:url('bgdesert.jpg')}
</style>
<![endif]-->