Category Archives: ANDROID

30 most common SQL queries with examples

By | March 18, 2025

Here are the 30 common SQL queries with examples. These cover a wide range of database operations from basic to more advanced. Basic SELECT Queries Filtering and Conditions Aggregations and Grouping Joins Subqueries Data Modification Advanced Queries These queries cover the most common operations you’ll need when working with SQL databases. Each example can be… Read More »

# Building a Smooth Animated Image Carousel in Flutter

By | March 4, 2025

Introduction A well-designed image carousel can greatly enhance the user experience in Flutter apps. In this article, we will create a **beautiful and interactive image slider** using **CarouselController**. We’ll add smooth animations, navigation buttons, and loading indicators to improve usability. Prerequisites To follow along, make sure you have Flutter installed. If you haven’t set it… Read More »

Flutter Best Practices – Part 1

By | January 25, 2025

Video Tutorial Here is the first part of best practices in Flutter… 1. Placeholder Widgets Use SizedBox instead of Container as Placeholder widgets. Take a look at the below use-case The SizedBox is a const constructor and creates a fixed-size box. The width and height parameters can be null to indicate that the size of the box should not… Read More »

Wrap Widget & Chip Widgets in Flutter

By | January 23, 2025

Wrap widget is such a useful widget in many circumstances. Here we will learn about different types of Chip Widgets such as & Wrap Widgets Watch Video Tutorial First Let’s create a simple Chip Widget. Widget chip(String label, Color color) { return Chip( labelPadding: EdgeInsets.all(5.0), avatar: CircleAvatar( backgroundColor: Colors.grey.shade600, child: Text(label[0].toUpperCase()), ), label: Text( label, style:… Read More »

Creating a CarouselView in Flutter

By | January 22, 2025

This post provides a step-by-step guide to implementing a carousel slider in Flutter using a custom CarouselView widget. The code demonstrates how to display a horizontal carousel of images with various customization options. Demo Full code Example import ‘package:flutter/material.dart’;List<String> images = [ “https://images.unsplash.com/photo-1503376780353-7e6692767b70”, “https://images.unsplash.com/photo-1577714141096-bf2b9e69500a”, “https://images.unsplash.com/photo-1542362567-b07e54358753”, “https://images.unsplash.com/photo-1511407397940-d57f68e81203”, “https://images.unsplash.com/photo-1659671026913-b7e632f17395”];class Home extends StatefulWidget { const Home({super.key}); @override State<Home>… Read More »

Comparison of the Latest AI Chat Models in 2024: OpenAI o1, Google Gemini 2.0, xAI Grok-2, Meta Llama 3.3, and Nvidia Nemotron-4 340B

By | December 22, 2024

Feature OpenAI o1 Google Gemini 2.0 xAI Grok-2 Meta Llama 3.3 Nvidia Nemotron-4 340B Developer OpenAI Google xAI (Elon Musk’s startup) Meta Nvidia Release Date December 2024 December 2024 December 2024 December 2024 December 2024 Key Focus Problem-solving, STEM, competitive programming Efficiency, advanced reasoning Integration with X (formerly Twitter) Open research, accessible to developers Open… Read More »

Flutter 3.27 Updates in Brief

By | December 22, 2024

Flutter 3.27, released in December 2024, introduces several enhancements across the framework, engine, and developer tools, aiming to improve performance, user interface components, and the overall development experience. Framework Enhancements: • Cupertino Widget Updates: Significant improvements have been made to Cupertino widgets to better align with iOS design standards: • CupertinoCheckbox and CupertinoRadio: Enhanced sizes,… Read More »

How to Use Streams to Download a File in Flutter

By | December 22, 2024

In Flutter, Streams are a powerful way to handle asynchronous data like file downloads. When downloading a file, streams can help you process chunks of data in real time, making it easy to show progress to the user. Here’s a step-by-step guide on how to download a file using streams in Flutter. Add Required Dependencies… Read More »

3 Simple ways to use Debouncer in Flutter

By | August 26, 2024

Watch Video Tutorial Using Simple Timer Create a simple debouncer class Implementation: Using ValueNotifier Implementation: Using “Simple Debouncer” package First Add easy_debouncer package in your dependencies https://pub.dev/packages/easy_debounce Source Code https://github.com/MrVipinVijayan/flutter_tutorials/tree/feat/debounce

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. Find the minimum element in O(log N) time. You may assume the array does not contain duplicates.

By | August 22, 2024

To find the minimum element in a rotated sorted array in O(log⁡N)O(\log N)O(logN) time, you can use a modified binary search approach. The key observation is that even though the array is rotated, one part of the array will still be in sorted order. By comparing elements in the middle of the array with the… Read More »

Given a 2D board of characters and a word, find if the word exists in the grid.

By | August 5, 2024

The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once. For example, given the following board: exists(board, “ABCCED”) returns true, exists(board, “SEE”) returns true, exists(board, “ABCB”) returns false. Python def exist(board, word):    if not board:        return False   … Read More »

What are optionals in swift?

By | March 14, 2024

In Swift, optionals are a powerful feature that allows variables or constants to have a value or be nil, indicating the absence of a value. Optionals are represented using the Optional type, which is an enumeration with two cases: Some(Wrapped) to represent a value, and nil to represent the absence of a value. Here are… Read More »

Implement a stack API using only a heap. A stack implements the following methods:

By | January 31, 2024

Recall that a heap has the following operations: To implement a stack using only a heap, you can use a max heap and maintain a counter to ensure that the order of elements is preserved. Here’s an example implementation in Python, Java, and JavaScript using the heapq module (Python), PriorityQueue (Java), and BinaryHeap (JavaScript): Python:… Read More »

Handling exception in Ruby

By | January 30, 2024

In Ruby, exception handling is done using the begin, rescue, else, and ensure blocks. Here’s a basic structure of a begin-rescue block: Let’s break down the components: Example with a specific exception: In this example: As with any language, it’s good practice to catch only the exceptions you expect and handle them appropriately. Avoid catching… Read More »

How to do exception handling in python?

By | January 29, 2024

Exception handling in Python is done using the try, except, else, and finally blocks. Here’s a basic structure of a try-except block: Let’s break down the components: Example with a specific exception: In this example: You can customize exception handling based on the specific requirements of your code. It’s generally a good practice to catch… Read More »

What are python name spaces?

By | January 27, 2024

In Python, a namespace is a container that holds a set of names (identifiers) and their corresponding objects. It serves as a mapping between names and objects, allowing you to organize and manage the scope of variables, functions, classes, and other identifiers in your code. Namespaces help avoid naming conflicts and provide a way to… Read More »

Given a string of parentheses, find the balanced string that can be produced from it using the minimum number of insertions and deletions

By | January 25, 2024

Given a string of parentheses, find the balanced string that can be produced from it using the minimum number of insertions and deletions. If there are multiple solutions, return any of them. For example, given “(()”, you could return “(())”. Given “))()(“, you could return “()()()()”. To find the balanced string with the minimum number… Read More »

What is inout parameter in swift?

By | January 24, 2024

In Swift, inout is a keyword used to indicate that a parameter is passed by reference and can be modified inside a function, affecting the original value outside the function. This allows a function to modify the value of the parameter and have those changes reflected in the calling scope. Here’s an example to illustrate… Read More »