And keep in mind that it is possible that one cannot get that information for some databases either because the database doesn't support it or because it is not published. That of course suggests that the best way and certainly the easiest is to just require that the user must provide that information.
Please develop a simple console base application, which reads some persons records from a “.txt” file and displays each person’s information in form of table. The program should also count and display the number of alphabets, spaces, integers, words, characters and lines from the file in tabular form.
please make this application file (.java) and driver file (.java) separately.
(All three files will be in one folder for execution through driver file)
text file is containing the follwing text.
David, 51, IT, 40006, Bachelor
Tomb, 85, Computer, 40502, Master
Stephen, 97, Maths, 40652, Phd
it is infact
name, rollNo, grade, phoneNo, program
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.
When I suggested that you put some more detail into your question I meant more than just changing the word "Netbeans" to "jsp and java class". This question gives no idea what you are trying to do, where these values come, from or where you are trying to display them.
One of these days I'm going to think of a really clever signature.
I looking to develop a cloud storage service, and I need help on how to approach this, I already have setup apache tomcat and cxf acting as servers. I need to develop a service similar to amazon s3, where client's files are backed up on the servers.
The files are also need to be in sync with the servers and there is a clusters of servers and each need to have their own files in sync. I need to develop the server side web service and then a client to access these services, I'm quite new to web services, and need some tips on where to start and start developing these in java.
I done some research into using Restful web services and developing and I'm using tomcat to create cluster of servers, I was wondering how can I include a database on each server which are also in sync with the other servers, I have research into amazon s3 and they use NoSQL, I need to get somthing like this to work on each server containing user login, and other information such as files(files they uploaded) metadata. this is part of my uni work
I suspect because you are not only new to web services but also everything associated with server processing.
I suggest that you FIRST do research about what technologies and architectures are involved in and used with business servers. Do not attempt make any decisions about technologies until you have a better understanding of the different stategies for implementing things.
Then SECOND you make a decision about architecture and decision based on the needs of the business. Naturally if you do not understand the needs of the business then you will need to learn that first.
A law firm handles cases of two categories I.e. either minor or major. Each and every case is assigned a lawyer. The case is either open or closed. Before a case is closed, the lawyer can either win it or lose. For each case, the client should pay an amount that should be set by the law firm. The amount paid for a minor case costs the client ¾ of the amount for major cases. If a case is lost, the firm reduces the client’s pay by 10% the price for a major case. The firm is trying to evaluate the lawyers’ performance through the following criteria.
1. For every major case assigned, the lawyer gets 3 points
2. For every minor case assigned, the lawyer gets 5 points
3. For every case lost, the lawyer loses 4 points
4. For every case won. The lawyer gains 4 points
Write a java program that will enable the firm to enter the amount of money clients are supposed to pay for the major cases. The system should enable the firm to register lawyers, register new cases, register clients, close the cases that are either won or lost, and assign lawyers to cases. The program should display the following on request
1. Show how many cases were lost and how many were won
2. The best and worst performing lawyer
3. Display the amount of money received from all the closed cases
4. For a given lawyer, how much money will was generated from all his closed cases
5. How much money the firm has lost through losing cases
1. Learn the basics of programming.
2. Learn the basics of create a program to solve business requirements.
3. Write code based on the posted requirements.
4. Test the code and repeat 3 until the code works.