Skip to main content

How to Create multiple directories using command prompt

Using windows command prompt we can create multiple directories at once in easy steps as defined below.

Step 1) Open Windows command prompt by typing “cmd” in type here to search and press enter. After Pressing enter windows will open command prompt.

Type CMD to open command Prompt
Windows Command Prompt

Step 2) Change Directory where you need to create multiple directory. For example here we are creating multiple directories under “F:\multipledirectory\” folder so we need to navigate to that directory.

So first command we are giving is f: and pressing enter key

f:\

now second command we are giving is ” cd multipledirectory ” and pressing Enter key

cd multipledirectory

Now type “dir” and press enter to check if any existing subdirectories are available or not.

Now to create multiple directory in one command you need to use “md” command by providing directory names like below

md one two three four

multiple directories using command prompt

So if you observe here using command prompt we have created multiple directories only by using single command “md”

How to Install python on Windows step by step guide

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Python language is popular for data science and analytics. Many data processing software use python. Many python libraries are used in machine learning projects.

Here is step by step guide to install python on windows machine.

It is important to download latest version from python official site only.

Step 1) Navigate to Python Site https://www.python.org/downloads/ for downloading latest version

Python Official Site

Step 2) Click on button “Download Python 3.10.0” ( In future this version may change to try to select latest version)

Step 3) After clicking on “Download Python 3.10.0” Site will download exe file to download folder section

downloaded folder view section

Step 4) Double click on exe file “python-3.10.0-amd64.exe” and Run the Setup

Python Installation Screen

Step 5) Select Check box “Add Python 3.10 to Path” and then click on Install Now Button

Add Python 3.10 selected

Step 6) Wait for installer to complete installation

Python installation is in progress

It will take couple of minutes for installation.

Step 7) System will give successful message along with path limitation (which can be ignored). Click on Close Button

Python Installed Successfully message

Step 8) Now go to command prompt to check if python is installed or not. Type cmd in Windows Search option and press enter. After displaying command prompt type python and you will get below message.

Python successful installation version message

To Start coding in python or to write first program in python we can use default editor “IDLE”. IDLE (Integrated Development and Learning Environment) is a default editor that comes with Python.

To open default editor type IDLE in Windows “Type here to Search” section and hit Enter

IDEL Default Editor for python

System will display below editor

Click on File -> New File

System will display editor to write new program for specific file.

Happy Learning and Coding

You can refer these program to explore python more and can run python code on online compiler as well.

Convert Kilometers to Miles in python

Simple 3 line python program to convert user input kilometer to miles

#Accept Distance in Kilometer 
#from km to miles need to divide appx  1.609344


km=float(input("\n\t Enter Kilometer to Convert it in miles: "))


#Now converting kilometer to Miles

miles=float((km/1.609344))

print("\n\t %f kilometer in Miles are %f "%(km,miles))

Output

	 Enter Kilometer to Convert it in miles: 3

	 3.000000 kilometer in Miles are 1.864114

Python Program to Find Largest & Smallest among N Numbers

In Python there are many ways to identify largest or smallest number from user input. Here we are using for loop.

nrange = int(input("\n\t From how many numbers you want to find smallest & largest number\t"))
num = int(input("\n\t Enter number 1 ==>\t"))
min_num = num
max_num = num
for x in range(nrange-1):
 
    num=int(input('\n\t Enter number %d ==>\t'%(x+2)))
    if ( num < min_num ):
        min_num = num
    if ( num > max_num ):
        max_num = num

print('\n\t Maximum number is %d'%(max_num))
print('\n\t Minimum number is %d'%(min_num))

Output


	 From how many numbers you want to find smallest & largest number	3
3

	 Enter number 1 ==>	3

	 Enter number 2 ==>	3

	 Enter number 3 ==>	4

	 Maximum number is 4

	 Minimum number is 3
>>> 

In above program we are accepting first number from user and declaring it as maximum and minimum number.

Further in for loop we are accepting numbers from user and comparing it with variables maximum and minimum to interchange.

