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'; | |
// | |
// Image Slider Widget | |
// | |
class ImageSlider extends StatefulWidget { | |
final List images; | |
final double height; | |
final bool showPointers; |
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: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; |
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
//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()) |
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
//Dirty code examples | |
protected $d; // elapsed time in days | |
if (‘paid’ === $application->status) { | |
//process paid application | |
} | |
//Clean code examples |
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
//Dirty code examples | |
public $notiSms; | |
public $addCmt; | |
foreach ($people as $x) { | |
echo $x->name; | |
} | |
$user->createUser(); |
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
#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) |