Action Controllers are the core of a web request in Rails. They are made up of one or more actions that are executed on request and then either render a template or redirect to another action. An action is defined as a public method on the controller, which will automatically be made accessible to the web-server through Rails Routes.
A sample controller could look like this:
class GuestBookController < ActionController::Base def index @entries = Entry.find(:all) end def sign Entry.create(params[:entry]) redirect_to :action => "index" end end
Actions, by default, render a template in the app/views directory corresponding to the name of the controller and action after executing code in the action. For example, the index action of the GuestBookController would render the template app/views/guestbook/index.rhtml by default after populating the @entries instance variable.
Unlike index, the sign action will not render a template. After performing its main purpose (creating a new entry in the guest book), it initiates a redirect instead. This redirect works by returning an external "302 Moved" HTTP response that takes the user to the index action.
The index and sign represent the two basic action archetypes used in Action Controllers. Get-and-show and do-and-redirect. Most actions are variations of these themes.
Requests
Requests are processed by the Action Controller framework by extracting the value of the "action" key in the request parameters. This value should hold the name of the action to be performed. Once the action has been identified, the remaining request parameters, the session (if one is available), and the full request with all the http headers are made available to the action through instance variables. Then the action is performed.
The full request object is available with the request accessor and is primarily used to query for http headers. These queries are made by accessing the environment hash, like this:
def server_ip location = request.env["SERVER_ADDR"] render :text => "This server hosted at #{location}" end
Parameters
All request parameters, whether they come from a GET or POST request, or from the URL, are available through the params method which returns a hash. For example, an action that was performed through /weblog/list?category=All&limit=5 will include { "category" => "All", "limit" => 5 } in params.
It’s also possible to construct multi-dimensional parameter hashes by specifying keys using brackets, such as:
<input type="text" name="post[name]" value="david"> <input type="text" name="post[address]" value="hyacintvej">
A request stemming from a form holding these inputs will include { "post" => { "name" => "david", "address" => "hyacintvej" } }. If the address input had been named "post[address][street]", the params would have included { "post" => { "address" => { "street" => "hyacintvej" } } }. There’s no limit to the depth of the nesting.
Sessions
Sessions allows you to store objects in between requests. This is useful for objects that are not yet ready to be persisted, such as a Signup object constructed in a multi-paged process, or objects that don’t change much and are needed all the time, such as a User object for a system that requires login. The session should not be used, however, as a cache for objects where it’s likely they could be changed unknowingly. It’s usually too much work to keep it all synchronized — something databases already excel at.
You can place objects in the session by using the session method, which accesses a hash:
session[:person] = Person.authenticate(user_name, password)
And retrieved again through the same hash:
Hello #{session[:person]}
For removing objects from the session, you can either assign a single key to nil, like session[:person] = nil, or you can remove the entire session with reset_session.
By default, sessions are stored on the file system in RAILS_ROOT/tmp/sessions. Any object can be placed in the session (as long as it can be Marshalled). But remember that 1000 active sessions each storing a 50kb object could lead to a 50MB store on the filesystem. In other words, think carefully about size and caching before resorting to the use of the session on the filesystem.
An alternative to storing sessions on disk is to use ActiveRecordStore to store sessions in your database, which can solve problems caused by storing sessions in the file system and may speed up your application. To use ActiveRecordStore, uncomment the line:
config.action_controller.session_store = :active_record_store
in your environment.rb and run rake db:sessions:create.
Responses
Each action results in a response, which holds the headers and document to be sent to the user’s browser. The actual response object is generated automatically through the use of renders and redirects and requires no user intervention.
Renders
Action Controller sends content to the user by using one of five rendering methods. The most versatile and common is the rendering of a template. Included in the Action Pack is the Action View, which enables rendering of ERb templates. It’s automatically configured. The controller passes objects to the view by assigning instance variables:
def show @post = Post.find(params[:id]) end
Which are then automatically available to the view:
Title: <%= @post.title %>
You don’t have to rely on the automated rendering. Especially actions that could result in the rendering of different templates will use the manual rendering methods:
def search @results = Search.find(params[:query]) case @results when 0 then render :action => "no_results" when 1 then render :action => "show" when 2..10 then render :action => "show_many" end end
Read more about writing ERb and Builder templates in classes/ActionView/Base.html.
Redirects
Redirects are used to move from one action to another. For example, after a create action, which stores a blog entry to a database, we might like to show the user the new entry. Because we’re following good DRY principles (Don‘t Repeat Yourself), we’re going to reuse (and redirect to) a show action that we’ll assume has already been created. The code might look like this:
def create @entry = Entry.new(params[:entry]) if @entry.save # The entry was saved correctly, redirect to show redirect_to :action => 'show', :id => @entry.id else # things didn't go so well, do something else end end
In this case, after saving our new entry to the database, the user is redirected to the show method which is then executed.
Calling multiple redirects or renders
An action should conclude with a single render or redirect. Attempting to try to do either again will result in a DoubleRenderError:
def do_something redirect_to :action => "elsewhere" render :action => "overthere" # raises DoubleRenderError end
If you need to redirect on the condition of something, then be sure to add "and return" to halt execution.
def do_something redirect_to(:action => "elsewhere") and return if monkeys.nil? render :action => "overthere" # won't be called unless monkeys is nil end
- controller_class_name
- controller_class_name
- controller_name
- controller_name
- controller_path
- default_url_options
- expires_in
- expires_now
- filter_parameter_logging
- hidden_actions
- hide_action
- process
- process_cgi
- process_test
- process_with_test
- redirect_to
- render
- render_to_string
- reset_session
- session_enabled?
- url_for
| DEFAULT_RENDER_STATUS_CODE | = | "200 OK" |
| [RW] | action_name | Returns the name of the action this controller is processing. |
| [RW] | assigns | Holds the hash of variables that are passed on to the template class to be made available to the view. This hash is generated by taking a snapshot of all the instance variables in the current scope just before a template is rendered. |
| [RW] | headers | Holds a hash of header names and values. Accessed like headers["Cache-Control"] to get the value of the Cache-Control directive. Values should always be specified as strings. |
| [RW] | params | Holds a hash of all the GET, POST, and Url parameters passed to the action. Accessed like params["post_id"] to get the post_id. No type casts are made, so all values are returned as strings. |
| [RW] | request | Holds the request object that’s primarily used to get environment variables through access like request.env["REQUEST_URI"]. |
| [RW] | response | Holds the response object that’s primarily used to set additional HTTP headers through access like response.headers["Cache-Control"] = "no-cache". Can also be used to access the final body HTML after a template has been rendered through response.body — useful for after_filters that wants to manipulate the output, such as a OutputCompressionFilter. |
| [RW] | session | Holds a hash of objects in the session. Accessed like session[:person] to get the object tied to the "person" key. The session will hold any type of object as values, but the key should be a string or symbol. |
Converts the class name from something like "OneModule::TwoModule::NeatController" to "NeatController".
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 323 323: def controller_class_name 324: @controller_class_name ||= name.demodulize 325: end
Converts the class name from something like "OneModule::TwoModule::NeatController" to "neat".
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 328 328: def controller_name 329: @controller_name ||= controller_class_name.sub(/Controller$/, '').underscore 330: end
Converts the class name from something like "OneModule::TwoModule::NeatController" to "one_module/two_module/neat".
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 333 333: def controller_path 334: @controller_path ||= name.gsub(/Controller$/, '').underscore 335: end
Replace sensitive paramater data from the request log. Filters paramaters that have any of the arguments as a substring. Looks in all subhashes of the param hash for keys to filter. If a block is given, each key and value of the paramater hash and all subhashes is passed to it, the value or key can be replaced using String#replace or similar method.
Examples:
filter_parameter_logging => Does nothing, just slows the logging process down filter_parameter_logging :password => replaces the value to all keys matching /password/i with "[FILTERED]" filter_parameter_logging :foo, "bar" => replaces the value to all keys matching /foo|bar/i with "[FILTERED]" filter_parameter_logging { |k,v| v.reverse! if k =~ /secret/i } => reverses the value to all keys matching /secret/i filter_parameter_logging(:foo, "bar") { |k,v| v.reverse! if k =~ /secret/i } => reverses the value to all keys matching /secret/i, and replaces the value to all keys matching /foo|bar/i with "[FILTERED]"
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 373 373: def filter_parameter_logging(*filter_words, &block) 374: parameter_filter = Regexp.new(filter_words.collect{ |s| s.to_s }.join('|'), true) if filter_words.length > 0 375: 376: define_method(:filter_parameters) do |unfiltered_parameters| 377: filtered_parameters = {} 378: 379: unfiltered_parameters.each do |key, value| 380: if key =~ parameter_filter 381: filtered_parameters[key] = '[FILTERED]' 382: elsif value.is_a?(Hash) 383: filtered_parameters[key] = filter_parameters(value) 384: elsif block_given? 385: key, value = key.dup, value.dup 386: yield key, value 387: filtered_parameters[key] = value 388: else 389: filtered_parameters[key] = value 390: end 391: end 392: 393: filtered_parameters 394: end 395: end
Return an array containing the names of public methods that have been marked hidden from the action processor. By default, all methods defined in ActionController::Base and included modules are hidden. More methods can be hidden using hide_actions.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 340 340: def hidden_actions 341: write_inheritable_attribute(:hidden_actions, ActionController::Base.public_instance_methods) unless read_inheritable_attribute(:hidden_actions) 342: read_inheritable_attribute(:hidden_actions) 343: end
Hide each of the given methods from being callable as actions.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 346 346: def hide_action(*names) 347: write_inheritable_attribute(:hidden_actions, hidden_actions | names.collect { |n| n.to_s }) 348: end
Process a request extracted from an CGI object and return a response. Pass false as session_options to disable sessions (large performance increase if sessions are not needed). The session_options are the same as for CGI::Session:
- :database_manager - standard options are CGI::Session::FileStore, CGI::Session::MemoryStore, and CGI::Session::PStore (default). Additionally, there is CGI::Session::DRbStore and CGI::Session::ActiveRecordStore. Read more about these in lib/action_controller/session.
- :session_key - the parameter name used for the session id. Defaults to ‘_session_id’.
- :session_id - the session id to use. If not provided, then it is retrieved from the session_key parameter of the request, or automatically generated for a new session.
- :new_session - if true, force creation of a new session. If not set, a new session is only created if none currently exists. If false, a new session is never created, and if none currently exists and the session_id option is not set, an ArgumentError is raised.
- :session_expires - the time the current session expires, as a Time object. If not set, the session will continue indefinitely.
- :session_domain - the hostname domain for which this session is valid. If not set, defaults to the hostname of the server.
- :session_secure - if true, this session will only work over HTTPS.
- :session_path - the path for which this session applies. Defaults to the directory of the CGI script.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/cgi_process.rb, line 25 25: def self.process_cgi(cgi = CGI.new, session_options = {}) 26: new.process_cgi(cgi, session_options) 27: end
Process a test request called with a TestRequest object.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/test_process.rb, line 7 7: def self.process_test(request) 8: new.process_test(request) 9: end
Converts the class name from something like "OneModule::TwoModule::NeatController" to "NeatController".
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 493 493: def controller_class_name 494: self.class.controller_class_name 495: end
Converts the class name from something like "OneModule::TwoModule::NeatController" to "neat".
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 498 498: def controller_name 499: self.class.controller_name 500: end
Alias for process_with_test
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/test_process.rb, line 15 15: def process_with_test(*args) 16: returning process_without_test(*args) do 17: add_variables_to_assigns 18: end 19: end
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 502 502: def session_enabled? 503: request.session_options[:disabled] != false 504: end
Returns a URL that has been rewritten according to the options hash and the defined Routes. (For doing a complete redirect, use redirect_to). url_for is used to: All keys given to url_for are forwarded to the Route module, save for the following:
- :anchor — specifies the anchor name to be appended to the path. For example, url_for :controller => ‘posts’, :action => ‘show’, :id => 10, :anchor => ‘comments’ will produce "/posts/show/10#comments".
- :only_path — if true, returns the absolute URL (omitting the protocol, host name, and port)
- :trailing_slash — if true, adds a trailing slash, as in "/archive/2005/". Note that this is currently not recommended since it breaks caching.
- :host — overrides the default (current) host if provided
- :protocol — overrides the default (current) protocol if provided
The URL is generated from the remaining keys in the hash. A URL contains two key parts: the <base> and a query string. Routes composes a query string as the key/value pairs not included in the <base>.
The default Routes setup supports a typical Rails path of "controller/action/id" where action and id are optional, with action defaulting to ‘index’ when not given. Here are some typical url_for statements and their corresponding URLs:
url_for :controller => 'posts', :action => 'recent' # => 'proto://host.com/posts/recent' url_for :controller => 'posts', :action => 'index' # => 'proto://host.com/posts' url_for :controller => 'posts', :action => 'show', :id => 10 # => 'proto://host.com/posts/show/10'
When generating a new URL, missing values may be filled in from the current request’s parameters. For example, url_for :action => ‘some_action‘ will retain the current controller, as expected. This behavior extends to other parameters, including :controller, :id, and any other parameters that are placed into a Route’s path. The URL helpers such as url_for have a limited form of memory: when generating a new URL, they can look for missing values in the current request’s parameters. Routes attempts to guess when a value should and should not be taken from the defaults. There are a few simple rules on how this is performed:
- If the controller name begins with a slash, no defaults are used: url_for :controller => ’/home’
- If the controller changes, the action will default to index unless provided
The final rule is applied while the URL is being generated and is best illustrated by an example. Let us consider the route given by map.connect ‘people/:last/:first/:action’, :action => ‘bio’, :controller => ‘people’.
Suppose that the current URL is "people/hh/david/contacts". Let’s consider a few different cases of URLs which are generated from this page.
- url_for :action => ‘bio’ — During the generation of this URL, default values will be used for the first and
last components, and the action shall change. The generated URL will be, "people/hh/david/bio".
- url_for :first => ‘davids-little-brother’ This generates the URL ‘people/hh/davids-little-brother’ — note that this URL leaves out the assumed action of ‘bio’.
However, you might ask why the action from the current request, ‘contacts’, isn’t carried over into the new URL. The answer has to do with the order in which the parameters appear in the generated path. In a nutshell, since the value that appears in the slot for :first is not equal to default value for :first we stop using defaults. On it’s own, this rule can account for much of the typical Rails URL behavior. Although a convienence, defaults can occasionaly get in your way. In some cases a default persists longer than desired. The default may be cleared by adding :name => nil to url_for’s options. This is often required when writing form helpers, since the defaults in play may vary greatly depending upon where the helper is used from. The following line will redirect to PostController’s default action, regardless of the page it is displayed on:
url_for :controller => 'posts', :action => nil
If you explicitly want to create a URL that’s almost the same as the current URL, you can do so using the :overwrite_params options. Say for your posts you have different views for showing and printing them. Then, in the show view, you get the URL for the print view like this
url_for :overwrite_params => { :action => 'print' }
This takes the current URL as is and only exchanges the action. In contrast, url_for :action => ‘print’ would have slashed-off the path components after the changed action.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 484 484: def url_for(options = {}, *parameters_for_method_reference) #:doc: 485: case options 486: when String then options 487: when Symbol then send(options, *parameters_for_method_reference) 488: when Hash then @url.rewrite(rewrite_options(options)) 489: end 490: end
Overwrite to implement a number of default options that all url_for-based methods will use. The default options should come in the form of a hash, just like the one you would use for url_for directly. Example:
def default_url_options(options) { :project => @project.active? ? @project.url_name : "unknown" } end
As you can infer from the example, this is mostly useful for situations where you want to centralize dynamic decisions about the urls as they stem from the business domain. Please note that any individual url_for call can always override the defaults set by this method.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 815 815: def default_url_options(options) #:doc: 816: end
Sets a HTTP 1.1 Cache-Control header. Defaults to issuing a "private" instruction, so that intermediate caches shouldn’t cache the response.
Examples:
expires_in 20.minutes expires_in 3.hours, :private => false expires in 3.hours, 'max-stale' => 5.hours, :private => nil, :public => true
This method will overwrite an existing Cache-Control header. See www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more possibilities.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 873 873: def expires_in(seconds, options = {}) #:doc: 874: cache_options = { 'max-age' => seconds, 'private' => true }.symbolize_keys.merge!(options.symbolize_keys) 875: cache_options.delete_if { |k,v| v.nil? or v == false } 876: cache_control = cache_options.map{ |k,v| v == true ? k.to_s : "#{k.to_s}=#{v.to_s}"} 877: @response.headers["Cache-Control"] = cache_control.join(', ') 878: end
Sets a HTTP 1.1 Cache-Control header of "no-cache" so no caching should occur by the browser or intermediate caches (like caching proxy servers).
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 882 882: def expires_now #:doc: 883: @response.headers["Cache-Control"] = "no-cache" 884: end
Redirects the browser to the target specified in options. This parameter can take one of three forms:
- Hash: The URL will be generated by calling url_for with the options.
- String starting with protocol:// (like http://): Is passed straight through as the target for redirection.
- String not containing a protocol: The current protocol and host is prepended to the string.
- :back: Back to the page that issued the request. Useful for forms that are triggered from multiple places. Short-hand for redirect_to(request.env["HTTP_REFERER"])
Examples:
redirect_to :action => "show", :id => 5 redirect_to "http://www.rubyonrails.org" redirect_to "/images/screenshot.jpg" redirect_to :back
The redirection happens as a "302 Moved" header.
When using redirect_to :back, if there is no referrer, RedirectBackError will be raised. You may specify some fallback behavior for this case by rescueing RedirectBackError.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 837 837: def redirect_to(options = {}, *parameters_for_method_reference) #:doc: 838: case options 839: when %r{^\w+://.*} 840: raise DoubleRenderError if performed? 841: logger.info("Redirected to #{options}") if logger 842: response.redirect(options) 843: response.redirected_to = options 844: @performed_redirect = true 845: 846: when String 847: redirect_to(request.protocol + request.host_with_port + options) 848: 849: when :back 850: request.env["HTTP_REFERER"] ? redirect_to(request.env["HTTP_REFERER"]) : raise(RedirectBackError) 851: 852: else 853: if parameters_for_method_reference.empty? 854: redirect_to(url_for(options)) 855: response.redirected_to = options 856: else 857: redirect_to(url_for(options, *parameters_for_method_reference)) 858: response.redirected_to, response.redirected_to_method_params = options, parameters_for_method_reference 859: end 860: end 861: end
Renders the content that will be returned to the browser as the response body.
Rendering an action
Action rendering is the most common form and the type used automatically by Action Controller when nothing else is specified. By default, actions are rendered within the current layout (if one exists).
# Renders the template for the action "goal" within the current controller render :action => "goal" # Renders the template for the action "short_goal" within the current controller, # but without the current active layout render :action => "short_goal", :layout => false # Renders the template for the action "long_goal" within the current controller, # but with a custom layout render :action => "long_goal", :layout => "spectacular"
Deprecation notice: This used to have the signatures render_action("action", status = 200), render_without_layout("controller/action", status = 200), and render_with_layout("controller/action", status = 200, layout).
Rendering partials
Partial rendering is most commonly used together with Ajax calls that only update one or a few elements on a page without reloading. Rendering of partials from the controller makes it possible to use the same partial template in both the full-page rendering (by calling it from within the template) and when sub-page updates happen (from the controller action responding to Ajax calls). By default, the current layout is not used.
# Renders the partial located at app/views/controller/_win.r(html|xml) render :partial => "win" # Renders the partial with a status code of 500 (internal error) render :partial => "broken", :status => 500 # Renders the same partial but also makes a local variable available to it render :partial => "win", :locals => { :name => "david" } # Renders a collection of the same partial by making each element of @wins available through # the local variable "win" as it builds the complete response render :partial => "win", :collection => @wins # Renders the same collection of partials, but also renders the win_divider partial in between # each win partial. render :partial => "win", :collection => @wins, :spacer_template => "win_divider"
Deprecation notice: This used to have the signatures render_partial(partial_path = default_template_name, object = nil, local_assigns = {}) and render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = {}).
Rendering a template
Template rendering works just like action rendering except that it takes a path relative to the template root. The current layout is automatically applied.
# Renders the template located in [TEMPLATE_ROOT]/weblog/show.r(html|xml) (in Rails, app/views/weblog/show.rhtml) render :template => "weblog/show"
Rendering a file
File rendering works just like action rendering except that it takes a filesystem path. By default, the path is assumed to be absolute, and the current layout is not applied.
# Renders the template located at the absolute filesystem path render :file => "/path/to/some/template.rhtml" render :file => "c:/path/to/some/template.rhtml" # Renders a template within the current layout, and with a 404 status code render :file => "/path/to/some/template.rhtml", :layout => true, :status => 404 render :file => "c:/path/to/some/template.rhtml", :layout => true, :status => 404 # Renders a template relative to the template root and chooses the proper file extension render :file => "some/template", :use_full_path => true
Deprecation notice: This used to have the signature render_file(path, status = 200)
Rendering text
Rendering of text is usually used for tests or for rendering prepared content, such as a cache. By default, text rendering is not done within the active layout.
# Renders the clear text "hello world" with status code 200 render :text => "hello world!" # Renders the clear text "Explosion!" with status code 500 render :text => "Explosion!", :status => 500 # Renders the clear text "Hi there!" within the current active layout (if one exists) render :text => "Explosion!", :layout => true # Renders the clear text "Hi there!" within the layout # placed in "app/views/layouts/special.r(html|xml)" render :text => "Explosion!", :layout => "special"
Deprecation notice: This used to have the signature render_text("text", status = 200)
Rendering an inline template
Rendering of an inline template works as a cross between text and action rendering where the source for the template is supplied inline, like text, but its interpreted with ERb or Builder, like action. By default, ERb is used for rendering and the current layout is not used.
# Renders "hello, hello, hello, again" render :inline => "<%= 'hello, ' * 3 + 'again' %>" # Renders "<p>Good seeing you!</p>" using Builder render :inline => "xml.p { 'Good seeing you!' }", :type => :rxml # Renders "hello david" render :inline => "<%= 'hello ' + name %>", :locals => { :name => "david" }
Deprecation notice: This used to have the signature render_template(template, status = 200, type = :rhtml)
Rendering inline JavaScriptGenerator page updates
In addition to rendering JavaScriptGenerator page updates with Ajax in RJS templates (see ActionView::Base for details), you can also pass the :update parameter to render, along with a block, to render page updates inline.
render :update do |page| page.replace_html 'user_list', :partial => 'user', :collection => @users page.visual_effect :highlight, 'user_list' end
Rendering nothing
Rendering nothing is often convenient in combination with Ajax calls that perform their effect client-side or when you just want to communicate a status code. Due to a bug in Safari, nothing actually means a single space.
# Renders an empty response with status code 200 render :nothing => true # Renders an empty response with status code 401 (access denied) render :nothing => true, :status => 401
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 640 640: def render(options = nil, deprecated_status = nil, &block) #:doc: 641: raise DoubleRenderError, "Can only render or redirect once per action" if performed? 642: 643: # Backwards compatibility 644: unless options.is_a?(Hash) 645: if options == :update 646: options = {:update => true} 647: else 648: return render_file(options || default_template_name, deprecated_status, true) 649: end 650: end 651: 652: if content_type = options[:content_type] 653: headers["Content-Type"] = content_type 654: end 655: 656: if text = options[:text] 657: render_text(text, options[:status]) 658: 659: else 660: if file = options[:file] 661: render_file(file, options[:status], options[:use_full_path], options[:locals] || {}) 662: 663: elsif template = options[:template] 664: render_file(template, options[:status], true) 665: 666: elsif inline = options[:inline] 667: render_template(inline, options[:status], options[:type], options[:locals] || {}) 668: 669: elsif action_name = options[:action] 670: render_action(action_name, options[:status], options[:layout]) 671: 672: elsif xml = options[:xml] 673: render_xml(xml, options[:status]) 674: 675: elsif partial = options[:partial] 676: partial = default_template_name if partial == true 677: if collection = options[:collection] 678: render_partial_collection(partial, collection, options[:spacer_template], options[:locals], options[:status]) 679: else 680: render_partial(partial, ActionView::Base::ObjectWrapper.new(options[:object]), options[:locals], options[:status]) 681: end 682: 683: elsif options[:update] 684: add_variables_to_assigns 685: @template.send :evaluate_assigns 686: 687: generator = ActionView::Helpers::PrototypeHelper::JavaScriptGenerator.new(@template, &block) 688: render_javascript(generator.to_s) 689: 690: elsif options[:nothing] 691: # Safari doesn't pass the headers of the return if the response is zero length 692: render_text(" ", options[:status]) 693: 694: else 695: render_file(default_template_name, options[:status], true) 696: 697: end 698: end 699: end
Renders according to the same rules as render, but returns the result in a string instead of sending it as the response body to the browser.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 703 703: def render_to_string(options = nil, &block) #:doc: 704: result = render(options, &block) 705: 706: erase_render_results 707: forget_variables_added_to_assigns 708: reset_variables_added_to_assigns 709: 710: result 711: end
Resets the session by clearing out all the objects stored within and initializing a new session object.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/base.rb, line 887 887: def reset_session #:doc: 888: @request.reset_session 889: @session = @request.session 890: @response.session = @session 891: end


