Archive for the ‘Articles’ Category

Rounded Corners Part 2 – No images

Monday, December 22nd, 2008

For this ‘tutorial’ i decided to simply link to a nifty page with instruction on creating a box with rounded corners without using images.

But how then ? Simply by using CSS and javascript. I remember i used this method on my simple website back in the dawn of time and it worked wonders. Since then the method from this site has been redone not once, but twice!

So head on over to Nifty Corners Cube by Alessandro Fulciniti and find a new method to produce those lovely rounded corners.

Rounded Corners – Solution 1

Saturday, December 20th, 2008

Rounded corners on websites and in webdesign are fairly popular. I think that the move from traditional square and technical design to a more organic design is part of the popular trend now a days. A device (or website) that breaks the expected pattern forces us to make new associations with the device. iPods are a great example i think were curved surfaces and smooth design is important but somehow appeals more to most people.

Regardless of the reason of rounded corners and curves, they are popular but can be a pain to make. Though it has gotten increasingly easier to create and the next CSS3 even provides support for easily creating rounded corners 🙂

Here is method number 1 for making rounded corners, and in the following posts i will be providing several other ways of making this effect.

Making corners in Photoshop

First off we need to make the four corners in a graphics editor such as Photoshop. Which editor you use is of no consequence, but the end result should be 4 images, one for each corner.

First create a new image about 50 x 50 pixels. Size depends on the curve you want. 1
Then make a circle selection on the whole image and fill with your foreground color. 2
Using the ‘guides’ in photoshop slice the image into 4 seperate corners. 3
Finally save each corner to its own file. ltoprtop
lbottomrbottom

Note that you can create the corners in several ways and this is just a simple way to do it. How you get your corner graphics does not affect the rest of the tutorial.

Now that we have our corner graphics we can create a simple html table that includes the graphics and places them were we need it 🙂

HTML Template with rounded corner graphics

What we need here is a simple 3 x 3 table, with corner graphics in each corner cell, and leaving the middle cell for content. We can also insert a title for the rounded corner box in the first row, second cell (between the corners).

Here is sample html that does exactly this:

<html>
    <head>
        <title>Rounded Corners Solution 1</title>
    </head>
    <body bgcolor="#47444f">
        <table width="200" border="0" cellspacing="0" cellpadding="0" bgcolor="#6a6af2">
            <tr>
                <td width="25"><img src="ltop.jpg" width="25" height="25"></td>
                <td><!-- Insert optional headline here --></td>
                <td width="25"><img src="rtop.jpg" width="25" height="25"></td>
            </tr>
            <tr>
                <td></td>
                <td>
                Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio.
                Quisque volutpat mattis eros. Nullam malesuada erat ut turpis.
                Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
                </td>
                <td></td>
            </tr>
            <tr>
                <td width="25"><img src="lbottom.jpg" width="25" height="25"></td>
                <td></td>
                <td width="25"><img src="rbottom.jpg" width="25" height="25"></td>
            </tr>
        </table>
    </body>
</html>

Rendered result looks like this:

final

Example files to download:

