kjohri

Error

JRobin: Not able to save graph as a PNG file

Error:

Not able to save graph as a PNG file.  
Compilation error: cannot find symbol  
[javac] symbol  : method saveAsPNG(java.lang.String,int,int)  

Solution:

saveAsPNG does not seem to be there in JRobin anymore. Use the RrdGraph.render (java.awt.Graphics g) method. For example,


// Create a buffered image in which the graph would be drawn    
BufferedImage bImage = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);
Read more
Error

cygwin1.dll not found

A C program was compiled under Cygwin and run directly under Windows. The following runtime error was observed,

cygwin1.dll not found

SOLUTION

Make sure that the environment variable, PATH, has the directory C:\gygwin\bin which contains the dll, cygwin1.dll.

On Windows Vista, this can be done as follows:

  1. From Start menu, click Control Panel.
Read more

Mounting Windows partitions under Linux

Multi-boot systems with Linux and Windows are quite common. With the following steps, it is easy to access Windows partitions under Linux.

1. Examine the disk partitions. For example,

sudo fdisk -l

gives the output,

Disk /dev/sda: 160.0 GB, 160041885696 bytes  
255 heads, 63 sectors/track, 19457 cylinders  
Units = cylinders of 16065 * 512 = 8225280 bytes  
Disk identifier: 0x093fba08  

Device Boot      Start         End      Blocks   Id  System  
/dev/sda1   *           1        9311    74790576    7  HPFS/NTFS  
/dev/sda2           18456       19457     8048565    7  HPFS/NTFS  
/dev/sda3            9312       11622    18563107+  bf  Solaris  
/dev/sda4           11623       18455    54886072+   5  Extended  
/dev/sda5           11623       11747     1004031   82  Linux swap / Solaris  
/dev/sda6           11748       12356     4891761   83  Linux  
/dev/sda7           12357       16004    29302528+  83  Linux  
/dev/sda8           16005       18455    19687626   83  Linux

/dev/sda1 and /dev/sda2, here, refer to the Windows' C and D drives respectively.… Read more

rsync


rsync is a one-way file synchronization tool used in Linux and other Unix-like systems. It is used to ensure that the destination file(s) become an exact replica of corresponding file(s) at the source, thus providing an excellent tool for taking backups.… Read more

Penguins

vi editor commands

vi is a classic text editor that has been available with Unix systems right from the beginning. vi has been a very popular text editor and one can edit files very efficiently using it. In this tutorial, we look at some of the vi commands that make it such a powerful editor.… Read more