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
| function attemptLevelUp(addedXp, currentXp, currentLevel) { | |
| var baseAmountForNextLevel = 0; | |
| for (i = 1; i <= currentLevel; i++) { | |
| baseAmountForNextLevel += xpNeededForNextLevel(i); | |
| } | |
| if ((currentXp + addedXp) >= baseAmountForNextLevel) { | |
| // I am levelling up. |
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
| <?php | |
| use Zend\Db\Sql\Select; | |
| // basic table | |
| $select0 = new Select; | |
| $select0->from('foo'); | |
| // 'SELECT "foo".* FROM "foo"'; | |
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
| // Pass through a couple of dom elements for minor speed improvement, | |
| // Pass through jQuery to avoid conflicts, | |
| // Define undefined. | |
| (function(window, document, $, undefined){ | |
| // Define the station list. | |
| var stations = [<?php | |
| $count = count($stations); | |
| $i = 0; | |
| foreach($stations as $station) { | |
| echo '"'.trim($station->stationName).'"'; |