Skip to content

Instantly share code, notes, and snippets.

View Munawwar's full-sized avatar
🍪
Cookies

Munawwar Firoz Munawwar

🍪
Cookies
View GitHub Profile
@Munawwar
Munawwar / flexbox.html
Last active October 18, 2024 16:24
HBox and VBox layout with CSS3 flexbox
<!DOCTYPE HTML>
<html>
<head>
<!-- HBox and VBox layouts have been implementated with many libraries/toolkits on
different platforms and languages (like ExtJS,QT,GTK,.NET...).
This tries to achieve the same but with CSS only.
Supported browsers: IE 10+, Safari 6.1, Latest FF, Chrome -->
<style type="text/css">
html, body {
@Munawwar
Munawwar / selection.js
Created September 26, 2012 10:02 — forked from visnup/selection.js
IE8 equivalent of HTML5/W3C Range object's startContainer,startOffset,endContainer and endOffset properties
(function selectionPolyfill(window, document) {
if (window.getSelection || !document.selection) return;
// convert an IE TextRange to a W3C one
function convert(range, startOrEnd) {
var point = range.duplicate()
, result = {};
// point is either the start or end of the range
point.collapse(startOrEnd);
@Munawwar
Munawwar / test.html
Last active January 10, 2017 01:45
IE8 polyfill for HTML5 Range object's startContainer, startOffset, endContainer and endOffset properties.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
/*
This code is a IE8 (and below), polyfill for HTML5 Range object's startContainer,
startOffset, endContainer and endOffset properties.
*/
(function () {
function findTextNode(node, text) {
@Munawwar
Munawwar / ExcelDataReader.cs
Last active January 14, 2020 12:19
C# - Excel Data Reader Library - Convert Excel (XLSX or XLS) to CSV
/*
* Dependency : Excel Data Reader from http://exceldatareader.codeplex.com/
* You must add the references to the Dlls (downloaded from the link above) with Visual Studio.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Excel;
@Munawwar
Munawwar / ExcelOleDb.cs
Last active September 9, 2016 11:28
C# .NET - Convert Excel 2007 (XLSX) to CSV using OLE DB
/*
* Dependency: Office 2007
* OR
* Install 2007 Office System Driver - Data Connectivity Components from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en
* No references or anything needed to be added.
*
* Other Notes:
* 1. There is a 64-bit version too. But I am using the 32-bit one.
* 2. For Office 2010. there is a 'Microsoft Access Database Engine 2010 Redistributable' at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=C06B8369-60DD-4B64-A44B-84B371EDE16D
* 3. I am Using OLEDB here. ODBC can also be used.
@Munawwar
Munawwar / ExcelReading.java
Last active November 2, 2022 08:37
Java - Apache POI - Convert XLS/XLSX to CSV
/*
* Dependencies: Apache POI Library from http://poi.apache.org/
*/
package poi_excels;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;