peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

As JavaEE5 documentation states in HttpServlet class description
doGet()

Called by the server (via the service method) to allow a servlet to handle a GET request.
Overriding this method to support a GET request also automatically supports an HTTP HEAD request. A HEAD request is a GET request that returns no body in the response, only the request header fields.

When overriding this method, read the request data, write the response headers, get the response's writer or output stream object, and finally, write the response data. It's best to include content type and encoding. When using a PrintWriter object to return the response, set the content type before accessing the PrintWriter object.

The servlet container must write the headers before committing the response, because in HTTP the headers must be sent before the response body.

Where possible, set the Content-Length header (with the ServletResponse.setContentLength(int) method), to allow the servlet container to use a persistent connection to return its response to the client, improving performance. The content length is automatically set if the entire response fits inside the response buffer.

When using HTTP 1.1 chunked encoding (which means that the response has a Transfer-Encoding header), do not set the Content-Length header.

The GET method should be safe, that is, without any side effects for which users are held responsible. For example, most form queries have no side effects. If a client request is intended to change stored data, the request should use some other HTTP method.

The GET …

mani2 commented: thanks.. +0
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@axman1000 here is your code in regards of ASAP request

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@rakesh74888 not 24/7 coding service

@digital-ether no offence but you should know better then suggest creating new thread (Keep It Organized - Do not post the same question multiple times). Either use "Mark Bad Post" so mod take care of moving it, or do it your self since you are a mod

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There are many ways some better some worst for checking date validity and you will learn them later.
James already showed two possibilities (second is much better, considering that you are taking month from 1 to 12, where array starts from 0 to size -1. Just keep that in mind)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That doesn't matter printLCS must have some return type and this added up with the return from other method. As I said in first post, without proper code snippets nobody can be wiser...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@mundvawala you are almost year behind with your reply

@happygeek shame on you that you did not check dates ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What is happening there first both methods are executed and then results are either added if numeric value (5+3 = 8), or index(x, i) is appended to printLCS(i-1, j-1) (south + west = southwest)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If the "relative path" is relative to system and not to your web application then your assumption is right. Are these images part of your application structure, or you pulling them form different location on your system?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You failed to specify what JSP or better said what functionality you want that may require use of JSP...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You need to "re-do" your sort classes. Remove main class from all of them, provide a public method which is able to receive a collection of numbers (array, list, vector) and return sorted collection. Then in your client application after taking user choice call for example

int[] unsorted = {3, 5, 1, 2, 6};
int[] sorted = BuubleSort.sort(unsorted);
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

With that limited info provided by you, nobody can be wise...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@apc00008, that is because you just copied and pasted code without checking actual code. Otherwise you would have spotted there is package alok.examples; You have two options:
A)Observe package requirement and create relevant folder structure
B)Remove package from start of program

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Not sure if there is anything like merge/join 2 projects. If we look at it in simple terms all what you have to do is to create new project, then copy code (whole folder structure) for these two applications inside this project.

  • com
    • COMPANY_NAME
      • JOIN_MIDLET_CLASS
      • PROJECT_1
      • PROJECT_2

Create new MIDlet class that calls simple menu with options for these apps. On menu selection call either app. Does it make sense what I'm saying?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

at Taywin : Your comments are unwelcome as they are breaking the community policy for Daniweb.

There is no breaking of forum rules here. If you do not want to listen to his advice then ignore it, same goes for Taywin, if advice is ignored it is up to you if you want to continue.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Thread closed as it is double of http://www.daniweb.com/forums/post1490972.html please follow discussion there.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Do not try to create complex views. Observe what sort of functionality you get on everyday phone. It is always one menu pre screen

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Make sure you close any stream you open, JME is very sensitive in this.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You should know better then just post error message without any code....

From what you provided we can only observe
java.rmi.MarshalException

"A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call. A MarshalException is also thrown if the receiver does not support the protocol version of the sender.

If a MarshalException occurs during a remote method call, the call may or may not have reached the server. If the call did reach the server, parameters may have been deserialized. A call may not be retransmitted after a MarshalException and reliably preserve "at most once" call semantics. "

