Friday, January 26, 2007

My web SIte

I am building a website for my own in google pages. Not a website still. My friend said i shouldn't not use something made by google for my own web page. What ever i'm continuing. u can take a look here.

Sunday, January 14, 2007

Here is a code which will guide u through this.

The bad thing is the file is not still posted :D


import java.io.File;
import javax.swing.*;
import java.io.*;



public class dir
{
FileWriter fr;
dir()
{
try
{
fr=new FileWriter("c:/outputDir.txt");
}
catch (Exception ex)
{

}


}
public static void main(String args[])
{

dir d=new dir();

d.getDirectoryStructure();
//showFileTree("a");
/*FileDescriptor fd=new FileDescriptor();
String location="a";
File f=new File(location);
String[] s=f.list();

File[] ff=f.listFiles();

for(int j=0;j
{
System.out.println (ff[j].getName());
}
for(int i=0;i
System.out.println (s[i]+"Directory: "+new File(location+"/"+s[i]).isDirectory()+"\n");*/

}

void getDirectoryStructure()
{
String str=JOptionPane.showInputDialog("Enter the directory of which u want to get info");


File f=new File(str);

if(f.exists())
{
showFileTree(str);
}
else
{
try
{
this.fr.write("File does not exist");
//this.fr.close();
}
catch (Exception ex) {
}

}
try
{
this.fr.close();
}
catch (Exception ex) {
}
}


int printTab=0;
int count=0;
void showFileTree(String directory)
{

File f=new File(directory);

File[] allFiles=f.listFiles();

for(int i=0;i
{

for(int j=0;j
{
try
{
fr.write("\t");
}
catch (Exception ex) {
}

System.out.print("\t");
}
try
{
String temp=allFiles[i].getName();
temp=temp.substring(0,temp.indexOf("."));
count++;
fr.write("insert into pinyin values("+count+",'"+temp+"');\n");
}
catch (Exception ex) {
}

//System.out.print("Name: "+allFiles[i].getName()+" +length: "+allFiles[i].length()+ "\n");
if(allFiles[i].isDirectory())
{
printTab++;
showFileTree(allFiles[i].getPath());
}


}
printTab--;
}
}

Saturday, January 6, 2007

Eid is shesh

Eid onek din hoilo shesh. Kurbanir eid beshi ekta valo na. Rozar eid ta

Friday, December 22, 2006

Another post

I am posting again. Nothing important is happening down here. I have bought a phone Motorola W220. It cost me 5550/= tk only. It's a good looking phone but it has no java support but it can access wap sites.

Wednesday, December 20, 2006

First Blog

This is my first blog.I love to write blog.But i can't write blog.How to write a good blog is my minds quetion. So i started to look for bloggers.I found that there are many interesting blogs in this world.There are different tutorials for blog writing.If u want to know how to write blogs then open google and search the net.Some tutorial links
http://www.useit.com/alertbox/weblogs.html
http://www.marketingprofs.com/5/ochman9.asp
http://weblogs.about.com/od/tipsandstyle/Blog_Writing_Tips_and_Style.htm
http://alistapart.com/articles/writebetter
http://www.masternewmedia.org/news/2005/04/26/how_to_write_a_successful.htm