Saturday, March 21, 2009

Cascading Style Sheets II - Selectors

All CSS styles are made up of 3 parts: a selector, a property and a value. Selectors are the names that you give to your different styles, or the names of certain elements to style.

CSS selectors are a fundamental part of CSS. Selectors define which HTML elements you are going to be manipulating or styling with CSS code. In essence selectors are used to "select" the elements on an HTML page that are affected by rules.

What is a rule or a "Rule Set"? A rule or "rule set" is a CSS statement that tells the browser how it should render or display particular elements on a HTML page. A rule set has a particular syntax consisting of a selector followed by a declaration block. In my Basic CSS introduction, we got a glimpse of the rule set.

Bless the little children.

While reading the dBASE news group, I came across some really funny things and jokes about kids. This will surely light up your day.

A little girl was talking to her teacher about whales.
The teacher said it was physically impossible for a whale to swallow a human because even though it was a very large mammal its throat was very small.
The little girl stated that Jonah was swallowed by a whale.
Irritated, the teacher reiterated that a whale could not swallow a human; it was physically impossible.
The little girl said, 'When I get to heaven I will ask Jonah'.
The teacher asked, 'What if Jonah went to hell?'
The little girl replied, 'Then you ask him'.


A Kindergarten teacher was observing her classroom of children while they were drawing.. She would occasionally walk around to see each child's work.As she got to one little girl who was working diligently, she asked what the drawing was.
The girl replied, 'I'm drawing God.'
The teacher paused and said, 'But no one knows what God looks like.'
Without missing a beat, or looking up from her drawing, the girl replied, 'They will in a minute.'


A Sunday school teacher was discussing the Ten Commandments with her five and six year olds.
After explaining the commandment to 'honour' thy Father and thy Mother, she asked, 'Is there a commandment that teaches us how to treat our brothers and sisters?'
Without missing a beat one little boy (the oldest of a family) answered, 'Thou shall not kill.'


One day a little girl was sitting and watching her mother do the dishes at the kitchen sink. She suddenly noticed that her mother had several strands of white hair sticking out in contrast on her brunette head. She looked at her mother and inquisitively asked, 'Why are some of your hairs white, Mom?'
Her mother replied, 'Well, every time that you do something wrong and make me cry or unhappy, one of my hairs turns white.'
The little girl thought about this revelation for a while and then said, 'Momma, how come ALL of grandma's hairs are white?'


The children had all been photographed, and the teacher was trying to persuade them each to buy a copy of the group picture.
'Just think how nice it will be to look at it when you are all grown up and say, 'There's Jennifer, she's a lawyer,' or 'That's Michael, He's a doctor.'
A small voice at the back of the room rang out, 'And there's the teacher, she's dead.'


A teacher was giving a lesson on the circulation of the blood. Trying to make the matter clearer, she said, 'Now, class, if I stood on my head, the blood, as you know, would run into it, and I would turn red in the face.'
'Yes,' the class said.
'Then why is it that while I am standing upright in the ordinary position the blood doesn't run into my feet?'
A little fellow shouted, 'Cause your feet ain't empty.'


The children were lined up in the cafeteria of a Catholic elementary school for lunch. At the head of the table was a large pile of apples. The nun made a note, and posted on the apple tray:
'Take only ONE . God is watching.'
Moving further along the lunch line, at the other end of the table was a large pile of chocolate chip cookies....
A child had written a note, 'Take all you want. God is watching the apples.'

Cascading Style Sheets I - The-Basics

Cascading Style Sheets (CSS) is a simple mechanism for adding style. It is a stylesheet language used to describe the presentation (that is, the look and formatting) of a document written in a markup language. Today we are looking at the basics of CSS.

CSS is designed primarily to enable the separation of document content (written in HTML or a similar mark-up language) from document presentation, including elements such as the colours, fonts, and layout.

There are various ways of linking these style rules to your HTML documents, but the simplest method for starting out is to use HTML's STYLE element. This element is placed in the document HEAD, or by using the Style property of an individual tag, e.g. h1. The style element contains the style rules for the page. But the most common way of using a Style element is by putting it into a external Style sheet. A file with css extension. This is then linked to the HTML page.

Saturday, February 14, 2009

