Skip to content

Instantly share code, notes, and snippets.

View FriesI23's full-sized avatar

Fries_I23 FriesI23

View GitHub Profile
@FriesI23
FriesI23 / binary_search_tree.py
Created September 24, 2024 11:11
Implementation for Binary Search Tree (BTS) in Python that uses predecessor node instead ofparent one.
# coding: utf-8
# MIT License
#
# Copyright (c) 2024 FriesI23
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@FriesI23
FriesI23 / binary_search_tree.py
Last active September 24, 2024 11:08
Standard implementation for Binary Search Tree (BTS) in Python.
# coding: utf-8
# MIT License
#
# Copyright (c) 2024 FriesI23
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@FriesI23
FriesI23 / main.dart
Created May 11, 2024 10:48
Flutter ProxyProvider && ChangeNotifierProxyProvider Example
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PlayerInfo with ChangeNotifier {
String? accountName;
int id;
String name;
int level;
PlayerInfo({
@FriesI23
FriesI23 / main.dart
Last active May 11, 2024 09:40
Flutter FutureProvider && StreamProvider Example
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class InfoModel {
late final String name;
late final String addr;
late int age;
late final Future<bool> _init;
@FriesI23
FriesI23 / main.dart
Last active May 11, 2024 09:40
Flutter ChangeNotifierProvider Example
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class InfoModel with ChangeNotifier {
final String name;
final String addr;
int _age;
int _version = 0;
@FriesI23
FriesI23 / main.dart
Last active May 11, 2024 09:41
Flutter Provider Example
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class InfoModel {
final String name;
final String addr;
int age;
InfoModel(this.name, this.addr, this.age);
@FriesI23
FriesI23 / remove_nextcloud_apps_extra_files.py
Created June 25, 2023 09:06
Small script to remove all EXTRA_FILES automatically after upgrade Nextcloud
# coding: utf-8
#
# Copyright © 2023 FriesI23@FriesI23@outlook.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the “Software”), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: