Change base url of your magento application (And a bonus problem!)

Starting work with magetno (eCommerce platform). I installed the framework defining the base url as “localhost“. Everything was OK  but yet i was unable to login to admin panel. I even tried changing password in database (Changing the original password to md5 hash).

I just figured out that magento requires “.” in the host name (it should be instead of localhost). So, i had to change the host name      every time browsing each new page from admin panel. This solved my bonus problem ;P.

Continue reading


Creating a new .htaccess or .password file in windows 7

Have you ever tried to create a new .htaccess file in Windows 7 (or Vista) via windows explorer? If so, this error will probably look familiar.



Open Notepad and hit go to File > Save As.

Change the save as type to “All Files”.

Enter “.htaccess” as the file name and hit save.


New Website Developed

Very recently I developed website for an software firm of Bangladesh called tetra soft. (

Tetra Soft was developed to help business organizations running properly in the world of globalization. For these responsibilities and challenges, Tetra Soft is applying its acquired knowledge, skills, experience, expertise and professionalism.

The firm is one of the best solution provider in Bangladesh.

Tetrasoft Bangladesh

Using colorbox(a jquery plugin) ajax in a complex situation

Colorbox is a lightweight customizable lightbox plugin for jQuery.

I am using colorbox for another perpose: to show a (semi!) modal window to show information on ajax call.

You can get the plugin here .

Here I’ll give a simple example how to load ajax data and show through colorbox plugin. In second phase i’ll try to give the scenario of the complex situation and give the solution. Though the solution looks so obvious now, i had to go through lots of other solutions (Not worthy for that situation).

Continue reading

Insert line breaks into a long string to fit a length : Minimizing the risk of cutting a word unexpectedly

import java.util.Calendar;
import java.util.Date;
public class test {
  public static void main(String[] argv) {
	  String s = "Here, startIndex specifies the beginning index, and endIndex specifies the stopping point. The string returned contains all the characters from the beginning index, up to, but not including, the ending index. The following program uses substring( ) to replace all instances of one substring with another within a string:";// used to insert any string or character at the specified position in the given string."; 	  
      int charsPerLine = 10;
      System.out.println(insertLinebreaks(s, charsPerLine));	     
  public static String insertLinebreaks(String s, int charsPerLine){	  
      String[] tokens = s.split(" ");
      String temp="";
      String retS = "";
      int maxRightPadding = 5; // Increasing the value'll minimize the risk of cutting a word unexpectedly, but woun't give good performance to break continuous string(without space/br). 
      for (int i=0; i charsPerLine){
	      if((charsPerLine - temp.length()) <= maxRightPadding){
		  retS = retS+temp+ "\n";				  
		  for(int o=0; o<= (tokens[i].length()/charsPerLine); o++){
		      if(o< tokens[i].length()/charsPerLine){						  
			  retS = retS + tokens[i].substring((o*charsPerLine), ((o*charsPerLine) + charsPerLine))+"\n";
		      if(o == tokens[i].length()/charsPerLine){						  
			  temp = tokens[i].substring(o*charsPerLine);							  						 				 
		  retS = retS+temp+ "\n";
		  temp = tokens[i];				  				 
	     if((temp.length() + tokens[i].length()) <= charsPerLine){				  
		 temp = temp+" "+tokens[i];				 
		 retS = retS+ temp + "\n";				 
		 temp = tokens[i];
     retS = retS +temp+ "\n";
     return retS;	  

jQuery Ajax Tooltip

This is very much based on the Coda Popup Bubble example for jQuery that’s been going around with a few important differences:

  1. The information is requested via AJAX, so you don’t have to include all of this extra information in a hidden div. This keeps your markup smaller for grids with tons of names in it.
  2. When you mouse over another name, the previous one will disappear. If you tried this with the original Coda example, you’d end up with a weird streaking animation since there’s a delay before the div is hidden.
  3. Works in IE (just turned off the fade animation)


Continue reading