Category Archives: Phil

Phil 5.21.2010

7:00 – 4:30

  • Deployed ProjPortfolioMgr. It works! Hosanna!
  • Spent 40 min waiting for Jim M to show up
  • Meeting with Larry about commercialization. I think we’ll try to package up the charting part of Visibility and use it as the wedge for services. Also, Ed(?) is looking at using Media Temple, so we might be able to piggy back on that effort
  • Bike seminar
  • And it took 2 hours to get back here…

Phil 5.20.2010

7:30 – 5:30

  • Deployed the new Scripting, which pointed out that I was trying to update the wrong table. Once fixed, the scripts worked fine, so I put them on a schedule to run every day at 7:00 and 7:05
  • Couldn’t connect to the S2F endpoint. Somehow, the url is getting changed from https:// (which it is in the settings.xml file) to http://. I printed out relevant stuff and showed to Dong.
  • Talked to Jim M
  • Meeting/demo with Anne is now set for Monday at 10:30
  • useful!
    • find . -name *.mxml -mtime -15 -type f -exec wc -l {} ; | awk ‘{total += $1} END{print total}’
    • This is “find all the mxml files under the current directory that are less than 15 days old. Run a line count on the files and sum them.
  • We seem to have fixed the problems with ProjPortfolioMgr. Burning a disk

Phil 5.19.2010

7:30 – 4:30

  • Meeting with Jim M. Came up with a more realistic plan for hitting their goals
  • Showed Anne how to ingest data
  • Deployed new Vis2 and Scripting
  • Tried my new insert. It didn’t work. The reason was that the column name was wrong. Fixed the logging so that the error shows
  • Got ProjPortfolioMgr to deploy on S2f. We’ll also make that the first attempt at an installer

Phil 5.18.2010

9:30 – 4:00 5:00 – 6:00

  • Dentist this morning
  • Back to Facade insert – done and working!
  • Dong added backticking to Ingest Manager
  • Built some new sensor rods (paddles?) for Tom

Phil 5.14.2010

7:30 – 4:30

Phil 5.13.2010

7:30 – 4:30

  • Fixed the category problem in employees_std. Talked to Mike C about developing an automated way to do this. Will start doing a daily manual set of the details xml. Later, I’ll do this in a script
  • Adding user management to the scripting server – done and checked in.
  • Asked Dong to use javaUtils rather than recreate log4j and properties classes

Phil 5.12.2010

7:30 – 3:30

  • Helped John Williams out a bit with generating some unusual tables
  • Changed the employees_standard table to reflect the new organization of the data. Had a talk with Mike C. about automatically generating details xml files
  • After plugging in my computer, found it running *really* slowly. Deleting my trash (25,025 items) to see if that speeds things up.
  • Need to talk to Dong about backticking Ingest Manager – done
  • Apparently, I left of 11 employee classification types. Need to fix that tomorrow.
  • Adding user management to scripting

Phil 5.11.2010

7:30 – 3:30

  • Fix ServerLog – done. The problem is the changeout of the remote object to the javautils package. Had to generalize a bit.
  • Fix PublishServlet – done
  • Demo prep (screenshots) – done
  • Demo. Went well, I think. One of the lab PMs liked the demonstration enough that he wanted a copy for his lab

Phil 5.10.2010

7:30 – 4:30

  • Prepping for demo
  • Got dong’s war file deployed on my machine. That works, rather than building. He’s going to ask Mike to try building and see where the problem lies
  • Problems with ie today – it can’t open multiple Flex programs.
  • Spent some time getting the projmanager user working in mySql
  • better pull for errors: SELECT p.title as project, f.name as funding, o.* FROM obligations_outlays o, fundings f, projects p;
  • IngestManager problems:
    • Can’t parse special characters into column names or the values can’t be inserted properly in the column. For example, ‘2/15/60’ won’t read in at all, ‘2-15-60’ won’t have any data in the columns, and ‘2_15_60’ is a date format that Actionscript can’t recognize
    • If the XML SOLR file has CRs in the text file, they are kept, which screws up VISIBILITY. They need to be stripped.

Script to look for decreasing values in outlays:

# Strip off a column based on its name
def stripColumn(headers, table, columnName):
    newRow = []
    for item in headers:
        if item != columnName:
            newRow.append(item)
    newTable = [];
    newTable.append(newRow)
    for row in table:
        newRow = []
        for i in xrange(len(headers)):
            if headers[i] != columnName:
                newRow.append(row[i])
        newTable.append(newRow)
    return newTable

# Find a month that is less than the previous
def errorsToSolrXml(doc, root, header, table):
    for row in table:
        for i in xrange(len(row)-1):
            if header[i].count("month_") > 0:
                cur = int(float(row[i]))
                next = int(float(row[i+1]))
                #print row[0]+": "+header[i]+" = "+str(cur)
                if(cur > next):
                    #print header[i]+" = "+str(cur)+" > ("+str(next)+")"

                    errorNode = doc.createElement('doc')
                    root.appendChild(errorNode)
                    fieldNode = doc.createElement('field')
                    fieldNode.setAttribute('name', 'type')
                    textNode = doc.createTextNode(str(row[0]))
                    fieldNode.appendChild(textNode)
                    errorNode.appendChild(fieldNode)

                    fieldNode = doc.createElement('field')
                    fieldNode.setAttribute('name', 'cur_month')
                    textNode = doc.createTextNode(header[i])
                    fieldNode.appendChild(textNode)
                    errorNode.appendChild(fieldNode)

                    fieldNode = doc.createElement('field')
                    fieldNode.setAttribute('name', 'next_month')
                    textNode = doc.createTextNode(header[i+1])
                    fieldNode.appendChild(textNode)
                    errorNode.appendChild(fieldNode)

                    fieldNode = doc.createElement('field')
                    fieldNode.setAttribute('name', 'value')
                    textNode = doc.createTextNode(str(cur - next))
                    fieldNode.appendChild(textNode)
                    errorNode.appendChild(fieldNode)