In 1967, John Lennon wrote a song called, “All You Need is Love.”
Thirty-five years later, Trent Reznor from Nine Inch Nails wrote a song called “Love is Not Enough.” Reznor, despite being famous for his shocking stage performances and his grotesque and disturbing videos, got clean from all drugs and alcohol, married one woman, had two children with her, and then cancelled entire albums and tours so that he could stay home and be a good husband and father.
One of these two men had a clear and realistic understanding of love. One of them did not. One of these men idealized love as the solution to all of his problems. One of them did not.  One of them was not.
In our culture, many of us idealize love. We see it as some lofty cure-all for all of life’s problems. Our movies and our stories and our history all celebrate it as life’s ultimate goal, the final solution for all of our pain and struggle. And because we idealize love, we overestimate it. As a result, our relationships pay a price.
When we believe that “all we need is love,” then like Lennon, we’re more likely to ignore fundamental values such as respect, humility and commitment towards the people we care about. After all, if love solves everything, then why bother with all the other stuff — all of the hard stuff?
But if, like Reznor, we believe that “love is not enough,” then we understand that healthy relationships require more than pure emotion or lofty passions. We understand that there are things more important in our lives and our relationships than simply being in love. And the success of our relationships hinges on these deeper and more important values.
THREE HARSH TRUTHS ABOUT LOVE
The problem with idealizing love is that it causes us to develop unrealistic expectations about what love actually is and what it can do for us. These unrealistic expectations then sabotage the very relationships we hold dear in the first place. Allow me to illustrate:
1. Love does not equal compatibility. Just because you fall in love with someone doesn’t necessarily mean they’re a good partner for you to be with over the long term. Love is an emotional process; compatibility is a logical process. And the two don’t bleed into one another very well.
It’s possible to fall in love with somebody who doesn’t treat us well, who makes us feel worse about ourselves, who doesn’t hold the same respect for us as we do for them, or who has such a dysfunctional life themselves that they threaten to bring us down with them.
It’s possible to fall in love with somebody who has different ambitions or life goals that are contradictory to our own, who holds different philosophical beliefs or worldviews that clash with our own sense of reality.

