Instantly share code, notes, and snippets.

View GetImageSize.java
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inJustDecodeBounds = true;
BitmapFactory.decodeResource(context.getResources(), R.drawable.demo_img, opt);
int width = opt.outWidth;
int height = opt.outHeight;
View eclipse_prederences.epf
#Wed Jan 07 10:16:38 GMT+08:00 2015
file_export_version=3.0
@org.eclipse.ui.workbench=3.104.0.v20130204-164612
/instance/org.eclipse.ui.workbench/org.eclipse.ui.commands=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<org.eclipse.ui.commands>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.goto.columnPrevious" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="ALT+H"/>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.goto.columnNext" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="ALT+L"/>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.goto.lineDown" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="ALT+J"/>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.goto.lineUp" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConf
View CsdnCommenter.py
# File : csdncommenter.py
# Author : Zhuang Ma
# E-mail : chumpma(at)gmail.com
# Website: http://mazhuang.org
# Date : 2016-07-26
import requests
from BeautifulSoup import BeautifulSoup
import getpass
import time
import random
View CustomRules.js
import System;
import System.Windows.Forms;
import Fiddler;
// INTRODUCTION
// This is the FiddlerScript Rules file, which creates some of the menu commands and
// other features of Fiddler. You can edit this file to modify or add new commands.
//
// The original version of this file is named SampleRules.js and it is in the
// \Program Files\Fiddler\ folder. When Fiddler first starts, it creates a copy named
View SayHi.py
if __name__ == '__main__':
print 'Hello, World!'