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
| http://www.somacon.com/p542.php |
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
| http://codepen.io/anon/pen/yYjqYv?editors=110 |
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
| { | |
| "color_scheme": "Packages/Dayle Rees Color Schemes/sublime/contrast/laravel-contrast.tmTheme", | |
| "font_options": | |
| [ | |
| "directwrite", | |
| "subpixel_antialias" | |
| ], | |
| "font_size": 9, | |
| "ignored_packages": | |
| [ |
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
| $pattern = '/<vt:lpstr>(.*?)<\/vt:lpstr>/'; |
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
| // create an object representation of the XML file | |
| $xmlFile = $this->readFile('xl/workbook.xml'); | |
| $xmlObject = new SimpleXMLElement($xmlFile); | |
| // extract worksheet names | |
| foreach ($xmlObject->sheets->sheet as $sheetObject) | |
| $sheetnames[] = (string) $sheetObject->attributes()->name; | |
| // debug($sheetnames); |
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
| // looping an HTMLCollection using for | |
| var TheadRows = document.getElementById('table').tHead.rows[0].cells | |
| for (var i = 0; i < TheadRows.length; i++) { | |
| console.log(TheadRows[i].innerText) | |
| }; | |
| // looping with Array.prototype.forEach (only for HTMLCollection object) |
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
| http://christianalfoni.github.io/javascript/2014/08/01/why-javascript-inheritance-is-so-difficult-to-understand.html |
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 anArray = [1,2,3,4,5]; | |
| // all work and return true | |
| console.dir(anArray.constructor === Array) | |
| console.dir(anArray.__proto__ === Array.prototype) | |
| console.dir(anArray.__proto__ === anArray.constructor.prototype) | |
| console.dir(anArray instanceof Array) |
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
| iMapped = [] | |
| // you dont need to use map, you can do it yourself | |
| for (var i = 0; i < userSortColumn.length; i++) { | |
| // create object that contains the column celll value and the cells row index position | |
| iMapped[i] = { | |
| rowId: i, | |
| value: userSortColumn[i] | |
| } | |
| }; |
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 i = rows.length | |
| while(i--) { } | |
| for (var i = rows.length - 1; i >= 0; --i) { | |
| for (var i = rows.length; i--; null) { | |
| // these are all apparently really fast, with the shift beind 2nd and the arr reverse and pop being fastest | |
| while( i = arr.pop() ) { | |
| someFn(i); |