Pivoting your data in MSSQL Creating "Cross Tab" reports

A pivot is a normally used to transform large amounts data into a condensed list or grid. A Pivot report displays data in a grid along a vertical and horizontal axis. Financial reports are good candidates for Pivot reports.

Microsoft Access refers to pivots as "Cross tabs." In MS Acces there is a wizard as well. It asks which columns should be on which axis, then auto-generates the code needed. Access creates pivots by using the special key word TRANSFORM.

Unfortunately it is not as easy as using a wizard in MS SQL. In SQL 2000, pivot style reports, called "Cross-Tab Reports" can be created using the CASE keyword. CASE can also be used in SQL 2005 and SQL 2008. But there is another keyword that can be used, PIVOT.

Read More..

Tuesday, February 3, 2009

LinkedIn vs Facebook

Do you have a social netwrok account. Are you on Facebook or MySpace. Social networking is taking the world by storm. Everyone has a MySpace or Facebook account. Maybe you have a twitter account. Researching SEO, one find out that good use of social networks can improve web site traffic. But Facebook has never really been the place for business has it. Well, if you want to promote your business via social networking, take a look at LinkedIn

Read More »

Sunday, February 1, 2009

Facebook more popular than MySpace

The social wars get bigger and more intense. Just like everything else, someone is always trying to out do you. The internet is a cut throat business. Traffic is what makes the World Wide Web go round. Facebook and Myspace are no different. Myspace has taken the limelight for a while, but there is a new kid on the block.

Read More »

Promote your blog with e-mail

A blog will die if no traffic comes its way. If you have a new blog, then one of the ways to get traffic to you blog is to promote it. But How?

We are always looking for ways to promote our blog or website. One way of doing this is putting links to your blog into your e-mail via a signature. Why not have the latest post from your blog in you e-mail signature.

Read More »

Saturday, January 24, 2009

Cheat sheets - Because we cannot remember everything.

Being a programmer can be hard on the old grey matter at times. Especially when there is so much to remember, and so many languages to remember it in. Enter the Cheat sheet.

Read More »

Twitter tweeting can bring much needed traffic to your blog or website.

The things that any start-up website or blog need the most, is traffic and inbound links. But this is much easier said than done. In my research on how to get said traffic and links, I was led to social networking. Twitter is one such social network.

Read More »

Joomla-vs-Drupal-vs-Dotnetnuke.

Content Management Systems is the in thing now-a-days. It gives you the ability to manage your own website. Make your site dynamic, update content easily and regularly.

But the question is, which CMS is the best, or which is right for me. For most, Open Source is the way to go. So which is the Better Open Source CMS. Of the three that came First, Second, and Third in the OpeSourceCMS awards, Drupal, Joomla!, Dotnetnuke,
which one would your choose.

Read more ...

Sunday, January 18, 2009

Phishing E-mail

I got an e-mail yesterday from standard bank stating that I am using my credit card on two accounts. Read about it ...

Friday, January 16, 2009

Proteas beat Australia in the first ODI

After the disappointing Twenty/20 games, where SA lost 2-0, this triumph was bitter sweet.

Unfortunately for my, I give up too soon. After the first two wickets fell, I stopped watching. Only to be shamefully disappointed that I missed a cracker of a game. I am such a clutz.

Reports have stated that it was a thrilling win. I will have to catch the highlights. With Duminy hitting a brilliant 71 with not one boundary. A steady 63 from McKenzie. But a brillian lightning spell from Morkel of 40 not out in just 18 balls sealed the game.

South Africa won by three wickets. It could have been better had SA played a bit better on the field. The South Africans were uncharacteristically lax in the field today, but enough was done to take the the win.

Being 1-0 up on the series is always a good start. Do you think we can go on to take it? Do you think that not having Smith there will eventually take its toll? DO we have the courage to do this? Wouldn’t it be great to not only take the test series but the ODIs as well, and in Aus as well.

Let us know what you think.



Technorati Tags: ,,

Wednesday, January 14, 2009

Did the Laser Light Cheat win the cricket game?

The thrilling Twenty20 game, which was won by Australia,  played at the Gabba has ended in a cloud of drama with suggestions of a laser light being flashed at South African fielders.

