📄 misc.html
字号:
<DL>
<DD>makeshift system beep if awt.Toolkit.beep is not available. Works also in JDK 1.02.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="loadProperties(java.io.InputStream)"><!-- --></A><H3>
loadProperties</H3>
<PRE>
public static java.lang.String[][] <B>loadProperties</B>(java.io.InputStream fis)
throws java.io.IOException</PRE>
<DL>
<DD>Load a properties file, but not into a Property hashTable, into an array that does not disturb property order. Returns array of string pairs. Closes the given inputstream. Property file might look like something like this: # com.mindprod.inwords.InWords.properties must live in inwords.jar. # Describes languages supported to translate numbers to words. # Fully qualified classname, (without .class)=name on menu (embedded blanks ok) # Everything is case sensitive. com.mindprod.inwords.Indonesian=Bahahasa Indonesia com.mindprod.inwords.BritishEnglish=British com.mindprod.inwords.Dutch=Dutch com.mindprod.inwords.Esperanto=Esperanto com.mindprod.inwords.AmericanEnglish=North American Vector com.mindprod.inwords.Norwegian=Norwegian com.mindprod.inwords.Swedish=Swedish #-30-
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fis</CODE> - InputStream from which the properties can be read.
<DT><B>Returns:</B><DD>a matrix of properties, keyword one column and value in the other.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="signum(long)"><!-- --></A><H3>
signum</H3>
<PRE>
public static final int <B>signum</B>(long diff)</PRE>
<DL>
<DD>alternate to signum for use in compare. Not a true signum, since it returns ints other than +-1. Where there is any possibility of overflow, you should compare two longs with < rather than subtraction. In Pentium assembler you could implement this algorthm with following code: <p/> <pre> diff = edx:eax result = eax mov ebx,eax shl eax,1 or eax,ebx slr eax,1 or eax,edx <p/> which would take 5 cycles, 2 more that lohi. However, JET did even better, with code essentially this using a clever trick to implement piotr. <p/> lea ecx,0(eax,eax) ; shifts lo left by doubling, keeps copy of lo or eax,ecx shr eax,1 or eax,edx This is 4 cycles, still one more than lohi. Why was Piotr so much faster on JET? Piotr has no pipeline-confounding jumps. Further, the lo then high operands actually come from the ram-based stack. Piotr nicely separates the accesses giving plenty of for pre-emptive fetch of hi. lohi insists on having them both upfront, so it has to wait for memory access. Piotr does not have to wait. Modern CPUS hurry up and wait for RAM most of the time. </pre>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>diff</CODE> - number to be collapsed to an int preserving sign and zeroness. usually represents the difference of two long.
<DT><B>Returns:</B><DD>sign of diff, some -ve int, 0 or some -ve int.</DL>
</DD>
</DL>
<HR>
<A NAME="signum(double)"><!-- --></A><H3>
signum</H3>
<PRE>
public static int <B>signum</B>(double diff)</PRE>
<DL>
<DD>Collapse magnitude down to +1, 0 or -1 .
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>diff</CODE> - number to test.
<DT><B>Returns:</B><DD>positive => +1; 0 => 0; negative => -1.</DL>
</DD>
</DL>
<HR>
<A NAME="signum(float)"><!-- --></A><H3>
signum</H3>
<PRE>
public static int <B>signum</B>(float diff)</PRE>
<DL>
<DD>Collapse magnitude down to +1, 0 or -1 .
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>diff</CODE> - number to test.
<DT><B>Returns:</B><DD>positive => +1; 0 => 0; negative => -1.</DL>
</DD>
</DL>
<HR>
<A NAME="thisDayOfMonth()"><!-- --></A><H3>
thisDayOfMonth</H3>
<PRE>
public static int <B>thisDayOfMonth</B>()</PRE>
<DL>
<DD>Get this day e.g. 1=1st of moth using default timezone
<P>
<DD><DL>
<DT><B>Returns:</B><DD>dd 1=first day of month.</DL>
</DD>
</DL>
<HR>
<A NAME="thisMonth()"><!-- --></A><H3>
thisMonth</H3>
<PRE>
public static int <B>thisMonth</B>()</PRE>
<DL>
<DD>Get this month e.g. 1=January using default timezone
<P>
<DD><DL>
<DT><B>Returns:</B><DD>mm 1=Jan</DL>
</DD>
</DL>
<HR>
<A NAME="thisYear()"><!-- --></A><H3>
thisYear</H3>
<PRE>
public static int <B>thisYear</B>()</PRE>
<DL>
<DD>Get this year e.g. 2008 using default timezone
<P>
<DD><DL>
<DT><B>Returns:</B><DD>yyyy</DL>
</DD>
</DL>
<HR>
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
main</H3>
<PRE>
public static void <B>main</B>(java.lang.String[] args)</PRE>
<DL>
<DD>Debug harness
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>args</CODE> - </DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/mindprod/common11/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Misc.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../com/mindprod/common11/Limiter.html" title="class in com.mindprod.common11"><B>PREV CLASS</B></A>
<A HREF="../../../com/mindprod/common11/ResizingImageViewer.html" title="class in com.mindprod.common11"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/mindprod/common11/Misc.html" target="_top"><B>FRAMES</B></A>
<A HREF="Misc.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -