<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006, Benjamin C. Meyer
+ * Copyright (C) 2006-2007 Benjamin C. Meyer (ben at meyerhome dot net)
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -34,15 +34,22 @@
 
 #include &lt;QtGui/QtGui&gt;
 
-class UserModel : public QAbstractTableModel {
+class UserModel : public QAbstractTableModel
+{
 
-Q_OBJECT
+    Q_OBJECT
 
 public:
-    UserModel(DataBase *db, QObject * parent = 0) : QAbstractTableModel(parent), user(db) {
+    UserModel(DataBase *db, QObject * parent = 0) : QAbstractTableModel(parent), user(db)
+    {}
+    int rowCount(const QModelIndex &amp;parent) const
+    {
+        return (parent.row() &gt; 0) ? 0 : user.votes();
+    }
+    int columnCount(const QModelIndex &amp;) const
+    {
+        return 2;
     }
-    int rowCount(const QModelIndex &amp;parent) const { return (parent.row() &gt; 0) ? 0 : user.votes(); }
-    int columnCount(const QModelIndex &amp;) const { return 2; }
 
     QVariant headerData(int section, Qt::Orientation orientation, int role) const
     {
@@ -62,19 +69,20 @@ public:
         switch (role) {
         case Qt::DisplayRole:
         case Qt::EditRole: {
-            switch (index.column()) {
+                switch (index.column()) {
                 case 0: return user.movie(index.row());
                 case 1: return user.score(index.row());
+                }
+                return index.row();
+                break;
             }
-            return index.row();
-            break;
-        }
         case Qt::TextAlignmentRole:
             return Qt::AlignRight;
         }
         return QVariant();
     }
-    void setId(int id) {
+    void setId(int id)
+    {
         user.setId(id);
         reset();
     }
@@ -84,23 +92,28 @@ private:
 };
 
 
-class DBModel : public QAbstractTableModel {
+class DBModel : public QAbstractTableModel
+{
 
-Q_OBJECT
+    Q_OBJECT
 
 public:
-    DBModel(QObject * parent = 0) : QAbstractTableModel(parent) {
+    DBModel(QObject * parent = 0) : QAbstractTableModel(parent)
+    {
         db = new DataBase();
         db-&gt;load();
     }
-    ~DBModel() {
+    ~DBModel()
+    {
         delete db;
     }
 
-    int rowCount(const QModelIndex &amp;parent) const {
+    int rowCount(const QModelIndex &amp;parent) const
+    {
         return (parent.row() &gt; 0) ? 0 : db-&gt;totalVotes();
     }
-    int columnCount(const QModelIndex &amp;parent) const {
+    int columnCount(const QModelIndex &amp;parent) const
+    {
         Q_UNUSED(parent);
         return 3;
     }
@@ -124,16 +137,16 @@ public:
         switch (role) {
         case Qt::DisplayRole:
         case Qt::EditRole: {
-            Movie m = Movie::getMovie(db, index.row());
-            int v = index.row() - m.dataBaseOffset();
-            switch (index.column()) {
+                Movie m = Movie::getMovie(db, index.row());
+                int v = index.row() - m.dataBaseOffset();
+                switch (index.column()) {
                 case 0: return m.id();
                 case 1: return m.user(v);
                 case 2: return m.score(v);
+                }
+                return index.row();
+                break;
             }
-            return index.row();
-            break;
-        }
         case Qt::TextAlignmentRole:
             return Qt::AlignRight;
         }
@@ -143,12 +156,14 @@ public:
     DataBase *db;
 };
 
-class Window : public QWidget {
+class Window : public QWidget
+{
 
-Q_OBJECT
+    Q_OBJECT
 
 public:
-    Window(QWidget *parent = 0) : QWidget(parent) {
+    Window(QWidget *parent = 0) : QWidget(parent)
+    {
         ui.setupUi(this);
 
         // Qt versions less then 4.2.2 will not handle the default 30px size very well
@@ -176,17 +191,22 @@ public:
         connect(ui.votes, SIGNAL(pressed(const QModelIndex &amp;)), this, SLOT(changeUser(const QModelIndex &amp;)));
         connect(ui.user, SIGNAL(pressed(const QModelIndex &amp;)), this, SLOT(changeMovie(const QModelIndex &amp;)));
     }
-    ~Window() { delete userModel; }
+    ~Window()
+    {
+        delete userModel;
+    }
 
 private slots:
-    void movieIdChanged(int newId) {
+    void movieIdChanged(int newId)
+    {
         Movie movie(db.db, newId);
         int row = movie.dataBaseOffset();
         QModelIndex idx = db.index(row, 0);
         ui.votes-&gt;scrollTo(idx, QAbstractItemView::PositionAtTop);
         ui.votes-&gt;setCurrentIndex(idx);
     }
-    void userIdChanged(int newId) {
+    void userIdChanged(int newId)
+    {
         userModel-&gt;setId(newId);
     }
     void changeMovie(const QModelIndex &amp;index)</diff>
      <filename>tools/explorer/main.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006 Benjamin C. Meyer (ben at meyerhome dot net)
+ * Copyright (C) 2006-2007 Benjamin C. Meyer (ben at meyerhome dot net)
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions</diff>
      <filename>tools/movie/main.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006 Benjamin C. Meyer (ben at meyerhome dot net)
+ * Copyright (C) 2006-2007 Benjamin C. Meyer (ben at meyerhome dot net)
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,11 +40,13 @@
     GenerateBetterProbe does both #1 and #2, once done delete the old database files
     and replace the probe.txt file.
 */
-class GenerateBetterProbe : public Algorithm {
+class GenerateBetterProbe : public Algorithm
+{
 public:
 
     GenerateBetterProbe(DataBase *db, const QString &amp;newProbeFileName) :
-        Algorithm(), currentMovie(db) {
+            Algorithm(), currentMovie(db)
+    {
         newProbeFile = new QFile(newProbeFileName);
         if (!newProbeFile-&gt;open(QFile::WriteOnly)) {
             qWarning() &lt;&lt; &quot;unable to save&quot; &lt;&lt; newProbeFile-&gt;fileName();
@@ -52,7 +54,8 @@ public:
         stream = new QTextStream(newProbeFile);
     }
 
-    ~GenerateBetterProbe() {
+    ~GenerateBetterProbe()
+    {
         delete stream;
         delete newProbeFile;
         scrubbMovie();
@@ -76,9 +79,10 @@ public:
     /*!
         Remove users listed in the probe from the movie file
     */
-    void scrubbMovie() {
+    void scrubbMovie()
+    {
         QString fileName = QString(currentMovie.dataBase()-&gt;rootPath()
-                        + &quot;/training_set/mv_%1&quot;).arg(currentMovie.id(), 7, 10, QChar('0'));
+                                   + &quot;/training_set/mv_%1&quot;).arg(currentMovie.id(), 7, 10, QChar('0'));
         QFile movieFile(fileName + &quot;.txt&quot;);
         QFile newMovieFile(fileName + &quot;.new&quot;);
         if (movieFile.open(QFile::ReadOnly) &amp;&amp; newMovieFile.open(QFile::WriteOnly)) {</diff>
      <filename>tools/scrubprobedata/main.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2006 Benjamin C. Meyer (ben at meyerhome dot net)
+ * Copyright (C) 2006-2007 Benjamin C. Meyer (ben at meyerhome dot net)
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions</diff>
      <filename>tools/user/main.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ec05bb95643b7e3f078e6917061377cd7407e6c5</id>
    </parent>
  </parents>
  <author>
    <name>Benjamin C Meyer</name>
    <email>ben@meyerhome.net</email>
  </author>
  <url>http://github.com/icefox/netflixrecommenderframework/commit/5780cdd19b2f277faafbdfde79996044b458b896</url>
  <id>5780cdd19b2f277faafbdfde79996044b458b896</id>
  <committed-date>2007-04-06T03:18:02-07:00</committed-date>
  <authored-date>2007-04-06T03:18:02-07:00</authored-date>
  <message>Update copyright and correct code style</message>
  <tree>2b1e5b5a0aa260852a85ac96ddf252d427755781</tree>
  <committer>
    <name>Benjamin C Meyer</name>
    <email>ben@meyerhome.net</email>
  </committer>
</commit>
