Category Archives: Phil

Phil 1.24.13

8:00 – 10:00, 1:00 – 4:00 ESSO

  • Backed up.
  • Role problems with PA, talked to Dong, who got a fix in by this afternoon
  • Rolled out preferences. There was a DB bug, where the preferences were set up as VARCHAR and not TEXT. Fixed.

10:00 – 1:00 FP/OH

  • Meeting with David Moor about what to do with the FP. Looking at synthetic users.

Phil 1.23.13

8:00 – 4:00 ESSO

  • Backed up.
  • Rebuilt query spreadsheet for Dong
  • There may be a problem with PA, but it is more likely an older version. We’re adding in a test that checks the DB for the latest “Compiled” string and evaluates the date. If the local date is less than the DB date, the app throws up an “Update” dialog with instructions for FF and IE. If the date is greater, the app updates the string in the DB, otherwise things start normally.
  • Javascript!
  • Cool thing:
    var num = 0;
    outermost: // create a label for this for loop
    for (var i = 0; i < 10; i + +) {
        for (var j = 0; j < 10; j + +) {
            if (i == 5 && j == 5) {
                continue outermost; // go to the label
            }
            num ++;
        }
    }
    alert( num); // 95
  • Switch statements can switch on variables?
  • IMPORTANT!!! –
    • Function arguments in ECMAScript don’t behave in the same way as function arguments in most other languages. An ECMAScript function doesn’t care how many arguments are passed in, nor does it care about the data types of those arguments. Just because you define a function to accept two arguments doesn’t mean you can pass in only two arguments. You could pass in one or three or none, and the interpreter won’t complain. This happens because arguments in ECMAScript are represented as an array internally. The array is always passed to the function, but the function doesn’t care what (if anything) is in the array. If the array arrives with zero items, that’s fine; if it arrives with more, that’s okay too. In fact, there actually is an arguments object that can be accessed while inside a function to retrieve the values of each argument that was passed in.
    • Unlike in other languages, naming your arguments in ECMAScript does not create a function signature that must be matched later on; there is no validation against named arguments. The arguments object can also be used to check the number of arguments passed into the function via the length property. The following example outputs the number of arguments passed into the function each time it is called:
function howManyArgs() {
    alert( arguments.length);
}
howManyArgs(" string", 45); // 2
howManyArgs(); // 0
howManyArgs( 12); // 1
    • When a variable is declared using var, it is automatically added to the most immediate context available. In a function, the most immediate one is the function’s local context; in a with statement, the most immediate is the function context. If a variable is initialized without first being declared, it gets added to the global context automatically.
    • And in the “No Free Lunch Dept: Setting a variable to null effectively severs the connection between the variable and the value it previously referenced. The next time the garbage collector runs, these values will be deleted and the memory will be reclaimed. Even if you have garbage collection, it never hurts to help out.
    • As in other languages, ECMAScript arrays are ordered lists of data, but unlike in other languages, they can hold any type of data in each slot. This means that it’s possible to create an array that has a string in the first position, a number in the second, an object in the third, and so on.
    • Ringbuffer: ECMAScript also provides an unshift() method for arrays. As the name indicates, unshift() does the opposite of shift(): it adds any number of items to the front of an array and returns the new array length. By using unshift() in combination with pop(), it’s possible to emulate a queue in the opposite direction, where new values are added to the front of the array and values are retrieved off the back.
  • Hit the wall reading about functions. I need my ride, and it’s only 21 degrees!
  • Burned a disk with the new PA on it.

Phil 1.22.13

8:00 – 4:30 ESSO

  • Backups
  • Deployed new PA. There are some logic issues WRT Due, Overdue and Current. Wrote them all out, but Dong has them, so I can’t enter them yet.
  • Printed out the Cognos query and results so that we have something to work with to produce the charts for Col. Dukes.
  • Spent a bit of time discussing my travails and thoughts about JDeveloper and JavaScript
  • OK, this book gets ridiculously good reviews on Amazon. Getting the Kindle edition.
  • Holy crap!
    • One of the most powerful and most controversial parts of the < script > element is its ability to include JavaScript files from outside domains. Much like an < img > element, the < script > element’s src attribute may be set to a full URL that exists outside the domain on which the HTML page exists, as in this example:
  • In XHTML (and XML), CDATA sections are used to indicate areas of the document that contain free-form text not intended to be parsed.
  • Aptana Studio 3? Downloaded. Interesting.

