Skip to content

Instantly share code, notes, and snippets.

@williamhqs
williamhqs / FilteredArrayAdapter.java
Created November 15, 2016 06:18 — forked from tobiasschuerg/FilteredArrayAdapter.java
Android Arrayadapter with text filtering for the use with a TextWatcher.
/**
* Arrayadapter (for Android) with text filtering for the use with a TextWatcher.
* Note: the objects in the List need a valid toString() method.
* @author Tobias Schürg
*
*/
public class FilteredArrayAdapter extends ArrayAdapter<ImageObject> {
//
// GSSimpleImageView.swift
// GSSimpleImage
//
// Created by 胡秋实 on 16/1/2016.
// Copyright © 2016 CocoaPods. All rights reserved.
//
import UIKit
@williamhqs
williamhqs / SortAlgorithm.playground
Created December 2, 2015 04:07
Normal sort algorithm in Swift
//: Playground - noun: a place where people can play
import UIKit
func swap<T>(inout value1: T, inout value2: T) {
let temporary = value1
value1 = value2
value2 = temporary
}
@williamhqs
williamhqs / 20150110033835_create_student.rb
Last active August 29, 2015 14:13
Sinatra with activerecord transaction warnning.
class CreateStudent < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :name
t.integer :age
end
end
end