Recent posteets

Sort by: Date / Title /

  1. 8 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. 9 years ago by jacinmontava
    1. <?php
    2. function acortarurl($url){
    3.         $longitud = strlen($url);
    4.         if($longitud> 45){
    5.                 $longitud = $longitud - 30;
    6.                 $parte_inicial = substr($url, 0, -$longitud);
    7.                 $parte_final = substr($url, -15);
    8.                 $nueva_url = $parte_inicial."[ ... ]".$parte_final;
    9.                 return $nueva_url;
    10.         }else{
    11.                 return $url;
    12.         }
    13. }
    14. $url_larga = "http://www.google.com.pe/search?hl=en&q=ribosomatic&btnG=Google+Search&meta=";
    15. $url_corta = acortarurl($url_larga);
    16. echo"<a href=\"$url_larga\">$url_corta</a>";
    17. ?>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1049"></script>
  4. sponsorised links
  5. 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>
  6. 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>
  7. 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>
  8. 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>
  9. 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>
  10. 8 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>
  11. 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>

First / Previous / Next / Last / Page 1 of 40 (396 posteets)