Skip to main content


Showing posts from July, 2012

CSS Link tag not working?

Today while doing some changes in html file and included an external css file using link tag, I came to know that external css is working fine with chrome and safari but not in IE 9.0 and Mozilla browser. I just got confused why it’s working in one browser and not in another.  Searched over internet for some time and came to know that we shouldn’t give secure urls in link tag. In this case it would work abnormally or you can say it may work or not. I tried and found the solution but didn’t find the actual reason for this type of behave from well known browsers(IE and Mozilla). If anybody find that please let me know. /*Code not working with https */ /*Code working with http */ Thanks!!!!!!!!! Enjoy Programming :)

Use rsync command over ssh to to take backup of files.

Today we are going to discuss over "how to use rsync command over ssh to take backup of files" . Before that let's know little bit about rsync itself. rsync :   rsync is a little Linux utility that synchronizes filesystems from one place to another by only copying diffs (deltas) of files that have changed. rsync optionally compresses the files ont-the-fly before transfer (to save transfer time) and may be used in conjunction with rsh or ssh to perform remote file transfers. rsync may be used as a backup or mirroring utility. The advantage of using rsync over other archive and copy utilities such as tar, dump and rcp are: (1) rsync can use ssh as a secure channel to transfer files over the network. (2) It provides an ability to retain ownership and permission of files being transferred. (3) It enables files and directories to be synchronized (deleted files are deleted from the last replication), and  (4) transfers only "delta"

How to draw Dynamic Line or Timeseries Chart in Java using jfreechart library?

Today we are going to write a code to draw a dynamic timeseries-cum-line chart in java.   The only difference between simple and dynamic chart is that a dynamic event is used to create a new series and update the graph. In out example we are using timer which automatically calls a funtion after every 1/4 th second and graph is updated with random data. Let's try with the code : Note : I had tried my best to provide complete documentation along with code. If at any time anyone have any doubt or question please post in comments section. import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Timer; import javax.swing.JPanel; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.XYPlot; import