­
In Lập Trình JAVA, OOP

Nạp chồng phương thức - Overloading method

Nạp chồng phương thức - Overloading method Khái niệm Tương tự như khái niệm nạp chồng phương thức trong C++, trong java, nạp chồng phương thức (overloading method) là hiện tượng nhiều phương thức có cùng tên, tuy nhiên số lượng tham số hoặc kiểu của tham số trong các phương thức này là khác nhau. Chú ý: Các phương thức có cùng...

Continue Reading

In Javascript,

change image upload file when have a exists image

html: <input id="profile-image-upload" class="hidden" type="file"> <div id="profile-image">click here to change profile image</div> css: input.hidden {     position: absolute;     left: -9999px; } #profile-image {     cursor: pointer;     background: #8adffb;   width: 80px;     height: 80px; } js: $(function() {     $('#profile-image').on('click', function() {         $('#profile-image-upload').click();     }); });        ...

Continue Reading

In

How to Convert String to StringBuffer in Java and reverse

How to Convert String to StringBuffer in Java. String str = "Hello"; StringBuffer sb = new StringBuffer(); sb.append(str); How to Convert StringBuffer to String in Java String sb = new StringBuffer(); String str = sb.toString(); ...

Continue Reading

In Lập Trình JAVA,

Auto Comment in Eclipse

Class: - Path: windown/preference/java/code style/code templates/types /​**  * ${file_name}  *  * version 1.0  *  * Date: ${date}  *  * copyright  *  * Modification Logs:  * DATE                 AUTHOR          DESCRIPTION  * -----------------------------------------------------------------------  * ${date}              PhuNV3              Create  */​ Method: - Path: windown/preference/java/code style/code...

Continue Reading

In sql,

Using a Stored Procedure with Output Parameters

A SQL Server stored procedure that you can call is one that returns one or more OUT parameters, which are parameters that the stored procedure uses to return data back to the calling application. The Microsoft SQL Server 2005 JDBC Driver provides the SQLServerCallableStatement class, which you can use to call this kind of stored procedure and process the data that it returns. When you...

Continue Reading

In sql,

How to get return value in function sql by Java

Function in sql server create function checkFunc( @MaSP varchar(10) ) returns int AS BEGIN declare @kq int IF EXISTS(SELECT * FROM SANPHAM WHERE MaSP=@MaSP) set @kq=2 ELSE BEGIN set @kq = 0 END return @kq END //execute select dbo.checkFunc('sp02') How to get data by resultset in java public int checkSanPham() { sql = "select dbo.checkFunc(?)"; connection = connectDB.getConnect(); int kq = 0; try...

Continue Reading

Popular Posts

Like us on Facebook

Flickr Images

Subscribe