Phil 1.18.12

8:00 – 4:00 – ESSO

Phil 1.17.13

8:00 – 4:00 ESSO

  • Meeting with Chris, Lenny, Carla and Tom(?). Started out by discussing fixes, but became a session discussing how to make the new Financial Assistant. Over the next week, the Pit Crew will put together a spreadsheet that contains everything that they need to make a new entry in a table define by a budget center. Adding a line is essentially adding a MIPR (kind of). Adding a new line, can duplicate some or all of the previous line. Adding a MIPR addendum, for example, would duplicate the entire line except for obligation, outlay, and date. This data all goes back into the existing tables in the database. 
  • One modification of the current bugs/requests – make it so contract information in the finding request dropdown maps only to the associated MIPR.
  • Updated the servers with monitoring software and also updated their listings.
  • Made sure that the VISIBILITY code works for Dimitri’s visit.
  • Dimitri came by and we walked through an FP demo,  most of the VISIBILITY data visualization piece, hitting a lot of tangents along the way. He thinks he might find it useful.
  • And I need to update my database. visibility_scripting is out of date and there is no alerts DB.

Phil 1.16.13

8:30 – 4:30 ESSO

  • Backed up (another slow login day)
  • Deployed new version of PA
  • Working on ADF.
    • Fails to load page, which is pretty much the same problem as before: javax.el.PropertyNotFoundException
    • Wow. The problem was that I changed the default java compiler from the 1.6 U24 that Jdeveloper ships with to 1.7 U11, which is the current version. Impressive how an Oracle product broke an Oracle product
  • Nonetheless, progress:

progress

OH

  • And it looks like we’re not free of our FGM entanglements yet. Self evaluations. Woo freaking hoo.
  • Sent Lynn a note about my reimbursement as well, along with my final grades. Maybe some progress?

Phil 1.15.12

8:00 – 10:00 ESSO

  • The production server wasn’t accessible for some reason today. Tomcat was running, and if I went to 127.0.0.1 on the server, things came up just fine. Fixed by restarting the server. Weird.
  • Backups
  • A really useful  blog with some tips and code snippets which you may undoubtedly need while coding in ADF.

10:00 – 2:30 OH

  • Visit with Samir Nanavati to discuss feldman project. Nice meeting. *Terrible* traffic. It took 90 minutes to get to Tysons, and about 70 minutes to get back, for an 11:00 meeting. Oh yeah, and there was no one manning the full service booth on the toll road on the way back, so being a nice little drone, I paid by calling the posted number (FastPass). $1.00 toll, $6.00 handling charge. Then, after they took my money, they forwarded me to the toll road authority so that I could complain about the absence of a worker. I was then told that I should have run the toll. Awesome.

2:30 – 5:00 ESSO

  • Tried to follow along with the ADF videos, but the components aren’t there. Well, they are kind of there, but have changed since the video was made. As a result, I made some progress, and can build things that look kind of reasonable, but they are not launchable. Don’t know why. So, I’m going to flail at something new tomorrow: ADF Hello World Tutorial

Phil 1.14.13

  • Doctor appt this morning. The leg is totally fine.

10:00 – 3:00 ESSO

  • Talked to Dong some about the Due/Overdue/Incomplete/Complete project status 
  • Installing new Java. Need to do this at home, too.
  • To change the default Java library in JDeveloper, do the following
    • Application->Default Project Properties. The “Default Project Properties” dialog opens
    • Select Libraries and Classpath in the tree navigator on the left
    • Click on the change button at the top right The “Edit Java SE Definition” dialog opens
    • Click the “”Browse”” button after the “Java SE Executable:” field on the top right.
    • Navigate to your new “java.exe” (e.g.. C:Program FilesJavajdk1.7.0_11bin)
  • Note that this only changes the settings to new projects. To change the settings to an existing project, right click on the project in Application Navigator, click on “Libraries and Classpath”, and follow the steps above.
  • Watching the next video. This one is on ADF faces
  • Programmatic ADF. And some more code snippets.

3:00 – 5:00

  • Q1 Team get together

Phil 1.11.13