Recommended to write logic on paper and execute it manually then use editor.

C Program to Find Largest & Smallest among N Numbers

There are many ways to identify largest or smallest number from user input. Here we are using for loop.

// Program to find smallest and largest number from user input.

#include<stdio.h>
void main()
{
    int large,small,no,range,i;
    printf ("\n\tFrom how many numbers you want to identify smallest and largest\t");
    scanf ("%d", &range);
    printf ("\n\tEnter  number 1==>");
    scanf ("%d", &no);
    large = no;
    small=no;
    for (i=1; i<= range -1 ; i++)
    {
        printf ("\n\t Enter number %d ==> ",i+1);
        scanf ("%d",&no);
        if (no >= large)
        large = no;
        if (no <= small)
        small = no;
    }//end of For loop
    printf ("\n\t The largest number is %d", large);
    printf ("\n\t The smallest number is %d", small);

}

Output

 From how many numbers you want to identify smallest and largest 6

        Enter  number 1==>11

         Enter number 2 ==> 11

         Enter number 3 ==> 22

         Enter number 4 ==> 22

         Enter number 5 ==> 33

         Enter number 6 ==> 44

         The largest number is 44

         The smallest number is 11

We can write this program using various loop and logic.

Program for KiloMeters to mile In C

Here is C Program – Complete code to convert kilometers to mile by accepting user input.

Formula used in program is : miles=(km/1.609344);

//Accept Distance in Kilometer 
// from km to miles need to divide appx  1.609344

#include<stdio.h>
#include<conio.h>

void main()
 {
   float km,miles;// declaring variable as float as km can be in decimal.

   printf("\n\t Enter Kilometer to Convert it in miles: ");
   scanf("%f",&km);    //%f Read float value

   //Now converting kilometer to Miles

   miles=(km/1.609344);

   printf("\n\t %f kilometer in Miles are %f ",km,miles);
   getch();
 }

OUTPUT

    Enter Kilometer to Convert it in miles: 1

         1.000000 kilometer in Miles are 0.621371 

Most useful Microsoft Excel shortcuts

Below are daily required shortcuts for Microsoft excel. These shortcuts save lot of time while working.

  1. Ctrl+W: Close a workbook
  2. Ctrl+O: Open a workbook
  3. Alt+H: Go to the Home tab
  4. Ctrl+S: Save a workbook
  5. Ctrl+C: Copy Content
  6. Ctrl+V: Paste Content
  7. Ctrl+Z: Undo action
  8. Delete: Remove cell contents
  9. Alt+H, H: Choose a fill color
  10. Ctrl+X: Cut
  11. Alt+N: Go to Insert tab
  12. Ctrl+B: Bold
  13. Alt+H, A, C: Center align cell contents
  14. Alt+P: Go to Page Layout tab
  15. Alt+A: Go to Data tab
  16. Alt+W: Go to View tab
  17. Shift+F10, or: Open context menu
  18. Context key: Alt+H, B: Add borders
  19. Alt+H, D, C: Delete column
  20. Alt+M: Go to Formula tab
  21. Ctrl+9: Hide the selected rows
  22. Ctrl+0: Hide the selected columns

source: Microsoft

Most Useful shortcuts for chrome in Windows

Below are most useful shortcuts for chrome browser in windows operating system.

  1. Ctrl + n: Open a new window
  2. Ctrl + Shift + n: Open a new window in Incognito mode
  3. Ctrl + t: Open a new tab
  4. Ctrl + Shift + t: Reopen closed tabs
  5. Ctrl + Tab or Ctrl + PgDn: Switch to next open tab
  6. Ctrl + Shift + Tab or Ctrl + PgUp: Jump to the previous open tab
  7. Ctrl + 1 through Ctrl + 8: Swtich to Jumpt to a specific tab
  8. Ctrl + 9: Jump to the rightmost tab
  9. Alt + Home: Open home page in the current tab
  10. Alt + Left arrow: Open the previous page from history in the current tab
  11. Alt + Right arrow: Open the next page from browsing history in the current tab
  12. Ctrl + w or Ctrl + F4: Close the current tab
  13. Ctrl + Shift + w or Alt + F4: Close the current window
  14. Alt + Space then n: Minimize the current window
  15. Alt + Space then x: Maximize the current window
  16. Alt + f then x: Quit Google Chrome

