AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters > Web Development
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Web Development Java/PHP/Perl/ASP and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Nov 30, 2004, 21:04   #1
Silence
 
Moonlight's Avatar
 
Join Date: Nov 2004
Location: back to meta level
Posts: 3,929
Blog Entries: 3
Rep Power: 4
Reputation: 189
Send a message via Skype™ to Moonlight
Question any java coder around? alive? help plz

http://coltrane.wiwi.hu-berlin.de/le...omework_1.html
deadline is knocking & i can't deal with last probs.

39 errors
root@lil:~/homework/MAT# javac SearchResults.java
root@lil:~/homework/MAT# javac LilitHw1.java
LilitHw1.java:27: cannot resolve symbol
symbol : variable Konsole
location: class LilitHw1
auswahl = Konsole.readInt("Please chose an option");
^
1 error
root@lil:~/homework/MAT# java LilitHw1.class
Exception in thread "main" java.lang.NoClassDefFoundError: LilitHw1/class

if smb could help asap, i'll attach the file.
thx voraus
Moonlight is offline   Reply With Quote Quote selected
Old Dec 1, 2004, 08:06   #2
★★★★★★★★★★★★★
 
Hrach_Techie's Avatar
 
Join Date: Aug 2004
Location: ★★★★★★★★★★★★★
Posts: 16,586
Rep Power: 8
Reputation: 432
Quote:
Originally Posted by Moonlight
http://coltrane.wiwi.hu-berlin.de/le...omework_1.html
deadline is knocking & i can't deal with last probs.

39 errors
root@lil:~/homework/MAT# javac SearchResults.java
root@lil:~/homework/MAT# javac LilitHw1.java
LilitHw1.java:27: cannot resolve symbol
symbol : variable Konsole
location: class LilitHw1
auswahl = Konsole.readInt("Please chose an option");
^
1 error
root@lil:~/homework/MAT# java LilitHw1.class
Exception in thread "main" java.lang.NoClassDefFoundError: LilitHw1/class

if smb could help asap, i'll attach the file.
thx voraus
----
hey Moonlight! how is it going/ hope all is well!
I'll ask our guys in software what solution they have to your issues ... unfortunately, the filed I am in is a little bit different ... it's silicon ip field and semiconductors - I am not a coder but I'll ask the guys to help you out with this ... let me check with our s/w engineers first ...

cheers!
Hrachya
__________________
Мадмазель, Медам, Месье! "Глория" меняет курс и направляется в Кейптаун! Кому это не нравится будет расстрелян на месте. (с)

http://texneg.livejournal.com
Hrach_Techie is offline   Reply With Quote Quote selected
Old Dec 1, 2004, 08:16   #3
★★★★★★★★★★★★★
 
Hrach_Techie's Avatar
 
Join Date: Aug 2004
Location: ★★★★★★★★★★★★★
Posts: 16,586
Rep Power: 8
Reputation: 432
перепутал приват с эфиором - бывает ...
__________________
Мадмазель, Медам, Месье! "Глория" меняет курс и направляется в Кейптаун! Кому это не нравится будет расстрелян на месте. (с)

http://texneg.livejournal.com
Hrach_Techie is offline   Reply With Quote Quote selected
Old Dec 1, 2004, 08:22   #4
Silence
 
Moonlight's Avatar
 
Join Date: Nov 2004
Location: back to meta level
Posts: 3,929
Blog Entries: 3
Rep Power: 4
Reputation: 189
Send a message via Skype™ to Moonlight
thx considering i didn?t go any further. if understood the prob, mayb could do smth. i believed it should b right. in case posting the codes
Code:
class LilitHw1
{
        //To change the search term, just change this
        static String Term = "implementation";

        public static void main(String[] args)
        {
                double eingabe1;
                double ergebnis = 0.0;
                int auswahl;

                System.out.println("\nDesktop Search beta version");
                System.out.println("\nThis program allows textual search for keywords in .doc, .txt, .html,");
                System.out.println(" files locally stored in your computer.\n");
                System.out.println("The current search term is fixed in this version and is: " + Term + ". ");

                do
  //User manu
                {
                        System.out.println("\n\n\nDesktop Search beta version");
                        System.out.println("");
                        System.out.println("(1) PDF");
                        System.out.println("(2) TXT");
                        System.out.println("(3) DOC");
                        System.out.println("(4) HTML");
                        System.out.println("(0) Ende");
                        auswahl = Konsole.readInt("Please chose an option");
                        switch (auswahl)
                        {
                                case 1 : {
                                                System.out.print("\nThe PDF search result is : ");
                                                runPDFsearch();
                                                break;
                                        }
                                case 2 : {
                                                System.out.print("\nThe TXT search result is : ");
                                                runTXTsearch();
                                                break;
                                        }
                                case 3 : {
                                                System.out.print("\nThe DOC search result is : ");
                                                runDOCsearch();
                                                break;
                                        }
                                case 4 : {
                                                System.out.print("\nThe HTML search result is : ");
                                                runHTMLsearch();
                                                break;
                                        }
                                case 0 : {

System.out.println("\ncaio!");
                                                break;
                                        }
                                default:{

System.out.println("\nInvalid choice.\n");
                                }
                        }
                }while (auswahl != 0);
        }

