Most of the hard work is done by @nateevans https://gist.github.com/nateevans/9958390
Thank you!
Requires Twig ^1.2 | ^2.0
{% extends 'knp_menu.html.twig' %}Most of the hard work is done by @nateevans https://gist.github.com/nateevans/9958390
Thank you!
Requires Twig ^1.2 | ^2.0
{% extends 'knp_menu.html.twig' %}| static String formatBytes(int bytes, int decimals) { | |
| if (bytes <= 0) return "0 B"; | |
| const suffixes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; | |
| var i = (log(bytes) / log(1024)).floor(); | |
| return ((bytes / pow(1024, i)).toStringAsFixed(decimals)) + | |
| ' ' + | |
| suffixes[i]; | |
| } |
| import 'package:flutter/material.dart'; | |
| import 'package:get/get.dart'; | |
| class GlobalMiddleware extends GetMiddleware { | |
| final authController = Get.find<AuthController>(); | |
| @override | |
| RouteSettings redirect(String route) { | |
| return authController.authenticated || route == '/login' | |
| ? null |
| import 'package:flutter/material.dart'; | |
| import 'package:get/get.dart'; | |
| void main() { | |
| runApp(GetMaterialApp( | |
| initialRoute: '/login', | |
| getPages: [ | |
| GetPage( | |
| name: '/login', | |
| page: () => LoginPage(), |
| // Auto detect line endings | |
| ini_set('auto_detect_line_endings', true); | |
| function loadCSV($file) | |
| { | |
| // Create an array to hold the data | |
| $arrData = array(); | |
| // Create a variable to hold the header information | |
| $header = NULL; |