That may sound paradoxical, but it’s true.
When dating and looking for a partner, you must use not only your heart, but your mind. Yes, you want to find someone who makes your heart flutter and your farts smell like cherry popsicles. But you also need to evaluate a person’s values, how they treat themselves, how they treat those close to them, their ambitions and their worldviews in general. Because if you fall in love with someone who is incompatible with you…well, as the ski instructor from South Park once said, you’re going to have a bad time.
2.Love does not solve your relationship problems.My first girlfriend and I were madly in love with each other. We also lived in different cities, had no money to see each other, had families who hated each other, and went through weekly bouts of meaningless drama and fighting.
And every time we fought, we’d come back to each other the next day and make up and remind each other how crazy we were about one another and that none of those little things matter because we’re omg sooooooo in love and we’ll find a way to work it out and everything will be great, just you wait and see. Our love made us feel like we were overcoming our issues, when on a practical level, absolutely nothing had changed.
As you can imagine, none of our problems got resolved. The fights repeated themselves. The arguments got worse. Our inability to ever see each other hung around our necks like an albatross. We were both self-absorbed to the point where we couldn’t even communicate that effectively. Hours and hours talking on the phone with nothing actually said. Looking back, there was no hope that it was going to last.
Unsurprisingly, that relationship burst into flames and crashed like the Hindenburg being doused in jet fuel. The break up was ugly. And the big lesson I took away from it was this: while love may make you feel better about your relationship problems, it doesn’t actually solve any of your relationship problems.
The roller coaster of emotions can be intoxicating, each high feeling even more important and more valid than the one before, but unless there’s a stable and practical foundation beneath your feet, that rising tide of emotion will eventually come and wash it all away.
3. Love is not always worth sacrificing yourself. One of the defining characteristics of loving someone is that you are able to think outside of yourself and your own needs to help care for another person and their needs as well.
But the question that doesn’t get asked often enough is exactly what are you sacrificing, and is it worth it?
In loving relationships, it’s normal for both people to occasionally sacrifice their own desires, their own needs, and their own time for one another. I would argue that this is normal and healthy and a big part of what makes a relationship so great.
But when it comes to sacrificing one’s self-respect, one’s dignity, one’s physical body, one’s ambitions and life purpose, just to be with someone, then that same love becomes problematic. A loving relationship is supposed to supplement our individual identity, not damage it or replace it. If we find ourselves in situations where we’re tolerating disrespectful or abusive behavior, then that’s essentially what we’re doing: we’re allowing our love to consume us and negate us, and if we’re not careful, it will leave us as a shell of the person we once were.


