Category Archives: Server

Phil 4.3.14

8:00 – 4:00 SR

  • DB backups
  • Deployed new jars and swfs for FA. The FMP window and the debug statements is not working. And Dong still needs to add class and method info to logger for non-debug.
  • Webapps backup.
  • WebGL
  • Got a response back from JetBrains. They basically said ‘don’t load large files’. Idiots.
  • Got three.js from Git. Works fine. Yay!
  • Need to drill down into the way that translations and rotations are handled.

Phil 4.2.14

8:00 – 4:00

  • FinancialAssistant and VisibilityScriptingServer both disappeared from the server. No idea why. Maybe tied to the war file?
  • FMP popup is working in RA but not FA
  • Regex fix worked
  • Working on WebGL up and Running, but the example code crashed WebStorm. It really is that kind of day. Finally found the problem: a 14MB javascript model file. WTF?
  • Three.js is looking very nice…
  • And there is a typescript descriptor file: https://github.com/borisyankov/DefinitelyTyped/blob/master/threejs/three.d.ts

Phil 4.1.14

8:00 – SR

  • Nice, symmetric data today.
  • Took my comprehensive exam again. Felt much better about it. We’ll know in a month, I guess.
  • Backups.
  • Need to retire some certs. And push Lenny on his training.
  • Found the problem with the big vis query – the cell values are being single quoted, but one of thi strings contains a single quote : ‘Carla’ Demo’. So it looks like we need to strengthen the way that data is written out. Added a regex pattern that’s defined on DbTable instantiation : ^[a-zA-Z0-9 ]+
  • JavaScript/WebGL
  • Worked through my issues with my alpha “fogged” cube. A debugger would be very helpful. It looks like there is one here: http://www.gremedy.com/download.php Need to check that out. But in the meantime, here’s the better result that still doesn’t work in IE (WebGL error INVALID_ENUM in drawElements(Triangles, 36, UNSIGNED_BYTE, 0)).
  • WebGL typescript definition file, automatically generated: https://github.com/RicoP/webgl.d.ts/blob/master/README.md.
  • OBJViewer has code to read a Blender file and draw it. Nicely, this doesn’t freak out IE. The buffers must be better put together.
  • Finished the book. It looks like three.js is a wrapper that has some legs. And it will run on IE if you’re careful. Ordered the book.

Phil 3.28.14

8:00 – 4:00 SR

  • Did not see snow today.
  • Backups.
  • Showed Tangie a screenshot of the roles page – some people want more access?
  • JavaScript
  • Chapter 8 and 9. Starting on 10.
    • The HUD example should probably serve as the basis for the framework. It’s got picking, and 2D overlay. No lighting or reflection maps though. It’s a good start though. Will need to have a shape manager and then shapes. Also dprint.
  • wow: http://glsl.heroku.com/

Phil 3.27.14

8:00 – 5:00 SR

  • Backups
  • Testing Dong’s theory that spaces are killing the VSS query. Well, it was either that or the wrong quoting of the table name in the python script.
  • Broken Queries
    • Projects_underbudget
    • alert_1_30_days_overdue
    • alert_2_planned_values
    • alert_3_FMPs
    • alert_4_not_obligated_within_30_days
    • alert_5_not_accepted_within_30_days
    • alert_6_no_outlays_within_60_days
    • alert_7_UsersNotLoggedIn30days returns, but MIPR, portfolio_administrator, portfolio_manager, program, service_finance_pocs and service_project_managers all come up null
  • JavaScript
    • Installed WebStorm 8.0, as our support license expires on Monday.
    • It turns out that you can get a glsl plugin. Very nice. http://plugins.jetbrains.com/plugin/6993?pr=
    • Hmm. I’m starting to think that I could pass up the points in a Mass-Spring-Damper to the GPU and just update the clock if there is either (a) a way to save information between frames or (b) a way to write back into the array buffers. All the needed math functions are there. The problem is that GLSL appears to only do calculation on a per-vertex basis. Oh, wait, there’s this: http://webcl.nokiaresearch.com/

Phil 3.26.14

8:00 – 4:00 SR

  • Backups
  • Got my copy of the OpenGL ES programming guide
  • Database updates
  • The DbTable.writeToVizDb() Query: is not showing the query
  • There is a ScriptFacades.dbStoredQuery saying that there is a syntax error at line 1 in  listing of a ‘2013 Summary by Appropriation and Capability’. Turns out that it was spaces in the column names. We’ll fix that tomorrow.
  • Javascript
    • NURBS and such for way-cool charts. Trust me on this. http://verbnurbs.com/
    • Firefox apparantly has some odd bug. When gl.getShaderInfoLog(shader) is called, it returns a string that breaks Strings. Assigning it to a string or sending it to the cosole causes JavaScript to become unresponsive. The results can be put into an alert, though about 50% of the time, the following error appears: TelemetryStopwatch: key “FX_PAGE_LOAD_MS” was already initialized resource://gre/modules/TelemetryStopwatch.jsm
      NS_ERROR_NOT_AVAILABLE: prompt aborted by user resource://gre/components/nsPrompter.js
    • This appears to be a known FF bug?
    • Nice online shader editor: http://shdr.bkcore.com/
    • Damn – *Firefox* has built in shader editors!
    • So now that we’ve had the opportunity to see some helpful error messages, here’s how you set up and use multiple array buffers in WebGL:

First, the shaders. Data comes into the vertex shader and is then copied over to the varying variable(s)

var VSHADER_SOURCE =
  'attribute vec4 a_Position;\n' +
  'attribute vec4 a_Color;\n' +
  'varying vec4 v_Color;\n' +
  'void main() {\n' +
  '  gl_Position = a_Position;\n' +
  '  gl_PointSize = 5.0;\n' +
  '  v_Color = a_Color;\n' +
  '}\n';

// Fragment shader program
var FSHADER_SOURCE =
    '#ifdef GL_ES\n' +
    '   precision mediump float;\n' +
    '#endif\n' +
    'varying vec4 v_Color;\n' +    // Receive the data from the vertex shader
    'void main() {\n' +
    '   gl_FragColor = v_Color;\n' +
    '}\n';

Then we create the data:

    // Create a buffer object
    g_vertexBuffer = gl.createBuffer();
    g_colorBuffer = gl.createBuffer();
    if (!g_vertexBuffer || !g_colorBuffer) {
        var msg = 'Failed to create the buffer object';
        console.log(msg);
        alert(msg);
        return -1;
    }

    // Bind the buffer object to target
    gl.bindBuffer(gl.ARRAY_BUFFER, g_vertexBuffer);
    var a_Position = gl.getAttribLocation(gl.program, 'a_Position');
    if (a_Position < 0) {
        var msg = 'Failed to get the storage location of a_Position';
        console.log(msg);
        alert(msg);
        return -1;
    }
    // Assign the buffer object to a_Position variable
    gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0);
    // Enable the assignment to a_Position variable
    gl.enableVertexAttribArray(a_Position);

    // Bind the buffer object to target
    gl.bindBuffer(gl.ARRAY_BUFFER, g_colorBuffer);
    var a_Color = gl.getAttribLocation(gl.program, 'a_Color');
    if (a_Position < 0) {
        var msg = 'Failed to get the storage location of a_Color';
        console.log(msg);
        alert(msg);
        return -1;
    }
    // Assign the buffer object to a_Color variable
    gl.vertexAttribPointer(a_Color, 3, gl.FLOAT, false, 0, 0);
    // Enable the assignment to a_Position variable
    gl.enableVertexAttribArray(a_Color);

    // clear everything at the end
    gl.bindBuffer(gl.ARRAY_BUFFER, null);

Last, we enter the drawing loop. First, we get the handles to the attributes, then sequentially bind, enable and overwrite their data buffers

    var a_Position = gl.getAttribLocation(gl.program, 'a_Position');
    var a_Color = gl.getAttribLocation(gl.program, 'a_Color');
    // Clear 
    gl.clear(gl.COLOR_BUFFER_BIT);

    // make some new vertex data
    for(var i = 0;i < (n*2); ++i){
        vertexDataArray[i] = Math.random()*2.0 - 1.0; // make some new vertex positions
    }
    // Write date into the vertex buffer object
    gl.bindBuffer(gl.ARRAY_BUFFER, g_vertexBuffer);
    gl.enableVertexAttribArray(a_Position);
    gl.bufferData(gl.ARRAY_BUFFER, vertexDataArray, gl.STATIC_DRAW); // use the new vertex positions
   
    // Write date into the vertex buffer object
    gl.bindBuffer(gl.ARRAY_BUFFER, g_colorBuffer);
    gl.enableVertexAttribArray(a_Color);
    gl.bufferData(gl.ARRAY_BUFFER, colorDataArray, gl.STATIC_DRAW); // write the same color values

    gl.bindBuffer(gl.ARRAY_BUFFER, null);

    // Draw the points
    gl.drawArrays(gl.POINTS, 0, n);

