Set Go to line number keyboard shortcut in visual studio

July 28th, 2010

This took me longer than it should have to figure out so here you go.

To set a short cut to go to a line number in a document. I am used to pressing Ctrl + G.
If this doesn’t work your keyboard shortcuts might be set to a different setting.

Go to Tools -> Options -> Environment -> Keyboard

Type “edit.goto  in the “Show commands containing box”

Then select “press shortcut keys” and do the shortcut you would like assign eg. Ctrl + G.
Then press “Assign”

You are done.

Backing up your Data

November 23rd, 2009

Why do I need a backup?

All hard drives can fail. If a hard drive fails, recovering data is unlikely and expensive. So having a back up of the important data in your computer is essential, particularly those which are irreplaceable such as family photos or work documents.


How do I backup my data?

Most common devices used for a backup are:

  • External Hard Drives are great for general use. You can use them over and over again, they usually have quite a lot of space, and they are good for backing up large amounts of data. Remember that external hard drives can fail too so make sure you keep the copy on your computer.
  • CD’s and DVD’s are also good mediums for backing up data, and are reasonably cheap if you just want to backup a few things like your photo collection, music and documents.
  • USB Flash Drives are great ways of storing small amounts of data, like work documents, etc.
  • A Backup is essentially just a copy of the data you backup, so the simplest way of backing up is just copying the data and pasting it in the device you want to backup to. There is also software that will do this for you automatically.

    Backing up onto a server

    A server is a computer which sole purpose is to hold and give out data. Backing your data onto a server is becoming more popular in homes. Having multiple computers, each one having its own backup can be costly and messy. This is where a server is handy. With a server, all the computers are connected via a network and the backup runs through the network. Servers are also handy for a centralised place for sharing data on a network.

    If you would like to purchase a server please talk a Spanner Box specialist.


    Things to Remember

    To help prevent hard drive failure, it is good to get a UPS (uninterrupted power supply). This is a device that ensures devices plugged into it get clean constant power without spikes or drops and also has a backup battery, in event of a power cut.

    It is best to not bump your computer too much as this can cause hard drive heads to scratch the discs and corrupt data.

    It is also not recommended to turn off your computer at the wall or by the switch. If your hard drive is working and you suddenly cut power to it you can damage it or corrupt data.

    Keeping your hard drive at a good operating temperature helps prevent hard drive failure. Usually a hard drive by itself won’t over heat, but in certain situations hard drives may be hotter than normal. If you are worried about your hard drive over heating it is a good idea to have extra cooling fans installed in your computer.

PC Tips

November 23rd, 2009

 These are just some tips to make your PC run fast when it starts going slow

How does the processor make the computer slow?

Your processor is like the brains of your computer it does the calculations.

It”s common for processors to use a large amount of processing power for short periods of time when loading software. That is why the more programs you have programmed to load on start-up, the longer it takes to start up .

Scenario

You have six programs that load at start up, and all require 6 seconds loading time. That is roughly 30 seconds longer than if you had only one program loading at start-up. Generally as a computer gets older the owner will install more programs . Many of these load on start-up because software makers often program their software to load during start-up to try and make people use their software more.


How to turn off start up programs

The easiest way to do this is by using msconfig.exe, a utility that allows you to control a number of settings on your computer.

Turn on “msconfig.exe” in Windows XP

1. Press the “start” button in the bottom left hand corner
2. Select the program “RUN” and turn on.
3. Type in “msconfig” then press enter

To turn on msconfig.exe in Windows Vista

1. Press the “Windows” button in the bottom left hand corner
2. Type in ‘msconfig’ in the search field then press enter

A window should pop up with ’system configuration’. Select the “Startup” tab

Uncheck the boxes of the programs you don’t want to load during start-up, click the apply button in the bottom right hand corner then ok. The next time the computer starts up it should be a lot faster!

If you don’t know what a program does, don’t turn it off! You can do google searches on programs if you want to know what they do.


How does memory (RAM) usage make the computer slow?

Memory is like short term storage for the computer. Everything that is running is stored in the memory to be used by the processor.

All of your programs use up memory. The more programs you have running at one time, the more memory it will use. However, using up memory won”t actually slow your computer down until you run out of memory.

