Skip to content

Instantly share code, notes, and snippets.

View abanoubha's full-sized avatar
🎯
taking teeny-tiny steps towards my goal

Abanoub Hanna abanoubha

🎯
taking teeny-tiny steps towards my goal
View GitHub Profile
@killants
killants / findPaths.js
Last active November 10, 2022 04:34
Sharing knowledge
/**
* searches deep into an object recursively...
* @param {Object} obj object to be searched
* @param {any} searchValue the value/key to search for
* @param {Object} [options]
* @param {boolean} options.[searchKeys] whether to search object keys as well as values. Defaults to `true` if `serchValue` is a string, `false` otherwise.
* @param {number} options.[maxDepth=20] maximum recursion depth (to avoid "Maximum call stack size exceeded")
* @returns {string[]} Paths on the object to the matching results
*/
const findPaths = (
@githubutilities
githubutilities / disable-android-pattern-code.md
Created August 1, 2016 08:47
Disable Android pattern code
@gholker
gholker / JpgToPdf.java
Last active February 18, 2024 02:08
JPG to PDF in Java
import com.itextpdf.text.Document;
import com.itextpdf.text.Image;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.pdf.PdfWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;
@githubutilities
githubutilities / README.md
Last active February 11, 2019 19:21
Optical Character Recognition

Here is a list of OCR software:

  1. Ocrad

This also gets a JS version, but same as Ocrad, the result is not promising.

  1. GOCR

It got better result than Ocrad and 'so-called' more format support. You can use imagemagick to convert images to supported format

  1. tesseract
@cesco89
cesco89 / FragmentPageAdapter
Last active January 11, 2022 02:56
Add Fragments dynamically to ViewPager
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
public class MyFragmentPageAdapter extends FragmentPagerAdapter {