Display warning if 2 names are identical
Can someone please help me with this. My array program is below. I need to edit it to make a message display 'This password has been chosen' if to names are identical. I have played around with it and I can get the warning to appear but all the time. The code below makes the warning cycle continuously down the page. If anyone could help I would be very gratefull.
import java.io.*;
public class Arraylist
public static void main(String[] args)
String members[] = {"Fred","Brenda","John"};
System.out.println("full member: "+members[0]);
while (members==members)
System.out.println("this password has been chosen");
I'm going to assume for a moment that this is a serious question and not a troll.
It should be obvious that (members==members) is going to return true always.
At what point are you checking to see if there is a duplicate? Is it only in the original array, or are you adding items later?
In either case, some classes that should help you are:
HashSet (or anything implementing the Set interface)
HashMap (or anything implementing the Map interface)
both are found in java.util.
Hope this helps.
Similar Messages
-
Hello,
Recently I have had started work on a development system that has VS 2012 and SQL Server Data Tools For VS2012. One thing that annoys me is the fact that a source comparison between a checked out package and the version stored in TFS
no longer displays the message 'The files are identical', but instead opens the text editor with 2 panes for both sources as if there were differences, with sliders at the right side that do not show any differences (everything in B&W of course). A simple
message like we had in VS2008 'The files are identical' would suffice to me. On the other hand when you check in the files with VS 2012 and they had not changed then the source control system warns that it did not make any changes since the files
were identical. Why did the VS 2012 team fix something that worked ? Is there some advantage that I am missing?
Jan D'Hondt - Database and .NET developmentI did not see such an option, I asked around, appears nobody knows, but I admit there could be a way.
I still suggest opening an MS Connect so somebody from the development team would respond.
Arthur My Blog -
How can i display warning messages in user exit EXIT_SAPLMGMU_001 (MM02)
Hi all,
while modifying the material master using MM02, i have added new conditions to display messages in user exit EXIT_SPALMGMU_001.
But using this user exit i am not able to display warning messages.
Can you please help me with this?
Sample code which i have included in exit :
SELECT SINGLE mstav FROM mara
INTO w_mstav
WHERE matnr = wmara-matnr.
IF wmara-mstav NE w_mstav.
IF wmara-mstdv NE sy-datum.
wmara-mstdv = sy-datum.
MESSAGE w177(z03_mm) WITH text-s04 text-s21.
ENDIF.
ENDIF.
Thank you all in advance.As written in the SAP documentation of the Enhancement , you can only raise error message using a
MESSAGE .. RAISING APPLICATION_ERROR.
You could manage the "warning" yourself, sending an error first time and keeping a trace of the check in some STATICS variable, and not raising the error again if data input remains unchanged between two call of the include.
<i>----
EXIT_SAPLMGMU_001
Where Is the Customer Exit - EXIT_SAPLMGMU_001 called?
The customer exit is in function module MATERIAL_UPDATE_ALL. The
function module checks the data for errors (logical relationships,
foreign keys, fixed domain values, and so on) when the material master
is updated.
Use
o New fields
You can make checks possible for new fields of your own. These
checks must be identical to the checks that you carry out for your
new fields in online maintenance.
o Existing fields
For existing fields, you can extend and intensify the checks.
You can also change data for descriptions and general material data
(MARA). For example, the descriptions can be generated from attributes
of the material.
Limitations
You cannot bypass existing checks.
Interface to Application
The respective data of the current logical transaction is contained in
the structures, for example, in structure WMARA for MARA. Nonrelevant
structures are transferred with their initial values.
General material data that can be changed (CMARA) has the structure
MARU. This MARA view contains fewer internal fields than MARA itself. If
WMARA is filled, CMARA is also filled when accessed.
The customer exit contains the exception APPLICATION_ERROR for your
self-defined error situations.
Using the language element MESSAGE .. RAISING APPLICATION_ERROR, you can
terminate the current (logical) transaction and display your message in
the log. </i>
Regards -
Data being Displayed while the Account Name not getting Displayed in FR
Hi,
We are facing a strange issue when is user is trying to run a Hyperion Financial report. The data and Entity Name is being displayed whereas the Account name is not being displayed for a particular entity. The user has access to the Entity and accounts. Any Clues ??
Thanks,
Addy
Edited by: Addy on Jan 11, 2011 5:15 PMThe first thing that pops to my mind is does the format of the cell have Replace checkbox checked with a blank description. thus any results coming back will display as blank.
Also the customized header is check and it is showing blank.
A quick test if you have Smart View is can the user access the same data? if yes then the report has a filter of some sort, if the user cannot access the data in smart view, there is a security problem perhaps with the data
JTS -
some of my contact names are not appearing when they text message me. They are just showing up as their numbers. I have them saved in my phone so i am not really sure why their names aren't showing up when they message me?
I have this identical problem. For a while my group texts didnt show up on my ipad. Then one day they did, maybe everyone in the group started using the same os version or something. Ever since my first reply to the group there have been complaints of multiple threads. I can not find a pattern for when my group text's decide they want to create a new thread. (it doesnt happen every time) Everyone in the group has deleted the thread, we've all toggled imessage on/off etc. There still hasn't been a solution.
Any help would be appreciated.
Thanks -
Customize display of category group names in item regions (902)
Multi-level categorization is inconsistent within different portal contexts. Flat category structures work fine but sub-categories do not.
For example let's define a set of categories: foo, foo/bar, test, test/foo, abc, abc/bar
where bar is a sub-category of foo and so forth.
The additem wizard shows the category in the form: category/sub-category/sub-sub-category/etc which is the preferred approach.
However, an item region having Group By Category and "Display Group By Banner" checked is not the same. Here the group-by-text only shows the end-category name (not the full category/sub-category); i.e., only shows the last group "category" without the context of the full category.
Want to show items in following style:
foo
item1
foo/bar
item2
test/foo
item3
abc/bar
item4
As opposed to:
foo
item1
bar
item2
foo
item3
bar
item4
Likewise, in the Advanced search the list of categories to search for are:
foo
.bar
test
.foo
abc
.bar
What are some best practices to customize the display of custom items with sub-categories showing the full category/sub-category in 9iAS 9.0.2?
Explicitly creating a flat category structure with '/' in the names doesn't seem the best use of item categories.
And it looks like the content area SDK won't be available for a little while.Hi Jason
The only way to show the path of your nested categories in the display banner is to name the subcatgory with the path information (i.e. 'test/foo' not 'foo'). The problem with showing the full path is scalability - rendering a deeply nested tree in the display banner or as an attribute would cause real problems. It was a design decision to go with the way that it is. If you feel strongly that Development should reconsider this decision, please feel free to log an enhancement request at:
http://ers.oracle.com
Product: Portal
Component: Portal UI -
As mentioned in link http://download.oracle.com/javase/6/docs/technotes/guides/jweb/mixed_code.html For applications and applets that are designed to allow unsigned components, the Trusted-Library attribute should be used. No warning dialog will be displayed and an application or applet may load jar files containing untrusted classes or resources.
But with the the latest jre 1.7 u45 we are getting security warning prompts. It is recommednded that newer Caller-Allowable-Codebase attribute should be used to handle the warning prompt. However, if I used newer one it will break the in updated 40 , and if I am using both display prompt will continue to come in jre 1.7 u45
Is there any solution to above problem? How can we support backward compatibility? In what sequence can we use the attribute such that both jre 1.7 u40 and 45 should stop display warning message?Thank you for the quick reply.
However, I don't get the point. Do you say, a trusted library cannot call an untrusted (= unsigned) library other than by reflection?
Then how do I use the unsigned library from my applet? The problem is mixed code (= signed and unsigned jars), there should be a way to use the unsigned jars of 3rd party contributions. For example, I would have an applet and would like to create a PDF using itext. The itext jar is unsigned, how can I use it? The same is true for the apache libraries like commons etc.
From http://download.oracle.com/javase/6/docs/technotes/guides/jweb/mixed_code.html, I understood, that the applet jar (= the jar, that contains the class inheriting from Applet and referred to in the "code" attribute of the applet tag), should be signed and have a manifest with attribute "Trusted-Library: true" set. Then it could use classes from unsigned jars. There may be some difficulties when using reflection (Class.forName, Resource.getBundle etc.), but in general it could use the untrusted libraries without change. The explanation of the new classloader hierarchy in that document did not match (the unsigned jars have been described there as being loaded by the applet classloader, which would be the child of the new trusted library class loader. So the classes of the trusted library would not see the untrusted classes as to my understanding) but the rest of the description pointed to that.
Did I understand this incorrectly? Then how can I use the unsigned libraries? What I need is a simple, but complete example that is working, including the applet tag, two jars, one unsigned and one signed and the code of the source and the manifests of these jars. Can you scetch such an example or do you know of some?
Anyway, thank you again for the response.
Edited by: 883189 on Sep 5, 2011 2:17 AM -
Iphone 4s - how do I change the name in the contacts for the owner of the phone - it is coming up as the other person who uses the laptop - so when ringing or texting anyone 2 names are being used as the caller id on the screen
*Ralph Johns* writes:
"Your options are:
Get a trial account form @mac which will work as an iChat name after the 60 days run out but not be a email account that is valid (And is free)"
Do you mean a trial account from .Mac? (DotMac)
"Get an AIM Screen name and set it to Display what you want as you set it up.
The Screen name can be whatever yu want but you can also set it to display something else as well."
I had thought about this, but it seems other people have already chosen the screen name "pinksharkmark" and virtually every variation of it I can think of. So that isn't an option for me. As for getting it to display something else as well, do you mean that if I were to get an AIM screen name like "CromulentCat" I could somehow log in to iChat under the AIM account "CromulentCat" yet get iChat to represent me to my Buddies as "PinkSharkMark"? Because I have to admit I don't see how that can be done. It appears as if iChat displays to anyone chatting with you precisely the account name you logged in under and nothing else. So if you logged in using a .Mac account, then you are displayed as "[email protected]" while if you logged in under an AIM account, you are displayed as "CromulentCat". But that's it that's all... there is no way to change CromulentCat to PinkSharkMark.
Thanks very much for taking the time to reply, though. -
Email names are appearing incorrectly in my mail
Email names are appearing incorrectly in my mail inbox.
The from names are incorrect or missing the full name, some from names have commas around them when others don't, some are coming through with 'test' in the subject line on my phone but if I view on my computer, 'test' is not showing..
I work in email marketing so this is extrmely important that the correct from names are displaying and certain text i.e 'test' are not showing on a live email sent to customers...This seems to be a problem with Yahoo! that started within the past few days. I am assuming that you are accessing your Yahoo! Mail through Safari. Until a fix is issued, you have two options -- (1) use the Mail app included in iOS, logging in with your Yahoo! account information or (2) when in Yahoo! Mail in Safari, click on your profile name/pic in the bottom left corner, choose Options, and then choose the last option, which displays your e-mail using the older classic version of Yahoo! Mail. It's not as pretty or easy to manuever around, but at least it shows the images in your e-mails, which is the most important thing. Both Apple and Yahoo! have been contacted about this issue, so hopefully a fix will be released soon.
-
Followup to Displaying Topic HTML File Name
A week ago I posted a question about whether it is possible to display the topic file name in the Web Address field.
Rick responded that it was not possible, but gave me a good alternative with a Javascript that displays the file path in the RH topic.
The only problem is that you have to go to each topic, add the Javascript and the file path information.
Is it possible to automate this process? Is there a way to have the Javascript automatically update the displayed topic location?
Thanks,
ChaimHi there
Nearly overlooked this one after the long holiday weekend!
See if the link below helps any.
Click here to review a script that may help
Note that I'm not suggesting it be used "as is". What I'm suggestng is that you could pick apart the techniques to accomplish what you are wanting to accomplish. In other words, you probably have some homework to do.
Cheers... Rick
Begin learning RoboHelp HTML 7 within the day - $24.95!
Click here for Adobe Certified Captivate and RoboHelp HTML Training
Click here for the SorcerStone Blog
Click here for RoboHelp and Captivate eBooks -
CATA Sender and receiver are identical
Hi expert, I have a problem during the transaction CATA.
My situation is the follow: I insert a record in CAT2 where I have the same object in both the sender and the receiver field (Cost Center). When i save, the system show a Warning message BK015 --> "Sender and receiver are identical; change one or the other"
After, during the trnsfert in transaction CATA, i have the same message (warning) and an error message BK202 "Document contains errors". In this way i can't complete the transfert to Controlling?
Is there any solution? Or is a system control?
Plese help me.
Thanks
DavidHi David,
please set the option "ignore warnings" either at:
Transaction CATA:
Transaction CAT7:
BR,
Roland -
Display custom hosts attributes in Internal Identity Store
Any one know how to Display custom attributes to the Internal Identity Store
I have created several attributes, but can't seem to find anyway to add them to the display window.
CheersThey are displayed by default and there's no actual way to hide them.
Are you sure that you didn't create a customer HOST attribute and are looking in the internal user table or vice-versa ? Host and users have different custom attributes page. That's the only explanation I See -
New JCo names are not listing in WB Content Administrator
Dear Friends,
I have deployed my WebDynpro application on a landscape where the production system got 4 server services running.
Initially the WD application was using the existing JCo connections. But on the latest deploy I have to use new JCo connections and I made changes.
Problem is, these new JCo connection names are not appearing in WebDynpro Content Administrator and still it displays old JCo connections.
This problem exists with global WD Content Admin. URL as well as with individual server url, except in one server instance where JCos yet to be created.
But when I execute the application with global URL, it is working fine.
Intent is to create and use my new JCo connections for the application which are not listing in WB Content Admin.
Is it require to restart the server services?
Is it possible to solve this problem without restarting the services?
Is there any other way to resolve this problem?
Thanks in advance.
LakshmikanthaSorry I can't approach to restart the j2ee service at this movement.
And the application got new JCo name at it's JCO refrences.
Infact the application is working fine with new JCos on development and quality systems.
Problem exists only on production system where it got 4 server instances.
Any hope without restarting services? -
My iphone 4 music player doesn't display the arabic songs names ?
My iphone 4 music player doesn't display the ARABIC songs names ?
ok i found the solution here by deleting the corrupted library
http://portablevideo.blogspot.com/2008/12/music-player-database-problems.html
now one of these below is for the music and one for the photos and i didnt have a problem with the photos but did it anyways and now the player can see my music:
these are the files that need deleting in order to get rid of the corrupted library.
Storage Drives: (Mass storage E, Memory Card F)
\private\101ffca9\harvesterdbvx_x.dat
\private\10281e17\[string]mpxvx_x.db
\private\10281e17\[string]pcvx_x.db
TIP: Connect the device in USB mass storage mode (File Transfer), to locate the private folder from the PC.
TIP: STRING and x_x will change depending on your phone. (my files had slightly different names than above on the n97) -
Problem while displaying all the table names from a MS Access Data Source.
I started preparing a small Database application. I want to display all the Table Names which are in the 'MS Access' Data Source.
I started to executing by "Select * from Tab" as if in SQL.
But i got an error saying that "Not able to resolve Symbol 'Tab' in the query".
Please let me know how can i display all the table Names in the MS Access Dats Source.Here i am developing the application in Swing using JDBC for accessing the database.
I want to display all the Table names from the data source in a ListBox for easy selection of tables to view their details.
Maybe you are looking for
-
NWDI for the 04s preview fails with 'SLD name-server configuration error'
After the installation, everything seems to work fine except that when I go to CMS, the links on the top seems to be hardcoded to point to http://pwdf3102:50100/dtr, even in the Domain Data. When I tried to change it to my local server, it keeps comp
-
Revision: 5465 Author: [email protected] Date: 2009-03-20 11:52:56 -0700 (Fri, 20 Mar 2009) Log Message: Now that padding set on a TextInput does not affect the inner textView, we need to add a custom TextInput skin for the TextInput a Spark NumericS
-
Two computer sync with iOS4 broken
Until iOS4, I'd sync my 3rd Gen Touch to my home Mac for everything except calendars. Then I'd let it sync to my work XP laptop for only the outlook calendar. Everything was happy and everything happened automatically. Now, when I connect it to the l
-
SNMP Walk don't get IfName of Lots of Interfaces
Hello dear Specialists, I am facing a problem with a ASR9010 with IOS XR 4.2.3 that is preventing me from monitoring major of the Ethernet Interfaces with SNMP Walk. Though the router posseses IfMIB iso.3.6.1.2.1.2.2.1.2 and have created the correspo
-
SQLException: Network Adapter couldn't establish connection
Hello I have done a web java application and I am trying to connect to an Oracle DB. From java server I can do a telnet to the db Server for the 1521 port (the port of the DB) but when I try to connect from the java aplication I obtain the SQLExcepti