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
| type Alley = " "; | |
| type MazeItem = "🎄" | "🎅" | Alley; | |
| type Maze = MazeItem[][] | |
| type DELICIOUS_COOKIES = "🍪"; | |
| type MazeMatrix = MazeItem[][]; | |
| type Directions = "up" | "down" | "left" | "right"; | |
| type CoordState = 'win' | 'valid' | 'invalid' | |
| type Inc<N extends number> = [ | |
| 1,2,3,4,5,6,7,8,9,10,11, |
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
| type TicTacToeChip = '❌' | '⭕'; | |
| type TicTacToeEndState = '❌ Won' | '⭕ Won' | 'Draw'; | |
| type TicTacToeState = TicTacToeChip | TicTacToeEndState; | |
| type TicTacToeEmptyCell = ' ' | |
| type TicTacToeCell = TicTacToeChip | TicTacToeEmptyCell; | |
| type TicTacToeYPositions = 'top' | 'middle' | 'bottom'; | |
| type TicTacToeXPositions = 'left' | 'center' | 'right'; | |
| type TicTacToePositions = `${TicTacToeYPositions}-${TicTacToeXPositions}`; | |
| type TicTactToeBoard = TicTacToeCell[][]; | |
| type TicTacToeGame = { |
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 fetchSaga = function* fetchSaga(action) { | |
| // objScanned -> itemScanned as I assume that was a typo? | |
| const itemScanned = yield call(scanProduct, action.payload.id); | |
| const {id, user} = action.payload; | |
| try { | |
| const result = yield cps(AxusLogger.logScan, {id, user}); | |
| // Or like this if logScan needs AxusLogger context: | |
| // const result = yield cps([AxusLogger, 'logScan'], {id, user}); | |
| dispatchScan(result); |
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
| Marionette.Region.prototype.open = function(view) { | |
| this.$el.replaceWith(view.el); | |
| }; | |
| Marionette.Region.prototype.realClose = Marionette.Region.prototype.close; | |
| Marionette.Region.prototype.close = function(view) { | |
| if (this.currentView) { | |
| this.currentView.$el.replaceWith(this.$el); | |
| this.realClose(view); |
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
| <!DOCTYPE html> | |
| <html lang="en" dir="ltr"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title></title> | |
| <script src="scripts/libs/jquery.min.js"></script> | |
| <script src="scripts/libs/underscore.min.js"></script> | |
| <script src="scripts/libs/backbone.min.js"></script> | |
| <script src="scripts/libs/backbone.marionette.min.js"></script> | |
| <script> |
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 a = "5x^5+3x^3-7x^2+4x+30"; | |
| var b = "8x^5+4x^4-2x^3-2x^2+4x"; | |
| function secti(a, b) { | |
| var koefA = getKoef(a); | |
| var koefB = getKoef(b); | |
| var res = '', tmp; | |
| for (var i=Math.max(koefA.length, koefB.length); i--;) { | |
| if (koefA[i] && koefB[i] && (koefA[i] || 0) + (koefB[i] || 0)) { | |
| tmp = koefA[i] + koefB[i]; |