User Profile

Collapse

Profile Sidebar

Collapse
moizpalitanawala
moizpalitanawala
Last Activity: Jun 2 '11, 05:19 AM
Joined: Jul 8 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • moizpalitanawala
    replied to Extracting Words from a text file
    in Java
    Code:
    String s="<< Mr John is a single man he lives in alabama his phone number is 1111111111111 >>";
          
            int i=0;
            char ch;
            String temp="";
            while(i<s.length())
            {
                ch=s.charAt(i++);
                if((ch>='0'&&ch<='9')||ch=='+')
                {
                    while((ch>='0'&&ch<='9')||ch=='+'||ch=='-'||ch=='
    ...
    See more | Go to post
    Last edited by Niheel; Jun 1 '11, 05:10 PM.

    Leave a comment:


  • the code runs too slow!! how can it be optimised

    I think Due to recursion it is taking time but in which part of the code it is consuming more time and where to optimize the code.

    Code:
    package scanmove;
    import java.io.*;
    import java.util.*;
    
    class scanmove
    {
        static String destination="F:\\destination\\";
        static Vector <String> vs=new Vector();
        
        public static void main(String args[])
    ...
    See more | Go to post

  • how to create jar files so that it will open in a mouse click?

    my project has many files?
    See more | Go to post

  • moizpalitanawala
    started a topic reverse each word of the String
    in Java

    reverse each word of the String

    Hello
    I want to do reverse each word of the String
    example if input String is "Hello World" then the output should be "olleH dlroW"

    i Have tried this far
    Code:
    class g
    {
    static String s="Hello World Hello World";
    static int last=s.lastIndexOf(' ');
    static String tempS;
    
    public static void start(int count)throws Exception
    {
    if(count!=last)
    ...
    See more | Go to post

  • I want to make my monitor colour settings Unchangeable

    I had made colour settings in my monitor, i.e brightness,cont rast, colour ,etc.
    Now I want that it cannot be changed by any other person except me.
    How can i do that?
    Please help me.
    See more | Go to post

  • moizpalitanawala
    started a topic Help me try finding the error
    in Java

    Help me try finding the error

    Hello Friends
    The code below has no error at compile time.
    But while executing, it does not show the icon at the left hand top corner of the frame, where a java cup icon is originally shown.
    I want to replace it with my icon.

    Code:
    import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    
    class Error1
    {
    
    public JPanel contentPane()
    ...
    See more | Go to post

  • How to store these data in appropriate mannar?

    Hello Friends
    I am having a problem in finding the solution for this Question. Please help me.

    I am having a number say "n". In this case let us consider n=3.

    What i have to do is find first "n" multiples of "n".
    Store the answers somewhere.

    Find again the first "n" multiples of the answers.
    Store the another answers(N1) generated.
    ...
    See more | Go to post

  • I will tell you briefly what i am doing.

    I am making a program which will check how many duplicate files are there in a folder, and list them.

    For this i will compare the length of the two files and their extensions.

    so the file can be of any extension i.e zip, bmp, txt, pdf, etc.

    If you have any other idea for finding duplicates than please let me know.
    Moiz
    See more | Go to post

    Leave a comment:


  • moizpalitanawala
    started a topic How to find the Length of a file in bits
    in Java

    How to find the Length of a file in bits

    Hello,
    For finding the length of a file I use file.length() method. This gives the length in bytes.

    But I want to find it accurately to the remaining bits. How can I do that.
    Moiz
    See more | Go to post

  • moizpalitanawala
    replied to How to copy an image file.
    in Java
    Thanks for your guidance.
    My problem for copying images is solved.
    I had used this code for doing that.

    FileInputStream fis=new FileInputStream (new File("D:/image.bmp"));
    FileOutputStrea m fos=new FilePutputStrea m(new FIle("D:/copyImage.bmp") );
    int c;
    while((c=fis.re ad())!=-1)
    {
    fos.write(c);
    }

    But one more problem arises. The Speed is very slow....
    See more | Go to post

    Leave a comment:


  • moizpalitanawala
    started a topic How to copy an image file.
    in Java

    How to copy an image file.

    Hello friends,
    I want to copy files of extensio .bmp , .png, .tif , etc.

    when I execute the following code i get errors in the file copied.

    FileReader fr=new FileReader("D:/image.bmp");
    BufferedReader br=new BufferedReader( fr);
    FileReader fw=new FileWriter("D:/copyImage.bmp") ;
    String s;
    while((s=br.rea dLine())!=null)
    {
    fw.write(s);
    fw.write(System .getProperty("l ine.separator") );...
    See more | Go to post

  • Till now I tried many alternative ways to make the program work. I wrote this program and thought it will work but this gives run time error( nullpointer exception)

    import javax.swing.*;
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.tab le.*;
    class phoneDir
    {
    private Object data[][];//making it global
    private JPanel GuiContent()//this will create...
    See more | Go to post

    Leave a comment:


  • I am Not getting any error from it but i want to know how to add data into the JTable from a .txt file...
    See more | Go to post

    Leave a comment:


  • How to add data to JTable from a .txt file.

    Hello friends,

    How to add data to JTable from a .txt file.

    I had seen this code from one of the tutorial from java.com. This code doesnt take any input. But shows what is written in the array.

    But i want the table to display the data from a .txt file in which i had stored information in this format. Can anyone please modify the codes and explain me.

    Name:Mr.xyz
    Phone:111111222 222...
    See more | Go to post
No activity results to display
Show More
Working...