Monthly Archives: February 2011

Dong Shin 02.28.2011

  • PPM
    • reworking Financial Data Request
      • Request spans from earliest FY and latest FY in selected projects
      • Request template creates monthly request status
      • Data Request Panel start in current year and month, removed All and reworked filtering
      • Individual Project Status added
      • added data_request_templates table and reworked _data_requests_projects and data_requests tables
Advertisements

Mike 2.28.2011

More work on the data system

  • issue with reserved column names, dealt with it by appending underscores to the beginning and end of each column name mapping
  • issue with longs strings, first tried clobs for any string > 250 in length but that involved casting back and forth so instead put in some logic to double the available length every time it doesn’t fit starting at 255, then 511, 1023 etc.
  • Successfully saving strings, integers, doubles, and booleans.  Now need to save references to other objects.

I had to share this line of code from a Hibernate java class:


private static class IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller implements MappedIdentifierValueMarshaller{

Christine 02.28.2011

It’s been a while, but I wanted to compile a bunch of info before posting since my schedule has been so sporadic.

  • Been working with Tomcat/Eclipse/Flash setup on both Mac and Windows.
    • SSL: Although Dong sent me his .keystore file, it was out of date and contained his info. Created new certificate keystore, then modified settings.xml file.
    • Took a few steps back to try and get a test project working. Combining Phils steps with additional documentation, I was able to successfully get a Flex/Java project working on both mac and windows… with one snag. Question: Why does Tomcat’s settings.xml file reset itself when using Tomcat through Eclipse? (side note: my Mac and Win eclipse are set to “use Tomcat Installation”) Here’s what I found – after modifying the settings.xml file to use SSL, when I use Tomcat through Eclipse SSL is no longer enabled. When I check the settings.xml file I find that it’s been reverted back to its original state (with the SSL connector info commented out and the keystoreFile info removed). Is there a way around this?
    • As for getting a test project to work, I ended up downloading BlazeDS.
      • In Eclipse I start a new project by going File < Import and selecting Java/War file. Name my project and click "finish".
      • Right-click on the project and select “Add/Change Project Type” < "Add Flex Project". I configure the server type to be BlazeDS and click 'Next'.
      • The following screen should be configured as such: Root Folder-Point to the WebContent directory of your project, or if you changed the name point to the folder with the WEB-INF and META-INF directories in it; Root URL-end with project name; Context URL-is the last part of the URL minus the ‘/’. Validate the server location and click “Finish”. (You may see a “Recreate HTML Templates” error in the ‘Problems’ view. Right-click and fix)
    • After this was set up, I moved over the xml files from a working project (see Phil’s post, step 9). Because I created the project as an import using BlazeDS war file, the (basic) jars needed were already imported and a web.xml file was already created. So then I refreshed, rebuilt and tested by going to “http://localhost://messagebroker/amf&#8221; and it worked. yippee.
    • But my celebration ended abruptly when I tried to test the secure messagebroker only to discover that the settings.xml file was reverted back to it’s original state. Need to find out why.
  • Thanks to Phil for helping me deal with Window administrative issues that was making it impossible to run Tomcat. Windows and I have been through a few counseling sessions and we’re starting to get along

Phil 2.28.11

7:30 – 4:30 VISIBILITY

  • It’s starting to feel more Spring-like than wintry. Got 107 miles in on the bike this weekend. My legs are very, very tired.
  • Going to try to do some compound actions with RServe, including running a query and generating a plot into a particular directory. If that works, I’m going to put that code in a remote object and try to trigger it from Flex.
    • Making progress, but getting data out of Rserve data frames is very goofy
  • Cloud-based IDE? – http://www.cloud9ide.com/. Some more stuff here: http://query7.com/cloud9-ide-review
  • Worked with Dong on getting the PPM requests organized in a by-month fashion.

Mike 2.25.2011

  • Helped Alan out with some blog difficulties
  • Made it so you must log in to the SCT blog in order to see anything
  • Added a better log in screen to the SCT blog
  • More work on the data service
  • Able to load object made on the server just fine
  • Had some difficulty creating objects on the client then saving them, the issue was conflicting ids
  • There is now a Flex client ID if the object is made on the client side
  • otherwise the database id is used on both sides

Dong Shin 02.25.2011

  • PPM
    • created DBUpdateSQLs02252011.sql for adding data request tables
    • working on Project export
      • Get all budget centers and amounts query
        SELECT
        c.center_name as `Budget Center`,
        c.center_number as Number,
        GROUP_CONCAT(if(a.year=1,a.amount,NULL)) as FY1Amount,
        GROUP_CONCAT(if(a.year=2,a.amount,NULL)) as FY2Amount,
        GROUP_CONCAT(if(a.year=3,a.amount,NULL)) as FY3Amount,
        c.appropriation as Remarks
        FROM projects p, budget_centers c, budget_amounts a
        WHERE p.uid = c.project_id
        AND c.uid = a.budget_center_id
        AND p.uid = 96
        GROUP BY a.budget_center_id

