If you cannot make the effort to write a proper question then do not be surprised if you do not get a proper answer. And if you are looking for a complete solution to your homework you are likely to be disappointed.
One of these days I'm going to think of a really clever signature.
dear all iam new in java and using jdk1.6 and netbeans ide with sql server 2005 i want to update content of JtextField using submit button in sql server 2005 and how to make connection in java and sql server 2005 please suggest
I have a log file from a Web server with 120,000 lines.
Example of input file:
10.160.0.10;16.11.2011 12:56;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0"
10.160.0.100;14.11.2011 7:22;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0"
10.160.0.100;14.11.2011 10:45;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0"
10.160.0.100;14.11.2011 10:53;/;-;"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"
I need to compare the IP address in the first line with IP in the second line
and at the same time
to compare the last box that contains the version of the web browser with version in the second line.
And second line with third line etc.
If first IP is same as second IP and together first version is same as second version
then add to the end of line info example #1 (that will be mean that it is first user)
If IP or version are different then add to the end of line #2 (second user).
It identifies users based on IP address and User-Agent field (based on different versions of a web browser).
Example of ouput file:
10.160.0.10;16.11.2011 12:56;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0";#1
10.160.0.100;14.11.2011 7:22;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0";#2
10.160.0.100;14.11.2011 10:45;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0";#2
10.160.0.100;14.11.2011 10:53;/;-;"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)";#3
Do you have any idea how to do this?
Which method to use?
Thank you for help.
Simplest: make a *.csv from the log file. A *.csv file is a Excel compatible file. You can use notepad++ to change the "/" into ";" to format the data.
As a coding:
Split each String on the slash "/" and use only first and last part - insert a semicolon (";") in between.
Write to file and name it "funnyname.csv". You can import that file into MS Excel / OO Calc for inspection - or extend your snippet to make the comparison for you (if there is a certain thingy you're looking for).
This is really more of an Eclipse question than a programming question.
I am a newbe Eclipse user and am working with a Java web application that I am debugging. Having annoying problem where browser debug window always defaults to webapp directory but I want it to go to webapp\specificPage.
What I have been doing is pulling the drop down and selecting from the history the page I want. The page I am selecting does not change.
After doing this for a while it gets old. Would like to be able to force the in-eclipse-browser debug window to a specific page every time.
Kind of a dumb question, I'm sure there is a magic setting for this but at this point I have not found it.
What line is throwing the exception? I am guessing that either the driver or the database file is not available.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DDEthel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
Based on your other reply you presumably already know all of the following so this is only in case someone else needs to understand it.
MS Access if a file system based database. That means that the database file must be accessible on the client machine for it to work.
That makes it very ill suited for anything related to internet/network work - such as using in in an applet. Additionally it might be less that well suited for multi-user use which also eliminates browser solutions (which are typically only useful for multi-user situations.)
As for the access problem - that couldn't be clearer - it is a access problem. Such problems can arise in any number of ways and the solution is always the same. And googling will find the same solutions which is normally one of the following.
1. Modify the access rights on the client machine to allow it. It is NOT possible to do this in the browser via java.
2. Sign the jar that has the applet in it.