Error msg pointing to nonexistent var (WARNING: LONG POST)

I'm sorry to have to post my entire program, but I keep getting an error msg that points to a variable that is NOWHERE in my code. The var is called PwChar. It's mentioned in the error msg, but is nowhere in my code. This is even after saving and recompiling it THREE TIMES. Please, someone, tell me where this error appears in my code, if you even can. Your help will be greatly appreciated. Here is the error msg:
C:\jdk1.2.1\bin>javac PwGenerator.java
PwGenerator.java:228: Incompatible type for =. Can't convert java.lang.Character
to char.
pwChar = new Character((char) (newAsciiRange));
^
PwGenerator.java:234: Incompatible type for =. Can't convert java.lang.Character
to char.
pwChar = new Character((char) (newAsciiRange[0]));
^
2 errors
Now here is my code (sorry for the length):
// My Javafied Password Generator
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class PwGenerator extends JApplet
private String pw;
private JPanel centerPanel, northPanel, southPanel;
private JComboBox numchars;
private JCheckBox lettersUpper, lettersLower, numbers, specialChars;
private JButton generate, reset;
private JTextField textfield;
private int asciiRange[], newAsciiRange[];
private String pwLength[] = {"6", "7", "8", "9", "10", "11", "12"};
private int lengthSelected;
private JLabel pwLabel, numCharLabel;
private boolean wantSpecialchars, wantNumbers, wantUppercase, wantLowercase;
public void init()
// instantiate widgets
asciiRange = new int[94];
numCharLabel = new JLabel("Number of characters for password");
numchars = new JComboBox(pwLength);
lettersUpper = new JCheckBox("Uppercase letters");
lettersLower = new JCheckBox("Lowercase letters");
numbers = new JCheckBox("Numbers");
specialChars = new JCheckBox("Special characters");
generate = new JButton("Generate password");
reset = new JButton("Clear");
textfield = new JTextField(12);
pwLabel = new JLabel("Your new password is: ");
// add widgets to the content pane
Container c = getContentPane();
c.setLayout(new BorderLayout());
centerPanel = new JPanel();
centerPanel.setLayout(new GridLayout(3, 2));
centerPanel.add(lettersUpper);
centerPanel.add(lettersLower);
centerPanel.add(numbers);
centerPanel.add(specialChars);
centerPanel.add(generate);
centerPanel.add(reset);
c.add(centerPanel, BorderLayout.CENTER);
northPanel = new JPanel();
northPanel.setLayout(new FlowLayout());
northPanel.add(numCharLabel);
northPanel.add(numchars);
c.add(northPanel, BorderLayout.NORTH);
southPanel = new JPanel();
southPanel.setLayout(new FlowLayout());
southPanel.add(pwLabel);
southPanel.add(textfield);
c.add(southPanel, BorderLayout.SOUTH);
} // end init
public void start()
// connect event handlers to the widgets
numchars.addItemListener(new ItemListener() {
     public void itemStateChanged(ItemEvent e)
     lengthSelected = Integer.parseInt(pwLength[numchars.getSelectedIndex()]);
CheckBoxHandler handler = new CheckBoxHandler();
lettersUpper.addItemListener(handler);
lettersLower.addItemListener(handler);
numbers.addItemListener(handler);
specialChars.addItemListener(handler);
generate.addActionListener(new ActionListener() {
     public void actionPerformed(ActionEvent e)
     setAsciiRange();
     trimAsciiRange();
reset.addActionListener(new ActionListener() {
     public void actionPerformed(ActionEvent e)
     textfield.setText("");
} // end start
public void setAsciiRange()
int numRange[] = new int[10];
int uppercaseRange[] = new int[26];
int lowercaseRange[] = new int[26];
int specialcharRange[] = new int[32];
System.out.println("Welcome to setAsciiRange!");
if (!wantSpecialchars && !wantNumbers && !wantUppercase && !wantLowercase)
JOptionPane.showMessageDialog(this, "You must make a selection", "Error", JOptionPane.ERROR_MESSAGE);
if (wantNumbers)
for (int i=0, j=48; i<numRange.length; i++, j++)
     numRange[i] = j;
System.out.println("Number " + i + " is " + j +"\n");
} // end for
} // end if
if (wantUppercase)
for (int i=0, j=65; i<uppercaseRange.length; i++, j++)
     uppercaseRange[i] = j;
     System.out.println("Uppercase letter " + i + " is " + j + "\n");
} // end for
} // end if
if (wantLowercase)
for (int i=0, j=97; i<lowercaseRange.length; i++, j++)
     lowercaseRange[i] = j;
System.out.println("Lowercase letter " + i + " is " + j + "\n");
} // end for
} // end if
if (wantSpecialchars)
for (int i=0, j=33; i<15; i++, j++)
specialcharRange[i] = j;
     System.out.println("Special char " + i + " is " + j + "\n");
for (int i=15, j=58; i<22; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j + "\n");
for (int i=22, j=91; i<28; i++, j++)
     specialcharRange[i] = j;
     System.out.println("Special char " + i + " is " + j + "\n");
