Rails Routing from the Outside In
This guide covers the user-facing features of Rails routing. By referring to this guide, you will be able to:
-
Understand the purpose of routing
-
Decipher the code in routes.rb
-
Construct your own routes, using either the classic hash style or the now-preferred RESTful style
-
Identify how a route will map to a controller and action
1. The Dual Purpose of Routing
Rails routing is a two-way piece of machinery - rather as if you could turn trees into paper, and then turn paper back into trees. Specifically, it both connects incoming HTTP requests to the code in your application's controllers, and helps you generate URLs without having to hard-code them as strings.
1.1. Connecting URLs to Code
When your Rails application receives an incoming HTTP request, say
GET /patients/17
the routing engine within Rails is the piece of code that dispatches the request to the appropriate spot in your application. In this case, the application would most likely end up running the show action within the patients controller, displaying the details of the patient whose ID is 17.
1.2. Generating URLs from Code
Routing also works in reverse. If your application contains this code:
@patient = Patient.find(17) <%= link_to "Patient Record", patient_path(@patient) %>
Then the routing engine is the piece that translates that to a link to a URL such as http://example.com/patients/17. By using routing in this way, you can reduce the brittleness of your application as compared to one with hard-coded URLs, and make your code easier to read and understand.
| Patient needs to be declared as a resource for this style of translation via a named route to be available. |
2. Quick Tour of Routes.rb
There are two components to routing in Rails: the routing engine itself, which is supplied as part of Rails, and the file config/routes.rb, which contains the actual routes that will be used by your application. Learning exactly what you can put in routes.rb is the main topic of this guide, but before we dig in let's get a quick overview.
2.1. Processing the File
In format, routes.rb is nothing more than one big block sent to ActionController::Routing::Routes.draw.  You'll find five main types of content in this file:
-
RESTful Routes
-
Named Routes
-
Nested Routes
-
Regular Routes
-
Default Routes
Each of these types of route is covered in more detail later in this guide.
The routes.rb file is processed from top to bottom when a request comes in. The request will be dispatched to the first matching route. If there is no matching route, then Rails returns HTTP status 404 to the caller.
2.2. RESTful Routes
RESTful routes take advantage of the built-in REST orientation of Rails to wrap up a lot of routing information in a single declaration. A RESTful route looks like this:
map.resources :books
2.3. Named Routes
Named routes give you very readable links in your code, as well as handling incoming requests. Here's a typical named route:
map.login '/login', :controller => 'sessions', :action => 'new'
2.4. Nested Routes
Nested routes let you declare that one resource is contained within another resource. You'll see later on how this translates to URLs and paths in your code. For example, if your application includes parts, each of which belongs to an assembly, you might have this nested route declaration:
map.resources :assemblies do |assemblies| assemblies.resources :parts end
2.5. Regular Routes
In many applications, you'll also see non-RESTful routing, which explicitly connects the parts of a URL to a particular action. For example,
map.connect 'parts/:number', :controller => 'inventory', :action => 'show'
2.6. Default Routes
The default routes are a safety net that catch otherwise-unrouted requests. Many Rails applications will contain this pair of default routes:
map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format'
These default routes are automatically generated when you create a new Rails application. If you're using RESTful routing for everything in your application, you will probably want to remove them. But be sure you're not using the default routes before you remove them!
3. RESTful Routing: the Rails Default
RESTful routing is the current standard for routing in Rails, and it's the one that you should prefer for new applications. It can take a little while to understand how RESTful routing works, but it's worth the effort; your code will be easier to read and you'll be working with Rails, rather than fighting against it, when you use this style of routing.
3.1. What is REST?
The foundation of RESTful routing is generally considered to be Roy Fielding's doctoral thesis, Architectural Styles and the Design of Network-based Software Architectures. Fortunately, you need not read this entire document to understand how REST works in Rails. REST, an acronym for Representational State Transfer, boils down to two main principles for our purposes:
-
Using resource identifiers (which, for the purposes of discussion, you can think of as URLs) to represent resources
-
Transferring representations of the state of that resource between system components.
For example, to a Rails application a request such as this:
DELETE /photos/17
would be understood to refer to a photo resource with the ID of 17, and to indicate a desired action - deleting that resource. REST is a natural style for the architecture of web applications, and Rails makes it even more natural by using conventions to shield you from some of the RESTful complexities.
3.2. CRUD, Verbs, and Actions
In Rails, a RESTful route provides a mapping between HTTP verbs, controller actions, and (implicitly) CRUD operations in a database. A single entry in the routing file, such as
map.resources :photos
creates seven different routes in your application:
| HTTP verb | URL | controller | action | used for |
|---|---|---|---|---|
| GET | /photos | Photos | index | display a list of all photos |
| GET | /photos/new | Photos | new | return an HTML form for creating a new photo |
| POST | /photos | Photos | create | create a new photo |
| GET | /photos/1 | Photos | show | display a specific photo |
| GET | /photos/1/edit | Photos | edit | return an HTML form for editing a photo |
| PUT | /photos/1 | Photos | update | update a specific photo |
| DELETE | /photos/1 | Photos | destroy | delete a specific photo |
For the specific routes (those that reference just a single resource), the identifier for the resource will be available within the corresponding controller action as params[:id].
| If you consistently use RESTful routes in your application, you should disable the default routes in routes.rb so that Rails will enforce the mapping between HTTP verbs and routes. |
3.3. URLs and Paths
Creating a RESTful route will also make available a pile of helpers within your application:
-
photos_url and photos_path map to the path for the index and create actions
-
new_photo_url and new_photo_path map to the path for the new action
-
edit_photo_url and edit_photo_path map to the path for the edit action
-
photo_url and photo_path map to the path for the show, update, and destroy actions
| Because routing makes use of the HTTP verb as well as the path in the request to dispatch requests, the seven routes generated by a RESTful routing entry only give rise to four pairs of helpers. |
In each case, the _url helper generates a string containing the entire URL that the application will understand, while the _path helper generates a string containing the relative path from the root of the application. For example:
photos_url # => "http://www.example.com/photos" photos_path # => "/photos"
3.4. Defining Multiple Resources at the Same Time
If you need to create routes for more than one RESTful resource, you can save a bit of typing by defining them all with a single call to map.resources:
map.resources :photos, :books, :videos
This has exactly the same effect as
map.resources :photos map.resources :books map.resources :videos
3.5. Singular Resources
You can also apply RESTful routing to singleton resources within your application. In this case, you use map.resource instead of map.resources and the route generation is slightly different. For example, a routing entry of
map.resource :geocoder
creates six different routes in your application:
| HTTP verb | URL | controller | action | used for |
|---|---|---|---|---|
| GET | /geocoder/new | Geocoders | new | return an HTML form for creating the new geocoder |
| POST | /geocoder | Geocoders | create | create the new geocoder |
| GET | /geocoder | Geocoders | show | display the one and only geocoder resource |
| GET | /geocoder/edit | Geocoders | edit | return an HTML form for editing the geocoder |
| PUT | /geocoder | Geocoders | update | update the one and only geocoder resource |
| DELETE | /geocoder | Geocoders | destroy | delete the geocoder resource |
| Even though the name of the resource is singular in routes.rb, the matching controller is still plural. |
A singular RESTful route generates an abbreviated set of helpers:
-
new_geocoder_url and new_geocoder_path map to the path for the new action
-
edit_geocoder_url and edit_geocoder_path map to the path for the edit action
-
geocoder_url and geocoder_path map to the path for the create, show, update, and destroy actions
3.6. Customizing Resources
Although the conventions of RESTful routing are likely to be sufficient for many applications, there are a number of ways to customize the way that RESTful routes work. These options include:
-
:controller
-
:singular
-
:requirements
-
:conditions
-
:as
-
:path_names
-
:path_prefix
-
:name_prefix
You can also add additional routes via the :member and :collection options, which are discussed later in this guide.
3.6.1. Using :controller
The :controller option lets you use a controller name that is different from the public-facing resource name. For example, this routing entry:
map.resources :photos, :controller => "images"
will recognize incoming URLs containing photo but route the requests to the Images controller:
| HTTP verb | URL | controller | action | used for |
|---|---|---|---|---|
| GET | /photos | Images | index | display a list of all images |
| GET | /photos/new | Images | new | return an HTML form for creating a new image |
| POST | /photos | Images | create | create a new image |
| GET | /photos/1 | Images | show | display a specific image |
| GET | /photos/1/edit | Images | edit | return an HTML form for editing a image |
| PUT | /photos/1 | Images | update | update a specific image |
| DELETE | /photos/1 | Images | destroy | delete a specific image |
| The helpers will be generated with the name of the resource, not the name of the controller. So in this case, you'd still get photos_path, new_photo_path, and so on. |
3.7. Controller Namespaces and Routing
Rails allows you to group your controllers into namespaces by saving them in folders underneath app/controllers. The :controller option provides a convenient way to use these routes. For example, you might have a resource whose controller is purely for admin users in the admin folder:
map.resources :adminphotos, :controller => "admin/photos"
If you use controller namespaces, you need to be aware of a subtlety in the Rails routing code: it always tries to preserve as much of the namespace from the previous request as possible. For example, if you are on a view generated from the adminphoto_path helper, and you follow a link generated with <%= link_to "show", adminphoto(1) %> you will end up on the view generated by admin/photos/show but you will also end up in the same place if you have <%= link_to "show", {:controller ⇒ "photos", :action ⇒ "show"} %> because Rails will generate the show URL relative to the current URL.
| If you want to guarantee that a link goes to a top-level controller, use a preceding slash to anchor the controller name: <%= link_to "show", {:controller ⇒ "/photos", :action ⇒ "show"} %> |
You can also specify a controller namespace with the :namespace option instead of a path:
map.resources :adminphotos, :namespace => "admin", :controller => "photos"
This can be especially useful when combined with with_options to map multiple namespaced routes together:
map.with_options(:namespace => "admin") do |admin| admin.resources :photos, :videos end
That would give you routing for admin/photos and admin/videos controllers.
3.7.1. Using :singular
If for some reason Rails isn't doing what you want in converting the plural resource name to a singular name in member routes, you can override its judgment with the :singular option:
map.resources :teeth, :singular => "tooth"
| Depending on the other code in your application, you may prefer to add additional rules to the Inflector class instead. |
3.7.2. Using :requirements
You an use the :requirements option in a RESTful route to impose a format on the implied :id parameter in the singular routes. For example:
map.resources :photos, :requirements => {:id => /[A-Z][A-Z][0-9]+/}
This declaration constrains the :id parameter to match the supplied regular expression. So, in this case, /photos/1 would no longer be recognized by this route, but /photos/RR27 would.
3.7.3. Using :conditions
Conditions in Rails routing are currently used only to set the HTTP verb for individual routes. Although in theory you can set this for RESTful routes, in practice there is no good reason to do so. (You'll learn more about conditions in the discussion of classic routing later in this guide.)
3.7.4. Using :as
The :as option lets you override the normal naming for the actual generated paths. For example:
map.resources :photos, :as => "images"
will recognize incoming URLs containing image but route the requests to the Photos controller:
| HTTP verb | URL | controller | action | used for |
|---|---|---|---|---|
| GET | /images | Photos | index | display a list of all photos |
| GET | /images/new | Photos | new | return an HTML form for creating a new photo |
| POST | /images | Photos | create | create a new photo |
| GET | /images/1 | Photos | show | display a specific photo |
| GET | /images/1/edit | Photos | edit | return an HTML form for editing a photo |
| PUT | /images/1 | Photos | update | update a specific photo |
| DELETE | /images/1 | Photos | destroy | delete a specific photo |
| The helpers will be generated with the name of the resource, not the path name. So in this case, you'd still get photos_path, new_photo_path, and so on. |
3.7.5. Using :path_names
The :path_names option lets you override the automatically-generated "new" and "edit" segments in URLs:
map.resources :photos, :path_names => { :new => 'make', :edit => 'change' }
This would cause the routing to recognize URLs such as
/photos/make /photos/1/change
| The actual action names aren't changed by this option; the two URLs show would still route to the new and edit actions. |
| If you find yourself wanting to change this option uniformly for all of your routes, you can set a default in your environment: |
config.action_controller.resources_path_names = { :new => 'make', :edit => 'change' }
3.7.6. Using :path_prefix
The :path_prefix option lets you add additional parameters that will be prefixed to the recognized paths. For example, suppose each photo in your application belongs to a particular photographer. In that case, you might declare this route:
map.resources :photos, :path_prefix => '/photographers/:photographer_id'
Routes recognized by this entry would include:
/photographers/1/photos/2 /photographers/1/photos
| In most cases, it's simpler to recognize URLs of this sort by creating nested resources, as discussed in the next section. |
| You can also use :path_prefix with non-RESTful routes. |
3.7.7. Using :name_prefix
You can use the :name_prefix option to avoid collisions between routes. This is most useful when you have two resources with the same name that use :path_prefix to map differently. For example:
map.resources :photos, :path_prefix => '/photographers/:photographer_id', :name_prefix => 'photographer_' map.resources :photos, :path_prefix => '/agencies/:agency_id', :name_prefix => 'agency_'
This combination will give you route helpers such as photographer_photos_path and agency_edit_photo_path to use in your code.
| You can also use :name_prefix with non-RESTful routes. |
3.8. Nested Resources
It's common to have resources that are logically children of other resources. For example, suppose your application includes these models:
class Magazine < ActiveRecord::Base has_many :ads end class Ad < ActiveRecord::Base belongs_to :magazine end
Each ad is logically subservient to one magazine. Nested routes allow you to capture this relationship in your routing. In this case, you might include this route declaration:
map.resources :magazines do |magazine| magazine.resources :ads end
In addition to the routes for magazines, this declaration will also create routes for ads, each of which requires the specification of a magazine in the URL:
| HTTP verb | URL | controller | action | used for |
|---|---|---|---|---|
| GET | /magazines/1/ads | Ads | index | display a list of all ads for a specific magazine |
| GET | /magazines/1/ads/new | Ads | new | return an HTML form for creating a new ad belonging to a specific magazine |
| POST | /magazines/1/ads | Ads | create | create a new ad belonging to a specific magazine |
| GET | /magazines/1/ads/1 | Ads | show | display a specific ad belonging to a specific magazine |
| GET | /magazines/1/ads/1/edit | Ads | edit | return an HTML form for editing an ad belonging to a specific magazine |
| PUT | /magazines/1/ads/1 | Ads | update | update a specific ad belonging to a specific magazine |
| DELETE | /magazines/1/ads/1 | Ads | destroy | delete a specific ad belonging to a specific magazine |
This will also create routing helpers such as magazine_ads_url and edit_magazine_ad_path.
3.8.1. Using :name_prefix
The :name_prefix option overrides the automatically-generated prefix in nested route helpers. For example,
map.resources :magazines do |magazine| magazine.resources :ads, :name_prefix => 'periodical' end
This will create routing helpers such as periodical_ads_url and periodical_edit_ad_path. You can even use :name_prefix to suppress the prefix entirely:
map.resources :magazines do |magazine| magazine.resources :ads, :name_prefix => nil end
This will create routing helpers such as ads_url and edit_ad_path. Note that calling these will still require supplying an article id:
ads_url(@magazine) edit_ad_path(@magazine, @ad)
3.8.2. Using :has_one and :has_many
The :has_one and :has_many options provide a succinct notation for simple nested routes. Use :has_one to nest a singleton resource, or :has_many to nest a plural resource:
map.resources :photos, :has_one => :photographer, :has_many => [:publications, :versions]
This has the same effect as this set of declarations:
map.resources :photos do |photo| photo.resource :photographer photo.resources :publications photo.resources :versions end
3.8.3. Limits to Nesting
You can nest resources within other nested resources if you like. For example:
map.resources :publishers do |publisher| publisher.resources :magazines do |magazine| magazine.resources :photos end end
However, without the use of name_prefix ⇒ nil, deeply-nested resources quickly become cumbersome. In this case, for example, the application would recognize URLs such as
/publishers/1/magazines/2/photos/3
The corresponding route helper would be publisher_magazine_photo_url, requiring you to specify objects at all three levels. Indeed, this situation is confusing enough that a popular article by Jamis Buck proposes a rule of thumb for good Rails design:
Resources should never be nested more than 1 level deep.
3.8.4. Shallow Nesting
The :shallow option provides an elegant solution to the difficulties of deeply-nested routes. If you specify this option at any level of routing, then paths for nested resources which reference a specific member (that is, those with an :id parameter) will not use the parent path prefix or name prefix. To see what this means, consider this set of routes:
map.resources :publishers, :shallow => true do |publisher| publisher.resources :magazines do |magazine| magazine.resources :photos end end
This will enable recognition of (among others) these routes:
/publishers/1 ==> publisher_path(1) /publishers/1/magazines ==> publisher_magazines_path(1) /magazines/2 ==> magazine_path(2) /magazines/2/photos ==> magazines_photos_path(2) /photos/3 ==> photo_path(3)
With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with - but you can supply more information. All of the nested routes continue to work, just as they would without shallow nesting, but less-deeply nested routes (even direct routes) work as well. So, with the declaration above, all of these routes refer to the same resource:
/publishers/1/magazines/2/photos/3 ==> publisher_magazine_photo_path(1,2,3) /magazines/2/photos/3 ==> magazine_photo_path(2,3) /photos/3 ==> photo_path(3)
Shallow nesting gives you the flexibility to use the shorter direct routes when you like, while still preserving the longer nested routes for times when they add code clarity.
If you like, you can combine shallow nesting with the :has_one and :has_many options:
map.resources :publishers, :has_many => { :magazines => :photos }, :shallow => true
3.9. Route Generation from Arrays
In addition to using the generated routing helpers, Rails can also generate RESTful routes from an array of parameters. For example, suppose you have a set of routes generated with these entries in routes.rb:
map.resources :magazines do |magazine| magazine.resources :ads end
Rails will generate helpers such as magazine_ad_path that you can use in building links:
<%= link_to "Ad details", magazine_ad_path(@magazine, @ad) %>
Another way to refer to the same route is with an array of objects:
<%= link_to "Ad details", [@magazine, @ad] %>
This format is especially useful when you might not know until runtime which of several types of object will be used in a particular link.
3.10. Namespaced Resources
It's possible to do some quite complex things by combining :path_prefix and :name_prefix. For example, you can use the combination of these two options to move administrative resources to their own folder in your application:
map.resources :photos, :path_prefix => 'admin', :controller => 'admin/photos' map.resources :tags, :name_prefix => 'admin_photo_', :path_prefix => 'admin/photos/:photo_id', :controller => 'admin/photo_tags' map.resources :ratings, :name_prefix => 'admin_photo_', :path_prefix => 'admin/photos/:photo_id', :controller => 'admin/photo_ratings'
The good news is that if you find yourself using this level of complexity, you can stop. Rails supports namespaced resources to make placing resources in their own folder a snap. Here's the namespaced version of those same three routes:
map.namespace(:admin) do |admin| admin.resources :photos, :has_many => { :tags, :ratings} end
As you can see, the namespaced version is much more succinct than the one that spells everything out - but it still creates the same routes. For example, you'll get admin_photos_url that expects to find an Admin::PhotosController and that matches admin/photos, and admin_photos_ratings+path that matches /admin/photos/photo_id/ratings, expecting to use Admin::RatingsController. Even though you're not specifying path_prefix explicitly, the routing code will calculate the appropriate path_prefix from the route nesting.
3.11. Adding More RESTful Actions
You are not limited to the seven routes that RESTful routing creates by default. If you like, you may add additional member routes (those which apply to a single instance of the resource), additional new routes (those that apply to creating a new resource), or additional collection routes (those which apply to the collection of resources as a whole).
3.11.1. Adding Member Routes
To add a member route, use the :member option:
map.resources :photos, :member => { :preview => :get }
This will enable Rails to recognize URLs such as /photos/1/preview using the GET HTTP verb, and route them to the preview action of the Photos controller. It will also create a preview_photo route helper.
Within the hash of member routes, each route name specifies the HTTP verb that it will recognize. You can use :get, :put, :post, :delete, or :any here. You can also specify an array of methods, if you need more than one but you don't want to allow just anything:
map.resources :photos, :member => { :prepare => [:get, :post] }
3.11.2. Adding Collection Routes
To add a collection route, use the :collection option:
map.resources :photos, :collection => { :search => :get }
This will enable Rails to recognize URLs such as /photos/search using the GET HTTP verb, and route them to the search action of the Photos controller. It will also create a search_photos route helper.
Just as with member routes, you can specify an array of methods for a collection route:
map.resources :photos, :collection => { :search => [:get, :post] }
3.11.3. Adding New Routes
To add a new route (one that creates a new resource), use the :new option:
map.resources :photos, :new => { :upload => :post }
This will enable Rails to recognize URLs such as /photos/upload using the POST HTTP verb, and route them to the upload action of the Photos controller. It will also create a upload_photos route helper.
| If you want to redefine the verbs accepted by one of the standard actions, you can do so by explicitly mapping that action. For example: |
map.resources :photos, :new => { :new => :any }
This will allow the new action to be invoked by any request to photos/new, no matter what HTTP verb you use.
3.11.4. A Note of Caution
If you find yourself adding many extra actions to a RESTful route, it's time to stop and ask yourself whether you're disguising the presence of another resource that would be better split off on its own. When the :member and :collection hashes become a dumping-ground, RESTful routes lose the advantage of easy readability that is one of their strongest points.
4. Regular Routes
In addition to RESTful routing, Rails supports regular routing - a way to map URLs to controllers and actions. With regular routing, you don't get the masses of routes automatically generated by RESTful routing. Instead, you must set up each route within your application separately.
While RESTful routing has become the Rails standard, there are still plenty of places where the simpler regular routing works fine. You can even mix the two styles within a single application. In general, you should prefer RESTful routing when possible, because it will make parts of your application easier to write. But there's no need to try to shoehorn every last piece of your application into a RESTful framework if that's not a good fit.
4.1. Bound Parameters
When you set up a regular route, you supply a series of symbols that Rails maps to parts of an incoming HTTP request. Two of these symbols are special: :controller maps to the name of a controller in your application, and :action maps to the name of an action within that controller. For example, consider one of the default Rails routes:
map.connect ':controller/:action/:id'
If an incoming request of /photos/show/1 is processed by this route (because it hasn't matched any previous route in the file), then the result will be to invoke the show action of the Photos controller, and to make the final parameter (1) available as params[:id].
4.2. Wildcard Components
You can set up as many wildcard symbols within a regular route as you like. Anything other than :controller or :action will be available to the matching action as part of the params hash. So, if you set up this route:
map.connect ':controller/:action/:id/:user_id'
An incoming URL of /photos/show/1/2 will be dispatched to the show action of the Photos controller. params[:id] will be set to 1, and params[:user_id] will be set to 2.
4.3. Static Text
You can specify static text when creating a route. In this case, the static text is used only for matching the incoming requests:
map.connect ':controller/:action/:id/with_user/:user_id'
This route would respond to URLs such as /photos/show/1/with_user/2.
4.4. Querystring Parameters
Rails routing automatically picks up querystring parameters and makes them available in the params hash. For example, with this route:
map.connect ':controller/:action/:id'
An incoming URL of /photos/show/1?user_id=2 will be dispatched to the show action of the Photos controller. params[:id] will be set to 1, and params[:user_id] will be equal to 2.
4.5. Defining Defaults
You do not need to explicitly use the :controller and :action symbols within a route. You can supply defaults for these two parameters in a hash:
map.connect 'photo/:id', :controller => 'photos', :action => 'show'
With this route, an incoming URL of /photos/12 would be dispatched to the show action within the Photos controller.
You an also define other defaults in a route by supplying a hash for the :defaults option. This even applies to parameters that are not explicitly defined elsewhere in the route. For example:
map.connect 'photo/:id', :controller => 'photos', :action => 'show', :defaults => { :format => 'jpg' }
With this route, an incoming URL of photos/12 would be dispatched to the show action within the Photos controller, and params[:format] will be set to jpg.
4.6. Named Routes
Regular routes need not use the connect method. You can use any other name here to create a named route. For example,
map.logout '/logout', :controller => 'sessions', :action => 'destroy'
This will do two things. First, requests to /logout will be sent to the destroy method of the Sessions controller. Second, Rails will maintain the logout_path and logout_url helpers for use within your code.
4.7. Route Requirements
You can use the :requirements option to enforce a format for any parameter in a route:
map.connect 'photo/:id', :controller => 'photos', :action => 'show', :requirements => { :id => /[A-Z]\d{5}/ }
This route would respond to URLs such as /photo/A12345. You can more succinctly express the same route this way:
map.connect 'photo/:id', :controller => 'photos', :action => 'show', :id => /[A-Z]\d{5}/
4.8. Route Conditions
Route conditions (introduced with the :conditions option) are designed to implement restrictions on routes. Currently, the only supported restriction is :method:
map.connect 'photo/:id', :controller => 'photos', :action => 'show', :conditions => { :method => :get }
As with conditions in RESTful routes, you can specify :get, :post, :put, :delete, or :any for the acceptable method.
4.9. Route Globbing
Route globbing is a way to specify that a particular parameter (which must be the last parameter in the route) should be matched to all the remaining parts of a route. For example
map.connect 'photo/*other', :controller => 'photos', :action => 'unknown',
This route would match photo/12 or /photo/long/path/to/12 equally well, creating an array of path segments as the value of params[:other].
4.10. Route Options
You can use :with_options to simplify defining groups of similar routes:
map.with_options :controller => 'photo' do |photo| photo.list '', :action => 'index' photo.delete ':id/delete', :action => 'delete' photo.edit ':id/edit', :action => 'edit' end
The importance of map.with_options has declined with the introduction of RESTful routes.
5. Formats and respond_to
There's one more way in which routing can do different things depending on differences in the incoming HTTP request: by issuing a response that corresponds to what the request specifies that it will accept. In Rails routing, you can control this with the special :format parameter in the route.
For instance, consider the second of the default routes in the boilerplate routes.rb file:
map.connect ':controller/:action/:id.:format'
This route matches requests such as /photo/edit/1.xml or /photo/show/2.rss. Within the appropriate action code, you can issue different responses depending on the requested format:
respond_to do |format| format.html # return the default template for HTML format.xml { render :xml => @photo.to_xml } end
5.1. Specifying the Format with an HTTP Header
If there is no :format parameter in the route, Rails will automatically look at the HTTP Accept header to determine the desired format.
5.2. Recognized MIME types
By default, Rails recognizes html, text, json, csv, xml, rss, atom, and yaml as acceptable response types. If you need types beyond this, you can register them in your environment:
Mime::Type.register "image/jpg", :jpg
6. The Default Routes
When you create a new Rails application, routes.rb is initialized with two default routes:
map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format'
These routes provide reasonable defaults for many URLs, if you're not using RESTful routing.
| The default routes will make every action of every controller in your application accessible to GET requests. If you've designed your application to make consistent use of RESTful and named routes, you should comment out the default routes to prevent access to your controllers through the wrong verbs. If you've had the default routes enabled during development, though, you need to be sure that you haven't unwittingly depended on them somewhere in your application - otherwise you may find mysterious failures when you disable them. |
7. The Empty Route
Don't confuse the default routes with the empty route. The empty route has one specific purpose: to route requests that come in to the root of the web site. For example, if your site is example.com, then requests to http://example.com or http://example.com/ will be handled by the empty route.
7.1. Using map.root
The preferred way to set up the empty route is with the map.root command:
map.root :controller => "pages", :action => "main"
The use of the root method tells Rails that this route applies to requests for the root of the site.
For better readability, you can specify an already-created route in your call to map.root:
map.index :controller => "pages", :action => "main" map.root :index
Because of the top-down processing of the file, the named route must be specified before the call to map.root.
7.2. Connecting the Empty String
You can also specify an empty route by explicitly connecting the empty string:
map.connect '', :controller => "pages", :action => "main"
| If the empty route does not seem to be working in your application, make sure that you have deleted the file public/index.html from your Rails tree. |
8. Inspecting and Testing Routes
Routing in your application should not be a "black box" that you never open. Rails offers built-in tools for both inspecting and testing routes.
8.1. Seeing Existing Routes with rake
If you want a complete list of all of the available routes in your application, run the rake routes command. This will dump all of your routes to the console, in the same order that they appear in routes.rb. For each route, you'll see:
-
The route name (if any)
-
The HTTP verb used (if the route doesn't respond to all verbs)
-
The URL pattern
-
The routing parameters that will be generated by this URL
For example, here's a small section of the rake routes output for a RESTful route:
users GET /users {:controller=>"users", :action=>"index"} formatted_users GET /users.:format {:controller=>"users", :action=>"index"} POST /users {:controller=>"users", :action=>"create"} POST /users.:format {:controller=>"users", :action=>"create"}
| You'll find that the output from rake routes is much more readable if you widen your terminal window until the output lines don't wrap. |
8.2. Testing Routes
Routes should be included in your testing strategy (just like the rest of your application). Rails offers three built-in assertions designed to make testing routes simpler:
-
assert_generates
-
assert_recognizes
-
assert_routing
8.2.1. The assert_generates Assertion
Use assert_generates to assert that a particular set of options generate a particular path. You can use this with default routes or custom routes
assert_generates "/photos/1", { :controller => "photos", :action => "show", :id => "1" } assert_generates "/about", :controller => "pages", :action => "about"
8.2.2. The assert_recognizes Assertion
The assert_recognizes assertion is the inverse of assert_generates. It asserts that Rails recognizes the given path and routes it to a particular spot in your application.
assert_recognizes { :controller => "photos", :action => "show", :id => "1" }, "/photos/1"
You can supply a :method argument to specify the HTTP verb:
assert_recognizes { :controller => "photos", :action => "create" }, { :path => "photos", :method => :post }
You can also use the RESTful helpers to test recognition of a RESTful route:
assert_recognizes new_photo_url, { :path => "photos", :method => :post }
8.2.3. The assert_routing Assertion
The assert_routing assertion checks the route both ways: it tests that the path generates the options, and that the options generate the path. Thus, it combines the functions of assert_generates and assert_recognizes.
assert_routing { :path => "photos", :method => :post }, { :controller => "photos", :action => "create" }
9. Changelog
-
October 4, 2008: Added additional detail on specifying verbs for resource member/collection routes , by Mike Gunderloy
-
September 23, 2008: Added section on namespaced controllers and routing, by Mike Gunderloy
-
September 10, 2008: initial version by Mike Gunderloy


Eurographics 2004 Changelog
This page tracks the new paper links made to my list of Eurographics 2004 papers.
Page maintained by Ke-Sen Huang.
If you have additions or changes, send an e-mail.
July 11, 2006
September 10, 2004
September 7, 2004
September 6, 2004
September 3, 2004
August 25, 2004
August 3, 2004
July 24, 2004
July 13, 2004
July 5, 2004
June 15, 2004
June 14, 2004
June 11, 2004
June 4, 2004
June 3, 2004
May 23, 2004
May 19, 2004
May 18, 2004
- Implicit Visualization and Inverse Modeling of Growing Trees (Project)
May 14, 2004
May 11, 2004
May 10, 2004
May 7, 2004
May 6, 2004
May 4, 2004
May 3, 2004
- Sync with Eurographics paper list
April 10, 2004
kesen.huang@gmail.com


This example uses Vue and Vuetify as frontend to upload files to the server. The file 'page.html' is used to handle frontend logic. While the file 'upload-file.php' is used to handle backend logic for uploading files.
{{message}}


General discussion about Komodo. For useful links and more info click the pinned messages to the right.  If you are interested in what this video is from check out Vanguard on Current TV. The cl...
1
1
house14-Sep-18 12:41 PM
omg ... please
jorian14-Sep-18 01:00 PM
this badly needs to go to #manlove or #talk-other-topics
2
ComputerGenie 👴👴👴14-Sep-18 01:48 PM
On a certain level, it has to make one giggle to hear an "adult" use rectum and poo poo in the same sentence. (edited)
Version 2.1 by @blockdata_tech regarding the current platform economies.
I truly like this layout, as it helps people to understand the differences between each of the project.
$QTUM $ETH $ARK $NEO $WAN $LSK $EOS $STRAT $ICX $WAVES $ARDR $NULS $AION $KMD $PART $ADA $VET...
Cryptoon14-Sep-18 02:12 PM
How do QTUM/ETH/NEO/WAN etc have atomic swaps apart from barterdex protocol?
Acura14-Sep-18 02:36 PM
Good question
Andersen14-Sep-18 02:53 PM
ETH atomic swaps ?
Cryptoon14-Sep-18 02:53 PM
exactly...
Also kmd sidechains in development?
And pretty sure you can also code kmd in C :p
Andersen14-Sep-18 02:54 PM
We need to ask comment JL777
PTYX14-Sep-18 03:00 PM
They don't
Eth does but the others definitely don't without barterdex
Alright14-Sep-18 03:03 PM
Can someone reply to the tweet Acura posted above
has "sidechains" for komodo as "in progress", seeing as we have about 35 asset chains in production, that's clearly wrong
jl777c14-Sep-18 03:07 PM
unless you totally ignore the independent chains and require a strict implementation of a 1:1 pegged sidechain
there probably isnt a place for crossh chain contracts
or notarization
or runtime forks
or utxo based CC that enable to enhance consensus rules
SHossain14-Sep-18 03:14 PM
@Alright it is now updated
jonnybbig14-Sep-18 04:23 PM
I hear there’s a pungotoken airdrop for KMD holders...anyone know if holding in agama is enough to participate? Also will this token be added to Agama wallet like Zilla is ?
PTYX14-Sep-18 04:27 PM
It should be added to Agama I think. But since the have their own wallet it's not necessary
jonnybbig14-Sep-18 05:16 PM
Thanks!
optickle14-Sep-18 06:13 PM
How many active users per day are trading on the mainnet? I'm debating Richard Heart. He claims the dex has "no users."
or... another question. How many trades are done per day? Is that knowable?
Volume is indeed low, it had peaks of 50k usd a few months ago(edited)
I don't expect much improvement until the new gui and mm2.0
@optickle
BlackJesus14-Sep-18 07:35 PM
@Cryptoon you should know this by now all they have to do is put a checkmark on that row.
Lots of great technologies went through lulls in their adoption. I forsee eventuaally people will be forced into DEX's or risk having their wealth captured by the state.
actionslacks15-Sep-18 09:23 AM
Dex has low usage now, much as cars had low usage in 1900
but there were cars in 1900
and we have the ONLY atomic swap dex
that works
actionslacks15-Sep-18 09:54 AM
And If I'm not mistaken, cmc only polls one Net ID. which means there could be all kinds of trades that are only accounted for via dex fees.
KomodoWorld15-Sep-18 10:04 AM
We know it's a matter of time, releasing the improvements both back-end and front-end and growing the ecosystem
actionslacks15-Sep-18 10:33 AM
someone should make a gif of this for twitter bombing
Be aware that Ravencoin is a new and experimental protocol, be cautious.

The software is open source and issued with no guarantees.
Likes
112
Jonboy0516-Sep-18 11:39 AM
I didn’t update my agama wallet in time , how will this effect the kmd I have in it ?
Hermes16-Sep-18 12:10 PM
After 1 mm the only effect that could have happened for old wallet users was that transactions wouldn't be broadcasted to the main net , Lite mode users wouldn't have this issue , but to answer your question if you update your wallet even if you were using native now you should be ok @Jonboy05 .(edited)
Think of Komodo as the crypto multiverse. Within Komodo, there can be an infinite number of “universes”, each with their own laws and conventions -- interdependent, yet very much independent at the same time.
@Jonboy05 Update your wallet now, you're fine. No issues unless you try to claim reward in an old wallet.
PHBA206116-Sep-18 02:44 PM
Can someone explain to me what is REVS & revshares ? I can kinda figure out it's some kind of revenue sharing if you hold REVS tokens, but couldn't find any details
CHMEX16-Sep-18 02:48 PM
REVS get a revenue Share from other assets like CRYPTO DEX JUMBLR in a chart it's mentioned it gets 5% this number might have changed a bit
In december with the last CRYPTO Payout which was approx 50 BTC REVS received 0.00853 KMD / REVS
1
Ray Uber16-Sep-18 02:50 PM
Hey guys, I'm relatively new to Komodo and want to ask something about the privacy. On the Komodo's website it says " In its most simple form, the Komodo coin can be used to make purchases with privacy."
Does this mean the Komodo coin is anonymous by default? And only other coins on the Komodo platform have to use Jumblr?
jspook1616-Sep-18 03:06 PM
i believe Komodo is transparent by default but allows for private transactions (like zcash). On top of that, jl777 added the jumblr functionality for an added level of privacy.
Audo16-Sep-18 03:06 PM
There are two types of transactions: transparent (T) and private (Z).
In addition we have a feature called 'Jumblr' that automatises the process of funneling funds through a Z-address back to a fresh T-address.
jspook1616-Sep-18 03:07 PM
yes what @Audo said
Audo16-Sep-18 03:07 PM
you were faster
jspook1616-Sep-18 03:08 PM
yeah but you're part of the team so your answer is official. Are private transactions only available on native? (as well as jumblr?)
Ray Uber16-Sep-18 03:09 PM
Is there also a fee for use of private transaction? Or only if you use Jumblr (0,3%)
Audo16-Sep-18 03:12 PM
yes you need to run native mode (download the blockchain) to use the Z-addresses & Jumblr.
That might change though, form what I understand, as the Zcash devs are working on something. I don't have the full picture, but it sounds like we might be able to do lightweidght z-transactions in the future.
I believe z-transactions have the standard tx fee, same as t-transactions. Jumblr has an additional fee, yes.
Ray Uber16-Sep-18 03:18 PM
thx, got it
but does this apply only on KMD coin or on every coin on the KMD platform?
jspook1616-Sep-18 03:21 PM
jumblr is kmd specific from what i understand. I am not sure about the private transactions (whether that applies to just kmd or any asset chain). Also, since ive never actually used this functionality in komodo, i dont know if jumblr is an optional feature or if its part of every private transaction. I think it is optional.
Ray Uber16-Sep-18 03:25 PM
I mean do the other coins on KMD platform also have the option to choose between t and z transaction. Since they are forks from KMD
Audo16-Sep-18 03:25 PM
Jumblr is just for KMD. The private z-transactions are available by default for new assetchains, but that is an optional feature.
The latest development was that now even the T-transactions can be disabled on a new assetchain. That's what the #pirate project is about.... it only has Z-transactions enabled
so yes @Ray Uber , a project can chose to have a) T + Z, b) T onlye, c) Z only
jspook1616-Sep-18 03:30 PM
Can I make a z transaction without the jumblr functionality or is jumblr mandatory with every z transaction?
Gordon Komodo16-Sep-18 03:31 PM
yes you can without jumblr
it is just an address , much like in zcash(edited)
Jumblr is an extra feature(edited)
jspook1616-Sep-18 03:33 PM
this is all good info for an infographic
@Audo do you know if an 11x17 inch layout is valid for the infographic contest?
Ray Uber16-Sep-18 03:38 PM
What is the additional advantage of using Jumblr over just using z transactions?
sφldat16-Sep-18 03:41 PM
Jumblr create a private transparent (T) address
jspook1616-Sep-18 03:43 PM
jumblr uses time delay as well. i think @jl777c was trying to address the possible trace of transactions based on time and quantity. So jumblr breaks down the balance in the transaction to values of 10, 100, 1000 etc, and those get processed at different time intervals(edited)
someone correct me if Im wrong
Audo16-Sep-18 03:49 PM
@jspook16 I am not aware of any such constraints. You can double check from @benohanlon though, he's running the contest.(edited)
jspook1616-Sep-18 03:52 PM
Ok thanks
I was reading some old posts on reddit from 4 years ago related to supernet and jl777. All i have to say is that he has delivered against all of the nay-sayers' comments. Someone even claimed it was virtually impossible.


