Skip to content

Instantly share code, notes, and snippets.

View Quingsley's full-sized avatar
🎯
Focusing

JEROME JUMAH Quingsley

🎯
Focusing
View GitHub Profile
@Quingsley
Quingsley / main.dart
Created April 12, 2023 10:37
painting
import 'package:flutter/material.dart';
import 'dart:math' as math;
void main() {
runApp(MyApp());
}
class CurvePainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
@Quingsley
Quingsley / main.dart
Created August 5, 2023 04:03
Refresh Token Logic
import 'dart:async';
void main() {
const monitor = 3000; // 3s
Timer.periodic(Duration(seconds: monitor), (timer){
print('Timer $timer');
refreshTokenChk(monitor);
});
}
@Quingsley
Quingsley / main.dart
Last active May 12, 2024 03:53
Frequecny pattern
import 'dart:math';
void main() {
final isSame = same([1, 4, 5], [16, 1, 25]);
print(isSame);
}
bool same(List<int> array1, List<int> array2) {
if (array1.length != array2.length) {
return false;
void main() {
bool result = isAnagram('iceman', 'cinemas');
print(result);
}
bool isAnagram(String first, String second) {
if (first.length != second.length) {
return false;
}
void main() {
final result = sumZero([-6, -5, 0, 1, 2, 3, 4]);
print(result);
print(uniqueCount([-2,-1,-1, 0,1]));
}
//assume it receives a sorted array
// return a pair of values whose sum is 0 otherwise undefined
//using multiple pointers pattern