#Add a top-right banner to your view
##Usage
let banner = CMBannerView(frame: CGRectMake(0, 0, 120, 120), text: "New", color: UIColor.redColor(), width: 30)
myView.addSubview(banner)
##Implementation
/* | |
Thanks David <3 - https://medium.freecodecamp.com/the-100-correct-way-to-do-css-breakpoints-88d6a5ba1862 | |
*/ | |
@for-phone: ~"screen and (max-width: 44.9375rem)"; // < 720 | |
@for-tablet-only: ~"screen and (min-width: 45rem) and (max-width: 74.9375rem)"; // > 720 < 1199 | |
@for-tablet-portrait-only: ~"screen and (min-width: 45rem) and (max-width: 56.1875rem)"; // > 720 < 900 | |
@for-tablet-portrait-up: ~"screen and (min-width: 45rem)"; // > 720 | |
@for-tablet-landscape-up: ~"screen and (min-width: 56.25rem)"; // > 900 | |
@for-desktop-up: ~"screen and (min-width: 75rem)"; // > 1200 | |
@for-big-desktop-up: ~"screen and (min-width: 112.5rem)"; // > 1800 |
/* | |
* Copyright 2017 Google Inc. | |
* | |
* 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 the | |
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
import UIKit | |
open class LayerView<Layer: CALayer>: UIView { | |
public final override class var layerClass: Swift.AnyClass { | |
return Layer.self | |
} | |
public final var concreteLayer: Layer { | |
return layer as! Layer | |
} |
#!/usr/bin/env python | |
from __future__ import print_function, unicode_literals | |
import operator | |
import psycopg2 | |
import psycopg2.extras | |
import io | |
import json | |
import sys | |
import logging |
EDIT: You can find this same updated tutorial here -> Medium
Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central:
public abstract class AbstractCameraFragment extends MDFragment implements UnexpectedTerminationHelper.OnCrashListener, SurfaceHolder.Callback, Camera.AutoFocusCallback { | |
protected Camera camera; | |
private boolean previewRunning, cameraReleased, focusAreaSupported, meteringAreaSupported; | |
private UnexpectedTerminationHelper terminationHelper; | |
private int focusAreaSize; | |
private FocusSound focusSound; | |
private Matrix matrix; | |
protected ResultListener resultListener; |
// | |
// ABSpringDemoViewController.m | |
// Springy | |
// | |
#import "ABSpringDemoViewController.h" | |
@interface ABSpringDemoViewController () <UITableViewDataSource, UITableViewDelegate> { | |
UITableView *_tableView; | |
CADisplayLink *_displayLink; |
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) |