server_crash 64 Postaholic

Thanks for offering some help. I got this resolved a little after posting that. I hope I didn't waste your time.

Here is what worked for me:

http://www.wilderssecurity.com/showthread.php?t=75890

I'll certainly give you some rep for the help though.

server_crash 64 Postaholic

I somehow go this virus on my computer that stole my desktop, and wont let me chang it. I think it's called "Trojan-Spy.HTML.Snitfraud.c"....I've tried everything to remove it. I've ran avg, adaware, and spyware doctor, and neither one could remove it. What else should I do?

server_crash 64 Postaholic

You can't call another Class' private method.

server_crash 64 Postaholic

I think it's StreamTokenizer that can differentiate.

server_crash 64 Postaholic

Microsoft had a license to create a JVM according to the standard license for doing so as supplied with JDK 1.0 and 1.1.
This license specifically allowed Microsoft to create their own user interface library (as was normal at the time, but Microsoft were the only ones to actually do it).
When Sun became ready to release Swing (then called JFC) they changed that license to disallow 3rd party user interface libraries and immediately sued Microsoft.
That case hung in court for years and years as Sun had to wiggle into ever tighter corners to get at the money, in the end they got an injunction only on Microsoft having put their own library (WFC) into VJ++ as the default rather than Sun's AWT.

It went on from there until Microsoft got tired of playing with Sun and gave them $2 billion in exchange for a strategic alliance, which is now bearing fruit.

I bet something like this would be hard to fight in court. I mean, would they have to hand select jurors that knew what the guys were talking about?

server_crash 64 Postaholic

Hmmm...Maybe something good will come out of this.

server_crash 64 Postaholic

The advice of people there is better than the advice you'll get from the 'computer guy'

Hehe..Who's the computer guy?

server_crash 64 Postaholic

I heard that was a scam.

server_crash 64 Postaholic

Do you want it?

I'll take it. ;)

Have you not contacted Dell tech support? I had a screen going bad, and I gave them an email and two hours later they gave a reply saying they were sending a rep to my house to replace the thing. Thatis exactly what they did.

server_crash 64 Postaholic

I thought this happened once already, and it failed? Or what that the liscence agreement for J++?

server_crash 64 Postaholic

This is from M$, and it tells how to resolve the issue.

http://support.microsoft.com/default.aspx?scid=kb;en-us;821690

server_crash 64 Postaholic

Alex, here's a picture of what was going on. It's more prominent than it looks, but you can tell what's going on:


Well, I had a picture but it's not letting me post it.

server_crash 64 Postaholic

I believe most software engineers are offered great stock options and other benifits...Is that correct guys?

server_crash 64 Postaholic

I can can use a BufferedReader to open a Streamat the command line, like this:

BufferedReader br = new BufferedReader(new InpuStreamReader(URL.openStream()));

Once I try to use this same statement inside of my applet, I get an AccessControlException. I know it's something to do with security, but how do you get around that?

server_crash 64 Postaholic

I have played around with, A little while ago, an app (a profiler) that checks how optermised your java code is (tells you a range of information on each object, Like memory, and cpu time etc..) something like this would be great for figuring out exactly what is taking alot of time to process..

I might even be worth making some code to calculate the time difference so you can find the time it takes to read the string and the time it takes to process that string etc..

Perhaps try the java interpreters profiler

java -prof ClassName

The best approch for strings is prolly using the same one over and over again, the garbage collection process and the object creation both take time

Too see howmuch your using garbage collection use

java  -verbose:gc ClassName

A nice list of free java profilers

Ok, I tried the verbose and I got 5 GC's in 30 searches. I don't think that's too good. At the points where it happens I do notice a slight pause. Some some performance is lost there.


How do I get the results from the java -prof command? It said it was dumpinig the data, but I don't know where to.

server_crash 64 Postaholic

Paul thanks for the help. I can tell you spent a lot of time, and I appreciate that. The post I made about the webcrawler is irrelevant. I've already got it up and running, but I'm having this speed problem. I'm going to try the garbage collection statement you recommended. I'll post back with details.

Anyway, you were saying something about the way I'm calling the threads. I didn't think of that, but it's a great possibility. See, I was calling it each time for each URL, so I was actually calling that thread 2000 times to get 2000 results.

Here's what I was thinking:

I could have one thread that parses through and gets all of the URls from the starting URL. This thread would only be called once.

After that, I can create a thread for each of those URLs, and that be that. I think I would be using no more than 20-30 threads.

Note: I can post the working version of the webcrawler if you like, but I working on a newer one.

server_crash 64 Postaholic

JJ, all governments are corrupt and always have been. Power corrupts, doesn't matter who has it.

I think it was John Locke that said all humans are born "basicly" selfish. The US constitution was designed to implement several barriers against selfishness, but of course they only work to some extent.

A good example of corruption is how these lobbying groups have so much power..It's redicilous.

server_crash 64 Postaholic

I doubt politicians would make laws against it. After all they would be among the first to get the treatment, giving them more time to stay in power...

They might make a law requiring special permission to be treated, causing more bureaucracy and corruption.

hehe..That makes a lot of sense.

