Monday, October 26, 2020

How to make Github pages

Friday, October 23, 2020

How to fix tech docs

 One of the recent GitHub surveys reveals that one of the top problems with open source projects is incomplete or confusing documentation.



1. Explain the tool interface and its components! . Like some tools are really difficult to use. so this interface and components are really helpful.


2. Give examples with images, gif, charts, graphs, etc. I mean just add visuals to make the journey of documentation beautiful.


3. Provide text/ video tutorials and how-tos. Like you can build a separate section of Tutorials!

Well you can create a gallery of high-level tuts and how-tos 


4. There are 2 types of documentation: API and GUI documentation.


API documentation is a bit biased towards the developers and GUI is more of a work for UI UX designers.


5. You can create a section dedicated to beginners only.


6. You need to create a virtual environment on your local machine in order to understand the tech, tools, and docs of the organization like GIT, NPM, etc.


7. Present examples in a visual way if possible.











Tuesday, October 20, 2020

How to control github from gitbash





For this first download the Git windows app. Basically git is a version control system to track the changes made in a project repository. Like who , when and what changes.

to add new files to the already existing repo

1. First tell the git that who are you. Set your user name and user email when you just started working on git. 

git config --global user.name "Vikas Singh'

git config --global user.email "44vikasrajput44@gmail.com"

2. Now you have to create a separate folder by any unique name on your local machine. This is the folder that will contain the changes that you want to make in any repository. But before that, you have to switch to the directory where you want to create a new folder. 

like I want to switch to Downloads folder. 

cd Downloads

3. Create a separate folder by any unique name on your local machine. This is the folder that will contain the changes that you want to make in the repository.

 mkdir mygit

4. Now again switch to mygit folder as we want to do all our work there.

cd mygit


5. Now initialize git. This code will initialize an empty repo in mygit folder

git init 

6. Now make a copy of the repo on which you want to work

git clone repolink

7. Now again switch to the repo

cd reponame

8.Now create a new branch

git branch branchname

9.Now switch to the newly created branch

git checkout branchname

10. Add files to this new branch 

git add filename.txt

ALERT: You can check  the current status of the current repo by this comand below

git status

11. now stage the changes before you commit.

git add filename.txt

12 commit the changes with message

git commit -m "commitmessage"

13.final step is to push the change into Github

git push origin newbranchname

14.by the time you can check your repo status by the above command i told you. or you can check its status by going to the github and there you can create a pull request. 

ALERT: You can check the history of repo by this command.

git log

________________________________________________

git init

use this above command when you start something new!

Make edits using git bash

create a directory on your local machine

switch to that directory

Initialize git with git init

clone /fork the repo in that directory

switch to the repo directory 

create a new branch

switch to the new branch

make the changes

stage  the changes by git add filename

commit the changes 

finally push the changes


Saturday, October 17, 2020

Use multiple Mozilla windows for multitasking

Title : Multitasking using multiple Mozilla windows



What google says about multitasking?

Multitasking is the ability of computers to use several programs at the same time.

Some simple examples include: chewing gum while exercising, sending emails in meetings, talking on a phone while watching. 

But here we will be discussing multitasking on computer using Mozilla tabs.


Why multitasking is important?

As time is money and with multitasking, you can save a lot of your time. It is like killing 2 birds with a stone.

In the case of multitasking, data can be easily and quickly copied and pasted or dragged and dropped between 2 windows.

Multitasking with Mozilla windows

Basically, we have to split multiple windows to achieve multitasking.

Here you can either use the split option that is available in the Firefox menu bar, or you can use keyboard shortcuts.


Keyboard shortcut for window splitting

First you should know where is your windows key and left right up down key on your keyboard. 


1. Let us suppose we are in a window and we want to include that window and use one more window at the same time. 


2. So for this you need to press two keys: WINDOWS KEY + LEFT ARROW KEY. This will align you current window to the left side of the laptop/ computer screen.  


3.Now that you have set one required window, you need to adjust the 2nd window to start doing multitasking.