org.xml.sax.SAXParseException

"This exception may include information for locating the error in the original XML document, as if it came from a Locator object. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required to throw the exception; instead, it can simply read the information in it and take a different action."

So I would say SAXParseException is thrown while working with XML. Check out your server side processing

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You cannot, because you need WTK compiler

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1) OP in his Dragon Fire "support" post said

You simply write your C++ code and test it with the built in iPhone emulator and send the code of to Zimusoft, who made DragonFire SDK. The code is then fiddled with, until it can be compiled on a Mac machine which uses the full iPhone SDK.

So for me it is plain that it would be better to have Mac machine then let someone fiddle with my code especially if I want to make profit out of this application at the end of day.

2) Plenty of books to choose from, but since you are experienced Java developer there is no point, in my opinion, to go for something like Head First iPhone Development: A Learner's Guide to Creating Objective-C Applications for the iPhone. I would go for Beginning iPhone 4 Development: Exploring the iOS SDK, speed approach with iPhone Cool Projects: Ten Great Development Projects for Your iPhone.
Please note that I didn't any iPhone/iPad development so take my advice at your own risk :twisted:.

javaAddict commented: Thank you for your time +7
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you actually tried and search this forum you would have definitely came across this post

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Organizing content in tables shows you how to add data in table and then positioning with Adding content at absolute positions

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

iText has PageSize class, nice sample can be found here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Jaspersoft has its own tutorials where you can start plus JasperForge

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@mKorbel I think you been looking for this link

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Acklox I moved your post out of the sticky since what was asked

Please don't post "spam" or "Thank you" posts in this thread since this is meant to be used as a guide for all beginners and I am sure we would like it to be on topic. I hope you understand this.

as you trying to open discussion.

