All About My Custom Hugo Theme KMT

My ToDo List for 2024 (daily updates)

Design A Blogger Theme - Tutorial

Creating a blogger theme is not difficult as you might think. I searched on Google, read some documentations and tutorials, and I created a Blogger theme. So you can create your own Blogger theme too. You need to know how Blogger theme works? and How blog theme shows up? Is this tutorial for you? 🔗 You must know fundamentals of HTML, CSS, Javascript and XML to understand this tutorial easily. So you can create your own customized blogger theme after this well-documented tutorial.

How to reduce the size of image without losing quality ?

two types of compression 🔗 You can reduce the size of images by compression. But there are two types of compression. lossless compression lossy compression best website to compress images 🔗 There are too many programs, apps and websites to compress images. But I see that website is the best one. In this website you have both types of compression. The lossless compression dosn’t lose quality, yet lossy compression make image lose a tiny amount of details.

Native Lazy Loading Images and Iframes

what is lazy-loading 🔗 Lazy-loading means load this element on demand. We use the lazyloading technique to speed up the web page load time. using lazyloading with images 🔗 Sample code for image element with lazy loading enabled. <img width="" height="" loading="lazy" src="" alt="" /> The loading="lazy" is to load the image on demand. width="200" and height="400" to save the space for the loading image. src="" for the image url.

How to Create File Chooser in Gtk using gotk3 ?

If you just want the complete code snippet, here is it. package main import ( "" "" ) func main() { gtk.Init(nil) win, _ := gtk.WindowNew(gtk.WINDOW_TOPLEVEL) win.SetTitle("sample app") win.Connect("destroy", func() { gtk.MainQuit() }) grid, _ := gtk.GridNew() win.Add(grid) imgview, _ := gtk.ImageNew() pbuf, _ := gdk.PixbufNewFromFileAtScale("./img/default.png", 400, 400, true) imgview.SetFromPixbuf(pbuf) grid.Attach(imgview, 0, 0, 1, 1) textentry, _ := gtk.EntryNew() grid.AttachNextTo(textentry, imgview, gtk.POS_BOTTOM, 1, 1) btnChoose, _ := gtk.ButtonNewWithLabel("Choose An Image") grid.

How to Shutdown your PC using Python ?

If you want to shutdown your Windows PC from your Python code, just use this code snippet. import os os.system("shutdown /s /t 1") Here’s a breakdown of what it does: 1. Import 🔗 import os: This line imports the os module, which provides functions for interacting with the operating system. 2. os.system("shutdown /s /t 1") 🔗 os.system: This function is similar to the system function in C. It takes a command string as an argument and executes it on the operating system.

How to Shutdown PC using C++ ?

If you want to shutdown your Windows PC from your C++ code, use this code snippet. #include <stdio.h> #include <stdlib.h> int main() { system("c:\\Windows\\system32\\shutdown /s"); return 0; } Here’s a breakdown of what this code does: 1. Includes 🔗 <stdio.h>: This header file provides standard input/output functions like printf. However, it’s not directly used in this code. <stdlib.h>: This header file provides general utility functions, including system which is used in this code.

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 🔗 If you are using a UNIX-like OS such as Mac OS X, or a Linux distribution. You can use Homebrew package manager to install Gtk+ as following. brew install Gtk+ Install Gtk+ using apt 🔗 If you are using Debian, Ubuntu, Elementary OS, Linux Mint, .

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 default value of GOGC ? 🔗 The default value of GOGC is 100 which means that the garbage collection process will run when the allocations doubled from previous allocations count.

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 bitmap image on canvas as you like. But if you do not have a bitmap image in code, create a new one using this code snippet. Bitmap bmp=Bitmap.createBitmap(img.getHeight(),img.getWidth(),Bitmap.Config.RGB_565); where img is another bitmap image you want to make a new one with the height and width of it.

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 service-name.service and replace the service-name with the name of the service you want to disable. BIOS Optimization 🔗 Just disable any feature you do not use such as fingerprint scanner. To reboot into your BIOS settings, use this command sudo systemctl reboot --firmware-setup.