Skip to content

Instantly share code, notes, and snippets.

View martinmidtsund's full-sized avatar

Martin Akre Midtsund martinmidtsund

View GitHub Profile
@stigberg
stigberg / Blacklisting.scala
Created March 28, 2014 23:37
Scala eksempel på blacklisting koden
object blacklist extends App {
val blacklist = List(2,4,6,8,10)
for( id <- 1 to 10) { // for release in doc.getElementsByTagName("press_release"):
var blacklistedid = 0; // blacklistedid = ""
var bid = 0;
for (bid <- blacklist) { // for line in f:
blacklistedid = bid // blacklistedid = line.replace("\n","")
if (blacklistedid != id) { // if blacklistedid != release.getAttribute("id"):
blacklistedid = 0 // blacklistedid = ""