The thing is there is already plenty of material out there books, videos, blogs, websites. It is only up-to students to reach out and get it. To create another tutorial will mean to reinvent the wheel (since there are tutorials out there), plus to write good tutorial it takes time. The time is your own one and you choose what to do with it. If there is somebody who wants to do it, then do it by all the means if you want to. If the product will be quality material we are happy to promote it

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you give me a absolute starting point to canvas. I did some j2me programing but not canvas.(i Don't know whether that sounds ridiculous). Searching in the internet doesn't help at all!

Sorry I do not know any good online resource, as all of them take only small portion of what is Canvas in MIDlet. The best collection I seen so far is from Kicking Butt with MIDP and MSA: Creating Great Mobile Applications by Jonathan Knudsen where in section 4 he has following chapters (link to safari book copy)

  • Chapter 9. Creating Custom Screens
    • Section 9.1. Getting Information about the Display
    • Section 9.2. How Painting Works
    • Section 9.3. Making Colors
    • Section 9.4. Drawing Lines and Shapes
    • Section 9.5. Drawing Text
    • Section 9.6. Measuring Text
    • Section 9.7. Creating Images
    • Section 9.8. Drawing Images
    • Section 9.9. Keeping Resources Small
    • Section 9.10. Drawing on Images
    • Section 9.11. Getting Your Fingers on the Bits
    • Section 9.12. Clipping
    • Section 9.13. Event Handling
    • Section 9.14. Controlling Command Placement
    • Section 9.15. Summary
  • Chapter 10. Custom Items
    • Section 10.1. Custom Item Sizing
    • Section 10.2. Painting
    • Section 10.3. A Pretty Wait Indicator
    • Section 10.4. Handling Events in Custom Items
    • Section 10.5. Internal Traversal
    • Section 10.6. An Interactive Example
    • Section 10.7. Summary
  • Chapter 11. Using the Game API
    • Section 11.1. Tight Looping with GameCanvas
    • Section 11.2. Building Scenes with Layers
    • Section 11.3. Tiled Layers
    • Section 11.4. Sprites
    • Section 11.5. Detecting Collisions
    • Section 11.6. Assembling a Game Scene
    • Section 11.7. A Blocky Example
    • Section 11.8. …
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There been talks about mobile manufacturers providing JavaFX enabled devices, but I'm not sure if it actually happen. Reason is simple, Android took over after success of iPhone and people slow down sales on "simple" phones

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@Glenner
1. Please use code tags
2. Do NOT multi post!

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You can get it from sourceforge website - jTDS - SQL Server and Sybase JDBC driver

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Did you actually had a look at links that I provided in your other thread?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

OK, I snipped name from this http://www.daniweb.com/forums/showthread.php?p=1468528#post1468528 was it anywhere else?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You said

put code for insert flash object in out.print("like html code")

there is no need for because flash can be put in <objec></object> directly inside HTML. Beside creating view pages through out.print is out of date approach that been recommended not to use for good 5years if not more

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Use default: numWordString =""; Also you are missing break points after cases break; If not sure what I mean by that have look on Oracle Switch Statement tutorial

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@jonsca yes you correct that we do not like people just drop in their assignments and expect our members to provide solution. One of the announcements says We only give homework help to those who show effort however that doesn't mean we will punish people if they provide full solutions.

@caut_baia we do appreciate that yo do take your time to help people, but really is it worth to give whole solution without original poster sweating little more with it, working on given clues/advice. How much would they learn without trying by simple copy and paste of solution? Maybe perhaps in the future you can provide just snipped to get assignment moving forward then whole solution.

I hope this is solved in satisfactory for each side.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
import java.util.*;

public class Sentence
{
	 static Scanner keyboard = new Scanner(System.in);
	 
	 public static void main(String[] args)
	 {
	    
	  String she;
	 	System.out.print("Enter you words:");	 	 	
	 	she = keyboard.nextLine();
	 	System.out.println(she);

		/** Make calls to bellow stated methods and act on the results. Do not forget to use trim method to remove any tailing empty spaces
		*/
	 }

	 public static boolean endsWithQuestionMark(String sentemce){
			//return true or false if ends with "?"
	 }

	 public static boolean endsWithExplanationMark(String sentence){
			//return true or false if ends with "!"
	 }
}
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

First thing first. Ask user for input, read input and store it in the string. After that you will use it to pass as parameter for different operations you will call on it.
So replace line 12 with string equivalent of your integer currently used.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

If you already learned about Array you can substitute that long switch statement with String[] numbers = {"zero", "one", "two"}; and then just call System.out.println(numbers[YOUR_INPUTED_NUMBER]);

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Your application running on Tomcat can not find JDOM library. Is the library present either in Tomcat/lib directory or Tomcat/webapps/YOUR_PROJECT/SOME_LIB_FOLDER?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can anyone explain me to do this please i'm not asking for the code i just want to understand this problem,,, thanks

Why don't you tell as in maybe some bullet points what you think you are asked to do? To understand project needs/requirement is one of the many things on long list of abilities of a programmer.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Guess Java Communications is what you looking for

phycoCoder commented: Magical all encompassing knowledge of javas APIs Hes my hero ; ) +0
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Do pointers used in java?

If you read previous post you would have seen this answer

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Thread closed. Please follow discussion here.

@Lemonader please do not multi post same question in different forum sections i the future.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

As far I'm aware Apple did not open development for other platforms then Mac. Few people try to use dev tools on crack OS X running Intel machines, but did not succeed. You do have to have Mac machine to run these dev tools

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

just put code for insert flash object in out.print("like html code").....it works

You should pick up either some better book or search for better tutorial in regards of Java Web development. There is no need for out.println , this is part of HTML and better handled by it

@ruchi18 you can still do that, but you will have to do it with Flash own Action Script that is more or less JavaScript. If it is so then this should be asked in our Graphics and Multimedia Forum as it is not directly related to Java web development

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Here is easy to read book Processing XML with Java, have look on JDOM which is very easy to use (after that you will have no problem to find some better/more suitable library)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

We only give homework help to those who show effort till you provide some code for discussion it is unlike that somebody will do it for you...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@JamesCherrill any link for it?

@mKorbel to complex for student purpose

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@mKorbel you are a programmer that is different. If you are student with no previous experience in the field then I would recommend to take it from command prompt. In the short time since I started openly participating in programming forums I seen one to many idiots coming asking questions what is wrong with their IDEs when the error in 99% was their bad code