In GEF how to avoid overlapping links on each other and on other GEF elements - eclipse-emf

On a GEF canvas I have number or figures to represent a flow charts. Now these flow charts are coupled and we have multiple flowcharts. Now the issue is each gef figure has 1 or more links that connect between 2 elements. As number of elements are more, the links are crossing each other as well as links are crossing other GEF elements. This creates a messy picture /diagram.
I want to avoid such thing , meaning I want to make sure that links do not cross each other as well as links do not cross any other element . Is there any way I can do it in GEF ? Any idea....
In GEF , I see there is something called bendpoints, but for that I assume, we need to put some logic so that they do not overlap. Is there readymade/auto logic avilable that we can use to do this ?

Use org.eclipse.draw2d.ShortestPathConnectionRouter router for the links.
Please see GEF's Flow example plugin. It has the behaviour you'd like implemented. (org.eclipse.gef.examples.flow plug-in project)

Related

Detour recast tileLayer what is it about

I would like to ask how tileLayers in detour work.
Can i layer any 2 tiles resulting in "cuts" being merged into bigger holes and in what manner, are there any limitations? How many of these layers can i have and how they interact when navigating. Can i have for example basic always unchanged layer with whole map and then multiple layers with user placed geometry etc...
I'am talking about dtNavMeshCreateParams::tileLayer from original lib. There is some implementation using it in TempObstackes example. But it is not well explained (it has many custom things inside but i'am interested only in function of those layers)
Thank you in advance, i cant find much info about this online so any help would really be appreceated.
So actually i finally (many hours) found my answer to what these layers are used for:
http://digestingduck.blogspot.com/2011/02/heightfield-layer-portals.html
(btw this seems to be blog of navmesh lib author, enjoy)

How to remove the voice of the song effectively with plugins in Gst

I have used the audiokaraoke plugin to remove the voice of the song. It works well on some songs, but it only makes a little difference on the other songs. What can I do to improve it by using other plugins, or by combining audiokaraoke with other plugins? Thanks in advance.
There is no guaranteed way to remove a voice from a mix. You can try to use the equalizer and see if you can lower some frequency bands in the range of 800-2500 Hz, but that will most likely also affect the instruments.
To give a little explanation, if I ask: "the sum is 8 what where the addends?" there are multiple answers (e.g. 4+4, 2+3+3, 1+2+3+2, ...). For a mix we don't know the original tracks before mixing and not even the number of tracks.
The audiokaraoke plugin mostly relies that the voice is placed in the stereo center and looks at typical frequencies of the himan voice. If the voice has lots of effects applied, those will most likely remain in the result :/

Use R to create graphs/plots/charts and GTK to display and interact with them