server_crash 64 Postaholic

Actually, this was about network data. I've made a webcrawler and finally got it to work, but it's extremely slow.

See, I read the HTML code one line at a time, and this one String is set equal to the read line. So, If I have hundreds of lines of code, and thousands of URLs, then I know part of my speed problem is with the Strings.

server_crash 64 Postaholic

Well, even if they could do it, I'm sure laws would quickly form to abolish it. I think it would turn out like the human cloning: Illegal.

But again, I can say for a fact that it's not possible.

server_crash 64 Postaholic

That's a neat idea, Cross. RLG, that's probably something you should consider.

server_crash 64 Postaholic

Yeah, I didn't think it was possible. I'ts not hard to think of all the bad possibilities that would arise from such an action.

server_crash 64 Postaholic

What about using Strings like I've been doing. Assigning it a new value each time, and I guess it creates a new Object. Will Java's automatic garbage collection not take care of the unused objects?

server_crash 64 Postaholic

Ok, I'm working with some Strings, and these Strings will get remade up to an infinite number of times, and I know that a new object is created each time.
So, which is worse..

Keep using the String, and have the value continously change, or

Use a StringBuffer, and continously delete the current text so that the upcoming read text can be the only thing in the StringBuffer.

I hope that makes sense!

server_crash 64 Postaholic

I guess I shouldn't say it's not impossible. I know for a fact they could increase the human life span, but how can they test their results? I mean, there really is no way to tell if they really can preserve a human life for eternity, because there is no stopping point for their results.

server_crash 64 Postaholic

If your teacher does not care about the complexity, you could always make a console application(one that runs at the command line).

server_crash 64 Postaholic

Hmmm. I can easily help you with something in java, that's the language your after right?

Something simple: A mortgage calculator

It's an easy project but it does require some knowlege of programming.


If you want something simple, think of a project that would have mabye one or more edit fields, and then does some kind of calculation based on that.

Of course that is pretty simple, but if you want something more complex than that, we could always find something else.

server_crash 64 Postaholic

Ok, I got passed that problem, and now it seems to be looping just fine.

I do have one more thing though, how can I parse through that HTML faster, or make the whole crawler faster? It took a while to find 700 URLs, when google can find millions in seconds.

server_crash 64 Postaholic

Thanks for the reply. I've updated the code a little bit. I've got it to were it will loop, but it hangs after the 60th URL. I know there are a few things I still have to do, but I really want to get this looping going. I do have a full blown GUI, but I'll include a Console app that tests this thing so you can see what it's doing.


CustomWebCrawler.java

/*
 Import all the needed packages.  IO is needed to open streams.
 net is needed for the URL object.  The util class is needed for
 ArrayList.
 */
import java.io.*;
import java.net.*;
import java.util.*;

/**
 *  Create a class called CustomWebCrawler that implements Runnable.
 *  Runnable is needed for threadiing
 **/
public class CustomWebCrawler implements Runnable
{
    /*
     Create an arraylist to hold the actuall searches.
     */
    ArrayList alMatchingSearches = new ArrayList();
    Thread running;
    URL enteredURL;
    int count = 0;
    int count2 = 0;
    /*
     Constructor
     */
    public CustomWebCrawler()
    {
        
    }
    
    public void start()
    {
        if (running == null)
        {
            running = new Thread();
        }
    }
    
    public void stop()
    {
        if (running != null)
        {
            running = null;
        }
    }
    
    public void run()
    {
        if (enteredURL == null)
        {
            running = null;
        }
	/*
	 If we make it this far, then then the thread is running.
	 So lets call the load method.
	 */
            load();  
    }
    
