Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc --with-opus
@BindingAdapter(“isVisible”) | |
fun setIsVisible(view: View, isVisible: Boolean) { | |
if (isVislble) { | |
view.visibility = View.VISIBLE | |
} else { | |
view.visibility = View.GONE | |
} | |
} |
dependencies { | |
compile fileTree(dir: 'libs', include: '*.jar') | |
compile('com.google.android.gms:play-services:3.1.+') { | |
exclude module: 'support-v4' | |
} | |
compile 'com.android.support:appcompat-v7:+' | |
compile 'com.android.support:support-v4:13.0.+' | |
compile 'com.squareup.dagger:dagger:1.1.0' | |
compile 'com.squareup.dagger:dagger-compiler:1.1.0' | |
compile 'com.squareup.picasso:picasso:2.1.1' |
By default, Rails applications build URLs based on the primary key -- the id
column from the database. Imagine we have a Person
model and associated controller. We have a person record for Bob Martin
that has id
number 6
. The URL for his show page would be:
/people/6
But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6
here, is called the "slug". Let's look at a few ways to implement better slugs.
@Test | |
public void shouldBeAbleToGoToComments() { | |
Uri deepLink = Uri.parse("pfm:///user/frank/status/123/?version=88983845"); | |
System.out.println(String.format("Testing %s", deepLink.toString())); | |
// The intent to start. | |
Intent expectedIntent = new Intent(Robolectric.application, Status.class); | |
expectedIntent.putExtra(Constants.Extras.STATUS_ID, 123L); |
//r = require('rethinkdb') | |
var MongoClient = require('mongodb').MongoClient, | |
format = require('util').format; | |
var querystring = require('querystring'); | |
var https = require('https'); | |
var Inserter = function (collection) { | |
this.collection = collection; |
import dagger.Module; | |
import dagger.Provides; | |
@Module | |
( | |
complete = false | |
) | |
public class BootstrapModule { | |
@Provides | |
Picasso providesPicasso(Context context) { |
public class Customer { | |
String firstName; | |
String lastName; | |
// 20 Other properties | |
public String getFirstName() { | |
return firstName; | |
} | |
public void setFirstName(String firstName) { |
http://jsfiddle.net/rfkrocktk/hcQ48/ |
// v0.6.19 way of returning JSON. | |
exports.index = function(req, res) { | |
Workout.find({}, function(err, docs) { | |
if(!err) { | |
res.json( { workouts: docs }, 200); | |
} else { | |
res.json( { message: err }, 500); | |
} | |
}); | |
} |