source google

How to convert notepad file to CSV

Data entered in Notepad file should be comma separated.

For example if text file contains below data like two columns and in each row data content is separated by comma.
Now save the file as “test.csv” and Open It.

Else Copy below data as it is in text file. Use File -> Save As option and provide any file name with extension csv in inverted quotes like “test.csv” and save it.
double click on file and file should open in csv format.

Use below data to copy in notepad and save it as stated above. Or you can try to create your own data by adding comma in each row.

Language,Link
C,https://ethosspace.com/programmers/code-to-write-fibonacci-series-for-number-of-elements-as-per-user-input/
Python,https://ethosspace.com/programmers/how-to-replace-blank-spaces-in-string-in-python/
Python,https://ethosspace.com/programmers/python-code-to-print-key-value-in-dictionary-like-maximum-specific-record/
C,https://ethosspace.com/programmers/c-program-to-count-total-vowel-consonant-in-sentence/

Also there are many online tools which are available on google to convert data from notepad to csv but again security of data is always matters.

So try use tools which don’t store any data or don’t perform any server call.

How to add social share icon in WordPress without plugin

Here is 10 line code that needs to add in the single.php file. This will avoid external calls, maintenance of plugins and improve speed.

Step 1) Navigate to “Appearance” -> Theme Editor

Step 2) Observe Theme Files section available on Right side of the page (in middle)

Step 3) Search for single.php file (available in functions.php section)

Step 4) Click on Single.php File .. .System will open it in write mode.

Step 5) Add below code before or after content in a single.php file. ( Just above main or primary section or above to sidebar or footer section)

<?php $url = urlencode(get_the_permalink()); $title = htmlspecialchars(urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8'); ?>
 
<div class='social-share'>
<a class='fb' target="_blank" href="http://www.facebook.com/sharer.php?u=<?php echo $url;?>">Facebook</a>
<a class='tw' target="_blank" href="https://twitter.com/intent/tweet?url=<?php echo $url;?>&text=<?php echo $title; ?>">Twitter</a>
<a class='pi' href="javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());">Pinterest</a>
<a class='go' target="_blank" href="https://plus.google.com/share?url=<?php echo $url;?>">Google+</a>
<a class='li' target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $url;?>">Linkedin </a>
<a class='wh' href="whatsapp://send?text=<?php echo ($title ." ". $url);?>">WhatsApp</a>
<a class='ma' target="_blank" href="mailto:?subject=<?php echo $title;?>&body=%20<?php echo $url;?>">EMAIL</a>
</div>

Source : barattalo

Step 6) Add below CSS code to design social text as button. Below code can be added in external CSS plugin or Themes -> Customize->Additional CSS Section.

.social-share {margin:20px 0;}
.social-share a {
    display:inline-block; width:auto; height:30px; 
    background-color:#efefef; text-decoration:none;
    line-height:30px; padding:0 10px;
    font-size:10px;color:#fff!important;
    letter-spacing:0.4;text-transform:uppercase;
}
.social-share a.fb {background-color:#3a5795;}
.social-share a.tw {background-color:#00ccff;}
.social-share a.go {background-color:#ff6633;}
.social-share a.pi {background-color:#ff0000;}
.social-share a.li {background-color:#3366ff;}
.social-share a.wh {background-color:#009900;display:none;}
.social-share a.ma {background-color:#999999;}
@media only screen and (max-width: 480px) {
    .social-share a.wh {display:inline-block;}
}

Whats app share icon is visible only on mobile phone. Can change settings by editing css.

In place of text button we can also use fab class for example =’fab fa-facebook’ to convert them in icon. and css for this is “.social-share a.fab.fa-facebook {background-color:#3a5795;}”