Skip to content

Instantly share code, notes, and snippets.

View Bloodsucker's full-sized avatar
🦄

José Cabo Bloodsucker

🦄
  • Amsterdam, Netherlands
View GitHub Profile
@Bloodsucker
Bloodsucker / gist:3964007
Created October 27, 2012 10:19
Pestañas de Android modificado
//Basado en: http://thepseudocoder.wordpress.com/2011/10/04/android-tabs-the-fragment-way/
/**
* Setup TabHost
*/
private void initialiseTabHost(Bundle savedInstanceState) {
mTabHost = (TabHost)findViewById(android.R.id.tabhost);
mTabHost.setup();
//****** tab1 start
@Bloodsucker
Bloodsucker / TerminatingBlocksFinder
Last active August 29, 2015 14:20
Bloque de código de un Filtro de Boilerpipe que busca el final de la sección releavante de una web y lo hace usando palabras del inglés
public boolean process(TextDocument doc)
throws BoilerpipeProcessingException {
boolean changes = false;
// long t = System.currentTimeMillis();
for (TextBlock tb : doc.getTextBlocks()) {
final int numWords = tb.getNumWords();
if (numWords < 15) {
final String text = tb.getText().trim();