Television coverage picked up a green light that flashed across rookie Protea’s fast bowler Wayne Parnell as he attempted a difficult catch in the outfield.

Parnell's failed diving attempt off a Mike Hussey skier at long-off came as Australia neared victory in a tense finish. Hussey went on to score 53 not out to lead the home side to a six-wicket win.

Although the catch was an extremely difficult one, and suggestions that the laser was indeed shone from behind, would not have influenced the outcome of the failed catch or the game. Having said that, an attempt at cheating is a cheat.

If you tried to cheat in an exam but the cheat never actually changed the outcome. Should you be let off for cheating. Should you get away with it. It’s a matter of principal isn't it.

Nevertheless, an attempt to cheat in a game is bad for the game, let alone the affects a laser light could have had on the players site. I’m not saying that this particular incident could have harmed Parnell’s eyes, but such lasers can harm ones eyesight.

It definitely throws a cloud of suspicion over the game. But the big question is, will the Australian authorities do anything about it. The point is not whether it would have affected the outcome of the game, but that it was an attempt to influence the outcome of the game.

One’s mind is cast back to the Hansie saga, and reminded that Australian leg Sinner, oops sorry, leg spinner, was also implicated in match fixing, ball tampering etc. Nothing as drastic as the Hansie trial was ever carried out in the case of Shane Warne. If memory serves he got away with a small fine and a warning. A slap on the hand in other words.

We are also reminded of the biased view of Australian commentators and press. Are we to believe that they will do anything serious about this. An Australian news agency reported that the offender could face a fine of $8000, and that the police can make a criminal charge of assault. But that’s a separate issue, we are talking about the Australian cricket community, they seem to want to win at any cost, and have no regard for any one else.

It’s all a money game. Some have also suggested that KFC Australia was behind this. If South Africa carry on in their winning streak over Australia, from the Test, to a possible draw in the 20/20 (Possible I say, because I do not believe that the incident would have affected the game), to hopefully taking the ODI’s. Then KFC would have lost huge in sponsorship. Also can you imagine the tag lines that would float around. “SA Picked AUS clean”, “AUS Chickened out”, or “SA Wrapped up series”, or “AUS made a meal of it”, etc etc.

Already, the Australian cricket board will not entertain any overseas tour during the Christmas season, because of the impact it will do to revenue, from sponsorship, gate fees,  etc. Was it a ploy to save face. I doubt it, but cheating is cheating.

Ultimately I do not think that we would have won the game either way. But is sure is frustrating that there is bad-sportsmanship type behaviour out there. I am sure there are similar people here in SA, or could I be wrong?

What do you think? Did it affect the game? Do you think Australian Cricket Community will go to any lengths to win the game? Do you think it was just a once off incident? Let us know, leave a comment.\

Technorati Tags: ,,

Tuesday, January 13, 2009

Is your job under threat. Tech market to see huge layoffs.

With the overall economy slumping, the tech industry is taking its fair share of hits. Massive layoff's are in the pipe-line.
Not good news for a market that was once booming and moving upward at the speed of sound.

Some of the most well known and industry leaders are amongst the highest job cuts we will see this year.

Among them are:
  • Logitech - 9,000
  • eBay - 1,000
  • Sony-Ericson - 24,600 over three years (6200/year)
  • Xerox - 3,000
  • Freescale - 2,400
  • Nortel Networks - 1,300
  • Applied Materials - 1,800
  • Sun Microsystems - 6,000
  • Palm - 1,050
  • AT&T - 12,000
  • Alcatel-Lucent - 6,000
  • Western Digital - 2,500
  • Lenovo - 2,500
  • Dell - 1,900

How does that make you feel? Do you feel secure in your IT related job?

This is only half the problem. If there are so many job cuts in the market, then it stands to reason that the hiring will be just as bad or worse. You can't hire if you fire.

What about jobs for those leaving school, college or university?

Although a lot of tech companies seem to be doing well. Why then the big layoff? Was it just that they hired too many? Did they pay too much for the so called experts? Did they over staff?

So what happens now? What does the future hold for us techies? Should we start looking at another career, like politics perhaps?

I recently started on my own, with a Web Design and development company. Is my start-up going to fail? Is there enough work out there?