for (int i=28, j=123; i<specialcharRange.length; i++, j++)
     specialcharRange[i] = j;
     System.out.println("Special char " + i + " is " + j + "\n");
} // end if
if (numRange != null)
System.arraycopy(numRange, 0, asciiRange, 0, numRange.length);
if (uppercaseRange != null)
System.arraycopy(uppercaseRange, 0, asciiRange, firstEmptyElement(), uppercaseRange.length);
if (lowercaseRange != null)
System.arraycopy(lowercaseRange, 0, asciiRange, firstEmptyElement(), lowercaseRange.length);
if (specialcharRange != null)
System.arraycopy(specialcharRange, 0, asciiRange, firstEmptyElement(), specialcharRange.length);
for (int i=0; i<asciiRange.length; i++)
System.out.println(asciiRange[i]);
private int firstEmptyElement()
int i;
for (i=0; i<asciiRange.length; i++)
if (asciiRange[i] == 0)
     break;
return i;
private void trimAsciiRange()
newAsciiRange = new int[firstEmptyElement()];
for (int i=0; i<newAsciiRange.length; i++)
newAsciiRange[i] = asciiRange[i];
System.out.println("newAsciiRange element " + i + " is " + newAsciiRange[i]);
public void generatePw (int selectedLength)
int randomNum;
char pwChar;
pw = "";
for (int i=0; i<=lengthSelected; i++)
randomNum = 1 + (int) (Math.random() * newAsciiRange.length);
try {
     pwChar = new Character((char) (newAsciiRange[i]));
     pw += pwChar;
     System.out.print(pwChar + " ");
catch(ArrayIndexOutOfBoundsException e) {
     System.out.print("Setting out-of-bounds index to 0");
     pwChar = new Character((char) (newAsciiRange[0]));
     pw += pwChar;
     System.out.print(pwChar + " ");
System.out.println(pw);
textfield.setText(pw);
private class CheckBoxHandler implements ItemListener
public void itemStateChanged(ItemEvent e)
if (e.getSource() == specialChars)
     if (e.getStateChange() == ItemEvent.SELECTED)
     wantSpecialchars = true;
     else
     wantSpecialchars = false;
} // end outer if
if (e.getSource() == numbers)
     if (e.getStateChange() == ItemEvent.SELECTED)
     wantNumbers = true;
     } // end if
     else
     wantNumbers = false;
     } // end else
} // end if
if (e.getSource() == lettersUpper)
     if (e.getStateChange() == ItemEvent.SELECTED)
     wantUppercase = true;
     else
     wantUppercase = false;
} // end if
if (e.getSource() == lettersLower)
     if (e.getStateChange() == ItemEvent.SELECTED)
     wantLowercase = true;
     else
     wantLowercase = false;
} // end if

