Skip to content

Instantly share code, notes, and snippets.

View tthtlc's full-sized avatar

Peter Teoh tthtlc

View GitHub Profile
@tthtlc
tthtlc / gist:fb319c122df9c01a446ec99a4801f377
Last active December 16, 2022 08:31
Delivery-Boy-for-Groceries-Foods-Pharmacies-Stores-Flutter-App analysis of dart program
Analyzing ....
error - generated/i18n.dart:12:9 - Can't define a const constructor for a class with non-final fields. Try making all of the fields final, or removing the keyword 'const' from the constructor. - const_constructor_with_non_final_field
error - generated/i18n.dart:14:10 - A class member can't have the same name as the enclosing class. Try renaming the member. - member_with_class_name
error - generated/i18n.dart:14:10 - Expected to find ';'. - expected_token
error - generated/i18n.dart:14:10 - Variables must be declared using the keywords 'const', 'final', 'var' or a type name. Try adding the name of the type of the variable or the keyword 'var'. - missing_const_final_var_or_type
error - generated/i18n.dart:14:11 - Methods must have an explicit list of parameters. Try adding a parameter list. - missing_method_parameters
error - generated/i18n.dart:14:11 - Operator declarations must be preceded by the keyword 'operator'. Try adding the keyword 'operator'. - missing_keyword_operator
er
@tthtlc
tthtlc / gist:e11907b42d0c17d5a2320cac45fcf8b9
Created December 15, 2022 08:24
Delivery-Boy-for-Groceries-Foods-Pharmacies-Stores-Flutter-App
error • Can't define a const constructor for a class with non-final fields at lib/generated/i18n.dart:12:9 • (const_constructor_with_non_final_field)
error • Variables must be declared using the keywords 'const', 'final', 'var' or a type name at lib/generated/i18n.dart:14:10 • (missing_const_final_var_or_type)
error • A class member can't have the same name as the enclosing class at lib/generated/i18n.dart:14:10 • (member_with_class_name)
error • Expected to find ';' at lib/generated/i18n.dart:14:10 • (expected_token)
error • Operator declarations must be preceded by the keyword 'operator' at lib/generated/i18n.dart:14:11 • (missing_keyword_operator)
error • The string '??' isn't a user-definable operator at lib/generated/i18n.dart:14:11 • (invalid_operator)
error • Methods must have an explicit list of parameters at lib/generated/i18n.dart:14:11 • (missing_method_parameters)
error • A function body must be provided at lib/generated/i18n.dart:14:14 • (missing_function_body)
error • Variables
@tthtlc
tthtlc / gist:8b67447bb5a1df3527451ae41bbe0cf2
Created December 15, 2022 07:54
Migration status: Flutter-food-delivery-app-ui
error • The method 'MultiTrackTween' isn't defined for the type 'FadeAnimation' at lib/animations/FadeAnimation.dart:12:19 • (undefined_method)
error • The method 'Track' isn't defined for the type 'FadeAnimation' at lib/animations/FadeAnimation.dart:13:7 • (undefined_method)
error • The method 'Track' isn't defined for the type 'FadeAnimation' at lib/animations/FadeAnimation.dart:16:7 • (undefined_method)
error • The method 'ControlledAnimation' isn't defined for the type 'FadeAnimation' at lib/animations/FadeAnimation.dart:21:12 • (undefined_method)
error • Can't have modifier 'required' here at lib/pages/HomePage.dart:80:24 • (extraneous_modifier)
error • The modifier 'required' was already specified at lib/pages/HomePage.dart:80:33 • (duplicated_modifier)
error • Can't have modifier 'required' here at lib/pages/HomePage.dart:80:52 • (extraneous_modifier)
error • The modifier 'required' was already specified at lib/pages/HomePage.dart:80:61 • (duplicated_modifier)
error • Can't have modi
@tthtlc
tthtlc / gist:73aed25bd4dc48e63c84ff256e183394
Created December 15, 2022 07:04
Bojana_Food_Delivery_App
- package:file
For solutions, see https://dart.dev/go/unsound-null-safety
../../flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/lib/src/path_provider_windows_real.dart:126:25: Error: The getter 'addressOf' isn't defined for the class 'GUID'.
- 'GUID' is from 'package:win32/src/structs.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
knownFolderID.addressOf, KF_FLAG_DEFAULT, NULL, pathPtrPtr);
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/platform-3.0.0/lib/src/interface/local_platform.dart:46:19: Error: Member not found: 'packageRoot'.
io.Platform.packageRoot; // ignore: deprecated_member_use
diff --git a/android/app/build.gradle b/android/app/build.gradle
index c714168..54fbf6c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -1,8 +1,7 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
- localProperties.load(reader)
@tthtlc
tthtlc / gist:f44148a7cb4d820bf2d3da64638de68c
Created June 20, 2018 17:41
Forensic analysis techniques: linux
http://darksoft.org/webbzr/docs/MyDocs/annotate/head:/Analysis/list.txt?sort=size
Toolset
=======
Tracers:
Function: perf, strace/ltrace
I/O: fatrace, lsof
Profilers:
Function/Tree: perf, valgrind/kcachegrind(slow), google-perftools (low precision)
@tthtlc
tthtlc / problem31.py
Created June 28, 2021 18:34
Project Euler problem 31
count=0
for onep in range(201):
for twop in range(101):
for fivep in range(41):
for tenp in range(21):
for twentyp in range(11):
for fiftyp in range(5):
for apound in range(2):
for twopound in range(2):
@tthtlc
tthtlc / project euler problem 30
Created June 28, 2021 17:41
project euler problem 30
def sum_of_4th_power(a,b,c,d):
sum = a**4 + b**4 + c**4 + d**4
return sum
def sum_of_5th_power(a,b,c,d,e):
sum = a**5 + b**5 + c**5 + d**5 + e**5
return sum
sumsum = 0
for a in range(1,10):
@tthtlc
tthtlc / print_css
Created January 30, 2020 16:05
print css
<style>
code,kbd,pre,samp{font-family:'Inconsolata', monospace}button,hr,input{overflow:visible}img,legend{max-width:100%}audio,canvas,progress,video{display:inline-block}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{padding:0;box-sizing:border-box}ol,pre,ul{margin:0 0 20px}.hljs,pre{overflow-x:auto}.hljs,article,aside,blockquote p,details,figcaption,figure,footer,header,img,main,menu,nav,section{display:block}#wrapper:after,.blog-description:after,.clearfix:after,.post-date:after{content:""}.container,.post-stub,sub,sup{position:relative}.book-landing-with-cover img{box-shadow:5px 5px 8px grey}html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}h1{margin:.67em 0}h1,h2,h3,h4,h5,h6{margin-bottom:20px}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{