Skip to content

Instantly share code, notes, and snippets.

Avatar
🎖️
Focusing

Gbenga Oladipupo devmike01

🎖️
Focusing
View GitHub Profile
@devmike01
devmike01 / PartClickTextView.java
Created May 23, 2018
This code snippet makes part of a string clickable.
View PartClickTextView.java
public class PartClickTextView extends TextView{
public static final String TAG = PartClickTextView.class.getSimpleName();
private OnPartTextClickListener mListener;
public interface OnPartTextClickListener{
void onPartTextClick(View view);
}
public void setOnPartTextClickListener(OnPartTextClickListener mCallback){
View gist:5a4f80c09e13e9e782bec723740265cd
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int _tmain()
@devmike01
devmike01 / TimeOutService.java
Created Oct 16, 2019
A service that handles app timeout
View TimeOutService.java
package devmike.leviapps.co.tensorlitepose.device;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.os.SystemClock;
@devmike01
devmike01 / omni_state.dart
Last active Oct 31, 2020
Some code snippet to handle your messy API call states. ;) #EndSARS
View omni_state.dart
class ApiState<T> {
String message;
T data;
ApiStates state;
ApiState(this.state, this.data, this.message);
static ApiState<T> loading<T>() {
return ApiState<T>(ApiStates.Loading, null, null);
}
@devmike01
devmike01 / RecursionReverseString.java
Last active Jun 16, 2022
A simple java code snippet which uses recursion to reverse any given string.
View RecursionReverseString.java
public class RecursionReverseString {
public static void main(String[] args){
String value = "abcdefghijk";
System.out.println(reverse(value.length()-1, value, ""));
}
public static String reverse(int l, String value, String r){
if(l <0 ){
return r;