How to Fix (main:30677): Gtk-WARNING **: cannot open display: ?
If you are facing this error (main:30677): Gtk-WARNING **: 05:40:47.665: cannot open display: just install Gtk+ development library, and set the display screen to 0. Installing Gtk+ using Homebrew 🔗 …
How to Tune Garbage Collector in Go Language ?
How to set the GOGC value ? 🔗 You can set its value in the terminal like this. GOGC=200 Or you can change it in yaml file of the environment variable when using docker or kubernetes. What is the …
How to Draw Rectangle on Imageview ?
If you already have a bitmap image in your code, just use this code snippet. bmp = bmp.copy(Bitmap.Config.RGB_565, true); That code will recreate the bitmap image as a mutable. So you can edit that …
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 …