<commit_before><!doctype html>
<html>
<head lang="ko">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>aid.js</title>

    <link rel="stylesheet" href="http://fonts.googleapis.com/earlyaccess/nanumgothic.css">
    <style type="text/css">
        body {
            font-family: 'Nanum Gothic', dotum, verdana, Arial, applegothic, sans-serif;
            font-weight: normal;
            font-style: normal;
        }

        a {
            text-decoration: none;
        }
    </style>
</head>

<body>
<div class="wrap">
</div>

<script src="js/lib/jquery-1.7.0.min.js"></script>
<script src="js/src/aid.js"></script>
<script>
    (function ($) {
        $(document).ready(init);

        function init() {
        }

        function test_queue() {
          // 
        }

        function test_linkedListNode() {<commit_msg># aid.html + add extend() function test code<commit_after><!doctype html>
<html>
<head lang="en">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>aid.js</title>

    <link rel="stylesheet" href="http://fonts.googleapis.com/earlyaccess/nanumgothic.css">
    <style type="text/css">
        body {
            font-family: 'Nanum Gothic', dotum, verdana, Arial, applegothic, sans-serif;
            font-weight: normal;
            font-style: normal;
        }

        a {
            text-decoration: none;
        }
    </style>
</head>

<body>
<div class="wrap">
</div>

<script src="js/lib/jquery-1.7.0.min.js"></script>
<script src="js/src/aid.js"></script>
<script>
    (function ($) {
        $(document).ready(init);

        function init() {

            /*
             * combine function that apply mixin functions to Class
             */
            function extend(destination, source) {
                for(var key in source) {
                    if( source.hasOwnProperty(key) ) {
                        destination[key] = source[key];
                    }
                }

                return destination;
            }

            /*
             * mixin functions
             */
            var circleFns = {
                area: function() {
                    return Math.PI * this.radius * this.radius;
                },
                grow: function() {
                    console.log('grow');
                    this.radius++;
                },
                shrink: function() {
                    this.radius--;
                }
            },
            clickableFns = {
                hover: function() {
                    console.log('hover');
                },
                press: function() {
                    console.log('button pressed');
                },
                release: function() {
                    console.log('button released');
                },
                fire: function() {
                    console.log('fire');
                    if(this.action) this.action.fire();
                }
            };

            /*
             * example : set mixin functions to Class
             */
            function RoundBtn(radius, label) {
                this.radius = radius;
                this.label = label;
            }

            extend(RoundBtn.prototype, circleFns);
            extend(RoundBtn.prototype, clickableFns);

            var roundBtn = new RoundBtn(3, 'send');
            roundBtn.grow();
            roundBtn.fire();

            /*
             * example : implement mixin structure with no extend() function.
             */
            var withCircle = function() {
                this.area = function() {
                    return Math.PI * this.radius * this.radius;
                };

                this.grow = function() {
                    this.radius++;
                };

                this.shrink = function() {
                    this.radius--;
                };
            },
            withClickable = function() {
                this.hover = function() {
                    console.log('hover');
                };

                this.press = function() {
                    console.log('press');
                };

                this.release = function() {
                    console.log('release');
                };

                this.fire = function() {
                    console.log('fire');
                };
            };

            var RoundButton = function(radius, label, action) {
                this.radius = radius;
                this.label = label;
                this.action = action;
            };

            withCircle.call(RoundButton.prototype);
            withClickable.call(RoundButton.prototype);

            var button = new RoundButton(4, 'yes!', function() {
                return 'you said yes!';
            });

            button.hover();
            button.press();
            button.release();
            button.fire();
        }

        function test_queue() {
          //
        }

        function test_linkedListNode() {
{'fraction_non_alphanumeric': 0.12880284472540499, 'fraction_numerical': 0.0019755037534571317, 'mean_word_length': 1.189878892733564, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '689017', 'n_tokens_mistral': 1372, 'n_tokens_neox': 1268, 'n_words': 251}