There is a certain level of satisfaction to be gained from tracking down a really gnarly bug. If it’s a really tough one you might even be inclined to punch the air in a physical gesture that reflects the effort you put into finding it. Of course we’d all wish this was never needed; that we’d always write bug free code. Or at least track it down very quickly during (unit) testing when the code is freshest in our minds.
The antithesis of this is tracking down a bug only to find that a tool could have easily pointed it out for you. I find this kind of bug soul destroying because I know I’ve just wasted part of my life doing something the very machine I’m programming could have saved me from. Static Code Analysis is one of those tasks that a machine is perfectly suited to as it systematically reviews your code and points out those places where the dragons may be lying in wait.
One of the most common mistakes I used to
make in my earlier days was the “assignment instead of comparison” inside an
“if” statement, e.g. writing if (x = 2)
instead of if (x == 2)
.
Another common mistake I used to fall foul of was uninitialised variables. There
was always a desire to avoid unnecessarily initialising a variable with a default
value despite the danger of ending up with a code path that might use its
uninitialised value. The mantra of “not paying for what you don’t use” can lead
you to prematurely optimise your code’s execution speed at the cost of
significantly increased development time, and subsequent hair loss.
There have been attempts to try and write
code in a different style as a way of avoiding some of the more common
mistakes. One of the most notable is probably the swapping of the arguments in
an “if” statement so that you would end up trying to assign to a literal value
instead of the variable, e.g. instead of writing if (x == 2)
you use if (2 == x)
.
But that just makes the code harder to read, and anyway it doesn’t work when
non-const variables are involved. The Single Assignment pattern [1], which gets
an added boost via const
in C++ and final
in Java, is a more human friendly approach to the problem, e.g.
const
std::string input = getInput();
const
size_t index = input.find_first_of(‘<’);
if (index
== std::string::npos)
Contorting your code to avoid common coding problems should not be your first line of inquiry. This is even more true today as the very first bit of advice in Steve Maguire’s 1993 book Writing Solid Code, is this:-
“Enable all the optional warnings in your compiler”.
Those more familiar with the similarly aged Code Complete by the other Steve (McConnell) have to wait a little longer for the same advice, almost until the end of the book (Chapter 26 – Debugging) but it’s still there. This should be done in companion with enabling “warnings as errors” to make sure you don’t just try and ignore what the compiler might be trying to tell you. Yes, in many cases the warnings are possibly benign, but if you fail to deal with the issue there-and-then you risk missing the really important stuff in a sea of trivia when it finally rears its ugly head.
The best part about that advice is that it’s pretty much free. You’ve already paid for the compiler (either in pennies or time) and so you might as well put it to good use. In these modern times where there is an abundance of Open Source Software, even if you aren’t using it for your production builds, it can still be used as an additional pair of eyes that will cast a second opinion on your codebase.
For many years I was perfectly happy using /W4 /WX with Visual C++ and felt reasonably smug that I was getting some decent static analysis (this was long before they added the extra code analysis). Then, after a fair bit of refactoring I managed to get GCC to at least compile parts of my codebase (not all and it still wouldn’t link) and yet I was amazed at how much extra free static analysis I had been missing out on. GCC highlighted another 14 potential issues that Visual C++ was silent on. And this was before I had turned on the standards compliance and portability settings (which I had little need for production-wise). Clearly a propriety company like Microsoft has a vested interest in making money from their extra smarts and with an Enterprise-style budget you may get more out-of-the-box, but it just goes to remind us that the OSS offerings can often play and even outsmart their rivals in the big leagues.
As an aside the main place where the most
refactoring was needed was in my COM components. I had a bit of extra work to manually
convince the MIDL compiler to throw out something GCC could directly consume,
as Visual C++ invokes it automatically, and I had to provide some workarounds
for VC++ specific extensions like __uuidof
. But, once that
was done it meant a whole lot more code could be put under the microscope. In
particular it highlighted a number of places in my error handling where I had
switched from a custom string implementation (that had the same memory
footprint as a char*
) to std::string
and I was passing it by value to a printf()
style variable
args function.
With potentially so much on offer before getting your wallet out you might be thinking there is little point in spending any money on custom tooling. Aside from the grief I’d get from at least one prominent ACCU member by suggesting that strategy, it’s simply not true – there is definitely a lot of value in tools like the venerable Lint. For starters not all languages even need a compiler, e.g. JavaScript, and so that’s not even an option. Secondly, even if you do have a compilation step, custom tools like Lint can provide more extensive coverage simply because they’re more focused in finding bugs in your code instead of generating binaries. Going back to JavaScript for a moment, Douglas Crockford, author of JavaScript: The Good Parts, illustrates nicely in his book how a tool like JSLint is essential due to some pretty ugly language features.
If you think that the cost of a license for a commercial tool like PC-lint (as opposed to one of the more extortionately priced tools) is too much, consider how much programmer time you’ve lost through bugs like uninitialised variables or missing/badly written copy constructors. Whilst working for a large bank, I was turned down access to PC-lint because they only had a handful of licenses. During that project I know of at least two occasions where programmers had lost an entire day tracking down a bug caused by just such an issue and both developers were paid more per day than a single license of the software that could have found it for them.
Of course there is a start-up cost in introducing such a tool and that cost is much larger on a legacy system, but as Anna-Jayne Metcalfe showed in her 2008 ACCU London [2] talk you don’t have to jump in and try and fix everything right at the start. You need to start small, enabling only the analysis of the most serious problems and then progress from there. Whilst integration into your build pipeline is an excellent eventual goal, just running it regularly manually should pay early dividends.
Once you get passed the hardcore problems you might begin to wonder how much value there is in some of the softer complaints or suggestions the tool makes. ReSharper, which is a tool for the .Net world (although they’re moving into the realms of C++) will point out where you can pass an iterator instead of a container, because it can see that you’ve only iterated it. While both forms are technically correct, given the lack of const in C# along with the standard containers being mutable, you’re probably taking unnecessary liberties. Similarly I’ve seen cases where ReSharper spots that methods and even whole classes can be declared static which saves on unnecessary heap churn. The lack of free functions in C# coupled with an attitude that “static is bad” [3] means that some designs overuse Object-Orientation when a simple function will suffice.
This brings me along nicely to my final reason for using such a tool – it’s also a learning aid. As we get more experienced we make far less of the fundamental errors as we begin to remember the things that constantly trip us up, but in the early days we’re like a toddler as we keep falling over. Switch to a new language though, and even if we’re an experienced developer we can still regress back to that toddler stage if there are enough differences. Even moving to a new project that uses a newer version of the same language can surprise you as you might have forgotten all the cool things they added but you’ve yet to be able to get practical experience with.
My own move from long term C++ developer to n00b C# developer was helped in part by a similarity in the languages around the basic constructs but also through the use of a static code analysis tool to show me the finer details. More recently the move from .Net 3.5 to .Net 4.0 means that named and optional arguments are now at my disposal which I keep forgetting (although it’s the former rather that latter which I’m more interested in).
By far the biggest win though has been in learning LINQ, which can be accessed either directly via the C# extension methods, or through the syntactic sugar the language provides. In the beginning I could write the really obvious SQL-like format pretty quickly but some of the more subtle forms, such as when transforming to a Dictionary, I struggled with. When I saw the tool suggest it could change the structure of my code I first guessed what it might do, then reveal what the answer was. If I didn’t get it right I’d switch back and forth with the editor’s Undo/Redo command to try and understand what it was proposing.
Even now when I see an error message, say, from the compiler I generally try not to read what the actual error messages says, instead favouring to just jump right to the code to see if I can quickly spot what the compiler has picked up.
It’s tempting when you see a barrage of issues reported by a tool like this to just go through blindly and accept the changes it suggests on the basis that “it’s always right”. In the case of some of the LINQ transformations I’ve seen it do I’d definitely question that wisdom. A tool like this should be there to watch your back and do your bidding, don’t let it get out of control and start writing your code for you. The code it generates may be syntactically correct but it may not express it in the most human readable way and share your design intent.
[1] http://en.wikipedia.org/wiki/Assignment_(computer_science)#Single_assignment
[2] Taming the Lint Monster – 20th November 2008.
[3] https://twitter.com/codemonkey_uk/statuses/385518295958683649.
Chris Oldwood
09 October 2013
Bio
Chris is a freelance developer who started out as a bedroom coder in the 80’s writing assembler on 8-bit micros; these days it’s C++ and C#. He also commentates on the Godmanchester duck race and can be contacted via<EMAIL_ADDRESS>or @chrisoldwood.


