Search Results

Search found 10 results on 1 pages for 'niks'.

Page 1/1 | 1 

  • time interval in c#

    - by NIks
    I am having start time and end time as two fields in my database of type Datetime, Now i want that start time and end time selected by user should not collapse in the interval of start time and end time that are already present in database. How to do this validation.

    Read the article

  • Using hyperlink control with imagefield control in gridview

    - by niks
    I have a gridview and a column of that gridview is displaying images whose path is stored in a database & image is stored in locale folder inside my website. My problem is that I want to use the hyperlink control with the image, so that when the image is clicked it should jump to another page. How can I do that?

    Read the article

  • download large files using servlet

    - by niks
    I am using Apache Tomcat Server 6 and Java 1.6 and am trying to write large mp3 files to the ServletOutputStream for a user to download. Files are ranging from a 50-750MB at the moment. The smaller files aren't causing too much of a problem but with the larger files it and getting socket exception broken pipe. File fileMp3 = new File(objDownloadSong.getStrSongFolder() + "/" + strSongIdName); FileInputStream fis = new FileInputStream(fileMp3); response.setContentType("audio/mpeg"); response.setHeader("Content-Disposition", "attachment; filename=\"" + strSongName + ".mp3\";"); response.setContentLength((int) fileMp3.length()); OutputStream os = response.getOutputStream(); try { int byteRead = 0; while ((byteRead = fis.read()) != -1) { os.write(byteRead); } os.flush(); } catch (Exception excp) { downloadComplete = "-1"; excp.printStackTrace(); } finally { os.close(); fis.close(); }

    Read the article

  • Should convert String to Int in java @ 1.5 or use other method?

    - by NiksBestJPro
    I'm writing a program in which I want to terminate program by pressing any key(whether character or numbers), so I did a conversion from string to int using Integer.parseInt(variable) method and compare choices if it is not desired choice it should terminate the program but it show an error Exception in thread "main" java.lang.NumberFormatException: for input string: "d". program code is as follows:- public class mainClass { public static void main(String[]ar) { double res=0; Scanner in = new Scanner(System.in); Tdata td1 = new Tdata(); //another class object System.out.println("*Temperature Conversion*"); System.out.println("------------------------------"); System.out.println("Press 1- C2F"); System.out.println("Press 2- F2C"); System.out.println("<- Press aNY kEY TO Exit -"); String choice = in.nextLine(); //==================================================================== int ch = Integer.parseInt(choice); System.out.println("String has converted: " +ch); //verifying if converted into int if(ch == 1 || ch == 2) { if(ch == 1) { td1.getVal(37.4); res = td1.C2F(); System.out.println("Resulted Temperature: "+res); } else if(ch == 2) { td1.getVal(104.2); res = td1.F2C(); System.out.println("Resulted Temperature: "+res); } else { System.out.println("mind your input plz"); } } else { System.out.println("<- You select to exit ->"); System.exit(0); } //========================================================================================= }//end of main }//end of public class Now I think that I should convert undesired input to its previous state ie. String state.. is it right way or should Try another predefined method available in api. -Thanks! Niks

    Read the article

1