a
Past Obsessions
- December 2009 (1)
- October 2009 (1)
- August 2009 (1)
- July 2009 (1)
- June 2009 (1)
- April 2009 (3)
- December 2008 (6)
- November 2008 (2)
- October 2008 (6)
- September 2008 (1)
- July 2008 (1)
- June 2008 (4)
- April 2008 (1)
- March 2008 (1)
- February 2008 (3)
- January 2008 (11)
- November 2007 (3)
- July 2007 (9)
- June 2007 (6)
- May 2007 (3)
- April 2007 (2)
- February 2007 (1)
- January 2007 (6)
- December 2006 (7)
-
Obsessions critique
Tips Photoshop on Splash Photoshop Brushes ihecker on Web Design Portfolio ihecker on Web Design Portfolio ihecker on Atoll TV Brochure ihecker on Earth at its rotation
When dealing with dates it is necessary to add or subtract a given number of days to a date! I use the following little function to do it in PHP.
function dateadd($day,$toadd) //input format: d/m/yyyy
{
$tmp = explode(“/”,$day);
$dadate = mktime(0,0,0,$tmp[1],$tmp[0]+($toadd),$tmp[2]);
return date(‘d/m/Y’,$dadate);
}
It is a simple function that split the inputed date into an array and create a date object with the number of additional days included in the creation. And then format the out put!
How to use:
<?php
$mydate =’24/12/2008′;
echo dateadd($mydate,30); //output 23/01/2009
?>
When coding in PHP & MySQL dealing with date is a huge headache if you are not prepared for it. As MySQL dates are in the format ‘yyyy-mm-dd’. However, we humans prefer date in the format of “dd/mm/yy” or “mm/dd/yy”! So when storing a date field to the database we need to change the date format to ymd, and after retrieving it from the database we need to change it to dmy or mdy.
To make life easier, it has been a while since I have used two functions for these changes. So here I share them, in case a newbie might need it.
function change2dmy($date) //input format: yyyy-m-d
{
$dtmp = explode(“-”,$date);
$dadate = mktime(0,0,0,$dtmp[1],$dtmp[2],$dtmp[0]);
return date(‘d/m/Y’,$dadate);
}
function change2ymd($date) //input format: d/m/yy or yyyy
{
$dtmp = explode(“/”,$date);
$dadate = mktime(0,0,0,$dtmp[1],$dtmp[0],$dtmp[2]);
return date(‘Y-m-d’,$dadate);
}
How to use it: it is a simple function.
<?php
$dmydate = ‘24/12/08′
$ymddate = ‘2008-12-24′;
echo change2ymd($dmydate); //output: ‘2008-12-24′
echo change2dmy($ymddate); //output: ‘24/12/2008′
?>
I lost a staff and a friend yesterday! Reason? Drugs! I am not angry but sad and disappointed. A talented kid who choose to be a lost cause. Who are we to blame? I choose nobody! All my time invested and hopes on him, down the drain! Have to start from step one! But I am not ready to give up! If only we can understand what it all means and feels!
It has been a while since I updated my blog, it was a hectic and some what too exciting to give time for my blog. So what is new? I have got my first iMac! It is truly an inspirational product. Simply said amazing, it has made me wonder what have I been doing in the Windows world? I should have switched to Apple a long time ago! Now I don’t even want to touch Windows! Ok, enough talk about Apple iMac, my creativity is bugging me so here is a screen shot of my iMac for your pleasure and two wallpapers that I have done for my Mac! All credit goes to Apple, what can I say, it just inspired me… I love my iMac!
A screenshot of one of my desktop, I have two running in parallel!
Here is the wallpaper that I have done for my Mac! If you want the source file in psd or want to know how it is done, you know how to bug me!
Here is another wallpaper with more or less the same concept! Sexy huh?
Take care and enjoy!
I see a load of books and advice on the market on getting clients and on marketing, truth is I have no problems getting clients and projects. I have found that the hardest thing to do in a business in Maldives is to get good, talented and dedicated staff. It is not about the pay or working environment or even appreciation. The problem goes way too deeper than that.
One fact is one in every two Maldivian is addicted to a nutty habit. Either it be drugs, sex or politics. I have long learn that too much of anything is sure to ruin your life. Discipline is the key to success in life.
If not addicted than they are psychologically and emotionally unstable. Drifting away in the swings of their moods. Never sure of where their sailing or even if they are sailing but living because they are alive. Fighting away the precious time in this world.
The younger generation have no hopes and dreams in this place. For no matter how hard someone tries or toil for, there is no certainty of creating a future without getting corrupted or cheating. Becoming a slave to an unethical cause. The idea of a career is alien to us, and we settle down for a job at some place at the mercy of an insecure boss. Taking responsibility and initiation is a crime. Have to be spoon fed every tiny little detail of the deal like robots.
It is a sad story, but I shall not stop hoping and dreaming for light in this dark. I will invest my money and time on our brothers and sisters, I shall depend on them to create the future. So don’t let me down.
I am a big fan of scribbling, as and when an idea comes up I have to scribble it down. May it be a todo list, features of a website or a design idea. So far I have used sticky notes and have tried electronic alternatives with less comfort. I have even developed my own program for this mere tasking. However, its been a year or so since I have started using Microsoft OneNote. I don’t like Microsoft much, but I have to say OneNote is a wonderful product, its flexibility is remarkable as a note taking tool for I am still using it…

One significant ease of the oneNote is the ability to find by searching. With sticky notes this becomes a pain when its misplaced (which has happened more often then I can count) . The other feature that I find useful is the ability to add to Outlook todo list just by a simple right click. Then I sync the Outlook todo list with my O2 XDA phone and I have the progress of all my project everywhere I go. I never miss an appointment or a deadline just because no one reminded me of, for its always on my phone home screen. I even do take notes on my O2 XDA and sync it back to OneNote but this feature is only helpful in emergency cases. Another feature I have begun to love is scribbling with my pen on OneNote for design sketches. I have also password protect sensitive data, a feature rarely found on other note taking tools.
No matter how huge or small a project is, OneNote has made me go paperless, though I still miss those sticky notes. Even with all this I was never an organizy freaky, but I guess OneNote has taken a part in my personal life too. However, I am finding it hard to sell this idea to my staff.