         private static void runPDFsearch()
        {
          int Lines = SearchResults.pdfResultsFN.length;

          System.out.println("There are " + Integer.toString(Lines) + " matching lines\n\n");

          for(int count=0; count < Lines; count++)
          {
            System.out.print(SearchResults.pdfResultsFN[count] + " : " );
            ProcessLine( SearchResults.pdfResultsTL[count] );
          }
        }

         private static void runTXTsearch()
         {
          int Lines = SearchResults.txtResultsFN.length;

          System.out.println("There are " + Integer.toString(Lines) + " matching lines\n\n");

          for(int count=0; count < Lines; count++)
          {
            System.out.print(SearchResults.txtResultsFN[count] + " : " );
            ProcessLine( SearchResults.txtResultsTL[count] );
          }
        }

        private static void runDOCsearch()
        {
          int Lines = SearchResults.docResultsFN.length;

          System.out.println("There are " + Integer.toString(Lines) + " matching lines\n\n");

          for(int count=0; count < Lines; count++)
          {
            System.out.print(SearchResults.docResultsFN[count] + " : " );
            ProcessLine( SearchResults.docResultsTL[count] );
          }
       }

        private static void runHTMLsearch()
        {
          int Lines = SearchResults.htmlResultsFN.length;

          System.out.println("There are " + Integer.toString(Lines) + " matching lines\n\n");

          for(int count=0; count < Lines; count++)
          {
            System.out.print(SearchResults.htmlResultsFN[count] + " : " );
            ProcessLine( SearchResults.htmlResultsTL[count] );
          }
       }
//This will do all the printing with the '...' if needed
       private static void ProcessLine(String ProcessString)
       {
         int Length = ProcessString.length();
         int Location = FindTerm(ProcessString);
         if(Location < 0 || Location > Length){
           System.out.print("Error\n");
           System.out.println(Location);
           return;
         }
         int End = Term.length() + Location;



         if (Location > 10){
           System.out.print("...");
           System.out.print(ProcessString.substring(Location-10, Location));
         }else{
           System.out.print(ProcessString.substring(0, Location));
         }

         System.out.print(ProcessString.substring(Location,Location+Term.length()));


         if ((End + 10) < Length){
           System.out.print(ProcessString.substring(End, End+10));
           System.out.print("...");
         }else{
           System.out.print(ProcessString.substring(End, Length));
         }

         System.out.print("\n");
       }

       //This will find an index in the string where the term starts
       private static int FindTerm(String ProcessString)
       {

         int iRet=-1;

         //Put into a char array to get at individual bytes
         int Length = ProcessString.length();
         char[] ProcessCharArray =
ProcessString.toLowerCase().toCharArray();

         //same as above
         int TermLength = Term.length();
         char[] TermCharArray = Term.toLowerCase().toCharArray();

         //look for the term
         for(int processcount=0; processcount < Length; processcount++)
         {
           //find the begining
           if (ProcessCharArray[processcount] == TermCharArray[0]){
             iRet=processcount;
             //see if the whole term is found
             for(int termcount=0; termcount<TermLength; termcount++){
               if (ProcessCharArray[processcount+termcount] !=
TermCharArray[termcount]){
                 //keep trying
                 iRet=-1;
               }
             }
             if(iRet == processcount){
               //found it
               return iRet;
             }
           }
         }
         //didn't find it
         return iRet;
       }
}
Moonlight is offline   Reply With Quote Quote selected
Old Dec 1, 2004, 10:21   #5
Дикообраз-безобраз
 
AvDav's Avatar
 
Join Date: Jul 2004
Location: У самого синего моря
Posts: 2,861
Rep Power: 5
Reputation: 128
I'm not so familiar with java, but the problem is that java "doesn't know" who is "Konsole", check out whether you imported the lib (correctly). By the way, there is a link to the Konsole class implementation, try to place that above the LilitHw1 class.
Ciao.
__________________
- Гитлер?!!
- Да?!!
- Зурна!!!
AvDav is offline   Reply With Quote Quote selected
Old Dec 1, 2004, 12:15   #6
Silence
 
Moonlight's Avatar
 