I love DOGS
DOGS are:
1.cute
2.fluffy
3.fun
If you want a friend, get a dog.
Email Me
905 North Broom Street, Wilmington, DE 19806
Buy a dog for $8,000$800; BUY IT NOW, we lowered the price!!!


A valid email is required
Minimum of 6 characters.
Must include atleast 1 number.
Passwords Must Match


EC bandwidth requirements¶
User behavior dramatically influences bandwidth requirements. However, even with a good set of log files, bandwidth usage for Google Earth is difficult to measure. When assessing how much bandwidth you need, keep in mind the following considerations:
- Google Earth servers use HTTP, which is inherently stateless. This means that it is very difficult to measure concurrent users because it is not clear when users log out of the client or when users move to another application and leave the client running.
- The Google Earth client has a local cache, so after a user has visited one area on the globe, those tiles are not re-requested from the server. Consequently, bandwidth usage is affected by the size of the local cache and how often users revisit areas.
- User traffic comes in bursts, not a steady stream. When a client flies to a new location, the new set of tiles are sent to the client, causing a spike in traffic. After the client stops in one place, traffic goes to zero. You should set bandwidth requirements high enough to accommodate spikes in usage.


Grouping Form Elements
Do you like sugar?:
Yes
No
Select all your favourites
Cupcake
Fruit Cake
Ice Cream Cake
Submit


