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 'dart:isolate'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:video_compress/video_compress.dart'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { |
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 'package:flutter/material.dart'; | |
| /// The buid number | |
| const _buildNumber = 8; | |
| // lets define the stateless part of the screen (AppBar, app title, background color...) | |
| class MetaDataAdScreen extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
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 'package:flutter/material.dart'; | |
| // lets define the stateless part of the screen (AppBar, app title, background color...) | |
| class MetaDataAdScreen extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| debugShowCheckedModeBanner: false, | |
| title: "product informations", | |
| home:Scaffold( |
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 'package:flutter/material.dart'; | |
| import 'package:intl/intl.dart'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { |
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
| # The virtual CPU implementation test | |
| Hello, I am Steven de Luca, CTO. | |
| I'd like to engage you in a test which consits of designing and implementing a virtual processor capables of running actual small binary programs. | |
| In this test, I 'd like to evaluate your understanding of a technical problem to solve, measure your sw architecturing skills and the quality of the code you write, including style and maintainability over time and across a whole team. | |
| It is probable that you never use Dart language so far, learning it during the test is also a way to evaluate your capacity to face the ever changing nature of the programing world. |
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 'package:flutter/material.dart'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override |
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 'package:flutter/material.dart'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override |
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 'dart:io'; | |
| //import 'dart:convert'; | |
| //const c = [0, 0, 184, 84, 0, 2, 40, 3, 100, 65, 36, 97, 0, 1, 0, 0, 0, 0, 0, 0, 8, 252, 0, 0, 0, 2, 167, 120, 119, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, 12, 0, 0, 1, 0]; | |
| /// @history Create by Sdl on Friday April 21th 2023 | |
| /// Expecte results: | |
| /// {cache-control: max-age:0, content-length: 24, content-md5: qVT+sY2zlNke425Qebybmw==, content-type: application/octet-stream, date: Fri, 21 Apr 2023 07:35:20 GMT, etag: 0x8DB41BEC85E6579, last-modified: Thu, 20 Apr 2023 16:46:26 GMT, x-ms-blob-type: BlockBlob, x-ms-lease-status: unlocked, x-ms-request-id: cbe6933b-c01e-0002-8023-747c9b000000, x-ms-version: 2009-09-19} | |
| /// OK: reponse is: [7, 231, 4, 20, 24, 66, 0, 0, 1, 0, 0, 0, 0, 0, 39, 153, 0, 0, 39, 153, 0, 0, 40, 8] | |
| /// File date: 4/20/2023 24:66 |
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
| /// Shows what to do when creating an enum value from a integer value | |
| enum ThemeColor { red, green,} | |
| void main() { | |
| try { | |
| final nonExistent = ThemeColor.values[3]; | |
| print("Non existent enum is $nonExistent"); |
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 'dart:ffi'; | |
| int crc16Modbus(List<int> bytes){ | |
| const crc16 = 0xA001; | |
| int crc = 0xFFFF; | |
| if (false) { | |
| for (int pos = 0; pos < bytes.length; pos++) { | |
| crc ^= bytes[pos]; // XOR byte into least sig. byte of crc |