Join Date: Nov 2004
Location: back to meta level
Posts: 3,929
Blog Entries: 3
Rep Power: 4
Reputation: 189
Send a message via Skype™ to Moonlight
AvDav: thx so so much!! i had even translated german text in the given file, but forgot 2 add Konsole.class (no way 2 replace the hw1). finally no errors, but prog runned only 2 prove me that is working not the way it was supposed to!! after classes i?ll have only some hrs b4 the deadline..

Quote:
12 errors
bash-2.05b$ javac LilitHw1.java
bash-2.05b$ javac SearchResilts.java
error: cannot read: SearchResilts.java
1 error
bash-2.05b$ java LilitHw1

Desktop Search beta version

This program allows textual search for keywords in .doc, .txt, .html,
files locally stored in your computer.

The current search term is fixed in this version and is: implementation.



Desktop Search beta version

(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 1

The PDF search result is : There are 7 matching lines


FILE - implementation : implementation
FILE - implementation123456789 : implementation123456789
FILE - implementation123456789abcdef : implementation123456789a...
FILE - 123456789implementation : 123456789implementation
FILE - 123456789abcdefimplementation : ...6789abcdefimplementation
FILE - 123456789implementation123456789 : 123456789implementation123456789
FILE - 123456789abcdefimplementation123456789abcdef : ...6789abcdefimplementation123456789a...



Desktop Search beta version

(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 2

The TXT search result is : There are 7 matching lines


FILE - implementation : implementation
FILE - implementation123456789 : implementation123456789
FILE - implementation123456789abcdef : implementation123456789a...
FILE - 123456789implementation : 123456789implementation
FILE - 123456789abcdefimplementation : ...6789abcdefimplementation
FILE - 123456789implementation123456789 : 123456789implementation123456789
FILE - 123456789abcdefimplementation123456789abcdef : ...6789abcdefimplementation123456789a...



Desktop Search beta version

(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 3

The DOC search result is : There are 7 matching lines


FILE - implementation : implementation
FILE - implementation123456789 : implementation123456789
FILE - implementation123456789abcdef : implementation123456789a...
FILE - 123456789implementation : 123456789implementation
FILE - 123456789abcdefimplementation : ...6789abcdefimplementation
FILE - 123456789implementation123456789 : 123456789implementation123456789
FILE - 123456789abcdefimplementation123456789abcdef : ...6789abcdefimplementation123456789a...



Desktop Search beta version

(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 4

The HTML search result is : There are 7 matching lines


FILE - implementation : implementation
FILE - implementation123456789 : implementation123456789
FILE - implementation123456789abcdef : implementation123456789a...
FILE - 123456789implementation : 123456789implementation
FILE - 123456789abcdefimplementation : ...6789abcdefimplementation
FILE - 123456789implementation123456789 : 123456789implementation123456789
FILE - 123456789abcdefimplementation123456789abcdef : ...6789abcdefimplementation123456789a...



Desktop Search beta version

(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 0

caio!
instead of printing real file names, & then the line containing the search term, it prints the stuff in prog? any idea what 2 do?
Moonlight is offline   Reply With Quote Quote selected
Old Jan 24, 2005, 15:41   #7
Дошкольник
 
Join Date: Aug 2004
Location: Oxford
Posts: 141
Rep Power: 5
Reputation: 10
Quote:
Originally Posted by Moonlight
http://coltrane.wiwi.hu-berlin.de/le...omework_1.html
deadline is knocking & i can't deal with last probs.
Hey, Moonlight. Studierst du Informatik an der HU? Wenn, ja, dann können wir uns treffen, ich mache jetzt Bioinformatik an der TFH, und habe Ahnung in Java
Ablertus is offline   Reply With Quote Quote selected
Old Jan 24, 2005, 18:55   #8
Silence
 
Moonlight's Avatar
 
Join Date: Nov 2004
Location: back to meta level
Posts: 3,929
Blog Entries: 3
Rep Power: 4
Reputation: 189
Send a message via Skype™ to Moonlight
ja!!!!! ich studiere auch wirtschaft informatik an der hu!! und echt brauche hilfe mit java!!!! danke sehr! details over pm
Moonlight is offline   Reply With Quote Quote selected
Old Feb 1, 2006, 18:48   #9
Silence
 
Moonlight's Avatar
 
Join Date: Nov 2004
Location: back to meta level
Posts: 3,929
Blog Entries: 3
Rep Power: 4
Reputation: 189
Send a message via Skype™ to Moonlight
Re: any java coder around? alive? help plz

nevermind, the deadline missed

Last edited by Moonlight : Feb 1, 2006 at 21:56.
Moonlight is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saddam Hussein Captured Alive Near Tikrit DaNYer General 29 Dec 18, 2003 23:15
CODER & DECODER petar Languages, Compilers and Interpreters 4 Jul 27, 2002 12:21


All times are GMT. The time now is 15:29.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link