Recent posteets

Sort by: Date / Title /

  1. 9 years ago by iegorka
    1. Groups multiple tokens together without creating a capturing group. This allows you to apply quantifiers to the full group.
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1747"></script>
  2. 9 years ago by spirit
    if toFixed is not defined
    1. if (!num.toFixed)
    2. {
    3.  
    4.  Number.prototype.toFixed = function(precision) {
    5.      var power = Math.pow(10, precision || 0);
    6.      return String(Math.round(this * power)/power);
    7.  }
    8.  
    9. }
    10.  
    11. // OR
    12.  
    13.   Number.prototype.toFixed = function(precision)
    14.   {
    15.      var num = (Math.round(this*Math.pow(10,precision))).toString();
    16.      return num.substring(0,num.length-precision) + "." +
    17.             num.substring(num.length-precision, num.length);
    18.   }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1403"></script>
  3. 7 years ago by neorom
    1. /etc/pure-ftpd/conf/PassivePortRange
    2.  
    3.  
    4. 50000 50100
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2127"></script>
  4. sponsorised links
  5. 9 years ago by stephane
    1. a[href^="mailto"] { color: blue; }
    2.  
    3. a[target=_blank]
    4.  
    5. a[target=_blank]:after
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1261"></script>
  6. 9 years ago by benoitbalon
    1. cat /proc/version
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1505"></script>
  7. 8 years ago by stephanzr
    L'image qui servira de fond pour signaler le chargement (barre, cercle, etc...) sera visible jusqu'à ce que l'image à afficher finisse de se charger et recouvre l'image de fond... Voir sur le lien de la source les différentes manières d'utiliser ce principe.
    1. .load{background:url('images/youricon.gif') no-repeat center;}
    2.  
    3. <div class="load" style="width:200px;height:200px">
    4.     <img src="large.jpg" alt="alternate text" />
    5. </div>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2004"></script>
  8. 7 years ago by macks
    1. #---libs/date.py
    2. def format_date(value, format="%d/%m/%Y %H:%M:%S"):
    3.         return value.strftime(format)
    4.  
    5. #-----settings
    6. from libs.filters import format_date
    7. from jinja2 import Environment, FileSystemLoader
    8. TEMPLATE_ENV.filters["format_date"] = format_date
    9.  
    10. #---template
    11. <td>{{ h.date|format_date('%d/%m/%Y') }}</td>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2104"></script>
  9. 9 years ago by macks
    agregar una columna despues de otra
    1. ALTER TABLE media add COLUMN  status VARCHAR (20) after component
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1780"></script>
  10. 9 years ago by nox.freak
    Checks to see if browser is IE based or other.
    1. function createRequestObject(handler)
    2. {
    3.         var xmlHttp;
    4.         try
    5.         {
    6.                 // Firefox, Opera 8.0+, Safari
    7.                 var xmlHttp = new XMLHttpRequest();
    8.                 xmlHttp.onload=handler;
    9.                 xmlHttp.onerror=handler;
    10.                 return xmlHttp;
    11.         }
    12.         catch (e)
    13.         {
    14.                 // Internet Explorer
    15.                 try
    16.                 {
    17.                         xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    18.                         return xmlHttp;
    19.                 }
    20.                 catch (e)
    21.                 {
    22.                         try
    23.                         {
    24.                                 xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    25.                                 return xmlHttp;
    26.                         }
    27.                         catch (e)
    28.                         {
    29.                                 alert("Your browser does not support AJAX!");
    30.                                 return false;
    31.                         }
    32.                 }
    33.         }
    34. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1285"></script>
  11. 9 years ago by nox.freak
    Handles response from an ajax request.
    1. function ajaxRequest()
    2. {
    3.         var opt = 's=whatever you want to pass';
    4.         var page = 'ajax_page.php';
    5.  
    6.         var http = createRequestObject();
    7.         http.onreadystatechange = function()
    8.         {
    9.                 if((http.readyState == 4) && (http.status == 200))
    10.                 {
    11.                         var text = http.responseText;
    12.                 }
    13.         }
    14.         http.open('POST', page, true);
    15.         http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    16.         http.setRequestHeader("Content-length", opt.length);
    17.         http.setRequestHeader("Connection", "close");
    18.         http.send(opt);
    19. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1286"></script>

First / Previous / Next / Last / Page 1 of 34 (338 posteets)