7:30 – 4:30 ESSO

  • Logging in was sloooooooooooooooooooooooow today.
  • Meeting with Chris B. Lenny and Tangie weren’t there, and Carla was busy, so it was just Dong, Chris and I. The main new thing was the idea of putting in a new field into the project line item (at the bottom of the project overview screen) that would have the identifier (possibly a script?) that tells the scripting system what item to look for in its query of COGNOS.  That and a few bugs were added to the list of req’s. Also, I mentioned to Chris that we were starting on FA, and that it would not be Flash-based.
  • Backups
  • Deployed new PPM and PA
  • Onward with Step 3: Explore the Starter Application
  • Walked through FSMs with Dong. PA is getting complex in spots…
  • ADF developer YouTube channel

FP

  • Moved the Phantom over to the testbed a(new firewire cable and USB mux) and verified that the tactor project is compiling and running. Yay!

Phil 1.10.13

8:00 – 4:00 ESSO

  • Backups and meetings.
  • We need to figure out a way to get around the need to “double click” to get to a cell after filling out a form.
  • Found a better set of tutorials: Charting with ADF Data Visualization Components
    • Part 1: Validating the Model and Starting Building the UI
    • Nope, can’t get connected to the DB to make a schema, so I’m screwed. Error message from Ant is:
      • C:JDeveloperFOD_11InfrastructureDBSchemabuild.xml:28: java.sql.SQLException: Listener refused the connection with the following error:
        ORA-12505, TNS:listener does not currently know of SID given in connect descriptor. Checking the error message leads here. Going to poke at that after lunch.
      • Following the link above, I was able to determine what the SID(?) jdbc was attempting to connect to. This can be done in a couple of ways:
        • Go to C:oraclexeapporacleproduct11.2.0servernetworkADMIN and view tnsnames.ora. It’s a text file. The file contains (in my case) three “definitions” of connections. In my case, the one labeled “XE” had my machine (WHITEOAK) listed as the host and a port (1521). That appeared to be the way to connect to the DB.
        • The above can also be done by typing “lsnrctl services” at the command line. in this case, it shows an instance called “xe”. HOST is WHITEOAK, though the port is different (49170)
        • I verified that xe was visible using “tnsping xe” on the command line. That looked promising, so I adjusted the build.properties (jdbc.sid =) to reflect that. And now that I go back and read the tutorial, it does indeed say that this value can either be orcl or xe. Woohoo!
      • Part 2: Starting Using Graphic Components
      • Part 3: Adding Other Complex Graphical Presentations to the Page
      • Part 4: Using the Thematic Map Component
    • On a separate note, it might be nice to put in the Feed Tem Social plugin and bring in interesting content related to our coding tavailes. Need to talk to Dong about that tomorrow.

Phil 1.8.13

8:00 – 4:00 ESSO

FP

  • The video of Paul’s interview with me about my work.

Phil 1.7.13

8:00 – 3:00 ESSO

  • Backups. The now “non-merged” overdue table makes things go much faster.
  • Verified that Tangie and Carla have accounts on the Data Visualization tool.
  • Accepted a meeting invitation for Friday at 7:30. Ow.
  • Looking into doing FA in JDeveloper
    • Oracle database still works. Yay. The only way to get to the admin page appears to be through the start menu. Looks like it’s time to read some Oracle DB documentation.
    • Per the help, getting SQL Developer. Documentation is here. And it’s running, and connecting to the 11_Express DB. Woohoo!
    • OK, now that everything is back together, figuring out where I was the last time I was here (Oracle JDeveloper 11g Release 2 (11.1.2) Tutorials).

3:00 – 4:00- Orientation

Phil 1.4.13

8:00 – 4:00 ESSO

  • Backups,
  • Fixed a bug in the ingest for overdue projects. It was merging rather than replacing. Huge! Files!
  • Deployed new version of PA. Still a bug with dates WRT incomplete projects.
  • Loooooooooong meeting with Tangie, Carla, Lenny, Chris, Dong and I. Dong is adding the action items to the req’s page.
    • May start with some new tools – a Financial Assistant (FA) app that will allow creation and editing of budget center information, and Program Manager Assistant (PMA) that will allow for streamlined management of projects.
    • I think we should do this in JDeveloper or GWT.
  • Some WCC getting acquainted emails and such.

4:00 – 5:00 FP.

  • Cleaned up code while figuring things out.
  • Added a new effect callback, which went in cleanly. Looking into how to have multiple effects.

Phil 1.3.13

