| Module | ActionView::Helpers::FormHelper |
| In: |
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb
|
Form helpers are designed to make working with resources much easier compared to using vanilla HTML.
Forms for models are created with form_for. That method yields a form builder that knows the model the form is about. The form builder is thus able to generate default values for input fields that correspond to model attributes, and also convenient names, IDs, endpoints, etc.
Conventions in the generated field names allow controllers to receive form data nicely structured in params with no effort on your side.
For example, to create a new person you typically set up a new instance of Person in the PeopleController#new action, @person, and pass it to form_for:
<%= form_for @person do |f| %> <%= f.label :first_name %>: <%= f.text_field :first_name %>
 <%= f.label :last_name %>: <%= f.text_field :last_name %>
 <%= f.submit %> <% end %>
The HTML generated for this would be (modulus formatting):
<form action="/people" class="new_person" id="new_person" method="post">
 <input name="authenticity_token" type="hidden" value="NrOp5bsjoLRuK8IW5+dQEYjKGUJDe7TQoZVvq95Wteg=" />
 First name: <input id="person_first_name" name="person[first_name]" size="30" type="text" />
 Last name: <input id="person_last_name" name="person[last_name]" size="30" type="text" />
 <input id="person_submit" name="commit" type="submit" value="Create Person" /> </form>
As you see, the HTML reflects knowledge about the resource in several spots, like the path the form should be submitted to, or the names of the input fields.
In particular, thanks to the conventions followed in the generated field names, the controller gets a nested hash params[:person] with the person attributes set in the form. That hash is ready to be passed to Person.create:
if @person = Person.create(params[:person]) # success else # error handling end
Interestingly, the exact same view code in the previous example can be used to edit a person. If @person is an existing record with name "John Smith" and ID 256, the code above as is would yield instead:
<form action="/people/256" class="edit_person" id="edit_person_256" method="post">
 <input name="_method" type="hidden" value="put" /> <input name="authenticity_token" type="hidden" value="NrOp5bsjoLRuK8IW5+dQEYjKGUJDe7TQoZVvq95Wteg=" />
 First name: <input id="person_first_name" name="person[first_name]" size="30" type="text" value="John" />
 Last name: <input id="person_last_name" name="person[last_name]" size="30" type="text" value="Smith" />
 <input id="person_submit" name="commit" type="submit" value="Update Person" /> </form>
Note that the endpoint, default values, and submit button label are tailored for @person. That works that way because the involved helpers know whether the resource is a new record or not, and generate HTML accordingly.
The controller would receive the form data again in params[:person], ready to be passed to Person#update_attributes:
if @person.update_attributes(params[:person]) # success else # error handling end
That‘s how you tipically work with resources.
Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object).  It‘s intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a hash with options. The checked_value defaults to 1 while the default unchecked_value is set to 0 which is convenient for boolean values.
The HTML specification says unchecked check boxes are not successful, and thus web browsers do not send them. Unfortunately this introduces a gotcha: if an Invoice model has a paid flag, and in the form that edits a paid invoice the user unchecks its check box, no paid parameter is sent. So, any mass-assignment idiom like
@invoice.update_attributes(params[:invoice])
wouldn‘t update the flag.
To prevent this the helper generates an auxiliary hidden field before the very check box. The hidden field has the same name and its attributes mimick an unchecked check box.
This way, the client either sends only the hidden field (representing the check box is unchecked), or both fields. Since the HTML specification says key/value pairs have to be sent in the same order they appear in the form, and parameters extraction gets the last occurrence of any repeated key in the query string, that works for ordinary forms.
Unfortunately that workaround does not work when the check box goes within an array-like parameter, as in
<%= fields_for "project[invoice_attributes][]", invoice, :index => nil do |form| %> <%= form.check_box :paid %> ... <% end %>
because parameter name repetition is precisely what Rails seeks to distinguish the elements of the array. For each item with a checked check box you get an extra ghost item with only that attribute, assigned to "0".
In that case it is preferable to either use check_box_tag or to use hashes instead of arrays.
# Let's say that @post.validated? is 1: check_box("post", "validated") # => <input name="post[validated]" type="hidden" value="0" /> # <input type="checkbox" id="post_validated" name="post[validated]" value="1" /> # Let's say that @puppy.gooddog is "no": check_box("puppy", "gooddog", {}, "yes", "no") # => <input name="puppy[gooddog]" type="hidden" value="no" /> # <input type="checkbox" id="puppy_gooddog" name="puppy[gooddog]" value="yes" /> check_box("eula", "accepted", { :class => 'eula_check' }, "yes", "no") # => <input name="eula[accepted]" type="hidden" value="no" /> # <input type="checkbox" class="eula_check" id="eula_accepted" name="eula[accepted]" value="yes" />
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 758 758: def check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0") 759: InstanceTag.new(object_name, method, self, options.delete(:object)).to_check_box_tag(options, checked_value, unchecked_value) 760: end
Returns a text_field of type "email".
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 814 814: def email_field(object_name, method, options = {}) 815: InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("email", options) 816: end
Creates a scope around a specific model object like form_for, but doesn‘t create the form tags themselves. This makes fields_for suitable for specifying additional model objects in the same form.
<%= form_for @person do |person_form| %> First name: <%= person_form.text_field :first_name %> Last name : <%= person_form.text_field :last_name %> <%= fields_for @person.permission do |permission_fields| %> Admin? : <%= permission_fields.check_box :admin %> <% end %> <% end %>
…or if you have an object that needs to be represented as a different parameter, like a Client that acts as a Person:
<%= fields_for :person, @client do |permission_fields| %> Admin?: <%= permission_fields.check_box :admin %> <% end %>
…or if you don‘t have an object, just a name of the parameter:
<%= fields_for :person do |permission_fields| %> Admin?: <%= permission_fields.check_box :admin %> <% end %>
Note: This also works for the methods in FormOptionHelper and DateHelper that are designed to work with an object as base, like FormOptionHelper#collection_select and DateHelper#datetime_select.
When the object belonging to the current scope has a nested attribute writer for a certain attribute, fields_for will yield a new scope for that attribute. This allows you to create forms that set or change the attributes of a parent object and its associations in one go.
Nested attribute writers are normal setter methods named after an association. The most common way of defining these writers is either with accepts_nested_attributes_for in a model definition or by defining a method with the proper name. For example: the attribute writer for the association :address is called address_attributes=.
Whether a one-to-one or one-to-many style form builder will be yielded depends on whether the normal reader method returns a single object or an array of objects.
Consider a Person class which returns a single Address from the address reader method and responds to the address_attributes= writer method:
class Person def address @address end def address_attributes=(attributes) # Process the attributes hash end end
This model can now be used with a nested fields_for, like so:
<%= form_for @person do |person_form| %> ... <%= person_form.fields_for :address do |address_fields| %> Street : <%= address_fields.text_field :street %> Zip code: <%= address_fields.text_field :zip_code %> <% end %> <% end %>
When address is already an association on a Person you can use accepts_nested_attributes_for to define the writer method for you:
class Person < ActiveRecord::Base has_one :address accepts_nested_attributes_for :address end
If you want to destroy the associated model through the form, you have to enable it first using the :allow_destroy option for accepts_nested_attributes_for:
class Person < ActiveRecord::Base has_one :address accepts_nested_attributes_for :address, :allow_destroy => true end
Now, when you use a form element with the _destroy parameter, with a value that evaluates to true, you will destroy the associated model (eg. 1, ‘1’, true, or ‘true’):
<%= form_for @person do |person_form| %> ... <%= person_form.fields_for :address do |address_fields| %> ... Delete: <%= address_fields.check_box :_destroy %> <% end %> <% end %>
Consider a Person class which returns an array of Project instances from the projects reader method and responds to the projects_attributes= writer method:
class Person def projects [@project1, @project2] end def projects_attributes=(attributes) # Process the attributes hash end end
This model can now be used with a nested fields_for. The block given to the nested fields_for call will be repeated for each instance in the collection:
<%= form_for @person do |person_form| %> ... <%= person_form.fields_for :projects do |project_fields| %> <% if project_fields.object.active? %> Name: <%= project_fields.text_field :name %> <% end %> <% end %> <% end %>
It‘s also possible to specify the instance to be used:
<%= form_for @person do |person_form| %> ... <% @person.projects.each do |project| %> <% if project.active? %> <%= person_form.fields_for :projects, project do |project_fields| %> Name: <%= project_fields.text_field :name %> <% end %> <% end %> <% end %> <% end %>
Or a collection to be used:
<%= form_for @person do |person_form| %> ... <%= person_form.fields_for :projects, @active_projects do |project_fields| %> Name: <%= project_fields.text_field :name %> <% end %> <% end %>
When projects is already an association on Person you can use accepts_nested_attributes_for to define the writer method for you:
class Person < ActiveRecord::Base has_many :projects accepts_nested_attributes_for :projects end
If you want to destroy any of the associated models through the form, you have to enable it first using the :allow_destroy option for accepts_nested_attributes_for:
class Person < ActiveRecord::Base has_many :projects accepts_nested_attributes_for :projects, :allow_destroy => true end
This will allow you to specify which models to destroy in the attributes hash by adding a form element for the _destroy parameter with a value that evaluates to true (eg. 1, ‘1’, true, or ‘true’):
<%= form_for @person do |person_form| %> ... <%= person_form.fields_for :projects do |project_fields| %> Delete: <%= project_fields.check_box :_destroy %> <% end %> <% end %>
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 516 516: def fields_for(record_or_name_or_array, *args, &block) 517: raise ArgumentError, "Missing block" unless block_given? 518: options = args.extract_options! 519: 520: case record_or_name_or_array 521: when String, Symbol 522: object_name = record_or_name_or_array 523: object = args.first 524: else 525: object = record_or_name_or_array 526: object_name = ActionController::RecordIdentifier.singular_class_name(object) 527: end 528: 529: builder = options[:builder] || ActionView::Base.default_form_builder 530: capture(builder.new(object_name, object, self, options, block), &block) 531: end
Returns an file upload input tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown.
file_field(:user, :avatar) # => <input type="file" id="user_avatar" name="user[avatar]" /> file_field(:post, :attached, :accept => 'text/html') # => <input type="file" id="post_attached" name="post[attached]" /> file_field(:attachment, :file, :class => 'file_input') # => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" />
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 668 668: def file_field(object_name, method, options = {}) 669: InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("file", options) 670: end
Creates a form and a scope around a specific model object that is used as a base for questioning about values for the fields.
Rails provides succinct resource-oriented form generation with form_for like this:
<%= form_for @offer do |f| %> <%= f.label :version, 'Version' %>: <%= f.text_field :version %>
 <%= f.label :author, 'Author' %>: <%= f.text_field :author %>
 <% end %>
