Books
▼
Monday, January 22, 2007
Workshop at EMDI
Thursday the 18th saw me at Akure, where I was invited to teach on web designing, alongside kazar, at a workshop organized by EMDI.
It was an eventful experience for me since that will be the first time I will be visiting Akure.
I talked on the history of HTML and how it evolved to XHTML and where CSS fits in the picture. I made mention of the need for standardization and why we have bodies like W3C.
I later introduced the class to the vocabulary of HTML explaining the concept of tagging letting them write tags using MSnotepad. And later I introduced them to Dreamweaver, their excitement was another factor that made the whole workshop a rewarding experience for me.
The workshop’s tight schedule didn’t allow me time away for some sight seeing and picture taking; something I would have love to do.
It was fun and I even got to learn some new nifty tricks I could do with Dreamweaver while preparing for the workshop.
Friday, January 12, 2007
Introducing iphone
Imagine a smart phone that doesn’t have key pads…
But how do you compose your Sms then?
You punch on the screen’s virtual key pad.
Imagine a phone where you can pan content like you do your pdf documents…
Imagine a phone that allows you to maximize your view of an image on a web page by just finger clicking it…
Imagine a phone whose display turns vertical if the phone is held vertical and if the phone is held horizontal, your display adjusts accordingly…
These are just part of the features of Apple’s new product called iphone. A smart phone that introducing a lot of innovation in the area of user-interface and usability.
What exactly is the iphone? Apple’s site says…
iPhone combines three products — a revolutionary mobile phone, a widescreen iPod with touch controls, and a breakthrough Internet communications device with desktop-class email, web browsing, maps, and searching — into one small and lightweight handheld device. iPhone also introduces an entirely new user interface based on a large multi-touch display and pioneering new software, letting you control everything with just your fingers. So it ushers in an era of software power and sophistication never before seen in a mobile device, completely redefining what you can do on a mobile phone.
Personally, I think the coolest part of the iphone is its user interface. Smart phones are not new but iphone’s user interface is sure a revolution. Apple is trying to reinvent how we interact with the phone and I think iphone is impressive enough.
Head for Apple’s site to get a glimpse of what the iphone can do.
Thursday, January 04, 2007
A Fast Online Dictionary
This is another Application that uses Ajax nicely. Built by Phil Crosby, it is a dictionary service that lets you query the meaning of words effortlessly. It uses Ajax; meaning your page does not refresh for every word queried.
It is at Ninjawords.com.
Be Careful what You Ask For
I saw this joke while reading Hacking - the art of exploitation, a book by Jon Erickson, today. The joke drew a hearty laughter off me so i decide to share it...
A man is walking through the woods, and he finds a magic lamp on the ground. Instinctively, he picks the lamp up and rubs the side of it with his sleeve, and out pops a genie. The genie thanks the man for freeing him and offers to grant him three wishes. The man is ecstatic and knows exactly what he wants.
"First", says the man, "I want a billion dollars."
The genie snaps his fingers, and a briefcase full of money materializes out of thin air.
The man is wide-eyed in amazement and continues, "Next, I want a Ferrari."
The genie snaps his fingers, and a Ferrari appears from a puff of smoke.
The man continues, "Finally, I want to be irresistible to women."
The genie snaps his fingers, and the man turns into a box of chocolates.
FileSystemObject::Working With Drives And Folders
If you are writing scripts for active server pages or Window scripting Host, and if you will be manipulating files and drives, then you will find yourself dealing with the filesystemobject, which enables you to carry out tasks like writing, reading and deleting of files. With the filesystemobject you also have access to drives and their properties.
I will succinctly highlight here, how to work with this object.
One thing though, since FSO is contained in the scripting type library, you must make sure that scrrun.dll is available in your working directory.
So having said that let us start. This post will cover the Object under the following subtopics:
Working with Drives
Working with Folders
Working with files will be dealt with in another post.
Since we want to work with the drive, the next thing is to get a handle on the drive we want to work on. Use the
If I want to work with the drive D:
Having gotten a hold on the drive you want to manipulate, i.e. by writing:
you can make use of the following properties:
will create a folder named geekabyte in the root drive 'c:'
The second method is to get an handle on an existing folder, that is:
Having had a hold on the folder, you have the availability of the following methods and properties.
I will succinctly highlight here, how to work with this object.
One thing though, since FSO is contained in the scripting type library, you must make sure that scrrun.dll is available in your working directory.
So having said that let us start. This post will cover the Object under the following subtopics:
Working with Drives
Working with Folders
Working with files will be dealt with in another post.
Working With Drives.
The first thing to do, since we want to work with FSO is to create the filesystemobject. It’s ActiveXobject functionality, so the syntax to create it is:var myfso = new ActiveXobject("Scripting.FileSystemObject");
Since we want to work with the drive, the next thing is to get a handle on the drive we want to work on. Use the
‘GetDrive()’
method of the filesystemobject to do that. That is:myfso.GetDrive('D:');
If I want to work with the drive D:
Having gotten a hold on the drive you want to manipulate, i.e. by writing:
var mydrive = myfso.GetDrive('D:');
you can make use of the following properties:
- mydrive.TotalSize //gives you the total size of the drive in bytes
- mydrive.FreeSpace //to get the free space in drive. myfso.AvailableSpace will also work.
- mydrive.DriveLetter //to get letter assigned to drive i.e the drive without the ':'
- mydrive.DriveType //this properties returns integers that indicates the kind of drive it is. for example, 1 is for removable, 2 is for fixed, while 4 is for CD-Rom
- mydrive.SerialNumber //serial number of the drive
- mydrive.IsReady //if the drive is available for use. Returns 'true' if it is
available and 'false'if otherwise. - mydrive.ShareName //this returns the shared name for the drive
- mydrive.VolumeName //gives you the volume name
Working With Folders
There are to ways to get a handle on a folder you want to work with. The first method is to create it, that is:var myfolder = myfso.createFolder('c://geekabyte');
will create a folder named geekabyte in the root drive 'c:'
The second method is to get an handle on an existing folder, that is:
var myfolder = myfso.GetFolder('c://geekabyte');
Having had a hold on the folder, you have the availability of the following methods and properties.
- myfso.DeleteFolder(handler to the folder);
For example if you want to delete an existing folder named 'deathstar', first thing is to get to the folder. You do that by:
var thefolder = myfso.getFolder('E://deathstar');
now to delete it,just write:
myfso.DeleteFolder(thefolder);
or instead of going through the process of using the.getFolder()
method, just write:
myfso.DeleteFolder('E://deathstar');
- Retrieve the name of a folder
To get the name of a folder instead of the the path thatgetFolder()
returns, use the'.name'
property. It looks like this:
//first get an handle on the folder var folder = myfso.getFolder('c://geekabyte'); //to retrieve name... var name_of_folder = folder.name;
- Finding out if a folder exist.
You might want to check whether or not a folder exist.To do this, you use the.FolderExist()
method of the filesystemobject.
example.
var returnval = myfso.FolderExists('c://geekabyte');
if the folder exists, the method returns 'true' otherwise, 'false' - Finding out the name of a parents folder
If you have a folder and you want to get the name of that parents folder, use:
var parent_folder = myfso.GetParentFolderName('c://geekabyte/blog');
This expression will assign 'geekabyte' to parent_folder.