Skip to content

Instantly share code, notes, and snippets.

@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;
@ryanjdew
ryanjdew / memory-operations.xqy
Created March 30, 2012 17:20
XQuery In Memory XML Operations
xquery version "1.0-ml";
(:~
Copyright (c) 2012 Ryan Dew
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
@ryanjdew
ryanjdew / fn-has-children.xqy
Last active October 19, 2018 21:01
XQuery 3.0 functions in XQuery 1.0
xquery version "1.0-ml";
declare namespace html = "http://www.w3.org/1999/xhtml";
declare function local:has-children($node as node()?) as xs:boolean {
fn:exists($node/child::node())
};
let $doc := document {
element html:html {
element html:head {
@jasonroelofs
jasonroelofs / Timings.txt
Created November 29, 2012 18:23
Using Go for embarrassingly parallel scripts
] wc -l domains.txt
783 domains.txt
] time go run domain_lookup_parallel.go
real 0m5.743s
user 0m0.359s
sys 0m0.355s
] time go run domain_lookup_sequential.go