There, form_for is able to generate the rest of RESTful form parameters based on introspection on the record, but to understand what it does we need to dig first into the alternative generic usage it is based upon.
The generic way to call form_for yields a form builder around a model:
<%= form_for :person do |f| %> <%= f.error_messages %> First name: <%= f.text_field :first_name %>
 Last name : <%= f.text_field :last_name %>
 Biography : <%= f.text_area :biography %>
 Admin? : <%= f.check_box :admin %>
 <% end %>
There, the argument is a symbol or string with the name of the object the form is about.
The form builder acts as a regular form helper that somehow carries the model. Thus, the idea is that
<%= f.text_field :first_name %>
gets expanded to
<%= text_field :person, :first_name %>
The rightmost argument to form_for is an optional hash of options:
Worth noting is that the form_for tag is called in a ERb evaluation block, not an ERb output block. So that‘s <% %>, not <%= %>.
Also note that form_for doesn‘t create an exclusive scope. It‘s still possible to use both the stand-alone FormHelper methods and methods from FormTagHelper. For example:
<%= form_for @person do |f| %> First name: <%= f.text_field :first_name %> Last name : <%= f.text_field :last_name %> Biography : <%= text_area :person, :biography %> Admin? : <%= check_box_tag "person[admin]", @person.company.admin? %> <% end %>
This also works for the methods in FormOptionHelper and DateHelper that are designed to work with an object as base, like FormOptionHelper#collection_select and DateHelper#datetime_select.
As we said above, in addition to manually configuring the form_for call, you can rely on automated resource identification, which will use the conventions and named routes of that approach. This is the preferred way to use form_for nowadays.
For example, if @post is an existing record you want to edit
<%= form_for @post do |f| %> ... <% end %>
is equivalent to something like:
<%= form_for @post, :as => :post, :url => post_path(@post), :html => { :method => :put, :class => "edit_post", :id => "edit_post_45" } do |f| %> ... <% end %>
And for new records
<%= form_for(Post.new) do |f| %> ... <% end %>
is equivalent to something like:
<%= form_for @post, :as => :post, :url => post_path(@post), :html => { :class => "new_post", :id => "new_post" } do |f| %> ... <% end %>
You can also overwrite the individual conventions, like this:
<%= form_for(@post, :url => super_post_path(@post)) do |f| %> ... <% end %>
If you have an object that needs to be represented as a different parameter, like a Client that acts as a Person:
<%= form_for(@post, :as => :client do |f| %> ... <% end %>
And for namespaced routes, like admin_post_url:
<%= form_for([:admin, @post]) do |f| %> ... <% end %>
Specifying:
:remote => true
in the options hash creates a form that will allow the unobtrusive JavaScript drivers to modify its behaviour. The expected default behaviour is an XMLHttpRequest in the background instead of the regular POST arrangement, but ultimately the behaviour is the choice of the JavaScript driver implementor. Even though it‘s using JavaScript to serialize the form elements, the form submission will work just like a regular submission as viewed by the receiving side (all elements available in params).
Example:
<%= form_for(@post, :remote => true) do |f| %> ... <% end %>
The HTML generated for this would be:
<form action='http://www.example.com' method='post' data-remote='true'>
 <input name='_method' type='hidden' value='put' />
 ... </form>
You can also build forms using a customized FormBuilder class. Subclass FormBuilder and override or define some more helpers, then use your custom builder. For example, let‘s say you made a helper to automatically add labels to form inputs.
<%= form_for @person, :url => { :action => "create" }, :builder => LabellingFormBuilder do |f| %> <%= f.text_field :first_name %> <%= f.text_field :last_name %> <%= text_area :person, :biography %> <%= check_box_tag "person[admin]", @person.company.admin? %> <% end %>
In this case, if you use this:
<%= render :partial => f %>
The rendered template is people/_labelling_form and the local variable referencing the form builder is called labelling_form.
The custom FormBuilder class is automatically merged with the options of a nested fields_for call, unless it‘s explicitely set.
In many cases you will want to wrap the above in another helper, so you could do something like the following:
def labelled_form_for(record_or_name_or_array, *args, &proc) options = args.extract_options! form_for(record_or_name_or_array, *(args << options.merge(:builder => LabellingFormBuilder)), &proc) end
If you don‘t need to attach a form to a model instance, then check out FormTagHelper#form_tag.
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 284 284: def form_for(record_or_name_or_array, *args, &proc) 285: raise ArgumentError, "Missing block" unless block_given? 286: 287: options = args.extract_options! 288: 289: case record_or_name_or_array 290: when String, Symbol 291: ActiveSupport::Deprecation.warn("Using form_for(:name, @resource) is deprecated. Please use form_for(@resource, :as => :name) instead.", caller) unless args.empty? 292: object_name = record_or_name_or_array 293: when Array 294: object = record_or_name_or_array.last 295: object_name = options[:as] || ActionController::RecordIdentifier.singular_class_name(object) 296: apply_form_for_options!(record_or_name_or_array, options) 297: args.unshift object 298: else 299: object = record_or_name_or_array 300: object_name = options[:as] || ActionController::RecordIdentifier.singular_class_name(object) 301: apply_form_for_options!([object], options) 302: args.unshift object 303: end 304: 305: options[:html][:remote] = true if options.delete(:remote) 306: 307: output = form_tag(options.delete(:url) || {}, options.delete(:html) || {}) 308: output << fields_for(object_name, *(args << options), &proc) 309: output.safe_concat('</form>') 310: end
Returns a hidden input tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown.
hidden_field(:signup, :pass_confirm) # => <input type="hidden" id="signup_pass_confirm" name="signup[pass_confirm]"<EMAIL_ADDRESS>/> hidden_field(:post, :tag_list) # => <input type="hidden" id="post_tag_list" name="post[tag_list]"<EMAIL_ADDRESS>/> hidden_field(:user, :token) # => <input type="hidden" id="user_token" name="user[token]"<EMAIL_ADDRESS>/>
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 649 649: def hidden_field(object_name, method, options = {}) 650: InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("hidden", options) 651: end
Returns a label tag tailored for labelling an input field for a specified attribute (identified by method) on an object assigned to the template (identified by object). The text of label will default to the attribute name unless a translation is found in the current I18n locale (through helpers.label.<modelname>.<attribute>) or you specify it explicitly. Additional options on the label tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown, except for the :value option, which is designed to target labels for radio_button tags (where the value is used in the ID of the input tag).
label(:post, :title) # => Title You can localize your labels based on model and attribute names. For example you can define the following in your locale (e.g. en.yml) helpers: label: post: body: "Write your entire text here" Which then will result in label(:post, :body) # => Write your entire text here Localization can also be based purely on the translation of the attribute-name like this: activemodel: attribute: post: cost: "Total cost" label(:post, :cost) # => Total cost label(:post, :title, "A short title") # => A short title label(:post, :title, "A short title", :class => "title_label") # => A short title label(:post, :privacy, "Public Post", :value => "public") # => Public Post label(:post, :terms) do 'Accept Terms.' end
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 579 579: def label(object_name, method, content_or_options = nil, options = nil, &block) 580: if block_given? 581: options = content_or_options if content_or_options.is_a?(Hash) 582: text = nil 583: else 584: text = content_or_options 585: end 586: 587: options ||= {} 588: InstanceTag.new(object_name, method, self, options.delete(:object)).to_label_tag(text, options, &block) 589: end
Returns an input tag of type "number".
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 822 822: def number_field(object_name, method, options = {}) 823: InstanceTag.new(object_name, method, self, options.delete(:object)).to_number_field_tag("number", options) 824: end
Returns an input tag of the "password" type tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown.
password_field(:login, :pass, :size => 20) # => <input type="text" id="login_pass" name="login[pass]" size="20"<EMAIL_ADDRESS>/> password_field(:account, :secret, :class => "form_input") # => <input type="text" id="account_secret" name="account[secret]"<EMAIL_ADDRESS>class="form_input" /> password_field(:user, :password, :onchange => "if $('user[password]').length > 30 { alert('Your password needs to be shorter!'); }") # => <input type="text" id="user_password" name="user[password]"<EMAIL_ADDRESS>onchange = "if $('user[password]').length > 30 { alert('Your password needs to be shorter!'); }"/> password_field(:account, :pin, :size => 20, :class => 'form_input') # => <input type="text" id="account_pin" name="account[pin]" size="20"<EMAIL_ADDRESS>class="form_input" />
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 631 631: def password_field(object_name, method, options = {}) 632: InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("password", options) 633: end
Returns a radio button tag for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). If the current value of method is tag_value the radio button will be checked.
To force the radio button to be checked pass :checked => true in the options hash. You may pass HTML options there as well.
# Let's say that @post.category returns "rails": radio_button("post", "category", "rails") radio_button("post", "category", "java") # => <input type="radio" id="post_category_rails" name="post[category]" value="rails" checked="checked" /> # <input type="radio" id="post_category_java" name="post[category]" value="java" /> radio_button("user", "receive_newsletter", "yes") radio_button("user", "receive_newsletter", "no") # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" /> # <input type="radio" id="user_receive_newsletter_no" name="user[receive_newsletter]" value="no" checked="checked" />
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 780 780: def radio_button(object_name, method, tag_value, options = {}) 781: InstanceTag.new(object_name, method, self, options.delete(:object)).to_radio_button_tag(tag_value, options) 782: end
Returns an input tag of type "range".
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 830 830: def range_field(object_name, method, options = {}) 831: InstanceTag.new(object_name, method, self, options.delete(:object)).to_number_field_tag("range", options) 832: end
Returns a text_field of type "search".
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 785 785: def search_field(object_name, method, options = {}) 786: options = options.stringify_keys 787: 788: if options["autosave"] 789: if options["autosave"] == true 790: options["autosave"] = request.host.split(".").reverse.join(".") 791: end 792: options["results"] ||= 10 793: end 794: 795: if options["onsearch"] 796: options["incremental"] = true unless options.has_key?("incremental") 797: end 798: 799: InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("search", options) 800: end
Returns a text_field of type "tel".
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 803 803: def telephone_field(object_name, method, options = {}) 804: InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("tel", options) 805: end
Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options.
text_area(:post, :body, :cols => 20, :rows => 40) # => <textarea cols="20" rows="40" id="post_body" name="post[body]"> #<EMAIL_ADDRESS># </textarea> text_area(:comment, :text, :size => "20x30") # => <textarea cols="20" rows="30" id="comment_text" name="comment[text]"> #<EMAIL_ADDRESS># </textarea> text_area(:application, :notes, :cols => 40, :rows => 15, :class => 'app_input') # => <textarea cols="40" rows="15" id="application_notes" name="application[notes]" class="app_input"> #<EMAIL_ADDRESS># </textarea> text_area(:entry, :body, :size => "20x20", :disabled => 'disabled') # => <textarea cols="20" rows="20" id="entry_body" name="entry[body]" disabled="disabled"> #<EMAIL_ADDRESS># </textarea>
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 696 696: def text_area(object_name, method, options = {}) 697: InstanceTag.new(object_name, method, self, options.delete(:object)).to_text_area_tag(options) 698: end
Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown.
text_field(:post, :title, :size => 20) # => <input type="text" id="post_title" name="post[title]" size="20"<EMAIL_ADDRESS>/> text_field(:post, :title, :class => "create_input") # => <input type="text" id="post_title" name="post[title]"<EMAIL_ADDRESS>class="create_input" /> text_field(:session, :user, :onchange => "if $('session[user]').value == 'admin' { alert('Your login can not be admin!'); }") # => <input type="text" id="session_user" name="session[user]"<EMAIL_ADDRESS>onchange = "if $('session[user]').value == 'admin' { alert('Your login can not be admin!'); }"/> text_field(:snippet, :code, :size => 20, :class => 'code_input') # => <input type="text" id="snippet_code" name="snippet[code]" size="20"<EMAIL_ADDRESS>class="code_input" />
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 609 609: def text_field(object_name, method, options = {}) 610: InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("text", options) 611: end
Returns a text_field of type "url".
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_view/helpers/form_helper.rb, line 809 809: def url_field(object_name, method, options = {}) 810: InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("url", options) 811: end