Cards For Science is a solitaire card game where you must work out the secret rule. The rule decides which card can be played next, so play cards to test each rule, then guess correct one to win.
Why are these cards "for science"? To win the game you have rules and try to break them. To do science you form competing hypothesis (or rules) and try to disprove (or break) them. The difference is that players try to discover the rules of the game but scientists try to discover the laws of the universe. Since the universe is complicated science is hard, but don't worry, we can use playing cards for scientific thought.
For example, you have these cards: 🂢, 🂣, and 🂴. You have two rules but only one is true.
- "The next card must be higher"
- "the next card must have a different suite"
Are these rules both valid? No because one rule has already been broken. The second rule says we can't have two clubs in a row and we have a two of clubs followed by a three of clubs. That leaves us with rule one, which we guess is the right rule. Correct!
This is a pre-release.
Credits
This game is inspired by
Eleusis by Robert Abbott and John Golden's
Eleusis Express.
Rules
- Guess the rule correctly to win the game
- The rule determines which card can be put down next
- Prove or disprove rules by testing next cards
- But putting down an incorrect card decreases your score by 2 and gives you 2 new cards.
- Empty your hand to increase your score.
- Every game will have a random rule chosen from around 300 rules
- Hints cost you 150 points.
- At zero points you lose the game.
Hints:
- Try to disprove rules, those which remain must be the truth
- Don't be afraid to reveal the rule hints
- Don't spend too much time thinking before 6 cards have been played.
- If this rule is too hard restart the game to get a new rule
Cards and values
|
{{key}}
|
|
{{card[key]|boolToTick}}
|


This Data represents the call history from San Francisco's 311 Customer Service Center. These calls were taken and recorded on March 13th, 2016 between 12:00am and 12:00pm.
The neighborhood from which the request came.


Monday - Friday : 7 a.m. - 6:30 p.m.
Saturday : 9 a.m. - 4 p.m.
Sunday : Closed
(425) 454 - 6122
Monday - Friday : 7 a.m. - 6:30 p.m.
Saturday : 9 a.m. - 4 p.m.
Sunday : Closed
(425) 454 - 6122
310 105th Ave NE
Bellevue, WA 98004
We are proud to be local, family owned and operated for over 50 years, and to continue to offer professional and excellence in quality cleaning in downtown Bellevue.
In addition to your dry cleaning needs, we provide a full-service wash, dry, and fold laundry service. Our goal is to make sure your laundry is ready to wear or put away the way you want it to be.
Located across the street from Safeway,
a short walk from the Bellevue Square Mall,
and a quick jaunt from Bellevue Park,
you can smoothly accomplish everything while in the neighborhood!


|
Close Help |
Use your favorite text editor to write. Publishing is as easy as dragging and dropping a file.
Blot works with images, text, HTML and Markdown files.
Blot comes with four themes or you can create your own.
You have complete control over your blog on Blot.
Blot is fast and reliable and hosts blogs with thousands of posts with ease. Below are three blogs hosted on Blot which use one of the included themes:
Sign up for Blot and set up your blog instantly.
$20 a yearNo, never.
I have to cover the cost of running Blot somehow.
No, Blot only has access to the folder containing your blog posts.
No, Blot fetches a copy of each blog post and hosts it on Blot's servers.
See more on the help page. Don't hesitate to contact me with any questions.
Blot has a basic dashboard to set up and customize your blog. This is how the dashboard looks:


Note that this effect doesn't use the textAccessible
option. This is because the
effect moves the whole canvas around - not just what's on it.
It's a nice transition effect where one chart blends into another with a "folding-away" type motion. The other chart is shown in the reverse direction. The effect is not animated by using JavaScript based animation but by using JavaScript to apply CSS properties. The CSS transitions which are also specified on the canvas then take care of doing the animating.
The charts themselves are quite straight-forward - with the Line chart having a larger linewidth and bigger tickmarks than normal.
If rewritten
it might be possible by applying the CSS to the textAccessible
container DIV instead of the canvas tag.
This way the DIV and everything in it (ie the canvas and the text) is animated.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="RGraph.common.core.js"></script> <script src="RGraph.line.js"></script> <script src="RGraph.bar.js"></script> <style> div#container { position: relative; width: 600px; height: 250px; } div#container canvas { position: absolute; top: 0; left: 0; width: 600px; height: 250px; background-color: white; transition: all 1s; opacity: 1; } div#container canvas#cvs1 { top: 125px; left: 300px; width: 0; height: 0; opacity: 0; transform: rotate(90deg); } </style>Put this where you want the chart to show up:
<div id="container"> <canvas id="cvs1" width="600" height="250">[No canvas support]</canvas> <canvas id="cvs2" width="600" height="250">[No canvas support]</canvas> </div>This is the code that generates the chart:


It seems like you've been dropped at my GitHub Pages crossroad,
except you seem to have landed on a page that doesn't exist.
No worries, what you're looking for should be in the navigation.


