• 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
  • Untitled

    dermesser        
    0 Likes0 Commentsgolang

    func (s *RpcServer) registerHandlers() {
      s.srv.RegisterHandler(RPC_SERVICE, "ConfigChange", s.ConfigRequestHandler)
      s.srv.RegisterHandler(RPC_SERVICE, "AppendEntries", s.AppendEntriesHandler)
    	s.srv.RegisterHandler(RPC_SERVICE, "RequestVote", s.RequestVoteHandler)
    	s.srv.RegisterHandler(RPC_SERVICE, "InstallSnapshot", s.InstallSnapshotHandler)
    }
    
    // Sends a request to the given processor. Returns nil if the processor doesn't exist.
    func (s *RpcServer) sendRequest(cluster_id string, rq *RpcRequest) *RpcResponse {
    	s.mx.Lock()
    	defer s.mx.Unlock()
    
    	c, ok := s.processors[cluster_id]
    
    	if !ok {
    		return &RpcResponse{err: errors.New("No such cluster")}
    	}
  • quicksort

    picmuse        
    0 Likes0 Commentspython

    import random
    
    def quicksort(arr):
        if arr is None:
            return arr
    
        return _quicksort(arr, 0, len(arr))
    
    
    def _quicksort(arr, start, end):
        if start + 1 >= end:
            return arr
    
        pivot = _partition(arr, start, end)
        _quicksort(arr, start, pivot)
        _quicksort(arr, pivot + 1, end)
    
        return arr
    
    
    def _partition(arr, start, end):
        pivot = start
        l = start
        r = start + 1
        while r < end:
            if arr[r] <= arr[pivot]:
                l = l + 1
                tmp = arr[l]
                arr[l] = arr[r]
                arr[r] = tmp
            r = r + 1
    
        tmp = arr[l]
        arr[l] = arr[pivot]
        arr[pivot] = tmp
    
        return l
    
    
    print quicksort(None)
    print quicksort([])
    print quicksort([3])
    print quicksort([3,1])
    print quicksort([3,1,2])
    print quicksort([int(random.random() * 200) for x in range(1, 200)])