The Entertainer
$90/mo
- 10 servings of 2 cocktails
- Pre-measured supply of top-shelf liquors
- Full instructions with modifications
- A collectible glass in each shipment
Please complete the form below to subscribe to a monthly delivery plan. Plans can be cancelled at any time by calling us at 1-800-NOT-REAL, at least 10 days before the next delivery date. Please note that delivery of The Explorer or The Entertainer plans require someone 21 or over with valid ID be present to sign.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ws.jaxme.xs.parser.impl.XSContextImpl
public class XSContextImpl
This class provides access to the parsers internal data. The
Context
instance is stored as a thread local element, thus
accessible via a static method.
| Field Summary | |
|---|---|
static AttributeSetter |
DEFAULT_ATTRIBUTE_SETTER
|
static ChildSetter |
DEFAULT_CHILD_SETTER
|
static XsObjectFactory |
DEFAULT_OBJECT_FACTORY
|
static TextSetter |
DEFAULT_TEXT_SETTER
|
static XSObjectFactory |
DEFAULT_XS_OBJECT_FACTORY
|
| Constructor Summary | |
|---|---|
XSContextImpl()
|
| Method Summary | |
|---|---|
AttributeSetter |
getAttributeSetter()
Returns the AttributeSetter , which is used to
configure properties. |
ChildSetter |
getChildSetter()
Returns the ChildSetter , which is used to create
child elements. |
org.xml.sax.ContentHandler |
getCurrentContentHandler()
Sets the currently active instance of XsSAXParser . |
org.xml.sax.Locator |
getLocator()
Returns the locator, used for error messages. |
org.xml.sax.helpers.NamespaceSupport |
getNamespaceSupport()
Returns the namespace handler. |
TextSetter |
getTextSetter()
Returns the TextSetter , used to add text sections. |
XSLogicalParser |
getXSLogicalParser()
Returns the currently running XSParser or null,
if no such instance is available. |
XsObjectFactory |
getXsObjectFactory()
Returns the parsers object factory for syntax elements. |
XSObjectFactory |
getXSObjectFactory()
Returns the parsers object factory for logical elements. |
XSSchema |
getXSSchema()
Returns the XSSchema , which is currently being parsed,
if any. |
void |
setAttributeSetter(AttributeSetter pAttributeSetter)
Sets the AttributeSetter, which is used to configure properties. |
void |
setChildSetter(ChildSetter pChildSetter)
Sets the ChildSetter, which is used to create child elements. |
void |
setCurrentContentHandler(org.xml.sax.ContentHandler pHandler)
Sets the currently active instance of XsSAXParser . |
void |
setLocator(org.xml.sax.Locator pLocator)
Sets the locator, used for error messages. |
void |
setNamespaceSupport(org.xml.sax.helpers.NamespaceSupport pNamespaceSupport)
Sets the namespace handler. |
void |
setTextSetter(TextSetter pTextSetter)
Sets the TextSetter, used to add text sections. |
void |
setXSLogicalParser(XSLogicalParser pParser)
Sets the currently active instance of XSParser , if any. |
void |
setXsObjectFactory(XsObjectFactory pFactory)
Sets the parsers object factory for syntax elements. |
void |
setXSObjectFactory(XSObjectFactory pFactory)
Sets the parsers object factory for logical elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final XsObjectFactory DEFAULT_OBJECT_FACTORY
public static final XSObjectFactory DEFAULT_XS_OBJECT_FACTORY
public static final AttributeSetter DEFAULT_ATTRIBUTE_SETTER
public static final ChildSetter DEFAULT_CHILD_SETTER
public static final TextSetter DEFAULT_TEXT_SETTER
| Constructor Detail |
|---|
public XSContextImpl()
| Method Detail |
|---|
public XsObjectFactory getXsObjectFactory()
XSContext
Returns the parsers object factory for syntax elements.
getXsObjectFactory
in interface XSContext
public void setXsObjectFactory(XsObjectFactory pFactory)
XSContext
Sets the parsers object factory for syntax elements.
setXsObjectFactory
in interface XSContext
public XSObjectFactory getXSObjectFactory()
XSContext
Returns the parsers object factory for logical elements.
getXSObjectFactory
in interface XSContext
public void setXSObjectFactory(XSObjectFactory pFactory)
XSContext
Sets the parsers object factory for logical elements.
setXSObjectFactory
in interface XSContext
public AttributeSetter getAttributeSetter()
XSContext
Returns the AttributeSetter
, which is used to
configure properties.
getAttributeSetter
in interface XSContext
public void setAttributeSetter(AttributeSetter pAttributeSetter)
XSContext
Sets the AttributeSetter, which is used to configure properties.
setAttributeSetter
in interface XSContext
public ChildSetter getChildSetter()
XSContext
Returns the ChildSetter
, which is used to create
child elements.
getChildSetter
in interface XSContext
public void setChildSetter(ChildSetter pChildSetter)
XSContext
Sets the ChildSetter, which is used to create child elements.
setChildSetter
in interface XSContext
public TextSetter getTextSetter()
XSContext
Returns the TextSetter
, used to add text sections.
getTextSetter
in interface XSContext
public void setTextSetter(TextSetter pTextSetter)
XSContext
Sets the TextSetter, used to add text sections.
setTextSetter
in interface XSContext
public XSLogicalParser getXSLogicalParser()
XSContext
Returns the currently running XSParser
or null,
if no such instance is available.
getXSLogicalParser
in interface XSContext
public void setXSLogicalParser(XSLogicalParser pParser)
XSContext
Sets the currently active instance of XSParser
, if any.
Returns null, if no such instance is available.
setXSLogicalParser
in interface XSContext
public XSSchema getXSSchema()
XSContext
Returns the XSSchema
, which is currently being parsed,
if any.
getXSSchema
in interface XSContext
public org.xml.sax.Locator getLocator()
XSContext
Returns the locator, used for error messages.
getLocator
in interface XSContext
public void setLocator(org.xml.sax.Locator pLocator)
XSContext
Sets the locator, used for error messages.
setLocator
in interface XSContext
public void setNamespaceSupport(org.xml.sax.helpers.NamespaceSupport pNamespaceSupport)
XSContext
Sets the namespace handler.
setNamespaceSupport
in interface XSContext
public org.xml.sax.helpers.NamespaceSupport getNamespaceSupport()
XSContext
Returns the namespace handler.
getNamespaceSupport
in interface XSContext
public void setCurrentContentHandler(org.xml.sax.ContentHandler pHandler)
XSContext
Sets the currently active instance of XsSAXParser
.
setCurrentContentHandler
in interface XSContext
public org.xml.sax.ContentHandler getCurrentContentHandler()
XSContext
Sets the currently active instance of XsSAXParser
.
getCurrentContentHandler
in interface XSContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


