Skip to content

Instantly share code, notes, and snippets.

View hafizali05's full-sized avatar

hafiz didarali hafizali05

View GitHub Profile
@hafizali05
hafizali05 / block-vs-inline.md
Last active December 4, 2018 05:35
What is the difference between block elements vs inline block elements?

What is the difference between block elements vs inline block elements?

Block level elements

1. Elements: <p>, <div>, <form>, <header>,<footer>, <nav>, <ul>, <li>, and <h1>.
2. The reason why there are block elements is because they take up all the available width on the webpage and block any other elements on the left or right of them.
3. Their height is automatically set considering the other elements inside it.
4. By Default, Block level elements always begin from a new line.
5. They create larger structure than inline elements

Polymorphism

What is polymorphism?

* Poly= many, morphism=form or behaviour shifting.
* It’s a programming language’s ability to process the objects differently depending on their data type and class.
* Polymorphism in Object-Oriented Programming is the ability to create a variable, a function, or an object that has more than one form.
* E.g: Lets find out info on the Person who can be an employee

Why we need it ?

The primary usage of Polymorphism in Object-Oriented Programming is the ability of objects belonging to different types to respond to methods, fields, or property calls of the same name, each one according to an appropriate type-specific behaviour.

@hafizali05
hafizali05 / test.md
Last active November 30, 2018 04:17

JS ## Interview

  var hello = function(){
    console.log('gather courage');
  }

#JS Interview Questions

JAVASCRIPT PROMISE

The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.

Closure

A closure is a function having access to the parent scope, even after the parent function has closed.

@hafizali05
hafizali05 / 0 Linux-On-MBP-Late-2016.md
Created October 15, 2018 14:52 — forked from roadrunner2/0 Linux-On-MBP-Late-2016.md
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@hafizali05
hafizali05 / 1_README.md
Created December 5, 2016 06:41 — forked from Daniel15/1_README.md
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/