About
A normal day for Aizat Faiz isn't so normal for most people. Though a technologist by nature, you may also find Aizat involved in other non-tech related activities on a typical day, such as filming his next Ramly burger masterpiece, burying himself in books about economics, psychology or science fiction, and dabbling in the fine arts of Swing dancing.
Though he is a connoisseur of professions, Aizat is best known for his technology background. Having an interest in computers since childhood, Aizat began creating websites as early as 1997. Though his programming career began much later, Aizat soon came to win several programming competitions, including the much coveted eGenting Programming Competition in 2006.
He has been actively involved in the Free and Open Source scene in Malaysia since early 2005. In 2008, Aizat helped organize the premier Free and Open Source Conference Malaysia (FOSS.MY), which was attended by over 300 participants.
Due to his active lifestyle, Aizat may sound like a difficult man to catch. But fear not - he can be easily spotted by his loud personality, booming voice, and constant cry for attention.
November 9th, 2009 - 16:16
Hi Aizat,
Thanks for this useful article.
I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module:
module SqlHunter
class ActiveRecord::ConnectionAdapters::AbstractAdapter
@@queries = []
cattr_accessor :queries
def log_info_with_trace(sql, name, runtime)
return unless @logger && @logger.debug?
@@queries << sql
end
alias_method_chain :log_info, :trace
end
end
in the controller I wrote that
sqlfile = File.open("public/advancedStats/#{@dir_name}/advancedStatQuery.sql", 'w')
@queries = ActiveRecord::ConnectionAdapters::AbstractAdapter::queries
for query in @queries do
sqlfile.write("#{query} \n")
end
sqlfile.close
I also modified Rails environment by adding this line:
ActiveRecord::Base.logger.level = Logger::DEBUG
This program is working and I can get queries but, all queries. In contrast I need only the specific queries done by one user to generate a stat report.
Do you have any idea to fix that,
Thanks,
mgatri
November 15th, 2009 - 00:19
Can you please tell me ,how to do application to obtain diplomatic malaysia passport ?
how to obtain support letter from ministry of foreign affairs ?
looking forward for your reply,
Aziz @Sebastian
December 18th, 2009 - 15:00
hi man
you have helped me heaps with the wallpaper situation, i was wondering do you know how to get rid of the navigation bar so that it only shows the wallpaper?
regards
steve