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
val audioRecordAdapter = ItemAdapter(data) | |
val sections = mutableListOf<Section>() | |
sections.add(DateSection(0, "Today")) | |
sections.add(DateSection(2, "15/05/2016")) | |
val customSectionAdapter = CustomSectionAdapter() | |
customSectionAdapter.configSections(sections) | |
val sectionAdapter = SectionedRecyclerViewAdapter(customSectionAdapter, audioRecordAdapter) |
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 PureLayout | |
class TableViewMultiView : UIView { | |
var didLoadView = false | |
let tableView : UITableView = { | |
let tableView = UITableView.newAutoLayoutView() | |
tableView.keyboardDismissMode = .OnDrag | |
tableView.separatorInset.right = tableView.separatorInset.left |
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
#!/usr/bin/python | |
import os | |
import sys | |
import csv | |
import datetime | |
import time | |
import twitter | |
def test(): |
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
[{ | |
"user": { | |
"id":12, | |
"name":"John", | |
"profilePicture":"http://www.mtv.com/shared/media/images/amg_artist_portraits/standard/drp500/p555/p55532ltjus.jpg" | |
}, | |
"id":0, | |
"content":"Look that sunny day! Amazing!", | |
"image":"https://c2.staticflickr.com/6/5553/14877377949_041f533fda_b.jpg" | |
},{ |
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 Foundation | |
import FBSDKCoreKit | |
import FBSDKLoginKit | |
class FacebookAuth { | |
class func auth(callback: (Bool) -> (), viewController: UIViewController) { | |
let parameters = ["fields" : "id,name,email"] | |
let facebookReadPermissions = ["public_profile", "email", "user_friends"] |
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 android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import butterknife.ButterKnife; | |
public abstract class AbstractFragment extends Fragment { | |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, |
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
package br.com.ngi.monad; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class Just<T> extends Maybe<T> { | |
private T type; |
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 UIKit | |
extension UIImage { | |
func imageWithInsets(insetDimen: CGFloat) -> UIImage { | |
return imageWithInset(UIEdgeInsets(top: insetDimen, left: insetDimen, bottom: insetDimen, right: insetDimen)) | |
} | |
func imageWithInset(insets: UIEdgeInsets) -> UIImage { | |
UIGraphicsBeginImageContextWithOptions( | |
CGSizeMake(self.size.width + insets.left + insets.right, |
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 UIKit | |
extension UIImage { | |
func imageWithInsets(insetDimen: CGFloat) -> UIImage { | |
return imageWithInset(UIEdgeInsets(top: insetDimen, left: insetDimen, bottom: insetDimen, right: insetDimen)) | |
} | |
func imageWithInset(insets: UIEdgeInsets) -> UIImage { | |
UIGraphicsBeginImageContextWithOptions( | |
CGSizeMake(self.size.width + insets.left + insets.right, |
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
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/blue"> <!-- Change your color here --> | |
<com.github.ppamorim.cult.CultView | |
android:id="@+id/cult_view" | |
android:layout_width="match_parent" |