Skip to content

Instantly share code, notes, and snippets.

View stephanedeluca's full-sized avatar

Stéphane de Luca stephanedeluca

View GitHub Profile
@stephanedeluca
stephanedeluca / main.dart
Created July 10, 2023 15:06
swift-aurora-7084
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() {
@stephanedeluca
stephanedeluca / main.dart
Last active July 5, 2023 23:47
Shokaze Yassine b2
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(
@stephanedeluca
stephanedeluca / main.dart
Created July 1, 2023 15:52
crimson-rose-2138
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(
@stephanedeluca
stephanedeluca / main.dart
Last active May 31, 2023 17:24
Shokaze category details form designer
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 {
@stephanedeluca
stephanedeluca / virtualCpuImplementationChallenge.txt
Created May 12, 2023 08:14
The virtual CPU implementation challenge
# 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.
@stephanedeluca
stephanedeluca / main.dart
Created April 27, 2023 19:35
golden-kingdom-9162
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@stephanedeluca
stephanedeluca / main.dart
Last active April 22, 2023 20:13
How to make child apparition smooth and animated?
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@stephanedeluca
stephanedeluca / main.dart
Last active April 22, 2023 20:01
Dart: makes an https download
//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
@stephanedeluca
stephanedeluca / main.dart
Last active June 6, 2023 04:07
Create an non existant enum in dart
/// 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");
@stephanedeluca
stephanedeluca / main.dart
Last active June 21, 2022 09:21
Compute a CRC-16/Modbus
//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