Skip to content

Instantly share code, notes, and snippets.

View gokhanbarisaker's full-sized avatar

Gökhan Barış Aker gokhanbarisaker

  • Booking.com
  • Amsterdam
View GitHub Profile
function getRelationship(x, y) {
// Your code goes here!
var xValid = validateNumber(x);
var yValid = validateNumber(y);
if (xValid && yValid) {
return getRelationshipSymbol(x, y);
}
else if(xValid) {
var moonWalkers = [
"Neil Armstrong",
"Buzz Aldrin",
"Pete Conrad",
"Alan Bean",
"Alan Shepard",
"Edgar Mitchell",
"David Scott",
"James Irwin",
"John Young",
// Iterate through the localizedRuleNames in ruleResults and
// return an array of their strings.
function ruleList(results) {
// Your code goes here!
var rules = [];
var ruleResults = results.formattedResults.ruleResults;
for (var key in ruleResults) {
rules.push(ruleResults[key].localizedRuleName);
}
@gokhanbarisaker
gokhanbarisaker / PicassoDecoder.java
Last active September 1, 2016 15:17
Picasso decoder for subsampling-scale-image-view
/**
* Created by gokhanbarisaker on 8/30/15.
*/
public class PicassoDecoder implements ImageDecoder
{
private String tag;
private Picasso picasso;
public PicassoDecoder(String tag, Picasso picasso) {
this.tag = tag;
Observable.from(new Loggable[]{ new Foo(), new Bar() }).subscribe(new Subscriber<Loggable>() {
@Override
public void onCompleted() {}
@Override
public void onError(Throwable e) {}
@Override
public void onNext(Loggable loggable) {
loggable.log();