HT1414 1654 is what the problem with my iphone 4s

I wanted to restore my iphone 4s from itune when i get back from warranty.
but it could not been done.
so that i restore (format) but since yesterday i put in my sim card until now.
also cannot be run with normal.
kept the loading screen.
What Should i do now.
and i dont wanna send to warranty again.
this is the second time i sent to warranty
always wait me a(1) month
waste my time. give a a better answer for solve my problem
it is terribly trouble me right now.

sounds like a hardware issue with the lcd backlight doubt any software solution is an option

Similar Messages

  • Why is Apple so bad at providing customers with information on what the problem with email is and what they are doing to fix it?

    Why is apple not providing information on what the problem withe email is and what they are doing to fix, along with a time frame for fixing the problem.

    It was because the problem was major.  If you do not know tech, you should know that a two day outage usually indicates some type of virus, hack, or a bad software load that they had to unravel.  The common way to solve that is to rebuild servers and put back into service.  That takes time.
    Apple did not want to admit this problem.  My guess at this stange was that they loaded new software that might be associated with the new IOS and it crashed.  To reveal this would be to cast into doubt their future revenue.
    Either way.  Run do not walk away from Icloud products and services.  Apple has demonstrated they can not be a business partner.

  • TS1398 I have 2 ipads 1st  ipad 2G and ipad 3G whats the problem with the 3G ipad the wifi is now getting connected to the wifi modem and the ipad 2G is getting connected no problem with the 2G ipad what should i do...?????  And i had checked with my rout

    I have 2 ipads 1st  ipad 2G and ipad 3G whats the problem with the 3G ipad the wifi is now getting connected to the wifi modem and the ipad 2G is getting connected no problem with the 2G ipad what should i do...?????  And I had checked with my iball baton router with the iball sevice provider.

    Hi there Paula120,
    You may find the troubleshooting steps in the article below helpful.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    -Griff W. 

  • HT4623 can someone assist me with a solution to the problem with my iphone 5. I upgraded to IOS 6.1.4 and since then i have had the problem of No Sim. I restored to the factory settings using i tunes as i have my back up on my pc but still the same proble

    can someone assist me with a solution to the problem with my iphone 5. I upgraded to IOS 6.1.4 and since then i have had the problem of No Sim. I restored to the factory settings using i tunes as i have my back up on my pc but still the same problem. I have swapped sim and my Sim is working on other iphone with ios 6.1.3

    Try a new SIM from your carrier.  If that doesn't work, make a Genius Bar appointment and get your phone evaluated.

  • Hello apple I have the problem with my iPhone and my friends have this problem too. My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it bu

    Hello apple
    I have the problem with my iPhone and my friends have this problem too.
    My iPhone have the problem about calling and answer the call. When I use my iPhone to call I can't hear anything from my iPhone but the person that I call can answer it but when answer both of us can't hear anything and when I put my iPhone to my face the screen is still on and when I quit the phone application and open it again it will automatic call my recent call. And when my friends call me my iPhone didn't show anything even the missed call I'm only know that I missed the call from messages from carrier. Please check these problem I restored my iPhone for 4 time now in this week. I lived in Hatyai, Songkhla,Thailand and many people in my city have this problem.
    Who have this problem??

    Apple isnt here. this is a user based forum for technical questions. The solution is to restart, reset, and restore as new which is in the manual after that get it replaced for hard ware failure. if your within your one year warranty its replaced if it is out of the warranty then it is 199$

  • HT4623 cant restore phone, whats the problem with it ?

    My iphone 4s recently updated softwaer to 6.1.3 and since done that had problems with it. I couldnt del apps etc of screen. It also tried restore again when connect to comp and never finalises and get error coes (3014) and (-1). tried restore few times and unsuccessful with it. the provider was no help at all and the carrie said get it sorted with the provider who wont entertainit ???

    Error 1 or -1 indicates a serious hardware failure.
    Error 3014
    This error occurs when iTunes is unable to reach gs.apple.com in a timely fashion. Follow the steps below in Unable to contact the iOS software update server gs.apple.com.

  • What' the problem with my jvm?

    Someone could tell me what can't i run my jar file
    to send an email?i can run it on netbeans perfectly .
    my main classe is this:
    package send_email;
    import java.util.Scanner;
    import javax.swing.JOptionPane;
    public class Teste {
        public Teste() {       
        public static void main(String[] arg){
            try{
                EnviaEmail exe = new EnviaEmail();
                String smtpHost = "smtp.mail.yahoo.com.br";
                String smtpPort = "587";
                String smtpUser = "pronemark";
                String smtpPass = "buceta";
                String dest;       
                String para[] = new String[1];       
                Scanner sc = new Scanner(System.in);
                String end = JOptionPane.showInputDialog("De:");           
                para[0] = JOptionPane.showInputDialog("Para:");           
                String assunto = JOptionPane.showInputDialog("Assunto:");                        
                String conteudo = JOptionPane.showInputDialog("Conte�do:");                                    
                exe.send(smtpHost,smtpPort, smtpUser, smtpPass, end, para, assunto, conteudo, null);
            }catch(Exception e){
                System.out.println(e.getMessage());
    }Thanks!!!

    You click on it and it runs, what's wrong with that?
    If you meant "does not run", then you probably want to run it from a
    command window. See the README.txt file that comes with JavaMail
    for instructions on how to set up your CLASSPATH and such to make
    it run properly.

  • Whats the problem with this page

    hi,
    i have problem with this page
    page
    it loading the video but not showing any content related to
    the video.
    i use
    [code]
    var netCon:NetConnection = new NetConnection();
    netCon.connect(null);
    var netStr:NetStream = new NetStream(netCon);
    netStr.addEventListener(AsyncErrorEvent.ASYNC_ERROR,
    getError);
    var video:Video = new Video();
    video.attachNetStream(netStr);
    addChild(video);
    video.x=201;
    video.y=125;
    function getError(e:AsyncErrorEvent) {
    play_btn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo);
    function playVideo(e:MouseEvent) {
    netStr.resume();
    removeEventListener(KeyboardEvent.KEY_DOWN, keyPressHandler
    this.addEventListener(Event.ENTER_FRAME, fileLoaded);
    var loaderBar:Sprite = new Sprite();
    addChild(loaderBar);
    function fileLoaded(e:Event) {
    var percent:Number = (netStr.bytesLoaded * 100 ) /
    netStr.bytesTotal;
    loaderBar.graphics.clear();
    loaderBar.graphics.beginFill(0xDE2C18);
    loaderBar.graphics.drawRect(205,378,percent * 4.32,5);
    loaderBar.graphics.endFill();
    if (percent==100) {
    this.removeEventListener(Event.ENTER_FRAME, fileLoaded);
    [/code]

    here is the full code
    and i have an error saying:
    ArgumentError: Error #2004: One of the parameters is
    invalid.
    at flash.display::Graphics/drawRect()
    at VIDEOPLAYER_fla::MainTimeline/fileLoaded()
    [code]
    import flash.display.Sprite;
    import flash.net.NetConnection;
    import flash.display.SimpleButton;
    import flash.net.NetStream;
    import flash.events.NetStatusEvent;
    import flash.media.Video;
    import flash.events.MouseEvent;
    import flash.events.KeyboardEvent;
    import flash.events.Event;
    import flash.display.Graphics;
    import flash.text.*;
    var netCon:NetConnection = new NetConnection();
    netCon.connect(null);
    var netStr:NetStream = new NetStream(netCon);
    netStr.addEventListener(AsyncErrorEvent.ASYNC_ERROR,
    getError);
    var URL:String =
    "/hakans/videos/BEDUK_AUTOMATIK00.flv?start=";
    var offset:uint = 1048576;
    var tamURL:String = URL + offset;
    trace(tamURL);
    var video:Video = new Video();
    video.attachNetStream(netStr);
    video.x=201;
    video.y=125;
    netCon = new NetConnection();
    netCon.addEventListener(NetStatusEvent.NET_STATUS,
    netStatusHandler);
    netCon.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
    securityErrorHandler);
    function netStatusHandler(event:NetStatusEvent):void {
    switch (event.info.code) {
    case "NetConnection.Connect.Success":
    connectStream();
    break;
    case "NetStream.Play.StreamNotFound":
    trace("Unable to locate video: " + tamURL);
    break;
    function connectStream():void {
    netStr.addEventListener(NetStatusEvent.NET_STATUS,
    netStatusHandler);
    netStr.addEventListener(AsyncErrorEvent.ASYNC_ERROR,
    asyncErrorHandler);
    netStr.play(tamURL);
    addChild(video);
    function securityErrorHandler(event:SecurityErrorEvent):void
    trace("securityErrorHandler: " + event);
    function asyncErrorHandler(event:AsyncErrorEvent):void {
    // ignore AsyncErrorEvent events.
    function getError(e:AsyncErrorEvent) {
    var myTextBox:TextField = new TextField();
    var myText:String = "Bytes loaded";
    function TextWithImage()
    addChild(myTextBox);
    myTextBox.text = myText+netStr.bytesLoaded;
    /*--------------< Videoyu Durdurma, Oynatma ve Başa
    Alma >------------------*/
    stage.addEventListener( KeyboardEvent.KEY_DOWN,
    keyPressHandler );
    function keyPressHandler( e:KeyboardEvent ):void {
    // if the spaceBar is pressed then toggle video play/pause
    if( e.charCode == 32 ) {
    netStr.togglePause();
    play_btn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo);
    function playVideo(e:MouseEvent) {
    netStr.resume();
    removeEventListener(KeyboardEvent.KEY_DOWN, keyPressHandler
    pause_btn.addEventListener(MouseEvent.MOUSE_DOWN,
    pauseVideo);
    function pauseVideo(e:MouseEvent) {
    netStr.pause();
    stop_btn.addEventListener(MouseEvent.MOUSE_DOWN, stopVideo);
    function stopVideo(e:MouseEvent) {
    netStr.pause();
    netStr.seek(0);
    fastforward_btn.addEventListener(MouseEvent.MOUSE_DOWN,doForward);
    function doForward(e:MouseEvent):void {
    var f:int = 1; //you can schange the skipping time here
    netStr.pause();
    netStr.seek(netStr.time + f);
    netStr.resume();
    rewind_btn.addEventListener(MouseEvent.MOUSE_DOWN,doRewind);
    function doRewind(e:MouseEvent):void{
    var x:int = 2;
    netStr.pause();
    netStr.seek(netStr.time - x);
    netStr.resume();
    fullscreen_btn.addEventListener(MouseEvent.MOUSE_DOWN,doFull);
    function doFull(e:MouseEvent):void{
    stage.displayState = StageDisplayState.FULL_SCREEN;
    /*--------------< Videoyu Durdurma, Oynatma ve Başa
    Alma / >------------------*/
    /*--------------< Video İçin Yükleme Bilgi
    Çubuğu >------------------*/
    var loaderBg:Sprite = new Sprite();
    loaderBg.graphics.beginFill(0xc78f8e);
    loaderBg.graphics.drawRect(205 , 378 , 430 , 5);
    loaderBg.graphics.endFill();
    addChild(loaderBg);
    this.addEventListener(Event.ENTER_FRAME, fileLoaded);
    var loaderBar:Sprite = new Sprite();
    addChild(loaderBar);
    function fileLoaded(e:Event) {
    var percent:Number = (netStr.bytesLoaded * 100 ) /
    netStr.bytesTotal;
    loaderBar.graphics.clear();
    loaderBar.graphics.beginFill(0xDE2C18);
    loaderBar.graphics.drawRect(205 , 378 , percent * 4.32 , 5);
    loaderBar.graphics.endFill();
    if (percent==100) {
    this.removeEventListener(Event.ENTER_FRAME, fileLoaded);
    /*--------------< Video İçin Yükleme Bilgi
    Çubuğu / >------------------*/
    /*--------------< Video Meta Bilgileri
    >------------------*/
    var metaObject:Object = new Object();
    netStr.client = metaObject;
    metaObject.onMetaData = getMetaInformation;
    var lengthOfVideo:Number = 0;
    function getMetaInformation(e:Object):void {
    lengthOfVideo = e.duration;
    trace("Genişlik :" + e.width);
    trace("Yükseklik :" + e.height);
    /*--------------< Video Meta Bilgileri /
    >------------------*/
    /*--------------< Videonun Durum Çubuğu
    >------------------*/
    //may cause problem part
    var GraphicsExample :Sprite = new Sprite();
    var size:uint = 10;
    var bgColor:uint = 0x999999;
    var borderColor:uint = 0x999999;
    var borderSize:uint = 0;
    var cornerRadius:uint = 9;
    var gutter:uint = 5;
    var dragBar:Sprite = new Sprite();
    var halfSize:uint = Math.round(size / 2);
    dragBar.graphics.beginFill(bgColor);
    dragBar.graphics.lineStyle(borderSize, borderColor);
    dragBar.graphics.drawCircle(halfSize, halfSize, halfSize);
    dragBar.graphics.endFill();
    dragBar.x=201;
    dragBar.y=376;
    addChild(dragBar);
    var drag:Boolean = false;
    this.addEventListener(Event.ENTER_FRAME, setDragBar);
    function setDragBar(e:Event) {
    if (!drag) {
    dragBar.x = ((netStr.time / lengthOfVideo) * 429) + 201;
    /*--------------< Videonun Durum Çubuğu /
    >------------------*/
    /*--------------< Videonun Kaydırma Çubuğu
    >------------------*/
    dragBar.addEventListener(MouseEvent.MOUSE_DOWN,
    startDragging);
    dragBar.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    dragBar.buttonMode = true;
    var rect:Rectangle = new Rectangle(205,378,429,0);
    function startDragging(e:MouseEvent) {
    drag = true;
    netStr.pause();
    dragBar.startDrag(false,rect);
    function stopDragging(e:MouseEvent) {
    dragBar.stopDrag();
    drag = false;
    netStr.resume();
    this.addEventListener(Event.ENTER_FRAME, reSetVideo);
    function reSetVideo(e:Event) {
    if (drag) {
    netStr.seek(Math.floor(((dragBar.x-201) / 429) *
    lengthOfVideo ));
    /*--------------< Videonun Kaydırma Çubuğu
    / >------------------*/
    netStr.addEventListener(NetStatusEvent.NET_STATUS,
    netStatusHandler1);
    function netStatusHandler1(e:NetStatusEvent):void
    switch (e.info.code)
    case "NetStream.Seek.InvalidTime":
    trace("You have seeked too far ahead, the video hasn't fully
    loaded yet");
    break;
    case "NetStream.Play.StreamNotFound":
    trace("Unable to locate video");
    break;
    /*--------------< Video Ses Kontrolü
    >------------------*/
    sound_btn.addEventListener(MouseEvent.MOUSE_DOWN, setSound);
    var checkSound:Boolean = true;
    var soundTrans:SoundTransform = new SoundTransform();
    function setSound(e:MouseEvent) {
    if (checkSound) {
    soundTrans.volume = 0;
    checkSound = false;
    } else {
    soundTrans.volume = 1;
    checkSound =true;
    netStr.soundTransform = soundTrans;
    /*--------------< Video Ses Kontrolü /
    >------------------*/
    [/code]

  • How do I Help Apple Care Stop Warring with Each Other and Fix the Problem with My iPhone that They Acknowledge Creating?

    How Do I Help Apple US & Apple Europe Stop Warring With Each Other And Fix The Problem They Created?
    PROBLEM
    Apple will not replace, as promised, the iPhone 5 (A1429 GSM model) that they gave me in London, UK, with an iPhone 5 (A1429 CDMA model).
    BACKGROUND
    My iPhone 5 (A1429 CDMA model) was purchased this year in September on an existing Verizon Wireless (VZW) line using an upgrade. The purchase took place in California and the product was picked up using Apple Personal Pickup through the Cerritos Apple Retail Store. I will refer to this phone at my "original" phone.
    The original phone was taken into the Apple Store Regent Street in London, England, UK on November 15, 2012. The reason for this visit was that my original phone's camera would not focus.
    The Apple Store Regent Street verified there was a hardware problem but was unable to replace the part.
    The Apple Store Regent Street had me call the US AppleCare. At first they denied support, but then a supervisor, name can be provided upon request, approved the replacement of my original phone with an iPhone 5 (A1429 GSM model) as a temporary solution until I got back in the US. And approved that the GSM model would be replaced with a CDMA model when I came back to the US. I will refer to the GSM model as the "replacement". They gave me the case number --------.
    The Apple Store Regent Street gave me the replacement and took the original. The first replacement did not work for reasons I do not understand. They switched out the replacement several times until they got one that worked on the T-Mobile nano SIM card that I had purchased in England, UK. Please refer to the repair IDs below to track the progression of phones given to me at the Apple Store Regent Street:
    Repair ID ----------- (Nov 15)
    Repair ID ----------- (Nov 16)
    Repair ID ----------- (Nov 16)
    The following case number was either created in the UK or France between November 15 to November 24. Case number -----------
    On November 19, 2012, I went to France and purchased an Orange nano SIM card. The phone would not activate like the first two repair IDs above.
    On November 24, 2012, I went to the Apple Store Les Quatre Temps. The Genius told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault. They had me call the AppleCare UK.
    My issue was escalated to a tier 2 UK AppleCare agent. His contact information can be provided upon request. He gave me the case number -----------.
    The UK tier 2 agent became upset when he heard that I was calling from France and that the France Apple Store or France AppleCare were not helping me. He told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault.
    The UK tier 2 agent said he was working with engineers to resolve my problem and would call me back the next day on November 25, 2012.
    While at the Apple Store Les Quatre Temps, a Genius switched the phone given to from repair ID ----------- with a new one that worked with the French nano SIM card.
    Also, while at the Apple Store Les Quatre Temps, I initiated a call with AppleCare US to get assistance because it seems that AppleCare UK was more upset that France was not addressing the issue rather than helping me. I have email correspondance with the AppleCare US representative.
    A Genius at the Apple Store Les Quatre Temps switched the replacement with a new GSM model that worked on the French SIM card but would not work if restored, received a software update, or had the SIM card changed. This is the same temporary solution I received from the Apple Store Regent Street in the UK.
    By this point, I had spent between 12-14 hours in Apple Store or on the phone with an AppleCare representative.
    Upon arriving in the US, I went to my local Apple Store Brea Mall to have the replacement switched with a CDMA model. They could not support me. He told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault. My instructions were to call AppleCare US again.
    My call with AppleCare US was escalated to a Senior Advisor, name can be provided upon request, and they gave me the case number -----------. After being on the phone with him for over an hour, his instructions were to call the Apple Store Regent Street and tell them to review my latest notes. They were to process a refund for a full retail priced iPhone 5 64BG black onto my credit card so that I could use that money to buy a new iPhone 5 64GB black at the Apple Store Brea Mall to reoslve the problem.
    The Apple Store Regent Street did not process my refund. He, name can be provided upon request, told me that the AppleCare US did not do a good job reviewing my case, that they were incapable of getting to the bottom of it like they were, and instructed me to call AppleCare US and tell them to review this case number and this repair id. I asked if he read the notes from the AppleCare US Senior Advisor and he would not confirm nor deny. When I offered to give him the case number he accepted but it seemed like would do no good. Our call was disconnected. When I tried calling back the stores automated system was turned on and I could not get back through.
    Now I have the full retail price of an iPhone 5 64GB black CDMA on my credit card and Apple will not process the refund as they said they would.
    I've, at this point, spent between 14-16 hours at Apple Stores or on the phone with AppleCare representatives, and still do not have the problem resolved.
    SOLUTION
    AppleCare US and AppleCare Europe need to resolve their internal family issues without further impacting their customers.
    Apple is to process a refund to my credit card for the cost of a full retail priced iPhone 5 64GB black.
    DESIRED OUTCOMES
    I have an iPhone 5 (A1429 CDMA model) that works in the US on VZW as it did before I received the replacement phone in the UK.
    Apple covers the cost of the solution because I did not create the problem.
    Apple resolves their internal issue without costing me more time, energy, or money.
    This becomes a case study for AppleCare so that future customers are not impacted like I have been by their support system.
    Does anyone have recommendations for me?
    Thank you!
    <Edited by Host>

    Thanks, but I've been on the phone with AppleCare US (where I am and live) and AppleCare UK. They continue bouncing me back and forth without helping resolve the problem.
    Perhaps someones knows how to further escalate the issue at Apple?

  • Has anyone had the problem with their iPhone 5 where some people cannot receive texts from you?  And if so, is there a fix?

    Has anyone had the problem of not being able to send texts to certain people? 

    Here is another screenshot.  In this example, I did 'Get Info' on one of the goofy ones, and it shows that this Wolfmother song is sorted by the Eagles.  ***? 

  • Whats the problem with nvidia?

    1.tried the new 91.31 nvidia drivers.ok, unistalled old one 84.xx, rebooted and instlalled new one. rebooted and what do i see: titan quest shuts down before even starting to play.cant access the nvidia control panel either, it gives errors- those 91.xx seem crap. rolled back: every thing works fine again
    2.tried to install the 7 series driver from nvidia site: it says no driver has been found for my video card. i know my video is a low end, the 7300 gs, but its still a 7 series. what is this crap. are nvidia making it on purpose? im starting to get tired of nvidia gpus, and ill maybe give ati a try, since ive never had a ati gpu
    Now im running the 91.33 which i downloaded from driversheaven.net and im still testing it. tried the 91.37 beta it doesnt want to install.
    my computer if perfectly stable and those nvidia drivers are driving me crazy, from experience i know to use the latest drivers, but nvidia are complicating my life with their untested or unfinished or whatever reason for crap drivers.

    You have to keep a few things in mind.
    First, the reality is, they make drivers to support the latest cards and technology on the market. Granted they are way beyond the 7X.XX series drivers and into the 90's, so the reasons why they are up that high I do not know. I think there are a lot more things involved since SLI was introduced.
    The point I'm trying to make here is, new drivers are for the latest tech, and sometimes support for older tech is adversely affected. Sometimes the release is for reasons that do not pertain to you and your setup.
    Do you read release notes? Perhaps you should start, since you seem the type that like to update drivers for whatever reason.
    Don't fall into the trap of installing drivers evertime they spit new ones out because someone tells you to have the latest drivers. It's just not the reality.
    the reality is if it's working fine, then leave the thing alone. Do your homework before testing new drivers and avoid the kneejerk reaction of updating for the sake of updating.
    Now, everytime I see someone claiming their sytem is stable, it's actually quite the opposite. Don't get me wrong, I'm not calling you a liar. You may be an exception. But my experience is telling me (from what you've reported) there may be problems you are not aware of. Not being able to install drivers is a result of improperly chosen drivers or unsupported hardware. There may be ommisions in the ini file pertaining to your card, it could be a ton of things. Your hardware table may be getting corrupt from all the different drivers and such. There could be problems in your registry..

  • Whats the Problem with this Company?

    Most Company's want to keep there Customers happy it seems I am disappointed in everything except the reception is good. I bought a Smart phone and if you go over your limit it cost to use it.. Man my bill is higher than the Twin Towers used to be... And still I have to pay if I go over a specific amount for sharing photo's what is this? yu say its unlimited everything then they change that and say something else it sounds to me like Greed has gone to Verizon's account with all of us.. I am ashamed this is happening to all of us.. I know people who can do anything without being charged with other company's why is it this one doesn't care about our Wallets and be so happy that they have customers that actually pay there bill each month and give us a break... Shame.. Verizon.. I do love you but don't like your plans.. They are not ethical. To us.. or For us.. You need to change your plans and stop changing everything each month to something else when Your told you have unlimited everything then that is what it should be.. Now you have gone to far...

    http://m.digitaltrends.com/opinion/opinion-its-a-trap-beware-carriers-new-unlimited-talk-and-text-plans/   This site is one of many that explains how the cash cows of "talk & texting" has declined.  And it mentions family usage as you are doing.  Personally I don't talk much on the phone, I don't text much or for that matter use a load of data. So I am basically overpaying for everything. But I like knowing I have it available if I need it.  I love taking photos of the places my wife and I travel to. I upload to Facebook every step of the trip, so our friends and family have the pictures. I use a photo upload to Walgreens to print them out in hard copy for our photo albums, I also burn them to cd/dvd so I just don't use talking that much. Those texts can add up however. I use around 600 to my friends. But only from me and not my wife.  The emergency phone also very rarely sends texts or makes calls so no big deal there. But my wife uses her phone for calls, and that Netflix, You Tube and TW Cable TV so she loves data. But ours is unlimited not tiered or metered. She is happy that is all that matters.

  • Can any one tell me whats the problem with controller

    package com.uk.nhs.training.controller;
    import java.beans.PropertyEditorSupport;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.swing.text.html.HTMLDocument;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.springframework.util.StringUtils;
    import org.springframework.validation.BindException;
    import org.springframework.validation.Errors;
    import org.springframework.validation.ValidationUtils;
    import org.springframework.web.bind.ServletRequestDataBinder;
    import org.springframework.web.servlet.ModelAndView;
    import org.springframework.web.servlet.mvc.AbstractWizardFormController;
    import org.springframework.web.servlet.view.RedirectView;
    import com.uk.nhs.training.contractUtility.ContractHtmlReader;
    import com.uk.nhs.training.data.Booking;
    import com.uk.nhs.training.data.BookingDetails;
    import com.uk.nhs.training.data.Client;
    import com.uk.nhs.training.data.Course;
    import com.uk.nhs.training.data.Trainer;
    import com.uk.nhs.training.data.Venue;
    import com.uk.nhs.training.service.BookingService;
    import com.uk.nhs.training.service.ClientService;
    import com.uk.nhs.training.service.CourseService;
    import com.uk.nhs.training.service.TrainersService;
    import com.uk.nhs.training.service.VenueService;
    public class BookingController extends AbstractWizardFormController {
         protected final Log logger = LogFactory.getLog(getClass());
         private BookingService bookingFacade;
         private CourseService courseFacade;
         private VenueService venueFacade;
         private ClientService clientFacade;
         private TrainersService trainersFacade;
         public static final String STAFF = "Staff";
         public static final String CLIENT_BASED = "Client-Based";
         private SimpleDateFormat dateFormat = new SimpleDateFormat("dd MMMMMMMM yyyy");
         public BookingController() {
              setPages(new String[] { "booking", "book1", "book2", "book3", "book4",
                        "book5", "book6", "book7" });
              setCommandName("booking");
              setAllowDirtyForward(true);
         protected Object formBackingObject(HttpServletRequest request)
                   throws Exception {
              Booking booking = new Booking();
              return booking;
         protected ModelAndView processFinish(HttpServletRequest request,
                   HttpServletResponse response, Object command, BindException errors) {
              try {
                   Booking booking = (Booking) command;
                   setBookingFinalDetails(booking);
                   logger.info("Boooking Form data sent successfully");
              } catch (Exception e) {
                   e.getClass();
                   e.printStackTrace();
              return new ModelAndView("bookSuccess");
         @Override
         protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
              dateFormat.setLenient(false);
              binder.registerCustomEditor(java.sql.Date.class, null, new SqlDateEditor(true));
         private void setBookingFinalDetails(Booking booking) throws Exception {
              booking.setCreateDate(new java.sql.Date(System.currentTimeMillis()));
              booking.setStatus("In Progress");
              bookingFacade.saveBooking(booking);
         protected ModelAndView handleInvalidSubmit(HttpServletRequest request,
                   HttpServletResponse response) throws Exception {
              return new ModelAndView("bookInvalidSubmit");
         @Override
         protected ModelAndView processCancel(HttpServletRequest request,
                   HttpServletResponse response, Object command, BindException errors)
                   throws Exception {
              return new ModelAndView(new RedirectView("welcome.htm"));
         @Override
         protected void onBindAndValidate(HttpServletRequest request,
                   Object command, BindException errors, int page) throws Exception {
              Booking booking = (Booking) command;
              System.out.println(" PAGE : " + page);
              try {
                   switch (page) {
                   case 0:
                        if (request.getParameter("_target1") != null) {
                             ValidationUtils.rejectIfEmptyOrWhitespace(errors,
                                       "bookingType", "required.bookingType",
                                       "Booking type is required");
                             String bookingType = request.getParameter("bookingType");
                             booking.setBookingType(bookingType);
                             setInitialBookingDetails(booking, errors);
                        break;
                   case 1:
                        if (request.getParameter("_target2") != null) {
                             if (booking.getBookingType().equals(STAFF)) {
                                  booking.setClient(null);
                             if (booking.getBookingType().equals(CLIENT_BASED)) {
                                  validateClient(booking, errors);
                                  if (errors.getErrorCount() == 0) {
                                       Client c = (Client) clientFacade
                                                 .loadClientById(booking.getClient()
                                                           .getClientId());
                                       booking.setClient(c);
                             int theBookingDetailsLength = Integer.parseInt(request
                                       .getParameter("qtyBox"));
                             String courseId = request.getParameter("bookingDetails");
                             if (courseId != null && courseId.trim().length() > 0) {
                                  List<BookingDetails> bookDetails = new ArrayList<BookingDetails>();
                                  for (int i = 0; i < theBookingDetailsLength; i++) {
                                       BookingDetails bk = new BookingDetails();
                                       bk.getCourse().setCourseId(courseId);
                                       Course c = (Course) courseFacade
                                                 .getCourseById(courseId);
                                       bk.setCourse(c);
                                       // Add empty trainer..
                                       bk.setTrainer(new Trainer());
                                       bookDetails.add(bk);
                                       booking.setBookingDetails(bookDetails);
                             } else {
                                  validateCourse(booking, errors);
                        break;
                   case 2:
                        if (request.getParameter("_target1") != null) {
                             setInitialBookingDetails(booking, errors);
                        if (request.getParameter("_target3") != null) {
                             int i=0;
                             for (BookingDetails bd : booking.getBookingDetails()) {
                                  if (bd != null && bd.getTrainer() != null) {
                                       String trainerId = bd.getTrainer().getTrainerId();
                                       Trainer trainer = trainersFacade
                                                 .loadTrainersById(trainerId);
                                       if (trainer != null ) {
                                            bd.setTrainer(trainer);
                                            // add empty venue;
                                            bd.setVenue(new Venue());
                                       } else {
                                            validateTrainer(booking, errors);
                                  i++;
                        break;
                   case 3:
                        if (request.getParameter("_target4") != null) {
                             for (BookingDetails bd : booking.getBookingDetails()) {
                                  if (bd != null && bd.getVenue() != null) {
                                       ValidationUtils.rejectIfEmptyOrWhitespace(errors,
                                                 "bookingDetails[0].venue.venueId",
                                                 "required.venue.venueId",
                                                 "Venue Details required.");
                                       String venueId = bd.getVenue().getVenueId();
                                       List<Venue> vList = venueFacade
                                                 .loadVenuesByKeyword(venueId);
                                       if (vList != null && vList.size() > 0) {
                                            bd.setVenue(vList.get(0));
                                  } else {
                                       errors.rejectValue(
                                                 "bookingDetails[0].venue.venueName",
                                                 "required.venue.venueName",
                                                 "Valid Venue Details required.");
                        break;
                   case 4:
                        break;
                   case 5:
                        if (request.getParameter("_target7") != null) {
                             setBookingFinalDetails(booking);
                             ContractHtmlReader reader = new ContractHtmlReader(booking);
                             HTMLDocument doc = reader.getHTMLDoc();
                             reader.writeHTMLCode(doc);
                        break;
                   default:
              } catch (Exception e) {
                   System.err.println("Exception :" + e.getMessage());
              super.onBindAndValidate(request, command, errors, page);
         * Create an empty Booking details for client and course...
         * @param booking
         private void setInitialBookingDetails(Booking booking, BindException errors) {
              if (booking.getBookingType().equals("Client-Based")) {
                   if (booking.getClient() == null
                             || booking.getClient().getClientId() == null) {
                        booking.setClient(new Client());
              } else if (booking.getBookingType().equals("Staff")) {
                   booking.setClient(null);
              if (booking.getBookingDetails() == null) {
                   List<BookingDetails> bkDetailsList = new ArrayList<BookingDetails>();
                   BookingDetails bkDetails = new BookingDetails();
                   bkDetails.setCourse(new Course());
                   bkDetailsList.add(bkDetails);
                   booking.setBookingDetails(bkDetailsList);
              } else {
                   List bkDetList = booking.getBookingDetails();
                   if (bkDetList.size() < 1
                             || (bkDetList.size() > 0 && !((bkDetList.get(0)) instanceof BookingDetails))) {
                        BookingDetails bkDetails = new BookingDetails();
                        bkDetails.setCourse(new Course());
                        bkDetList.add(0, bkDetails);
                        booking.setBookingDetails(bkDetList);
                   } else if (((BookingDetails) bkDetList.get(0)).getCourse() == null
                             || ((BookingDetails) bkDetList.get(0)).getCourse()
                                       .getCourseId() == null) {
                        ((BookingDetails) bkDetList.get(0)).setCourse(new Course());
         @Override
         protected void validatePage(Object command, Errors errors, int page,
                   boolean finish) {
              Booking booking = (Booking) command;
              if (finish) {
                   for (BookingDetails bd : booking.getBookingDetails()) {
                        if (bd != null && bd.getRate() != null) {
                             try {
                                  float rate = bd.getRate();
                             } catch (NumberFormatException e) {
                                  errors.reject("invalid.bookingDetails.rate",
                                            "(try \"250.00\")!");
                             } catch (Exception e) {
                                  errors.rejectValue("bookingDetails.rate",
                                            "error.bookingDetails.rate",
                                            "Enter valid Rate.");
                   booking
                             .setCreateDate(new java.sql.Date(System.currentTimeMillis()));
              super.validatePage(command, errors, page);
         * Validate client
         * @param booking
         * @param err
         private void validateClient(final Booking booking, Errors err) {
              ValidationUtils.rejectIfEmptyOrWhitespace(err, "client.clientId",
                        "required.client.clientId", "Valid client details required.");
         * Validate Course
         * @param booking
         * @param err
         private void validateCourse(final Booking booking, Errors err) {
              if (booking.getBookingDetails() == null
                        || booking.getBookingDetails().size() < 1) {
                   err.rejectValue("bookingDetails", "error.bookingDetails",
                             "Course Booking Details required.");
              } else {
                   List bdList = booking.getBookingDetails();
                   for (int i = 0; i < bdList.size(); i++) {
                        if (!(bdList.get(i) instanceof BookingDetails)) {
                             err.rejectValue("bookingDetails", "error.bookingDetails",
                                       "Valid Course Booking Details required.");
                        } else {
                             BookingDetails bd = (BookingDetails) (bdList.get(i));
                             if (bd.getCourse() == null
                                       || bd.getCourse().getCourseId() == null)
                                  err.rejectValue("bookingDetails",
                                            "error.bookingDetails.course.courseId",
                                            "Valid Course Details required.");
         * Validate Trainer
         * @param booking
         * @param e
         private void validateTrainer(final Booking booking, Errors e) {
              ValidationUtils.rejectIfEmptyOrWhitespace(e,
                        "bookingDetails[0].startDate",
                        "required.bookingDetails[0].startDate",
                        "Valid Booking Details startDate required.");
              ValidationUtils.rejectIfEmptyOrWhitespace(e,
                        "bookingDetails[0].trainer.trainerId",
                        "required.bookingDetails[0].trainer.trainerId",
                        "Valid Booking Details Trainer required.");
              if (e.getErrorCount() < 1)
                   for (BookingDetails bd : booking.getBookingDetails()) {
                        if (bd.getStartDate() == null) {
                             e.rejectValue("startDate", "required.bbb0",
                                       "Valid Booking details Start Date is required");
                        try {
                             if (bd.getStartDate() != null && bd.getEndDate() != null
                                       && (bd.getEndDate().before(bd.getStartDate())))
                                  e.rejectValue("endDate", "required.bbb0",
                                            "End Date Should be after starting date.");
                        } catch (Exception ex) {
                             e.rejectValue("bookingDetails[0].startDate",
                                       "before.bookingDetails[0].startDate",
                                       "Improper dates, please provide valid dates.");
                        if (bd.getTrainer() != null) {
                             e.rejectValue("trianerId", "required.trianerId",
                                       "Valid Trainer details required.");
         public BookingService getBookingFacade() {
              return bookingFacade;
         public void setBookingFacade(BookingService bookingFacade) {
              this.bookingFacade = bookingFacade;
         public CourseService getCourseFacade() {
              return courseFacade;
         public void setCourseFacade(CourseService courseFacade) {
              this.courseFacade = courseFacade;
         public VenueService getVenueFacade() {
              return venueFacade;
         public void setVenueFacade(VenueService venueFacade) {
              this.venueFacade = venueFacade;
         public ClientService getClientFacade() {
              return clientFacade;
         public void setClientFacade(ClientService clientFacade) {
              this.clientFacade = clientFacade;
         public TrainersService getTrainersFacade() {
              return trainersFacade;
         public void setTrainersFacade(TrainersService trainersFacade) {
              this.trainersFacade = trainersFacade;
         class SqlDateEditor extends PropertyEditorSupport
              private boolean isRequired = false;
              SqlDateEditor(boolean isRequired) {
                   this.isRequired = isRequired;
              public void setAsText(String text) throws IllegalArgumentException {
                   java.util.Date d = null;
                   if (!this.isRequired && !StringUtils.hasText(text)) {
                        setValue(null);
                   else
                        try {
                             d = dateFormat.parse(text);
                             setValue(new java.sql.Date(d.getTime()));
                        } catch (ParseException ex) {
                             throw new IllegalArgumentException("Could not parse date: " + ex.getMessage());
              public String getAsText() {
                   Date value = (java.sql.Date)getValue();
                   if (value != null) {
                        java.util.Date d = new java.util.Date(value.getTime());
                        return dateFormat.format(d);
                   else {
                        return "";
    }

    <!-- Content -->
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
    <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
    <%@ page isELIgnored="false"%>
    <SCRIPT language="JavaScript" type="text/javascript">
         function checkClientKeycode(kCode){
              if (kCode==27){
                   hideSelectClient();
              else if (kCode==13){
                   setClient();
         function changeClientFocus(){
              if (document.getElementById("clientSelect").style.visibility=="visible"){
                   document.getElementById("clientSelect").style.height=100;
                   document.getElementById("clientSelect").focus();
         function hideSelectClient(){ 
              var clSelect = document.getElementById("clientSelect");
              clSelect.options.length=0;
         clSelect.style.visibility="hidden";
         clSelect.style.height=10;
    function setClient(){
              var clSelect = document.getElementById("clientSelect");
         document.getElementById("clientId").value=clSelect.value;
         document.getElementById("clientname").value=clSelect.options[clSelect.selectedIndex].text;
              clSelect.options.length=0;
         clSelect.style.visibility="hidden";
         clSelect.style.height=10;
    function checkCourseKeycode(kCode){
              if (kCode==27){
                   hideSelectCourse();
              else if (kCode==13){
                   setCourse();
         function changeCourseFocus(){
              if (document.getElementById("courseSelect").style.visibility=="visible"){     
                   document.getElementById("courseSelect").style.height=100;
                   document.getElementById("courseSelect").focus();
         function hideSelectCourse(){ 
              var coSelect=document.getElementById("courseSelect")
              coSelect.options.length=0;
         coSelect.style.visibility="hidden";
         coSelect.style.height=10;
    function setCourse(){
         var coSelect=document.getElementById("courseSelect")
         document.getElementById("bookingDetails").value=coSelect.value;
         document.getElementById("coursename").value=coSelect.options[coSelect.selectedIndex].text;
         coSelect.options.length=0;
         coSelect.style.visibility="hidden";
              coSelect.style.height=10;
         function addClient()
              window.open("<%=request.getContextPath()%>/secure/clientpopup.htm","clientwindow","location=0,status=1,scrollbars=1,resizable=1 left=200 width=700,height=600");
         function addCourse()
              window.open("<%=request.getContextPath()%>/secure/coursepopup.htm","coursewindow","location=0,status=1,scrollbars=1,resizable=1 left=200 width=450,height=400");
         function addTrainer()
              window.open("<%=request.getContextPath()%>/secure/trainerpopup.htm","trainerwindow","location=0,status=1,scrollbars=1,resizable=1 left=400 width=600,height=400");
         //------------------------------------------Course AJAX List Start-----------------------------------------------------//
         function getCourses()
              flag="wait";
         var theKeyword=document.getElementById("coursename").value;
         url="ajaxList.htm?actionType=courses&keyword="+theKeyword;
         what = "setCourses(req.responseXML)";
         //row_id=rowid;
         doCallback(null);
         function setCourses(theXmlResponse)
              //start filling the Venues Select boxes now
              if(theXmlResponse != null)
                   var coursesBox=document.getElementById("courseSelect");
                   coursesBox.options.length=0;
                   var coursesElementsLength=theXmlResponse.getElementsByTagName('course').length;
                   var y;
                   if (coursesElementsLength<20) {
                        y=coursesElementsLength;
                   else {
                        y=20;
                   coursesBox.size=y;
                   if (y==1) {
                        coursesBox.size=2;
                   var coursesElementsArray=theXmlResponse.getElementsByTagName('course');
                   for(x = 0; x < y; x++) {
                        coursesBox.options[coursesBox.options.length] = new Option(coursesElementsArray[x].firstChild.text, coursesElementsArray[x].lastChild.text);
                   if (y>0) {
                        coursesBox.style.visibility="visible";
                        coursesBox.style.height=100;
              flag="release";
    //------------------------------------------ Course AJAX List End-----------------------------------------------------//
    //------------------------------------------ Client AJAX List Start-----------------------------------------------------//
         function getClients()
              flag="wait";
              var theKeyword=document.getElementById("clientname").value;
         url="ajaxList.htm?actionType=clients&keyword="+theKeyword;
         what = "setClients(req.responseXML)";
         //row_id=rowid;
         doCallback(null);
         function setClients(theXmlResponse)
              if(theXmlResponse != null) {
                   var clientsBox=document.getElementById("clientSelect");
                   clientsBox.options.length=0;
                   var clientsElementsLength=theXmlResponse.getElementsByTagName('client').length;
                   var y;
                   if (clientsElementsLength<20) {
                        y=clientsElementsLength;
                   else {
                        y=20;
                   clientsBox.size=y;
                   if (y==1) {
                        clientsBox.size=2;
                   var clientsElementsArray=theXmlResponse.getElementsByTagName('client');
                   for(x = 0; x < y; x++) {
                        clientsBox.options[clientsBox.options.length] = new Option();
                   if (y>0) {
                        clientsBox.style.visibility="visible";
                        clientsBox.style.height=100;                    
              flag="release";
    //------------------------------------------Client AJAX List End-----------------------------------------------------//
    </script>
    <div id="content"><!-- Top story -->
    <div id="topstory" class="box">
    <div id="topstory-img"></div>
    <!-- /topstory-img -->
    <div id="topstory-desc">
    <div id="topstory-title"><strong>BOOK COURSE (CONT.)</strong></div>
    <!-- /topstory-title -->
    <div id="topstory-desc-in"></div>
    <!-- /topstory-desc-in --></div>
    <!-- /topstory-desc --></div>
    <!-- /topstory -->
    <div id="bodycontent"><c:choose>
         <c:when test='${booking.bookingType eq "Staff"}'>
              <table align="left" width="50%" border=0>
                   <tr>
                        <td colspan="4" align="center"><strong>Choose Course</strong>
                        <form name="BookType1"
                             action="<c:url value="/secure/bookCourse.htm"/>" method="post">
                        </td>
                   </tr>
                   </c:when>
                   <c:when test='${booking.bookingType eq "Client-Based"}'>
                        <table align="left" width="50%" border=0>
                             <tr>
                                  <td colspan="4" align="center"><strong>Choose Client and Course</strong>
                                  </p>
                                  </td>
                             </tr>
                             <form name="BookType1"
                                  action="<c:url value="/secure/bookCourse.htm"/>" method="post">
                             <tr>
                                  <td colspan="4" align="left">Please pick client from the list:</td>
                             </tr>
                             <tr>
                                  <td colspan="4" align="left">
                                  <c:if test='${empty booking.client || empty booking.client.clientId}'>
                                  <spring:bind path="booking.client.clientId">
                                       <input name="<c:out value='${status.expression}'/>" type="hidden" id="clientId" value=""/>
                                  </spring:bind>
                                  <input size="20" type="text" id="clientname" value=""
                                  onkeyup="javascript:getClients();changeClientFocus();"
                                  ondblclick="javascript:getClients();changeClientFocus();" />
                                  </c:if>
                                  <c:if test='${not empty booking.client.clientId}'>
                                  <spring:bind path="booking.client.clientId">
                                       <input name="<c:out value='${status.expression}'/>" type="hidden" id="clientId" value="<c:out value='${status.value}'/>"/>
                                  </spring:bind>
                                  <input size="20" type="text" id="clientname" name="clientname"
                                  value="<c:out value='${booking.client.orgName}'/> - <c:out value='${booking.client.type}'/>"
                                  onkeyup="javascript:getClients();changeClientFocus();"
                                  ondblclick="javascript:getClients();changeClientFocus();" />
                                  </c:if>
                                  <div><select id="clientSelect"
                                       style="width:266px;visibility:hidden"
                                       onclick="javascript:setClient();"
                                       onkeyup="javascript:checkClientKeycode(event.keyCode);">
                                  </select></div>
                                  </td>
                             </tr>
                             </c:when>
                             <c:otherwise>
                                  <table align="left" width="50%" border=0>
                                       <tr>
                                            <td colspan="4" align="center"><strong>Choose Course</strong>
                                            <form name="BookType1"
                                                 action="<c:url value="/secure/bookCourse.htm"/>" method="post">
                                            </td>
                                       </tr>
                                       </c:otherwise>
                                       </c:choose>
                                       <tr>
                                            <td colspan="4" align="left">Pick Course from list:</td>
                                       </tr>
                                       <tr>
                                            <td colspan="4" align="left">
                                            <input type="hidden" name="clientAndCourse" value="yes" />
                                            <input name="bookingDetails" type="hidden"
                                                 <c:if test="${(not empty booking.bookingDetails[0])}"> value="<c:out
                                                 value="${booking.bookingDetails[0].course.courseId}"/>"</c:if> />
                                            <spring:bind path="booking.bookingDetails[0].course.courseId">
                                            <input size="20" type="text" id="coursename" name="coursename"
                                            <c:if test="${(not empty booking.bookingDetails[0])}"> value="<c:out
                                                 value="${booking.bookingDetails[0].course.courseTitle}"/>"</c:if>
                                                 onkeyup="javascript:getCourses();changeCourseFocus();"
                                                 ondblclick="javascript:getCourses();changeCourseFocus();" />
                                            </spring:bind>
                                            <div><select id="courseSelect"
                                                 style="width:266px;visibility:hidden"
                                                 onclick="javascript:setCourse();"
                                                 onkeyup="javascript:checkCourseKeycode(event.keyCode);"></select></div>
                                            </td>
                                       </tr>
                                       <tr>
                                            <td colspan="4" align="left">Quantity:   <select
                                                 name="qtyBox" size="1">
                                                 <c:forEach var="x" begin="1" end="10">
                                                      <option value='<c:out value="${x}"/>'><c:out value="${x}" /></option>
                                                 </c:forEach>
                                            </select></td>
                                       </tr>
                                       <tr>
                                            <td colspan="4" align="left"></td>
                                       </tr>
                                       <tr>
                                            <td>
                                            <p><!-- input type="submit" name="_finish" value="Save"/ -->  
                                            <input type="submit" name="_target0" value="Previous" />  
                                            <input type="submit" name="_target2" value="Next" />  
                                            <input type="submit" name="_cancel" value="Cancel" />
                                            </td>
                                            <td><input type="button" value="Add Client"
                                                 onclick="javascript:addClient();" /></td>
                                            <td><input type="button" value="Add Course"
                                                 onclick="javascript:addCourse();" /></td>
                                            <td><input type="button" value="Add Trainer"
                                                 onclick="javascript:addTrainer();" /></td>
                                       </tr>
                                  </table>
                                  </form>
                                  </div>
                                  <hr class="noscreen" />
                                  <div class="content-padding"></div>
                                  <!-- /content-padding -->
                                  </div>
                                  <!-- /content -->

  • Whats the problem with this code?

    import javax.swing.JOptionPane;
    public class change{
      int coins[] = {1,5,10,25,50};
      int change=0;
      public void backtracking(coins,change){
        int b=0;
        for(int i=0; i<=4; i++){
          if (coins[i] <= change){
            b = max(b, coins[i]+backtracking(i, change - coins));
    System.out.println("Output: "+b);
    public static void main(){
    int input = JOptionPane.showInputDialog("Amountof the change? ");
    backtracking(coins, input);

    Here's a few, for starters
    import javax.swing.JOptionPane;
    public class change{
    //class names should start with capital letters
      int coins[] = {1,5,10,25,50};
      int change=0;
      public void backtracking(coins,change){
    //this is a method signature, needs type identifiers etc, something like public void backtracking(int[] anyIntArray,int anyInt)
        int b=0;
        for(int i=0; i<=4; i++){
    //here, 4 is a magic number, if you mean <= all the elements of coins[], use < coins.length
          if (coins[i] <= change){
    //coins[i] will never be less then change(which is 0)
            b = max(b, coins[i]+backtracking(i, change - coins));
    //there is no method max declared anywhere
    System.out.println("Output: "+b);
    public static void main(){
    //main method signature is incorrect, will compile, but will error
    int input = JOptionPane.showInputDialog("Amountof the change? ");
    //you're trying to put a string into an int
    backtracking(coins, input);
    //you have not created an instance of class Change, to use this method

  • Whats the problem with this query?

    Its doing huge sort operations and is throwing the following all the time.
    ORA-1652: unable to extend temp segment by 256 in tablespace
    Unable to figure out if I should be increasing the sort area size. I initially increased the TEMP space by 50% to 3 G and it still fails. Any recommendations ?
    SELECT distinct b.*,
    f.carrier_id
    FROM po a
    JOIN (SELECT c.asn_shipment_id,
    c.po_cd,
    c.po_ln,
    c.ve_cd,
    c.itm_cd,
    d.shipped_date,
    c.qty_shipped,
    d.transport_id
    FROM po_asn_line_interface c
    JOIN po_asn_interface d
    ON to_char (c.asn_shipment_id) = to_char (d.asn_shipment_id)
    WHERE c.stat_desc = 'ASN header invalid.'
    AND d.stat_desc = 'Single vendor error: 1User-Defined Exception'
    AND EXISTS (SELECT 1
    FROM po_asn_line_interface e
    WHERE c.po_cd <> e.po_cd
    AND to_char(c.asn_shipment_id) = to_char(e.asn_shipment_id))) b
    ON to_char (a.po_cd) = to_char (b.po_cd)
    JOIN po_ln f
    ON a.po_cd = f.po_cd
    AND f.ln# = b.po_ln
    WHERE a.stat_cd = 'O'
    AND NOT EXISTS (SELECT 1
    FROM po_ln$actn_hst e
    WHERE e.po_cd = b.po_cd
    AND e.ln# = b.po_ln
    AND po_actn_tp_cd in ('SVB', 'RCV'))

    Hi,
    The types of SQL statements that can cause database sorts to occur include the following:
    * ORDER BY
    * GROUP BY
    * SELECT DISTINCT
    * UNION
    * INTERSECT
    * MINUS
    * ANALYZE
    * CREATE INDEX
    * Joins between tables on columns that are not indexed
    Making sure that all foreign key columns are indexed will also help reduce sorting when tables are joined via primary and foreign key columns. See also if you can avoid use DISTINCT clause in your SQL statement.
    Cheers

Maybe you are looking for

  • Purchase order text  in info record

    Hi!! I want to clean purchase order texts of all info records. How Can i know that info records have Purchase order texts?, Which table can i use?. Thanks, Regards.

  • Unit 4 Assignment 1, AD Replication Scenario

      what is the recommendations for site-link protocols and replication schedule/frequency as well as the possibility of recommending/justifying redundant links to branch 1 ?

  • Signature in Entourage question

    I have a signature automatically setup to be included in emails. My issue is having them NOT be included automatically when I reply to someone. Most of the time I forget to not include it and end up having 5 images. Is there a setting in Entourage wh

  • IPhone music library - itunes

    I just bought a new laptop, how do i transfer my music from my iPhone 4 to itunes? I've tried 'Transfer Purchases' and 'Sync', both do not transfer songs to my itunes. Thanks!

  • Worse gaming performance than Kubuntu 12.10?

    Title. I'm using KDE 4.10 (installed kdebase package), Pulse, nVidia propietary drivers with VSync disabled, same programs than on Kubuntu, compositing manually suspended, yet performance is worse on TF2 and Serious Sam 3: BFE. FPS is high... enough,