projects
My beliefs on choosing good projects:
Balance the technologies/frameworks used.
Your blog and projects will shape you
Resume: before and after
Projects and Skills will take up 50% of your resume
Projects will be your starting point at interviews
Love aspects about project
Allow your teammates to have aspects they love.
Spend time to come to consensus
Teach the project internally
Share the project publicly
Hosting is a big bottleneck
Consider a staging site
Plan or talk about ways to grow
Receptacle answers where does this unwanted item go?
Current Features & Stack
Angular Application
Visuals & UX/UI Emphasis
Future Features, Stack, & Opportunities
Redis Key Value - Pair Database (EARN)
User Input Option
Video-ke is a dual video player with crossfader powered by .
Current Features & Stack
jQuery UI Bootstrap
iFrame API
Crossfader feature
Future Features, Stack, & Opportunities
Competetive Karoake
Voting - Event Music feature
SixDribbles maps player relationships for the NBA.
Current Features & Stack
Angular Front-End
Node/Express Server
Future Features, Stack, & Opportunities
Add Coaching Relationships
Mobile (ReactNative)
Desktop (Electron)
Node-Neo4j-GraphStory-Heroku blog series coming!
Katfish lets users create attribute-based profiles for their friends!
Current Features & Stack
Mobile (ReactNative)
iOS , built with xCode IDE
SDK Authentication
Future Features & Stack
Rebuild for hackathon use
Your projects are extremely important
Your projects are what makes you stand out
Quantity and quality of work at TGA
Others are under nondisclosure agreements
You will become an preeminent expert
Other devs are too busy to learn
You may be building the first of it's kind
How long have you spent on this... 16 hours?
That makes you an expert.
...
When you figure it out, tell me
and I'll post your blog.
Be available to help
Share what you know
Your peers projects <> your own
Chance to join community
...
...
...
Questions?


You will have 60 seconds to get as many correct as you can. When you click "Start" the browser will ask you for permission to use the microphone. Once cards start appearing, say the answers out loud. A new problem won't given until either you say "skip" or get the problem right.


WITNESS LIST Finance Committee April 24, 1997-9:00A HB 8 On: BELVIN, WARDALEEN (TX TOMORROW FUND), AUSTIN HB 9 On: BELVIN, WARDALEEN (TX TOMORROW FUND), AUSTIN HB 527 Written materials submitted: For: CORNELIUS, AL (SELF), WAXAHACHIE HJR 8 On: BELVIN, WARDALEEN (TX TOMORROW FUND), AUSTIN SB 102 For: Duke, James H. (UT Houston Medical Sch), Houston Oosley, S. Dale (Self), Ft. Worth Registering, but not testifying: For: Alexander, Troy (TAFP), Austin Allen, Kitty (Hermann Hospital), Houston Allison, Jim (CJCAT), Austin Bailey, Ken (TSAFF), Austin Bauer, Charles (Self), Fair Oaks Berger, Ed (Seton Healthcare Ntwork), Austin Carmichael, Doug (TCEP), Austin Click, Mike (Brownfield Reg Med Ctr), Brownfield Coles, Jim (TCEP), Austin Douglass, Susan M. (University Hospital), San Antonio Feather, Robert K. (Cook Children's Med Ctr), Ft. Worth Gilchrist, Alfred (TMA), Austin Goodspeed, Darwin (GSAHC), San Antonio Haas, John (GSAHC), San Antonio Hillier, King (TAPNPH), Austin Holtermann, John W. (TX SilverHaired Leg), San Marcos Huff, Jim (Self), George West Lacroix, Mary R. (GSAHC), San Antonio Lee, Donald (Conference of Urban Cts), Austin Montgomery, Steve (Harris Methodist Health), Ft. Worth Notzon, Al J. (Alamo Area COG), San Antonio Ott, Patricia (JPCATI), West Pollard, Mike (TALHI), Austin Rason, Bill (GSAHC), San Antonio Rogers, Jody R. (GSAHC), San Antonio Schneider, J.R. (Live Oak Co EMS), George West Shumate, Louise (City of Three Rivers), Three Rivers Sneed, John (Williamson County), Georgetown Stewart, Ronald M. (STRAC), San Antonio Walker, Helen (CJCAT), Austin Welsh, Dinah S. (TX Hospital Assc), Austin Wengenroth, Carl (Live Oak Co EMS), George West On: Reous, Ronald C. (EHCAC/TDH), Austin Weatherall, Gene (TDH), Austin Written materials submitted: For: Goodrich, Leticia A. (EHCAC), Amarillo Novak, Mike (BCHFDC), San Antonio Sperry, Bryan (CHAT), Austin SB 105 Registering, but not testifying: On: RINN, JAMES (TX LOTTERY COMMISSION), AUSTIN SB 844 On: Cedillo, Ruth (TDHCA), Austin SB 1048 For: Morgan, Andrea J. (TACDC), Austin Sprinkle, G.K. (TACDC), Austin Registering, but not testifying: On: WILSON, DAN (COMPTROLLER'S OFFICE), AUSTIN SB 1183 For: NEWTON, CHRIS (TPM/CSA), AUSTIN On: SHOEMATE, MONA (COMPTROLLER'S OFFICE), AUSTIN SB 1299 On: BELVIN, WARDALEEN (TX TOMORROW FUND), AUSTIN SB 1321 Registering, but not testifying: On: COBB, SHARON W. (THECB), AUSTIN SB 1375 On: WILSON, DAN (COMPTROLLER'S OFFICE), AUSTIN SB 1407 For: DASHIELL, DOUG (COASTAL OIL/GAS CORP), AUSTIN GOURLEY, LISA (WESTPARK PETROLEUM, INC), AUSTIN PARKER, CARL A. (COASTAL CORP), HOUSTON Registering, but not testifying: For: NELSON, DON C. (COASTAL OIL/GAS CORP), HOUSTON STOUT, BOB (MITCHELL ENERGY/DEV COR), THE WOODLANDS WEBER, THOMAS M. (MCELREY,SULLIVAN, ETC), AUSTIN SB 1470 On: BELVIN, WARDALEEN (TX TOMORROW FUND), AUSTIN SB 1534 For: MCHUGH, M. COLLEEN (STATE BAR OF TX), CORPUS CHRISTI Registering, but not testifying: For: BROWN, PAMELA (LONE STAR JUSTICE FUND), AUSTIN CHAPMAN, RANDALL (LHOT), AUSTIN COMSTOCK-GALAGAN, JIM (ADVOCACY, INC), AUSTIN ESCOBAR, BONNIE S.Y. (EPCLA), EL PASO LIBERATO, LYNNE (SELF), HOUSTON OLIVER, JULIE (TX LAWYERS CARE), AUSTIN ROGOFF, REGINA (LEGAL AID OF CENTRAL TX), AUSTIN SCHNEIDER, CHRISTINA (TXCFV), AUSTIN WHITAKER, ELIZABETH (SELF), DALLAS On: ALVARADO, ANTONIO (STATE BAR OF TX), AUSTIN SB 1808 For: GREGORY, SCOTT RYAN (SELF), AUSTIN On: LARIVIERE, RICHARD W. (UT AUSTIN), AUSTIN Written materials submitted: For: DORLAND, WILLIAM (SELF), AUSTIN SB 1863 For: HARRIS, DANE (TABCOC), AUSTIN NYE, PAUL W. (SELF), CORPUS CHRISTI On: MORALES, DAN (OAG), AUSTIN Registering, but not testifying: For: PINKUS, DAVID (SBUT), AUSTIN VENABLE, PEGGY M. (TCFASE), AUSTIN WYATT, JIM (TAAACC), AUSTIN SB 1871 For: GONZALES, RICHARD (AUSTIN INTERFAITH), AUSTIN HOFFMAN, MARY LOU (DALLAS AREA INTERFAITH), DALLAS JOHNSON, CEDRIC (METROPOLITAN ORG), HOUSTON Registering, but not testifying: For: KIRCHER, PETER O. (ALLIANCE SCHOOLS), AUSTIN ROGOFF, REGINA (AUSTIN INTERFAITH), AUSTIN WILLIAMS, INGRID L. (TMO/THE ALLIANCE SCHOOL), HOUSTON On: BURKE, KATHLEEN (TEA), AUSTIN SB 1880 For: OFFINEER, GARY (TX VETERANS FOUNDATION), BASTROP On: WILSON, DAN (COMPTROLLER'S OFFICE), AUSTIN Registering, but not testifying: For: DUNCAN, JAMES S. (KOREAN WAR VET ASSC), AUSTIN MCLEMORE, WILLIAM W. (TACVSO), AUSTIN VERNON, ALEXANDER (VFW), KILLEEN SB 1906 Registering, but not testifying: On: HARVEY, TOBIN K. (GSC), AUSTIN RAVEN, KAREN (GSC), AUSTIN


John
Cheif Operating Officer
The COO of Iris Communications Services is John Anderson. John has over 20 years of experience in the wireless industry, going back to when a cell phone was a luxury few people could afford. He has experienced the use of fiber for transmission since its initial adaptation by US based wireless carriers approximately 10 years ago. His expertise with fiber/remote radio systems is the backbone of Iris’ product offering.


(PECL getdns >= 0.11.0)
php_getdns_validate_dnssec — Perform DNSSEC validation without using extensions.
$toValidate
, int $supportRecords
, int $trustAnchors
)This function can be used by an application to have the getdns library perform DNSSEC validation without using extensions as part of a query. The getdns library will use the resource records in supportRecords to construct the validation chain and the DNSKEY or DS records in trustAnchors as trust anchors.
Note, though, that the utility of this function is currently limited by a bug in the getdns library related to the processing of responses that include compressed names (such as those that include NS, MX and CNAME records). This function also has the shortcoming that it cannot recognize insecure delegations, so it should never be blindly used to determine the DNSSEC status of answers received with the dnssec_return_validation_chain extension. Real DNSSEC validation needs a more intelligent approach than this function can offer with the current getdns API's prototype.
toValidate
A reference to the list that represents the response resource records to be validated. The needed list can be found by retrieving the "replies_tree" list from the response dictionary, retrieving the dictionary in the first position (index value 0) from that list, and then retrieving the "answer" list from that dictionary.
supportRecords
A reference to the list that represents the records used to construct the validation chain. The support records can be included in the response by setting the "dnssec_return_validation_chain" extension value to GETDNS_EXTENSION_TRUE. The list of support records can then be retrieved from the response dictionary using the "validation_chain" identifier.
trustAnchors
A reference to the list that represents the trust anchor records to use for validation. The default list of trust anchor records that is used by the library to validate DNSSEC can be retrieved using the php_getdns_root_trust_anchor() helper function.
This function returns an integer response code. GETDNS_DNSSEC_SECURE indicates confirmation of DNSSEC security. GETDNS_DNSSEC_BOGUS indicates that the response was determined to be invalid. GETDNS_DNSSEC_INDETERMINATE indicates that the DNSSEC state could not be determined. GETDNS_DNSSEC_INSECURE indicates that the response was determined to be insecure.


