(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// You can use maven-publish-helper.gradle script without changes and even share it between multiple | |
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project, | |
// then apply it at the bottom of your module's build.gradle file like this: | |
// ...content of module's build.gradle file... | |
apply from: '../maven-publish-helper.gradle' | |
publishing { | |
publications { |
// Using Singleton on Kotlin | |
public object MySingleton { | |
public fun foo() { | |
} | |
} | |
// And use it on Kotlin | |
MySingleton.foo() |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
/** | |
* Converts an image to a dataURL | |
* @param {String} src The src of the image | |
* @param {Function} callback | |
* @param {String} outputFormat [outputFormat='image/png'] | |
* @url https://gist.github.com/HaNdTriX/7704632/ | |
* @docs https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement#Methods | |
* @author HaNdTriX | |
* @example | |
* |
import base64 | |
from django.core.files.base import ContentFile | |
from rest_framework import serializers | |
class Base64ImageField(serializers.ImageField): | |
def from_native(self, data): | |
if isinstance(data, basestring) and data.startswith('data:image'): | |
# base64 encoded image - decode |
import java.io.*; | |
import java.util.logging.*; | |
import javax.xml.bind.DatatypeConverter; | |
/** | |
* Hashing with SHA1 | |
* | |
* @param input String to hash | |
* @return String hashed | |
*/ |