I'm sorry to have to post my entire program, Ok - but next time please use code tags (even though it makes it easier this time, it makes it so much easier to read)
but I
keep getting an error msg that points to a variable
that is NOWHERE in my code. Does your editor have a "find" function? In Notepad it's CTL-F
The var is called
PwChar. no, it's called pwChar
It's mentioned in the error msg, but is
nowhere in my code. This is even after saving and
recompiling it THREE TIMES. Please, someone, tell me
where this error appears in my code, if you even can.
Your help will be greatly appreciated. Here is the
e error msg:
C:\jdk1.2.1\bin>javac PwGenerator.java
PwGenerator.java:228: Incompatible type for =. Can't
convert java.lang.Character
to char.
pwChar = new Character((char)
r((char) (newAsciiRange));
^
PwGenerator.java:234: Incompatible type for =. Can't
convert java.lang.Character
to char.
pwChar = new Character((char)
r((char) (newAsciiRange[0]));
^
2 errors
Now here is my code (sorry for the length):
// My Javafied Password Generator
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class PwGenerator extends JApplet
private String pw;
private JPanel centerPanel, northPanel,
l, southPanel;
private JComboBox numchars;
private JCheckBox lettersUpper, lettersLower,
r, numbers, specialChars;
private JButton generate, reset;
private JTextField textfield;
private int asciiRange[], newAsciiRange[];
private String pwLength[] = {"6", "7", "8", "9",
", "10", "11", "12"};
private int lengthSelected;
private JLabel pwLabel, numCharLabel;
private boolean wantSpecialchars, wantNumbers,
s, wantUppercase, wantLowercase;
public void init()
// instantiate widgets
asciiRange = new int[94];
numCharLabel = new JLabel("Number of characters
ters for password");
numchars = new JComboBox(pwLength);
lettersUpper = new JCheckBox("Uppercase
case letters");
lettersLower = new JCheckBox("Lowercase
case letters");
numbers = new JCheckBox("Numbers");
specialChars = new JCheckBox("Special
cial characters");
generate = new JButton("Generate password");
reset = new JButton("Clear");
textfield = new JTextField(12);
pwLabel = new JLabel("Your new password is: ");
// add widgets to the content pane
Container c = getContentPane();
c.setLayout(new BorderLayout());
centerPanel = new JPanel();
centerPanel.setLayout(new GridLayout(3, 2));
centerPanel.add(lettersUpper);
centerPanel.add(lettersLower);
centerPanel.add(numbers);
centerPanel.add(specialChars);
centerPanel.add(generate);
centerPanel.add(reset);
c.add(centerPanel, BorderLayout.CENTER);
northPanel = new JPanel();
northPanel.setLayout(new FlowLayout());
northPanel.add(numCharLabel);
northPanel.add(numchars);
c.add(northPanel, BorderLayout.NORTH);
southPanel = new JPanel();
southPanel.setLayout(new FlowLayout());
southPanel.add(pwLabel);
southPanel.add(textfield);
c.add(southPanel, BorderLayout.SOUTH);
} // end init
public void start()
// connect event handlers to the widgets
numchars.addItemListener(new ItemListener() {
     public void itemStateChanged(ItemEvent e)
lengthSelected =
d =
Integer.parseInt(pwLength[numchars.getSelectedIndex()]
CheckBoxHandler handler = new CheckBoxHandler();
lettersUpper.addItemListener(handler);
lettersLower.addItemListener(handler);
numbers.addItemListener(handler);
specialChars.addItemListener(handler);
generate.addActionListener(new ActionListener()
er() {
     public void actionPerformed(ActionEvent e)
     setAsciiRange();
     trimAsciiRange();
reset.addActionListener(new ActionListener() {
     public void actionPerformed(ActionEvent e)
     textfield.setText("");
} // end start
public void setAsciiRange()
int numRange[] = new int[10];
int uppercaseRange[] = new int[26];
int lowercaseRange[] = new int[26];
int specialcharRange[] = new int[32];
System.out.println("Welcome to setAsciiRange!");
if (!wantSpecialchars && !wantNumbers &&
s && !wantUppercase && !wantLowercase)
JOptionPane.showMessageDialog(this, "You must
u must make a selection", "Error",
JOptionPane.ERROR_MESSAGE);
if (wantNumbers)
for (int i=0, j=48; i<numRange.length; i++,
; i++, j++)
     numRange[i] = j;
System.out.println("Number " + i + " is " + j
is " + j +"\n");
} // end for
} // end if
if (wantUppercase)
for (int i=0, j=65; i<uppercaseRange.length;
ength; i++, j++)
     uppercaseRange[i] = j;
System.out.println("Uppercase letter " + i + " is "
" + j + "\n");
} // end for
} // end if
if (wantLowercase)
for (int i=0, j=97; i<lowercaseRange.length;
ength; i++, j++)
     lowercaseRange[i] = j;
System.out.println("Lowercase letter " + i +
" + i + " is " + j + "\n");
} // end for
} // end if
if (wantSpecialchars)
for (int i=0, j=33; i<15; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
for (int i=15, j=58; i<22; i++, j++)
specialcharRange[i] = j;
System.out.println("Special char " + i + " is
i + " is " + j + "\n");
for (int i=22, j=91; i<28; i++, j++)
     specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
for (int i=28, j=123;
j=123; i<specialcharRange.length; i++, j++)
     specialcharRange[i] = j;
System.out.println("Special char " + i + " is " + j
j + "\n");
} // end if
if (numRange != null)
System.arraycopy(numRange, 0, asciiRange, 0,
ge, 0, numRange.length);
if (uppercaseRange != null)
System.arraycopy(uppercaseRange, 0, asciiRange,
Range, firstEmptyElement(), uppercaseRange.length);
if (lowercaseRange != null)
System.arraycopy(lowercaseRange, 0, asciiRange,
Range, firstEmptyElement(), lowercaseRange.length);
if (specialcharRange != null)
System.arraycopy(specialcharRange, 0,
ge, 0, asciiRange, firstEmptyElement(),
specialcharRange.length);
for (int i=0; i<asciiRange.length; i++)
System.out.println(asciiRange[i]);
private int firstEmptyElement()
int i;
for (i=0; i<asciiRange.length; i++)
if (asciiRange[i] == 0)
     break;
return i;
private void trimAsciiRange()
newAsciiRange = new int[firstEmptyElement()];
for (int i=0; i<newAsciiRange.length; i++)
newAsciiRange[i] = asciiRange[i];
System.out.println("newAsciiRange element " + i
" + i + " is " + newAsciiRange[i]);
public void generatePw (int selectedLength)
int randomNum;
char pwChar;
pw = "";
for (int i=0; i<=lengthSelected; i++)
randomNum = 1 + (int) (Math.random() *
om() * newAsciiRange.length);
try {
     pwChar = new Character((char) (newAsciiRange));
     [b]pw += pwChar;
     System.out.print(pwChar + " ");
catch(ArrayIndexOutOfBoundsException e) {
System.out.print("Setting out-of-bounds index to
o 0");
     pwChar = new Character((char) (newAsciiRange[0]));
     pw += pwChar;
     System.out.print(pwChar + " ");
System.out.println(pw);
textfield.setText(pw);
private class CheckBoxHandler implements
ts ItemListener
public void itemStateChanged(ItemEvent e)
if (e.getSource() == specialChars)
     if (e.getStateChange() == ItemEvent.SELECTED)
     wantSpecialchars = true;
     else
     wantSpecialchars = false;
} // end outer if
if (e.getSource() == numbers)
     if (e.getStateChange() == ItemEvent.SELECTED)
     wantNumbers = true;
     } // end if
     else
     wantNumbers = false;
     } // end else
} // end if
if (e.getSource() == lettersUpper)
     if (e.getStateChange() == ItemEvent.SELECTED)
     wantUppercase = true;
     else
     wantUppercase = false;
} // end if
if (e.getSource() == lettersLower)
     if (e.getStateChange() == ItemEvent.SELECTED)
     wantLowercase = true;
     else
     wantLowercase = false;
} // end if

Similar Messages

  • Receiving, opening, saving attachment​s WARNING long post

    In some ways, this post is more of a reminder to myself on how to deal with attachments that I've discovered so far and hopefully it will help some other confused souls. I'm betting that like most people on this forum, your interest in the Playbook is partly motivated by how you can quickly and easily access files on the run to review them and edit them minimally and quickly (oops! forgot to change the boss' title in the memo now!) without resorting to hauling out a laptop, waiting for it to start, load the relevant office program, and then hoping your hotel wifi is strong and stable enough to actually load up a bloated email client to download far too many attachments. If that's your circumstances are like mine, then the PB is clearly a work in progress. I thought that Apple's iPad method of dealing with document transfers was crippled at best; the PB is a quest in hide-and-seek.
    Transferring media files (photos, movies, etc.). If you use Windows, I'm guessing you're doing okay. If you use a Mac like me, the BB Desktop will not work for such transfers. You can use wifi to bulk transfer media files from your Mac to the PB, but you lose the rich context (playlists, etc.) that you probably want.
    Opening attachments in Mail within Bridge. This one confuses me, but I suppose it works best for the corporate world - maybe. If I open an attachment from an email in the PB Bridge from within Mail, I could select an attachment and tap to open it. The relevant app (Reader, sheet to go, word to go, etc.) opens up a new window and the document can be read. At this point in the RIM life cycle, any documents within Bridge are read-only and cannot be saved/edited, which of course defeats any aspirations of on-the-fly editing. Nonetheless, they are viewable and gloriously so. But it was not obvious to me where the documents were now. If I wanted to, say, review them later, where would I find them? The most rational place I thought they would be would be the Bridge Files icon. However, if I selected Playbook under Bridge Files, there did not seem to be anything, and if I selected BlackBerry smartphone, it was not obvious either. By chance, I muddled through and discovered that under the smartphone choice, if I drilled down through my SD card directory to BlackBerry to documents to Bridge (ah! that's new!) subfolders, I would find all my downloaded documents in this new Bridge folder which is supposedly on my smartphone. Distressingly, I cannot find this same subfolder "Bridge" on the SD card on the smartphone itself.
    But this is the where we enter another dimension however! All of the above (2) ONLY seems to apply to emails sent to my GMail account that my BlackBerry - and therefore my PB - is also set up to receive within Mail in Bridge: given that I'm not an IT adminstrator, I'll just call them the non-corporate emails. If I open up an attachment from a message in Mail within Bridge that was sent through my usual corporate email system (in this case, Lotus Notes - yet another story), then the attachment ends up in SD card directory to BlackBerry to documents, but does not go into Bridge. I lack the knowledge or wisdom to fathom why this is different, other than it probably has something to do with the corporate side of things. 
    Opening attachments from Webmail (e.g. GMail). This one is also a bit bizarre. Although not very easy to find, at least all the attachments from (2) and (3) ended up in almost the same places on my smartphone SD card. But you cannot edit them.  So what if I opened up via the web browser? GMail works quite well actually. When I tapped on an attachment to open it in GMail, it would bring me to a new pane and ask me to save it (Save "1"). It does not necessarily open it however and sometimes I would just get a new blank window. But if I swipe down from the top, I could see the downloads option, and choosing that would show me the attached document and an Open button. Opening it would load the document using the relevant app (e.g. Word to Go) and swiping down gave me another save (yes!) option (Save "2"). However, I had no idea where the attachment was saved. It does not appear under Media, any Bridge folder, etc. Assuming the attachment file type is associated with the app however, if you now open, say, Word-to-Go, well, there it is (finally!). So, the bizzarre thing is that the first save (Save "1") that you are prompted with does not seem to actually save it: only after the relevant app loads it and then you save it again (Save "2") does the attachment seem to actually get transferred to the Playbook's internal memory (somewhere). I cannot figure out the reason why you have to go through this double step. But at least now I can edit them. So maybe the solution is to mirror all my corporate emails to another service like GMail or Hotmail? (I can hear the collective gasps of the security minded types!)
    Opening attachments from Webmail (e.g., GMail) within the Bridge Browser. This is maybe the ultimate compromise and combination of the above, and perhaps the situation most of us want to know about when we're on the go, get that ever important email about what was needed yesterday, don't have wifi access, but need to edit the attachment and cannot do it within the regular mail within Bridge. Dismally, this one is a fail - I get the error message "Bridge Browser: Cannot download corporate files." 
    After fumbling my way through an iPad and pretty much abandoning it for my workflow (although it is very good for other applications), I thought the Playbook would address almost of my needs, particularly since I've used a BlackBerry for the last six years. Personally, I think the PB hardware is fantastic, the form factor is great, and I do not care for or need 1000's of useless and trivial apps, but the implementation of what I consider core functionality is mediocre at best. I'm an academic - I'd grade the Playbook a C- (maybe even a D+ (ouch!) if I was in a grumpy mood).
    In the interests of fairness, I recognize that some of the issues may simply be the way my corporate parent runs its business. I toil away under Lotus Notes and use a BlackBerry Bold, OS5, Rogers network, and a three year MacBook Pro.
    If anybody has found other solutions or I've simply done something wrong, I'd love to hear. Otherwise, my abode will likely not be this Playbook's forever home.

    Hi fochtk... you're welcome (I think! this seems unnecessarily confusing!). I think you're referring to my points (2) and (3) from my original post. In summary, this is what I THINK is happening.
    On my BlackBerry Bold 9700, I have two email accounts, my corporate Lotus account, and my GMail account. There is one universal desktop that gathers both incoming emails into one so that I can view all messages at the same time. I imagine that the corporate server for this universal desktop therefore also have all these same messages because all the messages (GMail and Lotus) then show up in Mail via Bridge on my PB.
    A. When in Bridge - Mail I open up an attachment in a mail that was received by my corporate Lotus account, the documents show up on my phone's SD card (I think you mean the memory card, not the SIM card for telecommunications). If I check my Playbook under Bridge Files -> Phone Icon -> BlackBerry/SDCard -> Documents, the attachments are there, and if I check my file manager on my phone, the same attachments are listed in the same subfolder. Interestingly, I was given the option to download them too.
    B. When I open up an attachment in a mail that was received initially by my GMail account, the documents are not given the option to download. However, when I go to Bridge Files -> Phone Icon -> BlackBerry/SDCard -> Documents -> Bridge, the attachments from this GMail destined message are there! Weird, because I didn't create a Bridge subfolder on my phone's SD card, nor can I find a Bridge subfolder on the phone itself.
    SORRY. I stand corrected. I just went into Bridge - Mail to double check and guess what... ALL of my email attachments no matter what account they were sent to originally (Lotus or GMail) if they are accessed through Bridge get dumped into this Bridge subfolder that is supposedly located on my phone's SD card (situation B). Maybe situation A was for when I downloaded the attachment to the phone first: I've gone back and forth with this so many times now...
    Maybe this Bridge subfolder is a hidden folder tied to your phone so that if you lose your Playbook attachments cannot be accessed? But there seems to be no options to delete these downloaded files. UPDATE! Yes, I should have checked sooner. When you are accessing your phone, use the menu button to select "Show Hidden". It then displays the greyed out Bridge subfolder under Documents and you can then manipulate (e.g., delete) your files from there. This would make sense so that your files are as secure as possible via your phone. Still can't edit the attachments though... 
    Hope this helps...

  • Befw11s4 router - warning long post

    I purchased a befw11s4 v.4 router a couple of years back.  I remember spending hours with technical support to get it working and even after I got it working it never did function very well.  The router would constantly reset itself, which would require me to reset the dsl modem then completely enter all of the settings back into the linksys router only to have it reset again, perhaps within a few minutes, sometimes it would last maybe an hour, never much longer than that.
    So I disconnected it, haven't really thought much about it since then.
    Now I actually have a desire to try to get it working, but am having a ton of difficulties so I will try to go through each one and explain what is happening to the best of my ability, perhaps somebody out there can help me get this piece working. 
    I have been trying to access the access point, or the settings as it may be through the web browser.  When I first connected the router I was able to get solid led lights on the front panel.  Solid power light, solid ethernet light. 
    I attempt to enter the web browser settings by entering in the address http://192.168.1.1 and have tried http://192.168.1.245  with zero success.  
    I have since reset the router several times using most any method I could find online.  Powering it off, using the reset button, waiting 5 minutes through each step of the process, praying to the networking gods that this router would finally click and everything would just work... sigh.
    I have reset my dsl modem.
    Nothing seems to help.  Now I can no longer get solid lights on the front panel when I connect the ethernet cable.  It briefly flashes, goes dark and so far no amount of reset buttons, power offs, praying, nothing seems to work at all.
    Any hope?
    Thanks.
    (Mod note: Edited for guideline compliance. Thank you.)
    Message Edited by Vince_02 on 12-26-2009 03:58 PM
    Solved!
    Go to Solution.

    Update:  I finally had the solid lights again.  I performed an ipconfig/all and for default gateway it showed:
    0.0.0.0  
    Since then I am once again unable to get a solid light on the router.  I am using a sbcglobal dsl modem, and I read somewhere on here that it also uses the 192.168.0.1 address.  
    more resets, reboots, praying...  nothing works.
    (Mod note: Edited subject for guideline compliance. Thank you.)
    Message Edited by Vince_02 on 12-26-2009 04:00 PM

  • WARNING: LONG POST:  Needing some help with Java Prog

    I hope that this forum can support enough formatting to make the source I'm going to post semi-readable... but here's the problem.
    First, the program is supposed to take a positive numerical input and turn it into a numerical palindrome by reversal. It is also supposed to output the number of reversals along with the palindrome. AND, if the palindrome is going to overflow the data type (int) then, it is supposed to anticipate that, and print out the number of times that the numbers were reversed before it would overflow.
    The problem that I'm having is that when I check if a number is a palindrome or not with isPalindrome(), it is fine for the first run, but after that, it just freaks out and goes into a semi-infinite loop that is only broken by the test for overflow. So, even if it finds a numeric palindrome, it keeps working until it's going to overflow.
    Any ideas are very appreciated, and also, many of the print statements are missing right now because I'm trying to find the problem. There are other print statements that indicate where the execution is in the program, so just ignore them. :)
    Here's the program. (I don't know if the forum will remove the spaces or not, so I'm sorry if it does, because I know that makes it hard to read). Thanks ahead of time. :)
    public class Palindrome
    String input=null;
    int pal=0, rvs=0, diff=0, palcount=0, orig=0, ini=0, countTemp=0;
    int inputTemp=0, powTemp=0;
    boolean overflow=false, boopal=true;
    public Palindrome(String x)
    input=x;
    orig=Integer.parseInt(x);
    ini=Integer.parseInt(x);
    public void isPalindrome()
    System.out.println("isPalindrome()");
    int f=0, t=0;
    String g=null;
    g=input;
    t=Integer.parseInt(g);
    f=g.length();
    if(f==2 && t%11!=0)
    System.out.println("if(f==2 && t%11!=0)");
    boopal=false;
    else if(f>2 && f%2==0)
    System.out.println("if(f>2 && f%2==0)");
    int right=f/2, left=right-1;
    while(left<right && right<f && left>-1)
    if(g.charAt(left)!=g.charAt(right))
    boopal=false;
    left--;
    right++;
    else if(f>1 && f%2==1)
    System.out.println("if(f>1 && f%2==1)");
    int mid=(f-1)/2, left=mid-1, right=mid+1;
    while(left<right && right<f && left>-1)
    if(g.charAt(left)!=g.charAt(right))
    boopal=false;
    left--;
    right++;
    else
    boopal=true;
    if(boopal==true)
    System.out.println("BOOPAL IS TRUE!");
    System.exit(0);
    public void makeReversal()
    System.out.println("makeReversal()");
    int b=0, iniTemp=0;
    String c=ini+"";
    int d=c.length()-1;
    do
    System.out.println("do/while(d>0): d: " + d);
    iniTemp=Integer.parseInt(c);
    b=iniTemp%10;
    iniTemp=iniTemp/10;
    c=iniTemp+"";
    rvs=(int) (rvs+((b*Math.pow(10, d))));
    d=c.length()-1;
    while(d>0);
    public void willOverflow()
    System.out.println("willOverflow()");
    diff=Integer.MAX_VALUE-rvs;
    if(ini<=diff)
    overflow=false;
    System.out.println("WillOverflow (should = false): " + overflow);
    else if(ini>diff)
    overflow=true;
    System.out.println("WillOverflow (should = true): " + overflow);
    System.out.println("The program will overflow before calculating"+
    " your palindrome.");
    System.out.println("Your initial input was: "+orig);
    System.out.println("The program will iterate "+palcount+
    " times before the overflow will occur.");
    System.exit(0);
    public void makePalindrome()
    System.out.println("makePalindrome()");
    isPalindrome();
    if(overflow==false)
    while(boopal==false)
    makeReversal();
    willOverflow();
    System.out.println("makePalindrome: pal: " + pal);
    pal=ini+rvs;
    System.out.println("makePalindrome: pal: " + pal);
    palcount++;
    ini=pal;
    input=""+pal;
    isPalindrome();
    if(boopal==true)
    System.out.println("BOOPAL IS TRUE!! GEORGE!");
    break;
    System.out.println("boopal: " + boopal);

    See http://forum.java.sun.com/thread.jsp?forum=54&thread=372647&tstart=105&trange=15

  • Mpeg Streamclip error msg. 'movie's too long'

    I am trying to convert an mp4 from Vimeo, to a Quicktime file.  When i put it into streamclip, and try to export only 3 min. of the 20 min. movie, I get an error msg. stating that the movie is 'too long'... It's only 20 min., and only need 3 min., so, am not sure why am getting that msg.  I also tried opening up the file, and exporting to quicktime mov., and only exports the audio, but no video... An

    I did open in the mp4 in Streamclip, selected in/out points, totalling 3 min..., treid to export to quicktime, and then got the error msg. saying the movie was 'too long'...
    When I tried exporting from quicktime, to 'moive to quicktime movie', that's what only exports audio, and not video...
    I've never seen this before, I always use mpeg streamclip, to export an mp4 to quicktime...thanks for your help...

  • JDBC error msg

    Can u please tell me the reason behind this error msg:
    Scenario: Idoc to JDBC
    When I posted inout msg thru RWB,I got the following err in CC monitoring:
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'BPSAI_SAP_RECEIVABLES' (structure 'Statement'): java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected

    hi naresh,
    There is some data from IDoc which is non numeric but it is being supplied to the DATABASE. Check which are all data you are passing and check the data type on both the side. It is basically a data type conflict.
    regards
    Ramesh P

  • What to do about error msg: Warning: SUID file "System/Library/Core/Services/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDA gent"has been modified and will not be repaired" on MacBook Air.

    What to do about error msg in Disk Utility on MacBook Air:
    Warning: SUID file “System/Library/Core/Services/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDA gent"has been modified and will not be repaired.”

    As long as the report ends up with 'Permissions repair complete' then, as far as permissions go, you are fine. You can ignore the various statements in the report:
    Permissions you can ignore on 10.5 onwards:
    http://support.apple.com/kb/TS1448
    Using 'should be -rw-r--r-- , they are lrw-r--r--' as an example, you will see the that the permissions are not changed, but the | indicates a different location. This is because an update to Leopard onwards changed the location of a number of system components.
    Poster rccharles has provided this description of what it all means:
    drwxrwxrwx
    d = directory
    r = read
    w = write
    x = executeable program
    drwxrwxrwx
    |  |  |
    |  |   all other users not in first two types
    |  | 
    |  group

    owner

  • ITunes no longer works on my Windows VISTA system.  Get error msg saying C runtime library incorrectly... Error 7, Windows error 1114..

    iTunes no longer works on my Windows VISTA system.  Get error msg saying an application is attempting to access C runtime library incorrectly... Error 7, Windows error 1114.  Same msg, or one that says unable to install, when trying to update or reinstall iTunes.  iTunes worked well up until about a month ago when this error msg starting appearing.

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • I just noticed that I can no longer get the shuffle feature on my iTunes 10.4.0.80 to work. I've turned it off and on, but it still just goes in order of the playlist. I too have been getting an error msg at computer startup.

    I'm not sure how long it's been like this, but I just noticed that my songs no longer shuffle when playing from iTunes (running 10.4.0.80). No matter if "shuffle songs" is off or on, they still just play on down the playlist in order.  Could this be related to other problems I'm seeing listed that seem associated with the latest update? I also get an error msg when my computer is starting up that I think is associated with this latest update (something about not being able to read a line from "Apple sync helper" (hope I haven't butchered that too much, haven't had a chance to copy the error msg)). Is this something that's likely to be fixed in a later update?

    After looking at other people's posts, I think it's official: there is a bug. Itunes support said I should not have lost the drag/drop tool and I haven't on the laptop that is running itunes 10.4 and operating system 10.6.8. I chatted with someboby who lost both his drag/drop and side scroll and what we have in common is a wacom tablet for a mouse. My laptop is a wireless mouse. I reinstalled whatever updated driver that wacom has out there, shut the system down for night, hoping for magic, but alas none to be had. So if I want to change song order, I network the laptop and desktop, share the screen on the laptop, drag and drop to my heart's content and curse Apple for making me work this hard to find the tool that was once at my fingertips. Apple also let me know that if I want to share songs in household that the hundreds on songs that were purchased for .99 need to be repurchased for another .30. Maybe Apple is holding my drag/drop tool captive til I pay up the money or Maybe the next update will fix the problem, I for one give up for now.

  • My computer crashed and I no longer have the itunes library. i get an error msg that my iphone is synced to another library - how can I get the info from the phone to the itunes library?

    my computer crashed and I no longer have the itunes library. i get an error msg that my iphone 3g is synced to another library - how can I get the info from the phone to the itunes library without losing everything? How do I delete old audiobooks from my iphone?

    You can transfer itunes purchases:  File>Devices>Transfer Purchases
    The iphone is not a storage/backup device.  The sync is one way - computer to iphone.  The exception is itunes purchases.
    It has always been very basic to always maintain a backup copy of your computer.  Use your backup copy to put everything back.

  • When I reboot my PC I get error msg: "procedure entry point  SQlite3_wal-checkpoint could not be found..."

    I had to uninstall prior version of iTunes to install IOS5 in my iPhone 4 (relatively new phone, only about 5 weeks old).  It took several attempts to install IOS 5, and I finally succeeded only after disableing Kaspersky AV and the Windows Firewall.  This, even though the iTunes connection diagnostics reported everything was OK, no errors and all green indicators.  I had opened iTunes as Administrator too.  So, now I have IOS 5 installed and running ok on the iPhone4, but I have a new problem on my PC that arose from all the different attempts to get this done.  Here's more detail on the procedures and system changes I had made on my PC, and then what I get for the error msg.
    1) As Instructed by an Apple rep, I UNINTSTALLED both iTunes and Quicktime.  I then rebooted and ran iTunes in Admin mode, used the Connection diagnosis (reported all OK) and then tried to install IOS 5 on my iPhone4.  The download (which would take between 30-45 minutes on each attempt) would fully complete and then I'd get an error msg of "server timeout".  This led to further advice from Apple telling me to try the download again, this time with AV and Firewall disabled.  So I rebooted again, disabled AV and Firewall and the IOS5 succeeded.
    2) However, ever since I had removed both iTunes and Quicktime and reinstalled (only) iTunes (so far), each time I reboot my pc I get the following:
    A Window opens with title: "Apple Sync Notifier exec Entry Point Not Found".  Within the box below the title the following error msg appears: "The procedure entry point SQlite3_wal_checkpoint could not be located in the dynamic link library: SQlite3.dll"
    I performed a search for SQlite3 in My Computer.  It indeed shows up in a number of places, including within an Apple folder.
    I'm using 64bit Win7 Home Premium SP1 on a PC with AMD Phenom II X4 945 Processor, 3 GHz with 8.00 GB RAM.
    All iPhone and other applications seem to be behaving normally.  I just have to hit "OK" to get rid of that annoying (new) error message that is apparently coming about during the PC startup process.  It does NOT recur if I put the system in sleep mode, enter and exit iTunes, etc.  It only occurs on reboot.

    I have searched my computer for that file SQlite3.dll and also file QTCF.dll and I cannot find either one when I search my whole computer for it.  I cannot fix this!  I deleted Itunes and every time I try to download it, it goes through all this download till the end when it says that iTunes.exe-entry point now found and that Procedure entry point message comes up.  HELP!  This is driving me crazy.  How can I get itunes to work again when I can't find the danged .dll file to remove, move or rename!?!?!??

  • TS1717 Installed the iTunes 10 update on my computer (Windows 7).  iTunes will no longer launch and I get no error msg. Tried uninstalling and reinstalling entire app but no help.  Tried setting up a new user, no help.  What's wrong??

    Installed the iTunes 10 update on my computer (Windows 7).  iTunes will no longer launch and I get no error msg. Tried uninstalling and reinstalling entire app but no help. What's the fix??

    Hi sahgin,
    The issue eventually resolved itself, I still don't really know why. I kept up with Windows update, and attempted downloading iTunes again from the Apple website, and it just... worked. It now works fine. I don't know why it took approximately 4 months to work, though.
    I'm sorry I don't have any more helpful information. Posting here was my last resort, and clearly Apple never bothered to reply.

  • Error while starting workflow from warning msg or error msg?

    Hello experts,
    I m tryin to start and workflow from error msg of ME21...whn we juss click enter without entering any value, it gives error as -" enter Purch org  ". whose msg class - ME and msg num - 083.
    thn from t-code SWUY,i creating and linked workflow for the msg.
    Now while testing,when m goin to t-code ME21, and goin to the long text of tht error msg.....the button to start workflow is not getttin enabled. tht is still disable.
    PLease tell r thr any other back ground settings to be done for this.
    Regards
    Nitin

    Hi,
    Your workflow landed up in Error and you want to Restart it right.
    Go to SWPR and check that workflow is there.
    If found, select it and Restart it.
    Regards,
    Surjith

  • I have an error msg:  Warning!! iOS Crash Report

    I just got this error msg.
    Warning!!  iOS Crash Report.   Due to a third party application in your phone, iOS is crashed.  Contact Support for an Immediate Fix.
    There is a 1-800 number noted.  Is this legit or this this a virus?  We have tried shutting down the ipad and re-setting but nothing seems to work.  This error message keeps popping up.  Anyone got any ideas?

    Please tell me that it has NEVER been jailbroke.  If it has never been jailbroke, here are some standard repair procedures:
    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore (or it doesn't help), go into Recovery Mode per the instructions here.  You WILL lose all of your data (game scores, etc,) but, for the most part, you can redownload apps and music without being charged again.  Also, read this.

  • I have iphoto 6 and my pictures are no longer showing.  I have tried importing them but it just give me an error msg. (file format not recognized) I have tried rebuilding the iphoto library but that doesn't work either. Any suggestions?

    I have iphoto 6 and my pictures are no longer showing.  I have tried importing them but it just give me an error msg. (file format not recognized) I have tried rebuilding the iphoto library but that doesn't work either. Any suggestions?

    How did you rebuild?
    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library allowing it to overwrite the damaged file.
    2. Download <a href="http://www.fatcatsoftware.com/iplm/"><b><u>iPhoto Library Manager</b></u></a> and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new *iPhoto 6* library:
    Note this will give you a working library with the same Rolls and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library on your desktop and find the Originals folder. From the Originals folder drag the individual Roll Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.

Maybe you are looking for

  • How do I synch multiple iPhone iPod iTunes libraries?

    ppurchases were made on 2 iphones and 1 iPad.  How do I synch the libraries?

  • How do I restore deleted contacts? (URGENT)

    I have the app "Multidelete". When my mother and I upgraded to IOS7, our contacts were merged. Since then we've shared each other's contacts and it never really bothered me. I have recently upgraded to IOS8  but she has not. Today, I used the Multide

  • How to persist TextInput text values?

    Can anyone provide a brief explanation of how to persist text values? Description: Stuff written into a TextInput field does not persist when moving to another frame, and back again. Example: Frame 1: Put a TextInput component on the stage. Frame 1:

  • How to query data from other Database

    Dear Community; Please help me, I want to connect with another Database in apex query. I have been created TNS and also query run proper in Toad, but when I give schema name with table it does not run and give error. So how I can use this query in Ap

  • GRC 5.3 | ERM | Synch ERM - Back-End

    Hi Experts, suppose a role is generated in the back-end over ERM, it hence exists in both. If changes are made to the authorizations (e.g. deletion of a tcode, changed field value, ...) in the back-end, how can these then be synchronized automaticall