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
| /*------------------------------------------------------------------------------------ | |
| activeForm listeners | |
| --------------------------------------------------------------------------------------*/ | |
| https://yii2-cookbook.readthedocs.io/forms-activeform-js/ | |
| ->createCommand()->rawSql |
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
| /*------------------------------------------------------------------------------------ | |
| articles | |
| -------------------------------------------------------------------------------------*/ | |
| https://tutorialzine.com/2017/04/10-machine-learning-examples-in-javascript | |
| https://medium.freecodecamp.org/how-to-create-a-neural-network-in-javascript-in-only-30-lines-of-code-343dafc50d49 | |
| /*----------------------------------------------------------------------------------- | |
| other |
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
| str.match(/\[(.*?)\]/)[1] // extracts attribute name from fsdfsda[name]fdsf |
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 uniqueArray = function(arrArg) { | |
| return arrArg.filter(function(elem, pos,arr) { | |
| return arr.indexOf(elem) == pos; | |
| }); | |
| }; | |
| var uniqEs6 = (arrArg) => { | |
| return arrArg.filter((elem, pos, arr) => { | |
| return arr.indexOf(elem) == pos; | |
| }); |
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
| https://www.divii.org/ |
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
| https://reactjs.org/docs/refs-and-the-dom.html | |
| https://reactjs.org/docs/lifting-state-up.html | |
| https://reactjs.org/docs/forms.html | |
| https://www.andrewhfarmer.com/use-refs-not-ids/ |
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
| The MIT License (MIT) | |
| Copyright (c) 2015 Justin Perry | |
| 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 permit persons to whom the Software is furnished to do so, | |
| subject to the following conditions: |
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
| for (var ac = 0; ac < results[0].address_components.length; ac++) { | |
| var component = results[0].address_components[ac]; | |
| switch(component.types[0]) { | |
| case 'locality': | |
| storableLocation.city = component.long_name; | |
| break; | |
| case 'administrative_area_level_1': | |
| storableLocation.state = component.short_name; | |
| break; |
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
| /* | |
| limitLoop.js - limit the frame-rate when using requestAnimation frame | |
| Released under an MIT license. | |
| When to use it? | |
| ---------------- | |
| A consistent frame-rate can be better than a janky experience only | |
| occasionally hitting 60fps. Use this trick to target a specific frame- | |
| rate (e.g 30fps, 48fps) until browsers better tackle this problem |
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
| https://stackoverflow.com/questions/14226410/node-js-cannot-find-module-mongodb | |
| npm install mongodb -g | |
| cd /path/to/my/app/folder | |
| npm link mongodb | |
| With that in place, I could do this in my application file: require('mongodb'). | |
| /**/ | |
| https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ | |
| https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-mongodb-on-ubuntu-16-04 |