Skip to content

Instantly share code, notes, and snippets.

View susanta96's full-sized avatar
🌴
On vacation

Susanta Chakraborty susanta96

🌴
On vacation
View GitHub Profile
@susanta96
susanta96 / LazyLoad.js
Created April 14, 2020 15:46
Lazy Load using Intersection Observer
LazyLoadImages = () => {
const images = document.querySelectorAll("[data-src]");
const options = {
rootMargin: "0px 0px 200px 0px"
};
const imgObserver = new IntersectionObserver((entries, imgObserver) => {
entries.forEach(entry => {
if(!entry.isIntersecting){
return;
@susanta96
susanta96 / NavBarHightlight.js
Created April 14, 2020 15:26
Navbar Style Changes using Intersection Observer API without scroll
const NavHighlight = (navbar, mobileNav, section, options) => {
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if(!entry.isIntersecting){
console.log('not');
mobileNav.classList.add('box-shadow');
navbar.classList.add('box-shadow');
}else {
console.log('yes');
mobileNav.classList.remove('box-shadow');
@susanta96
susanta96 / mcm.c
Created February 8, 2018 20:05
Matrix Chain Multiplecation program with M table and S table in C
#include<stdio.h>
int main()
{
int i,j,k,pass,n;
int m[20][20],s[10][10],p[10],result;
printf("Enter the elements:");
scanf("%d",&n);
printf("Enter the value of P:");
for(i=0;i<=n;i++)
@susanta96
susanta96 / ODBC connection.txt
Created February 7, 2018 09:57
Full code for Database connection with all forms with Add,update,delete, etc feature in VB6 with ms access
'Database Access:-
'Form1(Insert, Delete etc.):-
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
rs.AddNew