[download#11#image]

Cold remedies

Friday, December 12th, 2008

Yesterday evening i felt the onset of a small cold. Sneezing, bit runny nose and generally a bit more tired than usual. As pr usual i made some hot tea to drink, and made sure to stay warm. But though the night it got worse in the manner i could not fall a sleep. Luckily the worst was handled during the night of torture, but i decided to make a quick collection article about common cold remedies that could prove usefull.

Exercise

This one is my own. I had a set goal of running my daily route this morning to get an early start. Even though i was still fighting my cold and mostly felt like staying under the covers i pushed myself into some running clothes, put on an extra shirt and hooked up the iPod (and my Nike+). Out the door!

After the run i felt great, and didnt notice my cold that much except the runny nose. Really helped me to feel energized. So some exercise is at least not bad. Also exercising regularly helps prevent getting sick according to all i have read.

Vitamin C

Vitamin C is important, and helps combat the cold. Get an extra dose if you start getting cold symptons. Make sure to not only take pills, but actually get the vitamins naturally. Orange Juice should give you a good healthy dose.

Hot Shower/Bath

Taking a hot shower, or bath, will help relieve the symptoms. The steam helps clear up the airways and thin out mucus. Also while you are getting refreshed try getting your airway as clear as possible by blowing your nose thouroughly. A common way to relieve symptons is also to hold your head over a warm bowl of water with a tower over your head to simulate a small steam cabin.

Stay well hydrated

Drink lots of fluids. I personally prefer to drink warm fluids like tea when i have a cold. Mainly because the varm liquid helps relieve a soar throat. Also its simply cozy to cudde up on the sofa, with a blanket, a movie and a nice hot cup of tea! But in general stay extre well hydrated when fighting a cold.

Get some sleep!

Relax and get some sleep. Your body needs the energi to combat the cold infection. So one of the easiest ways to get over a cold fast is to cuddle up under a warm blanket/cover and sleep it out! This might contradict advice number one about excersise. But 10 minutes out running getting your system going isnt alot, but suffecient to both get your body going out of the groggy state associated with illness, but also provies you with a nice mental note that you acheived something despite of the illness.  Reward ourself with a day relaxing afterwards 🙂

All the above mentioned remedies and tips are from various articles i have found and read. A cold consists of a strain of the rhino virus. There are alot of different strains and your body will get imune to a certain strain after you have fought it off.  Normally this takes 2-7 days to do and medical attention should not be needed. Nasal sprays could help in some cases though.

Stay healthy!

Get Tortoise SVN to remove files from control

Tuesday, December 2nd, 2008

Everybody who has been programming on any large scale, or decent sized project involving several people will be at least familiar with revision control systems such as SVN and CVS.

One of the most popular systems at this time is Subversion (SVN), and if you are using Windows the Tortoise SVN client will most likely be your svn client of choice.

However a little know feature is the extended context menu for tortoise. Most evident if you need to remove a file from revision control but keep the file locally on your computer. Normally if you use svn delete the file will be marked for deletion, and upon next commit the file will be removed from the reposiroty AND your local machine.

Luckily there is a quick little trick to simply remove it from revision control but still keep your local copy. If you press and hold shift while right clicking the file(s)/directory(s) a new command under the TortoiseSVN menu is available called “Delete (Keep local)”.

This marks your selection to be removed from the repository upon next commit, but retains your local copy. This is especially usefull for files that should not have been added in the first place, but where you still need a copy of the file locally e.g. for building a project.

To sum up you can extend the capabilities of TortoiseSVN using your shift button! Great little tip! 😀

Extended SVN menu

Extended menu

source:
http://tortoisesvn.net/node/347

My favorite Firefox Extensions

Tuesday, June 3rd, 2008

Here is a list of my currently installed, and most beloved, Firefox extensions. Not all of them are currently out-of-the-box compatible with Firefox 3.0 RC but using the Nightly Tester Tools i can override the compatiblity check, and install them anyway. To my knowledge all of the extensions are working perfectly with Firefox 3.

Hope you can use some of them and let me know if you have trouble with the links, or getting them running.

Restoring Dual Boot funtionality

Tuesday, June 3rd, 2008

Okay i had to format my windows partition on the laptop. No big deal.. just pop in the old windows disc, and do a fresh install (after proper backup of course :p) to the correct partition.

However i like to use my laptop for Ubuntu also, and thus have dual boot. But windows insists on having control over the whole MBR. Hmm so this install lost me my dual boot functionality. Technically all i lost was the GRUB install that allowed me to boot from Ubuntu’s partitions.

Normally i would do a complete reinstall of the whole machine, taking me about a whole day considering all the programs i use, and backups to restore. However i didnt feel like this grand gesture, and was pressed for time.

A quick search gave me the quick fix for restoring dual boot functionality thus saving me some time. So here is the solution to re-install GRUB after installing Windows or in some other messing up your MBR

  1. Boot into Ubuntu using the Live CD. I used Ubuntu 8.04 currently.
  2. Open a terminal. Applications -> Accessories -> Terminal
  3. In the terminal type the follwing steps:
  4. sudo grub
  5. This should result in a GRUB Prompt with grub>
  6. find /boot/grub/stage1
  7. Remember this information
  8. root (hd0,4)
  9. setup (hd0)
  10. And you are done!

The above is a simple rewrite of the instructions found on the official Ubuntu help.

After following the steps you restart and everything should be working normally again 😀

source:
Recovering Ubuntu after installing Windows