working on it ...

Filters

Explore InChannel Snippets

Sort by

Found 500 snippets

    public by marceloviana modified 18 hours ago  11  0  2  0

    Chamando função assincrona via console

    static void Main()
    {
        RunAsync().Wait();
    }
    
    private static async Task RunAsync()
    {
        …
    }

    public by slavka1979 modified 23 hours ago  8  0  3  0

    Promise.all for Rejections and Resolves

    Always call then, even when one promise rejects
    // https://davidwalsh.name/promises-results
    Promise.all([
        // Resolves
        Promise.resolve(1), 
        // Rejects after 2 seconds
        new Promise((resolve, reject) => setTimeout(() => reject(1), 2000))
    ].map(p => p.catch(() => undefined))).then(() => console.log('done!'));

    public by vnhgroup4m modified Monday at 4:42:03 AM  24  0  2  0

    update wp

    update wp
    php
    $wpdb->update('usertb', array('xu'=>$xuThang,'RemainMoney'=>$tienThang ,'RemainTime'=>$newTime) ,array('FirstName'=>$username)); // cộng tiền gỡ 
    

    public by adam2015 modified Sunday at 5:51:56 PM  23  1  2  0

    Install docker-machine and docker-compose

    install_dc() {
    curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
    }
    
    install_dm() {
    curl -L https://github.com/docker/machine/releases/download/v0.11.0/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine
    chmod +x /usr/local/bin/docker-machine
    }

    public by vadimtkachenko modified May 15, 2017  77  0  4  0

    javascript

    =)))
    <html>
    <title>
    dddrew
    </title>
    <body>
    <script>
    
    
    
    
    
    
    </script>
    </body>
    </html>

    public by avisclemons83 modified May 12, 2017  37  0  2  0

    ddddd

    ddddd

    public by JKCPR modified May 12, 2017  77  0  4  2

    is your DOM classy? Wouldn't your console like to know...

    Intended as Dev Tool to be utilised in the browser console so that refactoring your messy CSS can be less hurty.
    ;( 
      function (){
      "use strict";
    
      //get ALL DOM elements => BODY > *, BODY *
      var elms = document.body.getElementsByTagName("*"),
          i = elms.length,
          arr = [],
          classArray;
      
      //iterate, isolate, finally indicate
      while( i-- ) {
          classArray = elms[i].className.split(/\s+/);
          if (classArray.length > 1) {
              arr.push( classArray[1] );
          }
      }
      
      console.log( arr.join(',') );
      return arr;
      
    })();

    public by paulsimmons modified May 10, 2017  75  0  4  0

    Magento Shop by Manufacturer Plugin by FMEAddons

    Magento shop by manufacturer plugin by FMEAddons helps you to create unlimited brands and display them in the brand slider. This module adds the separate page on your e-store for brands and customers can find the brand they love on this page. They can see the products of brands and buy the products right away. Brand page enables brands by category,
    // Enter here the actual content of the snippet.                        

    public by AlexZezekalo modified May 8, 2017  67  0  3  0

    Potential NPE

    //@Override
    //public boolean isSatisfiedBy(T candidate) {
    //return left.isSatisfiedBy(candidate) && right.isSatisfiedBy(candidate);
    //потенциальный NPE   
    
    //Nonnull as solvation?
    
    
    public class AndSpecification<T> extends CompositeSpecification<T> {
    
        @Nonnull
        private final Specification<T> left;
    
        @Nonnull
        private final Specification<T> right;
    
        public AndSpecification(@Nonnull Specification<T> left, @Nonnull Specification<T> right) {
            this.left = left;
            this.right = right;
        }
    
        @Override
        public boolean isSatisfiedBy(T candidate) {
            return left.isSatisfiedBy(candidate) && right.isSatisfiedBy(candidate);
        }
    
    }
    

    public by lindao modified May 5, 2017  76  1  3  0

    image_amp_by_lindao

    <img class="img img-responsive center-block" src="images/feriekredit.png"><br>       
    • Public Snippets
    • Channels Snippets