Menu
  • HOME
  • TAGS

Why does a routing table on my Android device has two almost equal entries (different metrics)?

android,routing,ip

Backup Routes In our Networking stack, Layer 3 switch will always use the route with the lowest metric. If this route becomes unavailable, the Layer 3 switch will fail over to the static route with the next-lowest metric, and so on. More than one entry will work as a backup...

Subdomain routing not working on Laravel 5 - WAMPServer

apache,.htaccess,laravel,routing,wamp

Check: icannwiki .dev is one of the new proposed gTLDs. We used to work with .dev domains internally, but moved to .local to avoid issues. Additionally, as chanafdo mentioned in his comments, you can't use wildcards in your windows host file. So you have to specifiy each subdomain as well....

Leaflet Routing Machine API - route with waypoint as start and end point

api,routing,leaflet

L.Routing.control({ waypoints: [ L.latLng(lat1, long1), L.latLng(lat2, long2), L.latLng(lat1, long1, ], serviceUrl: 'http://router.project-osrm.org/viaroute', routeWhileDragging: false, addWaypoints: false, lineOptions: { styles: [{color: 'black', opacity: 0.15, weight: 9}, {color: 'white', opacity: 0.8, weight: 6}, {color: 'orange', opacity: 1, weight: 2}] } Your code needs a ) at the end of the last waypoint:...

Send a post parameter with path

symfony2,post,routing

TL;DR <form action="{{ path('etudiant_suprimer_demande',{'id': demande.id} )}}" method="post"> <button type="submit">Delete</button> </form> Explanation The code you have now only generates an <a> link, which when a user clicks it, his user agent sends a GET request to the server, thus the error you get. In order to create a POST request, you...

Node forward path request to another server

node.js,express,routing,routes,request

This works: here's what you need to put in your node app: var express = require('express'); var app = module.exports = express(); var proxy = require('http-proxy').createProxyServer({ host: 'http://your_blog.com', // port: 80 }); app.use('/blog', function(req, res, next) { proxy.web(req, res, { target: 'http://your_blog.com' }, next); }); app.listen(80, function(){ console.log('Listening!'); }); Then...

Where should I put Symfony third-party bundle's routing configuration?

php,symfony2,routing,symfony-routing

It's because we usually import our own routers in app/config/routing.yml file. But there are some drawbacks here, if you disable your own custom bundle they also stop working. That's why put them into app/config/routing.yml if you want not to break your application's functionality even if you disable your own bundles.

No default route after returning from PPP connection

routing,archlinux,pppd

To answer my own question: /etc/ppp/ip-down is the clue. (I tried to place a script in /etc/ppp/ip-down.d/, but sometimes it won't get executed. ip-down gets a SIGTERM from pppd too early.) So I modified /etc/ppp/ip-down: !/bin/sh # # This script is run by pppd after the connection has ended. #...

$StateProvider Remove Child View Nesting

angularjs,routing,angular-ui-router,angularjs-ui-router

I'd suggest you to change structure of your HTML that will have ui-view="content" so we need to set content view from the views option of state. Markup <div class="row"> <div ui-view="content"> </div> </div> Then you state would be change content of ui-view using @ relative routing Config $stateProvider .state('global', {...

How to use routing and ng-view in AngularJS v1.3.3

javascript,angularjs,routing,ng-view

Older versions of angular included routing in the core. To use it now you have to include angular-route.js or angular-route.min.js also and inject ngRoute as a module dependency. var sampleApp = angular.module('sampleApp', ['ngRoute']); Original example upgraded...

django rest framework - using viewsets

python,routing,views,django-rest-framework

You access those actions by specifying the corresponding HTTP method, which is a core idea in REST. Namely, using the HTTP methods to do what their name implies. GET /snippets/ - list the snippet objects POST /snippets/ with POST data - create a new object PATCH /snippets/ with data -...

Flask and React routing

python,flask,routing,reactjs

We used catch-all URLs for this. from flask import Flask app = Flask(__name__) @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def catch_all(path): return 'You want path: %s' % path if __name__ == '__main__': app.run() You can also go an extra mile and reuse the Flask routing system to match path to the same...

How to keep scope within an XHR request?

javascript,routing,scope,xmlhttprequest

The simplest (and very clear way) is to keep the reference to route's scope like this: var that = this; Also you can set the scope using .bind() and access request properties directly from reqest variable. And for your example (with bind helper function, to support old browsers): var bind...

Trouble with understanding routing priority

java,playframework,routing

In Play each route is combination of route method (GET/POST) and path (determined by static parts and params types) so if you have two routes with the same type and path only first will be resolvable, other will be ignored even if you'll use other name of param (but same...

Restrict laravel to open url that is not in route

php,laravel,routing,laravel-5,laravel-5.1

This is because you access your site from http://localhost. Every file and folder that is inside your root folder is accessible via the browser. So don't run your project from localhost but from a proper virtual host. For example make http://project.dev and use that to access your site <VirtualHost *:80>...

PDF generation process cannot load images after adding security check (cookies not passing?)

php,pdf,laravel,routing,dompdf

Probably the easiest method is to skip HTTP altogether and access your file via the filesystem. <img src="{{ public_path() . '/image/person/signature }} "> (I'm not too familiar with Laravel, so maybe someone can clean this up.) This presumes that the image is accessible under the public path of the local...

Refactoring nested routes, how do I address this redirect_to?

ruby-on-rails,ruby,ruby-on-rails-3,routing,refactoring

Derive @topic from @post because we still want redirect_to the @post page after creating or destroying a comment. Furthermore, @post is still nested under @topic. It's saying instead of loading the topic via a Topic.find, you get it from the post. The topic_id is no longer in the params,...

Angular not responding to any routes with ui-router - URL just disappears when I enter

angularjs,node.js,express,routing,angular-ui-router

There is a working plunker The answer is relatively simple $urlRouterProvider.otherwise('/admin'); And instead of this http://localhost:7070/admin/#/rounds we have to try this http://localhost:7070/admin/#/admin/rounds The point is, every sub-state 'admin.xxx' is child state of the the 'admin' state. And that means, it inherits its url: '/admin' Also, we used //$locationProvider.html5Mode(true); So, the...

ZF2 Segment Route doesn't match parent's constraint when using children

regex,routing,routes,zend-framework2,zend-route

As per my comment, the $ on the constraint means 'end of the string' (which in this case is the URL path), so it shouldn't be there.

Express selecting multiple model data

javascript,express,routing,mean-stack

If i understand your question correct then you have to populate your sub documents. Mongoose has the ability to do this for you. Basically you have to do something like this: router.get('/games', function (req, res, next) { Match .find({}) .populate('type').populate('owner').populate('players') .exec(function (err, matches) { if (err) return handleError(err); res.json(matches); });...

Is it possible in laravel 5 to show a pretty url to the user, and a practical url to the app?

routing,routes,laravel-5,friendly-url,slug

Based on your explanation, I take that a user can only edit their own profile. So mywebsite.com/user/1/edit should NOT even be allowed. Instead, add this in your Route.php add: Route::get('/edit-your-profile','[email protected]'); and hardcode \Auth::user()->id into your editController and do not even allow the user to set the id. Why bother asking...

AngularJS reinitialize controller

angularjs,routing,angular-ui-router,ionic-framework,ionic

You need to tell state that reload controller each time when URL is getting accessed via browser by just adding adding reload option of state to true like reload: true. Code .state('new_group', { url: '/new_group', templateUrl: 'templates/new_group.html', controller: 'newGroupCtrl', reload: true //will reload controller when state is being access });...

AngularJS - ignoring route

javascript,angularjs,laravel,routing

Angular uses hash routing, so ng-route only really looks at the path, not the whole url. A hash route looks like this: www.example.com/#/client/14. If you're on that page and click a link to '/', your browser will think it's already on that page and do nothing. I'm guessing angular doesn't...

django rest framework - using detail_route and detail_list

python,django,routing,django-rest-framework

Your code is almost correct, you're just the right signature on the register method: def register(self, request): This is the correct signature according to the documentation. Additionally the tests suggest that it's not possible to pass an additional parameter for routing, and that pk will always be passed for a...

How to rout back to domain/home to domain?

ruby-on-rails,redirect,routing

It depends on what version of Rails you are using, but on Rails 4+: get '/home', to: redirect('/') See the Routing Redirection docs for more detailed info....

I don't understand routing

php,routing,flightphp

What seems to be happening in your file (I'm not familiar with Flight) the require 'flight/Flight.php'; is more than likely defining a class for all the routing. Then Flight::route(); Is simply using the route() method from the class Flight without an instance of the class. Flight::route('/', function(){ echo 'hello world!';...

Asp.net MVC Routelink null controller parameter

c#,asp.net,asp.net-mvc,asp.net-mvc-4,routing

You cannot have TWO Routes with same parameters and same definition, first one will take precedence. Instead, you need to have something like shown below with specific constraints in routes. routes.MapRoute( name: "ByName", url: "sample/{action}/{name}", defaults: new { controller = "Home", action = "Index", name = UrlParameter.Optional } ); routes.MapRoute(...

Angular $routeProvider and Controller As Syntax

angularjs,routing,angularjs-scope,angularjs-routing,ngroute

You could not add controllerAs syntax in controller option of $routeProvider.when. You should use controllerAs option which has been provided for taking alias of controller in string format, & controller also accept the string which would be considered as controller of angular. Code $routeProvider.when(APP_BASE_URL + 'kicks', { reloadOnSearch: false,...

Why Windows' tracert command maximum hops is limited to 255?

cmd,routing

The field used in the IP packet header has 8 bits, so maximum value is 255.

Open page url in modal on a page (Facebook Photo URLs)

javascript,jquery,angularjs,routing,angularjs-routing

This can be achieved by creating two states with same URL. For the state that opens the modal , create a hidden parameter , using params option. This is used to find weather the user came from clicking or directly. If user comes by clicking ,then we set a value...

Express Router with a sub-router

node.js,express,routing

You can organize your admin routes as a separate module like this: /routes/admin.js var login = function(req, res, next) { res.end(); } // etc... module.exports = express.Router() .post('/login', login) .get('/dashboard/events', listEvents) .get('/dashboard/events/:id', findEvent); Then in your app.js: var admin = require('./routes/admin'); app.use('/admin', admin); Note that the routes you defined in...

Why is Router used like normal function instead of constructor in express 4.x?

javascript,node.js,express,routing

Some people like to support the functional style in addition to traditional instantiation. This is done by adding a simple check like this at the top of the function: function Router() { if (!(this instanceof Router)) return new Router(); // ... } This allows the support of both types of...

Simple controller with Magento 1.8.0

php,magento,routing

Directory structure should look as follows: app/code/local/Magentotutorial/Helloworld/controllers/IndexController.php app/code/local/Magentotutorial/Helloworld/etc/config.xml app/code/local/Magentotutorial/Helloworld/etc/config.xml): <?xml version="1.0"?> <config> <modules> <Magentotutorial_Helloworld> <version>0.1.0</version> </Magentotutorial_Helloworld> </modules> <frontend> <routers> <helloworld> <use>standard</use> <args>...

zend2 adding another controller to application

controller,routing,zend-framework2

You can have multiple controllers in a single module, but you need to set up your routing to identify when to use which controller. Since you have referenced Akrabat's album module in your question, I'll use it to illustrate: The album module tutorial shows how to create four actions: indexAction,...

How to specify module in namespace?

ruby-on-rails,module,routing,namespaces

To route to a different controller within a namespace specify the absolute path to the controller. If the warn_system controller is in the root namespace use: namespace :dashboard do get 'errors', :to => '/warn_system#errors' end Update: Based on your comment it looks like you want to use: namespace :dashboard do...

How to add menus/ subtopics for meteor site?

javascript,node.js,meteor,routing,meteor-blaze

You can achieve it by using IronRouter (Guide) or FlowRouter package.

MVC routing with multiple parameter with different parameter name

c#,asp.net-mvc,asp.net-mvc-4,routing

As I had given same name to all route. and route name must be unique, now i have rename the route with different name. routes.MapRoute( name: "Admin", url: "{controller}/{action}/{did}/{docType}", defaults: new { controller = "Home", action = "Index2", did = UrlParameter.Optional, docType = UrlParameter.Optional } ); routes.MapRoute( name: "User", url:...

Angular $locationProvider html5Mode / error

javascript,angularjs,routing,html5-history,base-tag

So, it looks like Angular's inner workings are tightly coupled to the href of the tag which results in major issues if you have a directory structure that's a bit unconventional like mine. Stumbled across this Github thread where people are asking for a feature to change this and @greglockwood...

Change resources path

ruby-on-rails,ruby,routing

Here is what you can do resources :books, path: 'b' ...

SAPUI5/OPENUI5 - Routing with Dialogs

routing,dialog,sapui5,openui5

On refresh your attachRouteMatched method is called. onInit: function() { var _this = this var oRouter = sap.ui.core.routing.Router.getRouter("appRouter"); //can also use directly this.oRouter.attachRouteMatched(...) //I see you using this.router oRouter.attachRouteMatched(function(oEvent) { if (oEvent.getParameter("name") !== navigation.Constants.EventDetailFragment) { return: } try { var oHasher = new sap.ui.core.routing.HashChanger(); var hash = oHasher.getHash(); //this will...

osmbonouspack : maneuverType for GoogleRoadManager RoadNodes?

android,google-maps-api-3,routing,osmdroid

Google Maps Directions API do not provide maneuver types, only textual instructions. So, no way. BTW, keep in mind that displaying a route provided by Google on a non-Google map (like OSM map) is not allowed by Google T&C. But you can easily switch to another road manager. ...

How to do load page in Angular JS?

javascript,angularjs,routing,angularjs-routing,angularjs-controller

You need to use angular routing for it. Basically its like an SPA. For that you need to use ngRoute module. In that you need to setup $routeProvider by saying that in specific url, template & controller, etc. var app= angular.module('app', ['ngRoute']); app.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/tab/:id', { templateUrl: 'template.html',...

Why does this MVC action return a 404 response in IE11

ajax,asp.net-mvc,routing

Beacuse you say that it works in Chrome and Firefox I assume you enabled PUT/Delete methods on the IIS? If yes, I think this may be problem that some IE browsers doesn't support type: "DELETE" in Ajax calls. Maybe you are using compability mode to IE8 or something like that?...

Change Rails namespaced route to personalized params route

ruby-on-rails,routing,rails-routing

for more complicated routes.rb, add a path option namespace :member, path: ":user_id" do resources :posts end should get what you want, e.g. http://localhost:3000/621/posts/1 then we just have to add friendly_id to User and Post to have it become something like http://localhost:3000/username621/posts/title-of-post however, you'll need to pore through the codebase for...

Simplify yaml routing rules for appengine (python)

google-app-engine,routing,app.yaml

Take a look at the Google App Engine Boilerplate: - url: /(\w*)/(apple-touch-icon.*\.(png)) static_files: bp_content/themes/\1/static/\2 upload: bp_content/themes/(\w*)/static/(apple-touch-icon.*\.(png)) That's the relevant source for your needs, and you might also pick up a few more tricks :)...

forcing silex framework to generate https links

php,symfony2,https,routing,silex

For that specific case, I solved the problem declaring a base url like so in app.php: $app['customBaseUrl'] = 'https://mybaseurl'; then prefixed all my links with this custom baseUrl. Those links aren't generated by the url() twig function anymore. Not the prettiest way to do it though. I would recommend Artamiel's...

Select Mongoose Model Based on Express Route

express,routing,mongoose

You can get models by name: var mongoose = require('mongoose'); app.get('/:trial', function(req, res){ var trial = req.params.trial; mongoose.Model(trial).find(function(err, records) { if (err) { // Return when we end the response here... return res.send(err); } res.json(records); // returns all trial records in JSON format }); }); Depending on circumstances, I would...

Allow Rails route params to be disordered

ruby-on-rails,routing

The idea is to catch part of url into params and somehow parse them after. According to Rails Routing you can use Route Globbing and Wildcard Segments Extract from guides, e.g.: get 'photos/*other', to: 'photos#unknown' This route would match photos/12 or /photos/long/path/to/12, setting params[:other] to 12 or long/path/to/12. The fragments...

WebApi Routing not working for Post

routing,asp.net-web-api2,asp.net-web-api-routing

Set your default route like below: config.MapHttpAttributeRoutes(); //this enables attribute routing routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); //this route is for conventional routing now you can call your below API like http://{siteurl}/api/employee/ by conventional routing. [HttpPost] public IHttpActionResult Post(Employee emp) { ... }...

MVC 5 Routing with parameter using @Url.RouteUrl

asp.net-mvc,routing,asp.net-mvc-5,asp.net-mvc-routing

Try: @Url.RouteUrl("myproducts", new { productID = Model.myproducts[i].productID }) And change your action route like: [Route("myproducts/{productID}", Name = "myproducts")] [MvcSiteMapNode(Title = "Products", ParentKey = "home", Key = "myproducts")] public ActionResult myproducts(int productID) { } ...

SlimPHP and Routing - am I doing it wrong?

php,.htaccess,frameworks,routing

Could you give this a try? RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) index.php?/$1 [L,QSA] ...

Static route for a subdomain in pimcore

php,zend-framework,routing,pimcore

If you work with "Sites", you can specify the site to use/apply for a static route (column "Site" in the static routes table view). More on using sites: https://www.pimcore.org/wiki/pages/viewpage.action?pageId=14551657...

ActionController::UrlGenerationError in Home#home No route me atches {:action=>“edit”, :controller=>“users”, :id=>nil} missing required keys: [:id]

ruby-on-rails,routing,user,actioncontroller

I am not too familiar with Omniauth to be honest, and I don't know if this is the right answer but here are my 2 cents. I am thinking maybe your <li><%= link_to "Settings", edit_user_path(current_user) %></li> is not getting the id from current_user. Try deleting that line to see if...

Linux - Route Specific Traffic Through Ethernet

linux,routing

Variant 1: Direct translation of your solution to linux one route command: route add -net 10.0.0.0/8 gw 10.18.21.125 metric 40 route del default route add default gw 10.18.21.125 metric 40 ip route command: ip route add 10.0.0.0/8 via 10.18.21.125 metric 40 ip route del default via 10.18.21.125 ip route add...

How does Iron-router determine route priority?

meteor,routing,iron-router

Every time you call Router.route(...), that new route is pushed to the back of an array of possible routes. When a request comes in, IronRouter goes through that array and picks the first one that matches. So the precendence follows directly from the order in which you specify your routes....

No action was found on the controller that matches the request

c#,asp.net,ajax,asp.net-mvc,routing

Try as following: First, create Toy class public class Toy { public int? toyId {get; set;} public string toy {get; set;} } Then use it as following... [System.Web.Mvc.HttpPost] [System.Web.Mvc.ActionName("Post")] public ActionResult Post(Toy toy) { // your necessary codes } you can take a look here for more information......

simple routing in yii framework 1

yii,routing

You need to configure in your Url Manager in config file like this - 'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, 'rules'=>array( 'contact_us'=> 'site/page/contact_us', ) ) After your url - www.example.com/contact_us...

Multiple routes with multiple domains

symfony2,routing

This is because all the routes point to one resource. Every later route will override routes defined before. But you can use another solution: main_route: host: "{country}.acme.{domain}" resource: "@WebsiteBundle/Controller/" type: annotation defaults: country: "en" Then check in some listener before controller for valid url and process parameters....

How to get target of running transition in emberjs

javascript,ember.js,routing

There is activeTransition on router which has reference to target route: Route = Ember.Route.extend({ router: Ember.service.inject('router:main'), model: function() { var target = this.get('router.router.activeTransition.targetName'); if (target === 'credentials.signin') { // do something } else { // do something else } } }); ...

Ruby-on-Rails Voting Partial Routing

ruby-on-rails,routing,voting

Check out the error message: No route matches [GET] "/posts/13/up-vote". It's looking for a [GET] route, but you've defined a [POST] route in your config/routes.rb file. You need to add method: :post to both of your link_to helpers in order to trigger a [POST] request. Here's what it would look...

Does Akka's BalancingPool dispatcher (BalancingDispatcher) have one thread per actor?

multithreading,routing,akka

The BalancingPool does indeed set up the balancing dispatcher for you for the routees. The number of threads and the executor used can be configured by providing the pool-dispatcher setting. By default it uses a fork join executor, so you can give it the following settings: pool-dispatcher { fork-join-executor {...

Angular ui-router : Links are not clickable

javascript,angularjs,routing,angular-ui-router,angular-ui

You messed up in type it should be ui-sref instead of ui-shref <body> <h1>App</h1> <nav> <a ui-sref="app">{{link.home}}</a> <a ui-sref="app.front.signin">{{link.signin}}</a> </nav> <div ui-view="content"> </div> </body> Your second link should be app.signin instead of app.front.signin because you don't have parent route front .state('app.signin', { url: "/signin", views: { "content": {templateUrl: "views/front/home-1.0.html", controller:...

Angularjs redirect to state using a url

javascript,angularjs,routing,angular-ui-router

You should use $state.go which call $state.transitionTo internally For passing variable in route you could have pass json with list of params with there values. $scope.variable is changed from the controller that would pass value while redirecting. $state.go('state_name',{variable: $scope.variable }); ...

Symfony Controller magic method?

php,symfony2,routing,zikula

I gave up trying to replicate the exact behavior as it seems impossible (it is also pretty difficult to describe). So I have resorted to a normal controller with standard route, but I found a way to make it appear to belong to the original 'host' module. Thanks to Gerry,...

Pimcore multilanguage site static route

php,zend-framework,routing,pimcore

There is the "Sites" - feature in Pimcore that lets you do this. The documentation page describes how you set this up, but I'll explain it quickly: You basically set up your document tree like this, creating a usual document for each of your languages: After this, all you need...

Codeigniter Select JSON, Insert JSON

json,codeigniter,select,insert,routing

You want to return json object in response, so it's required to set json type in response header. As given here public function select(){ $data['query'] = $this->users->select(); $this->output ->set_content_type('application/json') ->set_output(json_encode($data['query'])); } It is required to encode part as below for insert part. so you can use this generated url to...

Link does not pass on id correctly

ruby-on-rails,ruby,ruby-on-rails-4,routing

Try updating your route to post 'signup/upgrade/:id' You can't test this url from the browser's address bar because that will submit a GET instead of a POST...

Routing in Sinatra

ruby,web,routing,sinatra

This works 100% (i use it): post '/search' do ... erb :"search/results" end Thats method do magic with render engine in Sinatra like erb or slim be careful :"some\thing and "some\thing" different things!...

Implementing find node on torrent kademlia routing table

table,routing,bittorrent,dht,kademlia

It is somewhat different from other documents regarding kademlia routing table where buckets are arranged in accordance to the bit prefix of the node id but there is another confusing thing. The bittorrent specification describes a routing table implementation that only approximates the one described in the kademlia paper....

Yii2 route using yii\rest\UrlRule with several parameters

php,rest,yii,routing,yii2

So I figured out how to use more complex rules. First, the solution, then the explanation. Here is the solution: 'rules' => [ ... previous rules ..., [ 'class' => 'yii\rest\UrlRule', 'controller' => 'game', 'prefix' => '/users/<userid:\\d+>', 'tokens' => [ '{gameid}' => '<gameid:\\d+>', ], 'patterns' => [ 'GET,HEAD' => 'index',...

ngRoute error, version conflict

javascript,angularjs,routing

Happened something similar today to my coworker. He resolved replacing "^1.3.x" to "1.3.x" in "angular-cookies" and "angular-sanitize". Check if changing it in angular-route resolve the problem. I think this happens since the release of angular 1.4 a few days ago....

rails routing not going to controller as expected

ruby-on-rails,ruby,routing

Ok so you need to think about it differently. Routes only match to one action. So if you want to have certain code executed on specific requests, you can't do it by appling a catch all route. So first, remove get '*path' => "application#index" from routes.rb Then in application_controller.rb add...

How to direct web traffic via php throuh a specific interface?

php,curl,routing

looks like the answer is: curl_setopt($curlh, CURLOPT_INTERFACE, "eth0");

Re-routes using a method that should have nothing to do with it

ruby-on-rails,ruby,ruby-on-rails-4,routing

Look at your routes: post 'signup/register' => 'organizations#checkout', as: 'signup_checkout' post 'signup/register' => 'organizations#upgrade', as: 'upgrade' The same url with the same verb is used twice. The rule in routing is "first match first served", so I guess they are all handled by checkout. Fix is simple, change the url...

Akka messaging mechanisms by example

routing,akka,dispatcher,event-bus

A dispatcher is basically a thread-pool. Akka uses dispatcher for multiple things (like enqueueing messages in the right mailbox or pick up a message from an actor mailbox and process it). Every time one of these actions need to be performed a thread from the thread-pool is selected and used...

Zend Framework 2 routing error: resolves to invalid controller class or alias

zend-framework,routing,zend-framework2,zend-framework-mvc,zend-framework-routing

At the moment the route named application (the parent) defines a URL route of /application. The child route default however requires the controller name to be passed in as the first argument, followed by action. This means the URL would be /application/[:controller]/[:action] So visting /application/test You are inadvertently trying to...

how to simulate a traffic scenario for cars

routing,simulation,ibm-connections,city,traffic-simulation

Check out http://sumo-sim.org. It is a fully featured open source traffic simulation. You can either get a static trace of vehicle positions or you can access these values via an API and trigger re-routing in a running simulation. The documentation is at http://sumo-sim.org/wiki and you can get help at [email protected]

How to map routes to controllers in Sinatra?

ruby,model-view-controller,routing,sinatra

If you want what I think you're wanting, I do this all the time. Initially for this scheme I used the travis-api source as a reference, but essentially what you want to do is extend Sinatra::Base in a "controller" class and then mount up your individual Sinatra "controllers" in rack,...

Symfony/Twig how to render a Route set by anotation?

php,symfony2,routing,twig,url-routing

When you omit the name it's being autogenerated for you. The autogenerated name is a lowercase concatenation of bundle + controller + action. For example, if you have: Bundle AppBundle Controller MyController Action: testAction() the name would be app_my_test. You can list all routes using Terminal: php app/console router:debug All...

How do I assign a custom ID to a dynamically generated URL with Iron Router in Meteor?

javascript,meteor,routing,iron-router

You should add uniq slug in your schema (based on name) like: Events.attachSchema(new SimpleSchema({ slug: { //example: my-name-slug type: String }, (...) })); And then in your Router: Router.route('/events/:slug', { name: 'event', data: function() { return Events.findOne({slug: this.params.slug});} }); ...

Angular-UI-Router and IIS publishing

angularjs,iis,routing,angular-ui-router

In case anyone comes across a similar problem, I solved this on the hosted server by adding a custom error page URL specifically for the 404 status code, using the "execute a URL on this site" option.

Best way of protecting the show() method against users accessing other users messages

laravel,laravel-4,routing,models,relationships

in the simplest form, in your MessagesController in the show method, you can add an additional parameter to your query and get the record where message_id = the paramater from the url and the user_id on that message is the authenticated user's ID.... do something like $message = App\Message::where('id', '=',...

Rails routing link to specific show

ruby-on-rails-4,routing

rails generate migration AddPermalinkToPages permalink:string After you added then you need to create the permalink on the fly when you are saving the page or updating it. I usually do it in the model so I keep the controller clean. You can define it in a PagesHelper if you want...

How to block routing to a page in the public folder

node.js,routing,public-folders

You can put a router right before it app.all('/gallery/*', function(req, res, next){ if(!req.user) next(new Error('You shall not pass!')); else next(); }); app.use(express.static(__dirname + '/public')); ...

Laravel multiple optional parameter not working [duplicate]

php,laravel,routing,laravel-5,laravel-routing

Everything after the first optional parameter must be optional. If part of the route after an optional parameter is required, then the parameter becomes required. In your case, since the /xyz- portion of your route is required, and it comes after the first optional parameter, that first optional parameter becomes...

Re-transmission concept in TCP

tcp,routing,tcp-ip,osi

TCP uses an exponential backoff, meaning that it doubles the time between each unacknowledged retransmission. Once a maximum threshold is reached, the connection is closed. This limit varies from system to system, but is typically between 2 and 9 minutes.

Dynamic loose source routing in IP networks

c++,visual-studio-2012,boost,routing,ip

I can't figure it all out, but the below is a fixed up version without some of atrocities all those using namespaces beg to conflict/interfere silently the tr1 dependency surely is obsolete even in VS by now Now, the remaining things are to do with assuming unsigned characters (the literal...

How to deal with extra “/” in phpleague route?

php,web-services,routing

There are two options You can use htaccess to strip the trailing slash from the url. Send the dispatcher the url without the trailing slash. Solution 1: htaccess Add the following rewrite rule to your .htacces: RewriteRule ^(.*)/$ /$1 [L,R=301] Solution 2: dispatcher After you've created the router from a...

WebAPI : 403 Forbidden after publish website

asp.net-web-api,routing,publish,http-status-code-403

Called the web server machine fellas and they had a firewall blocking incoming webapi calls with authenticating. It now works as it should :)

Keeping multicast messages on my machine

python,linux,sockets,routing

Add a route to self. Possibly you have to use sudo / become root for that. route add 225.0.0.10 gw 127.0.0.1 Alternatively you could always configure your application-tester to use 127.0.0.1 instead. ...

Rails route to get a resource using query string

ruby-on-rails,routing,url-routing

Make your custom routes as: resources: opportunities, except: :show get '/opportunities/rent/san-miguel-de-tucuman/:id' => 'opportunities#show', :as => 'opportunities_show' and pass your 'id' as opportunities_show_path(id) EDIT Change your routes as: get 'oportunidades/alquiler/san-miguel-de-tucuman/:id' => "opportunities#show", :as => 'opportunities_show' get 'oportunidades/alquiler/san-miguel-de-tucuman' => "opportunities#index", :as => "opportunities_index" Now when you want to access your show page...