Interceptor
public final class Interceptor<Action, State>
Intercepts call of next(action:completion:) method to the custom function. Used by Middleware to intercept the action to the next middleware in the stack. May be used in UnitTests to test if middleware intercepts an action properly.
-
Initialize interceptor with custom function.
Declaration
Swift
public init(next: @escaping InterceptorNextFunction<Action, State>)
Parameters
next
custom function that next() call will be intercepted to
-
Intercepts call to the custom function
Declaration
Swift
public func next(action: Action? = nil, completion: ((State) -> Void)? = nil)
Parameters
action
action will be intercepted
completion
completion block used to inform the caller that action was reduced with new state in the parameter


---
layout: default
title: Projects
---
{{page.title}}
- Header Field Extraction
- Working with members of the Information Extraction and Synthesis Laboratory at UMass Amherst, directed by Prof. Andrew McCallum, on a new annotated dataset of scientific research papers from bioRxiv in collaboration with Chan Zuckerberg Initiative.
- I am responsible for developing the pipeline which will parse the data, train the machine learning models on the data and obtain the F1 scores from the test set.
- Citation Field Extraction
- Worked with Chan Zuckerberg Initiative as part of an industry mentorship program.
- Created an automated pipeline that can segment any citation string found in scientific research papers using labels
such as author, title, journal, year, etc..
- Used TensorFlow to implement CRF, LSTM, Dilated-CNN and BiLSTM-CRF to learn from the training data.
- Wordify: A Reverse Dictionary for Everyone
- Developed a reverse dictionary which can summarize any phrase to a single word.
- Trained a LSTM network using pretrained GloVe embeddings as the starting point on the WordNet dataset.
- The LSTM based method outperformed the baseline methods which were based on the arithmetic properties of the
word embeddings.
- Keras w/ TensorFlow backend was used to design the model.
- Sudoku Solver Try it out!
- Developed an AI agent that can solve any Sudoku puzzle provided as an input.
- Constraint Propagation was used to efficiently reduce the domain of the variables.
- Minimum Remaining Values heuristic was used to select the most optimal variable for assignment.
- Tic Tac Toe
- Developed an AI agent that can play the game of Tic Tac Toe with a human.
- Minimax algorithm is used to find the best possible move for any configuration, which makes the agent unbeatable.
- Monte Carlo Image De-noising
- Applied Monte Carlo Inference to de-noise any noisy image given as an input.
- Gibbs sampling was used to obtain observations from the CRF model of the image.
- Motley: Color the Uncolored
- Developed a system based on CNN that can color a grayscale image given as an input.
- Developed a baseline method to compare the performance of the CNN.
- The model was trained on resized images from the CIFAR-10 dataset.
- Keras w/ TensorFlow backend was used to design the model.
- Autonomous Navigation and Control of an Omni-Directional Vehicle
- Implemented path-planning algorithms on a four-wheeled omni drive vehicle using sensor fusion technique.
- STM-32 was used to drive the motors and Raspberry Pi was used as a CPU.


