Skip to content

Instantly share code, notes, and snippets.

View Nabid's full-sized avatar

Nabid I. Nabid

View GitHub Profile
@Nabid
Nabid / template.cpp
Last active May 8, 2018 06:59
CPP contest template
/*
Name: Md. Nabid Imteaj
Prob:
Algo:
*/
#pragma comment( linker, "/STACK:16777216" )
#pragma warning( disable:4786 )
#include <cmath>
@Nabid
Nabid / DBHelper.java
Last active July 18, 2022 16:07
MySQL helper class for Java. MySQL JDBC driver connection Java class example.
/*
Assuming that you have proper MySQL JDBC driver:
How to use this class?
1. Create new object
DBHelper db = new DBHelper();
2. Open connection
db.open();
3. Call corresponding method
db.test();
@Nabid
Nabid / encapsulation.js
Last active December 30, 2015 19:03
Encapsulation example in JS
/*
This is a demonstration of JavaScript ENCAPSULATION.
Declaring private and public properties in JavaScript
is quite simple, but it is difficult to understand
how to access and update them.
If you are not familiarized with namespaces, just remove
appearances of "Prome.Test" and tweak the errors!!!
*/
@Nabid
Nabid / Program.cs
Last active November 10, 2020 05:26
C# implementation of KMP algorithm
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
/*
Reference: http://www.geeksforgeeks.org/searching-for-patterns-set-2-kmp-algorithm/
*/