Skip to content

Instantly share code, notes, and snippets.

View mohamed-ali's full-sized avatar

Mohamed Ali Jamaoui mohamed-ali

View GitHub Profile
@mohamed-ali
mohamed-ali / dataMiner.js
Last active July 25, 2018 18:34
dataMiner: simple, compact, reusable client side data mining
/*
* Copyright (c), Mohamed Ali Jamaoui, All rights reserved
* released under the MIT license
*/
var dm = {};
dm.dataMiner = function module(){
@mohamed-ali
mohamed-ali / arrayList_vs_LinkedList.java
Last active December 27, 2015 07:49
LinkedList vs ArrayList: add to beginning of list benchmark
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
public class Benchmark {
public static void main(String[] args) {
ArrayList<Integer> arrayList = new ArrayList<Integer>();
LinkedList<Integer> linkedList = new LinkedList<Integer>();
@mohamed-ali
mohamed-ali / odataFilter.js
Last active December 25, 2015 08:09
OData filter preparator: simple, compact and easy to extend created to resolve the issue of preparing the OData filter presented in these dicussions: - http://stackoverflow.com/questions/19251441/how-to-cast-with-eq-in-odata-filtering - http://stackoverflow.com/questions/19319170/how-to-escape-single-quote-in-odata-filter-uri - http://stackoverf…
/*
* OData filter preparator:
* simple, compact and easy to extend
* copyright (c) Mohamed Ali Jamaoui 2013
*
* can be used on the fly to prepare the OData filter
* can easly be extended to handle new Edm types
* > the list of Edm types can be found here:
* > http://www.odata.org/documentation/odata-v2-documentation/overview/#6_Primitive_Data_Types
* > check the detailed description here: http://intelligea.wordpress.com/2013/10/12/how-to-format-odata-filters-values-on-the-fly-using-their-edm-types/