Skip to content

Instantly share code, notes, and snippets.

@mrtj
mrtj / TJIntegerArray.h
Last active July 18, 2018 19:47
Simple Objective C wrapper around a C integer array. Supports fast enumeration via NSNumber objects. #integer #array #objective-c License: BSD
// Author: [email protected]
// License: BSD
#import <Foundation/Foundation.h>
@interface TJIntegerArray : NSObject <NSFastEnumeration>
{
NSInteger* _array;
}
@namannik
namannik / MGLMapView+MBTiles.swift
Last active December 4, 2024 10:27
MGLMapView+MBTiles
import Foundation
import Mapbox
import SQLite
// MARK: MbtilesSource
enum MBTilesSourceError: Error {
case CouldNotReadFileError
case UnknownFormatError
case UnsupportedFormatError
@typebrook
typebrook / MBTilesServer.kt
Last active March 18, 2025 05:50
How to make MBTiles valid on Mapbox Android SDK #mbtiles #android #mapbox
package com.example.sample.offline
import android.util.Log
import java.io.BufferedReader
import java.io.ByteArrayOutputStream
import java.io.FileNotFoundException
import java.io.PrintStream
import java.net.ServerSocket
import java.net.Socket
import kotlin.math.pow