        SELECT c.center_name as `Budget Center`,c.center_number as Number,
        GROUP_CONCAT(if(a.year=1,a.amount,NULL)) as FY1Amount,GROUP_CONCAT(if(a.year=2,a.amount,NULL)) as FY2Amount,GROUP_CONCAT(if(a.year=3,a.amount,NULL)) as FY3Amount,
        c.appropriation as Remarks
        FROM projects p, budget_centers c, budget_amounts aWHERE p.uid = c.project_idAND c.uid = a.budget_center_idAND p.uid = 96GROUP BY a.budget_center_id

    • Array Collection not returning data in ordered manner? May have to write own parser…

Phil 2.25.11

7:30 – 4:30 VISIBILITY

  • Looking for the mythical java client for Rserve. It does not appear to be in the distro or the svn trunk repo
  • Found it. It was in the snapshots here: http://www.rforge.net/Rserve/files/.
  • compiled the Rserve jar (using make!). Put it up on the maven repo as net.rforge.rserve ver 0.6.3
  • Added R.dll to my path
  • Started the server and connected to it with Putty. The connection was successful, and then the server crashed. That may be because PuTTY sent some bad characters.
  • Talking to the server in java without killing it. Wheee!
  • Writing up a description of our data migration plan – done.
  • Actually able to run an ANOVA and understand what I was doing. I think I can even generate plots and have them put in a particular server folder so that they can be downloaded and displayed in flex.

Tom.DeVito 2-24-2011

Arduino research:

  • Found many links regarding the Arduino electronics platform:
  1. Explanation of different version:    http://www.ladyada.net/library/arduino/unofaq.html
  2. Tutorials: http://arduino.cc/en/Tutorial/HomePage
  3. 414 Arduino projects and counting: http://hackaday.com/category/arduino-hacks/
  4. Search engine for chips: http://www.findchips.com/
  5. Ada’s Store: http://www.adafruit.com/
  6. Sparkfun Store:  http://www.sparkfun.com/
  • I determined that the version we want is the Arduino Uno.  I believe that all latest versions have similar specs, but this one is probably the best for our stage of prototyping.  A smaller one, which mounts onto a board may be better once the electronics are finalized.
  • Due to the recession, DIP chips are getting hard to find because many producers are cutting costs by only make SMTs, which have higher demand.  This is making it so the arduino’s main chip is becoming increasingly rare.  There is a SMT version now to help keep up with demand.  I figured we should stick with the DIP chip while we still can.
  • The Arduino cannot directly control our amplifiers.  This can possibly be done using a gate to route the current through a volatage spliter maintaining a Float, open or close the gate with a second pin to bypass the voltage splitter to make a High and turn off the main pin to make a Low.  This may be easier to program then the current method because you just have to control 2 pins.  That said the Arduino can communicate with i2c devices like the rheostats
  • The Arduino is very easy to program.  Basically you just initialize and loop.  Communication to the device works very similarly to communication with the usb-i2c master chip.  Just set the arduino loop to listen to the com port and do various things depending on what it is sent.  On the PC side its identical to the i2c program, since the Arduino has more memory, I believe the commands can be in the form of char arrays as opposed to hex only.
  • When we were looking at ladyada.net you asked where do people get the time to do all this stuff?  The answer is MIT.  All the students are required to have a website.

Other Electronics

  • I’m going to call the murata company and see if we can get some samples of http://www.murata.com/products/catalog/pdf/p82e.pdf.   They are finger tip sized full-ranged peizoelectric speakers.  Currently I can only find them in quantities of 2000….  They really look perfect for our application but don’t think we will need 2000 til we start production.  (not to mention its still $5 each at this quantity)
  • There are some other options for speakers but I haven’ sen any that look as good as those.  Most speakers this size have a far more limited range of sound.

Amplifier Circuit:

  • Waiting on a few capacitors that were not at the electronics store.
  • Found a small portable break-out board to play audio with. http://www.sparkfun.com/products/9534.  Its has somewhat of an amplifier but only 7 volume settings so our amp chips will still be needed.
  • Needed a bigger breadboard to prototype this circuit.  Not nearly enough room on the one I have
  • Audio will be driven by the aurdino.

Dong Shin 02.24.2011

  • PPM
    • added reset filters on Requests Data
    • joining projects, budget_centers, appropriations doesn’t return projects with 0 budget because those might not have budget centers data – fixed by adding OR p.total_budget = 0 in the query
    • removed colors for projects and added status – incomplete gets red
    • rearranged project filter buttons
    • reworked Active Year filters
    • added tooltips to projects datagrid

Phil 2.24.11

8:00 – 5:00 VISIBILITY