I would like to use R to generates some graphs/plots/charts and then use GTK to display them. One feature is that the plot must be able to auto-update and have some interactive features such as set maxima/minima labels, re-scale, allow for normalisation, etc... The data set is potentially of the order of several thousands data points, possibly up to ten of thousands.
Are there any libraries/modules that already do that? My Google-fu was weak. I do not mind either a c++ or a python one.
If there are no such library, how would I be able to achieve this?
Note: The system is kind of embedded -- it certainly has no Internet connection but does have an internal network. Using the web would increase the cost of the system drastically and thus it is not a good solution to my problem.
As you've put python in your tags too, maybe matplotlib would be of some interest? Just in case.
I wondered whether 10,000 points would be an issue with these graphics devices, and with this gWidgets script running under RGtk2 and Qt it was just about the border of fast enough to be acceptable (certainly on my aging machine 100,000 points was way too many):
library(gWidgets)
options(guiToolkit="RGtk2")
w <- gwindow("test")
pg <- gpanedgroup(cont=w)
fl <- glayout(cont=pg)
gg <- ggraphics(cont=pg)
size(gg) <- c(600, 600)
fl[1,1] <- "No. points"
fl[1,2] <- no_pts <- gedit("10", cont=fl, coerce.with=as.numeric)
fl[2,2] <- gbutton("click me", cont=fl, label="", handler=function(h,...) {
n <- svalue(no_pts)
plot(rnorm(n), rnorm(n))
})
If this speed is acceptable, one can make a GUI along the lines of playwith for your specific needs relatively easily. It might be that the cranvas package can make this faster for Qt.
Otherwise, I don't know if the rgl package of Duncan Murdoch would be useful, but it might be. Simon Urbanek gave a very nice presentation at the last useR meeting where the openGl graphics engine in some browsers allowed for very fast plots with over 1,000,000 points, and this was done over a websocket.
First of all, R at its core does not feature interactive plots -- this goes against the idea of controlling almost everything with the programming language itself.
There are some libraries that allow you to create more or less interactive plots, starting from the simplistic locator function that you would need to wrap into your R programs, and including the manipulate package from RStudio as well as the iplot package. There is even a GTK+ based R package called playwith.
Depending on what you actually want to achieve, maybe using gnuplot would be a better idea.
For a web based solution (web is the future :)) that allows this kind of functionality from a server, I would take a look at the shiny package just released by the people at Rstudio. It looks like what you need, without you having to do any programmng. And you get the bonus that anyone with a browser can open it from anywhere. See this lnks:
http://blog.rstudio.org/2012/11/08/introducing-shiny/

How do I create levels for my puzzle game ? Obj-C & Cocos2d

I want to create levels in my cocos2d game and I do not know how to do that with .plist files ... I searched the Internet but unfortunately I couldn't find significant information on how to implement these property lists. Can you please help out ?
Check out Tiled Map Editor. Tiled's TMX format is supported by Cocos2D.
As with any Apple technologies, the first place you should start searching for is the developer.apple.com website. In this case, here's the Property List (plist) Programming Guide.
However, I find property lists very awkward to work with, specifically if you want to create them manually and whenever they contain more than just a few entries. It certainly can't hurt to evaluate rolling out your own file format, text-based plain and simple. I would always rather work with simple text files like these rather than messing with property lists:
X=10;Y=10;Tile=30;
X=12;Y=11;Tile=28;
X=16;Y=19;Tile=22;
It's a different story if you actually design the data with a tool or within an app, where you'll be able to make use of the various collection convenience methods that save and load property lists, for example to and from a dictionary or array.

Window like control in SketchFlow?

I've been playing around with SketchFlow from Microsoft and one thing that bothers me is that I cannot seem to find a window looking like sketch.
I would like it to have title bar and 3 "buttons" like all normal windows do (minimize, maximize, close buttons).
In Balsamiq Mockups this is very easy, however I don't see any kind of window-like sketches in SketchFlow.
I'm trying to mockup future desktop application.
You are correct that there isn't one built in. In SketchFlow you can easily make "component" screens that can be used multiple times. To create what you are looking for you could combine a sketch rectangle, with a couple of buttons and a textbox. You can select all of this content, right click it and make it into a component screen.
The MockupsLibrary also provides the mockups you are looking for. Once you've installed it, it'll appear in your assets as "ButtonWithIconMockup". You can select the "WindowMinimize", "WindowMaximize", and "WindowClose" for your IconImage attribute to get the desired result.
With Expression Blend 4, you can install the Mockup Controls by following the instructions at How to add mockup controls to your Expression Blend library. In the new Assets | Mockups category you will see a WindowMockup item that does exactly what you wanted.
To play around with the Mockup Controls, try the MockupDemonstration sample from the Help Welcome screen.
Unfortunately, there doesn't seem to be a builtin MenuStrip yet (although you can laboriously build one yourself from the non-sketchy SimpleMenu and SimpleMenuItem controls)? Also there doesn't seem to be any support for indicating keyboard accelerators (prefixing the desired letter with & doesn't work).
In general, it seems like Sketchflow really isn't designed to be used to prototype standard desktop applications?