• Functional Ruby

    jaturken        
    0 Likes0 Commentsruby

    def push_page_urls_to_queue(url, doc)
      doc.xpath('//a/@href').
        map{ |link| link.text.strip }.
          select{ |u| belongs_to_domain?(u, url) }.
            map { |u| full_url(u, url) }.
              select{ |u| !already_crawled?(u) }.
                map { |u| queue << { url: u, priority: url_priority(u) } }
    end
  • Smile

    abemassry        
    0 Likes0 Commentsjson

    {"Hi": "😀"}
  • Untitled

    b-oern        
    0 Likes0 Commentsjavascript

    {
    hideMarker: bool default false,
    items: [
         {
              type: path,
              width: float default 4,
              a int default 50,
              r int default 10,
              g int default 50,
              b int default 250,
              points: [[6,21], [6,52]]
         },
         {
              type: circle,
              radius: 1000,
              a int default 50,
              r int default 10,
              g int default 50,
              b int default 250,
              lat: 51,
              lng: 6
         },
         {
              type: polygon,
              points: [[6,51], [6,52]],
              strokeWidth: float default 4,
              a int default 50,
              r int default 10,
              g int default 50,
              b int default 250
         },
         {
              type: overlay,
              image: "url",
              width: int default 100   // in Metern
              height: int default 170
              lat: 51,
              lng: 6
         }
    ]
    }
    
  • Please stop!

    WhoStoleMyNick        
    0 Likes0 Commentscsharp

    Thread.Sleep(duration); // everytime you write Thread.Sleep this time deducting from your lifetime
  • Untitled

    rorattol        
    0 Likes0 Commentsphp

    <?php
    
    echo "test is over";
    
    ?>
  • Rob

    trobertsonsf        
    0 Likes0 Commentsjavascript

    import renderWrapper from './renderWrapper';
    
    export default renderWrapper(ReactClass => !!ReactClass.rerenderViz);
    
  • Untitled

    KennyFernandez        
    0 Likes0 Commentsjava

    public class test {
        static public void main(String[] args)
        {
            int a = 5;
            int b = 7;
            b |= a;
            System.out.println(b);
            b = 7;
            b %= a;
            System.out.println(b);
            b = 7;
            b %= a;
            System.out.println(b);
            b = 7;
            b <= a;
            System.out.println(b);
        }
    }
    
  • Using properly PDO class

    angelhvargas        
    0 Likes0 Commentsphp

    <?php
    namespace Project\DB;
    class PDOBase extends \PDO {
      //custom properties
      protected $connection_property_1;
      protected $status;
      protected $partition;
      public function __construct()
      {
        //to the PDO class
        //Read PHP cocumentation
        parent::construct();
      }
      
      public function __clone()
      {
        return null;
      }
      
      public function custom_1()
      {
        // custom methods
      }
      
      public function status() {}
      
    }
  • Untitled

    noroutine        
    0 Likes0 Commentsmarkdown

    Любіть чистим серцем - і йдіть,
    підкошені зводьтеся знов
    і мовчки в душі хороніть
    одурену вашу любов
  • new game

    mscoutermarsh        
    0 Likes0 Commentsruby

    $ git stash list | wc -l
    => 258