Linux Laptop Boot Battery Optimizations
Boot Optimization 🔗 use sudo systemd-analyze critical-chain to get the most time consuming services. If you don’t need those services just disable them by this command sudo systemctl disable …
How to Create Bash Function ?
First step: create a utilities.sh file to add all your bash functions in it. 2nd step: add your bash function/s like this. ## utilities.sh convertMP4toMP3(){ echo -n "Enter source mp4 file : " …
Convert mp4 to mp3 in Linux Terminal
First things first, install the required software packages. Most Linux distros ship with FFmpeg pre-installed but to ensure the required packages are installed, run this command anyway. sudo apt …
Adding GIF image in an ImageView in android
use android-gif-drawable library 🔗 add the following dependency to build.gradle file of your project. dependencies { implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19' } Use …
How to make imageview over another view in Android ?
There are at least 3 ways to put imageview on another imageview. Simple Order 🔗 This way is just put the imageview after the other imageview in XML file. It is simple like that. The first view will be …
Comparing Two Integers in C Programming Language
Here is the code snippet in C programming language. #include <stdio.h> int main() { int a, b; a = 11; b = 99; // to take values from user input uncomment the below lines − // printf("Enter …
Elixir Cheatsheet - Elixir in Brief
Elixir is a dynamic functional compiled language that runs over an Erlang Virtual Machine called BEAM. Erlang and its BEAM is well known for running low-lattency, distributed and fault-tolerant …
Python Cheatsheet
Python sys Variables 🔗 variable meaning argv Command line args builtin_module_names Linked C modules byteorder Native byte order check_interval Signal check frequency exec_prefix Root …
PHP cheatsheet
PHP Array Functions 🔗 array_diff (arr1, arr2 …) array_filter (arr, function) array_flip (arr) array_intersect (arr1, arr2 …) array_merge (arr1, arr2 …) array_pop (arr) array_push …
How to get currently running applications in android ?
Use this code in your app’s `src/MainActivity.kt’ file. import android.app.ActivityManager import android.app.ActivityManager.RunningTaskInfo import android.content.Context import …