Skip to content

Instantly share code, notes, and snippets.

View Herrytheeagle's full-sized avatar
🖥️
Focusing

Heritage Falodun Herrytheeagle

🖥️
Focusing
View GitHub Profile
@Herrytheeagle
Herrytheeagle / ImageSlider.dart
Created July 6, 2020 22:40
Custom Widget In Flutter(II)
import 'package:flutter/material.dart';
//
// Image Slider Widget
//
class ImageSlider extends StatefulWidget {
final List images;
final double height;
final bool showPointers;
@Herrytheeagle
Herrytheeagle / NotificationManager.dart
Created July 6, 2020 22:32
Creating Custom Widget in Flutter
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
//
// Class to generate SnackBar notifications everywhere in the app's codebase
// without being limited to Scafold inherited widgets
//
class NotificationManager {
static BuildContext context;
static Color successBackgroundColor = Colors.black;
@Herrytheeagle
Herrytheeagle / QC.js
Last active August 28, 2019 06:46
Quality Code Description 3
//Dirty code example
// Check to see if the employee is eligible for full benefits
if ($employee->flags && self::HOURLY_FLAG && $employee->age > 65)
//Clean code example
if ($employee->isEligibleForFullBenefits())
@Herrytheeagle
Herrytheeagle / QCD2.php
Created August 28, 2019 04:32
Quality Code Description 2
//Dirty code examples
protected $d; // elapsed time in days
if (‘paid’ === $application->status) {
//process paid application
}
//Clean code examples
@Herrytheeagle
Herrytheeagle / QCD.php
Created August 28, 2019 04:23
Quality Code Description 1
//Dirty code examples
public $notiSms;
public $addCmt;
foreach ($people as $x) {
echo $x->name;
}
$user->createUser();
@Herrytheeagle
Herrytheeagle / C:\Users\Heritage\Desktop\web\Sorting
Created August 8, 2017 09:12
Insertion sorting Technique written with C++
#include <iostream>
#include <functional>
#include <cstring>
using namespace std;
/*this is a simple sorting algorithm that just follow the same
method we use in sorting our cards when playing card games*/
//function to sort an array insertion sort.
void insertionSort(int arr[],int n)