Zimbabwe Edges Closer to Hyperinflation
by Staff ReporterHARARE (Bloomberg) — Sign up to our Next Africa newsletter and follow Bloomberg Africa on Twitter
Zimbabwe’s monthly inflation rate more than doubled in October as food costs surged, bringing the nation closer to a new bout of hyperinflation.
Monthly inflation accelerated to 38.8% from 17.7% from in September, the Zimbabwe National Statistics Agency said in an emailed statement Friday. That’s the highest rate since June.
Key Insights
- Food prices rose 48.4% in the month, compared with 19.6% in September, as the worst regional drought in almost 40 years hit supplies and left about half of Zimbabwe’s 14 million people without reliable access to enough to eat.
- The drought continues and non-food inflation could also be pushed up further after the government unveiled it plans to boost spending in 2020 in an attempt to kick-start an economy that’s forecast to shrink this year.
- Zimbabwe abandoned its own dollar ten years ago after hyperinflation rendered it valueless. The statistics office suspended the release of annual inflation data for six months from August, saying it wants to collect comparable data after the introduction of a new currency earlier this year. International Monetary Fund studies define hyperinflation as beginning when monthly price increases exceed 50%.
- Zimbabwe’s official annual inflation rate was the second highest in the world, at 176%, when the statistics office suspended the data.