What are your thoughts, what do you think the future holds for the IT industry?

Bad Website Designers / Developers

How do you tactfully suggest to someone that there website design skills are sitting in the 90's?

I have opportunity to do some work for a web design and hosting company. Going through their profile and looking at their work, I come to the distinct conclusion that they are still in the 1990's and web 1.0.

Even their own site is boring, and hurtful to the eyes. Most of the sites that they have designed, have a similar style look and feel, and layout.

The graphics are shocking. Granulated. Some sites do not even work correctly. Yet they claim to be a professional outfit.

Maybe they are. Maybe their web design and development team are just not that good.

So how do you tell them that their websites are really bad, and that they need your services? How do you tell them in such a way that they will be willing to take you on as well as not being offended?

I covet you suggestions. Leave me a note.

Sunday, January 11, 2009

Installing Joomla onto Vista, IIS7 with PHP5.2 and MySQL 5

Recently I have had to take a serious look at Joomla as a CMS development platform. I normally use and develop with Dotnetnuke as my primary CMS.

Just recently I had a request to to offer some help on a half finished project. A Joomla based . This would be a nice contract for me as it would fill a few holes in the financial area at the moment.

So after downloading Joomla I proceeded to install Joomla onto my Vista business machine.

The Joomla requirements as stated on their website is:

  • Apache 1.x or2.x
  • PPH 4.3 or up
  • MySQL 3.23 or up
  • IIS 6 and up (Joomla is optimized for Apache, but also runs on Microsoft IIS (though not officially supported)

Seeing that I already had PHP 5.2 and MySQL 5 and Apache 2, all I needed was the Joomla installation.

This was a relatively easy download and the install is very simple. You get a zipped file which you extract to a folder of you choice. The recommendation is in the web root, but I really don’t like doing it like this. So I created a folder on my d drive extracted it.

I then created a website in IIS7 pointed it to the Joomla folder.  I know I had Apache, but I wanted it to work with IIS7.0. I Added the local IP address, 127.0.0.1 to the hosts file. I have proxy setting in my browser so I had to add the my local Joomla address to the excluded addresses for the proxy.

Fairly simple right, I thought we could just brows to the site and it should work. Not so. I got an error message about php not having a interpreter. Which I could understand

After some digging around on the net, I found out that you need FastCGI in order to run Joomla. For Joomla to work correctly with IIS it is necessary to install an update for IIS FastCGI module for IIS More information about the update is available here.

Apparently FastCGI is preinstalled if you have Vista SP1 and IIS7.0, but for IIS 6 you have to install the FastCGI module. I downloaded it just in case.

You can add the CGI feature by going to Control Panel -> Programs and Features -> Turn Windows features on or off. This enables both the CGI and FastCGI services. If it is already check, it was suggested that I uncheck it, restart vista, then recheck it to add the feature back again and restart Vista. I did this, but when trying to browse to the Joomla Site I still got errors.

Eventually I followed the tutorial found on IIS.net site, here. But still could not get the Joomla site to run. I figured it must be the FastCGI module setting. SO I browsed to this page and went over the steps time and time again. No joy. For some reason I could not get the FastCGI module to show up in the Module Mapping.

I then found a little note on this same page as to why I could not see the FastCGI module in the Mapping. SO I followed what it said. Here is is:

NOTE: If you do not see "FastCgiModule" in the "Modules:" drop-down list then it means that the module is not registered or not enabled.

To check if FastCGI module is registered open the IIS configuration file %WINDIR%\windows\system32\config\applicationHost.config and check that the following line is present in <globalModules> section:

<add name="FastCgiModule" image="%windir%\System32\inetsrv\iisfcgi.dll" />

Also, in the same file, check that the FastCGI module is added to the <modules> section:

<add name="FastCgiModule" />

Still I could not get it to work. I eventually saw the command line option to enable Fast CGI and Tried that.

Using command line

Alternatively, the above mentioned steps can be completed by using command line tool appcmd.

To create the FastCGI application process pool, run the following command:

C:\>%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='c:\{php_folder}\php-cgi.exe']

After that, create the handler mapping:

C:\>%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='c:\{php_folder}\php-cgi.exe',resourceType='Unspecified']

