Optimize for Visibility:
All components and their dependencies must be explicit and easily identifiable at an appropriate level of abstraction.
State and state changes should be simple to identify and modify.
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
| Aspectos a tener en cuenta para generar un diagrama Mermaid usando la sintaxis flowchart: | |
| - Usa `flowchart LR` o `flowchart TD`. | |
| - Asegúrate de usar una versión reciente de Mermaid (ej. v11.6.0 o superior). | |
| - Define nodos con: `ID[Texto Etiqueta]`. | |
| - **Importante:** Si el `Texto Etiqueta` contiene caracteres especiales como `()`, `[]`, `{}` o comillas, encierra **toda** la etiqueta entre comillas dobles: `ID["Texto con<br>(paréntesis)"]`. | |
| - Prefiere etiquetas en una sola línea; usa `<br>` solo si es necesario y verifica que funcione. | |
| - Define conexiones sin etiqueta con: `ID1 --> ID2`. | |
| - Define conexiones con etiqueta usando: `ID1 -- "Texto Etiqueta<br>Con Salto" --> ID2`. Siempre usa comillas `""` para las etiquetas de conexión (obligatorio si hay espacios o `<br>`). | |
| - Usa comentarios `%%` únicamente en líneas separadas, NUNCA en la misma línea después de código (`código %% comentario` -> MAL). |
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> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>Tiny Elm</title> | |
| </head> | |
| <body> | |
| <button id="inc">+</button> | |
| <div id="count">0</div> |
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 tinyelm = (init, update, output, debug = console.log) => { | |
| let state = init; | |
| output(state); | |
| return (event) => { | |
| debug("dispatching event " + JSON.stringify(event)); | |
| debug("cur state " + JSON.stringify(state)); | |
| state = update(event, state); | |
| debug("output state " + JSON.stringify(state)); |
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("groupmuse").service("BackButtonManager", function($rootScope, $ionicPlatform) { | |
| var managedStates; | |
| managedStates = []; | |
| $rootScope.$on('$stateChangeSuccess', function(event, next) { | |
| var state, _i, _j, _len, _len1, _results; | |
| for (_i = 0, _len = managedStates.length; _i < _len; _i++) { | |
| state = managedStates[_i]; | |
| if (state.enabled) { | |
| state.unregisterCallback(); | |
| state.enabled = false; |
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
| //Views conventions | |
| views = [ | |
| login, | |
| dashboard, | |
| issues, | |
| issue-detail | |
| issue-map, | |
| issue-client | |
| ] |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000