4. For this, go to that 2nd window and then press 2 keys. WINDOWS + RIGHT ARROW KEY.

This will adjust your 2 required window on your laptop screen and then you can start doing what you want.

5. In the same way you can split/adjust up to 4 windows on your screen. You just need to adjust the window size according to the visibilitu

Friday, October 16, 2020

TV Buying Guide : No one will tell you this


 

My previous post was the Laptop Buying Guide. Hope you have read that.This time I am writing a guide on how to buy the best TV. 

Here also, I will write in points or paras. So bear with me and at the end of this post you will get your favorite TV or at least you will get a fair idea about WHICH FEATURES YOU SHOULD CHECK before buying a TV.


  • Buy SMART LED TV -  Everything is getting smart and it first started with smartphones
  • SCREEN SIZE- First you must choose a suitable screen size like 32/43/60 inches. 
ALERT: The TV screen size is measured diagonally.

  • The TV should be HD (high definition) or FHD (Full high definition).
  • ANDROID / MOBILE CONTROLLABLE -Like all the smart TV are can be controlled by your mobile phone Internet. So it is a feature that you should ask for sure at the time of purchasing a new TV. You should be able to play apps like Google, Youtube, Netflix, Spotify, etc.
  • REFRESH RATE- The refresh rate should be high for a TV. For a 32 inches TV, the refresh are should not be less than 50Hz.
PRO TIP: Buy a TV from their exclusive store where they sell only one brand Product. For instance, if you want to purchase a LG TV, you should prefer going to an LG store where they exclusively sell LG products.

This tip has multiple benefits. 
First, the products will be genuine. 
Second, you can get a free gift at the time buying the products like a free 10 Watt bulb, etc. 
Third, you get more than 1-year warranty. Like in my case,  I got 3 years warranty from an exclusive LG store while other shops were giving 1-year warranty for the same product

  • HDMI Connections- There should be at least 2 or 3 HDMI connections in the tv

  • OLED or LED- No doubt OLED is better than LED and if you have a good budget choose OLED over LED.

  • BRAND - Choose trusted and known brands only like LG, Sony or Samsung. Even you have some problem in the TV , these brands provide best unparalleled services.

  • Bluetooth Connectivity- This feature is most helpful when you just want to listen your favorite song/movie from a different room.

  • Audio Quality - Choose a good audio quality and good speaker tv. There should also be a feature through which you can add external speakers. So at the time of buying a new laptop, check this feature also.

PRO TIP: Explore local shop offers. 
Purchase known brand TVs like LG, Samsung or Sony.

Thursday, October 15, 2020

how to make a DD in bank

 A lot of students and even professionals face difficulty while making a demand draft. The demand draft is used to transfer money from one bank account to another. As students are required to make a demand draft to pay their college fees, you may need to make a demand draft to send some money to your friend or for any business purpose.

So without getting any further due, let's hop to the main point. In order to make a demand draft, we need to fill 2 forms. The one is a cheque and the other is the demand draft form.


ALERT: Before filling any of these forms you should have the following details!

You must know the amount to be transferred.

You must know the College name where you have to transfer the money!

You must know the bank code for your college.

Cheque part: 





Fill in the date, amount, Pay yourself

Also, you must know where is the cheque number. The left bottom number of  6 digits is the cheque number. After making the DD, you may need to fill this cheque number.

That's it and you are done with filling the cheque.


DD form:

Here you must know the college name in whose favor we have to make the demand draft. Like in my case there was a column

Pay in favor of Dr. Akhilesh Das Gupta Institute of Technology & Management

In my case, I have to make the dd in favor of my college. so, I wrote my college name.


Then you must know the IFSC code of that bank- Like in my case it was 00625.

ALERT: The code number is written on the demand draft. So if you have your previous dd, then you can get that code number from that dd.

Apart from this, all other columns will ask for basic details which anyone can fill. 


so that is it! Submit the cheque and the dd form and you can get the demand draft that day. It is merely a process of 10 minutes.

You can make the dd online on onlinesbi.com. I will write a separate post on it soon.  