1. Target devices are {{detail.targetDevices}}
2. Target app is {{detail.targetAppname}}
3. Message type is {{detail.messageType == "0" ?"Standard":"Automated"}}
4.{{detail.allUsers}} will see this message
4.Send when app is not opened within {{detail.trigger}} day(s)
Message will be sent from {{detail.startTime}} to {{detail.endTime}}


title=MOAR HYPERMEDIA PAYPAL date=2013-05-28 type=post tags=blog status=published ~~~~~~
Nice to see that Paypal are building more HATEOAS-friendly APIs. If you want to build a clean, HATEOAS-centric RESTful API, don't hesitate to check out Spring Data HATEOAS.


| 225 | (A) | the wede fro the woman he warpe at the laste |
| (C) | ---- no text ---- | |
| 220 | (D) | That wede from þe woman he warpid at onys |
| 220 | (E) | ¶ The clooth fro þe womman . thanne mekelich he took |
| (Ex) | ---- no text ---- | |
| 225 | (L) | þe wede fram þe womman þey warpen atte laste |
| 218 | (P) | þe wede fra þe woman he wapp at þe laste |
| 218 | (U) | That wede fro that womman / he warped atones |
| (V) | ---- no text ---- |


Dears,
This is a system email, kindly please do not reply this email.
Your knowledge sharing email has been deleted by @user.
You can access the knowledge sharing page by clicking here
Thanks and Regards
SSC-MySWORD
KnowledgeSharing detail:
| ShareId |
@shareId |
| Subject |
@subject |
| Date |
@postDate |
| Status |
@status |


When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
Hello {{'World'}}!
数据结构
- {{card.name + " - " + card.overleaf}}
微积分
- {{card.name + " - " + card.overleaf}}
Angular.js syntax
- {{card.name + " - " + card.overleaf}}
HTML+CSS syntax
- {{card.name + " - " + card.overleaf}}


