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. 8 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. 9 years ago by jacinmontava
    1. function acortar($texto,$longitud)
    2. {
    3.    $texto_partido = substr($texto,0,$longitud);
    4.  
    5.    /// Condición que comprueba la longitud del texto para devolverlo con ... o entero
    6.    if (strlen($texto) > $longitud)
    7.       return $texto_partido."...";
    8.    else
    9.       return $texto
    10. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/624"></script>
  6. 9 years ago by spirit
    1. function replace(str:String,find:String,replace:String):String
    2. {
    3.         var index:Number;
    4.         while(str.indexOf(find)!=-1)
    5.         {
    6.                 index= str.indexOf(find);
    7.                 str = str.substr(0,index) + replace + str.substr(index + find.length);
    8.         }
    9.         return str;
    10. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/685"></script>
  7. 6 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>
  8. 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>
  9. 9 years ago by neorom
    snmptranslate -Tp -IR system
    # ou system est le nom de la branche à afficher
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1018"></script>
  10. 9 years ago by gameplayer and saved by 1 other
    Cette commande va effectuer le status sur tous les fichiers contenus dans $liste_file_to_update, ne récupère que les lignes commençant par M (fichiers modifiés), supprime les 9 premiers caractères (pour supprimer les caractères de statut affichés par svn status) et retire les espaces et caractères numériques restant au début de la ligne.
    1. svn status -u $liste_file_to_update | egrep '^M' | cut -c 9- | sed "s/[1-9 ][1-9 ]*\//\//g"
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1010"></script>
  11. 9 years ago by cyo
    1. echo Propel::getConnection()->getLastExecutedQuery();
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/793"></script>

First / Previous / Next / Last / Page 1 of 60 (597 posteets)