Category: Tech-Electronics

How to parse and read XML log files CLI Linux
How to parse and read XML log files in CLI Linux – multiple files with multiple tags. Applications can log as xml and you might need to read those log files.These files can be later processed by a log aggregator application. A simple command to monitor the latest entries in your logs across multiple files.You…
Find top visiting ip with Awk
Find top visiting ip with AwkHow to find top visiting ip with Awk list in apache logs in CLI Linux. You can use the Awk programming language to extract the field you need from the Apache / Httpd access logs.Then you can chain multiple commands to have the desired output.You can also modify this to…

Random Password generator in Python
Random Password generator in Python How I wrote a random secure password generator in Python in 30 min. What I needed was a small script that I execute and generate a random password that is then copied to the clipboard and all I had to do was paste it Ctrl+V to use it. Every time…

How to reverse a string in Python 3
To reverse a string in Python the bellow are the best ways so far: Write [::-1] to do slicing in Python starting at first character, until last, step by 1 in reverse (-1). It’s a pretty nice way to impress your imaginary friends. Option 1 Option 2 Whole code demo Write a comment or no,…
How to reverse integer in Python 3
How to reverse an integer in Python 3. In Python 3 int type is the same as long so there is no need to check for int overflow. In other cases you will have to check for integer max value and min value to avoid a stack overflow. The steps are bellow with each testing…

Find the missing number in an array
Computer science job interview question:Find the missing number in the series.Write a program to calculate the missing number in the series of integers. There are multiple ways to do this bu using the Gauss Sum addition method is a nice trick and it’s faster than any brute-force iteration you might think of.More info https://en.wikipedia.org/wiki/Gauss_sum The…

How to take a screenshot on Android MIUi Xiaomi
There are 3 ways to screenshot on a Xiaomi MIUI 12 smartphone or tablet. 1. Swipe down to show the top menu then press on Screenshot.this will take a screenshot and save it for you.2. Press the power button + Volume down button simultaneously. a screenshot is taken in the same way and tou have…








