Skip to content

Instantly share code, notes, and snippets.

@jfsurban
jfsurban / gist:2698907
Created May 15, 2012 03:41
get thumbnail by scaling bitmaps bit.ly/JZW0Gj #android
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
public class BitmapUtil {
public static Bitmap getBitmap(Context context,String photoUriPath) throws Exception {
Uri photoUri = Uri.parse(photoUriPath);
she loves travelling
she plays the guitar well;
first time i was impressed by a girl playing a guitar
she loves red and any shades of it
she loves to look at herself on the mirror everywhere she goes
she fixes her hair frequently
she only has powder and alcohol on her "kikay" kit;
as if that matters she looks beautiful without any makeup anyway
she has a "boyish" aura yet she's so feminine in so many ways
@jfsurban
jfsurban / tax.cs
Created September 23, 2011 04:52 — forked from flq/tax.cs
the tax thingy
public decimal GetTaxes(decimal salary)
{
decimal tax = 0;
var progressiveTaxation = new[] { 0.1m, 0.14m, 0.23m, 0.3m, 0.33m, 0.45m };
var progressionSlices = new[] { 5070 - 0, 8660 - 5070, 14070 - 8660, 21240 - 14070, 40230 - 21240, decimal.MaxValue };
var progression = 0;
while (salary > 0)