Phil 3.21.14

8:00 – SR

  • Backups
  • Add code to MySQLif that does the following to a table stored in visibility_dev2:
    • Get a hash of the query string
    • start a timer
    • run the query
    • stop the timer
    • SELECT the row with a matching hash or make a new one.
    • Add the time to the running total
    • increment the count of calls
  • This will allow us to find the queries that are being run the most often and the ones that take the most time. We should focus our efforts on the longest queries that are called the most.
  • Build a query (per Lenny’s instruction) that shows who’s late and who’s under. Include names, project info and contacts.

Phil 3.20.14

8:00 – 4:00 SR

  • Backups
  • fixed __view_monthly_committed. It was not summing for year 2
  • Put together 2013 charts
  • Generate separate financial data for fake cognos data to test chart queries. Nearly done. Need to walk through with Dong and verify that all the needed columns are present.

Phil 3.19.14

8:00 – 4:00 SR

  • There is still snow on the ground. It is still cold.
  • Backups.
  • New FA
  • Multiple DB updates and fixes. Committed not rolling over from one FY to another.
  • JavaScript
    • WebGL
    • This could be really nice. It looks like something I would write: https://github.com/evanw/lightgl.js/. Might try wrapping it in a YUI module, since there’s not that much code.
    • Well, it runs great in FF, slow in Chrome, and is broken in IE (unable to return the PointSize attribute from the shader).
    • webgl
    • This is *much* faster:
    • webgl2

Phil 3.18.14

8:00 – 4:00 SR

  • Backups
  • Installed new certs on the server. Important note – the alias in the keystore insert request has to be the same as the one in the keystore certreq. Otherwise you get the helpful error message: “java.lang.Exception: Input not an X.509 certificate”
  • JavaScript

Phil 3.14.14

8:00 – 4:00 SR

Phil 3.13.14

8:00 – 5:00 SR

  • Backups
  • Charts! Made one, decided that it might be easier to update the Trend Widget to point at different data sources. Wound up allowing edits on the XML in the desktop “save as” option. Built a release and sent to Bill V.
  • Deploying new FA
  • JavaScript

Phil 3.12.14

8:00 – 4:00 SR

  • Backups
  • Deployed new FA, and a *huge* view
  • Lenny is having a problem where EAs that have been claimed are getting unclaimed.
  • Printed slideshow screenshots that we need to match
  • Had the evil “Main application must be in the list of application paths” message. This page had the answer. It looks like the mxml file had been dropped from the project file.
  • Found the code and the format for building reusable charts. Dong’s building the queries. We’ll try them out tomorrow.
  • JavaScript

Phil 8.11.14

8:00 – 5:30 SR

  • Backups
  • More Server Cert work
  • Discussions with Lenny
  • Need to add a search to the page that will find text in paragraphs and link back to the Physics Shape. All paragraphs that don’t match the text are hidden? Wonder how that will affect the scrollto. Also need an introduction paragraph and a title.
  • When a cognos data is manually mapped, obligations and outlays should be added to monthly financial data
  • Second year query needs to be fixed for month order
  • Need to add a pop-up warning about claiming a req where the subBC doesn’t match.
  • RQ notes
    • Add a show/hide hidden fields. This does mean that when checked, an item disappears
    • Add “strong hide” that keeps the line in the DB, but never shows the line
    • Carry through ignore from previous steps. In other words, ignore “hidden” items from subsequent queries
  • JavaScript
    • Figured out how to grab a redirect request and use it in the context of the operation. Also how to prevent default behavior.
    • Added content. Discovered more about stylesheets.
    • The descriptor text for Physics shapes was disappearing after a mousup event on the scrollable list. Added a refresh call to the ShapeManager.
  • Helped Dong a bit with data providers.