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
// 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 / characters
Created September 20, 2012 07:23
characters with navigation
public static String generateCharacterTagByIndex(int index)
{
return (Integer.toString(index + 14970));
}
class NavigatableEditText extends EditText
{
private WeakReference<View> navigationNext = null;
private WeakReference<View> navigationPrevious = null;
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();
@gokhanbarisaker
gokhanbarisaker / log.php
Created September 24, 2012 12:14
PHP log utility class for more descriptive logging...
<?php
//////////////////////////////////////////////////////////////////
//
// log.php
// Log
//
// Copyright 2012 Gökhan Barış Aker
//
// Licensed under the Apache License, Version 2.0 (the "License");
@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;