Labels:

Sunday, October 11, 2020

How to use torrent with or withour VPN?

 https://getintopc.com/softwares/graphic-design/adobe-dimension-cc-2020-free-download/

Laptop Buying Guide: No one will tell you these tips

 Which is the best laptop I should buy? Everyone has this doubt! So my today's post will end all your doubts. And you will never ever ask this question. In fact, after reading my post, you can guide your friends on how to buy the best laptop.




Here I will be writing in points and small paras.


Primarily Intel and AMD build processors.

Intel processors are commonly used by the people. But they cost a lot. Like some i5 intel processor laptop will be around rs50000. Intel used to be a leading processor making company before the arrival of cheap and good quality processors by AMD.


At this time ADM provides better value for money. Better than intel also.


Currently, i10 is the latest intel generation.


ALERT: Compare generations and then buy a laptop. Like the latest i5 can be better than a 10-year-old i7. It doesn't mean that i7 is always better than i5, i3, etc.


CPU- It is used for processing. So more core and more threads are always better. Always consider buying the latest CPU while buying a new laptop


RAM- Always buy a  DDR4 RAM. Prefer RAM which has a Speed around 2400-3200MHz. Also, prefer laptops that have an extra slot for RAM(at least 4 GB RAM). Like you have a laptop with 4 GB of RAM and a slot for 8 GB RAM. This makes the total RAM 12GB.


STORAGE- Do not buy a Hard disk (HDD) storage laptop. They are very slow. Rather than that always prefer buying SSD storage laptops. They are damn fast as they do not have any moving parts. They have a long life than HDD.


If not SSD, then buy a laptop that has a M.2 slot . 

You can put your SSD  of up to 120GB (3000rs) if you have M.2 slot.

Graphics card- A good graphic only need when you are doing video editing, gaming, or any kind of graphic work like VFX or animation.


On this note, some will say that they need a good graphic card to do machine learning but as this is the era of google cloud. You must take benefit of digital ocean, AWS, Google cloud platform, Microsoft Azure, Google colab, and a ton more.


BRAND- Choose the laptop brand that has a service center nearby. 


EXTENDED WARRANTY- Like you can extend your laptop warranty time by giving 5000-9000rs. And believe me, this helps you in the long run. You can change the keyboard, screen, motherboard.  


METALLIC BODY- Always prefer metallic body over plastic. As the plastic body gets damages later.


REFURBISHED LAPTOPS- These laptops are the ones used by some else. So even if you get a cheap Refurbished laptop, they can turn your value for money to Rs 0. So stop yourself from buying refurbished laptops


ALERT: Explore the local shops! 

If not then, prefer buying in Amazon, Flipkart festival offers like Big billion days, Diwali deals. You can save up to 5-10 thousand.

 

Some chosen laptops for you! Don't be intimidated, just open the link!











Saturday, October 10, 2020

Word counter with Vikas Singh

 This is my new project after the random joke generator using an API- application programming interface. So in this post, we will be making a basic and advanced word counter. 




So lets get started,

ALERT: we will be discussing the javascript part only! If have any queries, comment it out.

Basic word counter!

//create a function that counts the length of the input string!

//use string.length to get the length of the string

//then replace the output to the using innerHTML

//make a proper sentence to show to the client like 

245 words out of 50000 characters


Advanced word counter

Resource: https://codepen.io/lalwanivikas/pen/gMLQoz?editors=0010

ALERT: this will take 2 or more days to develop.

Also we will be discussing the js part only

Expected Features :

character counter

word counter

sentence counter

para counter

reading time

readability score

Workflow:

//select all the elements of HTML page by using the query selector.

//Add an event listener to the input- to update the stats on every keypress

//This event listener will trigger a function that will perform the task of updating the stats.

//count the character and replace the output using innerHTML

//detect a word by space, count, update


// Detect a sentence by full stop..., count it, update it

//Detect a para by empty lines, count, then update

//Now its time to calculate READING TIME. For instance, assume that it takes 1 minute to read 275 words for a normal person. So, 