4.1 The squid.conf Syntax
Squid's configuration file is relatively
straightforward.
It is similar in style to many other Unix programs. Each line begins
with a configuration directive, followed by some number of values
and/or keywords. Squid ignores empty lines and comment lines
(beginning with #) when reading the configuration
file. Here are some sample configuration lines:
cache_log /squid/var/cache.log
# define the localhost ACL
acl Localhost src <IP_ADDRESS>/32
connect_timeout 2 minutes
log_fqdn on
Some directives take a single value. For
these,
repeating the directive with a different value overwrites the
previous value. For example, there is only one
connect_timeout value. The first line in the
following example has no effect because the second line overwrites
it:
connect_timeout 2 minutes
connect_timeout 1 hour
On the other hand, some directives are actually lists of values. For
these, each occurrence of the directive adds a new value to the list.
The extension_methods directive works this way:
extension_methods UNGET
extension_methods UNPUT
extension_methods UNPOST
For these list-based directives, you can also usually put multiple
values on the same line:
extension_methods UNGET UNPUT UNPOST
Many of the directives have common types. For example,
connect_timeout is a time specification that has
a number followed by a unit of time. For example:
connect_timeout 3 hours
client_lifetime 4 days
negative_ttl 27 minutes
Similarly, a number of directives refer to the size of a file or
chunk of memory. For these, you can write a size specification as a
decimal number, followed by bytes,
KB, MB, or
GB. For example:
minimum_object_size 12 bytes
request_header_max_size 10 KB
maximum_object_size 187 MB
Another type worth mentioning is the toggle, which can be either
on or off. Many directives use
this type. For example:
server_persistent_connections on
strip_query_terms off
prefer_direct on
In general, the configuration file directives may appear in any
order. However, the order is important when one directive makes
reference to something defined by another. Access controls are a good
example. An acl must be defined before it can be
used in an http_access rule:
acl Foo src <IP_ADDRESS>
http_access deny Foo
Many things in squid.conf are case-sensitive,
such as directive
names. You can't write
HTTP_port instead of
http_port.
The default squid.conf file contains comments
describing each directive, as well as the default values. For
example:
# TAG: persistent_request_timeout
# How long to wait for the next HTTP request on a persistent
# connection after the previous request completes.
#
#Default:
# persistent_request_timeout 1 minute
Each time you install Squid, the current default configuration file
is saved as squid.conf.default in the
$prefix/etc directory. Since directives change
from time to time, you can refer to this file for the most up-to-date
documentation on squid.conf.
The rest of this chapter is about the handful of directives you need
to know before running Squid for the very first time.
|


Occupants: {{ profile.neighborhood.occupationCount }}
Find out more about businesses in your hood, follow link
{{ post.details }}
{% endfor %}NB: This post will be viewed by everyone in the neighborhood.
Kindly note we will be having a water shortage as from 3rd to 5th November.


ImageType
public enum ImageType: Equatable
The types of icon
- image:
UIImage
object - named: Image name in
.xcassets
- path: Image path in main bundle
- remote: Remote image URL
nil
: Just nil
-
Undocumented
Declaration
Swift
case object(UIImage?)
-
Undocumented
Declaration
Swift
case named(String)
-
Undocumented
Declaration
Swift
case path(URL?)
-
Undocumented
Declaration
Swift
case remote(URL?)
-
Undocumented
Declaration
Swift
case `nil`


Preparation time
overnight
Cooking time
over 2 hours
Serves
Serves 8
Treat your guests to this restaurant-style dessert from Scottish chef Mark Greenaway. You will need to start preparing it about 36 hours in advance.
For the pear sorbet, put 665ml/23fl oz water in a pan with the sugar and glucose and bring to the boil. Put the pear purée in a mixing bowl. Pour the syrup over the purée and whisk well. Leave the mixture to cool, then pour into a container, cover and freeze for 24 hours. Cut the mixture into rough cubes.
Blend the cubes in a blender until smooth and lighter in colour. Place back in the container, cover and refreeze until set. Alternatively, freeze in an ice cream machine
For the brown-sugar cheesecake, preheat the oven to 190C/170C Fan/Gas 5. Line a 20x30cm/8x12in baking tray with baking paper.
Put the brown sugar in a blender and pulse. Add all the remaining cheesecake ingredients and blend until fully combined. Pour into the lined tray. Bake for 10 minutes. Reduce the oven temperature to 110C/90C Fan/Gas ¼ and bake for a further 25 minutes. It should still have a slight wobble.
Turn off the oven and leave the cheesecake to cool in the oven for 1½ hours. Leave the oven door open for a cheesecake that's creamy in the centre, or leave it closed if you prefer a drier texture.
For the feuilletine base, melt the chocolate in a heatproof bowl set over a pan of gently simmering water, making sure the bowl doesn't touch the water. Leave to cool a little. Blend the pistachios, hazelnuts, flaked almonds, sugar and hazelnut oil in a blender to a course consistency. Transfer to a mixing bowl and mix in the nibbed almonds and feuilletine. Mix in the melted chocolate. Spread the mixture between two pieces of silicon paper to a 5mm/¼in thickness. Store in the fridge for 1 hour, or until fully set.
Remove the top sheet of silicon paper. Trim to the size of the cheesecake tray, reserving the trimmings. Turn out the cheesecake onto the base and return to the fridge.
For the blow torch pear, put equal amounts of sugar and water and bring to a boil. Add the pear and poach for 20 minutes. Remove from the heat and lift the pear out of the sugar syrup. Leave to cool, then cut into 1cm/½in cubes. Sprinkle over the sugar and use a blow torch to caramelize the sugar lightly.
For the tomato caramel, carefully blow torch the tomatoes, then leave to cool. Peel off the skins, then quarter the tomatoes and discard the pulp. Weigh out 400g/14oz tomato flesh and set aside.
Place the sugar in a heavy-based pan and heat until it reaches a walnut brown, to make a dry caramel. Stir in tomato flesh. Simmer for 10 minutes, or until the tomatoes have broken down. Stir in the lime zest and juice. Remove from the heat and leave to cool completely. Transfer to a squeezy bottle and refrigerate.
To assemble, cut the cheesecake into eight 5x11cm/2x4in pieces. Place each in the centre of a plate. Break up the feuilletine trimmings and scatter on the plates, sticking two out of each slice of cheesecake to give height. Scatter around cubes of poached pear. Add a spoonful of pear sorbet. Drizzle the cold tomato caramel around the each plate and serve.


Dynamic Columns can be re-ordered, activated and deactivated by the user.
Query String: {{ queryString }}
{{ queryString }}
There are no people matching the current criteria.
The Porcelain Rack is useful for managing and reordering lists.


https://github.com/gcharang/create-assetchain
Simple scripts to create a Komodo assetchain using a single node for testing, inntalls explorer too if needed
Instructions:
- This repository automates the steps described in the doc: docs.komodoplatform.com/assetchains/create-asset-chain-single-node.html
- Assumes Ubuntu desktop environment, may need tweaks for other environments
Clone the repository and navigate into it.
Step 1:
Create a file named data and add the following contents:
name=<ASSETCHAIN-NAME>
srcdir=/home/<USER>/komodo/src
launch="komodod -ac_name=$name -ac_supply=10"
datadir=/home/<USER>/coinData
- name is the assetchain's desired name
- srcdir is the absolute location of the directory which contains komodod and komodo-cli
- launch is the custom launch parameters of the assetchain, don't include -pubkey or -addnode
- datadir is the directory to which the datadirectories of the second daemons are saved, no need to create it, the script will do it for you
Step 2
Create a file named keys and add the following contents:
pubkey1=02xxxxxxxxxxxxxxxxxx
pubkey2=03xxxxxxxxxxxxxxxxxx
privkey1=Uxxxxxxxxxxxxxxxxxx
privkey2=Uxxxxxxxxxxxxxxxxxx
- pubkey1 and privkey1 are a pair of keys used to launch the first daemon
- pubkey2 and privkey2 are a pair of keys used to launch the second daemon
Step 3
./create-assetchain.sh explorer


Titan Web Example
/school/{schoolName}
[{
name: "Thomas",
interest: "Tennis"
},
{
name: "Alan",
interest: "Football"
}]
Here are some rest endpoints to try:
Number of Vertices
All vertices by name
Students in UF
Students love football
Degree from Joe to Kobe
Friend recommendation
Rank Joe's friends


{% extends "global/Page.html" %} {% load static otree %} {% block styles %} {% endblock %} {% block title %} {% if is_trial %}OT: 12-Round Test Game{%else%} GAME: Feedback {% endif%} {% endblock %} {% block content %}
| YOUR FINAL RESULTS: | Energy tokens | US Dollars |
|---|---|---|
| Total contributions to the House Conservation Fund: | {{ player.all_rounds_contribution }} | |
| This did/did not meet the group goal of {{ Constants.group_goal }} energy tokens: | {{ group.all_rounds_contribution }} | |
| The bonus to each player for meeting the group goal: | {{ group.bonus }} | {% if Constants.group_goal <= group.all_rounds_contribution %} {{ group.bonus_in_dollars }} {% endif %} |
| Remaining energy tokens in your personal account: | {{ player.all_tokens_left }} | {{ player.remaining_tokens_in_dollars }} |
| TOTAL PAY TO YOU: | {{ player.total_tokens_in_dollars }} |
NOTE: This was a speculative game just to give you a better understanding of how it works.
{% endif %} {% next_button %}


Excel Spreadsheet
This generator allows you to create a spreadsheet representation of your LinkML schema.
Example Output
Using the Person LinkML schema as input, the generated Excel spreadsheet looks as follows: personinfo.xlsx
Overview
You can create an Excel template of a LinkML schema as follows:
gen-excel ~/path/to/personinfo.yaml --output ~/path/to/personinfo.xlsx
Currently, in the generated Excel workbook there can be one or more associated worksheets, each corresponding to classes from the LinkML schema.
The generator also supports validation at the enum level. In that, each slot with a range property that is of enum type will have associated drop downs for all cells corresponding to that slot in the excel spreadsheet.
Note: It works best for “flat” or denormalized schemas.
Additional validation support to be added:
Color schemes to indicate whether a field is required or recommended
Constraints based on the range of a slot, e.g. constraining int fields to be numbers
Tooltip notes describing what each field indicates
Docs
Command Line
gen-excel
Generate Excel representation of a LinkML model
gen-excel [OPTIONS] YAMLFILE
Options
- -o, --output <output>
Name of Excel spreadsheet to be created
- -f, --format <format>
Output format (default=xlsx)
- Options
xlsx
- --metadata, --no-metadata
Include metadata in output (default=–metadata)
- --useuris, --metauris
Include metadata in output (default=–useuris)
- -im, --importmap <importmap>
Import mapping file
- --log_level <log_level>
Logging level (default=WARNING)
- Options
CRITICAL | ERROR | WARNING | INFO | DEBUG
- --mergeimports, --no-mergeimports
Merge imports into source file (default=mergeimports)
Arguments
- YAMLFILE
Required argument


| DOSE: |
60 mg |
smoked |
DMT |
(powder / crystals) |
Before this DMT trip I had only lightly tripped on DMT two times. Both times I failed to continue to take hits because of my failed attention span as I began to hallucinate.
In preparation for this trip I spent an entire day in seclusion on an empty piece of land. I waited until it was very dark out and set up a rig to allow me to free base without the wind putting out the flame of the lighter. The rig was merely an air mattress that was half way in a tent, this would allow me to smoke inside in the wind free environment and then fall back and watch the stars. Inside the tent there would be absolutely no light besides the light of the lighter.
I loaded 60 mg and there was a copious amount of residue left in the pipe from a friends failed attempt. I spent a half hour meditating, focusing on what I wanted to get out of the experience. I wanted to let go of my ego as well as many of the unnecessary anxieties that I held. I began to smoke the DMT watching the crystals melt and fill the bowl with a nasty tasting smoke. I breathe it in slow, very slow. I held it for as long as I could while it set fire to my lungs. I take another three hits before it starts to take effect. The lighter in my right hand became very small and rounded with a shroom like look to it while my hand grew and looked swollen. The pipe in my left hand began to look very large while my left hand shrunk to a child’s size.
I kept smoking because I wanted to truly experience it. After another three or four hits my hands, pipe, and lighter became blurred and vibrated intensely. At this moment I see a purple and red light illuminate the interior of the tent. It is being emitted from a girl that is sitting directly to my right. She begins to telepathically communicate with me. In this moment the only thing in existence is this tent this girl and I. She communicates with me not with words but with actual ideas. She tells me that the nothing means anything and that the universe only exists because I allow it to. She then tells me that I need to let everything go. I turn to look at her and she is made of only light. Her body consists of purple and red light moving in geometric patterns like muscle tendons. I look at her for only a second when she along with the tent disappear (looking back I think I dropped the lighter).
Now in the complete absence of space all of my senses left me. The universe ceased to be. I did not exist. After what feels like an eternity I realize that DMT existed, and from this I pieced together myself. I knew that I had to exist to take DMT, and then I came back into being. I knew that in order to hallucinate I would need to see, and then my eyes came into being. I knew that in order to see there must be something to see… Instead of the tent coming into being these almost black tentacles outlined in deep neon purple. They did not occupy space but my very vision. The tips of these tentacles were forming elaborate spirals as well as other patterns.  As I moved out of it I was reborn, I felt my entire body slipping through a film that was the outermost part of the absence of space.
As I laid back I was not on a planet, I was a celestial being among the stars. The stars were different sizes and colors. Most were white, purple and blue. These starts were flying around forming elaborate patterns while the negative space formed its own designs. At this moment the euphoria of DMT kicked in very strong. The stars became the most beautiful things I had ever seen in my entire life. All of a sudden hundreds of memories flooded my mind. The vast majority of them were from my childhood; insecurity, humiliation, and shame over shadowed the good ones. Instead of feeling these emotions again they seemed to be childish, human emotions that I had no concern for now that I am a celestial being. I now felt pure euphoria well beyond MDMA and even sex. It became overwhelming and the tentacles once again took over my field of view to shield me from the beauty of it all, but this time they were not outlined but they were within the negative space.
I turned to my right and I see the tall grass. I realize that I am human again but I was not on earth, I was in a parallel universe. The grass started to bend and dance in perfect unison. They were a perfect wall as they bent with their partner forming strange abstract shapes. I wanted to be in space again so I looked up. The visions were not like before; the stars were just swirling around a little. The world started to materialize once again and I felt comfort in the fact that my friends and family were in existence. I sat up and confusion set in much like a high dose shroom trip. I looked at my cell phone and realized I had only been tripping for twelve minutes, it felt like an eternity. I then spent an hour or so writing down the experience and dissecting each part.
Now it is two days after the trip and I have experienced a feeling that I have woken up from a very long sleep. Colors have never seen so vivid, trees and people have never looked so beautiful, it feels as if I am seeing the world for the very first time. I cannot remember a time that I was filled with as much happiness and love as I have in these last two days. Only time will tell if my ego and anxieties have been reduced but in the last two days I have noticed a definite reduction of my unwanted anxieties. I hope this is the change that I have been searching for with the use of psychedelics.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


This is the online portfolio of Jami Schwarzwalder.
This site is created with the aid of Bootstrap and neocities


Smartphones and tablets
Marketing branding backing user experience learning curve partner network long tail seed money bandwidth venture churn rate traction crowdsource. Release vesting period backing interaction design early adopters. Ownership branding business model canvas return on investment backing android freemium series A financing holy grail facebook value proposition hypotheses entrepreneur network effects. Return on investment channels prototype bandwidth.
- Early adopters incubator agile development disruptive deployment paradigm shift pitch founders
- Hackathon facebook creative first mover advantage disruptive deployment stock equity churn rate twitter launch party
- Business plan marketing long tail innovator funding android seed round
- IPad paradigm shift branding seed money
Smart watches
Lean startup agile development stealth deployment pitch iPad iPhone assets. Mass market vesting period first mover advantage analytics creative. Burn rate bandwidth creative conversion traction gen-z niche market disruptive business plan. Entrepreneur disruptive business-to-business partner network.
- Disruptive network effects direct mailing early adopters lean startup iPhone client twitter assets interaction design
- Branding niche market holy grail ecosystem release business-to-consumer user experience burn rate technology
- Ownership product management release disruptive
- Focus niche market interaction design influencer freemium agile development
Get in touch and Contact us!
Go to top.


Alexander Isak was subjected to racist abuse as Sweden booked their spot at Euro 2020 with a win over Romania on Friday.
Isak, 20, came off the bench during the win in Bucharest, with the game halted shortly after his 78th-minute introduction.
While play was then allowed to continue, the Real Sociedad forward confirmed he had reported racist abuse to the referee, describing the incident as "incredibly sad".
"Of course it is sad for the moment, but at the same time we were prepared for such things to happen, even if it does not help in that way," Isak told C More.
"I think I could handle it well and the team's support was incredible too.
Featured links
- Ballon d'Or winner already been decided
- The latest football transfers news and rumours
- Possible 'Clasico' in the Spanish Supercup final
- Who has the most free-kicks goals: Messi or Cristiano?
"We did well and it is incredibly sad that such things happen, but what should we do?"
With one game remaining, Sweden (18 points) are second to Spain (23) in Group F, with both sides having already progressed.
Finland were the other team to book their spot at Euro 2020 on Friday after a 3-0 victory over Liechtenstein, reaching their first major tournament.
Denmark and Switzerland moved closer to qualifying from Group D after wins over Gibraltar and Georgia respectively.
With 15 points, Denmark top the group ahead of Switzerland (14) and the Republic of Ireland (12), with all three teams having one game left to play.


Team
Kyle Jamar
Chief Executive OfficerTaylor Johnson
Cheif Technology OfficerSimon Mckamey
Chief Operations OfficerAndrew Fisher
Chief Financial OfficerGoal
The goal of our project is to gain a better understanding into what factors play the biggest roles in an individuals likelihood of having a stroke. We also hope to present this information in such a way that it can be easily understood by all, and in turn spread awareness of how to avoid these deadly factors.
795,000
Stroke Victims in the US each year
#1
Cause of death in Americans
$46B
Stroke related costs in the US between 2014 and 2015


Created by Georgios Galatoulas / @GioShooter
Author : Peter-Paul Koch
how different our approach is on touch based devices and how each browser behaves
The safest way is the use of 'click' event, but...
what about speed?
It is known that the click has a 300ms delay to determine if it is a doubleclick event. This is in terms of responsiveness the mininum time we need to react in order the user to stay engaged which is gone by already by waiting for something else.
So use the touchstart instead.
Which means anything, swipe , tap, zoom and so on.
That is why when we design for touch based devices we need to be clear on the responsibilities.
So far as anyone concern yes
But Microsoft merges basic events of touch and mouse to one pointer type event
So both actions could have for example pointedown pointermove and pointerup events only.
However the currently Microsoft's drag and Drop action based on the pointer events needs a help of CSS which it so optimal
No need to be in touch events since it is not a continous event
Good Idea, not so usable cause of the lack of browser support (apple offers them)
However Microsof has bigger list of events but ...
Author : Addy Osmani
How we can change and improve the semantic web by creating meaningfull web components with their own attributes.
A tag that it has its own functions, properties and attributes.
Also its name describe explicilty its purpose
- Tab 1
- Tab 2
...
...
This project provides the infrastructure to create custom web elements for the application
Their target is to have everything on Native support.
So far they work only with polyfils to support all modern browsers
Author : Jake Archibald
Web Apps that work offline
Access the web app offline. Update only when we have to.
This can be provided by Appcache.
But Appcache is like a black box with huge specs and no way to debug your configuration.
It is a specification which gives the developer the tools he needs to handle the web application in offline mode.
There are like share workers. They work in the background and they serve the pages.
The advantage of service workers is that the we have full control of the cache and we can gracefully fail the network errors.
To check data from the internet we need
radio to start
connect to the isp
and then a whole traceroute until we get response
if it fails then you get from the cache
To check data from the cache
show anything that it ok to show without internet,
then if there is a new content then it fetches it and updates the web app
just like the native apps they do
It is still a spec not a full functional service
So far Chome and Mozilla are working together on this.
IE has concerns...
Safari ... no answer yet
Soon it will be in Canary
Author : Joe Petterson
The importance of Security audit and penetration Testing
Every single Web application runs on unstrustworthy enviroment since we do not have control over it.
The problem nowadays is worse since there not many pages that do not contain client logic.
Most of them contain contain heavy JavaScipt modules to provide rich experience on the Client side.
The server provides services to the JavaScript application.
The Client should not assume at any case that the source is trustworthy.
This is how attacks like Generic stored/Reflected XSS attacks applied.
This is caused because in an MVC model for example a View can trust any source of data the model can send.
solution: any DOM interaction should be sanitised even if the source is our server
var x = document.createElement("a"),
y =document.createTextNode();
x.href = "x";
x.setAttribute("onlcick", "\u0061\u006c\0067..../");// cleary Malicious intentions
y.appendChild(x)
We need to know from which server we get the response
We do not need to allow the attacker have a easy way to send back a false response.
Especially in CORS we need to validate all the urls we pass through
No wildcard in Access-Control-Allow-Origin !
localstorage in not secure enough we are better of using the sessionStorage.
Be aware of cache poisoning if the items are cached in localstorage.
DOS with web workers
Sandboxing untrusted data with sandbox
Prevent cache poisoning in man in the middle attacks. Solution is HTTPS.
With WebGL the attacket is able to block the GPU causing DOS.
At any case any web application should have run vunerability tests (for example Metaexpoit tool)
CI builds
Author : Benjamin Foxall
Designing for multiple Devices and how we can exploit each Device capabilities for enhanced experience
A lot of support
But it is also a good thing!
Identify device capabilities
Adapt our web application to the device
Example: An audio web app in a touch device has the ability to change two sliders at once instead of one in the desktop version
Mondernizr for HTML5 and CCS3 detection !
Different Devices communicate with each other or the main server
Subscribe and publish
Reat time transfer
Web Sockets and webRTC
bidirection communication with server and client
single handshake and the the connection stays alive
Server publishes a message and the client receives it without big delays
Protocol for peet to peer client communication
MediaStream, RTCPeerConnection, RTCDataChannels
quicker reaction on events
Author : Lea Verou
Mostly a workshop explaining by example most of the possible rules we may need in JavaScript for regular expressions.
for the curious her slides contain a proper regex test page where you can start practice your skills


GenePattern Tutorial |
| Datasets, programs, and files used in the GenePattern tutorial.
|
|
|
| |
ALL/AML |
Molecular Classification of Cancer: Class Discovery and Class Prediction by Gene Expression
|
|
|
| |
Lymphoma Outcome Prediction |
Diffuse Large B-Cell Lymphoma Outcome Prediction by Gene Expression Profiling and Supervised Machine Learning
|
|
|
| |
Global Cancer Map |
Multi-Class Cancer Diagnosis Using Tumor Gene Expression Signatures
|
|
|
| |
These datasets are also available on the public GenePattern website at https://software.broadinstitute.org/cancer/software/genepattern/datasets.
A link to this page is provided in the Documentation section on your GenePattern homepage for later downloads.


white
sky
deep
pearl
cobalt
carbon
skin
YOUR
One of the greatest things about the sport of surfing is
that you only need three things: your body,
a surfboard, and a wave.
john mccarthy
By understanding the various aspects of surfing, you will improve faster and have more fun in the water
READ MORESurf is different. Surfing is a lifestyle. Surfing is addictive. And it is certainly a lot of fun. Of course, surfing is done in the ocean, and everything you do out there is dangerous.
READ MORESurfing has a long History. European encounter it the first time 1767 when they arrived at the coast of Tahiti. The fascination of Surfing is incredible. I'm writing this as a Swiss Guy who grow up in a Country with no ocean.
READ MOREBy better understanding the various aspects of surfing, you will improve faster
and have more fun in the water.
first surfing magazine


ZAP maintains statistics which can help you understand what is really happening when interacting with large applications.
The statistics are available via the API and can be also sent to a Statsd server when configured via the Options Statistics screen.
The full set of statistics maintained by the ZAP core and add-ons are maintained on the ZAP website: Internal Statistics.
| UI Overview | for an overview of the user interface | |
| Features | provided by ZAP |


--- layout: post title: "morning lyrics" comments: true ---
There are places I remember
All my life, though some have changed
Some forever not for better
Some have gone and some remain
All these places had their moments
With lovers and friends
I still can recall
Some are dead and some are living
In my life I've loved them all


Web Developer & Data Analyst.
Three years ago, I know Python and I learning it, I think Python is a Graceful Program Language.
I use Django or Flask develop Web app and I use Scrapy and Numpy get or Analysis Data.
I enjoy it.
This is my primary skills, I think knowledge is endless, and we should keep learning for life.
Leave a message or send Email for me dev@linuxmail.org


A major upgrade to Ethereum is coming soon that'll transition Ethereum from Proof of Work to Proof of Stake. The upgrade is commonly known as "The Merge" and sometimes incorrectly called "ETH2".
There is no new ETH2 blockchain. The current Ethereum blockchain will be upgraded to Proof of Stake very soon.


Titans Photos Pit Father Vs. Daughter in Deadly Confrontation
by Sam StoneIt's father against daughter in the latest set of official stills from Titans Season 2, as Rose Wilson dons her Ravager costume to battle Deathstroke.
DC Universe officially released the images from Season 2's penultimate episode, titled "Faux Hawk." They include a blistering brawl between Ravager and Deathstroke, with the two crossing swords in a callback to the "death" of Slade Wilson's son Jericho earlier this season.
The episode's official synopsis also confirmed that Rose will confess a shocking secret about her background to Jason Todd over the course of the episode, putting her on a collision course with her estranged father. Previously released photos from the episode also teased an entirely different confrontation between Hawk and Dove.
Click the button below to start this article in quick view.
Streaming now on DC Universe, Titans Season 2 stars Brenton Thwaites as Dick Grayson, Anna Diop as Kory Anders, Teagan Croft as Rachel Roth, Ryan Potter as Garfield Logan, Curran Walters as Jason Todd and Conor Leslie as Donna Troy, with Minka Kelly as Dawn Granger, Alan Ritchson as Hank Hall, Joshua Orpin as Superboy, Chelsea Zhang as Rose Wilson, Chella Man as Jericho, Drew Van Acker as Aqualad, Esai Morales as Deathstroke and Iain Glen as Bruce Wayne.
https://schema.orgBreadcrumbListListItem1Homehttps://www.cbr.com/ListItem2TVhttps://www.cbr.com/category/tv/ListItem3TV Newshttps://www.cbr.com/category/tv/news-tv/ListItem4Titans Photos Pit Father Vs. Daughter in Deadly Confrontationhttps://www.cbr.com/titans-photos-slade-rose-confrontation/


FABO ACADEMY X officially launches at Suzhou uLink, spring of 2018, with 40 future makers!
Fabo Academy X is an intensive course into digital manufacturing and rapid prototyping, organized by Fablab O Shanghai. In this nine session programme, high-school or collegiate students learn to envision, prototype and document their ideas through many hours of hands-on experience with digital fabrication tools.