Skip to content

Instantly share code, notes, and snippets.

View baladkb's full-sized avatar
🎯
Happy Octocat

BK baladkb

🎯
Happy Octocat
  • Chennai ✈️ India
View GitHub Profile
@baladkb
baladkb / Get image dimensions(Height Width)
Created July 6, 2017 09:44
get Height / Width of image in JavaScript
var imageVal = urlVal+'/images/articulos-nuevo/'+siteVal+'/'+codigoAlfa+'/1-Z.jpg';
var img = new Image();
img.onload = function(){
var height = img.height;
var width = img.width;
console.log("::: height "+height);
console.log("::: width "+width);
}
img.src = imageVal;
@baladkb
baladkb / gist:c7d7434a5abecf6631a04325813759e0
Created June 29, 2017 06:28
Replace class HTML name with JavaScript
var els = [].slice.apply(document.getElementsByClassName("no-js"));
for (var i = 0; i < els.length; i++) {
els[i].className = els[i].className.replace(/ *\bno-js\b/g, "js");
}
@baladkb
baladkb / The Technical Interview Cheat Sheet.md
Last active June 6, 2017 05:53 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
https://github.com/Ezhil-Language-Foundation/open-tamil
============== Input ==============
<select>
<option value="1">val-1<option>
<option value="2">val-5<option>
<option value="1">val-7<option>
<option value="3">val-8<option>
</select>
============== Input ==============
var map = {};
https://cloud.githubusercontent.com/assets/4152211/26547733/19b0f3c2-448e-11e7-810e-c778ececb0ab.png
##########################################
WITH CTE
AS
(
SELECT *,
ROW_NUMBER() OVER(PARTITION BY ID_FORMA_PAGO
ORDER BY ID_FORMA_PAGO DESC) AS RN
FROM dbo.FORMA_PAGO_SITE
)
https://github.com/jessepollak/card