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 std::ops::Range; | |
| use rangemap::RangeSet; | |
| trait RangeExt { | |
| fn add(&self, offset: i64) -> Self; | |
| } | |
| impl RangeExt for Range<i64> { | |
| fn add(&self, offset: i64) -> Self { |
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
| { | |
| "$schema": "http://json-schema.org/draft-07/schema", | |
| "title": "HoloBot Configuration Schema", | |
| "description": "Schema for the configuration of https://github.com/anden3/holo-bot.", | |
| "x-taplo-info": { | |
| "authors": ["anden3 (https://github.com/anden3)"], | |
| "version": "0.1.0", | |
| "patterns": [".*holobot.toml$"] | |
| }, | |
| "type": "object", |
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 createHouse2() { | |
| const vertices = [ | |
| [-10, -5, 10], // 0 | |
| [10, -5, 10], // 1 | |
| [-10, 5, 10], // 2 | |
| [10, 5, 10], // 3 | |
| [0, 15, 10], // 4 | |
| [-10, -5, -10], // 5 | |
| [-10, 5, -10], // 6 | |
| [0, 15, -10], // 7 |
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 world = shared.worldMatrix; | |
| mat4.identity(world); | |
| mat4.translate(world, world, vec3.fromValues(0, -20, 0)); | |
| setWorldViewProjection(); | |
| // Square | |
| { |
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 createHouse() { | |
| const vertices = [ | |
| // Front side wall. | |
| [-10, -5, 10], [10, -5, 10], [-10, 5, 10], | |
| [10, -5, 10], [10, 5, 10], [-10, 5, 10], | |
| // Front side roof. | |
| [-10, 5, 10], [10, 5, 10], [0, 15, 10], | |
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
| /Users/mac/Documents/C++/task-force-arma-3-radio/ts/src/serverData.cpp:199:104: error: ambiguous conversion for static_cast from 'dataType::Direction3D' to 'dataType::AngleDegrees' | |
| diag << TS_INDENT << TS_INDENT << TS_INDENT << TS_INDENT << "VIEW: " << static_cast<float>(static_cast<AngleDegrees>(cData->getViewDirection())) << "\n"; | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| /Users/mac/Documents/C++/task-force-arma-3-radio/ts/src/./datatypes.hpp:60:11: note: candidate is the implicit move constructor | |
| class AngleDegrees { | |
| ^ | |
| /Users/mac/Documents/C++/task-force-arma-3-radio/ts/src/./datatypes.hpp:60:11: note: candidate is the implicit copy constructor | |
| /Users/mac/Documents/C++/task-force-arma-3-radio/ts/src/./datatypes.hpp:65:19: note: candidate constructor | |
| constexpr AngleDegrees(const AngleRadians& other) : angle(other.angle * (180 / M_PI_FLOAT)) {}; |
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 <cstdio> | |
| #include <stdexcept> | |
| #include <sys/types.h> | |
| #include <sys/sysctl.h> | |
| #include <CoreFoundation/CoreFoundation.h> | |
| #include <signal.h> | |
| #include <stdarg.h> |
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
| /Users/mac/Documents/C++/task-force-arma-3-radio/ts/src/./settings.hpp:148:10: error: explicit specialization of 'set' in class scope | |
| void set(Setting key, const std::string& value) { | |
| ^ | |
| /Users/mac/Documents/C++/task-force-arma-3-radio/ts/src/./settings.hpp:198:9: error: chosen constructor is explicit in copy-initialization | |
| Settings(EnumDefault) | |
| ^~~~~~~~~~~~~~~~~~~~~ | |
| /Users/mac/Documents/C++/task-force-arma-3-radio/ts/src/./settings.hpp:26:50: note: expanded from macro 'Settings' | |
| XX(tangentReleaseDelay, static_cast<float>(0.f)) | |
| ^ | |
| /Users/mac/Documents/C++/task-force-arma-3-radio/ts/src/./settings.hpp:30:26: note: expanded from macro 'EnumDefault' |
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
| Prekompilering: | |
| Fixar "#" | |
| Tar bort kommentarer | |
| Löser ut makron | |
| Makron har vi inte gått igenom | |
| Copy-pastar include-filer | |
| Kompilering: | |
| Sourcefil (.cpp) blir objektfil (.obj) | |
| Görs om till maskinkod |
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 <fstream> | |
| using namespace std; | |
| int main() { | |
| ifstream input1("input1.txt"); // in fstream, läser ett textdokument | |
| ifstream input2("input2.txt"); | |
| ofstream output("output.txt"); // out fstream, skapar och öppnar ett textdokument | |
| while (!(input1.eof() || input2.eof())) { |
NewerOlder