Why use "\n" in the following script?
Why use *"\n"* in the following script?
Thank you
public String toString()
return getStreet1() + "\n" +
getStreet2() + "\n" +
getCity() + ", " + getState() + " " + getZip() + "\n" +
getCountry();
}
qkc wrote:
Why use *"\n"* in the following script?
Thank you
public String toString()
return getStreet1() + "\n" +
getStreet2() + "\n" +
getCity() + ", " + getState() + " " + getZip() + "\n" +
getCountry();
Maybe because that's how US addresses are formatted?
BR,
Robert
Similar Messages
-
Why use symbol { } in the following script?
Why use symbol *{ }* in the following script?
<read-write-backing-map-scheme>
<scheme-name>SampleDatabaseScheme</scheme-name>
<internal-cache-scheme>
<local-scheme>
<scheme-ref>SampleMemoryScheme</scheme-ref>
</local-scheme>
</internal-cache-scheme>
<cachestore-scheme>
<class-scheme>
<class-name>com.tangosol.examples.coherence.DBCacheStore</class-name>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
*<param-value>{cache-name}</param-value>*
</init-param>
</init-params>
</class-scheme>
</cachestore-scheme>
</read-write-backing-map-scheme>
Thank you very much
Edited by: jetq on Jun 24, 2009 6:26 PMHi Frank,
In the example, the "{cache-name}" is supposed to be replaced by the database's table or view name that will be queried for the data to be cached. It's purpose is demonstrate how to pass parameters to the class constructor.
Regards,
Harv -
Why use *31L in the following code?
Why use *31L in the following code?
* {@inheritDoc}
public int hashCode()
return (int) ((long) getAreaCode() * 31L + getLocalNumber());
public class PhoneNumber
implements PortableObject
// ----- constructors ---------------------------------------------------
* Default constructor (necessary for PortableObject implementation).
public PhoneNumber()
* Construct a Phone.
* @param nAccessCode the numbers used to access international or
* non-local calls
* @param nCountryCode the numbers used to designate a country
* @param nAreaCode the numbers used to indicate a geographical region
* @param lLocalNumber the local numbers
public PhoneNumber(short nAccessCode, short nCountryCode,
short nAreaCode, long lLocalNumber)
m_nAccessCode = nAccessCode;
m_nCountryCode = nCountryCode;
m_nAreaCode = nAreaCode;
m_lLocalNumber = lLocalNumber;
// ----- accessors ------------------------------------------------------
* Return the access code.
* @return the access code
public short getAccessCode()
return m_nAccessCode;
* Set the numbers used to access international or non-local calls.
* @param nAccessCode the access code numbers
public void setAccessCode(short nAccessCode)
m_nAccessCode = nAccessCode;
* Return the country code.
* @return the country code
public short getCountryCode()
return m_nCountryCode;
* Set the country code.
* @param nCountryCode the country code
public void setCountryCode(short nCountryCode)
m_nCountryCode = nCountryCode;
* Return the area code.
* @return the area code
public short getAreaCode()
return m_nAreaCode;
* Set the numbers used indicate a geographic area within a country.
* @param nAreaCode the area code
public void setAreaCode(short nAreaCode)
m_nAreaCode = nAreaCode;
* Return the local or subscriber number.
* @return the local or subscriber number
public long getLocalNumber()
return m_lLocalNumber;
* Set the local or subscriber number.
* @param lLocalNumbeer the local or subscriber number
public void setLocalNumber(long lLocalNumbeer)
m_lLocalNumber = lLocalNumbeer;
// ----- PortableObject interface ---------------------------------------
* {@inheritDoc}
public void readExternal(PofReader reader)
throws IOException
m_nAccessCode = reader.readShort(ACCESS_CODE);
m_nCountryCode = reader.readShort(COUNTRY_CODE);
m_nAreaCode = reader.readShort(AREA_CODE);
m_lLocalNumber = reader.readLong(LOCAL_NUMBER);
* {@inheritDoc}
public void writeExternal(PofWriter writer)
throws IOException
writer.writeShort(ACCESS_CODE, m_nAccessCode);
writer.writeShort(COUNTRY_CODE, m_nCountryCode);
writer.writeShort(AREA_CODE, m_nAreaCode);
writer.writeLong(LOCAL_NUMBER, m_lLocalNumber);
// ----- Object methods -------------------------------------------------
* {@inheritDoc}
public boolean equals(Object oThat)
if (this == oThat)
return true;
if (oThat == null)
return false;
PhoneNumber that = (PhoneNumber) oThat;
return getAccessCode() == that.getAccessCode() &&
getCountryCode() == that.getCountryCode() &&
getAreaCode() == that.getAreaCode() &&
getLocalNumber() == that.getLocalNumber();
* {@inheritDoc}
public int hashCode()
return (int) ((long) getAreaCode() * 31L + getLocalNumber());
* {@inheritDoc}
public String toString()
return "+" + getAccessCode() + " " + getCountryCode() + " "
+ getAreaCode() + " " + getLocalNumber();
...31 is a nice prime number that is used here to decrease hash collisions
thanks,
-Rob -
why do i get the following message when i attempt to open my backup file for lightroom cc? "Lightroom cannot use the catalog named "Lightroom Catalog" because it is not writable and cannot be opened". This message just started coming up after downloading lightroom cc (previously using lightroom 5)...am i backing up properly or not???
Open Pictures folder and move the files named lrcat-journal and lrcat.lock to Desktop.
Make sure that , they are not inside Pictures folder any more and try to open backup from Lighrtroom and check..
Any LRcat file with .lock extension , move it to Desktop. -
Why do I get the following message when I open an APP. Connect to ITUNES to use push notifications. What do I need to do to resolve this issue.
I have had the same problem since the iOS 7 update, but with regards to the Find Friends app. uninstalling and reinstalling the app has not fixed the problem
-
why do I receive the following message when I try to sync my itouch, "this ipod cannot be used because apple mobile device is not started?
See Here
AMDS for Windows
http://support.apple.com/kb/TS1567 -
What do the symbol and stand for in the following script? not like displa
What do the symbol *>* and *>>* stand for in the following script? It is displacement? They do not like displacement symbols.
$JAVA_HOME/bin/java -cp $CLASSPATH $JVM_OPT $SYS_OPT
oracle.sysman.integration.coherence.EMIntegrationServer *>* $COHERENCE_
HOME/mgmtnode.log *>>* $COHERENCE_HOME/mgmtnode.err &
Thank youjverd wrote:
BigDaddyLoveHandles wrote:
But the example, if it's correct, seems to be using >> to redirect stderr, not to append stdout. The OP should identify what OS and what shell they are using.In any unix shell I'm aware of, > is overwrite and >> is append.Which is why he said "seems to be using >> to redirect stderr". Which I read to mean that BDLH also found it to be incorrect but some "corner-product" shell may do this sort of thing (not that I know, or have heard, of any that do). ;-)
In a bourne family shell, the initial construct would cause stdout to replace the log file and append the err file, and would not redirect stderr.
If you want to send stdout to one file and stderr to another, with overwrite, it'd be
command > logfile 2> errfile
Correct, of course. ;-)
And, of course, changing either of those ">" symbols to ">>" would append (that stream), but you've already said that. ;-) -
What are the following script doing?
What are the following script doing? What does symbol *<* stand for?
protected Map<Member, List<String>> divideWork(Set members, List<String>
fileNames)
Thank yousu_penguin wrote:
Side note: http://en.wikipedia.org/wiki/Operator_overloading
Extra credit: What trick does Java's syntax use to allow Generics to compile with or without whitespace between the angle brackets? Ex: Map< Member, List< String > >
Why doesn't it work in C++?Does this have something to do with the comment "Note that it is not an LL(1) grammar"? [http://java.sun.com/docs/books/jls/third_edition/html/syntax.html] -
Why am I getting the following error message? "You can’t open the application “Microsoft Word” because PowerPC applications are no longer supported." I never used to have a proble!
Only Office for Mac 2008 and 2011 will run on Mavericks. Microsoft support for the former package ended in April 2013. If you do not want to spend the money, you might download and try the donation-ware (free) LibreOffice Suite. No ribbon bar crap. Supports about any document created on Windows.
-
What is the num_buckets and density in the following script?
What is the num_buckets and density in the following script?
I search the Oracle Doscs and find the descriptions, but I don't think it states clearly. Could you clarify it for me?
DENSITY : NUMBER Density of the column
NUM_BUCKETS : NUMBER Number of buckets in histogram for the column
SQL> SELECT column_name, num_distinct, num_buckets, density, histogram
2 FROM USER_TAB_COL_STATISTICS
3 WHERE table_name = 'JOBS' AND COLUMN_NAME='MAX_SALARY';
COLUMN_NAME NUM_DISTINCT NUM_BUCKETS DENSITY HISTOGRAM
MAX_SALARY 13 1 .076923077 NONEUnwilling or incapable using GOOGLE
http://www.oracle-developer.com/oracle11g_multi_column_statistics.html
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_2092.htm#i1590494 -
How do I add a txt file to read from in the following script
First thanks for the help, PS newbie.
I need to add a txt file that has the Exchange aliases listed to the below file. So if the .txt file is sitting in c:\temp\readme.txt how do I incorporate into the following script. Given, I only want the outcome to read from only the txt file.
$mailboxes = Get-Mailbox -RecipientTypeDetails UserMailbox
ForEach ($mailbox in $mailboxes) {
$FilePath = "\\server\folder\" + $mailbox.PrimarySmtpAddress.Local + "@" + $mailbox.PrimarySmtpAddress.Domain + ".pst"
New-MailboxExportRequest -mailbox $mailbox -FilePath $FilePath
Thank you for your time.
ChrisThank you -
You're welcome.
I need to make sure that when the user from the list is exported to .pst it is named with their primary smtp address? Will the above code do so?
No, it won't. This adjustment will take that into account:
$aliasList = Get-Content .\aliasList.txt
foreach ($alias in $aliasList) {
$mbx = Get-Mailbox $alias
$filePath = "\\server\folder\$($mbx.PrimarySmtpAddress).pst"
New-MailboxExportRequest -Mailbox $alias -FilePath $filePath -WhatIf
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing) -
Hello, Why am I getting the following message after I start up my computer: "CAHeadless has encountered an error. [/Adobe/premiere/elements/Release/12/ALL_LANG_12.1/CAHeadless/Make/Mac/../../Src/CAHeadle ss.cpp-683]." Anyone, please solve this for me? Thank you very much!
Hello, Why am I getting the following message after I start up my computer: "CAHeadless has encountered an error. [/Adobe/premiere/elements/Release/12/ALL_LANG_12.1/CAHeadless/Make/Mac/../../Src/CAHeadle ss.cpp-683]." Anyone, please solve this for me? Thank you very much!
-
What do symbol ^ and stand for in the following script?
What do symbol *^* and *>>>* stand for in the following script?
Does *(int)* means that (temp ^ (temp >>> 32) return the int format?
long temp = Double.doubleToLongBits(salary);
result = PRIME * result + (int) (temp ^ (temp >>> 32));
return result;
Thank you very muchjetq wrote:
What do symbol *^* and *>>>* stand for in the following script?In Java, this is referred to as "code", script could be confused with Javascript, which is not Java at all.
The previous reply will help you find all you need to know.
Does *(int)* means that (temp ^ (temp >>> 32) return the int format?"format" refers to how a value is converted to text. (Sometimes how it is to be parsed as well)
"(int)" casts the long value to an int value (signed 32-bit)
long temp = Double.doubleToLongBits(salary);
result = PRIME * result + (int) (temp ^ (temp >>> 32));This will treat -0.0 as being different to 0.0. If this is undesirable, you can do something like...
long temp = aDouble != +0.0d ? Double.doubleToLongBits(aDouble) : 0L;
result = PRIME * result + (int) (temp ^ (temp >>> 32)); -
My bookmarks suddenly are not accessible. Each time I try to use a bookmark, the following message comes up on the error page: The requested URL /exec/obidos/subst/home/home.html/103-3592028-6560639 was not found on this server. The page error is identified as "ERROR 404" I tried a clean install of the latest version; no luck. looked at plug-ins & add-ons; no luck
== User Agent ==
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)Hi Mac Attack,
My computer will not disconnect from the internet. It seems to find a clone router and continues even when I shut down and unplug my my own home iy
Your main question was 'chopped' in the title. Please reply in the body of a reply box with the full question and anything you have tried. And no, the long report was not helpful .
If the same website is opening each time you launch a browser (Safari?) hold down the shift key as you launch to prevent previous pages from opening.
Have a look at your settings in Safari > Preferences. Especially General and Privacy.
Reset Safari to remove cookies and other stored data.
System Preferences > General
Have a look at your settings in System Preferences > Security & Privacy.
Call back with more questions.
Regards,
Ian -
What do Size=1 and BitSetCount=2 mean in the following script?
MasterMemberSet
ThisMember=Member(Id=1, Timestamp=2007-05-23 10:48:17.0, Address=192.168.0.204:8088, MachineId=26828)
OldestMember=Member(Id=1, Timestamp=2007-05-23 10:48:17.0, Address=192.168.0.204:8088, MachineId=26828)
ActualMemberSet=MemberSet(Size=1, BitSetCount=2
Member(Id=1, Timestamp=2007-05-23 10:48:17.0, Address=192.168.0.204:8088, MachineId=26828)
Thank you very muchHello,
That is part of very low level diagnostics message.
The size is is how many members in that set.
The BitSetCount=2 means that 2 32b integers were required to represent the memberset on the wire.
Best regards,
-Dave
Maybe you are looking for
-
Missing something on JAR creation.
This must be a simple error I'm commiting but it has me stuck on the distribution of my application. Even though my app works perfectly on prompt I don't seem to be getting the right works for making the jar file for it. My class files are distribute
-
Hi all,I have a BPEL process which calls a Webservice,and at the end it transforms the output of the Webservice to the Output Variable in my BPEL process,but the thing is this process retuns elements with xsi:nil="true" and I get an error which says
-
Control's label/caption passed from calling vi
I would like a way to pass the control name and data to a subvi so the subvi control names are overwritten. I want the subvi to take each name from the calling program and make a text header using the calling names (not the subvi control names). The
-
Movie freezes on my new iWeb site
Just tried to publish my movie (1G) (new user) to my new iWeb site (new user)... It takes forever to load (is the file too big?) and then when finally loaded it freezes with ever other photo or so and will not play smoothly. It's been frustrating and
-
I am located in India . I want to purchase a power adaptor for my laptop HP Pavillion DV6226Us ....I need to know the exact specification , so that it will be useful to specify the requirement while buying it . I dont want , what is suitable for my l