Implementations of the Action-Model-View pattern:
- with PDCurses
- with Win32
| language: cpp | |
| install: | |
| - which xcrun | |
| script: | |
| - xcrun --help | |
| - xcrun --show-sdk-path || true | |
| - xcrun --show-sdk-version || true |
| cmake_policy(VERSION ${CMAKE_VERSION}) | |
| function(lexer filename out_namespace) | |
| set(tokens_count 0) | |
| set(line 1) | |
| set(column 1) | |
| macro(fill_buffer_from_file_content) |
| cmake_policy(VERSION ${CMAKE_VERSION}) | |
| function(tokenize filename out_namespace) | |
| set(tokens_count 0) | |
| set(line 1) | |
| set(column 1) | |
| macro(emit_token_and_advance type) |
| cmake_policy(VERSION ${CMAKE_VERSION}) | |
| function(print_token type text line column) | |
| if(column LESS 10) | |
| set(column "0${column}") | |
| endif() | |
| string(REGEX REPLACE "\n" "\\\\n" text "${text}") |
| import struct | |
| import sys | |
| from chunk import Chunk | |
| FOURCC_DLS = b'DLS ' | |
| FOURCC_DLID = b'dlid' | |
| FOURCC_COLH = b'colh' | |
| FOURCC_WVPL = b'wvpl' |
| #include "Model.hpp" | |
| #include "QtEventLoop.hpp" | |
| #include <QApplication> | |
| #include <QDebug> | |
| #include <QKeyEvent> | |
| #include <QLabel> | |
| #include <functional> |
| #include "QtEventLoop.hpp" | |
| #include <QApplication> | |
| #include <QDebug> | |
| #include <QKeyEvent> | |
| #include <QLabel> | |
| #include <QMainWindow> | |
| #include <functional> |
Implementations of the Action-Model-View pattern:
| function(get_fizzbuzz in out) | |
| math(EXPR off3 "${in} % 3") | |
| math(EXPR off5 "${in} % 5") | |
| if(NOT off3 AND NOT off5) | |
| set(${out} FizzBuzz PARENT_SCOPE) | |
| elseif(NOT off3) | |
| set(${out} Fizz PARENT_SCOPE) | |
| elseif(NOT off5) | |
| set(${out} Buzz PARENT_SCOPE) |
| function(get_fizzbuzz in out) | |
| math(EXPR off3 "${in} % 3") | |
| math(EXPR off5 "${in} % 5") | |
| if(NOT off3 AND NOT off5) | |
| set(${out} FizzBuzz PARENT_SCOPE) | |
| elseif(NOT off3) | |
| set(${out} Fizz PARENT_SCOPE) | |
| elseif(NOT off5) | |
| set(${out} Buzz PARENT_SCOPE) |