TUCKS HEMORRHOIDAL- mineral oil, pramoxine hydrochloride and zinc oxide ointment
McNEIL-PPC, Inc.
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
| Active ingredients |
Purpose |
| Mineral Oil 46.6% |
Protectant |
| Pramoxine HCl 1% |
Pain reliever |
| Zinc oxide 12.5% |
Protectant |
Uses
- temporarily relieves these local symptoms associated with hemorrhoids or anorectal inflammation:
- pain
- soreness
- burning
- itching
- temporarily forms a protective coating over the inflamed tissues to help prevent drying of tissues
Warnings
When using this product
- do not use more than directed unless told to do so by a doctor
- do not put into the rectum by using fingers or any mechanical device or applicator
Stop use and ask a doctor if
- allergic reaction occurs
- rectal bleeding occurs
- redness, irritation, swelling, pain, or other symptoms begin or increase
- condition worsens or does not improve within 7 days
Keep out of reach of children. If swallowed, get medical help or contact a Poison Control Center right away.
Directions
- adults: apply externally to the affected area up to 5 times daily
- when practical, clean the affected area with mild soap and warm water and rinse thoroughly
- gently dry by patting or blotting with toilet tissue or a soft cloth before applying
- to use dispensing cap
- attach it to tube, lubricate well, then gently insert part way into anus
- squeeze tube to deliver medication
- thoroughly cleanse dispensing cap after use
- children under 12 years of age: ask a doctor
Other information
- store at 20° to 25°C (68° to 75°F)
Inactive ingredients
benzyl benzoate, calcium phosphate dibasic, cocoa butter, glyceryl monooleate, glyceryl monostearate, kaolin, peruvian balsam, and polyethylene wax
Questions?
call toll-free<PHONE_NUMBER>, weekdays, 9 AM- 5 PM EST
Distributed by:
McNEIL-PPC, Inc.
Skillman, NJ 08558 USA
PRINCIPAL DISPLAY PANEL - 28.3 g Tube Carton
MAXIMUM
STRENGTH
pain reliever
TUCKS®
HEMORRHOIDAL OINTMENT
BRAND USED
BY HOSPITALS
Net Wt
1 oz (28.3 g)
McNEIL-PPC, Inc.