Scenario

An old computer has 256MB of RAM. This computer is running Windows XP which uses about 200MB of RAM itself. This leaves only 56MB of free RAM. If you open MSN Messenger, Microsoft Word, and Internet Explorer these programs combined will use 157MB. This creates 357MB of RAM, being used by a computer which only has 256MB of Ram.

In this situation the computer will use the Hard drive (long term memory), as replacement for RAM. Since the hard drive runs a lot slower than RAM the computer will start to run slowly.

However, if you have 2048MB (2GB) of RAM and you only use 357MB then your computer will run fine until you use more than 2048MB of ram.

Ugly Test Available on App Store!

September 16th, 2009

Ugly Test is now Available on App Store. Go get it now.
You can get it here

Here is the description:

Have fun pranking your friends with this fun little app.

Place your finger on the scanner to scan your fingerprint to detect your ugliness.

Use the hidden buttons to rig the scanner and always get a perfect ‘non-ugly’ result.

Your friends will never understand why the results come out so abusive every time for them!
Watch them try to figure out how it works and eventually give up and accept their ugliness as a scientific fact!

* Realistic graphical interface
* Real Vibration and scanner-like sound effects
* 2 Secret buttons to rig the results with.
* Long list of Result possibilities.
* Animated cheat instruction screen

Very simple to use and very fun to play with.

Ugly Test iphone App allows you to cheat with hidden buttons

 

Ugly Test iphone App has great realistic scientific animation.

The Ugly Test iPhone App - only 0.99c

August 27th, 2009

We have decided that even though we have put a lot of long hours into The Ugly Test, that we  would release it as a 0.99c app in the app store.

You’ll definitely want to check it out, and now being poor is no longer an excuse.


New iPhone App - The Ugly Test

August 25th, 2009

Jayco Design has just finished its first iPhone application: The Ugly Test.

The Ugly Test Screen Shot

It should be released over the next week or so.

Change the css class of every second row with php

April 28th, 2009

If you need to find odd numbers in an array in php it’s very easy. You just use the “%” command. eg.

if ($num % 2) {
echo “$num is odd”;
} else {
echo “$num is even”;
}

I think what it basically does is divides the number by 2 and if it’s not a whole number it renders it returns it as odd.

Here’s how this code can be very tidy and useful:

The following code can be helpful if you are doing a php foreach repeater to produce a table and you want to use an alternating css class on every second row.

Step 1:
Place a $count outside your foreach loop.

$count=”0″;

Step 2:
Create your rows with the alternating css classes

echo “<tr class =’”;
$count++;
if ($count % 2) {
echo “rowclass1″; }
else {
echo “rowclass2″;
}
echo “‘>”;
echo “<td>Your row Content</td></tr>”;

That’s it, each row will have a different css class and it saves you having to do each row manually!

Table Rows ALternating

CSS fix to set a style for a specific input type

April 28th, 2009

You can set a css style on a specific input type without having to worry about classes etc. with this handy and not often used css fix.

input[type=radio] {

border: none; background:transparent

}

Have tested it and it works in IE7, IE8, Firefox 3.0 etc.
I haven’t tried IE6, but apparently this fix doesn’t work.

But I think these days people who are still using IE6 are fairly used to seeing pages rendered incredibly ugly, so it doesn’t really matter. :)

Forcing a scroll bar on your browser with css.

April 27th, 2009

Often when you have some long pages and some short your page may jump slightly horizontally which can be qutie annoying.
This can be caused by the scroll bar sometimes being there and sometimes not, and this will vary depending on the size of the monitor.

One way to get around this is to force a scroll bar on every page. This will make sure the page wont jump no matter the size of the monitor.

The fix for this is very simple. Just add the following to your css file:

body {

overflow-y:scroll;

{

php drop down box list of countries made by foreach array

April 19th, 2009

This is some code I wrote to generate a drop down box with all the countries listed in it,  that will preselect the right country if you post the country to it from a previous page. Really helpful if you use it as a control. I have it permanently in my PHP includes folder and just call it any time I need it.eg.:

 <select name=”example”>

<? include ‘../inc/countries.php’ ?>

</select>

Here is countries.php

Read the rest of this entry »