Zone of Eranda

select * from LIFE where category=computers

MySql C++ Connector Problem when Retrieving values with getString()

Posted by eranda on October 19, 2009

Recently I’ve been messing around with MySql Connector for C++ in a Fedora core 10. I used Eclipse CDT (Galileo) for compiling/debugging  and it was always giving incomplete result sets whenever getString() method was called. Incomplete in the sense it gives only the first row of the result set inside the loop for enumerating result set items.

I had a carefull observation at the build output and it was popping some sort of a message like ‘libstdc++.s0.5 needed by libmysqlcpp.so might conflict with libstdc++.so.6′. There were no compile time errors neither runtime errors.However in the Debug mode I observed it line by line and came to know it crashes at the first occurence of the getString() method. I was stumbling around with this for somr time and finally able to dismantle the issue.

What I did was I just removed the libstdc++.so.6 from the lib. And remove any files with a name like ‘libstdc++.so.6.something’. Doing this caused to display the build output smoothly (without the above warning message) and getString() method returned all the items in the result set as well. Hope this work around might be useful for anyone to get rid of this headache.

Posted in View Posts | Leave a Comment »

Sharepoint Deployment (MOSS)

Posted by eranda on October 25, 2008

Sharepoint deployment waz not that eazy. There’s no defined method to do that. But we can use some mechanisms wchich are built into MOSS. One such component is stsadm. For the deploymet purposes we can use either export/import or backup/restore mechanisms. My recommendation is export/import since the latter is appropriate for a catatrophic scenario. Our friendly stsadm tool will help to perform export/import.

First you export your custom sharepoint site from your development server into a file with a .dat extention. This file can be imported from the target server (at client end may be) so that we can deploy the customized version at client’s end this way. Within the import command we can specify the site collection as below.

stsadm -o import -url http://<servername>/site -filename <filename>

Although we can deploy a site collection like this, change requirements might raise some issues. for example if the client need to change the UI and all the styles, we have to export and import for each client requirement. and the data which was originally existed might be replaced due to the new import operation. This is not what developers would like to confront.

Therefore the solution to tackle this scenario is the Web Solution Packages (WSP). Package all UI components and style sheets into a one bundle as a feature and deploy it.  This involves creating a manifest file, feature manifest file, feature file and a data definition file (.ddf). As for my opinion, this is the best way for deploying standalone components to a front-end wwweb server. After the deployment, you can enable the feature from Site collection features under Site Actions. For the purpose of deploying .wsp files (cab file with a .wsp extention) we can following commands.

stsadm -o addsolution -name <filename>

stsadm -o deploysolution -name <filename> -local

This way, sharepoint developers can easily handle change requirements.

Posted in View Posts | Leave a Comment »

Knight Rider Circuit for AVR Micro controller

Posted by eranda on August 3, 2008

I crafted a code snippet which would give us the lighting sequence of famous Knight Rider car. This would work in Atmel ATMega 16 series micro controller and the program consumes only 266 bytes. Following goes the code.

#include <avr/io.h>

typedef unsigned char  u08;

int main( void )
{

u08 led, i, j, k,flag;
DDRC = 0xff;

led = 1;
flag = 1;

for (;;)
{
PORTC = led;
if(flag)
led = led<<1;

else
led = led>>1;

if (!led && flag)
{
led = 128;
flag = 0;
}

if (!led && !flag)
{
led = 1;
flag = 1;
}

for (i=0; i<127; i++)   /* outer delay loop */
for(j=0; j<127;j++) /* inner delay loop */
k++;

}
}
The speed of the lighting sequence can be altered by adjusting the i and j values of the outer or inner loops. These loops will provide some delay for the circuit. If anybody who wishes to improve this code, go ahead and enjoy.

Posted in View Posts | Tagged: | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.