{% extends "base.html" %} {% block title %}The Blue Alliance - API Docs{% endblock %} {% block meta_description %}Documentation for The Blue Alliance's API.{% endblock %} {% block content %}
v2 of The Blue Alliance API has been deprecated as of June 1, 2017. This means there will be no further development and no further changes will be made. Please migrate your apps to APIv3. APIv2 will be decommissioned on January 1, 2018.
This documentation is for The Blue Alliance's public web API for programmatically accessing data.
The API and code are open source. If you find a bug, want a new feature, or are interested in helping us improve it, visit us on GitHub and file an issue or send a pull request. If you have any questions about this API or would like to stay up-to-date on its development, you can join our developer's mailing list.
So we can know how the API is being used to prioritize future development, we require clients to identify themselves. All API requests must include a unique, descriptive X-TBA-App-Id
header or URL parameter to identify the application.
The X-TBA-App-Id
needs to follow this format:
<team/person id>:<app description>:<version>
and
not use any colons except for the two already present.
frc281:scouting-system:v01
woodie_flowers:match_scraper:5
All API responses have a Last-Modified
header, which indicates the date and time at which the data at a particular endpoint was last updated. When making repeated calls to a particular endpoint, you should set the If-Modified-Since
header in your request to the value of Last-Modified
from the previous call to that endpoint. On the first call, If-Modified-Since
does not need to be set.
Consumers of the TBA API are highly encouraged to make use of these headers. If the server determines that no data has been updated, it returns a 304 Not Modified
response with an empty body, saving both the server and the consumer time and bandwidth.
If your application makes many queries to the TBA API and you are capable of caching the results locally, the
Cache-Control header will provide guidance on how long the API response can remain valid in a local cache. In
particular, the max-age
value in the Cache-Control
header contains the number of
seconds the API result should be considered valid for. See also
Google's Cache-Control reference.
Requests made to the API should be made using SSL to www.thebluealliance.com
.
At times, it may be useful to know the status of the datafeeds from
which the API is updated. This may be done by sending an API request
to https://www.thebluealliance.com/api/v2/status
. If a specific
event is no longer updating, it is included inside the array
down_events
; if the entire FMSAPI is down,
is_datafeed_down
is set to true.
The TBA API also includes support for webhooks. We can push notifications for things you've subscribed to your sever. This can save both your client and our server time and processing power, as it can reduce the need to poll the API. See this page for more documentation on webhooks.
| Key | Description | Examples |
|---|---|---|
| website | Official website associated with the team | http://www.entech281.com |
| name | Official long form name registered with FIRST | Michelin/Caterpillar/Greenville Technical College/Greenville... |
| locality | City of team derived from parsing the address registered with FIRST | Greenville |
| region | State of team derived from parsing the address registered with FIRST | SC |
| country_name | Country of team derived from parsing the address registered with FIRST | USA |
| location | Long form address that includes city, state, and country provided by FIRST | Greenville, SC, USA |
| team_number | Official team number issued by FIRST | 281 |
| key | TBA team key with the format frcyyyy | frc281 |
| nickname | Team nickname provided by FIRST | EnTech GreenVillians |
| rookie_year | Team's rookie year | 1999 |
| motto | Team's Motto | Infiltrating Young Minds One Robot at a Time |
| Key | Description | Examples |
|---|---|---|
| key | TBA event key with the format yyyy[EVENT_CODE] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2010sc |
| name | Official name of event on record either provided by FIRST or organizers of offseason event. | Palmetto Regional |
| short_name | name but doesn't include event specifiers, such as
'Regional' or 'District'. May be null. |
Palmetto |
| event_code | Event short code. | SC |
| event_type_string | A human readable string that defines the event type. | 'Regional', 'District', 'District Championships'…see more |
| event_type | An integer that represents the event type as a constant. | List of constants to event type |
| event_district_string | A human readable string that defines the event's district. | 'Michigan', 'Mid Atlantic', null (if regional)…see more |
| event_district | An integer that represents the event district as a constant. | List of constants to event district |
| year | Year the event data is for. | 2010 |
| week | Week of the event relative to the first official season event. Only valid for Regionals, Districts, and District Championships. Null otherwise. | 2 |
| location | Long form address that includes city, and state provided by FIRST | Clemson, SC |
| venue_address | Address of the event's venue, if available. Line breaks included. | Long Beach Arena\n300 East Ocean Blvd\nLong Beach, CA 90802\nUSA |
| timezone | Timezone name, as found in the tz database | America/New_York |
| website | The event's website, if any. | http://www.firstsv.org |
| official | Whether this event used the official FMS. | true |
| teams | List of team models that attended the event | |
| matches | List of match models for the event. | |
| awards | List of award models for the event. | |
| webcast | If the event has webcast data associated with it, this contains JSON data of the streams | |
| alliances | If we have alliance selection data for this event, this contains a JSON array of the alliances. The captain is the first team, followed by their picks, in order. | |
| district_points | If this event is part of a district, this contains the number and breakdown of points that each team attending earned. |
| Key | Description | Examples |
|---|---|---|
| key | TBA event key with the format
yyyy[EVENT_CODE]_[COMP_LEVEL]m[MATCH_NUMBER] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event, COMP_LEVEL is (qm, ef, qf, sf, f), and
MATCH_NUMBER is the match number in the competition level. A set number
may append the competition level if more than one match in required
per set . |
2010sc_qm10, 2011nc_qf1m2 |
| comp_level | The competition level the match was played at. | qm, ef, qf, sf, f |
| set_number | The set number in a series of matches where more than one match is required in the match series. | 2010sc_qf1m2, would be match 2 in quarter finals 1. |
| match_number | The match number of the match in the competition level. | 2010sc_qm20 |
| alliances | A list of alliances, the teams on the alliances, and their score. | |
| score_breakdown | Score breakdown for auto, teleop, etc. points. Varies from year to year. May be null. | |
| event_key | Event key of the event the match was played at. | 2011sc |
| videos | JSON array of videos associated with this match and corresponding information | "videos": [{"key": "xswGjxzNEoY", "type": "youtube"}, {"key": "http://videos.thebluealliance.net/2010cmp/2010cmp_f1m1.mp4", "type": "tba"}] |
| time_string | Time string for this match, as published on the official schedule. Of course, this may or may not be accurate, as events often run ahead or behind schedule | 11:15 AM |
| time | UNIX timestamp of match time, as taken from the published schedule |<PHONE_NUMBER> |
| Key | Description | Examples |
|---|---|---|
| name | The name of the award from TIMS. May vary for the same award type. | Engineering Inspiration |
| award_type | An integer that represents the award type as a constant. | List of constants to award type |
| event_key | The event_key of the event the award was won at. | 2011sc |
| recipient_list | A list of recipients of the award at the event. Either team_number or awardee for individual awards. | {"team_number": 281, "awardee": null} |
| year | The year this award was won. | 2010 |
| Key | Description | Examples |
|---|---|---|
| type | The string type of the media element, as determined here. | cdphotothread |
| foreign_key | The key used to indentify this media element on the remote site (e.g YouTube video key) | aFZy8iibMD0 |
| details | If the media requires it, a json dict of additional information | {"image_partial": "fe3/fe38d320428adf4f51ac969efb3db32c_l.jpg"} |
| preferred | Whether the media is considered to be of high quality. | true |
| Key | Description | Examples |
|---|---|---|
| key | A key identifying the robot object. Formed like <team_key>_<year> | frc1124_2015 |
| team_key | The associated Team key | frc1124 |
| year | The year this Robot model refers to | 2015 |
| name | The robot name in this year | Orion |
Request format:
https://www.thebluealliance.com/api/v2/teams/<page_num>
| Key | Description | Examples |
|---|---|---|
| page_num | A page of teams, zero-indexed. Each page consists of teams whose numbers start at start = 500 * page_num and end at end = start + 499 , inclusive. |
0, 5, 7 |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>(/<year>)/events
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
| year | A specific year you would like to grab data for this team. Defaults to current year if not provided. | 2008, 2013 |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>/event/<event key>/awards
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
| event key | TBA event key with the format yyyy[EVENT_CODE] , where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2014casj, 2010cmp |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>/event/<event key>/matches
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
| event key | TBA event key with the format yyyy[EVENT_CODE] , where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2014casj, 2010cmp |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>/years_participated
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>(/<year>)/media
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
| year | A specific year you would like to grab data for this team. Defaults to current year if not provided. | 2008, 2013 |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>/history/events
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>/history/awards
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>/history/robots
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
Request format:
https://www.thebluealliance.com/api/v2/team/<team key>/history/districts
| Key | Description | Examples |
|---|---|---|
| team key | A team key name where the format is frcyyyy where yyyy is the a
valid, official team number issued by FIRST |
frc1, frc281, frc1114 |
Request format:
https://www.thebluealliance.com/api/v2/events/<year>
| Key | Description | Examples |
|---|---|---|
| year | A year to specify what year of events you want. Valid years are within 1992, and the current year + 1. Defaults to current year if not specified. | 2010 |
Request format:
https://www.thebluealliance.com/api/v2/event/<event key>
| Key | Description | Examples |
|---|---|---|
| event key | TBA event key with the format yyyy[EVENT_CODE] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2010sc |
Request format:
https://www.thebluealliance.com/api/v2/event/<event key>/teams
| Key | Description | Examples |
|---|---|---|
| event key | TBA event key with the format yyyy[EVENT_CODE] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2010sc |
Request format:
https://www.thebluealliance.com/api/v2/event/<event key>/matches
| Key | Description | Examples |
|---|---|---|
| event key | TBA event key with the format yyyy[EVENT_CODE] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2010sc |
Request format:
https://www.thebluealliance.com/api/v2/event/<event key>/stats
| Key | Description | Examples |
|---|---|---|
| event key | TBA event key with the format yyyy[EVENT_CODE] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2010sc |
Request format:
https://www.thebluealliance.com/api/v2/event/<event key>/rankings
| Key | Description | Examples |
|---|---|---|
| event key | TBA event key with the format yyyy[EVENT_CODE] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2010sc |
Request format:
https://www.thebluealliance.com/api/v2/event/<event key>/awards
| Key | Description | Examples |
|---|---|---|
| event key | TBA event key with the format yyyy[EVENT_CODE] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2010sc |
Request format:
https://www.thebluealliance.com/api/v2/event/<event key>/district_points
| Key | Description | Examples |
|---|---|---|
| event key | TBA event key with the format yyyy[EVENT_CODE] ,
where yyyy is the year, and EVENT_CODE is the
event code
of the event. |
2010sc |
Request format:
https://www.thebluealliance.com/api/v2/match/<match_key>
| Key | Description | Examples |
|---|---|---|
| match_key | Key for the match you want to request data for | 2014cmp_f1m1 |
Request format:
https://www.thebluealliance.com/api/v2/districts/<year>
| Key | Description | Examples |
|---|---|---|
| Year | The year you want data for | 2014 |
Request format:
https://www.thebluealliance.com/api/v2/district/<district short>/<year>/events
| Key | Description | Examples |
|---|---|---|
| district short | The district abbreviation you want data for, as defined here | ne |
| Year | The year you want data for | 2014 |
Request format:
https://www.thebluealliance.com/api/v2/district/<district short>/<year>/rankings
| Key | Description | Examples |
|---|---|---|
| district short | The district abbreviation you want data for, as defined here | ne |
| Year | The year you want data for | 2014 |
Request format:
https://www.thebluealliance.com/api/v2/district/<district short>/<year>/teams
| Key | Description | Examples |
|---|---|---|
| district short | The district abbreviation you want data for, as defined here | ne |
| Year | The year you want data for | 2014 |
These libraries have been created by our community to help you use our API in your next project.
Note that these libraries are not created by The Blue Alliance. Please contact the respective developers for support.
| Language | Repository |
|---|---|
| C# | TheBlueAlliance_API |
| Java | tba-apiv2-java |
| Java | TheBlueAlliance |
| Java | java-blue-alliance-api |
| Java | TheBlueAllianceJavaAPI |
| Java | TBA-API |
| Javascript | thebluealliance-javascript |
| Node.js | node-thebluealliance |
| Node.js | tba-api-node |
| Node.js | thebluealliance-nodewrapper |
| Node.js | the-node-alliance |
| Python | The-Blue-Alliance-Python-API |
| Python | tbapy |
| Python | TBApi |
| Ruby | thebluealliance-ruby |
| Ruby | tba.rb |
| Crystal | TheBlueAlliance |
| Go | tbago |
| Objective-C | TBAKit |
| Objective-C | TheBlueAlliance_API |
| PHP | thebluealliance-phpwrapper |
Made a library that you want to be included? Let us know!


