Wednesday, February 22, 2012

When All Else Fails

I love it how solutions come to me the moment I open my eyes from sleep. Like I have coded, compiled, ran and tested everything in a dream, to wake up with a eureka moment! A-HA!

Just so I wouldn't forget...
1. Query the list of Page Ids from the Country object where the ISO Code is null ordered alphabetically by Name, giving me just the list of Cities.
2. Get the Page Id of the currently loaded Country record.
3. If the Page Id is in the list, generate Page Links.
4. Else, do not render Page Links.

Looks pretty simple. Why haven't I thought of this before?! Haha.

So whenever I say, "Matutulog muna ako, baka sakaling mapanaginipan ko yung sagot", that's not me procrastinating or being lazy. That's just me looking for the solution from another dimension. ^_^

4 comments:

  1. kring!!! nakaka-relate ako sa thought na ito! kasi sabi sa isang blog na nabasa ko, 'the first thoughts that come to mind the moment we wake up - are from our intuition, yung most intelligent/wise part in us. naaahks! tsaka, oo, kapag feel nang matulog - go go go!! hehehe - mae

    ReplyDelete
    Replies
    1. Ahh.. Gnun pala yun! Akala ko sa dreamworld ko tlga nakita ang kasagutan. Haha. Hmm, pwede ko kaya ito i-quote kpg nahuli ako n22log sa ofc? Hihi.

      Delete
  2. Bakit nakukuha ko ang sagot sa banyo?--- armie

    ReplyDelete
    Replies
    1. Hahaha! Baka mas tahimik kc dun kesa sa loob ng office.. Dun ka nakakapagmuni-muni.. Hihi. ;))

      Delete