This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ODMapAnnotation.h | |
// iVelo | |
// | |
// Created by Olivier Demolliens on 24/06/13. | |
// Copyright (c) 2013 Olivier Demolliens. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <MapKit/MapKit.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
//Copyright 2014 Olivier Demolliens - @odemolliens | |
// | |
//Licensed under the Apache License, Version 2.0 (the "License"); you may not use this | |
// | |
//file except in compliance with the License. You may obtain a copy of the License at | |
// | |
//http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
//Unless required by applicable law or agreed to in writing, software distributed under |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import android.content.Context; | |
import android.graphics.Typeface; | |
import android.util.Log; | |
/** | |
* Manage font | |
* @author Olivier Demolliens. @odemolliens | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { | |
UITableViewCell *cell = (UITableViewCell *)view; | |
if (cell == nil) { | |
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; | |
[cell setBackgroundColor:[UIColor clearColor]]; | |
[cell setBounds:CGRectMake(0, 0, cell.frame.size.width - 20, 44)]; | |
cell.tag = row; | |
UITapGestureRecognizer * singleTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toggleSelection:)]; | |
singleTapGestureRecognizer.numberOfTapsRequired = 1; | |
[cell addGestureRecognizer:singleTapGestureRecognizer]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// FileUploader.swift | |
// | |
// Copyright (c) 2015 Narciso Cerezo Jiménez. All rights reserved. | |
// Largely based on this stackoverflow question: http://stackoverflow.com/questions/26121827/uploading-file-with-parameters-using-alamofire/28467829// | |
import Foundation | |
import Alamofire | |
private struct FileUploadInfo { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Create this file in your Xcode project | |
// 2. Go to "Build Settings" and find "Objective-C Bridging Header." Use the search bar to find it quickly. | |
// 3. Double-click and type "BridgingHeader.c" | |
// If you get "Could not import Objective-C Header," try "my-project-name/BridgingHeader.h" | |
// 4. Go to "Build Phases," "Link Binary With Libraries," and add libsqlite3.0.dylib | |
#include <sqlite3.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public let kShapeDashed : String = "kShapeDashed" | |
extension UIView { | |
func removeDashedBorder(_ view: UIView) { | |
view.layer.sublayers?.forEach { | |
if kShapeDashed == $0.name { | |
$0.removeFromSuperlayer() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// by Nikola Despotoski | |
import android.content.Context; | |
import android.text.TextUtils; | |
import com.squareup.okhttp.Headers; | |
import com.squareup.okhttp.Interceptor; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.Response; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Build and iPhone Simulator Helper Script | |
# Shazron Abdullah 2011 | |
# | |
# WARN: - if your .xcodeproj name is not the same as your .app name, | |
# this won't work without modifications | |
# - you must run this script in where your .xcodeproj file is | |
PROJECTNAME=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The following data should be run in the console while viewing the page https://read.amazon.com/ | |
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension | |
var db = openDatabase('K4W', '2', 'thedatabase', 1024 * 1024); | |
getAmazonCsv = function() { | |
// Set header for CSV export line - change this if you change the fields used | |
var csvData = "ASIN,Title,Authors,PurchaseDate\n"; | |
db.transaction(function(tx) { |
OlderNewer