Help? can't see the problem
Hi folks
I know that there is a "bug" in the attached code, but I
just don't see it. There is NO validation taking place. I can put
this page up and hit the submit button with NO DATA in the filed,
and it is accepted. I wanted to used the mask="AAAAAAAAA" or
pattern=[A-Za-z] with validate="noblanks, regex", but again...There
is SOMETHING wrong in the code (probably the <CFINPUT> area,
but again...don't see it.
Can some of you please look with fresher eyes (and a more
open mind) and see if you can see this error?
Many Thanks
Hi Dan,
thanks for the input. I have tried changing the validateat to
all three accepted methods, and get the same result. (and I did try
that again this morning just after reading your message). Still no
luck. It's bizarre!
Thanks again.
Similar Messages
-
Can you see the problem?
i'm trying to write a simple image viewer application.
Can you see the problem. i can't. i'll appreciate any advice or help?
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.io.*;
public class SimpleViewer extends Frame {
protected Image awtImage;
public void loadAndDisplay(String filename) {
Image img = readImage(filename);
awtImage = img;
int width = img.getWidth(this);
int height = img.getHeight(this);
displayImage(img, width, height);
public void displayImage(Image img, int width, int height) {
addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent e){
System.exit(0);
setTitle("Simple Viewer ");
pack();
setSize(new Dimension(width, height));
show();
repaint();
public image readImage(String filename) {
Image image = Toolkit.getDefaultToolkit().getImage(imageName);
MediaTracker imageTracker = new MediaTracker(this);
imageTracker.addImage(image, 0);
try{
imageTracker.waitForID(0);
}catch(InterruptedException e){ return null;}
return image;
public void paint(Graphics g){
Rectangle rect = this.getBounds();
if(awtImage != null) {
g.drawImage(awtImage, 0,0,rect.width, rect.height, this);
public static void main(String[] args){
SimpleViewer ip = new SimpleViewer();
if(args.length <1) {
System.out.println("Enter a valid image file name");
System.exit(0);
ip.loadAndDisplay(args[0]);
}check this line and tell me what you see... after all, it's the source of your compiler errors...
public image readImage(String filename) {
Image image = Toolkit.getDefaultToolkit().getImage(imageName);once you figure that out, it will work...
( hint : check variable names and capitalization of names )
- MaxxDmg...
- ' He who never sleeps... ' -
HELP Can you see the missing parenthesis ?!
Dear People,
I am doing a simple program that creates a ContactBook and allows keyboard entry of lastName, telephoneNumber and emailAddress.
I have a few error messages that say parenthesis missing but I don't
see any missing ! :
"Note.java": Error #: 200 : '{' expected at line 15
"Note.java": Error #: 200 : '}' expected at line 59
"TryContactBook.java": Error #: 200 : ')' expected at line 30
"TryContactBook.java": Error #: 200 : ')' expected at line 42
below is the coding
thank you in advance
Stan
import java.util.*;
public class TryContactBook
private Note note;
public static void main(String[] args)
ContactBook myContactBook = new ContactBook();
FormattedInput input = new FormattedInput();
Note note = new Note();
System.out.println("Enter the number of new notes you wish to record ");
int numberOfNotes = input.readInt();
System.out.println("Ready to record " + numberOfNotes + "note(s) ");
for (int i = 0; i < numberOfNotes; i++)
try
System.out.print("Enter a last name: ");
note.setLastNaame(input.readString());
System.out.println("last name input is: " + notes.getLastName());
catch (InvalidUserInputException e)
System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
e.getMessage());
try
System.out.println("Enter a telephone number ");
note.setTelephoneNumber(input.readString();
System.out.println("telephone number input is: " + notes.getTelephoneNumber());
catch (InvalidUserInputException e)
System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
e.getMessage());
try
System.out.println("Enter an e-mail address ");
note.setTelephoneNumber(input.readString();
System.out.println("e-mail address input is: " + notes.getEmailAddress());
catch (InvalidUserInputException e)
System.out.println("InvalidUserInputException thrown when inputting last name. \n" +
e.getMessage());
=====================================================================
import java.util.*;
* A class to maintain an arbitrarily long list of contacts.
* Notes are numbered for external reference by a human user.
* In this version, note numbers start at 0.
* @author Stan Dominski
public class ContactBook
// Storage for an arbitrary number of notes.
private ArrayList notes;
* Perform any initialization that is required for the
* notebook.
public ContactBook()
notes = new ArrayList();
* Store a new note into the notebook.
* @param note The note to be stored.
public void storeNote(String note)
notes.add(note);
* @return The number of notes currently in the notebook.
public int numberOfNotes()
return notes.size();
* Show a note.
* @param noteNumber The number of the note to be shown.
public void showNote(int noteNumber)
if(noteNumber < 0 || noteNumber > numberOfNotes())
// This is not a valid note number, so do nothing.
else
// This is a valid note number, so we can print it.
System.out.println(notes.get(noteNumber));
* Remove a note from the notebook if it exists.
* @param noteNumber The number of the note to be removed.
public void removeNote(int noteNumber)
if(noteNumber < 0 || noteNumber > numberOfNotes())
System.out.println("noteNumber is not valid.");
else
notes.remove(noteNumber);
* List all the notes in the notebook
public void listNotes()
Iterator i = notes.iterator();
Iterator myIterator = notes.iterator();
while(i.hasNext() && myIterator.hasNext())
System.out.print(notes.indexOf(i.next() ) + ":" );
System.out.println("" + myIterator.next());
=======================================================================
import java.util.*;
public class Note
private ArrayList contactInfo;
private String lastName;
private String telephoneNumber;
private String emailAddress;
public class Note()
contactInfo = new ArrayList();
this.lastName = lastName;
this.telephoneNumber = telephoneNumber;
this.emailAddress = emailAddress;
public void setLastName(String lastName)
this.lastName = lastName;
public String getLastName()
return lastName;
public void setTelephoneNumber(String telephoneNumber)
this.telephoneNumnber = telephoneNumber;
public String getTelephoneNumber()
return telephoneNumber;
public void setEmailAddress(String emailAddress)
this.emailAddress = emailAddress;
public String getEmailAddress()
return emailAddress;
======================================================================
import java.io.*;
import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class FormattedInput
public String readString() throws InvalidUserInputException
if(readToken() == tokenizer.TT_WORD || ttype == '\"' || ttype == '\'')
return tokenizer.sval;
else
throw new InvalidUserInputException(" readString() failed. ..... Input data is not a string");
// Method to read an int value
public int readInt() throws InvalidUserInputException
if (readToken() != tokenizer.TT_NUMBER)
throw new InvalidUserInputException(" readInt() failed. " + " input data not numeric");
else
return (int)tokenizer.nval; // value is numeric so return as int
//helper method to read the next token
private int readToken()
try
ttype = tokenizer.nextToken();
return ttype;
catch(IOException e)
e.printStackTrace(System.err);
System.exit(1);
return 0;
//object to tokenize input from the standard input stream
private StreamTokenizer tokenizer = new StreamTokenizer(
new BufferedReader(
new InputStreamReader(System.in)));
private int ttype; //stores the token type code
======================================================================
import java.io.StreamTokenizer;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
public class InvalidUserInputException extends Exception
public InvalidUserInputException() { }
public InvalidUserInputException(String message)
super(message);I have out comments on the errors I found. There might be more.
I couldn't get the indentation to work so it will look a bit funny.
//David
"Note.java": Error #: 200 : '{' expected at line 15
"Note.java": Error #: 200 : '}' expected at line 59
"TryContactBook.java": Error #: 200 : ')' expected at
line 30
"TryContactBook.java": Error #: 200 : ')' expected at
line 42
import java.util.*;
public class TryContactBook
private Note note;
public static void main(String[] args)
ContactBook myContactBook = new ContactBook();
FormattedInput input = new FormattedInput();
Note note = new Note();
System.out.println("Enter the number of new notes you wish to record ");
int numberOfNotes = input.readInt();
System.out.println("Ready to record " + numberOfNotes + "note(s) ");
for (int i = 0; i < numberOfNotes; i++)
try
System.out.print("Enter a last name: ");
note.setLastNaame(input.readString());
System.out.println("last name input is: " +
is: " + notes.getLastName());
catch (InvalidUserInputException e)
System.out.println("InvalidUserInputException
xception thrown when inputting last name. \n" +
e.getMessage());
try
System.out.println("Enter a telephone
telephone number ");
note.setTelephoneNumber(input.readString()); // 1 error
System.out.println("telephone number input
er input is: " + notes.getTelephoneNumber());
catch (InvalidUserInputException e)
System.out.println("InvalidUserInputException
xception thrown when inputting last name. \n" +
e.getMessage());
try
System.out.println("Enter an e-mail address
l address ");
note.setTelephoneNumber(input.readString()); // 2 error
System.out.println("e-mail address input
ss input is: " + notes.getEmailAddress());
catch (InvalidUserInputException e)
System.out.println("InvalidUserInputException
xception thrown when inputting last name. \n" +
e.getMessage());
=======================================================
=============
import java.util.*;
* A class to maintain an arbitrarily long list of
contacts.
* Notes are numbered for external reference by a human
user.
* In this version, note numbers start at 0.
* @author Stan Dominski
public class ContactBook
// Storage for an arbitrary number of notes.
private ArrayList notes;
* Perform any initialization that is required for
for the
* notebook.
public ContactBook()
notes = new ArrayList();
* Store a new note into the notebook.
* @param note The note to be stored.
public void storeNote(String note)
notes.add(note);
* @return The number of notes currently in the
the notebook.
public int numberOfNotes()
return notes.size();
* Show a note.
* @param noteNumber The number of the note to be
o be shown.
public void showNote(int noteNumber)
if(noteNumber < 0 || noteNumber >
umber > numberOfNotes())
// This is not a valid note number, so do
mber, so do nothing.
else
// This is a valid note number, so we can
, so we can print it.
System.out.println(notes.get(noteNumber));
* Remove a note from the notebook if it exists.
* @param noteNumber The number of the note to be
o be removed.
public void removeNote(int noteNumber)
if(noteNumber < 0 || noteNumber >
mber > numberOfNotes())
System.out.println("noteNumber is not
is not valid.");
else
notes.remove(noteNumber);
* List all the notes in the notebook
public void listNotes()
Iterator i = notes.iterator();
Iterator myIterator = notes.iterator();
while(i.hasNext() && myIterator.hasNext())
System.out.print(notes.indexOf(i.next() )
f(i.next() ) + ":" );
System.out.println("" +
println("" + myIterator.next());
=======================================================
===============
import java.util.*;
public class Note
private ArrayList contactInfo;
private String lastName;
private String telephoneNumber;
private String emailAddress;
public class Note()
contactInfo = new ArrayList();
this.lastName = lastName;
this.telephoneNumber = telephoneNumber;
this.emailAddress = emailAddress;
public void setLastName(String lastName)
this.lastName = lastName;
public String getLastName()
return lastName;
public void setTelephoneNumber(String
neNumber(String telephoneNumber)
this.telephoneNumnber =
telephoneNumnber = telephoneNumber;
public String getTelephoneNumber()
return telephoneNumber;
public void setEmailAddress(String
lAddress(String emailAddress)
this.emailAddress = emailAddress;
public String getEmailAddress()
return emailAddress;
}} // 3 error
=======================================================
==============
import java.io.*;
import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class FormattedInput
public String readString() throws
rows InvalidUserInputException
if(readToken() == tokenizer.TT_WORD || ttype ==
ype == '\"' || ttype == '\'')
return tokenizer.sval;
else
throw new InvalidUserInputException("
eption(" readString() failed. ..... Input data is not
a string");
// Method to read an int value
public int readInt() throws
InvalidUserInputException
if (readToken() != tokenizer.TT_NUMBER)
throw new InvalidUserInputException(" readInt()
nt() failed. " + " input data not numeric");
else
return (int)tokenizer.nval; // value is numeric
eric so return as int
//helper method to read the next token
private int readToken()
try
ttype = tokenizer.nextToken();
return ttype;
catch(IOException e)
e.printStackTrace(System.err);
System.exit(1);
return 0;
//object to tokenize input from the standard
andard input stream
private StreamTokenizer tokenizer = new
= new StreamTokenizer(
new
new
new
new BufferedReader(
new
new
new
new
new
new
new
new InputStreamReader(System.in)));
private int ttype; //stores
stores the token type code
=======================================================
==============
import java.io.StreamTokenizer;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
public class InvalidUserInputException extends
Exception
public InvalidUserInputException() { }
public InvalidUserInputException(String
tring message)
super(message); -
I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.
Cannot see what files ? Music (synced music should appear in the iPod app), films/TV shows (Videos app), documents ... ?
-
Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please
Nope. The iPad (and iPhone and iPod touch) cannot execute Java applets. It's a limitation in iOS from the beginning (just like lack of Flash). You will either need to use a desktop computer or access a desktop computer via RDP or VNC to access that page on iPad.mIn short: there is no native way to use a Java applet on iOS.
-
I am working with beat markers and it was going along fine until suddenly everything went awry. I dropped in a bunch of photos and the last photo assigned itself a time of over 3 minutes. Beat markers are at less than 1 second. I have removed the beat markers for the photos I want to remove, in order to try again. When I try to delete the 3 minute picture the entire project loses its beat markers AND on top of all of that, I can only see the top 1/4 of the pics in the bottom line of the project. I've tried several work arounds and can't fix this. Anyone have suggestions?
'''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
*In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
*In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
If Firefox is not running, you can start Firefox in Safe Mode as follows:
* On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
* On Mac: Hold the '''option''' key while starting Firefox.
* On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
[[Image:Safe Mode Fx 15 - Win]]
'''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
When you figure out what's causing your issues, please let us know. It might help others with the same problem. -
I can't see the Reporting Workspace in Service Manager Console PLEASE HELP
I can't see the Reporting Workspace in Service Manager Console PLEASE HELP
Hello,
If you don't have an entry like "SQL Server Reporting Services (InstanceName)" in Windows Service Manager (Services.msc) then because SSRS service not installed on that machine. Install it, then you will see such an entry.
Olaf Helper
This is not an SQL issue it's a SC Service Manager issue. Reporting Services is installed and running on the SQL side. The problem is that as I am now aware I cannot get the Data Warehouse Server to register in the Service Manager consoles to connect that
with the canned reports and turn on Reporting Workspace. Any thoughts?
[ Blog] [ Xing] [ MVP] -
Help!! Can't see the indicating line while playing in Audition 3.0
Hi all,
It's my first post here.
I now got a problem as the same time I re-installed Windows XP and Audition 3.0 some months ago: I can't see the indicating line (I don't know how to describe it, or moving line?) while playing in Edit View. So I wouldn't know where it play to. Anyone can help? Thanks from nusushika~ XDHi mikromidas, thanks for replying~
Yes, I have and AMD X2 3800+ processor.
Do you mean the AMD X2 optimizer patch? I followed your instruction and everything seems good at this time. Thank you very much. XD -
have a problem choosing artist from my artist list when I will put music on my iPad from my iMac. I can only see the 25 first artis and it is not possible to scroll down the list
Hi stig68,
If you are having grouping issues with compilation albums in iTunes, you may find the following article helpful:
Apple Support: Why aren't songs with the same album art grouped together?
http://support.apple.com/kb/TS1468
Regards,
- Brenden -
My ipod touch 4G got problem after update to iOS 6, it can not access the Apps store ,can not access safari,map, weather and so on, could someone help me to solve the problem, thanks in advance~~~
Force close the App Store app and reset the iPad. No data will be lost when you reset the device.
In order to close apps, you have to drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it.
Next, reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up. -
Quicktime avid codecs problem. can't see the movie!
I'm having a problem playing quicktime movie with format
vid Meridien compressed. I hear the audio but as for the movie,
it's just white. I've dowloaded codecs
and put it inside
Macintosh HD/Library/Quicktime
AND
Macintosh HD/Users/Your Name/Library/Quicktime
however, i still can't see the movie. can someone help me? need to see the movies asap.
macbook pro Mac OS X (10.4.7)
macbook pro Mac OS X (10.4.7)If the video codecs you've downloaded are not "Universal" you'll need to launch QuickTime under Rosetta.
-
I used my jambox with the iPhone4S via bluetooth without problems. Now i changed to the new iPhone 6 and the new phone can not see the jambox. Is that known and what solution is available?
Hey rjdit,
Thanks for the question. After reviewing your post, it sounds like you are having trouble connecting to 3rd party devices. I would recommend that you read these articles, they may be able to help you resolve or isolate the issue.
iOS: Troubleshooting Bluetooth connections
iOS: Third-party Bluetooth accessories
Thanks for using Apple Support Communities.
Have a nice day,
Mario -
Problems with Ipad and Canon printer PIxma Mg6250.
MY Ipad2 (iOS 5.0.1) can't see the printer canon mg6250, connected on wi-fi, seen by my Pc. Someone could help me?You need to update the printer's firmware to 2.0.
Go to http://www.canon.ie/Support/Consumer_Products/products/Fax__Multifunctionals/Ink Jet/PIXMA_MG_series/PIXMA_MG6250.aspx?type=download&page=1
It is really hard to find what you need but it is at canon Ireland. -
hello i downloaded an album on my iPad yesterday but the sound volume is very low. Can someone help me to fix the problem ?
Hello Kishore1022,
It sounds like you have a new album downloaded and the tracks all have a very low volume. I recommend checking to see if Sound Check is enabled in the Music settings.
iPad User Guide
http://help.apple.com/ipad/7/#/iPad99f37037
Go to Settings > Music to set options for Music, including:
Sound Check (to normalize the volume level of your audio content)
You can also try downloading the purchases onto a computer, with either of these articles depending on your version of the operating system:
iTunes 11 for Windows: Download previous purchases from the iTunes Store
http://support.apple.com/kb/PH12491
Or
iTunes 11 for Mac: Download previous purchases from the iTunes Store
http://support.apple.com/kb/PH12283
Thank you for using Apple Support Communities.
Cheers,
Sterling
Thank you for using Apple Support Communities.
All the best,
Sterling -
Spool file problem,Can't see the query in output file.
Hello ,
I am facing a very old school kind of problem .....about spool file ....
The scenario -
I have made a script by name DB_Status_checkup.sql which i want to fire on the database to check the database status. In this script their are many queries regarding the data dictionary views to know about the database. It consist of nearly 25-30 different select queries..
The problem is i want to make a spool file of the output of that query....i want to see the SQL query & the output below in the spool file, so it will be easy for me to judge the result. But i can't see the SQL query , i can only see the output , & in so many queries it all gets jumbled up....even i can't understand where the next output starts ...
Sample of my SQL Script ....
clear buffer
spool D:\DB_status.txt
/*To check the database startup time*/
Select to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup time"
from v$instance
.........next query n so on....
spool off;
In the output pf the spool file at D:\db_status.txt..
Startup time
08:25 16-JUL-10It shows only the output of the query in the spool file not the query,
What should i do to get the SQL query as well as the output of that query just below it in the spool file ???
Please suggest if you have anymore ideas , regarding this .....
ORACLE 10g R2
Windows Server 2008
Thanks in advance ...Why don't you just use database control, instead of re-inventing the wheel?
Apart from that, SQL*Plus has it's own reference manual, which you apparently refuse to read.
The answer to your quiz/doc question is
set echo on
Sybrand Bakker
Senior Oracle DBA
Maybe you are looking for
-
Error in SM58 on r/3 side in idoc to jdbc scenario
Hi Experts, I am sending the idoc from R3 to XI, in r3 side idoc successfully created and status is 03, but when check in sm58 it is complaining about user name and password. but the problem in rfc destination to xi system, when i click on remote log
-
Dear All, One of our client is required a report based on sales people...The requirement is in this way...there is hirachy from Sales Representative...Sales Officer...ASM....RM....GM. for getting sales report... they want it separately...like Sales r
-
Can you run a different user on the managed server than the admin server?
Under unix, can I run a Weblogic 7 managed instance as a different user than the admin server in the same domain? If not, any reference docs on BEAs site?
-
"Check Connection Settings" msg in 6070
I have a Nokia 6070. When I turn the phone on I get a red "STOP" sign and it says "Check Connection Settings". I have checked my settings and all seems to be OK. I can receive e-mails and I can send and receive SMS messages. Does anyone have any idea
-
Reinstall help????
After a bad computer crash...i cant get PS5 installed and i get this message. what do i do? how do i do it? One or more files in the Adobe Application Support folder, necessary for running Photoshop, are missing. Please run the Photoshop installer