Skip to content

Instantly share code, notes, and snippets.

View pijushbarik's full-sized avatar
💻
Making stuff

Pijush Barik pijushbarik

💻
Making stuff
View GitHub Profile
@pijushbarik
pijushbarik / convolute.hpp
Last active July 28, 2019 10:45
A 2D convolutor function. Convolutes a 2D kernel on a 2D image matrix with Border Reflex 101 method. OpenCV's borderType docs: https://docs.opencv.org/3.1.0/d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5ab3c5a6143d8120b95005fa7105a10bb4
/*
* convolute.hpp
*
* Created on: 28-Jul-2019
* Author: Pijush Barik (pijush.barik8@gmail.com)
*
* I didn't found a convolution code (with border reflect 101 method) on the
* internet, may be didn't search well.
* This code is not optimized. If you find it useful please left a review or
* help this code to be optimize or bug free.
@pijushbarik
pijushbarik / caesars-cipher.js
Created September 5, 2018 08:19
freeCodeCamp JavaScript Algorithm and Data Structure Projects Solutions
var charCodeOfM = "m".charCodeAt(0);
function getDecoded(char) {
var charcode = char.toLowerCase().charCodeAt(0);
var decoded;
if(charcode <= charCodeOfM) {
decoded = charcode + 13;
} else {
decoded = charcode - 13;
}