  • Now that I’ve got rJava/RMI working, I’m going to try building a few composite commands and parsing the results.
  • And now I’m wondering if rServe makes more sense. It appears to create a separate workspace for each connection. That would work much better for a webapp. The only thing to watch out for is that the server goes down now and then, so it will have to be restarted under control of the Remote Object.
  • Spent the afternoon with the customer drawing diagrams of how our data will be packaged and migrated between platforms.

Mike 2.23.2011

  • Finally resolved the deletion issue
  • Now working on a basic Flex app for browsing and managing the data base
  • It currently:
    • Displays a list of all existing object types
    • Can retrieve and display all dynamic objects of a selected type
    • Displays meta information about each object type (property names and primitive types)
  • It will:
    • Allow new object types to be created
    • Allow modification of existing types
    • Allow deletion of object types (including removing of every dynamic object of that type)

Dong Shin 02.23.2011

  • Verified that FGMDEV backup works
  • My Eclipse is not behaving!
    • hangs at Loading Web Service DOM….
    • found a offending bug on WTP – related to Tomcat?
    • adding -clean to eclipse.ini resolved it temporarily
    • moved projects to different workspace…
  • PPM
    • Request filtering using Year, Month, Description and Status
    • Project filtering (Active Project) based on Start and End Year range using appropriation length

Phil 2.23.11

7:30 -5:30 VISIBILITY

  • Server Meeting today at 11:15. Don’t see how I can make that
  • Over at site starting at 1:30
  • Setting up rJava: http://www.mumuen.com/2010/10/running-r-in-java-with-jrirjava.html
  • Got the rtest code in the rJava examples directory compiling. It turns out that the CRAN directory has an old version. Sheesh. Updated the maven repo with the version 9 jars. Added R_HOME to the path. Restarting all to register changes… No joy.
  • Following the directions here: http://mithil-tech.blogspot.com/2009/11/r-and-java-jri-via-eclipse.html
    • That worked!
  • Next will be to get R to run in Tomcat: Here’s where I’ll start: http://wiki.cvrgrid.org/index.php/RJava/jri_Setup
  • Useful r packages so far (google “CRAN xx’ for detailed info on the package):
    • sqldf – allows SQL manipulation of tables
    • reshape – for manipulation of data types
    • gwidgets – support for interactive graphics
    • HH
    • rJava – java interaction
    • RServe – R as a webserver

Dong Shin 02.22.2011

  • FGMDEV backups working….
  • PPM
    • rearranging components to support Active Project search…
    • Project filtering query…..
      SELECT p.begin_year, (p.end_year+MAX(a.duration)) as end_year, p.uid
      FROM budget_centers c, projects p, appropriations a
      WHERE c.project_id = p.uid AND c.appropriation = a.type
      GROUP BY p.uid

Tom.Devito (2-17-2011) – (2-21-2011)

2-17-2011

  • Got to a point with the audio amplifier controller which I cannot pass without testing my assumptions on the chips operation.
  • Chips came in but no adapter boards to mount them on yet
  • Resumed work on the OpenGL articulated hand.
  • Got one finger working, mirrored it to make sure all my assumptions were true.

2-18-2011

  • Still no adapters for chips continued to work on the articulated hand.
  • Added Camera function.  Had a lot of problems getting this working.  Almost all of these problems had to do with me putting things in the wrong place.
  • Noticed that there are some flaws with the current method of rotation.  Found this site http://stackoverflow.com/questions/2758501/rotating-in-opengl-relative-to-the-viewport which explains that you need to use quaternions to make it so you can spin the object without its coordinates flipping.  There is some example classes in java on this site.  Will look for a c++ class or transcribe this once I get the hand drawn.
  • Experimented a bit more with various OpenGL functions as  prepared to move the current work out of the sandbox.

2-21-2011

  • Moved out of the sandbox.  Set the stage, made a finger class with parameter(x,y,z,length)
  • Had many many problems getting this to behave properly mostly due to forgetting to initialize variables and other simple things eventually got it to draw right.
  • Was having a problem with the animation that it was jumping all over the place.  Thought this might be a real-time issue since the animation method was no longer in the top level glut program.  Read a bit of the chapter on real-time then I realized yet again  forgot to initialize yet another important variable….
  • All the animation I did so far was 2D.  I experimented with animating in 3d since the thumb is going to need this.
  • Random Thought:  It may be good to put a force based joy-stick on the thumb to help give it a greater degree of freedom then can be achieved with strain gauges alone.  The thumb has a great amount of 3-dimensional freedom that is essential to being able to pick up small objects.  I think this would work best if the surface is flat and it disables the extra freedom when you press in so that the thumb does not move around when you try to grab something.