Skip to content

Instantly share code, notes, and snippets.

@TomTasche
TomTasche / gist:796504
Created Jan 26, 2011
OpenOffice Document Reader - File Chooser
View gist:796504
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:468)
at android.graphics.Bitmap.createBitmap(Bitmap.java:435)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
@TomTasche
TomTasche / School going Google.
Created Apr 11, 2011
Theses about migrating my school to Google Apps?
View School going Google.
So, I want to migrate my school to Google Apps. Problem is, that we're a technical school (http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=auto&tl=en&u=http%3A%2F%2Fwww.htl.rennweg.at%2F) and Google Apps isn't that attractive for most of us (considering you could create your own Gmail Account within seconds...).
In order to make Google Apps more attractive, I thought about something like offers for cheaper Android phones / tablets and / or ChromeOS netbooks. Additionally, someone asked if it's possible to maintain some kind of default content set that's available for every new account (important contacts, documents, ...).
My theses would then deal with the dis- / advantages of migrating schools to Google Apps, and maybe how behavior changes when using Google-only (Android + ChromeOS + Google Apps) in classroom (how do people share documents? how do they communicate?).
What do you think? Ever done before? Interesting? Stupid? Feedback welcome. :)
Have a great day
Tom
View happy.be_json
{"id":1,"text":"Tom³ Tag","timestamp":"Apr 23, 2011 12:11:43 PM","url":"http://threetimestom.com/","author":{"id":1,"name":"Tom"}}
View uservoice_announcify.js
<script type="text/javascript">
(function() {
var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/1I1faem5ZQM8ojOSkiew.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
})();
</script>
View gist:1025735
<receiver android:name=".CallListener">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
@TomTasche
TomTasche / JUrlExpander.java
Created Jul 25, 2011
How To: Expand a shortened URL in Java
View JUrlExpander.java
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
/**
* http://blog.tomtasche.at/2011/07/how-to-expand-shortened-url-in-java.html
*
* @author Thomas Taschauer
*
@TomTasche
TomTasche / mobfox_ads.java
Created Jul 28, 2011
MobFox's instructions on how to implement their ads on Android. Faulty.
View mobfox_ads.java
MobFoxView mobfoxView = new MobFoxView(this, publisherId, test, includeLocation, boolean animation);
@TomTasche
TomTasche / bloki_integration.html
Created Aug 3, 2011
How To integrate Bloki with two simple lines of code
View bloki_integration.html
<link href="http://bloki-engine.appspot.com/style/uservoice/horizontal_red.css"
rel="stylesheet" type="text/css" />
<script language='javascript'
src='http://bloki-engine.appspot.com/submit/submit.nocache.js'
type='text/javascript'></script>
@TomTasche
TomTasche / bloki_sample.html
Created Aug 3, 2011
Sample Bloki integration
View bloki_sample.html
<html>
<head>
<title>Bloki!</title>
<!-- It's *really* important to add these two lines *before* you add your own stylesheets!
Otherwise your style will break bad -->
<link href="http://bloki-engine.appspot.com/style/uservoice/horizontal_red.css"
rel="stylesheet" type="text/css" />
<script language='javascript'
src='http://bloki-engine.appspot.com/submit/submit.nocache.js'
@TomTasche
TomTasche / GWT_native.java
Created Aug 6, 2011
Native methods in GWT rock! Here an example how to access the page's body.
View GWT_native.java
private native Element getBody() /*-{
return document.getElementsByTagName('body')[0];
}-*/;