Skip to content

Instantly share code, notes, and snippets.

@manofi21
manofi21 / main.dart
Last active February 12, 2023 03:25
Memoized Log Cutting(Complete)
import 'dart:math';
void main() {
// final p = [ 0, 1, 5, 8, 9, 10, 17, 17, 20, 24, 30, 32, 35, 39, 43, 43, 45, 49, 50, 54, // 1X's
// 57, 60, 65, 68, 70, 74, 80, 81, 84, 85, // 2X's
// 87, 91, 95, 99, 101, 104, 107, 112, 115, 116, // 3X's
// 119, 121, 125, 129, 131, 134, 135, 140, 143, 145, // 4X's
// 151
// ];
@manofi21
manofi21 / main.dart
Created February 9, 2023 10:11
Regex for check first chracter is gs:// or https
void main() {
final autodata = "gs://aksdjasdsad";
final autoCheckRx = RegExp('(?:(?: G|^gs://)|(?: G|^https:))');
print(autoCheckRx.hasMatch(autodata));
}
@manofi21
manofi21 / juni.md
Last active July 30, 2023 10:52
my daily commit github #Daily
@manofi21
manofi21 / create file in D:.md
Last active May 22, 2022 03:26
basic_simple #Flutter_practice

Add D: location folder C:...........> cd D:....\flutter_practice

add "d:" C:...........> d:

"flutter crate ...." D:....\flutter_practice> flutter crate ....

@manofi21
manofi21 / how_to_use_localization.md
Last active May 15, 2022 19:15
Localization #Flutter_practice

Flutter_Project: Localization

Practicing how to use localization in a project.

1. Getting Started (Using CodeTour)

a. Download Codetour in VS Code.
2022-05-14_12h25_41

b. open CodeTour in explorer

@manofi21
manofi21 / 11_8_2022.md
Last active August 10, 2022 23:12
practice #code-wars
@manofi21
manofi21 / 26_04_2022.md
Last active August 13, 2022 09:51
Fundrasing_group #fundrasing
// Tambah variable state provider untuk nilai yang bisa di ubah2.
final pageIndexProvider = StateProvider<int>((ref) => 1);
// Tambah provider yang hanya bisa update jika nilai dari pageIndexProvider
// ! note: Nilai dalam provider tidak bisa di ubah dari luar, untuk menghindari rebuild yang tidak perlu.
final canGoToPreviousPageProvider = Provider<bool>((ref) {
return ref.watch(pageIndexProvider) == 0;
});
class PreviousButton extends ConsumerWidget {
@manofi21
manofi21 / sy_travel_animation_description.md
Last active July 3, 2021 09:53
penjelasan project sy travel animation dari videf

1. MainPage project

a. persiapan pertama project

  • StatefulWidget : State widget yang digunakan.

  • Variable animasi : variable untuk menentukan animasi page dan widget.

  late AnimationController _animationController;
  late AnimationController _mapAnimationController;
  final PageController _pageController = PageController();