Multi route graphhoper project - graphhopper

Have a nice day.
I'm creating a project using graphopper and
I want to route all routes for not one, but
several routes from point A to B. How do I do this?
I have tried:
EdgeIteratorState edge = path.calcEdges().get(0);
edge.setDistance(100000);
But the next time you created route, it does not change.
Can you please tell how to make multiple routes?

Related

Working with 2 apps in PhpStorm not lose current session options

In PhpStorm 2019.2.3 I work with 2 #vue/cli and Laravel 6 Backend REST API applications
and have to switch from one app to another. Can I set hot keys for selecting another app
or automate it in someway?
Also I lose some current session options , like current Search Scope/find options in top left
and I would like to avoid it and keep them...
If there is a way ?
Thanks!

Exception Breakpoint fires when copying View Controller between projects

I've customized a tutorial and am trying to import it into my project. After copying one View Controller Scene from Document Outline into my main project, it's throwing an exception without any description of the issue. The View Controller is subclassed, so I've made sure to import the associated Swift file and set it in Document Attributes.
I don't know how to troubleshoot this one.
===EDIT===
I'm at a total loss here. I created a new project and was able to import, build, and run the project. The only difference between my main project and the new one is the VC is not the initial View Controller.
The tuturial was written in XCode 11 and Swift 4. I haven't upgraded yet, but again I was able to import into a new project w/o issue.
Check the Connections inspector (the last option on the right sidebar) and make sure there are no connections with exclamation marks (!) after them.
If there are errors, check in the Identity inspector (the third option from the left on the right sidebar) if the class of the view controller is correct.
If the connections are not needed anymore (you gave the outlet a new name etc.), remove them by clicking on the X next to them.

Is it possible to make a template with no ContentType to fetch arbitrary data in Bolt CMS?

I'm in the process of building an education site, with Departments, Courses, and Modules (all working out fine so far).
I need to make a custom Timetable page that will fetch all Modules of all Courses and plot them into a weekly calendar.
I've setup a menu entry for /calendar and made a calendar.twig template, but since there is no ContentType called Calendar the template cannot be found.
Making a ContentType for Calendar doesn't really make sense since the Calendar will be fetching and displaying Modules and Courses, for which there are already working templates.
Is there a way to setup a menu option / route to a template with no specific pre-fetched content, allowing me to just pull in everything I need via twig 'setcontent' to build my calendar? Or does this go against the grain of Bolt?
Turns out there is support for exactly this (in Bolt 3.0) just putting the answer here in case it helps anyone else.
I added this to my routing.yml and it now works as expected, allowing me to fetch any content via twig:
templatebinding:
path: /calendar
defaults:
_controller: controller.frontend:template
template: calendar

Multiple Shiny apps using the ui to populate the second app

I currently have a app that manages projects. The user sees a list of projects and can select one. They can should (it would be nice) be able to click a run button and have another app open. The parameters stored in the project they selected are populated into the second application. The issue I am having is firing the second application. runApp generates the following.
ui code line:
actionButton("RunProj", "Run"),
Warning in run(timeoutMs) :
Unhandled error in observer: Key / already in use
observeEvent(input$RunProj)
I would like to trigger the second app and pass in the location of the project directory I have looked at parseQueryString and still trying to figure out a way to include that. Maybe via a redirect?
Any suggests would be much appreciated.
Regards,
Rich
I'm not 100% sure if I understand your intention correctly but here is a few things I think you may want to think about.
In one project, if you want to run a few kinds of analyses, you may want to try navbarPage
If there are many different types of analyses, you may want to try shinydashboard
If you know the link to each app and you really want to add those "run" buttons, you can add a button manually in ui.R. I think you can write some codes in server.r to generate the link based on your database.
tags$a(href="the link to your apps", class= "btn btn-default", "Run App")

Is there a way to route to multiple files in my views in Ruby on Rails

I am making a website dedicated to flash and unity games to learn Ruby on Rails hands on and I wanted to know if there was a way to route to all the documents in a folder without entering them in the routes file one by one. I am not sure if I am just being blind, but I have been looking everywhere for an answer.
For example i have to enter:
Get 'game1', to: "games#game1"
In the routes file for an individual game, but I want to be able to add a entire library without having to enter them in one by one.
correct me if i'm wrong, but you have several files (games) into the games view folder and you want to route through a single action?
so, basically, in your routes.rb would have:
get "games/:game_number" => "games#show"
and then, on your games_controller.rb
def show
# ...
render "games/#{params[:game_number]}"
end
so, in this case, if you hit /games/first, it would render the view games/first.html.erb
this is not a good practice since the are several pitfalls through out, but, having that in mind, this should work if i got the right scenario :)
This is what variable segments are for. You should be using something like
get "games/:id" => "games#show"
and looking up the game by params[:id].