working on it ...

Filters

Explore Public Snippets

Sort by

Found 1,708 snippets matching: coding

    public by eyemonen modified Oct 21, 2013  327117  0  4  0

    Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

    Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.: javascript_resources.md
    ## Libraries
    
    - [jQuery](http://jquery.com) - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
    - [Backbone](http://backbonejs.org/) - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
    - [AngularJS](http://angularjs.org/) - Conventions based MVC framework for HTML5 apps.
    - [Underscore](http://underscorejs.org/) - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
    - [lawnchair](http://brian.io/lawnchair/) - Key/value store adapter for indexdb, localStorage and more
    - [Handlebars](http://handlebarsjs.com/) - Minimal semantic templating
    
    ## Plugins
    - [jQueryUI](http://jqueryui.com/) - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.
    - [Bootstrap](http://getbootstrap.com/javascript/) - Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.
    - [Async.js](https://github.com/caolan/async) - Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with node.js, it can also be used directly in the browser. Also supports component.
    - [timeago](http://timeago.yarp.com/) - Timeago is a jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
    - [Chosen](https://github.com/harvesthq/chosen) - Chosen is a library for making long, unwieldy select boxes more friendly.
    - [QTip2](http://qtip2.com/) - Second generation of the advanced tooltip plugin for jQuery
    - [spin.js](http://fgnass.github.io/spin.js/) - JS replacement for gif loading spinners
    - [Hotkeys](https://github.com/jeresig/jquery.hotkeys) - John Resig's plugin for adding/removing handlers for keyboard events
    - [Linkify](https://github.com/uudashr/jquery-linkify) - jQuery plugin to format text containing URL or hashtag into clickable anchor tags.
    
    ## Tools
    - [Bower](http://bower.io/) - Bower is a package manager for the web. It offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.
    - [Grunt](http://gruntjs.com/) - Javascript Task Runner
    
    ## Guides
    - [Jasmine](http://pivotal.github.io/jasmine/) - Jasmine is a behavior-driven development framework for testing JavaScript code.
    - [Building a Chrome Extension](https://developer.chrome.com/extensions/getstarted.html) - Extensions allow you to add functionality to Chrome without diving deeply into native code. You can create new extensions for Chrome with those core technologies that you're already familiar with from web development: HTML, CSS, and JavaScript.
    - [Backbone Tutorials](http://backbonetutorials.com/) - Backbone Tutorials is a collection of tutorials written by Thomas Davis.
    
    

    public by JonahM modified May 19, 2014  275561  4  7  4

    Fluid CSS Rows

    I've realised in my coding experience that I need to To allow for space in the div or row tags when using text. Because everything is responsive on a web page, it's a good idea to use these classes. They work really well. Example: http://j.mp/1oilINn
    
    
    .strip-md{
    	padding-top:80px;
    	padding-bottom:80px;
    	position:relative;
    	overflow:hidden;
    }
    
    .strip-sm{
    	padding-top:30px;
    	padding-bottom:30px;
    }
    
    

    public by gabriel-shanahan modified Jun 18, 2015  193838  0  4  0

    Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

    Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.: javascript_resources.md
    ## Libraries
    
    - [jQuery](http://jquery.com) - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
    - [Backbone](http://backbonejs.org/) - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
    - [AngularJS](http://angularjs.org/) - Conventions based MVC framework for HTML5 apps.
    - [Underscore](http://underscorejs.org/) - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
    - [lawnchair](http://brian.io/lawnchair/) - Key/value store adapter for indexdb, localStorage and more
    - [Handlebars](http://handlebarsjs.com/) - Minimal semantic templating
    
    ## Plugins
    - [jQueryUI](http://jqueryui.com/) - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.
    - [Bootstrap](http://getbootstrap.com/javascript/) - Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.
    - [Async.js](https://github.com/caolan/async) - Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with node.js, it can also be used directly in the browser. Also supports component.
    - [timeago](http://timeago.yarp.com/) - Timeago is a jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
    - [Chosen](https://github.com/harvesthq/chosen) - Chosen is a library for making long, unwieldy select boxes more friendly.
    - [QTip2](http://qtip2.com/) - Second generation of the advanced tooltip plugin for jQuery
    - [spin.js](http://fgnass.github.io/spin.js/) - JS replacement for gif loading spinners
    - [Hotkeys](https://github.com/jeresig/jquery.hotkeys) - John Resig's plugin for adding/removing handlers for keyboard events
    - [Linkify](https://github.com/uudashr/jquery-linkify) - jQuery plugin to format text containing URL or hashtag into clickable anchor tags.
    
    ## Tools
    - [Bower](http://bower.io/) - Bower is a package manager for the web. It offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.
    - [Grunt](http://gruntjs.com/) - Javascript Task Runner
    
    ## Guides
    - [Jasmine](http://pivotal.github.io/jasmine/) - Jasmine is a behavior-driven development framework for testing JavaScript code.
    - [Building a Chrome Extension](https://developer.chrome.com/extensions/getstarted.html) - Extensions allow you to add functionality to Chrome without diving deeply into native code. You can create new extensions for Chrome with those core technologies that you're already familiar with from web development: HTML, CSS, and JavaScript.
    - [Backbone Tutorials](http://backbonetutorials.com/) - Backbone Tutorials is a collection of tutorials written by Thomas Davis.
    
    

    public by yoonlee modified Apr 8, 2015  1751  3  6  0

    [CodingRule] HMS01

    HMS 프로젝트 코딩 룰 01
    public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            protected override void OnLoad(EventArgs e)
            {
                // 00 Inlitialize는 OnLoad 함수에서 처리
                base.OnLoad(e);
    
                try
                {
                    //00. Event 등록 전, 컨트롤 초기화
                    InitializeControl();
    
                    //00. Evnet 등록은 코드로 처리
                    InitializeEvent();
    
                    //01. if문 조건문에 ! 대신에 false로 처리하기
                    //02. 비교대상 문자열을 앞에 위치, Equals  함수 사용하기
                    CodingRule1();
    
                    //03. loop문 사용시 조건 확장메서드 사용하기
                    CodingRule2();
    
                    //04. validation 처리
                    CodingRule3(new DataTable());
                }
                catch (Exception)
                {
                    throw;
                }
            }
    
            #region Initialize
            private void InitializeControl()
            {
                try
                {
    
                }
                catch (Exception)
                {
    
                    throw;
                }
            }
    
            private void InitializeEvent()
            {
                try
                {
                    this.DoubleClick += new EventHandler(Form1_DoubleClick);
                    this.button1.Click += new EventHandler(button1_Click);
                }
                catch (Exception)
                {
    
                    throw;
                }
            }
    
            #endregion
    
            #region Event
    
            void Form1_DoubleClick(object sender, EventArgs e)
            {
                //01. Depth Level이 0인 함수는 꼭 Try Catch 문 처리할 것 
                try
                {
                    testc();
                }
                catch (Exception)
                {
                    
                    throw;
                }
            }
    
            private void testc()
            {
                //DETPTH 1
    
            }
    
            void button1_Click(object sender, EventArgs e)
            {
                try
                {
                     //01. sender를 형 변환해서 사용해야 재샤용성이 높아짐
                    if (sender is Button)
                    {
                        //02. as 로 캐스팅할 경우 캐스팅 실패시 null을 리턴함
                        //(Button) 식으로 캐스팅 할 경우 실패시 Exception 발생
                        Button btn = sender as Button;
    
                        string str = btn.Name;
                    }
                }
                catch (Exception)
                {
                    
                    throw;
                }
            }
    
            #endregion
    
            #region Method
            private void CodingRule1()
            {
                string tempStr = null;
    
                //tempStr의 값이 null일 경우에 false 값을 리턴함
                //tempStr.Equals("Y") 처리했을 경우 Exceptiono 발생
                if ("Y".Equals(tempStr) == false)
                {
                    
                }
            }
    
    
            private void CodingRule2()
            {
                DataTable dt = new DataTable();
    
                //불필요한 loop  제거
                //람다식을 사용할 경우 디버그 모드에서 문제가 수정이 불하가하니 Select 함수 권장
                foreach (DataRow row in dt.Select("ISUSABLE = 'Usable'"))
                {
                    
                }
            }
    
    
            private void CodingRule3(DataTable dataTable)
            {
                // 분기문으로 Validation 처리하는 경우 조건을 부정문으로 작성하여 
                // 괄호로 감싸지 말고 Line 한줄로 처리할 것 (중복된 괄호처리로 인해 가독성이 낮아지는 현상 방지)
                if (dataTable == null || dataTable.Rows.Count <= 0) return;
            }
    
            #endregion
    
        }

    public by FelipeTRM modified Jul 23, 2015  17191  186  7  0

    Codingame - Temperatures - C++

    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <algorithm>
    using namespace std;
    
    /**
     * Auto-generated code below aims at helping you parse
     * the standard input according to the problem statement.
     **/
    int main()
    {
        int N,c; // the number of temperatures to analyse
        scanf("%d", &N);
        int number[N],ptemps,i=0,FLAG=0,mark;
    
        for(i=0;i<N;i++){
            scanf("%d",&number[i]);
           }
    
        sort(number,number+N);
    
        for(i=0;i<N;i++){
           if(number[i]>0)FLAG++;
           if(FLAG==1)mark=i;
        }
    
        if(N==0)printf("0");
        else if(-1*number[mark-1]<number[mark])printf("%d",number[mark-1]);
        else printf("%d",number[mark]);
    
    }

    public by rioxshen modified May 3, 2014  2179  0  6  0

    [leetcode] Insert Interval

    class Interval:
      def __init__(self, s=0, e=0):
        self.start = s
        self.end = e
    
    
    class Solution:
      def insert(self, intervals, newIntervals):
        """ Inserts the new interval into the list and
            returns merged intervals.
        
        1. Appends the new interval to the list.
        2. Sorts the list.
        3. Iterates through and merges the new interval list.
        """
        if not intervals:
          return [newInterval]
        
        intervals.append(newInterval)
        intervals.sort(lambda x, y: x.start - y.start)
        
        result = []
        length = len(intervals)
        last = intervals[0]
        for i in range(1, length):
          current = intervals[i]
          if current.start <= last.end: # Merge intercetions
            last.end = max(last.end, current.end)
          else:
            result.append(last)
            last = current
        result.append(last)
        
        return result
            

    public by DunyaBernardon modified Dec 31, 2018  95  0  3  0

    py4E

    Learning to code
    // Enter here the actual content of the snippet.						
    print("hello world")
    hello world
    
    
    
    
                

    public by maruchacro modified Apr 2, 2014  3092  0  4  0

    Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

    Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.: javascript_resources.md
    ## Libraries
    
    - [jQuery](http://jquery.com) - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
    - [Backbone](http://backbonejs.org/) - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
    - [AngularJS](http://angularjs.org/) - Conventions based MVC framework for HTML5 apps.
    - [Underscore](http://underscorejs.org/) - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
    - [lawnchair](http://brian.io/lawnchair/) - Key/value store adapter for indexdb, localStorage and more
    - [Handlebars](http://handlebarsjs.com/) - Minimal semantic templating
    
    ## Plugins
    - [jQueryUI](http://jqueryui.com/) - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.
    - [Bootstrap](http://getbootstrap.com/javascript/) - Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.
    - [Async.js](https://github.com/caolan/async) - Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with node.js, it can also be used directly in the browser. Also supports component.
    - [timeago](http://timeago.yarp.com/) - Timeago is a jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
    - [Chosen](https://github.com/harvesthq/chosen) - Chosen is a library for making long, unwieldy select boxes more friendly.
    - [QTip2](http://qtip2.com/) - Second generation of the advanced tooltip plugin for jQuery
    - [spin.js](http://fgnass.github.io/spin.js/) - JS replacement for gif loading spinners
    - [Hotkeys](https://github.com/jeresig/jquery.hotkeys) - John Resig's plugin for adding/removing handlers for keyboard events
    - [Linkify](https://github.com/uudashr/jquery-linkify) - jQuery plugin to format text containing URL or hashtag into clickable anchor tags.
    
    ## Tools
    - [Bower](http://bower.io/) - Bower is a package manager for the web. It offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.
    - [Grunt](http://gruntjs.com/) - Javascript Task Runner
    
    ## Guides
    - [Jasmine](http://pivotal.github.io/jasmine/) - Jasmine is a behavior-driven development framework for testing JavaScript code.
    - [Building a Chrome Extension](https://developer.chrome.com/extensions/getstarted.html) - Extensions allow you to add functionality to Chrome without diving deeply into native code. You can create new extensions for Chrome with those core technologies that you're already familiar with from web development: HTML, CSS, and JavaScript.
    - [Backbone Tutorials](http://backbonetutorials.com/) - Backbone Tutorials is a collection of tutorials written by Thomas Davis.
    
    

    public by BenRogerson modified Jun 24, 2015  2625  4  4  0

    Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

    Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.: javascript_resources.md
    ## Libraries
    
    - [jQuery](http://jquery.com) - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
    - [Backbone](http://backbonejs.org/) - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
    - [AngularJS](http://angularjs.org/) - Conventions based MVC framework for HTML5 apps.
    - [Underscore](http://underscorejs.org/) - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
    - [lawnchair](http://brian.io/lawnchair/) - Key/value store adapter for indexdb, localStorage and more
    - [Handlebars](http://handlebarsjs.com/) - Minimal semantic templating
    
    ## Plugins
    - [jQueryUI](http://jqueryui.com/) - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.
    - [Bootstrap](http://getbootstrap.com/javascript/) - Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.
    - [Async.js](https://github.com/caolan/async) - Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with node.js, it can also be used directly in the browser. Also supports component.
    - [timeago](http://timeago.yarp.com/) - Timeago is a jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
    - [Chosen](https://github.com/harvesthq/chosen) - Chosen is a library for making long, unwieldy select boxes more friendly.
    - [QTip2](http://qtip2.com/) - Second generation of the advanced tooltip plugin for jQuery
    - [spin.js](http://fgnass.github.io/spin.js/) - JS replacement for gif loading spinners
    - [Hotkeys](https://github.com/jeresig/jquery.hotkeys) - John Resig's plugin for adding/removing handlers for keyboard events
    - [Linkify](https://github.com/uudashr/jquery-linkify) - jQuery plugin to format text containing URL or hashtag into clickable anchor tags.
    
    ## Tools
    - [Bower](http://bower.io/) - Bower is a package manager for the web. It offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.
    - [Grunt](http://gruntjs.com/) - Javascript Task Runner
    
    ## Guides
    - [Jasmine](http://pivotal.github.io/jasmine/) - Jasmine is a behavior-driven development framework for testing JavaScript code.
    - [Building a Chrome Extension](https://developer.chrome.com/extensions/getstarted.html) - Extensions allow you to add functionality to Chrome without diving deeply into native code. You can create new extensions for Chrome with those core technologies that you're already familiar with from web development: HTML, CSS, and JavaScript.
    - [Backbone Tutorials](http://backbonetutorials.com/) - Backbone Tutorials is a collection of tutorials written by Thomas Davis.
    
    

    public by Magesolution modified Feb 9, 2018  997  0  5  0

    Page Builder for Magento 2 by Magesolution

    Page Builder for Magento 2 allows you to get rid of complicated steps to configure your site with minimal coding experiences required. Instead of login in the back-end, the fabulous feature allows you to build and configure Homepage, Category page, Product page, CMS pages straightly and visually at front-end. Also, it allows you to select header &
    https://www.magesolution.com/mgs-frontend-builder-theme-for-magento2.html						
    • Public Snippets
    • Channels Snippets