agileaholic :)

Java, groovy, grails, hacking and more…

126: The specified module could not be found – ../mysql.so

Posted by Prabhu Beeman on September 29, 2009

I was trying my hands for the first time on RoR (Ruby on Rails).
(Netbeans 6.7 , Windows XP).

In the process, I got the following (misleading error)

126: The specified module could not be found – ../mysql_api.so

But mysql_api.so was in the path where ruby was looking for.
Solution:
Make sure your MySql bin path is in your PATH variable.

Posted in agile | Tagged: , | Leave a Comment »

AVAudioRecorder – iPhone Audio Recording

Posted by Prabhu Beeman on September 23, 2009

I have been using the AVAudioRecorder class to record the audio. But it wasnt allowing me to play it back. I had to restart the application to play it. I had to toil hard with it for a few hours before I found the culprit.

Thanks to this link. The problem was in my AVAudioSession Category which was set to AVAudioSessionCategoryRecord while it should have been AVAudioSessionCategoryPlayAndRecord.

Posted in iPhone | Leave a Comment »

Link of the day: Pomegranate

Posted by Prabhu Beeman on August 27, 2009

Posted in link of the day | Leave a Comment »

Link of the day: Air traffic in 24 hours

Posted by Prabhu Beeman on August 16, 2009

Posted in link of the day | Tagged: | Leave a Comment »

Link of the day: Four Perfectly Round Circles

Posted by Prabhu Beeman on August 14, 2009

Posted in link of the day | Tagged: | Leave a Comment »

Objective-C why using @class

Posted by Prabhu Beeman on August 11, 2009

One primary reason for using the @class is to avoid multiple inclusion of a same header file.
It is clear explained in the Objective-C 2.0 Language guide

The @class directive minimizes the amount of code seen by the compiler and linker, and is therefore the simplest way to give a forward declaration of a class name. Being simple, it avoids potential problems that may come with importing files that import still other files. For example, if one class declares a statically typed instance variable of another class, and their two interface files import each other, neither class may compile correctly.

Posted in agile | Tagged: | Leave a Comment »

XML Parser Error

Posted by Prabhu Beeman on August 11, 2009

I was trying to parse an xml response using jquery.
Following is the xml content:

<?xml version=”1.0″ encoding=”utf-8″?>
<rows>
     <row>
        <cell>lib</cell>
        <cell>19-06-2009 10:01:55</cell>
     </row>
     <row>
        <cell>usr</cell>
        <cell>19-06-2009 10:01:55</cell>
     </row>
</rows>

This is a valid xml.

Following is the jquery ajax request:

function loadXML() {
    $.ajax({
          url: ‘xml.jsp’,   //assume that the url parses the server directory and gives us the above shown xml    
          type: “GET”,                 
          dataType: “xml”,
          success: function(data) {
          console.debug(“success”);
            var rows = $(data).find(‘rows’);
            //now parse each of the row in rows
            $(rows).find(‘row’).each (
                     function() {
                          //now parse each of the cell in row
                          $(this).find(‘cell’).each (
                               function() {
                                    var cellValue = $(this).text();
                               }
                         );
                     }
             );
          },
          error: function(data) {
               console.debug(data.status);
          }
    });

Everything seems so good until the program enters the error block of the ajax request.
The status displayed was 200.
It looks like some parser error when digged deep into the XMLResponse using firebug.
So what could be wrong?
It is actually the inclusion of header that was the problem.
If you have set the content-type as ‘text/xml’ then there is no need for a xml header.
Hope this could solve someone banging their head with this issue.

Posted in Uncategorized | Tagged: | Leave a Comment »

Bing goes the Internet

Posted by Prabhu Beeman on August 7, 2009

Quite a funny video that was released as part of the Microsoft jingle/video contest

Song A Day #202: Bing Goes The Internet

Posted in Uncategorized | Leave a Comment »

Kill Gmail Ads

Posted by Prabhu Beeman on August 6, 2009

Everyone sees the sponsored ads on right side of their gmail mail box. Now adding the following text to their mail seems to kill those ads.

I enjoy the massacre of ads. This sentence will slaughter ads without a messy bloodbath.

Pretty smart!!!

Posted in Uncategorized | Tagged: | Leave a Comment »

XML Vulnerability

Posted by Prabhu Beeman on August 6, 2009

I have worked on numerous web based applications and not without the xml libraries. Its omnipresent.

Now to the scariest part. There is a vulnerability on almost all xml libraries and the languages known to be affected are Python and Java. And the libraries built on C language are at high risk and most of the libraries out there are written in C. More here

Posted in Uncategorized | Tagged: | Leave a Comment »