URL to server
default:
presence.pythonanywhere.com
Team name:
Team password:
Your name:
Reset and Re-login
palsch
MIT License
Copyright (c) 2016 palsch
Built on [Electron](http://electron.atom.io).
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


HELPING HANDS UNITE
Saving the world one project at a time!
Start Bootstrap
Home
About
Services
Portfolio
Contact
Find it | Fill it | Send it!
Our Services
Clean Ups
Donations
Animal Shelters
Children's Aid
Our Partners
Volunteer Search
Volunteer Search
Location
Distance
Submit
Volunteer Registration
First name
*
Last name
*
Email
Phone
What can you help with?
Delivering Flyers
Taking Phone Calls
Entering Data
Public Relations
Door-to-Door
Clerical Work
Why do you want to join our campaign?
Sign me up to supporter email list
submit


Hi investors, Dean (@deanliu) and Dan (@tradealert) are back and today we’re talking about what is arguably the best under-hyped privacy project in the crypto space: Zcash.
I- In a Nutshell.
Zcash (ZEC) is:
“the first open, permission-less [financial network] (1) that can fully protect the privacy of transactions using zero-knowledge cryptography (2)“.
1. An Open Financial Network.
Just like Bitcoin, ZEC is a POW open-source protocol that can be used, mined and built on top of by anybody around the world. ZEC coins are scarce (21 million coins in total) and there is currently 3,518,731 of them in circulation for a total market-cap of $859,355,102 USD at the time of writing.
2. A Private Financial Network.
Unlike Bitcoin, ZEC is private which mean that transactions on the ZEC network can be verified by miners and committed to the blockchain “without requiring users to reveal any details about their identities, the transaction value or any other metadata“.
Privacy is made possible through a cutting-edge cryptographic technique know as zk-SNARKs implemented on the block-chain by what is arguably one of the best team of cryptographers in the world.
Basically, zk-SNARKs allow for 4 types of transactions to take place on the network:
But why is privacy of transactions so important?
Being able to privately transact and maintain balances is important because it allows ZEC to be a fully fungible cryptocurrency.
Fungibility is an essential characteristic for assets assuming financial functions. In Bitcoin for example, addresses can be easily blacklisted and funds tracked along the block-chain, effectively freezing those funds and possibly compromising the identity of its owner. ZEC coins however do not have an history on the blockchain (unless its user decide it) and so can be used just like fiat money without being at risk of being tracked or blacklisted by regulators.
This visionary focus on privacy is where ZEC’s main value proposition as an investment lies.
II- Investment opportunity.
Privacy is not just an abstract fundamental human right. Privacy is in growing need for businesses and financial institutions..
To put it differently: privacy is a business opportunity.
This opportunity has already prompted JP Morgan Chase to partner with Zcash as early as March 2017 in order to integrate zn-SNARKs technology into their own Ethereum-based private ledger (Quorum). JP Chase was quickly followed by the Ethereum Foundation which announced around the same time its plan to integrate zk-SNARKs technology into their blockchain.
But privacy is also an opportunity for retail investors.
A Swiss Bank Account in Your Pocket.
In November 9, 2017 Grayscale Investments LLC announced the launch of its third investment vehicle, the Zcash Investment Trust Fund which was accompanied by a very comprehensive investment thesis.
In this thesis, Grayscale argues that ZEC will be sold to investors as a private, decentralized alternative to private Swiss bank accounts to hedge off-shore investments. In the thesis (which we recommend you read) Grayscale goes into great details to explain the advantages ZEC possess over traditional off-shore solutions and how the value of the coins could accrue in case this strategy proved successful.
Although these price projections should be taken with a grain of salt, they make a compelling case for the investment opportunity Zcash represents.
To add to this “Swiss bank account in your pocket” narrative, the Zero-Coin Electric company (the company behind Zcash) also announced in January 2018 the coming release of its Sapling upgrade which will allow for dramatic performance improvements on the network and the possibility to send shielded transactions from a mobile phone.
Finally,beside its strong fundamentals, ZEC also looks like a great trade setup:
- One ZEC is currently trading at around $240 USD, which is only x8 from its all-time-low value ($30 USD) and 3,5 times lower than its all-time-high value ($849 USD);
- ZEC has almost entirely retraced against BTC and has hit an accumulation phase which is generally the best time to buy into a trade (or an investment for that matter.
However, there are some risks associated with investing in Zcash.
III- Risks.
First of all Zcash, is not the only cryptographic privacy coin and has to put up with strong competition from projects like Monero, PIVX or ZenCash.
Second of all, Zcash’s price is slave to Bitcoin’s which is in a full-blown bear market so it’s very probable that Zcash would lose quite a bit of its dollar value in case Bitcoin decided to drop further.
With this in mind, it is definitely up to you dear readers to decide if the opportunity justifies the risk.
What do you think of Zcash as an investment?
_If you liked this post please consider visiting @tradealert’s blog or joining their awesome community on Discord [here](https://discord.gg/4VGVHrs) Don’t be shy, it’s free!!_
Also, make sure to go check out our last feature on the Celsius Wallet.
Cheers,
Dan & Dean.
This page is synchronized from the post: ‘ZCash - An Open, Private Financial System.’


Home
Resume
Contact
CONTACT INFO.
E-MAIL:
alfredoesquivel1989
@gmail.com
Phone:
(708)573-2599
Let's work together...
GitHub
Linkedin


Maintenance Report Page
Generate Report
Transaction ID:
Content to be written in PDF can be placed in this DIV!


Pacific Motorway crash: Multi-vehicle crash causing delays inbound
A multi-vehicle crash on the Pacific Motorway is causing significant delays for inbound traffic.
The incident involving four vehicles occurred on the Pacific Motorway northbound at Slacks Creek about 7.15am.
Paramedics are on the scene and delays are expected to continue.
Earlier, Brisbane commuters faced very slow start to the day after a multi-vehicle crash on Gympie Arterial Road at Carseldine blocked two lanes of traffic.
The crash occurred about 5.20am in the inbound lanes just before the intersection with Beams Road, but it has since been cleared.
Delays for inbound vehicles stretched back past to the Gateway Motorway turn-off at one stage, but while the crash has been cleared, some residual delays remain.


WITNESS LIST
Economic & Small Business Development Committee
January 26, 2012 - 10:00 AM
Interim Charge #5 - Industry Clusters
On:
Armbrister, Ken (OOG)
Baum, Walt (AECT)
Burke, Michael (Texans For the Arts)
Coe, Carlos (Xtreme Power)
DeBerry, Drew (Texas Department of Agriculture)
Dudensing, Rebekka (Texas AgriLife Extension Service)
Howard, John (DELL, Inc.)
Kowalski, Tom (Texas Healthcare and Bioscience Institute (THBI))
LeBas, James (Texas Oil & Gas Association)
Owens, Brian (OOG)
Pauken, Tom (Texas Workforce Commission)
Powers, Pike (Texas Foundation For Innovative Communities)
Ridge, Doug (Texas Workforce Commission)
Rivero, Hector (Texas Chemical Council)
Shannon, Fred (Texas Association of Manufacturers)
Teel, David (Texas Travel Industry Association)
1


API Level: No WebGL support, GLES 3.2, and OpenGL 4.3
Devices commonly used on: All modern devices as of 2016
This is the best texture format available for native games/apps. Most modern gpus and phones support
this format. Currently there are no official plans from Khronos group to make it part of any future
WebGL specifications.
File name example (6x6 is the block size): myimage.6x6.astc
Options:
All options are currently disabled, but the default automatic settings will still work.
No mip-maps
Resize to power of 2
Resize to be square
Premultiply transparency
In photoshop this is the equivalent making a group with the transparency as a mask and putting the
main layer in the group, along with a black layer at the bottom of the group.


Chen wins Internationaux de France on tough day for Uno
by The Associated PressGRENOBLE, France (AP) — Nathan Chen has secured qualification for the figure skating Grand Prix finals with victory at the Internationaux de France.
The world champion made errors landing three of his four quadruple jumps in Saturday’s free skate but still had a total of 297.16 points. That was more than enough for the American to claim his eighth consecutive win in Grand Prix events.
Russian Alexander Samarin took second, a full 32 points behind Chen on 265.10, and France’s Kevin Aymoz claimed his first Grand Prix medal with bronze on 254.64.
Olympic silver medalist Shoma Uno finished eighth after falling five times in his two skates. It was his worst placing in senior international competition.
The Japanese skater was thoroughly out of sorts Saturday, landing just two of his seven jumps and combinations cleanly.
___
More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports
The Associated Press


The Angular CDK provides code for creating component test harnesses. A component harness is a class that lets a test interact with a component via a supported API. Each harness's API interacts with a component the same way a user would. By using the harness API, a test insulates itself against updates to the internals of a component, such as changing its DOM structure. The idea for component harnesses comes from the PageObject pattern commonly used for integration testing.
Angular Material offers test harnesses for many of its components. The Angular team strongly encourages developers to use these harnesses for testing to avoid creating brittle tests that rely on a component's internals.
This guide discusses the advantages of using component test harnesses and shows how to use them.
There are two primary benefits to using the Angular Material component harnesses in your tests:
The following sections will illustrate these benefits in more detail.
The Angular CDK's component harnesses are designed to work in multiple different test environments.
Support currently includes Angular's Testbed environment in Karma unit tests and Selenium WebDriver
end-to-end (e2e) tests. You can also support additional environments by creating custom extensions
of the CDK's HarnessEnvironment
and TestElement
classes.
The foundation for all test harnesses lives in @angular/cdk/testing
. Start by importing either
TestbedHarnessEnvironment
or SeleniumWebDriverHarnessEnvironment
based on whether you're writing a
unit test or an e2e test. From the HarnessEnvironment
, you can get a HarnessLoader
instance,
which you will use to load Angular Material component harnesses. For example, if we're writing unit
tests for a UserProfile
component, the code might look like this:
import {HarnessLoader} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
let loader: HarnessLoader;
describe('my-component', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({imports: [MyModule], declarations: [UserProfile]})
.compileComponents();
fixture = TestBed.createComponent(UserProfile);
loader = TestbedHarnessEnvironment.loader(fixture);
});
}
This code creates a fixture for UserProfile
and then creates a HarnessLoader
for that fixture.
The HarnessLoader
can then locate Angular Material components inside UserProfile
and create
harnesses for them. Note that HarnessLoader
and TestbedHarnessEnvironment
are loaded from
different paths.
@angular/cdk/testing
contains symbols that are shared regardless of the environment your tests
are in. @angular/cdk/testing/testbed
contains symbols that are used only in Karma tests.@angular/cdk/testing/selenium-webdriver
(not shown above) contains symbols that are used only in
Selenium WebDriver tests.The HarnessLoader
provides two methods that can be used to load harnesses, getHarness
and
getAllHarnesses
. The getHarness
method gets a harness for the first instance
of the matching component, while getAllHarnesses
gets a list of harnesses, one
for each instance of the corresponding component. For example, suppose UserProfile
contains three
MatButton
instances. We could load harnesses for them as follows:
import {MatButtonHarness} from '@angular/material/button/testing';
...
it('should work', async () => {
const buttons = await loader.getAllHarnesses(MatButtonHarness); // length: 3
const firstButton = await loader.getHarness(MatButtonHarness); // === buttons[0]
});
Notice the example code uses async
and await
syntax. All component harness APIs are
asynchronous and return Promise
objects. Because of this, the Angular team recommends using the
ES2017 async
/await
syntax
with your tests.
The example above retrieves all button harnesses and uses an array index to get the harness for a
specific button. However, if the number or order of buttons changes, this test will break. You can
write a less brittle test by instead asking for only a subset of harnesses inside UserProfile
.
You can load harnesses for a sub-section of the DOM within UserProfile
with the getChildLoader
method on HarnessLoader
. For example, say that we know UserProfile
has a div,

, and we want the button inside that specific

. We can accomplish this
with the following code:
it('should work', async () => {
const footerLoader = await loader.getChildLoader('.footer');
const footerButton = await footerLoader.getHarness(MatButtonHarness);
});
You can also use the static with
method implemented on all Angular Material component harnesses.
This method creates a HarnessPredicate
, an object that filters loaded harnesses based on the
provided constraints. The particular constraint options vary depending on the harness class, but all
harnesses support at least:
selector
- CSS selector that the component must match (in addition to its host selector, such
as [mat-button]
)ancestor
- CSS selector for a some ancestor element above the component in the DOMIn addition to these standard options, MatButtonHarness
also supports
text
- String text or regular expressions that matches the text content of the button Using this method we could locate buttons as follows in our test:
it('should work', async () => {
// Harness for mat-button whose id is 'more-info'.
const info = await loader.getHarness(MatButtonHarness.with({selector: '#more-info'}));
// Harness for mat-button whose text is 'Cancel'.
const cancel = await loader.getHarness(MatButtonHarness.with({text: 'Cancel'}));
// Harness for mat-button with class 'confirm' and whose text is either 'Ok' or 'Okay'.
const okButton = await loader.getHarness(
MatButtonHarness.with({selector: '.confirm', text: /^(Ok|Okay)$/}));
});
The Angular Material component harnesses generally expose methods to either perform actions that a
real user could perform or to inspect component state that a real user might perceive. For
example, MatButtonHarness
has methods to click, focus, and blur the mat-button
, as well as
methods to get the text of the button and its disabled state. Because MatButton
is a very simple
component, these harness methods might not seem very different from working directly with the DOM.
However, more complex harnesses like MatSelectHarness
have methods like open
and isOpen
which
capture more knowledge about the component's internals.
A test using the MatButtonHarness
to interact with a mat-button
might look like the following:
it('should mark confirmed when ok button clicked', async () => {
const okButton = await loader.getHarness(MatButtonHarness.with({selector: '.confirm'});
expect(fixture.componentInstance.confirmed).toBe(false);
expect(await okButton.isDisabled()).toBe(false);
await okButton.click();
expect(fixture.componentInstance.confirmed).toBe(true);
});
Note that the code above does not call fixture.detectChanges()
, something you commonly see in
unit tests. The CDK's component harnesses automatically invoke change detection after performing
actions and before reading state. The harness also automatically waits for the fixture to be stable,
which will cause the test to wait for setTimeout
, Promise
, etc.
Consider an <issue-report-selector>
component that you want to test. It allows a user to
choose an issue type and display the necessary form create report for that issue type. You need a
test to verify that when the user chooses an issue type the proper report displays. First consider
what the test might look like without using component harnesses:
describe('issue-report-selector', () => {
let fixture: ComponentFixture<IssueReportSelector>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [IssueReportSelectorModule],
declarations: [IssueReportSelector],
}).compileComponents();
fixture = TestBed.createComponent(IssueReportSelector);
fixture.detectChanges();
});
it('should switch to bug report template', async () => {
expect(fixture.debugElement.query('bug-report-form')).toBeNull();
const selectTrigger = fixture.debugElement.query(By.css('.mat-select-trigger'));
selectTrigger.triggerEventHandler('click', {});
fixture.detectChanges();
await fixture.whenStable();
const options = document.querySelectorAll('.mat-select-panel mat-option');
options[1].click(); // Click the second option, "Bug".
fixture.detectChanges();
await fixture.whenStable();
expect(fixture.debugElement.query('bug-report-form')).not.toBeNull();
});
});
The same test, using the Angular Material component harnesses might look like the following:
describe('issue-report-selector', () => {
let fixture: ComponentFixture<IssueReportSelector>;
let loader: HarnessLoader;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [IssueReportSelectorModule],
declarations: [IssueReportSelector],
}).compileComponents();
fixture = TestBed.createComponent(IssueReportSelector);
fixture.detectChanges();
loader = TestbedHarnessEnvironment.loader(fixture);
});
it('should switch to bug report template', async () => {
expect(fixture.debugElement.query('bug-report-form')).toBeNull();
const select = await loader.getHarness(MatSelectHarness);
await select.open();
const bugOption = await select.getOption({text: 'Bug'});
await bugOption.click();
expect(fixture.debugElement.query('bug-report-form')).not.toBeNull();
});
});
The code above shows that adopting the harnesses in tests can make them easier to understand.
Specifically in this example, it makes the "open the mat-select" logic more obvious. An unfamiliar
reader may not know what clicking on .mat-select-trigger
does, but await select.open()
is
self-explanatory.
The harnesses also make clear which option should be selected. Without the harness, you need a comment that
explains what options[1]
means. With MatSelectHarness
, however, the filter API makes the code
self-documenting.
Finally, the repeated calls to detectChanges
and whenStable()
can obfuscate the underlying
intent of the test. By using the harness APIs, you eliminate these calls, making the test more
concise.
Notice that the test without harnesses directly uses CSS selectors to query elements within
<mat-select>
, such as .mat-select-trigger
. If the internal DOM of <mat-select>
changes, these
queries may stop working. While the Angular team tries to minimize this type of change, some
features and bug fixes ultimately require restructuring the DOM. By using the Angular Material
harnesses, you avoid depending on internal DOM structure directly.
In addition to DOM structure, component asynchronicity often offers a challenge when updating
components. If a component changes between synchronous and asynchronous, downstream unit tests may
break due to expectations around timing. Tests then require the addition or removal of some
arcane combination of whenStable
, flushMicroTasks
, tick
, or detectChanges
. Component
harnesses, however, avoid this problem by normalizing the asynchronicity of all component behaviors
with all asynchronous APIs. When a test uses these harnesses, changes to asynchronicity become
far more manageable.
Both DOM structure and asynchronicity are implementation details of Angular Material's components. When tests depend on the implementation details, they become a common source of failures due to library changes. Angular CDK's test harnesses makes component library updates easier for both application authors and the Angular team, as the Angular team only has to update the harness once for everyone.


