This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I used one of demos of Lovefield project (https://github.com/google/lovefield) as an inspiration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 | |
| (http://www.wtfpl.net/about/) | |
| Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es) | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 | |
| (http://www.wtfpl.net/about/) | |
| Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es) | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 | |
| (http://www.wtfpl.net/about/) | |
| Copyright (C) 2015 Mario Mendes (@hyprstack) | |
| Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es) | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| License | |
| (The MIT License) | |
| Copyright (c) 2015 Ivan Fraixedes (http://ivan.fraixed.es) | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| 'Software'), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Requires "npm install benchmark microtime" | |
| /* helper functions */ | |
| function printSuiteResult(suiteResult, title) { | |
| console.log("### " + title + " ###"); | |
| suiteResult.forEach(function (btest) { | |
| var sep = ""; | |
| for (var s = 85 - btest.name.length; s > 0; s--) { | |
| sep += " "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var title = "Sir,"; | |
| var obj = { | |
| name: 'Ivan' | |
| }; | |
| function getName(title) { | |
| return title + " " + this.name; | |
| } | |
| // Iteration binded function without prepending any argument |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const _ = require('lodash'); | |
| const times = 1000000; | |
| const srcObj = { | |
| _string: 'hey you', | |
| _array: [1, 2, 3, 4, 5, 6], | |
| _obj: { | |
| _string: 'hey you', | |
| _array: [1, 2, 3, 4, 5, 6] | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('simplified', ['ng-route']) | |
| .config([ | |
| '$routeProvider', | |
| function ($router) { | |
| $router.when('/', { | |
| templateUrl: '/views/main.html', | |
| controller: 'MainCtrl' | |
| }); | |
| } | |
| ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var i, tmp, initTime, stopTime; | |
| var arr = Array(99999999); | |
| // Iterate using `for` loop | |
| tmp = 0; | |
| initTime = Date.now(); | |
| for (i = 0; i < arr.length; i++) { | |
| tmp += i; |