Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
/** | |
* Copyright (c) 2013 Xcellent Creations, Inc. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
import Foundation | |
class StreamReader { | |
let encoding: String.Encoding | |
let chunkSize: Int | |
let fileHandle: FileHandle | |
var buffer: Data | |
let delimPattern : Data | |
var isAtEOF: Bool = false | |
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
This document outlines setting up google's ruby gem, google-api-client, to verify payloads(receipts) sent to a server from google play in app purchases made via an android app.
This document was written using version 0.9.13.
First you'll need 'owner' access to the google play developer's console that contains the mobile app you wish to verify receipts from.
Next setup an api account
// https://gist.github.com/JARinteractive/96cbba8f35dcd10bbb77 | |
import UIKit | |
extension CGSize { | |
public func centered(in rect: CGRect) -> CGRect { | |
let centeredPoint = CGPoint(x: rect.minX + abs(rect.width - width) / 2, y: rect.minY + abs(rect.height - height) / 2) | |
let size = CGSize(width: min(self.width, rect.width), height: min(self.height, rect.height)) | |
let point = CGPoint(x: max(centeredPoint.x, rect.minX), y: max(centeredPoint.y, rect.minY)) | |
return CGRect(origin: point, size: size) |
#!/usr/bin/env ruby | |
# | |
# Script: HipChat bot in Ruby | |
# Author: Jordan Ritter <jpr5@darkridge.com> | |
# | |
unless `rvm-prompt i g`.chomp == "ree@xmpp" | |
exec("rvm ree@xmpp ruby #{$0}") | |
end |
import android.content.Context; | |
import android.text.SpannableStringBuilder; | |
import android.text.Spanned; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.widget.TextView; | |
import com.github.jobs.BuildConfig; | |
import java.util.ArrayList; | |
import java.util.List; |