Category Archives: PHP

Phil 10.14.15

8:00 – 5:00 SR

  • Got an error message after trying to explore an URL (http://www.sportsgrid.com/mlb/back-to-the-future-part-ii-predicted-cubs-as-2015-world-series-champions/):
    • Error: itemTableArray is undefined
      RssController</RssController.prototype.parseDataObject@http://philfeldman.com/WglCharts2/controllers/rssControllerTS.js:195:29
    • Need to flag that so that it shows up as an error message in the feed rather than having the ‘waiting’ message appear
    • Really need to re-weight the Alchemy items. Changed to 0.5 for now. Still A hack
    • Adding behaviors to support the changes I made to the GUI.
      • Unlink (from Wampeter)
        • GUI – done. Lots of oddness with the <select> directive.
          • Fixed the blank first selection by setting the initial values in the guiVars object (I’m using to keep things clean) to null.
          • The ng-model is being set to a JSON string. So I had to get the object pointer from the list used to populate the select. In this case I used the guid. What a hack!
        • DB – Done. Had to add a addDirectedAssociation()
      • Link to wampeter
        • GUI – Done
        • DB – TODO
      • Update wampter value change DB (means updating association weights)– TODO
      • Update Rating value change DB – TODO

Phil 10.13.15

8:00 – 5:00 SR

  • Sent the (hopefully) fixed FA and RA to Bill
  • Think I got my accesses fixed. Again
  • Adding behaviors to support the changes I made to the GUI yesterday.
    • Unlink (from Wampeter)
      • GUI – done. Lots of oddness with the <select> directive.
        • Fixed the blank first selection by setting the initial values in the guiVars object (I’m using to keep things clean) to null.
        • The ng-model is being set to a JSON string. So I had to get the object pointer from the list used to populate the select. In this case I used the guid. What a hack!
      • DB – TODO
    • Link to wampeter
      • GUI – TODO
      • DB – TODO
    • Update wampter DB – TODO
    • Update Rating DB – TODO

Phil 10.6.15

8:00 – 5:00 SR

  • The FA and RA apps are not working right with 2016 data. Pinged Dong.He says he can take a look tonight.
  • After installing Win10, I had a heart stopping moment where Apache wasn’t starting, with an error message of “Problem detected! Port 80 in use by “Unable to open process” with PID 4!” Stack Overflow suggested that this was the “World Wide Web Publishing Service” and you have to stop it. Here’s a screenshot: Services
  • Other than that, Win10 seems just fine. I love the menu bar for each monitor.
  • Figuring out how to add the network to the Ranking code…
    • Will need to sort the array based on the ranking. Doesn’t look like a problem.
    • Added weight to ITarget
    • Reworked Rating.ts so that everything is initialized to a square matrix of zeros. You now have to create the Rankings.PageRank class (appropriately sized), then populate it, then calculate and get results.
    • Construction of the matrix from the network is nearly done. Finish tomorrow.

Phil 10.5.15

  1. 8:00 – 4:00 SR
  • Change the divisor in the PageRank class to be a scalar.
  • Change the ‘History’ list to show the ranked items. Either all, or individually. (tab view)?
  • Add sliders to the rating view in the feed. Will also need a save with associated PHP code
  • Add update rating PHP
  • Add update linkSelected PHP
  • Show the changes in the list of items as the sliders are adjusted.
  • add an ‘annotation’ field to the rating? Better tracking?

Phil 10.2.15

8:00 – 5:00 SR

  • So far today, the roof is leaking, I’ve lost my badge, and the espresso machine is fried. Perfect Friday.
  • Still wondering where to calculate pagerank. Here’s the algorithm in JavaScript: https://github.com/stevemacn/PageRank/blob/master/lib/pagerank.js
  • Looks like there isn’t a TypeScript version. I think I’ll start with the client version. That should allow for more interactivity. Maybe just calculate for all users on the server?
  • Implemented a PageRank algorithm from first principals. First, the versions that are out there are buggy. Second, because they use variable length arrays of links, you can’t put weights. The downside is that there is a performance hit, but on small networks that shouldn’t(?) be a problem.
  • One easy performance mod is to change the normalization process to first calculate the fraction, then create a multiplier of  1/that, so we’re multiplying rather than dividing.

Phil 10.1.15

8:00 – 4:30 SR

  • And Dreamhost is back up. Looks stable too.
  • Had a good discussion with Dr. Pan about next steps.
    • A simple page rank based on support/dispute value is a reasonable place to start
    • See how sensitive the Eigenvector is to:
      • Number of rated nodes
      • Support/dispute values
  • The query history is listing multiples where they are linked to a Wampeter.
    • The data object is coming back with redundant entries (my_query_guid_5). It’s not there in the DB, so tn_view_network_items is wrong. Fixed – I had to add ‘distinct’ to the select that makes the view. I thought it would be possible to nest selects, but something about views made that trickier.
  • Wire up type visibility checkboxes – Done. Had to spend a good deal of time pondering how to deal with the on-the-fly recalculation based on how many links an item has and what it’s default visibility is. Still need to hide objects if they are unselected and should not be visible. TODO.
  • Make Reset Positions set the origin to zero. Done.
  • Deployed the new version.

Phil 9.30.15

8:00 – 4:00

Phil 9.29.15

7:30 – 4:30 SR

  • Server backups
  • Finish ‘link selected’
    • Build PostObj – done. Also constructed a default title.
    • New PHP query, which will require an array of ‘targets’ Done
    • Insert the new source, get the ID, Done
    • Add the associations Done
    • Added a new item type – Wampeter
    • Return the DataProvider (is it time to clean this up?)
  • Add show/hide checkboxes by type (URL, Query, Rating, etc.) TODO
  • Need to add a ‘guest’ or view only role/user. TODO
  • And Dreamhost is busted again.

Phil 10.17.15

8:00 – 5:00 SR

  • Some progress on dev machine? Submitted (another) ticket.
  • Meeting with Ronda at 3:00.
  • Thinking about weights on the trust matrix. Is adjacency calculated by keyword/entity/host etc., and the weight of that connection based on the trust value? I’m currently thinking that all the support/dispute scores are added together, and used as the weight for (all?) the connections. Then the question is how to build the matrices.
    • Do the urls get connected directly, or do they go through keyword/entity/host etc?
    • Is there a separate matrix for keyword/entity/host/etc?
    • It would probably make sense to try one large heterogeneous matrix and several smaller homogeneous matrices. With and without the intervening non-url item.
  • Finishing up with adding ratings. Done!
  • Need to add ‘Relationship’ that can connect to multiple items. It should be like a rating item that connects to all selected without the rating value. Although ‘relevance’ might be interesting. And allow me to use the ratingPanel html. Done
  • Adding re-centering on the selected items. Discovered I wasn’t adding items to the rootObject. Instead I was adding them to the scene directly. That took a while to fix. Working on centering now..

Phil 10.16.15

8:00 – 5:00 SR

  • Added Ronda as an admin. We need to do something with groups but can’t figure out what/how to do.
  • Fixed Carla’s cert problems
  • Need to add ‘tolower’ on the names/labels of non-url items in the PHP, before the item is stored – TODO
  • Need to check if it’s easy to move the root object to where the selected item(‘s average) position – TODO
  • Need to be able to edit an item – TODO
  • Working on ratings
    • Making a ratingObject to pass between the controller, the rating directive, and the rssFeed directives. Done
    • Wired up the Rating directive to the RssFeed directive.
    • Reworking the rating query.It needs to create the item, get its id_index, then create an association between it and the target that has already been passed in. Done
    • Last thing to do is to enable the query in the rssPull.php and uncomment the submitObj call in RssController.addRatingSubmit. Cool!

Phil 10.15.15

8:00 – 4:00 SR

  • No change on dev admin
  • Need to add ‘tolower’ on the names/labels of non-url items in the PHP, before the item is stored
  • Adding rating directive today.
    • Starting with adding ratings to the data object and data format
    • Added additional shapes so ratings can be distinguished.
    • Killed Eclipse trying to run a PHP test
    • Adding a separate tn_rating to the network is going to be a lot of work. Going to see if I can use tn_items for ratings. They have enough fields, and I have the logic to treat items differently already. Ok, that seems to work. Going to delete the tn_ratings logic. Add rating will be the addition of a RATING item type and an RATING association from the rating item to the target (which can be any item?). Actually, this may turn out better. I can add COMMENT types and other meta information items.
    • Got most of the initial directive layout done and running. Tomorrow we’ll wire it up.
  • Need a show/hide selection capability. All, URLS, ENTITIES, SELECTED, etc.TODO
  • If that gets done I’ve been thinking about the addition of user-specified items. TODO
    • A new item should (must?) have an association with at least one other item.
    • Associations will be made with all selected items
    • Directive dialog to create the new item.
    • In the item list, selected and ‘visible’ items need to be color coded and labeled
    • Items need to be selectable from the item list

Phil 10.14.15

8:00 – 4:00 SR

  • Updated truancy report
  • Seminar today 11:30 – 12:30
  • Automated culling. I think I’m going to start with the cull on the canvas, rather than the server. This way I can still have the items in the list, but not shown on the network. This implies for an item to be visible (and for physics to operate on it) the item should be the source and/or target of one or more associations. DONE!
    • Tried to be fancy by just using the target array but I need a ‘source’ listing of IComponents.
    • This is what I needed to do, basically. The physics only require checks for visibility:
      var tarray:ITarget[] = this.getTargetArray();
      var sarray:IComponentBase[] = this.getSourceArray();
      var numLinks = tarray.length + sarray.length;
      var makeVisible = false; // or maybe we're also visible when selected?
      if(numLinks > 1){
          makeVisible = true;
      }
      this.setIsVisible(makeVisible);
    • I also added a ‘forceVisibility’ argument to the config object so that items like Queries always show up.
    • And, because it was suddenly easy, I added the list of sources to the item selection code. So now we ‘shift select’ targets and sources, which feels intuitively right:
      tarray = componentBase.getTargetArray();
      for(i = 0; i < tarray.length; ++i){
          targ = tarray[i].target;
          if(!this.isModelSelected(targ)){
              this.selectedModels.push(targ);
              targ.highlight();
          }
      }
      sarray = componentBase.getSourceArray();
      for(i = 0; i < sarray.length; ++i){
          targ = sarray[i];
          if(!this.isModelSelected(targ)){
              this.selectedModels.push(targ);
              targ.highlight();
          }
      }
  • Rating. Need a new modal directive. There should also be a way of having additional information about an item, like an annotation. For example, in the query I’m currently working on, “Horse and Jockey”, There was a horse “Tirpitz”, which is also the name of a battleship. There should be a way to resolve this ambiguity.
  • Pagerank. “Links” are determined by shared associations.  TODO
  • Explicit associations TODO
  • Today’s Progress: Weeds

Phil 9.9.15

8:00 – 5:00 SR

  • No progress on Dev admin
  • Work on correlation of concepts, keywords, etc. Start with ‘horse’ and ‘rider’?  TODO
  • Work on support/dispute TODO
  • PageRank in PHP TODO
  • Add ‘show/hide unrelated‘. Also, Invisible items should not have physics calculations
  • Add ‘center on selected‘? that would move the center of rotation to be any selected item.
  • Change the CSS so that the style of the buttons is taller It looks funky in some version of FF. Done
  • Clicking on queries in the network display doesn’t cause them to show up in the query window, but CONCEPTS do. Fixed
  • Adding ‘delete network’ button, since the workspace is getting cluttered. Done
  • Ran into a difficult bug to chase down. When I was deleting the last of two items (a query and an url) the url didn’t delete. It turns out that I was using a reference to an array rather than a new array of references. So I was deleting an item from an array while I was still processing the array. Ooops.

Phil 9.8.15

8:00 – 4:00 SR

  • Off yesterday for Labor Day.
  • More dev justification
  • Google Cloud platform java – https://cloud.google.com/appengine/docs/java/. The goal of this would be to calculate overall page ranks
  • Added Save for networks. In reality, this only Creates a network that is then ‘saved live’. TODO: Need to make that more clear
  • Work on correlation of concepts, keywords, etc. Start with ‘horse’ and ‘rider’?  TODO
  • Work on support/dispute 
  • PageRank in PHP 

Phil 9.4.15

8:00 – 5:00 SR

  • Lost my earlier post for today. Odd.
  • Added removeItemAssociations, which is essentially a delete item from the network
  • Fixed a bug that caused the oldes item regardless to be placed at the origin. Now it’s the oldest item of type QUERY
  • TODO: Add the ability to make visible items and their connections based on tn_type
  • Meeting with Ronda at 3:00