    /**
     *  This method takes three parameters.  The text, which is whats being 
     *  currently read from the URL.  The …
server_crash 64 Postaholic

Not possible. I don't care what any scientist says.

server_crash 64 Postaholic

Ok, I see. So what career field are you wanting it based upon? If you narrow it down, I'm sure we could come up with something good.

By the way, is there a level of complexity involved? How far are you willing to go?

server_crash 64 Postaholic

I still don't have a picture, but I contacted Dell and got an email pretty quick. They said they were sending me a new LCD screen...No questions asked. That's what you call top notch tech support.

server_crash 64 Postaholic

What do you mean a physical project?

server_crash 64 Postaholic

I've been working on this webcrawler and I've ran into a problem. I can read the first URL and get all the URLs out of the HTML code, but I can't seem to set up a looping structure that will work.

This is basically what it does:

Searches through html of first URL.
It may find, say 20 other URLs contained in that one.
stops.


How can I make it to were it would continously search through the ones that were found?

Here is the code I have so far, but it's not complete:

import java.io.*;
import java.net.*;
import java.util.*;

public class CustomWebCrawler implements Runnable
{
    ArrayList alCurrentSearches = new ArrayList();
    ArrayList alAlreadySearched = new ArrayList();
    ArrayList alMatchingSearches = new ArrayList();
    Thread running;
    URL enteredURL;
    int count = 0;
    
    public CustomWebCrawler()
    {
	    
    }
    
    public void start()
    {

        if (running == null)
        {
            running = new Thread();
        }
    }
    
    public void stop()
    {

        if (running != null)
        {
            running = null;

        }
    }
    
    public void run()
    {
        if (enteredURL == null || enteredURL.getProtocol().compareTo("http") != 0)
        {
            running = null;
        }
	alCurrentSearches.add(enteredURL);
	
          BufferedReader br = null;
        try
        {
           br = new BufferedReader(new InputStreamReader(enteredURL.openStream()));
           String inputText = "";
           while ((inputText = br.readLine()) != null)
          {
                int first = inputText.lastIndexOf("<a href=");
                int end = inputText.indexOf("\">",first);
                if (first != -1 && end != -1)
                {
                    findURL(inputText,first,end);
                }
                else
                {
                }
                
            }
          }

        catch(Exception e)
        {
            e.printStackTrace();
        }
    }
    
    public void findURL(String text, int numFirst, int numEnd) …
server_crash 64 Postaholic

I've seen some really good ones on ebay, but the price is so low that there must be something wrong with them.

server_crash 64 Postaholic

I'm really poor. I have about 140 bucks I can spend on it. That's why I was wondering about ebay, but I do want one of the dells.

server_crash 64 Postaholic

I think the screen is going bad. My mom just got a new digital camera, and as soon as I can, I'll get a picture of it.

server_crash 64 Postaholic

I don't know if this will help or not. I've never used or had the desire to learn PHP, but since I haven't I can't say that it's worse or better than Java. Now, I do know a lot of Java(not compared to wenting though!). In Java, you can create desktop and web applications, which I'm not sure you can do the same with PHP. I've written some pretty powerful web applications and some powerful desktop apps. Java is cross platform so you can use it on any OS.

Another thing, Java is OO and most colleges and universities are switching from C++ to teach Java. If your young, Java would be a good one to learn if your interested in learning important concepts and intend on a programming job.

server_crash 64 Postaholic

You can always start out with the basics, and then have a section in the forum for site feedback and requests for forum additions.

server_crash 64 Postaholic


server_crash,

There are many more reasons to learn something than to pretend it doesn't exist simply because you do not like it. I think you must be very young so I will not pay much attention to your views. I know 7 year olds who would have attempted to give me a much more comprehensive answer than you did.

You say I'm young just because you've looked at my profile.

Anyways, I never said I hated it. If you read some of the earlier posts you'll see that I do like it, and I think it's a great OS. I don't think it's better than Windows though. I forgive you though, I doubt you could have comprehended a response so obvious.

You just implied that I pretend it doesn't exist because I don't like it. I DO run linux on my computer, and actually I dual boot with linux. But I guess you didn't read that either, did you?

server_crash 64 Postaholic

I never said you did. Maybe your the one turning it into something it's not.

server_crash 64 Postaholic

Maybe one of you Linux loving M$ basher can tell me this:

If linux is so great and so much better than microsoft, then how come each newer version becomes more and more like Windows?

server_crash 64 Postaholic

I use windows xpee pee. I hate it! I don't know what a lot of the stuff is for and the things I do know about seem to not respond more often than they should. When I had windows 2000 or ME my computer worked much better. I am not a geek and would really like to hear the pros and cons of changing to Linux. How hard is it to learn? How costly is the software for things like PSP,
photoshop and other art programs? Will yahoo messenger work on it? Where can a non geek go to read stuff that I can really understand?

The bottom line is, if your not interested in learning it for educational purposes, why bother? If you don't like Windows XP and don't like a lot of their stuff, then you'll like it after using linux.

server_crash 64 Postaholic

Linux box.. up 370 days

Windows box.. up 45 days

*shrug* The proof is in the pudding, so to speak

If you can't keep a windows machine up for more than 45 days, then whoever is the adminsitor needs to be fired. I could have kept that up longer when I was 7.

server_crash 64 Postaholic

Your very welcome. I do have one question for you!

What form do you enter the numbers in?

I tried this form, but it didn't work:

a+bi

server_crash 64 Postaholic

Well, that's good. At least they have some way of using a computer.

server_crash 64 Postaholic

Want security, stability, and the ability to participate in the open source community (as well as reap the open source program benefits) -> Linux

You'll think security and stability when people start targeting linux.

server_crash 64 Postaholic

Linux makes a good server. As for desktop, I don't really like it. Some people really prefer Linux over windows for good reason, others just use it because it's a way to bash M$.


I dual boot Windows Xp and Madrake 9, but I rarely use Mandrake.

server_crash 64 Postaholic

Is OCP the Oracle cert?

I kind of like this site:
http://smartcertifydirect.com/

I've never used it, but if I had to do an online cert course, it would probably be that.

server_crash 64 Postaholic

Thanks server_crash,


I have searched by keywords "open source gateway Java", but I can not find any useful information (most of them are not general purpose gateway, but specific purpose gateway, like WAP gateway and payment gateway).

I am looking for a gateway software (like sygate) which acts like a router, which can do NAT and which can make several computers share the same external IP address. Could you help?


regards,
George

Sorry man, I can't find anything and I really don't know anything about that. Maybe the link paradox posted will help you.
sorry.