This file contains hidden or 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
__author__ = 'yuan3y' | |
import xml.etree.ElementTree as ET | |
import urllib.request as re | |
import datetime | |
for post_code in range(510000,530000): | |
current_time = datetime.datetime.now() | |
unix_timestamp = str(int(current_time.timestamp() * 1000)) | |
postal_code = str(post_code) |
This file contains hidden or 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
// Process Thermometer Image | |
bool isNumeric(String s) { | |
if (s == null) { | |
return false; | |
} | |
return double.tryParse(s) != null; | |
} | |
double convertRawTextToTemperature(String rawText) { | |
double digits = 0.0; |
This file contains hidden or 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
// Process Crop Face Image | |
Future<LogEntry> processCropFaceImage(File imageFile) async { | |
final DateTime now = DateTime.now(); | |
final List<Image> images = <Image>[]; | |
final List<Rect> boundingBoxes = <Rect>[]; | |
final List<Person> people = <Person>[]; | |
final Uint8List uImage = await imageFile.readAsBytes(); | |
final ui.Image image = await decodeImageFromList(uImage); |
This file contains hidden or 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
// JavaScript Within Dart | |
// Geo Location API | |
@JS('navigator.geolocation') | |
library geoLocation; | |
import 'package:js/js.dart'; | |
@JS('getCurrentPosition') | |
external void getCurrentPosition(Function success(GeolocationPosition pos)); |
This file contains hidden or 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
// Browser APIs | |
// Web Camera | |
// ignore: avoid_web_libraries_in_flutter | |
import 'dart:html' as html; | |
import 'dart:ui' as ui; | |
import 'package:flutter/material.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); |
This file contains hidden or 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
// Basic Search Engine Optimization (manifest.json) | |
{ | |
"name": "The Art of Flutter", | |
"short_name": "ArtOfFlutter", | |
"start_url": ".", | |
"display": "minimal-ui", | |
"background_color": "#1389FD", | |
"theme_color": "#1389FD", | |
"description": "The Art of Flutter", | |
"orientation": "portrait-primary", |
This file contains hidden or 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
// Basic Search Engine Optimization (index.html) | |
<html> | |
<head> | |
<base href="/" /> | |
<meta charset="UTF-8" /> | |
<meta content="IE=Edge" http-equiv="X-UA-Compatible" /> | |
<meta name="HandheldFriendly" content="true" /> | |
<!-- GOOGLE SEO --> |
This file contains hidden or 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
// Custom Multi Child Layout | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
This file contains hidden or 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
// Custom Single Child Layout | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
This file contains hidden or 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
// Fractionally Sized Box | |
FractionallySizedBox( | |
widthFactor: 0.5, | |
heightFactor: 0.5, | |
child: Container( | |
color: Colors.black, | |
), | |
); |
NewerOlder