8:00 – 4:00 ESSO

  • Viz Tool meeting
    • Found a date bug that we’re going to try to fix by Friday’s meeting
    • Reset all the alert states to acknowledged, to keep the users from going crazy
    • Need to add a way of acknowledging more than one alert. My thought is that we have a table that has the number of alerts that can show before an “acknowledge all” button is shown, and a MOTD list that can contain messages such as the state of the system. Maybe even something that has to be acknowledged.
    • Need to add a way to indicate that it’s time to enter data, but not an “overdue” flag.
  • Backups
  • Need to do a status report. Done
  • Worked out how to handle items in PA, when it is time to enter them, but they are not overdue. The states will now be as follows:
    • Current. Everything is filled in
    • Incomplete. Something is filled in, and the item is not overdue
    • Due. It is time to fill out the item (i.e. Between the 1st and 17th of the month is the “Due” period for the previous month
    • Overdue. An item that does not have all fields filled in that is past the “Due” date (i.e. the 17th)
  • Finished up my security briefings and emailed a scan of the signed form to Carrie.
  • Burned a disc containing PA and status for tomorrow.

4:00 – 5:00 FP

  • Got the callback working.
  • Pulled out setup(), run(), and terminate() methods. Next, I need to play around with the forces and make a moving object. Ideally, I’d like to have the rotating cube pair from the KF demo, but I’ll have to find some good cube code. I might start with spheres. Once I get the collisions behiving in a way that I like, I’ll start trying to add the code to (a copy of!) the KF demo

Header file:

class GravityWellClass
{
public:
	GravityWellClass(void);
	~GravityWellClass(void);

	bool setup();
	bool run();
	bool terminate();

protected: 
	HDErrorInfo error;
	HDSchedulerHandle hGravityWell;
	HHD hHD;

	static HDCallbackCode HDCALLBACK gravityWellCallback(void *data);
};

the callback method:

HDCallbackCode HDCALLBACK GravityWellClass::gravityWellCallback(void *data)
{
	const HDdouble kStiffness = 0.075; /* N/mm */
	const HDdouble kGravityWellInfluence = 40; /* mm */

	/* This is the position of the gravity well in cartesian
	   (i.e. x,y,z) space. */
	//static const hduVector3Dd wellPos = {0,0,0};
	hduVector3Dd wellPos;

	HDErrorInfo error;
	hduVector3Dd position;
	hduVector3Dd force;
	hduVector3Dd positionTwell;

	HHD hHD = hdGetCurrentDevice();

	/* Begin haptics frame.  ( In general, all state-related haptics calls
	   should be made within a frame. ) */
	hdBeginFrame(hHD);

	/* Get the current position of the device. */
	hdGetDoublev(HD_CURRENT_POSITION, position);

	memset(force, 0, sizeof(hduVector3Dd));

	/* >  positionTwell = wellPos-position  < 
	   Create a vector from the device position towards the gravity 
	   well's center. */
	wellPos[0] = 0;
	wellPos[1] = 0;
	wellPos[2] = 0;
	hduVecSubtract(positionTwell, wellPos, position);

	/* If the device position is within some distance of the gravity well's 
	   center, apply a spring force towards gravity well's center.  The force
	   calculation differs from a traditional gravitational body in that the
	   closer the device is to the center, the less force the well exerts;
	   the device behaves as if a spring were connected between itself and
	   the well's center. */
	if (hduVecMagnitude(positionTwell) < kGravityWellInfluence)
	{
		/* >  F = k * x  < 
		   F: Force in Newtons (N)
		   k: Stiffness of the well (N/mm)
		   x: Vector from the device endpoint position to the center 
		   of the well. */
		hduVecScale(force, positionTwell, kStiffness);
	}

	/* Send the force to the device. */
	hdSetDoublev(HD_CURRENT_FORCE, force);

	/* End haptics frame. */
	hdEndFrame(hHD);

	/* Check for errors and abort the callback if a scheduler error
	   is detected. */
	if (HD_DEVICE_ERROR(error = hdGetError()))
	{
		hduPrintError(stderr, &error, 
					  "Error detected while rendering gravity welln");

		if (hduIsSchedulerError(&error))
		{
			return HD_CALLBACK_DONE;
		}
	}

	/* Signify that the callback should continue running, i.e. that
	   it will be called again the next scheduler tick. */
	return HD_CALLBACK_CONTINUE;
}

Lastly, the setup method that establishes the callback:

HDSchedulerHandle hGravityWell = hdScheduleAsynchronous(gravityWellCallback, 0, HD_MAX_SCHEDULER_PRIORITY);