#################### 'main'

impl = getDOMImplementation()

jf = ScriptFacades()
table = jf.dbQuery('project_portfolio', 'SELECT * from obligations_outlays where project_id=1 and year=2010')
tableData = table.getTable()
newTable = stripColumn(tableData[:1][0], tableData[1:], 'uid')

errorDoc = impl.createDocument(None, "add", None)
root = errorDoc.documentElement
errorsToSolrXml(errorDoc, root, newTable[:1][0], newTable[1:])
#print errorDoc.toprettyxml()
jf.publishXml("/obligation_errors.xml", errorDoc.toxml())

Phil 5.7.2010

7:30 – 5:30

  • Working on writing a script that does something with Dong’s data

Inserting data for months – no invoice though

jf = ScriptFacades()

table = jf.dbQuery('project_portfolio', 'SELECT uid from obligations_outlays where project_id=1')
tableData = table.getTable()
print tableData[1:]

for uid in tableData[1:]:
    for month in xrange(1,25):
        monthName = 'month_'+str(month)
        query = 'UPDATE obligations_outlays set '+str(monthName)+' = '+str(random.randint(1000,2000)*month)+' where uid = '+str(uid[0])
        print query
        jf.dbQuery('project_portfolio', query)

Getting data and publishing

# This method converts a DbTable (A list of lists) into an Apache SOLR xml document
def solrXmlFromListList(doc, root, headers, table):
    for row in table:
        rowNode = doc.createElement('doc')
        root.appendChild(rowNode)
        #print row
        for i in xrange(len(headers)):
            #print str(headers[i])+" = "+str(row[i])
            fieldNode = doc.createElement('field')
            fieldNode.setAttribute('name', headers[i])
            textNode = doc.createTextNode(str(row[i]))
            fieldNode.appendChild(textNode)
            rowNode.appendChild(fieldNode)

# Strip off a column based on its name
def stripColumn(headers, table, columnName):
    newRow = []
    for item in headers:
        if item != columnName:
            newRow.append(item)
    newTable = [];
    newTable.append(newRow)
    for row in table:
        newRow = []
        for i in xrange(len(headers)):
            if headers[i] != columnName:
                newRow.append(row[i])
        newTable.append(newRow)
    return newTable

# Change month_xx to a year/date string
def mapDates(row, year):
    for i in xrange(len(row)):
        if row[i].count("month_") > 0:
            splits = row[i].split('_');
            month = (int(splits[1])-1)%12
            addYear = (int(splits[1])-1)/12
            row[i] = str(month+1)+"-1-"+str(year+addYear)
            #print row[i]

#################### 'main'

jf = ScriptFacades()
table = jf.dbQuery('project_portfolio', 'SELECT * from obligations_outlays where project_id=1 and year=2010')
tableData = table.getTable()
newTable = stripColumn(tableData[:1][0], tableData[1:], 'uid')

mapDates(newTable[:1][0], 2010)

impl = getDOMImplementation()
myDoc = impl.createDocument(None, "add", None)
rootElement = myDoc.documentElement
solrXmlFromListList(myDoc, rootElement, newTable[:1][0], newTable[1:])
#print myDoc.toprettyxml()
jf.publishXml("/obligation_outlays_proj_1_year_2010.xml", myDoc.toprettyxml())

Phil 5.6.2010

7:30 -4:30

  • Today, in 1862, the Mexican Army defeated the French at the battle of Puebla. In case you were wondering.
  • Richard M is getting Tomcat working better on the LDAT server. We will be ready to continue experimenting in a week or so.
  • While waiting for Dong to roll in his changes from yesterday, I’m going to try and fix the case where the JVM holding a jython instance dies from some fatal error. Wound up deleting the ScriptEntity instance from the static map of all script instances and loading a new instance. Seems to work, but we need to test on other servers.
  • Got Dong’s data, but the project will not build

Phil 5.5.2010

7:30 – 3:30

  • Some thoughts on Mike’s slideshows
    1. Make sure that the changes/additions to the db happen automatically when the class is first addressed (CREATE TABLE IF NOT EXIST foo()) doesn’t seem to take much overhead. That way, deployment will be easier.
    2. I was thinking that the slide show controls would be another Utils panel that could be hidden as needed.
    3. Selectable transitions (fade, slide vertical, slade horizontal, etc) would be a plus
    4. Maybe the slide controls can live in the top part of the display and be hidden unless needed?
  • Brought in EdgeUtils for Clift
  • Meeting with Jim M, Trish ? and Dong. Lots of changes, as can be seen is his log entry.

Phil 5.4.2010

7:30 – 4:30

  • Svn is working, but the check in is not working in Eclipse. Attempting to update svn plugin, but things are hanging. May have to say goodby to svn integration. Dong has Subclipse working. Will switch to that later. Tortoise for now
  • Call Richard Martin – 443.479.8721
  • Got Visibility and VisibilityScripting checked out and running

Phil 5.3.2010

7:30 – 3:30

  • Finished financial disclosure
  • Maven deploy is down, so I’m looking at introspection in python as a way of doing code completion. Looks promising.
  • Maven is working! 🙂
  • SVN commit is not 😦 Getting a “Commit failed (details follow): 170001: Authorization failed”
  • Looked over Tom’s documentation