After once again carefully going through the steps found on this site, making sure I made all the changes to the PHP.ini file and any other configuration files. I browsed to my Joomla site, and viola it worked I got the Joomla installation screen. Now I can proceed to step 2.

I managed to go through all the set up steps up to the database point. There you had an option to include sample data. This is so that you don’t have a blank site and have to start from scratch entering in content. So I opted for the Sample data. But when clicking the sample data button, I was presented with a error stating that there was a problem in the XML file. Oh drat here we start again.

After more digging around I found that the scripts to create the database and insert the data was in the installation folder on the Joomla install. You will find them here “[Joomla]\installation\sql\mysql”

So what I opted to do is skip the sample data and run the sql script. The only thing is that you have to edit the sql script to replace all “#_” with “jos_” or what ever table prefix you choose. Run the scripts and your data is there in MySQL.

All it needed was now to finish the Joomla Installation and I was away. Not to be. More errors. This time I got this error “Fatal error: Call to undefined method JException::getNullDate()” Now what?

After some more digging around I found that the configuration.php file was not be created and written to properly. This was probably a permissions issue. But by now I had had enough. It was 01h00 in the morning, I had been at this for a few hours now. So the suggestion I found was to create a blank configuration.php file. I did this and went through the whole installation setup again.

But still no joy. What now I was bout to through this thing out the window. It seemed to me that windows installers where so much easier. Everything was done for you. Not here.

I figured out that this php configuration file was being written to and all that it was doing was writing the php variables for the Joomla installation. Things like IP addresses, database logins etc. This was what the step by step set up was supposed to be doing.

So I went to the Joomla site and found a step by step procedure to do a manual installation. You can find this here.

After following this manual procedure step by step. Making sure I had all the correct values, like database name, user name and passwords, etc etc. I finally with bated breath browsed to my local Joomla site. But still got an error stating that I had to delete the installation folder. Well that was simple enough. Seeing that I was doing a manual installation, I deleted the installation folder from the Joomla root.

Browsed once again to the local Joomla site and surprise surprise it WORKED! I was elated and glad. All the tension drained from me.

I got up from my seat and was immediately followed with a excruciating headache. But that's another matter ….

What were your installation nightmares like? Or did the installation go smoothly? Do you have any stories to tell or comments to make? Drop us a note.

del.icio.us Tags: ,,,

Thursday, January 8, 2009

C# (.NET) vs PHP

This question has been one that has been asked for many years but no definite answer has been forthcoming.

Very much like which soft drink is best Pepsi or Coca Cola. It’s really about personal taste and what you can get out of it.

There are two major development platforms to choose from. They are PHP and .NET from Microsoft. Then choosing .NET you have a further choice of development languages, being Visual Basic and C#.

Read More >>

Saturday, January 3, 2009

Are you a Web-a-Holic?

With the many forms of addiction available in the world today, one has to be careful at what you eat or drink or otherwise take in, because you might well form an addiction.

I come from a home where alcoholic addiction was prime. Drugs we used, and everybody was a smoker.

We frown at Chemical dependencies and call it a sickness. But many are addicted, I use this term loosely, to something.

What about your love for Coca-cola or Pepsi. What about all that coffee or tea you drink. Is it an addiction when you continually think about it if you have not had it in a while.

With the rise of the internet a whole new form of addiction a has surfaced. With free and easy access to porn sites, porn addiction is a real life concern.

But with the rise of social networks like Facebook, Twitter, Plurk, MySpace, etc. The internet has become the addiction.

People spend hour and hours checking their social networks, e-mails, etc. If you haven't got an e-mail within the hour, or you haven't checked your wall on Facebook, you get the jitters.

I am not a big social network fan, but certainly I might be a candidate for a web-a-holic. When my ADSL line when down and I ran out of bandwidth the other day, I did not know what to do with myself.

I paced up and down waiting for the internet to come back on line. When my website was down for server maintenance, I was lost.

Just this Christmas season I found that I had a pain in my right hand, near the thumb knuckle. I soon realised that it was a "repetitive strain injury". Picked up as a result of being on the computer for more than 12 hours a day, using the mouse with my right hand.

Am I addicted to the internet? I very well might be. What about you? I would be interested to hear you thoughts or experiences. Drop us a comment.