Skip to content

Programming Articles

  • HOME
  • Python
  • JavaScript
  • C/C++
  • Java
  • Terms & Conditions and Privacy Policy
  • About US
Main Menu
Latest / Python HowTos

How to sort a list in Python

In this article, we’ll learn how to sort list, list of dictionaries, and list of tuples in Python. We can sort lists, lists of tuples, and list of dictionaries in …

How to sort a list in Python Learn More
C Examples / C/C++

How to extract numbers from a string in C?

In this article, you’ll learn how to get numbers from a string in C with examples. There are many ways to do that, but my favorite a recommended method is …

How to extract numbers from a string in C? Learn More
Latest / Linux

Is Linux an Operating System?

This article answers one of the most asked questions, “Is Linux an operating system?”. Most of it is discussed in the history of Linux and UNIX, where I explained how …

Is Linux an Operating System? Learn More
FEATURED / Latest / Linux

From UNIX to Linux – History of Linux

You’ve probably heard about Linux or at least the word Linux. You might even know it’s an operating system, in fact, it’s the kernel used at the heart of the …

From UNIX to Linux – History of Linux Learn More
FEATURED / Linux

Best themes for Ubuntu: Make Ubuntu Beautiful

In this article, you’ll learn about the best themes for Ubuntu and how to install themes on Ubuntu to create a cool Ubuntu desktop using available themes. Linux is all …

Best themes for Ubuntu: Make Ubuntu Beautiful Learn More
C Examples / Examples

C program to delete an element from an array

This C program takes the position as input from the user and deletes the element of array at that position.In this program, the original array and its size is also …

C program to delete an element from an array Learn More
C Examples / Examples

Insertion sort in C

In this post, you’ll learn about the insertion sort algorithm in C and how to implement it in the C programming language with and without a function using example programs. …

Insertion sort in C Learn More
C Examples / Examples

Selection sort in C

In this article, you’ll learn about the selection sort algorithm and its implementation program in the C programming language with and without a function in easiest possible way. Selection sort …

Selection sort in C Learn More
C Examples / Examples

Bubble sort in C

In this article, you’ll learn about the bubble sort algorithm and how to implement it in the C programming language with and without a function in easiest way. Bubble sort …

Bubble sort in C Learn More
Python

Data types in python | Python tutorial

There are mainly 7 data types in python: Numerical String List Tuple Dictionary Set Range Let’s try to understand these data types. 1. Numerical data types Numerical data types mainly …

Data types in python | Python tutorial Learn More
FEATURED / Python

Strings in Python

string in python is one of the most important and interesting data type. . .

Strings in Python Learn More
How To / Linux

How to install Visual Studio Code on Ubuntu?

Microsoft’s Visual Studio Code is the IDE for both novice and professional software/application developers. It is very easy to use and no expensive resources are required to run this IDE. …

How to install Visual Studio Code on Ubuntu? Learn More
Python

Learn Python programming- Getting started

