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(); }); }); ...
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(); ...
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...
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...
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...
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...
Trong Java việc tối ưu hoá mã nguồn Java là công việc rất quan trọng, nó không chỉ giúp mã nguồn thông thoáng hơn, giúp tiêu tốn ít tài nguyên hệ thống hơn, mà các kĩ thuật được trình bày dưới đây sẽ giúp nâng cao hiệu suất (performance) làm việc của Java khi chạy chương trình! Một LTV Java có kinh nghiệm...