Is ubigraph capable of node selection and custom context sensitive click menus? - opengl

I want to write custom callbacks and context menus for selecting individual nodes (vertices) in ubigraph. The way I see it, the user interfacing with the server will almost always want to be able to find out more about a particular vertex, and there is a definite need to be able to do things like see if there is a path between two nodes.
Does anybody know if this can be done? I don't think it can, since the ubigraph server is closed source. Anybody with some in depth knowledge is more than welcome to provide an answer.
Here is ubigraph: http://ubietylab.net/

Related

Facebook style like system in modx cms (php)

Trying to build a simple like system in modx (which uses php snippets of code) I just need a button that logged in users can press which adds a 'like' to a resource.
Would it be best to update a custom table or TV? my thoughts are that if it is a template variable i can use getResource to sort by amount of likes.
Any thoughts on the best way to approach this or how to build this would help. My php knowledge is limited.
Depends how you are going to use it after and if you are storing more data than just a 'like' count. TV's are expensive on resources [even more so if you are going to whip through the entire resource set with getResources] so if you are going to do a lot of processing after the fact I would either look at a custom table ~or~ explore using property sets on your pages [I think it should be pretty easy to write a plugin that will update a page property]
I'd definitely go for a custom table.
While you could simply increment a numeric TV to count the amount of likes, you will come to a situation where anyone may be able to keep on liking a resource without limit - while you didn't specify the exact concept, that hardly can be desired. Using a custom table you could throw in a relational alias to the user ID that liked the resource, add a timestamp so you know when it happened, and let your fantasy run wild on additional features that are now open to you.
While not a hard requirement for custom tables, you will probably want to take the time to learn xPDO, which is the database abstraction layer MODX is based on. There's a great tutorial on the RTFM which walks you through it.

Problems overriding IAccessible::get_accName in MFC application

I'm currently working on a legacy MFC application undergoing a major upgrade. One of the things we're changing is how we test this. We want to create GUI automation tests for the application, and to that end, we're using UI spy to inspect the visual elements, pull out automation names and IDs and help us write our tests. However, unfortunately, a lot of elements (ie tree items, text boxes) don't have automation names associated with them, and we'd like to add them. From what I've been able to find by googling around, overriding CWnd::get_accName should allow us to associate accessibility API names with the elements, but when I override it, nothing changes and I can't see the newly assigned name. Have I missed something ? Can somebody please point me in the right direction for adding accessibility information to an MFC application ?
Ensure you are calling EnableActiveAccessibility() in the CWnd-derived class constructor.

Custom Silverlight TreeView Template

I build tree with Hierarchical datatemplate (with button beside each node) loaded from xml file.
What I want to do is when i press the button beside the node it will open node details in a popup inside the tree (Like tree sub node)
Any ideas ????
I'm using Silverlight 4
Determine if you want type of layout control you want to use (Canvas, Grid, Stackpanel).
Each has their strengths and weaknesses.
Once you decide on this, start designing the logic... then you start coding.
If you're too lazy and want a control/solution that's alreayd built for you, you can try googling it... which i'm pretty sure you'll find samples/demos/source-code for.
Personally i do recommend you spend time looking for samples and source-code, because a hierarchical treeview is a bit more complex than you might think. In particular, the logic for your node placements so that they never collide with each other could be complex (depending on your level of experience).
If you DO decide to write your own, I applaud you, and you will surely learn way more this way.
Oh by the way, not sure what you mean by hierarchical datatemplate. I suggest you write a usercontrol for a single Node. then maybe write another control (treeview control) that manages all the nodes to present the hierarchy tree.

which layout engine for finding coordinates of html elements on the web page?

I am doing some web data classification task and was thinking if I could get the co-ordinates of html elements as they would appear on a web-browser without taking into consideration any css or javascript being referred in the web page.
My language of programming is c++ and the need results for a couple million of pages, so it has to be fast. I know there is a Microsoft COM component which renders the page in a web browser control and then can be queried for position of different html tags. But this is not suitable in my case as it first renders the whole page which takes up a lot of time.
So as I found out, there are open-source layout engines WebKit, Gecko that can probably be used for this. But that's a huge piece of code and I need someone to direct me to the right classes or right modules to look into or any previous/similar work someone has done previously. Also, please let me know what you guys think is a good choice if I want to customize the existing code for use with multiple threads to make it faster.
Thanks
Generally, you would find that different page rendering engines do render the html in their own way and the results will differ.
The thing is that if you stick to any concrete browser engine, what you are to do is somehow bringing this engine into your project and using engine's interface to retrieve these coordinates. Kind of a tough task though, simply because you'll have to read a lot of documentation and crawl through thousands of files.
I think that right approach would be posting this task in some place, that is specific for the page rendering engine you've chosen. (gecko/webkit/...)
If you prefer sticking to something MS-specific, guess it's gonna be easier, but can't help you with something like class names or code chunks that you want to see. Probably somebody else could guide you in this case.

Attributes: Are the current REST-architecture tools limited to a tree-structure?

Historically operating system directory-structures have been trees:
C:
Windows
System32
Program Files
Common Files
Internet Explorer
And the REST architecture emulates the same thing:
http://...//Thomas/
http://...//Thomas/Mexico/Year2003/Photos
http://...//Thomas/Mexico/Year2007/Photos
http://...//Thomas/Finland/Year2005/Photos
http://...//Thomas/Finland/Year2010/Photos
http://...//Thomas/Finland/Year2010/Videos
http://...//Thomas/USA/Year2005/Photos
But, looking the current structure, I need to make searches:
All pictures that are not from
Finland?
All pictures taken in 2005?
All pictures in timeline?
It is not efficient to do a REST-interface with every tree-hierarchy combinations. You need more efficient information management; you need an attribute-system rather than a tree-structure.
(Oh, why the operating systems are not based on attributes?)
StackOverflow and Google seem to use attributes and syntax with "+"-marks like:
http://www.stackoverflow.com/Tags/asp.net+iis7
http://www.google.com/search?&q=iis7+asp.net
Today's frameworks like WCF and ASP.NET MVC have a good support for RESTful tree-structures. But is there support for attribute-structures? Wouldn't you call an attribute-structure still REST?
I would like to make an attribute-WebService and use it with a LINQ in Silverlight-client... Which is the best way to start? :-)
In order to create an effective REST interface you need to identify the resources that make sense for your client application. If you look at you use cases:
All pictures that are not from Finland?
All pictures taken in 2005?
All pictures in timeline?
The question you need to answer, is if this requires three resources or just one. I am assuming you want to have more than just these three queries, so therefore the most flexible solution is to define a generic resource which is a "collection of pictures".
/Thomas/pictures
From here, you want to be able limit contents of this resource by using query parameters.
/Thomas/pictures?country=not-finland
/Thomas/pictures?year=2005
In the case of the third item it may make sense to create a separate resource for that item.
/Thomas/PictureTimeline
There are other scenarios where it may make sense to create additional resource such as
/Thomas/FavouritePictures
The important thing is to identify what key concepts of your application you want to model as resources and then assign those resources an URL. Trying to do REST design via the URL space is going to make you bang your head against the wall.
What you are looking for are URI matrix parameters:
http://www.w3.org/DesignIssues/MatrixURIs.html
When to use query parameters versus matrix parameters?.