Skip to content

Instantly share code, notes, and snippets.

View onigunn's full-sized avatar

Onur Güngören onigunn

View GitHub Profile
@onigunn
onigunn / ModelController.php
Created January 21, 2016 10:23 — forked from oliverthiele/ModelController.php
Debugging errors like "An error occurred while trying to call Vendor\ExtKey\Controller\ModelController->showAction() " in extbase extensions
/**
* A special action which is called if the originally intended action could
* not be called, for example if the arguments were not valid.
*
* The default implementation sets a flash message, request errors and forwards back
* to the originating action. This is suitable for most actions dealing with form input.
*
* We clear the page cache by default on an error as well, as we need to make sure the
* data is re-evaluated when the user changes something.
*
import java.io.File;
import java.io.IOException;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.os.Environment;
import android.util.Log;
/**
@onigunn
onigunn / Java: CursorFragmentPagerAdapter.java
Last active October 13, 2015 02:57 — forked from peterkuterna/CursorFragmentPagerAdapter.java
A FragmentPagerAdapter that exposes data from a Cursor
package com.example;
import android.content.Context;
import android.database.Cursor;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.SparseIntArray;
import android.view.ViewGroup;