Construct a data fixture suitable for import by django from a "standard" JSON data file
For example, suppose you are building an app sffilm
that helps film buffs visiting San Francisco visit filming locations in the city.
A simple django model for this might look something like this:
class SFFilm4LL(models.Model):
idx = models.IntegerField(primary_key=True)
title = models.CharField(max_length=100)
location = models.CharField(max_length=100)
year = models.IntegerField()
writer = models.CharField(max_length=100)
director = models.CharField(max_length=100)
It so happens there is a nice little data set provided via the (Socrata) DataSF API. This data is in the "standard" format of a list-of-dictionaries, ala:
[ {
"title" : "180",
"actor_1" : "Siddarth",
"locations" : "Epic Roasthouse (399 Embarcadero)",
"release_year" : "2011",
"production_company" : "SPI Cinemas",
"actor_2" : "Nithya Menon",
"writer" : "Umarji Anuradha, Jayendra, Aarthi Sriram, & Suba ",
"director" : "Jayendra",
"actor_3" : "Priya Anand"
}
, {
"title" : "24 Hours on Craigslist",
"actor_1" : "Craig Newmark",
"release_year" : "2005",
...
Call each separate film's dictionary a "data element" and each key of that dictionary a "field." Note you want to import some but not all of the input JSON's attributes.
django (>= v1.7) can initialize databases via "fixture migration". JSON is one common format for fixtures, and it also assumes a list-of-dictionaries format for all new data elements. However, django's fixtures must have, for each data element:
a model: <appName>.<modelName>
key:value pair
a pk: <primaryKeyValue>
key:value pair
all other fields of the data element as part of a fields
dictionary
This script does nothing but reformat the input JSON to produce a new JSON fixture file conforming to these conventions.
But it needs a few specifications to do that. These are provided by a parameter file that looks like this:
sffilm.SFFilm4LL
title,title
actor_1
locations,location
release_year,year,PK
production_company
actor_2
writer,writer
director,director
actor_3
distributor
fun_facts
The first line of the file specifies the <appName>.<modelName>
. All other lines are comma separated and correspond to features in the input JSON data. Typical lines have two entries: the field's name in the input JSON, and its name in the output model. If the line has only one element, it means that field is dropped in the output fixture.
If there is a third element and it is the token 'PK'
, that attribute will be used to produce the data elements' primary key ordering. If no fields have this flag, the original ordering in the input JSON file is used.
python json2djfix.py sffilm2djf.txt SFfilm_api.json sffilm_fix_year.json
json2djfix: done. 1000/1000 data converted
loaddata
is the command to import this fixture:
$ python manage.py loaddata sffilm/fixtures/sffilm_fix_year.json
Installed 1000 object(s) from 1 fixture(s)
Looks like it worked; let's check:
$ python manage.py shell
In [1]: from sffilm.models import SFFilm4LL
In [2]: allFilms = SFFilm4LL.objects.all()
In [3]: len(allFilms)
Out[3]: 1000
In [4]: film0 = allFilms[0]
In [5]: film0
Out[5]: <SFFilm4LL: 0:A Jitney Elopement>


| DOSE: |
2 hits |
oral |
LSD |
(blotter / tab) |
Wow, first acid trip in 8 months. This dude I know from on the
Internet sent me two hits of Red Sun acid, and I took them both. It hit me
fast, in about a half hour, and it hit me hard. I played guitar and talked
on the Internet for about 2 hours.
It was an interesting trip. It hit me a little around midnight of
the 20th. I took a hit of pot right at midnight to celebrate the first
minute of the first day of spring, and that kicked in the acid.  The near-full moon was very bright and shining in my
window, with clouds swirling unnaturally fast around it. The bars of my
window frame were flickering around, and the still bare tree branches
outside were dancing wit their own life. It was very visual, and too
intense to look at for long, so I pulled down the shade and closed my
eyes, and went to that inner, chaotic, cut and paste universe of vivid
imagery that I hadn't been to in years. Cartoony voices seemed to be
saying nonsense words from every direction as I floated there in
hyperspace, saying things like 'Zlerty-zot meep awwww znew' or 'Sbpack
Sbpack.' After a while, the chaos organized somewhat, becoming a jumbled
collection of imagery and themes that seemed to come from Jewish culture.
Flash to images of a baby in a crip, this feels something like a memory.
This gives way to images of people I know now, only I see them as they
would have been as small children. Eventually things spiral down to more
coherent imagery, and I lay in bed thinking about life until around 4:30
when I managed to fall asleep.
I haven't tripped like that in years.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{$extend "/3D-era" $}
{$define "#content" }
After running, jumping, and swimming across every kind of landscape imaginable, there was little else for Mario to explore on Earth – so he turned his attention to the stars.
Our hero blasted off to explore the vast reaches of outer space in his two Super Mario Galaxy games, and that final frontier provided players with some of the most memorable moments yet in Mario's epic career.
He could run around floating planetoids in any direction, zip from star to star, and create new heavenly bodies from the aether, only needing to invest some gathered bits of interstellar matter.
{$}


BigJob is a light-weight Python package that provides a Pilot-based Job and Data Management system. BigJob aims to be as flexible and extensible as possible - it installs where you want it (requiring no root access to the target machine). Unlike many other Pilot-Job systems, BigJob natively supports MPI jobs and, because of its integration with saga-python, works on a variety of backend systems (such as SGE, PBS, SLURM, etc.). BigJob has been shown to work on grids, clouds, and clusters, as well as locally on your personal computer.
More information can be found at the BigJob website.


--- layout: default --- {% include scripts.html %} {% include header.html %} {% include about.html %} {% include counter.html %} {% include blog.html %} {% include sponsors.html %} {% include footer.html %}


| lesson 19 A very dear cat |
| Kidnappers are rarely interested in animals, but they recently took considerable interest in Mrs. Eleanor Ramsay's cat. |
| Mrs. Eleanor Ramsay, a very wealthy old lady, has shared a flat with her cat, Rastus, for a great many years. |
| Rastus leads an orderly life. |
| He usually takes a short walk in the evenings and is always home by seven o'clock. |
| One evening, however, he failed to arrive. |
| Mrs. Ramsay got very worried. |
| She looked everywhere for him but could not find him. |
| Three days after Rastus' disappearance, Mrs. Ramsay received an anonymous letter. |
| The writer stated that Rastus was in safe hands and would be returned immediately if Mrs. Ramsay paid a ransom of $1, 000. |
| Mrs. Ramsay was instructed to place the money in a cardboard box and to leave it outside her door. |
| At first, she decided to go to the police, |
| but fearing that she would never see Rastus again -- the letter had made that quite clear -- she changed her mind. |
| She withdrew $1000 from her bank and followed the kidnapper's instructions. |
| The next morning, the box had disappeared but Mrs. Ramsay was sure that the kidnapper would keep his word. |
| Sure enough, Rastus arrived punctually at seven o'clock that evening. |
| He looked very well, though he was rather thirsty, for he drank half a bottle of milk. |
| The police were astounded when Mrs. Ramsay told them what she had done. |
| She explained that Rastus was very dear to her. |
| Considering the amount she paid, he was dear in more ways than one! |


Pomodoro Timer by
Lamsbeg Group
Relax Time (minutes):
-
5
+
Pomodoro Time (minutes):
-
25
+
Reset
Business Time
25:00


Arturo San Degas
Help Me Pick New Logo Through 3 April 2016!
I am in the process of running a logo design contest on 99designs and have created a poll with 6 of the best logo designs I've received. I would love for you to vote on the logo design. It only takes a minute.
Like Sci-Fi? Read My New Online Fiction Series.
Do you like Sci-Fi? While I finish up my next novel, I have started an online fiction series called Forbearance. Picking up from the canteen scene in Bellicose, we meet Keius Minjen, a postal marine, as he tries to survive the battle planet Guna to exact revenge and one day liberate his homeland.
Sign-up if you want me to send you news about upcoming installments of Forbearance or my other writings.
Scholar herald Arturo San Degas as the greatest King Traih League monarch for he mastered the art of Imperium diplomacy and left behind a legacy that allowed subsequent monarchs to follow in his example. He also established an effective Constitutional monarchy with the League Accordant near the end of his reign. Posthumusly he was re-titled King Traih I.
Being an effective monarch, Arturo realized that his was a rare government. Previous monarchs had varying levels of efficiency and corruption. He was the son of King San Degas IV of Arturon. As the youngest of seven sons, Arturo’s father never expected him to be king, so he allowed his son educational opportunities not afforded his elder brothers. Thus, his son received dual `PhDs in Political Science and Law. Seen as the blueprint for his reigh, his dissertations detailed the effect of inter-sovereign law in the League and the importance of a stable government that functions outside an autocrat.
He was fifteen years younger than the oldest four brothers. Only the oldest two reigned, each passing shortly into their reign. When the second was assassinated by pro-People factions, the other brothers refused to take up the thrown. Thus, Arturos became King Traih. He established himself an intolerant ruler toward internal violence and those would-be assassin groups were destroyed.
League Accordant
This document was the key to King Traih’s legacy. Rather than wait for problems to form within his kingdom, or for popular support, he established the League University of Constitutional Politics. The only degree offered by this school before the Accordant was finished were doctorates in government. Students were required to provide effective means of managing a bureaucracy while avoiding the inherent fiefdom mentality and inertia. Much of what was developed at this think tank was applied to the resulting government.
The Accordant was then written by King Traih himself. He spent the better part of five years debating and revising with the best scholars produced by his University. The final document was then given a shaking out by scholars and layman alike in a contest to find weaknesses in the document.
Unlike other constitutions, the Accordant lacks the requisite compromise language. He was able to clearly delineate the duties of citizen, magistrate, and parlimentarian in an interlocking web that has since proven to prevent the government from being overwhelmingly powerful but also preventing the kingdom from devolving into an anarchy.
Magistratory governments were established in each system and comprised delegates from each significantly inhabited world. Those delegates ran local affairs at the pleasure of the Monarch, and also appointed ministers who served in the lower house of parliment. As this house was given the power to remove the Monarch (under certain limitations), the Monarch’s pleasure was beholding to Magistratory interests.
The citizens then selected the upper house of Parliment. They were given the power to remove magistrates, which gave citizens the power to remove ineffective magistrates.
The Monarch was a semi-hereditary position. Each monarch was forced to undergo the Tests of Fitness to prove he had the high standard of governmental training to be a monarch worthy of Traih’s legacy. When none in a royal family were found to be Fit, the Parliment chose a Magistrate who would then face the Tests of Fitness. Only such a Magistrate could assume the throne, with all power and responsibilities.
The Tests of Fitness was determined by the University during Traih’s reign, and had high standards in its formation and a high degree of secrecy. Discovery that a Monarch had access to the Tests always resulted in immediate abdication.
The interlocking of duties and privileges led to a selfish enforcement of the slightest error. However, it also proved a very stable government that allowed great flexibility in the face of adversity.
Diplomacy
Traih established high standards in Diplomacy as well. In spite of obvious interest in the League’s territory, the Imperium found themselves incapable of creating a situation where they could justify war. When Traih allowed his daughter to marry into the Imperial Family, pease was established for several generations.
The Bafiktuy Intelligence Directive sought to infiltrate the government early, but Traih’s earlier purging of anti-Monarch forces left behind a counter-espionage organization that exposed its efforts. Thus, embarassed by the BID’s failure, the Imperium was forced to withdraw. Simultaneously the League was able to both infiltrate the BID and Imperial government, and through effective manipulation of popular culture were able to establish sufficient popular support in the Imperium to dissuade further attempts at undermining the government.
These measures were enchanced after the Accordant was enacted. Apart from these defensive measures, the League government was prohibited from intrusion into Imperial society and were forbidden from engaging in aggressive wars.
Loss to the Imperium
What is most tragic to the Imperium is the Leagues relatively early disappearance due to hop pollution. The Imperium only had three stable lanes to access the League, and all three failed within years of one another. Thus, the potential effect of such a stable government was lost on the Imperium, forcing our government to remain an inept brood of vipers.


ON SYNCHRONIZATION PRIMITIVE SYSTEMS by
Richard J. Lipton
¢
¢
Department of Computer Science Carnegie-Mellon University Pittsburgh, Pennsylvania 15213
Submitted to Carnegie-Mellon University in partial fulfillsent of the requirements for the degree of Doctor of Philosophy
This work was supported by the Advanced Research Projects Agency of the Office of the Secretary of Defense (F44620- 70-C-0107) and is monitored by the Air Force Office of Scientific Research. This document has been approved for public release and sale, Its distribution is unlimited.
ce anette RARE
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.


This is a simple WYSIWYG editor with jQuery/Bootstrap3/FontAwesome.
bootstrap2 based: https://github.com/huacnlee/jquery.qeditor
bootstrap3 based: https://github.com/gihnius/jquery.qeditor


 Eating out is costly and bringing meals becomes tedious and boring. With MealPool, you can eat different dishes each day, and best of all, you only have to bring food to work one day.
You can joing a meal pool near your place of work or study. Each person in your pool is responsible for bringing a meal for the group each week. You can choose 3 meals that you would like to bring on your assigned day and your pool mates can vote and choose the dish they prefer.
Be the first one to find out when MealPool is available to the public.


My Account
Book Tickets
Register
Page Not Found
Sorry, but the page you were trying to view does not exist.


By the way; this documentation was generated with the "ANT Doclet" from doc comments in the source code.
Antology is available under the terms of the "New BSD License":
Copyright (c) 2015, Arno Unkrig. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.


Files CCore/inc/ToMemBase.h CCore/src/ToMemBase.cpp
ToMemBase is a Partial class, designed to be a base class for "... to memory" classes.
class ToMemBase : NoCopy
{
uint8 *ptr;
ulen len;
protected:
uint8 * alloc(ulen len); // one-time call
public:
ToMemBase() noexcept;
~ToMemBase();
const uint8 * getPtr() const { return ptr; }
ulen getLen() const { return len; }
// std move
ToMemBase(ToMemBase &&obj) noexcept;
ToMemBase & operator = (ToMemBase &&obj) noexcept;
// swap/move objects
void objSwap(ToMemBase &obj);
explicit ToMemBase(ToMoveCtor<ToMemBase> obj);
};
It has the protected method alloc(), it must be called no more than once in a derived class.
Default constructor initialize the class in the null state. Destructor releases the allocated memory.
ToMemBase is std movable. The original object is nullified during the move.
The class is swappable and movable.


"x" "1" "WENING,JV, MARQUARDT,H, KATZER,A, JUNGBLUTH,KH AND MARQUARDT,H,CYTOTOXICITY AND MUTAGENICITY OF KEVLAR: AN IN VITRO EVALUATION, BIOMATERIALS16(4):337-340, 1995"


|
QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.30
|
#include <ql/experimental/volatility/volcube.hpp>
Public Member Functions | |
| VolatilityCube (std::vector< Handle< InterestRateVolSurface > >, std::vector< Handle< AbcdAtmVolCurve > >) | |
| const Period & | minIndexTenor () const |
| const Period & | maxIndexTenor () const |
| const std::vector< Handle< InterestRateVolSurface > > & | surfaces () const |
| const std::vector< Handle< AbcdAtmVolCurve > > & | curves () const |
Protected Attributes | |
| std::vector< Handle< InterestRateVolSurface > > | surfaces_ |
| std::vector< Handle< AbcdAtmVolCurve > > | curves_ |
Definition at line 38 of file volcube.hpp.
| VolatilityCube | ( | std::vector< Handle< InterestRateVolSurface > > | surfaces, |
| std::vector< Handle< AbcdAtmVolCurve > > | curves | ||
| ) |
Definition at line 27 of file volcube.cpp.
| const Period & minIndexTenor | ( | ) | const |
| const Period & maxIndexTenor | ( | ) | const |
| const std::vector< Handle< InterestRateVolSurface > > & surfaces | ( | ) | const |
Definition at line 54 of file volcube.hpp.
| const std::vector< Handle< AbcdAtmVolCurve > > & curves | ( | ) | const |
Definition at line 59 of file volcube.hpp.
|
protected |
Definition at line 47 of file volcube.hpp.
|
protected |
Definition at line 48 of file volcube.hpp.


| Lee M. | has entered the room |
| Lee M. | back... sorry about that |
| Matt T. | no prob |
| Jason S. | no prob |
| Jason S. | i was assuming who you were |
| Jason S. | because i just got notification of the info email you sent |
| Lee M. | yeah... I'm the one who just posted 2 emails |
| Matt T. | we'd be happy to answer questions you might have |
| Lee M. | When will you be ready for operation? |
| Matt T. | we're officially opening up next wednesday |
| Matt T. | you mentioned hosting your rails apps on a VPS |
| Aug 4 | 4:45 PM |
| Lee M. | We're considering dedicated servers, too... but VPS seems to be recommended on the Rails mailing list. |
| Jason S. | vps is a good fit for rails |
| Matt T. | that was a huge factor in us launching the VPS services, because dedicated works great for rails, but is $$$ |
| Jason S. | vps is a good middle |
| Jason S. | much better than shared |
| Lee M. | Do you have a recommended rails setup? |
| Lee M. | i.e. apache 2.2 or lighttpd |
| Lee M. | mongrel or fastcgi |
| Matt T. | yes we have some preconfigured rails stacks |
| Matt T. | mongrel clusters for us please :) |
| Matt T. | with apache serving static |
| Matt T. | we can support lighttpd & fastcgi too, but mongrel/apache is the best combo to date |
| Matt T. | especially if you use capistrano |
| Lee M. | have you always been in the hosting business or are you rails developers who saw an opportunity to provide good rails hosting services? |
| Matt T. | we've provided managed hosting services for quite sometime. |
| Matt T. | linux based, mail, web, etc. dedicated colo boxes for businesses. |
| Matt T. | but most of that business hosts our development projects |
| Daniel W. | has entered the room |
| Matt T. | hi dan |
| Aug 4 | 4:50 PM |
| Jason S. | hello |
| Lee M. | What types of management is included in the basic services? |
| Jason S. | by basic service, you mean vps? |
| Matt T. | the ability to install packages and reboot the server for VPS slices. |
| Daniel W. | Hey guys, I am Lee's collegue and wanted to try to follow the discussion without leaning over his shoulder. But campfire just shows me the discusion from the point I joined. So let me catch up, over his shoulder :-) |
| Lee M. | how about setting up automated backups and monitoring of applications? |
| Matt T. | the automated backups would be handled under our managed services. |
| Matt T. | we take live snapshots of the VPS at different points, then move it offsite for backup. |
| Matt T. | we also have it ready to restore, should something happen to your VPS locally. |
| Lee M. | how much are your managed packages? |
| Matt T. | they are customized based on monitoring, backup and admin needs. |
| Matt T. | so for instance |
| Aug 4 | 4:55 PM |
| Matt T. | you could just add on backups which is based on disk usage. |
| Matt T. | we already have networking and hardware monitoring in place, but if you wanted to check specific applications, we could handle that too. |
| Matt T. | daniel - did you have any questions from the stuff you missed? |
| Daniel W. | Not yet. I am not convinced by VPS I preffer a dedicated host and Lee did like your still and the fact that your a just starting. |
| Matt T. | it kind of depends on how much you want to spend and what your application demands are. |
| Matt T. | we started the VPS stuff, because there was a huge gap between shared hosting performance and dedicated machine costs. |
| Matt T. | we're developers too, and found most of our smaller clients didn't want full managed/dedicated hosting. |
| Daniel W. | To be honest the application demand of our biggest app (for us not our customers) is not that big. Currently it's time.onrails.org, a Rails app that has about 300 users. But even with a single user it's pretty slow on Dreamhost shared plan. So we wanted to provide something way faster. |
| Matt T. | a VPS/dedicated package will smoke dreamhost :) |
| Jason S. | do you understand how the xen vps works? |
| Lee M. | that's what we like to hear |
| Daniel W. | Go ahead, we listen. |
| Jason S. | the basic premise |
| Aug 4 | 5:00 PM |
| Jason S. | is that you are able to designate system resources |
| Jason S. | in a hard way |
| Lee M. | FYI, if you can't tell, English isn't Daniel's first language :) |
| Jason S. | so that what one user is doing on the machine cannot affect other users |
| Jason S. | on a shared hosting system |
| Jason S. | if one website hits a peak in terms of visitors |
| Jason S. | lets say they are hitting a mysql backend |
| Daniel W. | But I can read very good :-) |
| Jason S. | it can really eat up available resources, especially memory |
| Jason S. | in the world of xen, your memory is yours. no one else can touch it |
| Jason S. | same with processor slices |
| Daniel W. | So for 1024slice how much disk/cpu usage do you have at any moment. In other words what's the mimimum garanteed? Is it burstable? |
| Matt T. | a VPS basically splits one big server, into several smaller servers. |
| Jason S. | your disk is constant |
| Jason S. | you would get 1GB of ram |
| Jason S. | always |
| Lee M. | how much processor do we get per slice? is that a hard maximum or can it unused portions of other slices' cpu? |
| Jason S. | and you get a defined % of utilization |
| Matt T. | each slice is alloted a portion of the CPU based on the slice size. 1024 would be the largest. |
| Jason S. | there is a minimum guarantee, you get more if its not in use |
| Matt T. | but when the system is not under full load, you can take as much as you need. |
| Daniel W. | What's that mimimum? |
| Matt T. | 50% of one CPU |
| Matt T. | for a 1024 slice |
| Daniel W. | That's not bad :-) |
| Aug 4 | 5:05 PM |
| Daniel W. | So yo are using a colocation facility in Saint Louis? Datotel? |
| Matt T. | yes we have space in their NOC |
| Daniel W. | How many servers do you have now? |
| Matt T. | we have 4 racks at datotel |
| Matt T. | up the street |
| Matt T. | the VPS is a new offering at this point |
| Matt T. | so we are buying servers as we need them |
| Daniel W. | Cool. We are not done with the questions :-), but in any case I whish success. |
| Matt T. | thanks. how about you guys - all rails development? |
| Daniel W. | Do you provide updates and maintenance for the operating system? |
| Matt T. | not on the VPS slices |
| Matt T. | we will offer package update and such via the management portal. |
| Daniel W. | Yea, since october last year. We just finished a big eCommerce platform that requires heavy traffic. |
| Matt T. | but actually executing that falls on the customers. |
| Matt T. | it is just one button to push though ;) |
| Daniel W. | My worry is security update when I am gone over a week-end. |
| Matt T. | sure - are you using mysql? |
| Daniel W. | Yes. |
| Matt T. | you can minimize security exposure, so that the only ways into the box are via SSH and the web. |
| Matt T. | if there was a major SSH vulnerability, we would immediately push updates out to all slices. since every machine uses it. |
| Aug 4 | 5:10 PM |
| Matt T. | what distro have you been hosting on? |
| Daniel W. | No it was os related. I had a redhat server, they issued a security update. I didn't see before the week-end over and my server was attacked. So, I preferred paying more to have people taking care of these nitty-gritty details, that are so important. |
| Daniel W. | That was around the year 2000...I don't recall. |
| Matt T. | you can automate a lot of the package updates to happen automatically. |
| Matt T. | that might save you again one day... |
| Matt T. | we handle security updates/monitoring for several larger clients. but the windows boxes keep us up at night, not linux ;) |
| Daniel W. | Lee, really want to go with you guys. I think from a support point of view that would make sense, as you need to make good impression and will certainly work hard to make you venture successfull. Are you working full time on it? |
| Matt T. | yes - we have been doing hosting for a while, so it's not quite a completely new business. |
| Matt T. | just an expansion. |
| Lee M. | do you provide an admin panel to make it easy to add domains, subdomains, svn repositories, users, etc? |
| Matt T. | we dont' handle dns, but are partnering w/ DNSmadeEasy to do so. |
| Daniel W. | What firewall solution do you offer? |
| Matt T. | svn repositories can be setup via package installs (pushed out via portal). |
| Aug 4 | 5:15 PM |
| Matt T. | we could customize one on your slice based on your needs. iptables based. |
| Lee M. | we could use our existing name registrars to add new domains and subdomains, we would just need to point them to the IP address you give us, right? |
| Matt T. | correct. |
| Matt T. | one IP per slice, so if you were hosting multiple domains, you would use name based virtual hosting. |
| Jason S. | or you could buy multiple sices, ;) |
| Jason S. | slices |
| Daniel W. | We need to support dynamic subdomains on our application. Can than be configure with you guys? |
| Matt T. | do you mean 37signals like subdomains? |
| Matt T. | name.domain.com? |
| Daniel W. | Exact. |
| Matt T. | yeah that's actually handled bya rails plugin and some DNS configuration i believe |
| Daniel W. | Yea, as soon as your register to the aplication you would have your own url. i.e. matt.time.onrails.org or mat.timerpad.com |
| Matt T. | you point one domain at your IP with wildcard matching, then rails routes accordingly. |
| Matt T. | i am a big fan - think that is a nice touch for an app. |
| Daniel W. | Ok. We could set this up on a shared host. |
| Daniel W. | It's great when you need to share the app with several people. |
| Aug 4 | 5:20 PM |
| Daniel W. | I mean't we could not. |
| Matt T. | it would be tough at most places. |
| Daniel W. | That's all for me. Gotta run. Thanks for you time. |
| Jason S. | thank you for stopping by |
| Matt T. | no prob - let us know if you have any questions. |
| Matt T. | lee - did we cover everything? |
| Lee M. | ... i'm not done yet :) |
| Daniel W. | Any special deals? :-) |
| Lee M. | is portal an admin panel application? |
| Matt T. | we do referral discounts |
| Daniel W. | I refer Lee. |
| Matt T. | lee - the panel is a custom app, web based, that we wrote to managed the slice. |
| Matt T. | lol |
| Daniel W. | A Rails app? |
| Lee M. | do we have access to it? |
| Matt T. | yes rails app - you'll have access over an SSL port. |
| Lee M. | or do we need to install cpanel or webmin ourselves? |
| Matt T. | you can also login via SSH of course. |
| Matt T. | cpanel and webmin you would need to install. |
| Lee M. | we would have full root access, right? |
| Matt T. | yes full root - just like dedicated. |
| Aug 4 | 5:25 PM |
| Matt T. | do you have distribution preferences? |
| Lee M. | OS X :) |
| Matt T. | LOL - me too! |
| Matt T. | textmate? |
| Lee M. | of course |
| Matt T. | nothing but the best ;) |
| Lee M. | i'm most familiar with gentoo, but i'm not attached to it |
| Lee M. | i understand emerge, i don't get apt-get |
| Lee M. | we've heard good things about *BSD, but I've never installed anything on it |
| Matt T. | we're offering fedora, centos, debian and ubuntu to start. gentoo soon as well. |
| Lee M. | do you recommend any over the others? |
| Matt T. | i prefer ubuntu or centos. |
| Jason S. | apt-get is very easy to use |
| Matt T. | ubuntu is a more up to date debian, better support. centos is a free red hat enterprise version. |
| Aug 4 | 5:30 PM |
| Lee M. | how long does it take from when we sign up until we can login to the box? |
| Jason S. | less than a minute |
| Daniel W. | Ubuntu is backup by lost of money from the guys that create Thwat in South Africe. |
| Daniel W. | That's to much. Lee these guys are not serious. |
| Daniel W. | :-) |
| Jason S. | minute gives us breathing room |
| Jason S. | could be 20 secs |
| Matt T. | hey when you want a slice you want a slice! |
| Daniel W. | All right guys. You conviced me. We will start installing our app soon. |
| Jason S. | good to hear |
| Matt T. | looking forward to it. |
| Daniel W. | So what about a good deal? |
| Matt T. | send us your programmer friends and tell them to say "daniel sent me". |
| Matt T. | the credits will pile up :) |
| Daniel W. | What's the kick back? |
| Lee M. | daniel doesn't have friends |
| Matt T. | haha |
| Daniel W. | No, Lee is a collegue. |
| Jason S. | motivation to make some friends! |
| Aug 4 | 5:35 PM |
| Lee M. | one of _my_ friends is using railsmachine... how are you so much cheaper than them? |
| Jason S. | you got to us before we put that on the FAQ |
| Lee M. | you FAQ is a little sparse |
| Daniel W. | You should pay us for all the questions we had. |
| Jason S. | short answer, we thing other hosting charges more than necessary |
| Matt T. | we've asked ourselves that question a lot - we can only guess greed and perhaps they are just getting started. |
| Lee M. | good answer |
| Jason S. | check back in a day and we will have that on the FAQ |
| Lee M. | maybe they use it to fund Zed's mongrel development |
| Matt T. | that's not a bad place for it to go! |
| Lee M. | you could just post this whole chat to the FAQ :) |
| Matt T. | we didnt make it to railsconf, but heard he was a big hit (zed) |
| Matt T. | or post it on the wiki. for answers to all your questions see the lee/daniel/jason/matt roundtable. |
| Lee M. | are you coming to rubyconf? |
| Matt T. | didnt it just sell out? |
| Lee M. | i think so... it's in our home town (Denver) so we signed up quick |
| Daniel W. | Have a good week-end guys. I'll be back. |
| Matt T. | we've been working like crazy - a break would be nice. |
| Matt T. | later daniel. |
| Jason S. | i've actually got to step out also |
| Lee M. | if we decide to go with you guys... what are the next steps? should we email or call? we'll probably make a decision next week |
| Jason S. | lee, daniel - nice chatting with you |
| Lee M. | thanks, Jason |
| Matt T. | lee - we'll have the signup form live next week. just check back in and you can create a slice. |
| Daniel W. | Can I use this transcript on my blog to brag about you guys? |
| Aug 4 | 5:40 PM |
| Matt T. | if you're interested some of the managed stuff we discussed, shoot me an email to customize it. |
| Aug 4 | 5:40 PM |
| Matt T. | absolutely - that might get you some credits ;) |
| Jason S. | give us a link to the blog also |
| Jason S. | and thanks for the mention |
| Lee M. | ok... thanks for the info... we'll contact you next week... the blog will be on http://onrails.org |
| Matt T. | lee to discuss the managed and we can setup a call/chat. |
| Daniel W. | Doesn't go all the way back. So that won't work. That was just an idea. |
| Matt T. | i can send it to you daniel |
| Matt T. | whats your email? |
| Daniel W. | Cool. |
| Lee M. | cool... have a good weekend |
| Lee M. | has left the room |
| Jason S. | alright guys, you too |
| Matt T. | take care. |
| Daniel W. | has left the room |
| Jason S. | has left the room |


"Simplicity is the Final Achievement. After one has played a vast quantity of notes and more notes it is simplicity that emerges as the crowning achievement of art." - Chopin
Hey! My name is Vik, and I just wanted to thank you for taking the time to take a look at my blog. Right now, I'm a Software Engineer at Microsoft, but just last year I was finishing my last year in the Computer Science department at McGill University in Canada.
I honestly believe in simple, clean design. As such, in everything I do, I aim to make it as easiy and intuitive as possible. I believe that if you cannot explain a concept in three sentences, then you don't truly understand the concept.
Please Contact Me if you have an idea for a project we can work on together.


HOW WOULD I DESIGN A 1000th FLOOR ELEVATOR?
If there is a 1000 floor building and I would design the interface of the elevator to it. We should consider that there are many people are there in the building. One elevator is not enough to cater the population of the 1000 floor building. I will base the no. of elevators to the Burj Khalifa which is the tallest building in the world that has 163 floors.
According to Momin, W. (2019), the building Burj Khalifa has 57 elevators and 8 escalators. elevators have a capacity of 12 to 14 cabin, the fastest rising and descending at up to 10m/s for double-deck elevators.
Do the math:
163 floors = 57 elevators
11000 / 163 = 6.135 x 57 (elevators) = 349.70 (round-off) = 350 elevators.
I am assuming that 350 elevators are enough to cater the population in the 1000 floor building. To avoid people waiting in line, not all elevators cater the 1000 floors. I will group the elevators into odd and even scheme based on the elevator in Asia Pacific College. Also, I will add the feature of an express elevator that caters every hundredth floor and for the 1000th floor.
Do the math:
350 elevators / 3 = 116 with a remainder 2
Why 3? Because it is for the three schemes of the elevator which is odd, even and express.
• 116 odd elevators – caters 500 floors because there are 500 odd numbers in a 1000
• 116 even elevators – caters 500 floors because there are 500 even numbers in a 1000
• 116 express elevators – caters every 100th floor to 1000th floor on the building
• 2 elevator lifts – this where all the heavy packages will go through. This will also have an odd and even scheme.
On every elevator it has the capacity of 12 to 14 persons based on the capacity of the Burj Khalifa’s elevator. The 1000 floor building elevator will have the capacity of 2000kg or 4000lbs. According to elevation-fandom, the standard limit of an elevator capacity of high-rise buildings are close to 4,000 lbs.
The elevator lift will have the capacity of 5,900kg. It is based on the largest passenger elevator in Sumitomo Fudosan Roppongi Grand Tower in Japan, that has a size of 3.35 width x 3.15m in depth that can accommodate 90 persons with a maximum capacity of 5800kg.
The elevator lift will have the capacity of 5,900kg. It is based on the largest passenger elevator in Sumitomo Fudosan Roppongi Grand Tower in Japan, that has a size of 3.35 width x 3.15m in depth that can accommodate 90 persons with a maximum capacity of 5800kg.
On every elevator, there would be a keypad 0-9, in which the user will input the floor number he/she wanted to go. If the user had a mistake in entering a number, the user will input 0-0-0-0 to enter again their desired. There is also an emergency button at the top of the panel, in case of an emergency happened. On an express elevator, there would be a button for 100, 200, 300, 400, 500, 600, 700, 800, and 1000. A button will glow red when a button is pressed.
Speed of the Elevator: The speed of the elevator to a 1000 floor building is 3,313 feet per minute which is based to the world’s fastest elevator which is the Taipei101 according to Willet, M. (2013). Due to the number of floors, it would take time for the users to reach its floor destination. Inside the elevator, there would be foldable seats to make the users comfortable and a television that would entertain them.
Outside the elevator, there would be a signage at the top to tell if it is an odd, even, express or a lift. There is a screen beside the elevator that would tell the status where the elevator is. Also, there is an up and a down button, to tell the elevator if the user is going up or going down.
SUMMARY ELEVATOR DETAILS
No. of elevator:
350 (116-odd floors, 116-even floors, 116-every 100th floor, 1 elevator lift – odd floors, and 1 elevator lift – even floors)
Elevator Capacity: 2,000kgs (standard limit of high-rise building)
Elevator lift Capacity: 5800kgs (capacity of the world’s largest elevator)
Speed of the elevator: 3,313feet/min (speed of the Taipei101 elevator)
Odd and even floors have keypad features while express have buttons to be pressed.
Inside the elevator has foldable seats and T.V.
References:
https://www.businessinsider.com/the-8-fastest-elevators-in-the-world-2013-1
https://elevation.fandom.com/wiki/Capacity
https://www.constructionweekonline.com/article-20616-burj-khalifa-has-worlds-third-fastest-elevator
https://www.great-towers.com/towers/burj-khalifa/
https://www.businessinsider.com/the-tallest-buildings-in-the-world-2015-12#1-burj-khalifa-22
https://www.quora.com/How-many-elevators-are-there-in-the-Burj-Khalifa-Skyscrapers
http://www2.toshiba-elevator.co.jp/elv/infoeng/technology/largecapacity/


Media¶
list_media_files¶
-
Client.
list_media_files
()¶ Gets a list of user’s media files.
Return type: types.GeneratorType Returns: list of media files Example: list media files and save any with the name dog in file name:
media_list = api.list_media_files() for media in media_list: if 'dog' in media['media_name'].lower(): stream, content_type = api.download_media_file(media['media_name']) with io.open(media['media_name'], 'wb') as file: file.write(stream.read())
upload_media_file¶
-
Client.
upload_media_file
(media_name, content=None, content_type='application/octet-stream', file_path=None)¶ Upload a file
Parameters: - media_name (str) – name of file on bandwidth server
- content (str|buffer|bytearray|stream|file) – content of file to upload (file object, string or buffer). Don’t use together with file_path
- content_type (str) – mime type of file
- file_path (str) – path to file to upload. Don’t use together with content
Example: Upload text file:
api.upload_media_file('file1.txt', 'content of file', 'text/plain') # with file path api.upload_media_file('file1.txt', file_path='/path/to/file1.txt')
download_media_file¶
-
Client.
download_media_file
(media_name)¶ Download a file
Parameters: media_name (str) – name of file on bandwidth server :rtype (stream, str) :returns stream to file to download and mime type
Example: list media files and save any with the name dog in file name:
media_list = api.get_media_files() for media in media_list: if 'dog' in media['media_name'].lower(): stream, content_type = api.download_media_file(media['media_name']) with io.open(media['media_name'], 'wb') as file: file.write(stream.read())