(Math.Round (DE)); + //Keep 2 digits after the decimal point -System.out.println (Math.Round (de*100)/100.0); $ //number after the decimal point has been shed $ //Lower Value: The largest integer less than or equal to it - System.out.println (Math.floor (DE)); - //Upper Value: The smallest integer greater than or equal to it the DoubleDe1 = 1234.06; - System.out.println (Math.ceil (DE1));Wuyi //between random numbers 0-1 the System.out.println (Ma
needs to be dealt with.The following shows the treated UUID and encapsulates it. Provides a public method for external use.Package cc.ccoder.mail.utils;Import Java.util.UUID;/** * * @ Author: Chencong * @ project: Mail--cc.ccoder.mail.utils * @ time: June 7, 2017 pm 7:05:14 * @TODO: Generate random string of tool class UUID */public class uuidutils {public static String getuuid () {return Uuid.randomuuid (
Tags: out drive throws try row Tcl close res logThe code is as follows: Importjava.io.FileNotFoundException;Importjava.io.IOException;Importjava.sql.Connection;Importjava.sql.SQLException;Importjava.util.Properties; ImportOrg.apache.commons.dbcp.BasicDataSource; Public classDbutil {Private StaticBasicdatasource ds; Static{Properties prop=NewProperties (); Try{prop.load (dbutil).class. getClassLoader (). getResourceAsStream ("config.properties"));//th
;http://apps.renren.com/ceodreamHttp://apps.facebook.com/ceodream
Ghostcat is a Feature-rich the open source tools for libraries, (which also contains a complete set of UI components, but it I s only a class library derivatives.)It basically can cover most of the problems your may encounter.Using the UI would increase the size of 50K or so, with the use of Non-ui display object would increase more than 20K
JAVA string to date or date to string
In the project development process, we need to implement the date format of the string and date to each other, and the date of the addition and subtraction operation.
The Demo is as follows:Package weiming.lmapp.utils; Import Java.text.parseexception;import Java.text.simpledateformat;import java.util.Date; public class Dateconvert {/*** date converted to String * @param date * @return str*/public st
+ "% '";} else if (Columnname.equals (P K_column_opportunityid) {query = "Select Opportunityid from crm_opportunity where topic like '%" + queryvalue + "% '";} el Se if (columnname.equals (Pk_column_quotationid)) {query = "Select Quotationid from crm_quotation where name like '%" + que Ryvalue + "% '";} else if (columnname.equals (Pk_column_contractid)) {query = "Select Contractid from crm_contract where name like '%" + quer Yvalue + "% '";} else if (columnname.equals (Pk_column_activityid)) {q
Public classStrutils { Public Static FinalString utf_8 = "UTF-8"; /*** Remove the useless 0 after the decimal string*/ Public Staticstring Replacethetailzero (String value) {if(Stringutils.isempty (value)) {returnvalue; } if(Value.indexof (".") > 0) {Value=value.replaceall ("0+?$", "" ");//remove the useless 0 behindValue =value.replaceall ("[.] $", "");//the decimal point is removed if all zeros are followed by a decimal point } returnvalue; } /*** UTF-8
Determine if the phone number and phone numberpackagecom.rk.utils;importjava.util.regex.matcher;importjava.util.regex.pattern;public classregexutils{/*** Mobile phone number verification ** @param str* @return Verify by returning True*/publicstaticbooleanismobile (STRINGNBSP;STR) {patternp= Null Matcherm=null;booleanb=false;p=pattern.compile ("^[1][3,4,5,8][ 0-9]{9}$ ");// Verify the phone number m=p.matcher (str); b=m.matches (); returnb;} /*** phone number verification ** @param str* @return
Commons LangThe standard Java libraries fail to provide enough methods for manipulation of its core classes. Apache Commons Lang provides these extra methods.Lang provides a host of helper utilities for the Java.lang API, notably String manipulation methods, basic numerical Metho DS, Object Reflection, concurrency, creation and serialization and System properties. Additionally it contains basic enhancements to java.util.Date and a series of utilities dedicated to help with building me Thods, suc
Special tools and techniques--class member pointersA member pointer can do this: get a pointer to a specific member , and then get that member from an object or another object . The member pointer should contain the type of the class and the type of the member .One.declaring member PointersTest class :
1.Java DecompilerYet another fast Java decompiler.: http://jd.benow.ca/#jd-gui-downloadA very concise anti-compilation tool that supports Windows, Linux, and Macs. corresponding Eclipse plugin:Name:jd-eclipse Update SiteLocation:http://jd.benow.ca/jd-eclipse/update2.DJ Java DecompilerWith DJ Java Decompiler you can decompile Java Class-files and save it in the text or other format. It ' s simple and easy.: http://www.neshkov.com/dj.htmlPros: Built-in
string result * @param rs result set * @param colnum column number*/def getbooleanvalue (Rs:resultset, Colnum:int)=Getresultvalue (RS) {_ Getboolean Colnum}/** * Get the value of the string result * @param rs result set * @param colnum column number*/def gettimestampvalue (Rs:resultset, Colnum:int)=Getresultvalue (RS) {_ Gettimestamp Colnum}/** * Get the value of the string result * @param rs result set * @param colname column name*/def getstringvalue (Rs:resultset, colname:string)=Getresultval
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.