working on it ...

Filters

Explore Public Snippets

Sort by

Found 1.7M 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 22 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 IanUnderhill modified May 16, 2017  43  2  1  0

    lazy singleton

    public final class Singleton {
        private static volatile Singleton INSTANCE = null;
    
        private Singleton() {// singleton instance}
    
        /**
         * @return the single instance of the class
         */
        public static Singleton getInstance() {
            if (INSTANCE == null) {
                synchronized(Singleton.class) {
                    if (INSTANCE == null) {
                        INSTANCE = new Singleton();
                    }
                }
            }
            return INSTANCE;
        }
    }                                    

    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 paulsimmons modified May 10, 2017  35  0  1  0

    Forum Magento Extension by FMEAddons

    Let the customers discuss your products in your own forum, you can create the forum by using forum Magento extension by FMEAddons. This plugin integrates the forum with your Magento e-store and allows your customers to get register on your forum. Forum extension is a good tool to engage the customers by giving them good support and you can also int
    cpp
    // Enter here the actual content of the snippet.            
    • Public Snippets
    • Channels Snippets