275 words in = 60 sec

input word in= (60/275)*input words

Then convert this seconds into minutes. Replace the output using innerHTML.


//TOP KEYWORDS: First we will create an array to remove all the stop words. 

Then create another array to store the keywords and their count.

Sort that Keyword array and then display the top four keywords with their count.


//READABILITY SCORE

For this purpose, we will use an API - Mashape.

First, we will add an event listener to the READABILITY element. This event listener on click will trigger a function that will calculate the readability score.

Then we will create a request object (request.setRequestHeader), add the Mashape API key, onload request.


Then we will create an error function.

Then we will use SWITCH STATEMENTS to show the client a meaningful readability score.






top keywords













Friday, October 9, 2020

Login Page with Vikas Singh

 Login and sign up pages are an integral part of any website. So in this post will learn how to create a login page with NodeJS, SQL, and Express.



So this post will be a workflow for the login page. It may contain some technical jargon and if you have any queries, you can comment out.


So we will discuss the javascript part here. 

// Include the libraries you want to use in NodeJS!

// Connect the MySQL database with nodeJS

// Create the Express app and use the required packages (session and body-parser packages)

//make GET request to request the user data and POST request to send those user credentials to the server and then the script will check if someone exists with these credentials.

//if the credential matches, then the user is loginned and redirected to the home page

//POST request is used to redirect the user to the home page.

//make the app listen at port 3000









Wednesday, October 7, 2020

Login Page with express MySQL and nodeJS code

NodeJS , Express and MySQL login page



<!DOCTYPE html>

<html>

<head><title>NodeJS and SQL Login Form</title>

  <link rel="stylesheet" href="style.css">

  </head>

<body>

  

  <div class="login-form">

  <h1>NodeJS and SQL login form</h1>

    <form action="auth" and method ="post">

    <input type="text" name="username" placeholder="required">

      <input type="password" name="password" placeholder="required">

      <input type="submit">

      

   </form>


  

  </div>

 

  </body>

  <script src="Node.js">

    

//include the packages you want to use by creating a variable

    var mysql= require('mysql');

    var express=require('express');

    var session = require('express-session');

    var bodyParser= require('body-parser');

    var path = require('path');

    

    //then connect with the database by creating another variable

    

    var connection = mysql.createConnection({

     host : 'localhost',

     user : 'root',

     database : 'nodelogin',

      password : ''

      

      

    });

    

    

    //Now its time to use express to handle the sessions and http requests

  var app= express();

  

    //its time to use SESSION and BODYPARSER express packages of express

    //the session package will determine if the user is logged in or not

app.use(session({

  secret : 'secret',

  resave: true,

  saveUninitialized: true

  

  

})) ;   

    

    //now use bodyparser package

    //the bodyparser package will extract the data from the login form and then it will parse into json

app.use(bodyParser.urlencoded({extended:true}));

    app.use(bodyParser.json());

         

   

 //make get request:  to request data from a specified source

    //ALERT: Dont use get method while dealing with sensitive data

    //get requests have length restrictions

    //get method can be bookmarked, cannot modify data, remain in browser history

    //sendFile funtion/method of express is used to send static files to the client

    //beginners can try response.sendFile('log.html')

    app.get('/', function(request, repsonse)

           { repsonse.sendFile(path.join(__dirname + 'log.hmtl'));

      

      

    });

        

    