Home
Meet
Our Team
Koushika Umesh
Chair-Person
Nethmi Mohotti
Secretary
Jeeona Heltica
Treasurer
Nipun Chamika
Public Relations
Ratheshan Sathiyamoorthy
Event in Charge
Malitha Randeniya
Volunteer in Charge
Sandun De Silva
IT Director


Journal Information
Journal ID (publisher-id): AIPA
Journal ID (sage): AIP
Title: AADE in Practice
ISSN (print): 2325-1603
ISSN (electronic): 2325-1611
Publisher: SAGE Publications (Sage CA: Los Angeles, CA)
Early last summer, we, the staff of a pediatric endocrinology clinic, found ourselves earning extra steps on our pedometer apps by walking more frequently to the Pediatric Intensive Care Unit (PICU) from our Pediatric Endocrinology Clinic. We noticed an increase in these trips to see our pediatric patients with type 1 diabetes (T1D) admitted for diabetic ketoacidosis (DKA), defined as the presence of ketones in blood or urine and serum bicarbonate less than or equal to 15 mmol/L or pH less than 7.3.
At first the increase was subtle, and each individual case was managed with extra family education and a short stay. However, when we started compiling the PICU admission data, we realized several families were sharing the same reason for the tumble into DKA. It sounded something like this: “I guess the pump wasn’t working and we didn’t realize he/she was getting sick.”
From January 2011 to June 2015, about 30% (n = 35) of our DKA admissions were caused by insulin pump malfunction or lack of action by patients and families in response to signs of interrupted insulin delivery.
As providers and educators, we wanted to optimize DKA prevention for our patients and help minimize the need for costly comorbidity treatment with the potential for significant morbidity and mortality. An outpatient chart review showed provider-patient education on safe pumping practices was given and documented. However, the patient/family perceived a lack of knowledge about a pump back-up plan (as stated during the admission).
We asked patients what led up to their admission—how did it all start? Usually the patient responded that he or she noticed a rise in blood glucose (BG) and used the insulin pump correction factor bolus with no success. Here are the common steps on the journey to DKA:
Step 1: BG is above 300 mg/dL. Use the pump to give a correction factor bolus.
Step 2: Don’t recheck the BG . . . or check and see a high BG and give another correction.
Step 3: Don’t check ketones. Don’t do a site change.
Step 4: Think it’s a flu bug causing stomachache and vomiting. Go back to bed.
Step 5: Can’t keep fluids down and get dehydrated.
Step 6: Don’t call the clinic for advice.
Step 7: Hopefully, go to the Emergency Room for care and admission to PICU.
As a result of these observations, a quality improvement project was born. We learned that most of our DKA admissions were related to new onset diabetes. These were patients we had not yet met, and we likely had little chance of preventing PICU admissions in these patients. However, 30% of our DKA admissions occurred in patients known to us, receiving insulin via insulin pump, and not correctly recognizing interruptions in insulin delivery and/or not taking appropriate actions to address the interruptions.
Knowing that DKA due to insulin pump malfunction can be prevented, the increasing expense of inpatient ICU care, and the risks to the child, our staff moved forward. The team included a certified diabetes educator (CDE), pediatric endocrinologists, pediatric endocrinology fellows, and nursing support staff.
A literature review did not identify any existing educational intervention data, but several articles pointed out this problem and suggested the need for intervention (see reference list). According to research led by Tieder, a cost analysis of inpatient admissions varied widely. Using mean data from multiple organizations, it was reasoned that if PICU admission days decreased, the cost avoidance could be over $3074 per admission. Also, eliminating additional follow-on costs in non-PICU rooms might add cost savings of over $2500 per admission.
Eliminating additional follow-on costs in non-PICU rooms might add cost savings of over $2500 per admission.
The project started with pediatric patients 2 to 23 years of age in the outpatient clinic. All patients had T1D diagnosed at least 6 months prior to starting on the pump. After reviewing Bolderman’s book on insulin pumps, we developed a written back-up plan to provide instructions on monitoring for signs of impending DKA, giving insulin by injection at specific doses, and trouble-shooting the pump (Figure 1).
The intervention included a pretest that analyzed the knowledge base of insulin pump patients or parents/guardians, an intervention in the form of the written insulin pump back-up plan, and a posttest at a follow-up visit (Figure 2). Individualized counseling was provided with the written plan, and it was documented in the medical record.
These standardized steps were followed when teaching DKA prevention.
Step 1: Write it down. Prepare an insulin pump back-up plan when well. Take a smartphone picture of the plan to use anywhere.
Step 2: If BG is >300 mg/dL, check urine or blood ketones.
Step 3: Use correction factor, drink water, set alarm to recheck BG in 1 to 2 hours. Follow the written plan.
Step 4: If highs continue, have any symptoms, or positive ketones, then dose insulin with a needle (pen or syringe) and change the pump site.
Step 5: Report findings from Steps 2 through 4. Keep communicating with the health care team. Repeat.
After implementing written insulin pump back-up plans in June 2015, a decrease in inpatient admissions and an increase in the knowledge of DKA prevention was observed. Admission data show only 1 DKA admission related to pump use since the project implementation. This patient, however, had not received the intervention. Including the nonintervention admission, there was a 75% reduction in admissions for pump-related DKA.
A total of 42 pretests and 30 posttests were completed and analyzed during the 6-month data gathering timeframe. Patients recalling having an insulin pump back-up plan increased from 43% to 90% at the follow-up visit (P = .001), and correctly listing the proper back-up long-acting insulin dosage increased from 37% to 70% (P = .008) (Figure 3).
As part of the quality improvement project, ongoing suggestions and feedback were utilized to evaluate the outcomes. Patient and professional feedback of the insulin pump back-up plan has been positive. Families are glad for the defined action plan. The health care system is taking note of the quality and financial benefits. Cost avoidance as compared to the previous 6 months would be estimated at $12 296 based on 4 fewer admissions to the PICU (not including non-PICU bed days).
While the staff may not be accumulating so many steps on pedometer apps now, they are pleased with the ability to catch knowledge deficits and prevent admissions. After successful use of a written plan and educational intervention as a quality improvement project, the information and tools will be shared in hopes of improving the outcomes of all T1D children. n


Frontend Web Dev, UX/UI Design, Project Management, FLOSS Advocacy, Community Organizing, Writing and Editing, and Film Production
Expert in HTML5, CSS3 (Less, Sass), Mapbox and LeafletJS, Adobe CC Creative Suite, LAMP deployment, AngularJS, BackboneJS, and D3JS
Proficient in Unity3D, C#, Python, NodeJS, ReactJS, Maya, and R
Postgraduate
Strelka Institute for Media, Architecture, and Design, Moscow, RU.
Bachelor of Liberal Arts
Sarah Lawrence College, Bronxville, NY.
Presentation, The New Normal Showcase, Strelka Institute for Media, Architecture, and Design, Moscow, RU, July 4.
Group Exhibition, The New Observatory, FACT Liverpool, Liverpool, UK.
Interview, The Blockchain: Change Everything Forever, Furtherfield and Digital Catapult, London, UK, October 27.
Workshop, Sweet Talk: The Achatic Rites, Near Now, Nottingham, UK, October 1.
Panel, Market Uncertainty, Transmediale, Berlin, DE, February 3.
Residency, Collision, Southbank Centre, London, UK.
Workshop, Second Foundation at The Goethe Institute, Goethe Institut, London, UK, October 27 (in collaboration with Claire Tolan).
Workshop, Memory Palace, Space Caviar's RAM House at Villa Croce Museum of Contemporary Art, Genova, IT, July 30.
Workshop, The Long Progress Bar, Lighthouse Arts, Brighton, UK, September 4.
Presentation, The Long Progress Bar, Lighthouse Arts, Brighton, UK, September 3.
Group Exhibition, Staying with the Trouble, The White Building Centre for Art and Technology, London, UK, June 26.
Workshop, District Kunst Gallery, Berlin, DE, April 17 (in collaboration with unMonastery co-resident).
Residency, The White Building Centre for Art and Technology, Space Studios, London, UK.
Co-Coordinator, Global unMonastery Summit, Transmediale, Berlin, DE, January 18-February 3.
Presentation, Spatialities of Co-Creation, Royal Geographical Society Annual International Conference, London, UK, 27 August.
Coordination/ Workshops, OpenTechSchool Matera, Matera, IT, March-July.
Presentation, NEXT Matera, Matera, Italy, April 13 (in collaboration with unMonastery co-residents).
Group Performance, TRANSVALUE, Fitness Gallery, Brooklyn, NY.
Group Exhibition, Anexact Geometries, AMO Studios, Brooklyn, NY.
Freelance Frontend Developer, Libre Space Foundation, Athens, GR.
Freelance Web Developer, Serpentine Galleries, London, UK.
Web Developer, TransforMap, Berlin, DE.
Membership Manager, SculptureCenter, Queens, NY.
Editorial Fellow, Rhizome, New York, NY, September-December.
Archives Intern, Marina Abramovic, New York, NY, September-December.
Education and Visitor Services Assistant, MoMA PS1, Queens, NY.
Research Assistant, Media Studies and Computer Science, Sarah Lawrence College, Bronxville, NY.
Creative Services Intern, TIME Inc., New York, NY, June-September 2011.


What do the terms 'internationalization' and 'localization' mean, and how are they related?
Everyone has their own preferred definitions for these terms. We provide some general, high-level descriptions here of how we tend to use these terms on the W3C Internationalization site.
Localization refers to the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (a locale).
Localization is sometimes written in English as l10n, where 10 is the number of letters in the English word between l and n.
Often thought of only as a synonym for translation of the user interface and documentation, localization is often a substantially more complex issue. It can entail customization related to:
Localization may even necessitate a comprehensive rethinking of logic, visual design, or presentation if the way of doing business (eg., accounting) or the accepted paradigm for learning (eg., focus on individual vs. group) in a given locale differs substantially from the originating culture.
Definitions of internationalization vary. This is a high-level working definition for use with W3C Internationalization Activity material. Some people use other terms, such as globalization to refer to the same concept.
Internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.
Internationalization is often written in English as i18n, where 18 is the number of letters between i and n in the English word.
Internationalization typically entails:
Notice that these items do not necessarily include the localization of the content, application, or product into another language; they are design and development practices which allow such a migration to take place easily in the future but which may have significant utility even if no localization ever takes place.
Internationalization significantly affects the ease of the product's localization. Retrofitting a linguistically- and culturally-centered deliverable for a global market is obviously much more difficult and time-consuming than designing a deliverable with the intent of presenting it globally. (Think back to the Y2K effort and trying to "undo" two-character year fields that were built on the assumption of "19xx").
So ideally, internationalization occurs as a fundamental step in the design and development process, rather than as an afterthought that can often involve awkward and expensive re-engineering.


The products of this website are from these restaurants
McDonald's is an American fast food company, founded in 1940 as a restaurant operated by Richard and Maurice McDonald, in San Bernardino, California, United States. They rechristened their business as a hamburger stand. The first time a McDonald's franchise used the Golden Arches logo was in 1953 at a location in Phoenix, Arizona. In 1955, Ray Kroc, a businessman, joined the company as a franchise agent and proceeded to purchase the chain from the McDonald brothers. McDonald's had its original headquarters in Oak Brook, Illinois, but has approved plans to move its global headquarters to Chicago by 2018.
Seasons bakery is one of the largest and most successful bakeries in Myanmar, with 17 stores located across the country. Seasons bistro, which is the latest labeled store opened offers varieties of bread, cakes and drinks having a very high quality.
Subway is a privately held American fast food restaurant franchise that primarily purveys submarine sandwiches (subs) and salads. Subway is one of the fastest-growing franchises in the world and, as of June 2017, has approximately 45,000 stores located in more than 100 countries. More than half of the stores are located in the United States. It is the largest single-brand restaurant chain and the largest restaurant operator in the world.
Arby's is the second-largest quick-service fast-food sandwich restaurant chain in America in terms of units with
more than 3,300 restaurants system wide and third in terms of revenue. In October 2017, Food & Wine called
Arby's "America's second largest sandwich chain (after Subway)".
Arby's is owned by Inspire Brands, the renamed Arby's Restaurant Group, Inc.(ARG). ARG was renamed as the company
took over ownership of Buffalo Wild Wings on February 5, 2018.
Burger King (BK) is an American global chain of hamburger fast food restaurants.
Headquartered in the unincorporated area of Miami-Dade County, Florida, the company was founded in 1953 as Insta-Burger King,
a Jacksonville, Florida-based restaurant chain. After Insta-Burger King ran into financial difficulties in 1954,
its two Miami-based franchisees David Edgerton and James McLamore purchased the company and renamed it "Burger King".
Over the next half-century, the company would change hands four times, with its third set of owners, a partnership of TPG Capital,
Bain Capital, and Goldman Sachs Capital Partners, taking it public in 2002. In late 2010, 3G Capital of Brazil acquired a majority stake in the company,
in a deal valued at US$3.26 billion. The new owners promptly initiated a restructuring of the company to reverse its fortunes.