routing

firebase hosting iframe error with X-Frame-Options

杀马特。学长 韩版系。学妹 提交于 2019-12-01 12:13:14
问题 I need to use couple of iframe for a page hosted with firebase, but its giving me X-Frame-Options error, one of the iframe is for gallery hosted on picasa, and anohter ifrmae for contact form(because i couldnt sent email via firebase :() here is error Refused to display 'https://get.google.com/albumarchive/pwa/11111/album/1111?source=pwa#slideshow/1111' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. jquery.min.js:2 Uncaught DOMException: Failed to read the 'contentDocument'

How to include quote characters as a route parameter? Getting “Illegal characters in path” message

谁说我不能喝 提交于 2019-12-01 12:02:35
I have a search box that exists on all pages. The user can enter text, and click search and they end up on the Search page with the results displayed for them. When search is clicked, the form containing the textbox is sent off to the following route: http://localhost:2010/search/my%20search%20term this works. But if I put quotes around the string, http://localhost:2010/search/%22my%20search%20term%22 This fails with the error message "Illegal characters in path". with the following stack trace: [ArgumentException: Illegal characters in path.] System.IO.Path.CheckInvalidPathChars(String path)

How to pass a variable being an array in JavaScript to a controller accepting List[String] as a parameter?

青春壹個敷衍的年華 提交于 2019-12-01 11:55:41
问题 The setup: Using Play! framework v 2.0.4 The controller: def javascriptRoutes = Action { implicit request => Ok( Routes.javascriptRouter("jsRoutes")( routes.javascript.Admin.approve ) ).as("text/javascript") } def approve(user: List[String]) = SecureAction('admin) { implicit ctx => Logger.debug("Admin.approve: " + user.foldLeft("")(_ + "::" + _)) user map { u => User.approve(u) } Ok(Json.toJson(user)) } The view: function get_selected() { return $.makeArray($(".user-selector").map(function

Find total of second variable related to the distance of route from get.shortest.paths()

元气小坏坏 提交于 2019-12-01 11:54:06
问题 I found the following question ( Find distance of route from get.shortest.paths() ) very helpful, but would like to take it one step further. I have added one column to the data frame and I would like to get the "total distance" related to the min newcost path. Below the igraph / R code that I used. df2 = rbind(c(234,235,21.6,75), c(234,326,11.0,35), c(235,241,14.5,78), c(326,241,8.2,98), c(241,245,15.3,75), c(234,245,38.46,65)) df2 = as.data.frame(df2) names(df2) = c("start_id","end_id",

How do we identify parameters in a dynamic URL?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 11:53:30
We are building a Rails CMS where a blog or news listing can appear anywhere in the site tree. This means that any page knows their type based on a database field - eg: a page knows that it is of type newslisting so once that URL is called for that page we need it to be processed by the newslistingcontroller. The subpages of the newslisting page are news stories - each with a date and category. The URL to the newslisting might be /dogs/snoopy-news/ and a news story might be /dogs/snoopy-news/snoopy-is-great/ The complexity for us is with URLs that have additional parameters in for listing date

Angular2 - Shared Layout for multiple modules

倾然丶 夕夏残阳落幕 提交于 2019-12-01 11:49:08
I build an Angular application with different modules. Each module handles distinct tasks. On my landing page, the user should login or register. It's a very lean layout without any navigation. On my feature modules (which are accessible after a login) the user can perform tasks and search for information. My main problem is, that my feature modules should share the same layout (with navigation, toolbar and so on) while my AuthModule should not have the same layout. The following image should illustrate what I try to achieve. Every module (Auth and Features) have their own RoutingModule and

RoutingError uninitialized constant

拈花ヽ惹草 提交于 2019-12-01 11:45:42
I want to use token_authenticatable in my application (using Devise). Using this answer I added class Users::SessionsController in file app/controllers/users_sessions_controller.rb (is file location correct?). To generate authentication_token in database I added line current_user.reset_authentication_token! as fourth line of create method. Using "Configuring Controllers" section from devise docimentation I added line devise_for :users, :controllers => {:sessions => "users/sessions"} to my routes. I also have file app/views/users/session/new.html.erb . Now when I try to log in or log out in

Symfony2 internal route in Twig render function

喜欢而已 提交于 2019-12-01 11:26:18
My layout.html.twig : {{ render(controller('AcmeDemoBundle:Page:mainmenu')) }} The Page controller retrieves all pages from the Doctrine and renders mainmenu.html.twig with a set of pages. My mainmenu.html.twig : {% if menu_pages is defined %} {% for page in menu_pages %} <li class="{% if app.request.attributes.get('_internal') == '_page_show' and app.request.get('id') == page.id %}active{% endif %}"><a href="{{ path('_page_show', {id: page.id}) }}">{{ page.title|e }}</a></li> {% endfor %} {% endif %} But no active class is displayed. As far as I understand the problem is in internal routing.

RoutingError uninitialized constant

落爺英雄遲暮 提交于 2019-12-01 11:18:19
问题 I want to use token_authenticatable in my application (using Devise). Using this answer I added class Users::SessionsController in file app/controllers/users_sessions_controller.rb (is file location correct?). To generate authentication_token in database I added line current_user.reset_authentication_token! as fourth line of create method. Using "Configuring Controllers" section from devise docimentation I added line devise_for :users, :controllers => {:sessions => "users/sessions"} to my

ASP.NET MVC 2 RC2 Routing - How to clear low-level values when using ActionLink to refer to a higher level?

為{幸葍}努か 提交于 2019-12-01 11:16:33
[NOTE: I'm using ASP.NET MVC2 RC2.] I have URLs like this: /customers/123/orders/456/items/index /customers/123/orders/456/items/789/edit My routing table lists the most-specific routes first, so I've got: // customers/123/orders/456/items/789/edit routes.MapRoute( "item", // Route name "customers/{customerId}/orders/{orderId}/items/{itemId}/{action}", // URL with parameters new { controller = "Items", action = "Details" }, // Parameter defaults new { customerId = @"\d+", orderId = @"\d+", itemId = @"\d+" } // Constraints ); // customers/123/orders/456/items/index routes.MapRoute( "items", //