CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets for: Nordin
c:\Windows\System32>cd c:\Temp
 
c:\Temp>md test
 
c:\Temp>cd test
 
c:\Temp\test>md source
 
c:\Temp\test>cd source
by Nordin   May 18, 2011 @ 10:40pm
Tags:
52 Views
no comments
 
By using Visual Studio's Replace All on files in current project, this will add the HeartBeat tag after </ufy:Body> and before </Body> tag.
 
From
{^:b*}{\</ufy\:Body\>:b*}\n{:b*\</body\>}
 
To
\1\2\n\1<eci:HeartBeat runat="server" />\n\3
 
Option:
RegularExpression
by Nordin   February 09, 2011 @ 11:37pm
Tags:
80 Views
no comments
 
if(!document.querySelectorAll && !document.getElementsByClassName){
    /* code to be executed on IE6 and IE7 only */
}
by Nordin   October 15, 2010 @ 12:01am
Tags:
211 Views
no comments
 
function(a){if(a=$(typeof a=="string"?"#"+a:a).get(0)){a=a.contentWindow||a.a;if(a.document)a=a.document;return a}};
by Nordin   July 27, 2010 @ 10:40pm
Tags: jQuery
204 Views
no comments
 
result = (List<TBean>) hibernateTemplate.executeWithNativeSession(new HibernateCallback() {
   public Object doInHibernate(Session session) throws HibernateException,
         SQLException {
      
      Query queryObject = session.createQuery(queryString);
      
      // process where clause
      if(ArrayUtils.isNotEmpty(values)){
         if(ArrayUtils.isNotEmpty(paramNames) && ArrayUtils.isSameLength(paramNames, values)){
            for (int i = 0; i < paramNames.length; i++) {
by Nordin   July 23, 2010 @ 3:40am
Tags:
234 Views
no comments
 
SQL
SELECT column_name , table_name
FROM information_schema.columns
order by table_name, column_name
by Nordin   May 12, 2010 @ 8:40pm
Tags: sql
191 Views
no comments
 
var simulateMouseDown = function(element){
   var eventName = 'mousedown';
   if(element.dispatchEvent){
      var event = document.createEvent("MouseEvent");
      event.initMouseEvent(eventName, true, true, window);
      element.dispatchEvent(event);
   }else if(element.fireEvent){ // IE7 and below
      element.fireEvent('on'+eventName);
   }
};
by Nordin   April 22, 2010 @ 2:03am
757 Views
no comments
 
/* Script to add jQuery into current page via Firebug/Console */
(function() {
  var b = "jQuery script is now available.";
  try {
    var a = document.createElement("script");
    a.setAttribute("type", "text/javascript");
    a.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
    document.getElementsByTagName("head")[0].appendChild(a);
    window['$j']=jQuery;
    setTimeout(function(){
by Nordin   April 14, 2010 @ 3:16am
Tags: jQuery
286 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate