This file contains 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
Quantum computing is a type of computing that uses quantum-mechanical phenomena, such as superposition and entanglement, to perform operations on data. These operations can be performed much faster than those of classical computers, and can also be used to solve problems that classical computers cannot. | |
In a classical computer, data is stored and processed using bits, which can have a value of either 0 or 1. In a quantum computer, data is stored and processed using quantum bits, or qubits, which can be in a state of superposition, meaning they can be in multiple states at the same time. This allows quantum computers to perform certain types of calculations much more quickly than classical computers. | |
One of the most famous example of a problem that is hard for classical computers but easy for quantum computers is known as the factoring problem. Factoring is the process of finding the prime numbers that multiply together to form a given number. For example, if the given number is 12, the prime factors are 2 a |
This file contains 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
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 |
This file contains 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
public abstract class EndlessRecyclerViewScrollListener extends RecyclerView.OnScrollListener { | |
// The minimum amount of items to have below your current scroll position | |
// before loading more. | |
private int visibleThreshold = 5; | |
// The current offset index of data you have loaded | |
private int currentPage = 0; | |
// The total number of items in the dataset after the last load | |
private int previousTotalItemCount = 0; |