[Assorted-commits] SF.net SVN: assorted: [446] hash-join/trunk/tools/DbPrep.scala
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-15 04:04:55
|
Revision: 446 http://assorted.svn.sourceforge.net/assorted/?rev=446&view=rev Author: yangzhang Date: 2008-02-14 20:05:00 -0800 (Thu, 14 Feb 2008) Log Message: ----------- added cleanup to avoid unintentional null terminator Modified Paths: -------------- hash-join/trunk/tools/DbPrep.scala Modified: hash-join/trunk/tools/DbPrep.scala =================================================================== --- hash-join/trunk/tools/DbPrep.scala 2008-02-15 04:04:44 UTC (rev 445) +++ hash-join/trunk/tools/DbPrep.scala 2008-02-15 04:05:00 UTC (rev 446) @@ -22,7 +22,8 @@ using (TextWriter("movies.dat")) { wm => using (TextWriter("actresses.dat")) { wa => for (i <- 0 until nreps) { - def xform(s: String) = if (i == 0) s else rot(i, s) + def cleanup(s: String) = s filter (_ != 0) mkString + def xform(s: String) = if (i == 0) s else cleanup(rot(i, s)) if (doMovies) { using (TextReader("movies.list")) { r => var line = r.readLine This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |