Icon Finder
“Iconfinder provides high quality icons for webdesigners and developers in an easy and efficient way”
this is icon's search engine, that very useful for desaigner.
Website : http://www.iconfinder.net/![]()
“Iconfinder provides high quality icons for webdesigners and developers in an easy and efficient way”
this is icon's search engine, that very useful for desaigner.
Website : http://www.iconfinder.net/![]()
Posted by
Yogi
at
9:16 PM
|
0
comments
Links to this post
Labels:
Design,
Icon
In this article, I will write about Simple Shoutbox Application with JQuery. With Ajax (Asynchronous JavaScript and XML) , we can send a form submission and get response back without refreshing current page. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
$(function() {
$(".submit").click(function() {
var name = $("#name").val();
var comment = $("#comment").val();
var dataString = 'name='+ name + '&comment=' + comment;
if(name=='' || comment=='')
{
alert('Please Give Valide Details');
} else {
$("#flash").show();
$("#flash").fadeIn(400).html('<img src="img/ajax-loader.gif" align="absmiddle"> <span class="loading">Loading Comment...</span>');
$.ajax({
type: "POST",
url: "ajaxshoutbox.jsp",
data: dataString,
cache: false,
success: function(html){
$("ol#update").append(html);
$("ol#update li:last").fadeIn("slow");
$("#name").val('');
$("#comment").val('');
$("#name").focus();
$("#flash").hide();
}
});
return false;
}
});
});
$.ajax({}) is JQuery event to call ajax request, it’s has an object of key/value pairs , that are used to initialize and handle the request.
<form action="#" method="post">ajaxshoutbox.jsp
<label><input type="text" name="name" id="name"/>
<span class="titles">Name</span><span class="star">*</span>
</label><br />
<label>
<textarea name="comment" id="comment"></textarea>
<span class="titles">Comment</span>
</label><br />
<input type="submit" class="submit" value=" Submit Comment " /> </form>
<li class="box">
<span style=" font-weight:bold">Name :</span>
<span style="font-size:16px; color:#663399;"><%= request.getParameter("name") %></span> <br />
<span style=" font-weight:bold">Comment :</span> <%= request.getParameter("comment") %>
</li>
Posted by
Yogi
at
4:41 PM
|
0
comments
Links to this post
Labels:
Ajax,
Java,
JQuery
In my previous project, I will be required to call Stored Procedure in SQL Server with Spring & Hibernate. Using HibernateTemplate class extends from HibernateDaoSupport, you can call the stored procedure in SQL Server.
The Stored Procedure:
SampleDao Source:
USE [sample];
GO
SET ANSI_NULLS ON;
GO
SET QUOTED_IDENTIFIER ON;
GO
ALTER PROCEDURE [SP_Sample]
(@Param1 nvarchar(50), @Param2 nvarchar(50))
AS
declare @Concatenation nvarchar(150)
set @Concatenation = @Param1 + ' and ' + @Param2
select @Param1,@Param2,@Concatenation
GO
public class SampleDao extends HibernateDaoSupport {
@SuppressWarnings("unchecked")
public String callSP(String param1, String Param2) {
// create session from active session
Session ses = getSession(true);
// create query for call the stored procedure
SQLQuery q = ses.createSQLQuery("exec SP_Sample :param1, :param2");
q.setString("param1", param1);
q.setString("param2", param2);
//execute stored procedure and get list result
List l = q.list();
StringBuilder result = new StringBuilder();
if (l.size()>0){
for(Iterator it=l.iterator();it.hasNext();){
Object[] row = (Object[]) it.next();
result.append("Param 1 : " + row[0] + ", Param 2 : " + row[1] + ", Concatenation : " + row[2]);
}
}
return result.toString();
}
Posted by
Yogi
at
1:19 AM
|
0
comments
Links to this post
Labels:
Hibernate,
Java
waktu makan di warteg deket kantor, yang notabennya tempat makan karyawan-karyawan deket kantorku. gak sengaja ngeliat keluar ada orang yang nanya ke pengemis sembari bawa duit 50 ribuan. Secara gak sengaja letak pengemis dan orang yang mau nukarin uang tadi pas di belakangku. nah iniliah transaksi kedua orang tu
ternyata, pengemis jakarta penghasilannya juga lumayan ya...
Posted by
Yogi
at
2:42 AM
|
0
comments
Links to this post
Labels:
OOT