Posts

Showing posts with the label java

How to convert the Math Number to Words in Java?

How to convert the Math Number to Words in Java import java.util.*; public class NumToWords {     String string;     String st1[] = { "", "one", "two", "three", "four", "five", "six", "seven",             "eight", "nine", };     String st2[] = { "hundred", "thousand", "lakh", "crore" };     String st3[] = { "ten", "eleven", "twelve", "thirteen", "fourteen",             "fifteen", "sixteen", "seventeen", "eighteen", "ninteen", };     String st4[] = { "twenty", "thirty", "fourty", "fifty", "sixty", "seventy",             "eighty", "ninty" };     public String convert(int number) {         int n = 1;         int word;         string = "";     ...

How to Read .xlsx excel file using java?

We can read the excel file using POI .jar file Before writing this java class. Whatever variables you want just create a POJO class.  And declare all the variables into it. -------------------- ExcelRead.java -------------------- import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.sql.SQLException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.poi.xssf.usermodel.XSSFCell;import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class MetaDataServices {     public void meta_uploadServices(String metafilepath) throws FileNotFoundException, ClassNotFoundException, SQLException, IOException{         MetaClass meta = new MetaClass();         Query metaquery = new Query();         Query metaupdate=new Query(); ...

How to set max connections in mysql?

First we want to enter into the Mysql command line prompt by giving the Password MySQL> Enter the password : xxxxxxx To know how many connections are in the database MySQL> show variables like "max_connections"; It will list out the output as Variable Name         Value max_connections        100 Default value for the max_connections is 100. If we want to increase the max connections then we wan to give Set global max_connections = "our value" [our value refers= 200,300,500 etc...] It will affect immediately. and it will again remain to max_connections as 100 when the mysql server restarts. For that we want to change the  My.conf[for linux OS] or My.ini file [for windows OS] Thanks for viewing our post..