This file contains 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
//﷽ | |
// zid.upload.js: Image upload | |
// Derived from ALADDIN work by Stéphane de Luca on Tuesday July 13th 2017 | |
// Copyright ALADDIN © 2013 by Stéphane de Luca | |
// Release notes: | |
// — v1b0: Tuesday July 13th 2017 15h47: Initial version. | |
// — v1b1: Tuesday July 13th 2017 21h50: support M2S url publising. | |
// — v1b2: Wednesday July 26th 2017 14h24 @ Paris: support max size error. | |
// — v1b3: Thursday July 27th 2017 10h58 @ Paris les Halles chez Monop : Fixed error propagation. |
This file contains 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
/* | |
Reverse the CRC16 from the data sample. | |
@Author Stéphane "Sdl" de Luca on Friday June 10th 2022 4:22 in Tangier, Morocco. | |
@See https://crypto.stackexchange.com/questions/100474/how-can-i-reverse-a-so-called-crc16-from-the-data/100511#100511 for indepth information. | |
*/ | |
int crc16(int value) { | |
const table = [ | |
//0xBB83, //0000 | |
0x7A43, // 0001 |
This file contains 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 |
This file contains 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 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 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 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 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 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 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( |
OlderNewer