This article covers the most common query – How to start programming in python? Start python by running the Python interactive prompt.Just type python (or python3 if you’ve both python …

Learn Python programming- Getting started Learn More
FEATURED / Latest / Python

Is Python hard to learn? Top best learning resources

Is python hard to learn? How long to learn python? Is python easy to learn? there are many similar questions that come to one’s mind while starting to learn python. This article will clear your all the doubts related to the language and you’ll get the best resources to learn python at the end.

Is Python hard to learn? Top best learning resources Learn More
Python / Python HowTos

How to pad a string with zeroes to the left?

This is a very frequently asked question, how do I pad a numeric string with zeroes to the left, so that the string has a specific length? In this article, …

How to pad a string with zeroes to the left? Learn More
Java / Programming

What is the difference between process and thread?

The major difference between process and thread is that threads (of the same process) run in shared memory space, while processes run in separate memory spaces. Let’s learn more about …

What is the difference between process and thread? Learn More
Java

How to generate a random alpha-numeric string in Java?

Algorithm To generate a random string, concatenate characters drawn randomly from the set of acceptable symbols until the string reaches the desired length. Implementation Here’s some fairly simple and very …

How to generate a random alpha-numeric string in Java? Learn More
CSS / Web Development

How to auto-resize an image to fit a ‘div’ container?

Here is a solution that will both vertically and horizontally align your img within a div without any stretching even if the image supplied is too small or too big …

How to auto-resize an image to fit a ‘div’ container? Learn More
Docker

How to get a Docker container’s IP address from the host?

The –format option of inspect comes to the rescue. Modern Docker client syntax is: Old Docker client syntax is: These commands will return the Docker container’s IP address. As mentioned in the comments: if …

How to get a Docker container’s IP address from the host? Learn More
JavaScript

How to display a JavaScript object?

Use native JSON.stringify method. Works with nested objects and all major browsers support this method. Link to Mozilla API Reference and other examples. Use a custom JSON.stringify replacer if you encounter this Javascript error How to display a …

How to display a JavaScript object? Learn More
Linux / Ubuntu

How to enable or disable services in Ubuntu?

There are services that can be enabled/disabled using the GUI (like the startup application) or the terminal. For the Terminal you have several options. First, open a terminal (Type “terminal” in the …

How to enable or disable services in Ubuntu? Learn More
Linux / Ubuntu

Error message “sudo: unable to resolve host (none)”

Sample query: When I run sudo the terminal is stuck for a few seconds and then outputs an error message. My terminal looks like this: What can I do to solve it? …

Error message “sudo: unable to resolve host (none)” Learn More
Bash / Docker / Linux

How to get bash or ssh into a running container in background mode?

Sample query: I want to ssh or bash into a running docker container. Please, see example: Now I want to get something like this (go into the running container): $ …

How to get bash or ssh into a running container in background mode? Learn More
Linux / Ubuntu

How to upgrade a specific package using apt-get?

You just need to do apt-get install –only-upgrade <packagename>. This will upgrade only that single package, and only if it is installed. If you wish to install the package if it …

How to upgrade a specific package using apt-get? Learn More
Linux

How to list, add, modify, and delete users using terminal?

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below: OR You can also use awk: How to list, add, modify, and delete users using terminal? …

How to list, add, modify, and delete users using terminal? Learn More
Cron / Linux

Where is the cron/crontab log?

On a default installation the cron jobs get logged to You can see just cron jobs in that logfile by running If you haven’t reconfigured anything,the entries will be in …

Where is the cron/crontab log? Learn More
Docker / Linux

How to use docker without sudo?

In this article, we’ll learn how to use docker without sudo. If you want short answers, jump to the next answer below. Good news: the new docker (version 19.03 (currently …

How to use docker without sudo? Learn More
Command Line Interface- CLI / Linux

How to determine the total size of a directory from the terminal?

The command du “summarizes disk usage of each FILE, recursively for directories,” e.g., -h is to get the numbers “human readable”, e.g. get 140M instead of 143260 (size in KBytes) -s is for summary (otherwise you’ll get not …

How to determine the total size of a directory from the terminal? Learn More
Linux / Ubuntu

Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

Here are multiple solutions to resolve this issue, but if the first 2 don’t work out, jump to the 5th answer. Remove your /var/lib/dpkg/lock file and force package reconfiguration. It should work …

Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? Learn More
Command Line Interface- CLI / Linux

How to save the terminal output to a file?

In this article, we’ll learn how to save the output from the terminal to a file. The first question is, is it possible? Yes it is possible, just redirect the …

How to save the terminal output to a file? Learn More
Linux

“The following packages have been kept back:” How to solve it in Linux?

According to an article on debian-administration.org, If the dependencies have changed on one of the packages you have installed so that a new package must be installed to perform the upgrade …

“The following packages have been kept back:” How to solve it in Linux? Learn More

Posts navigation

1 2 … 30 Next

Featured Posts

From UNIX to Linux – History of Linux

21st November 202010th September 2022

Best themes for Ubuntu: Make Ubuntu Beautiful

20th October 202010th September 2022

Strings in Python

12th September 202010th September 2022

Is Python hard to learn? Top best learning resources

18th April 202010th September 2022

Recent posts

  • How to pad a string with zeroes to the left?
  • What is the difference between process and thread?
  • How to generate a random alpha-numeric string in Java?
  • How to auto-resize an image to fit a ‘div’ container?
  • How to get a Docker container’s IP address from the host?
  • How to display a JavaScript object?
Copyright © 2023 Programming Articles.
Powered by WordPress and HitMag.