Sumo Warning in netedit - warnings

I am very new to Sumo. I am doing a simple simulation from tutorial in sumo documentation and I face a warining which stops me. Warning: Double edges aren't allowed. Does anyone know what is it and how can I get rid of?

This warning occurs on creating a route for a vehicle if you click twice on the same edge in direct succession. It essentially means that you cannot drive the same edge again (without driving other edges inbetween).

Related

Get the fixture that was clicked on

There are several physical bodies of different shapes on the screen. I want to click on the screen to get a physical body(if of course the click fell on it). I have no problems with converting the coordinates from the screen to the world and checking whether I hit the round collider(I just go through the list of "circles" and check the distance from the "click" to its center, if it is more than the radius, then skip). But I'm having problems with other shapes. I can't use raycast, as it doesn't detect the fixture inside which its starting point is. It seems to me that I'm missing some built-in solution that I didn't notice in the documentation. Advance thanks
I found an answer. World.QueryAABB
documentation pic

HTML inside JSON

I'm using an API to get some data, but one of the JSON values, contains HTML inside of it. Is there a way for me to use the HTML tags that are inside the JSON value exactly like they are shown, instead of having to make the exact same HTML tags in my MVC view, and editing these ones out? If this wasnt descriptive enough heres an example of what i mean:
This is just one of the JSON values, I didnt wanna paste the whole thing:
"detail": "<h1>Overwatch Patch Notes – October 19, 2016</h1>\r\n\r\n<p>A new patch is now live on Windows PC. Read below to learn more about the latest changes.</p>\r\n\r\n<p>To share your feedback, please post in the General Discussion forum.<br />\r\nFor a list of known issues, visit our Bug Report forum.<br />\r\nFor troubleshooting assistance, visit our Technical Support forum.</p>\r\n\r\n<p>Please note that these changes will be rolled into a larger patch for PlayStation 4 and Xbox One at a later date.</p>\r\n\r\n<h2>BUG FIXES</h2>\r\n\r\n<p><strong>General</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed an issue causing the default Overwatch spray to override a player’s chosen spray when watching a Play of the Game or Highlight</li>\r\n\t<li>Fixed an issue causing players to frequently disconnect while viewing Highlights</li>\r\n\t<li>Fixed a bug preventing the appropriate music from playing after a loss on the Junkenstein's Revenge Brawl</li>\r\n</ul>\r\n\r\n<p><strong>Gameplay</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed a bug causing multiple issues when displaying data on the leaderboards</li>\r\n</ul>\r\n\r\n<p><strong>Heroes</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed an issue preventing Ana’s Nano Boost callouts from being heard by the enemy team</li>\r\n\t<li>Fixed a bug preventing players from receiving credit toward the Healing Done commendation when healing D.Va’s mech</li>\r\n\t<li>Fixed a graphical issue that was preventing the liquid in Mei’s Endothermic Blaster from appearing</li>\r\n\t<li>Fixed a bug causing Reinhardt’s Charge to unexpectedly stop when crossing certain thresholds (e.g. when exiting a dropship)</li>\r\n\t<li>Increased the volume of Roadhog’s “Want some candy” voice line</li>\r\n</ul>\r\n\r\n<p><strong>Map</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed a bug on Eichenwalde that caused some textures to stretch across the map for some players</li>\r\n</ul>\r\n".
You can use Html.Raw inside your view to use the raw string value:
#Html.Raw(Model.detail);
https://msdn.microsoft.com/en-us/library/gg480740(v=vs.118).aspx

Block nodes/edges in graphhopper routing - wrong edges are getting blocked

I'm trying to block edges in my graphhopper routing, following the example described in the docs (https://github.com/graphhopper/graphhopper/blob/master/docs/core/weighting.md).
I try to find the edges which have to get blocked with
EdgeIteratorState edge = hopper.getLocationIndex().findClosest(lat, lon, EdgeFilter.ALL_EDGES ).getClosestEdge();
But when running my App, it shows up that some completely different edges are blocked, not the ones I tried to block.
What am I doing wrong, do you have any hints? I got stuck with this problem since four days now, no ideas left.
Don't know yet, if this is elegant, but I think I found a workaround:
in the config.properties of the graphhopper.sh I added
prepare.chWeighting=no
and while loading the graph, I set
tmpHopp.setCHEnable(false);
To block an edge afterwards, I simply set the speed for this edge to 0
FlagEncoder footEncoder = TempAppData.getInstance().getHopper().getEncodingManager().getEncoder("foot");
edge.setFlags(footEncoder.setSpeed(edge.getFlags(), 0));

I'm getting Invalid argument error when loading google maps in IE

Message: Invalid argument.
Line: 26
Char: 56
Code: 0
URI: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/9/13/main.js
I went through the solutions in Stack Exchange found some thing relevant at
Google Map api v3 - IE7 - main.js error - invalid argument (javascript)
and tried to remove the div for test purpose through jQuery like below
$(".gmnoprint").children().remove();
$(".gmnoprint").empty();
$('.gmnoprint').find("div").slice(1,2).hide().remove();
$('.gmnoprint').find("div").hide().remove();
$(".gmnoprint").children("div:lt(1)").remove();
$('.gmnoprint div:nth-child(1)').remove();
$(".gmnoprint").first().remove();
but no options has worked.
I also had this problem for IE7/8 (didn't try IE6, IE9 worked well), same line and column and same maps api file version.
I figured out that this happened (at least for me) whenever map should be re-rendered on the same page (async approach), and solution was to always remove map node from DOM just before trying to re-render map again, with e.g:
$('#MAP_CONTAINER_ID_HERE').children().remove();
with jQuery (or equivalent with native js),
Also, sometimes the problem may be in an unfinished job from the previous map rendering (assuming that we're discussing issue with maps that are re-rendered on the same page), and IEs<9 seem to be fragile when redrawing over unfinished maps.
That said - maybe you could check another thread (http://stackoverflow.com/questions/8175425/invalid-argument-error-in-ie7-jquery-tabs-and-google-map) dealing with what I just described if removal of nodes representing previous map rendering didn't help.
Finally - if you're experiencing this bug with no map re-rendering then you're probably running into issues with improperly created options or something similar, it would be much easier to respond if some code snippet or at least scenario is given.

Possible SVG Path Chrome Bug

I'm experiencing a possible bug with the path element in Chrome. I have copy/pasted what RaphaelJS has rendered here: http://petesaia.com/work/svg-chrome-bug/
In Safari & Firefox
(source: petesaia.com)
In Chrome (19.0.1084.46)
(source: petesaia.com)
Obviously there are very many points in this file which is why I limited 50 points per path element. As you can see, 2 paths are missing from the right side and 2 very small paths are missing from the left side. I found one of the paths that is not displaying and singled it out. You can see that here: http://petesaia.com/work/svg-chrome-bug/singled.html
You will notice that even when the path is singled out it still doesn't show. So Chrome must dislike something with that path.
I also noticed that sometimes it displays correctly, usually when I open and close the javascript console. It's very flimsy. I've experimented with changing stroke and weight and also no luck.
Has anyone experienced anything like this?
New discovery: These x/y values are the coordinates that break the single.html sample: 620.3536711111101,232.16932207146056 I know this because when you truncate the path up to that point it works perfectly. However, I still have no idea as to why they would break it.
Thanks,
Pete
PS: I do plan on simplifying the shape(s) but this has caught my attention first.