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
| #include <QApplication> | |
| #include <QTableWidget> | |
| #include <QTableWidgetItem> | |
| #include <QFile> | |
| #include <QDataStream> | |
| #include <QFileInfo> | |
| #include <QDir> | |
| #include <QVBoxLayout> | |
| #include <QWidget> | |
| #include <QList> |
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
| ```python | |
| import zlib | |
| input_file = "input.mmpz" | |
| output_file = "output.mmp" | |
| with open(input_file, "rb") as f_in: | |
| f_in.seek(4) | |
| data = f_in.read() |
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
| import { Injectable } from '@angular/core'; | |
| import { HttpClient } from '@angular/common/http'; | |
| import { Observable } from 'rxjs'; | |
| enum Snippets { | |
| skills = "skills-names", | |
| workers = "workers-list", | |
| workers_by_skill = "workers-list-by-skill", | |
| } |
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
| @echo off | |
| setlocal enabledelayedexpansion | |
| REM :: Create an output directory so we don't overwrite original files | |
| mkdir "output" 2>nul | |
| :: Loop through all .mp3 files in the current directory | |
| for %%F in (*.mp3) do ( | |
| set "filename=%%~nF" | |
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 | |
| function isDevanagariConsonant($char) | |
| { | |
| $code = uniord($char); | |
| return ($code >= 0x0915 && $code <= 0x0939); // क - ह | |
| } | |
| function isVowelSign($char) | |
| { |
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
| // static std::array<QString, 12> s_noteStrings { | |
| // "C", "C\u266F / D\u266D", "D", "D\u266F / E\u266D", "E", "F", "F\u266F / G\u266D", | |
| // "G", "G\u266F / A\u266D", "A", "A\u266F / B\u266D", "B" | |
| // }; | |
| static std::array<QString, 12> s_noteStrings { | |
| "सा", "रे॒", "रे", "ग॒", "ग", "म", "म॑", | |
| "प", "ध॒", "ध", "नि॒", "नि" | |
| }; |
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
| // List of resources embedded in a Qt application | |
| QDirIterator it(":", QDirIterator::Subdirectories); | |
| while (it.hasNext()) | |
| { | |
| QString dir = it.next(); | |
| qDebug() << dir; | |
| // /icons/. | |
| // /icons/logo.svg | |
| // ... |
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
| // Determine the horizontal position | |
| bool left = x <= MARGIN; | |
| bool right = x >= w - MARGIN; | |
| // Determine the vertical position | |
| bool top = y <= MARGIN; | |
| bool bottom = y >= h - MARGIN; | |
| if (left && top) { | |
| setCursor(Qt::SizeFDiagCursor); // Top-Left corner ( \ ) |
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
| // work in progress | help required | |
| void PatternEditor::randomizePatterns() | |
| { | |
| TrackContainer::TrackList tl = model()->tracks(); | |
| // @todo Skip counting unsunpported tracks | |
| int tracks = tl.size(); | |
| if(tracks>24) | |
| { |
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
| ``` | |
| use Illuminate\Support\Facades\DB; | |
| ... | |
| public function boot(): void | |
| { | |
| DB::statement("ATTACH DATABASE '/path/database2.db' AS db2;"); | |
| } | |
| ``` |
NewerOlder