Skip to content

Instantly share code, notes, and snippets.

View deda9's full-sized avatar
🍁
Learning is always fun

Bassem Qoulta deda9

🍁
Learning is always fun
View GitHub Profile
# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):
@deda9
deda9 / ArrayAdapter.java
Created June 10, 2016 16:56 — forked from passsy/ArrayAdapter.java
ArrayAdapter for RecyclerView
import android.support.v7.widget.RecyclerView;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
* Created by pascalwelsch on 04.07.14.
*/
public abstract class ArrayAdapter<T, VH extends RecyclerView.ViewHolder>
@deda9
deda9 / android_studio_shortcuts.md
Created June 20, 2016 13:28 — forked from stkent/android_studio_shortcuts.md
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols:

@deda9
deda9 / ItemAdapter.java
Created June 22, 2016 01:08 — forked from chRyNaN/ItemAdapter.java
Classes to bridge the gap between RecyclerView and ListView by providing a common API.
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
@deda9
deda9 / GridAndListLayout.java
Created June 22, 2016 10:25 — forked from lucasr/GridAndListLayout.java
Mixed grid/list layout built with the new TwoWayView API
public class GridAndListLayout extends TwoWayLayoutManager {
private final int NUM_LANES = 2;
public GridAndListLayout(Context context, Orientation orientation) {
super(context, orientation);
}
private boolean isGridItem(int position) {
return position < 4;
}
@deda9
deda9 / SimpleListLayout.java
Created June 22, 2016 10:25 — forked from lucasr/SimpleListLayout.java
List layout built with the new TwoWayView API
public class SimpleListLayout extends TwoWayLayoutManager {
public SimpleListLayout(Context context, Orientation orientation) {
super(context, orientation);
}
@Override
protected void measureChild(View child, Direction direction) {
measureChildWithMargins(child, 0, 0);
}
import android.annotation.SuppressLint;
import android.content.Context;
import android.util.Log;
import retrofit.client.Client;
import retrofit.client.Header;
import retrofit.client.Request;
import retrofit.client.Response;
import retrofit.mime.TypedInput;
@deda9
deda9 / Box.java
Created July 11, 2016 15:36 — forked from AnnaBoro/Box.java
generics
package lesson7_10.generics;
import java.util.ArrayList;
import java.util.List;
public class Box<T>{
private List<T> birdsList;
@deda9
deda9 / generics.java
Created July 11, 2016 15:37 — forked from SamDeBlock/generics.java
Generics
public class Generics {
static class Foo<T, R> {
public void bar(T arg) {
System.out.println("T " + arg);
}
public void bar(R arg) {
System.out.println("R " + arg);
}
}
<VirtualHost *:80>
ServerName myapp.localhost.com
DocumentRoot "/home/vagrant/projects/myapp/public"
<Directory "/home/vagrant/projects/myapp/public">
AllowOverride all
</Directory>
</VirtualHost>