Programmer’s Notepad – pnotepad January 28, 2010
Posted by prasada in Uncategorized.add a comment
If you are looking around for a light-memory footprint editor for quick coding with highlight and add-on support give Programmer’s Notepad a try.
For coloring scheme you visit, downloads section
Installing GNUStep on Fedora Core January 11, 2010
Posted by prasada in Uncategorized.add a comment
In the journey of installing GNUStep on my Fedora Core machine, I noted couple of useful pointers that could help you save sometime.
* Install GNUStep Make from yum repository (yum install gnustep-make)
* make (compile source) and install GNUStep Base
You will need the following:
export GNUSTEP_MAKEFILES=/usr/lib/GNUstep/Makefiles/
* make (compile source) and install GNUStep GUI
You need to update ldconfig.
vim /etc/ld.so.conf.d/gnustep.conf
Add the content below and save:
/usr/local/lib/ix86/linux-gnu/gnu-gnu-gnu
Execute:
/sbin/ldconfig
* make (compile source) and install GNUstep Backend
You will need the following:
export PATH=$PATH:/usr/local/bin/ix86/linux-gnu/gnu-gnu-gnu
Check out complete documentation on steps followed at How to install GNUStep on Fedora Core
serialize/unserialize php API – an observation January 2, 2010
Posted by prasada in Uncategorized.add a comment
On first request, I was saving the object into session.
$userInstance = new Users_Model(); $_SESSION['__key'] = $userInstance;
Make sure the class Users_Model definition is available.
On second request, I retrieve the object from session for re-use.
$retrievedUserInstance = $_SESSION['__key']; object(__PHP_Incomplete_Class)[1] public '__PHP_Incomplete_Class_Name' => string 'Users_Model' (length=11) private 'id' => string '1' (length=1) // ...
I noticed the $retrieveUserInstance object missed several methods!!
I realized that on second request, the class Users_Model definition
is not available on the page load and unserialize API is not working as expected.
$_SESSION values are saved using serialize API (as session.save_handler was set to files)
On making the class definition available before session_start() call,
the $retrieveUserInstance worked fine.
object(Users_Model)[1] private 'id' => string '1' (length=1) // ...
Hope it saves sometime for you.
pedit – simple text editor December 20, 2009
Posted by prasada in Uncategorized.add a comment
I’m happy to make available to source-code of my memorable text editor (pedit) that was developed as part of my Graduation (semester) project.
pedit is written using ncurses library and C++ language, with Object Oriented Programming concepts.
Give a try and feel free to extend it. If you have any feedback do keep me posted.
Prototypejs 1.6 clash with JSON !! November 12, 2009
Posted by prasada in Uncategorized.add a comment
Prototypejs 1.6 could break your JSON API usage, be careful !
This article could be a time-saver, prototype.js breaks Firefox 3.5 native JSON
Prototype – Event.fire exception to be handled for IE November 2, 2009
Posted by prasada in Uncategorized.add a comment
Prototype 1.6 has introduced Event.fire API that works pretty well in Firefox but experienced a problem in IE (7).
Exception was being thrown in Event.fire API that needed a special treat.
The highlighted workaround worked for me:
fire: function(element, eventName, memo) {
// ...
if (document.createEvent) {
element.dispatchEvent(event);
} else {
try{
element.fireEvent(event.eventType, event);
} catch(error) {
// Error: No such interface supported (IE)
element.fireEvent(event.eventType);
}
}
return event;
}
Example:
Event.fire('myhidden_element_id', 'custom:change');
mysql-java-connector: ResultSet getObject failure on Timestamp column if null October 31, 2009
Posted by prasada in Uncategorized.add a comment
I had strange situation working with ResultSet when fetching Timestamp column from MyTable.
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
Class.forname("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection(
"jdbc:mysql://host:port/database",
"username", "password");
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery("SELECT timestamp_column FROM mytable");
while(rs.next()) {
rs.getObject("timestamp_column");
}
The cause of the failure was due to null value in timestamp_column !
The solution suggested about (zeroDateTimeBehavior=convertToNull) in the article, helped me overcome the failure.
All you need to do is:
Connection connection = DriverManager.getConnection(
"jdbc:mysql://host:port/database?zeroDateTimeBehavior=convertToNull",
"username", "password");
Eclipse Editor – Setting Line Delimiter Style October 29, 2009
Posted by prasada in Uncategorized.add a comment
Was going crazy with my eclipse as line delimiter was different than other editors. This was causing issue with SVN commits (mixed line delimiters!)
Finally, found the way of setting the line preferences for Eclipse.
It is located under: Windows > Preferences > General > Workspace

Lynx – Text only browser for Windows ! September 15, 2009
Posted by prasada in Uncategorized.add a comment
Text only browser could speed up your work specially if you are on a low-speed internet connection and getting distracted with graphics on the web applications
Got hold of Lynx on windows, which is a cool text browser I have been using on remote servers!
Well, its easy to get started, download and configure the lynx.bat and lynx.cfg files.
PHPTAL – Template Attribute Language for PHP September 11, 2009
Posted by prasada in Uncategorized.add a comment
It was fun to work with PHPTAL and walk team with a basic introduction today
. [Download here]