Skip to content

Instantly share code, notes, and snippets.

View ishaileshmishra's full-sized avatar

Shailesh Mishra ishaileshmishra

View GitHub Profile
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
@ishaileshmishra
ishaileshmishra / middleware_flutter
Created June 15, 2022 11:39
Implementing Middleware For Flutter
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
@ishaileshmishra
ishaileshmishra / EndlessRecyclerOnScrollListener.java
Created February 19, 2019 06:37 — forked from pratikbutani/EndlessRecyclerOnScrollListener.java
Endless RecyclerView OnScrollListener for pagination
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;