app.post('/auth', function(request, response) {

var username = request.body.username;

var password = request.body.password;

if (username && password) {

connection.query('SELECT * FROM accounts WHERE username = ? AND password = ?', [username, password], function(error, results, fields) {

if (results.length > 0) {

request.session.loggedin = true;

request.session.username = username;

response.redirect('/home');

} else {

response.send('Incorrect Username and/or Password!');

}

response.end();

});

} else {

response.send('Please enter Username and Password!');

response.end();

}

});

    

    

    

    

    //make post reqest: to send data to the server to create / update a resource

    //post req have no restrictions on data length

    

    //The data sent to the sever with POST is stored in the request body of HTTP  request

    

    //when the user enters his details, the details are sent to the node server and then our script 

    // will check if such person exists in our database

    

    

    app.post('/auth', function(request, response){

      var username= request.body.username;

      var password= request.body.password;

      if ( username && password) {

        connection.query('SELECT * FROM users WHERE username=? AND password=?',[username,password],

                         function(error, results, fields){

          if (results.length >0){

            request.session.loggedin= true,

              request.session.username= username,

              response.redirect= ('/home')

          } else {

            response.send('please enter username and password');

            response.end();} }

                        

                        

                        )}

      

  

    });



 

    //get request to redirect the user to the home page

    app.get('/', function(request, response){

    if (request.sesion.loggedin){

      response.send('Welcome back,'  + request.session.username + '!');

      

    }  

      response.end();

    }  );

    

    

    //Our web application needs to listen on a port, for testing purposes we'll use port 3000:

    app.listen(3000);

    

    

  

  

  

  </script>

  

</html>

Labels: ,

Must read this about Nodejs

When I was new to web development, I assumed that React Javascript is used for backend purposes but as I continued my journey I found that react.js is for frontend, and for backend we use node.js. 



I think many got the same misconception that reactjs is used for the backend but this is not like that. 


React js is a component-based library or you can say that it is a frontend purpose library to develop interactive user interface. This points to the fact that it is used for the frontend/client-side programming purpose.


It is used to create SPA single-page applications that do not reload and are really fast.


In reactJS, everything is a component and you can change the components at any point in time without affecting the rest of the application.


But NodeJS is a javascript runtime developed by google. It runs javascript code outside the browser whereas React/Vue/Angular are in browser Javascript frameworks.


For a fully functional app, you would use ReactJS to develop its user interface and NodeJS for the backend like for creating an API. 

 Later we will learn about Angular and Vue also













Labels: ,

Monday, October 5, 2020

Recommended list of movies

 These are the movies I have watched in my lockdown and apart from entertainment and masala, I learnt a lot from all of these. Hope you like my recommendations!



Note: All these movies can easily found on youtube. I will put the links here soon!

Ashke- If you are a person more closely attached to your culture, then go for it. I even learned Punjabi from this movie.

Love Punjab

Ankur Arora - murder case - This movie  I will recommend to all those who want to know more about law and it was a thriller in its category.

Thackrey- If you like politics and if you love to see biopics of great leaders and politicians then definitely you should watch this epic movie Thackrey.

Gullak bugni bank te Batua


Hey the list doesn't end here! I will add more movies regularly and if you want to suggest any movie that you thing is worth watching, make a comment with the movie name and its link on youtube.



A sunday at post office

This is one of the incidents at a post office. I went to my local post office and the condition there was completely pathetic. In the name of Post office, there was a single room allotted for the post office work. 


It was Monday morning 11am and 5th oct. The post office was expected to be opened but it was closed and locked and no one was there around. After 10 min, one stranger came and he started chatting with me. From him, I came to know that the postmaster there was completely irresponsible and many people have grudges and complaints against him.


After 5 min, the postmaster came. I told him that my debit card has been dispatched there, so i asked him check and tell me regarding the same. Verly reluctantly, he started checking for the debit  cart and he said that he returned my debit cart on 1st oct.


He neither messaged nor called nor delivered the card. And said that there was no contact number in the details. But as I checked my details on the list, I found my proper home address written on that.


I got despatch message on 26th Sep in the ballabgarh sub-office. I don't know enough about the procedure regarding how many days they keep the parcel at their sub-office/post office and how many days the postmaster takes to deliver to the next venue.


I think the postman is responsible to contact and deliver the parcels. But he failed to do so.

Chronology

26- parcel dispatched at blb sub office

3- i want to blb soffice and they said the item will be found in gaunchi post office

5 oct- i came to know that gaunchi postman returned the parcel on 1 oct.


Now it will go back to the blb sub office and from then will be delivered to the home branch bank. There the debit card stays for 1 month and is returned back if no one comes to take the card!