.primary_key
[ GitHub ]# File 'activerecord/lib/active_record/internal_metadata.rb', line 20
def primary_key "key" end
123456789_123456789_123456789_123456789_123456789_
This class is used to create a table that keeps track of values and keys such as which environment migrations were run in.
This is enabled by default. To disable this functionality set use_metadata_table
to false in your database configuration.
::ActiveModel::AttributeMethods
- IncludedCALL_COMPILABLE_REGEXP, FORWARD_PARAMETERS, NAME_COMPILABLE_REGEXP
AttributeMethods
- IncludedCallbacks
- Included::ActiveModel::SecurePassword
- IncludedNestedAttributes
- IncludedTransactions
- IncludedSecureToken
- IncludedEncryption::EncryptableRecord
- IncludedBase
- InheritedConnectionHandling
- Extended| connected? | Returns |
| connection_specification_name | Return the connection specification name from the current class or its parent. |
| connection_specification_name=, | |
| shard_swapping_prohibited? | Determine whether or not shard swapping is currently prohibited. |
| primary_class? |
Creates an internal metadata table with columns key
and value
Base
- Inherited| .after_commit | |
| .after_create | |
| .after_destroy | |
| .after_find | |
| .after_initialize | |
| .after_rollback | |
| .after_save | |
| .after_touch | |
| .after_update | |
| .around_create | |
| .around_destroy | |
| .around_save | |
| .around_update | |
| .before_create | |
| .before_destroy | |
| .before_save | |
| .before_update | |
| .current_preventing_writes | Returns the symbol representing the current setting for preventing writes. |
| .current_role | Returns the symbol representing the current connected role. |
| .current_shard | Returns the symbol representing the current connected shard. |
| .asynchronous_queries_session, .asynchronous_queries_tracker, .connected_to_stack, .connection_class_for_self, .strict_loading_violation! |
::ActiveModel::Callbacks
- InheritedAggregations::ClassMethods
- Extended| composed_of | Adds reader and writer methods for manipulating a value object: |
| reader_method, writer_method |
Delegation::DelegateCache
- Extended| generate_relation_method, inherited, initialize_relation_delegate_cache, relation_delegate_class, include_relation_methods, generated_relation_methods |
Enum
- Extended| _enum_methods_module, assert_valid_enum_definition_values, detect_enum_conflict!, detect_negative_enum_conditions!, enum, raise_conflict_error, _enum, inherited |
Explain
- Extended| render_bind, | |
| collecting_queries_for_explain | Executes the block with the collect flag enabled. |
| exec_explain | Makes the adapter execute EXPLAIN for the tuples of queries and bindings. |
DelegatedType
- Extended| delegated_type | Defines this as a class that’ll delegate its type for the passed |
| define_delegated_type_methods |
DynamicMatchers
- ExtendedTranslation
- Extended| i18n_scope | Set the i18n scope to override |
| lookup_ancestors | Set the lookup ancestors for |
::ActiveModel::Translation
- Included| human_attribute_name | Transforms attribute names into a more human format, such as “First name” instead of “first_name”. |
| i18n_scope | Returns the |
| lookup_ancestors | When localizing a string, it goes through the lookup returned by this method, which is used in ActiveModel::Name#human, ActiveModel::Errors#full_messages and ActiveModel::Translation#human_attribute_name. |
Querying
- Extended| _load_from_sql, _query_by_sql, | |
| count_by_sql | Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. |
| find_by_sql | Executes a custom SQL query against your database and returns all the results. |
QueryCache::ClassMethods
- Extended| cache | Enable the query cache within the block if Active Record is configured. |
| uncached | Disable the query cache within the block if Active Record is configured. |
ConnectionHandling
- Extended| clear_active_connections!, clear_all_connections!, | |
| clear_query_caches_for_current_thread | Clears the query cache for all connections associated with the current thread. |
| clear_reloadable_connections!, | |
| connected_to | Connects to a role (e.g. writing, reading, or a custom role) and/or shard for the duration of the block. |
| connected_to? | Returns true if role is the current connected role. |
| connected_to_many | Connects a role and/or shard to the provided connection names. |
| connecting_to | Use a specified connection. |
| connection | Returns the connection currently associated with the class. |
| connection_db_config | Returns the db_config object from the associated connection: |
| connection_pool, | |
| connects_to | Connects a model to the databases specified. |
| establish_connection | Establishes the connection to the database. |
| flush_idle_connections!, | |
| prohibit_shard_swapping | Prohibit swapping shards while inside of the passed block. |
| remove_connection, retrieve_connection, | |
| while_preventing_writes | Prevent writing to the database regardless of role. |
| append_to_connected_to_stack, clear_on_handler, resolve_config_for_connection, with_handler, with_role_and_shard, clear_cache!, lookup_connection_handler, | |
| mysql2_connection | Establishes a connection to the database that’s used by all Active Record objects. |
| postgresql_connection | Establishes a connection to the database that’s used by all Active Record objects. |
| sqlite3_connection, swap_connection_handler |
::ActiveSupport::DescendantsTracker
- Extended| descendants | See additional method definition at line 88. |
| direct_descendants | See additional method definition at line 92. |
| inherited, | |
| subclasses | See additional method definition at line 82. |
::ActiveSupport::Benchmarkable
- Extended| benchmark | Allows you to measure the execution time of a block in a template and records the result to the log. |
::ActiveModel::Naming
- Extended| model_name | Returns an |
Base
- InheritedEncryption::EncryptableRecord
- IncludedSerialization
- IncludedNoTouching
- Included| #no_touching? | Returns |
TouchLater
- IncludedTransactions
- Included| #_committed_already_called, #_trigger_destroy_callback, #_trigger_update_callback, #has_transactional_callbacks?, #trigger_transactional_callbacks? |
AutosaveAssociation
- Included| #changed_for_autosave? | Returns whether or not this record has been changed in any way (including whether any of its nested autosave associations are likewise changed). |
| #destroyed_by_association | Returns the association for the parent being destroyed. |
| #destroyed_by_association= | Records the association that is being destroyed and destroying this record in the process. |
| #marked_for_destruction? | Returns whether or not this record will be destroyed as part of the parent’s save transaction. |
| #custom_validation_context?, | |
| #nested_records_changed_for_autosave? | Go through nested autosave associations that are loaded in memory (without loading any new ones), and return true if any are changed for autosave. |
Timestamp
- IncludedAttributeMethods::Dirty
- Inherited| #has_changes_to_save? | Will the next call to |
| #saved_changes? | Did the last call to |
::ActiveModel::Dirty
- Included| #attribute_aliases, #attribute_aliases?, #attribute_method_matchers, #attribute_method_matchers?, | |
| #changed? | Returns |
AttributeMethods::PrimaryKey
- Inherited| #id | Returns the primary key column’s value. |
| #id= | Sets the primary key column’s value. |
| #id? | Queries the primary key column’s value. |
AttributeMethods
- IncludedLocking::Optimistic
- IncludedValidations
- Included::ActiveModel::AttributeAssignment
- IncludedPersistence
- Included| #destroyed? | Returns true if this object has been destroyed, otherwise returns false. |
| #new_record? | Returns true if this object hasn’t been saved yet – that is, a record for the object doesn’t exist in the database yet; otherwise, returns false. |
| #persisted? | Returns true if the record is persisted, i.e. |
| #previously_new_record? | Returns true if this object was just created – that is, prior to the last update or delete, the object didn’t exist in the database and new_record? would have returned true. |
| #previously_persisted? | Returns true if this object was previously persisted but now it has been deleted. |
Core
- Included| #frozen? | Returns |
| #readonly? | Returns |
| #strict_loading? | Returns |
| #strict_loading_mode, | |
| #strict_loading_n_plus_one_only? | Returns |
| #custom_inspect_method_defined?, #blank?, #present? |
Encryption::EncryptableRecord
- Included| #ciphertext_for | Returns the ciphertext for |
| #decrypt | Decrypts all the encryptable attributes and saves the changes. |
| #encrypt | Encrypts all the encryptable attributes and saves the changes. |
| #encrypted_attribute? | Returns whether a given attribute is encrypted or not. |
| #build_decrypt_attribute_assignments, #build_encrypt_attribute_assignments, #cant_modify_encrypted_attributes_when_frozen, #decrypt_attributes, #encrypt_attributes, #validate_encryption_allowed |
Suppressor
- IncludedSignedId
- Included| #signed_id | Returns a signed id that’s generated using a preconfigured |
Store
- IncludedSerialization
- Included::ActiveModel::Serializers::JSON
- Included| #as_json | Returns a hash representing the model. |
| #from_json | Sets the model |
::ActiveModel::Serialization
- Included| #serializable_hash | Returns a serialized hash of your object. |
| #attribute_names_for_serialization, | |
| #read_attribute_for_serialization | Hook method defining how an attribute value should be retrieved for serialization. |
| #serializable_attributes, | |
| #serializable_add_includes | Add associations specified via the |
NoTouching
- IncludedTouchLater
- Included| #before_committed!, #touch, #touch_later, #belongs_to_touch_method, #surreptitiously_touch, #touch_deferred_attributes |
Transactions
- Included| #transaction | See |
| #with_transaction_returning_status | Executes a block within a transaction and captures its return value as a status flag. |
| #add_to_transaction | Add the record to the current transaction so that the |
| #clear_transaction_record_state | Clear the new record state and id of a record. |
| #remember_transaction_record_state | Save the new record state and id of a record so it can be restored later if a transaction fails. |
| #restore_transaction_record_state | Restore the new record state and id of a record that was previously saved by a call to save_record_state. |
| #transaction_include_any_action? | Determine if a transaction included an action for |
| #before_committed!, | |
| #committed! | Call the |
| #destroy, | |
| #rolledback! | Call the |
| #save, #save!, #touch |
NestedAttributes
- Included| #_destroy | Returns |
| #allow_destroy?, | |
| #assign_nested_attributes_for_collection_association | Assigns the given attributes to the collection association. |
| #assign_nested_attributes_for_one_to_one_association | Assigns the given attributes to the association. |
| #assign_to_or_mark_for_destruction | Updates a record with the |
| #call_reject_if | Determines if a record with the particular |
| #check_record_limit! | Takes in a limit and checks if the attributes_collection has too many records. |
| #has_destroy_flag? | Determines if a hash contains a truthy _destroy key. |
| #raise_nested_attributes_record_not_found!, | |
| #reject_new_record? | Determines if a new record should be rejected by checking has_destroy_flag? or if a |
| #will_be_destroyed? | Only take into account the destroy flag if |
AutosaveAssociation
- Included| #mark_for_destruction | Marks this record to be destroyed as part of the parent’s save transaction. |
| #reload | Reloads the attributes of the object as usual and clears |
| #_ensure_no_duplicate_errors, | |
| #_record_changed? | If the record is new or it has changed, returns true. |
| #around_save_collection_association | Is used as an around_save callback to check while saving a collection association whether or not the parent was a new record before saving. |
| #associated_records_to_validate_or_save | Returns the record for an association collection that should be validated or saved. |
| #association_foreign_key_changed?, | |
| #association_valid? | Returns whether or not the association is valid and applies any errors to the parent, |
| #normalize_reflection_attribute, | |
| #save_belongs_to_association | Saves the associated record if it’s new or |
| #save_collection_association | Saves any new associated records, or all loaded autosave associations if |
| #save_has_one_association | Saves the associated record if it’s new or |
| #validate_collection_association | Validate the associated records if |
| #validate_single_association | Validate the association if |
Associations
- Included| #association | Returns the association instance for the given name, instantiating it if it doesn’t already exist. |
| #association_cached?, #initialize_dup, | |
| #association_instance_get | Returns the specified association instance if it exists, |
| #association_instance_set | Set the specified association instance. |
| #init_internals |
Timestamp
- Included::ActiveModel::Validations::Callbacks
- Inherited| #run_validations! | Override run_validations! to include callbacks. |
Callbacks
- Included| #after_create | Registers a callback to be called after a record is created. |
| #after_destroy | Registers a callback to be called after a record is destroyed. |
| #after_find | Registers a callback to be called after a record is instantiated via a finder. |
| #after_initialize | Registers a callback to be called after a record is instantiated. |
| #after_save | Registers a callback to be called after a record is saved. |
| #after_touch | Registers a callback to be called after a record is touched. |
| #after_update | Registers a callback to be called after a record is updated. |
| #around_create | Registers a callback to be called around the creation of a record. |
| #around_destroy | Registers a callback to be called around the destruction of a record. |
| #around_save | Registers a callback to be called around the save of a record. |
| #around_update | Registers a callback to be called around the update of a record. |
| #before_create | Registers a callback to be called before a record is created. |
| #before_destroy | Registers a callback to be called before a record is destroyed. |
| #before_save | Registers a callback to be called before a record is saved. |
| #before_update | Registers a callback to be called before a record is updated. |
| #_create_record, #_update_record, #create_or_update, #destroy, #increment!, #touch |
AttributeMethods::Dirty
- Inherited| #attribute_before_last_save | Returns the original value of an attribute before the last save. |
| #attribute_change_to_be_saved | Returns the change to an attribute that will be persisted during the next save. |
| #attribute_in_database | Returns the value of an attribute in the database, as opposed to the in-memory value that will be persisted the next time the record is saved. |
| #attributes_in_database | Returns a hash of the attributes that will change when the record is next saved. |
| #changed_attribute_names_to_save | Returns an array of the names of any attributes that will change when the record is next saved. |
| #changes_to_save | Returns a hash containing all the changes that will be persisted during the next save. |
| #reload |
|
| #saved_change_to_attribute | Returns the change to an attribute during the last save. |
| #saved_change_to_attribute? | Did this attribute change when we last saved? |
| #saved_changes | Returns a hash containing all the changes that were just saved. |
| #will_save_change_to_attribute? | Will this attribute change the next time we save? |
| #_create_record, #_touch_row, #_update_record, #attribute_names_for_partial_inserts, #attribute_names_for_partial_updates |
::ActiveModel::Dirty
- Included| #changed | Returns an array with the name of the attributes with unsaved changes. |
| #changed_attributes | Returns a hash of the attributes with unsaved changes indicating their original values like |
| #changes | Returns a hash of changed attributes indicating their original and new values like |
| #changes_applied | Clears dirty data and moves |
| #clear_attribute_changes, | |
| #clear_changes_information | Clears all dirty data: current changes and previous changes. |
| #previous_changes | Returns a hash of attributes that were changed before the model was saved. |
| #restore_attributes | Restore all previous data of the provided attributes. |
| #attribute_change | Dispatch target for |
| #attribute_previous_change | Dispatch target for |
| #attribute_will_change! | Dispatch target for |
| #clear_attribute_change, #forget_attribute_assignments, #mutations_before_last_save, #mutations_from_database, | |
| #restore_attribute! | Dispatch target for |
| #as_json, | |
| #attribute_changed? | Dispatch target for |
| #attribute_changed_in_place?, | |
| #attribute_previously_changed? | Dispatch target for |
| #attribute_previously_was | Dispatch target for |
| #attribute_was | Dispatch target for |
| #initialize_dup |
AttributeMethods::PrimaryKey
- Inherited| #id_before_type_cast | Returns the primary key column’s value before type cast. |
| #id_in_database | Returns the primary key column’s value from the database. |
| #id_was | Returns the primary key column’s previous value. |
| #to_key | Returns this record’s primary key value wrapped in an array if one is available. |
| #attribute_method?, #id_for_database |
AttributeMethods::Query
- InheritedAttributeMethods::BeforeTypeCast
- Inherited| #attributes_before_type_cast | Returns a hash of attributes before typecasting and deserialization. |
| #attributes_for_database | Returns a hash of attributes for assignment to the database. |
| #read_attribute_before_type_cast | Returns the value of the attribute identified by |
| #attribute_before_type_cast | Dispatch target for |
| #attribute_came_from_user?, #attribute_for_database |
AttributeMethods::Write
- Inherited| #write_attribute | Updates the attribute identified by |
| #attribute= | Alias for AttributeMethods::Write#_write_attribute. |
| #_write_attribute | This method exists to avoid the expensive primary_key check internally, without breaking compatibility with the write_attribute API. |
AttributeMethods::Read
- Inherited| #read_attribute | Returns the value of the attribute identified by |
| #attribute | Alias for AttributeMethods::Read#_read_attribute. |
| #_read_attribute | This method exists to avoid the expensive primary_key check internally, without breaking compatibility with the read_attribute API. |
AttributeMethods
- Included| #[] | Returns the value of the attribute identified by |
| #[]= | Updates the attribute identified by |
| #accessed_fields | Returns the name of all database fields which have been read from this model. |
| #attribute_for_inspect | Returns an |
| #attribute_names | Returns an array of names for the attributes available on this object. |
| #attribute_present? | Returns |
| #attributes | Returns a hash of all the attributes with their names as keys and the values of the attributes as values. |
| #has_attribute? | Returns |
| #respond_to? | A Person object with a name attribute can ask |
| #attribute_method?, | |
| #attributes_for_create | Filters out the virtual columns and also primary keys, from the attribute names, when the primary key is to be generated (e.g. |
| #attributes_for_update | Filters the primary keys, readonly attributes and virtual columns from the attribute names. |
| #attributes_with_values, #format_for_inspect, #pk_attribute?, #_has_attribute? |
::ActiveModel::AttributeMethods
- Included| #attribute_missing |
|
| #method_missing | Allows access to the object attributes, which are held in the hash returned by |
| #respond_to?, | |
| #respond_to_without_attributes? | A |
| #_read_attribute, #attribute_method?, | |
| #matched_attribute_method | Returns a struct representing the matching attribute method. |
| #missing_attribute |
Locking::Pessimistic
- Included| #lock! | Obtain a row lock on this record. |
| #with_lock | Wraps the passed block in a transaction, locking the object before yielding. |
Locking::Optimistic
- Included| #_clear_locking_column, #_create_record, #_lock_value_for_database, #_query_constraints_hash, #_touch_row, #_update_row, #destroy_row, #increment!, #initialize_dup |
CounterCache
- IncludedValidations
- Included| #save | The validation process on save can be skipped by passing |
| #save! | Attempts to save the record just like |
| #valid? | Runs all the validations within the specified context. |
| #validate | Alias for Validations#valid?. |
| #default_validation_context, #perform_validations, #raise_validation_error |
::ActiveModel::Validations::HelperMethods
- Included| #validates_absence_of | Validates that the specified attributes are blank (as defined by Object#present?). |
| #validates_acceptance_of | Encapsulates the pattern of wanting to validate the acceptance of a terms of service check box (or similar agreement). |
| #validates_comparison_of | Validates the value of a specified attribute fulfills all defined comparisons with another value, proc, or attribute. |
| #validates_confirmation_of | Encapsulates the pattern of wanting to validate a password or email address field with a confirmation. |
| #validates_exclusion_of | Validates that the value of the specified attribute is not in a particular enumerable object. |
| #validates_format_of | Validates whether the value of the specified attribute is of the correct form, going by the regular expression provided. |
| #validates_inclusion_of | Validates whether the value of the specified attribute is available in a particular enumerable object. |
| #validates_length_of | Validates that the specified attributes match the length restrictions supplied. |
| #validates_numericality_of | Validates whether the value of the specified attribute is numeric by trying to convert it to a float with |
| #validates_presence_of | Validates that the specified attributes are not blank (as defined by Object#blank?). |
| #validates_size_of | |
| #_merge_attributes |
::ActiveModel::Validations
- Included| #errors | Returns the |
| #invalid? | Performs the opposite of |
| #read_attribute_for_validation | Hook method defining how an attribute value should be retrieved. |
| #valid? | Runs all the specified validations and returns |
| #validate | Alias for ActiveModel::Validations#valid?. |
| #validate! | Runs all the validations within the specified context. |
| #validates_with | Passes the record off to the class or classes specified and allows them to add errors based on more complex conditions. |
| #raise_validation_error, #run_validations!, | |
| #initialize_dup | Clean the |
Integration
- Included| #cache_key | Returns a stable cache key that can be used to identify this record. |
| #cache_key_with_version | Returns a cache key along with the version. |
| #cache_version | Returns a cache version that can be used together with the cache key to form a recyclable caching scheme. |
| #to_param | Returns a |
| #can_use_fast_cache_version? | Detects if the value before type cast can be used to generate a cache_version. |
| #raw_timestamp_to_cache_version | Converts a raw database string to |
::ActiveModel::Conversion
- Included| #to_key | Returns an |
| #to_model | If your object is already designed to implement all of the Active Model you can use the default |
| #to_param | Returns a |
| #to_partial_path | Returns a |
AttributeAssignment
- Included| #_assign_attributes, | |
| #assign_multiparameter_attributes | Instantiates objects for all attribute classes that needs more than one constructor parameter. |
| #assign_nested_parameter_attributes | Assign any deferred nested attributes after the base attributes have been set. |
| #execute_callstack_for_multiparameter_attributes, #extract_callstack_for_multiparameter_attributes, #find_parameter_position, #type_cast_attribute_value |
::ActiveModel::AttributeAssignment
- Included| #assign_attributes | Allows you to set all the attributes by passing in a hash of attributes with keys matching the attribute names. |
| #_assign_attribute, #_assign_attributes |
::ActiveModel::ForbiddenAttributesProtection
- IncludedScoping
- IncludedInheritance
- Included| #initialize_dup, | |
| #ensure_proper_type | Sets the attribute used for single table inheritance to this class name if this is not the |
| #initialize_internals_callback |
Persistence
- Included| #becomes | Returns an instance of the specified |
| #becomes! | Wrapper around |
| #decrement | Initializes |
| #decrement! | Wrapper around |
| #delete | Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted). |
| #destroy | Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted). |
| #destroy! | Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted). |
| #increment | Initializes |
| #increment! | Wrapper around |
| #reload | Reloads the record from the database. |
| #save | Saves the model. |
| #save! | Saves the model. |
| #toggle | Assigns to |
| #toggle! | Wrapper around |
| #touch | Saves the record with the updated_at/on attributes set to the current time or the time specified. |
| #update | Updates the attributes of the model from the passed-in hash and saves the record, all wrapped in a transaction. |
| #update! | Updates its receiver just like |
| #update_attribute | Updates a single attribute and saves the record. |
| #update_column | Equivalent to |
| #update_columns | Updates the attributes directly in the database issuing an UPDATE SQL statement and sets them in the receiver: |
| #_create_record | Creates a record with values matching those of the instance attributes and returns its id. |
| #_delete_row, #_find_record, #_query_constraints_hash, #_raise_readonly_record_error, #_raise_record_not_destroyed, #_raise_record_not_touched_error, #_touch_row, | |
| #_update_record | Updates the associated record with values matching those of the instance attributes. |
| #_update_row, #apply_scoping?, | |
| #belongs_to_touch_method | The name of the method used to touch a |
| #create_or_update, | |
| #destroy_associations | A hook to be overridden by association modules. |
| #destroy_row, #strict_loaded_associations, #verify_readonly_attribute |
Core
- Included| #<=> | Allows sort on objects. |
| #== | Returns true if |
| #clone | Identical to Ruby’s clone method. |
| #connection_handler, | |
| #dup | Duped objects have no id assigned and are treated as new records. |
| #encode_with | Populate |
| #eql? | Alias for Core#==. |
| #freeze | Clone and freeze the attributes hash such that associations are still accessible, even on destroyed records, but cloned models will not be frozen. |
| #hash | Delegates to id in order to allow two records of the same type and id to work with something like: |
| #init_with | Initialize an empty model object from |
| #initialize | New objects can be instantiated as either empty (pass no construction parameter) or pre-set with attributes but not yet saved (pass a hash with key names matching the associated table column names). |
| #inspect | Returns the contents of the record as a nicely formatted string. |
| #inspection_filter, | |
| #pretty_print | Takes a PP and prettily prints this record to it, allowing you to get a nice result from |
| #readonly! | Marks this record as read only. |
| #slice | Returns a hash of the given methods with their names as keys and returned values as values. |
| #strict_loading! | Sets the record to strict_loading mode. |
| #values_at | Returns an array of the values returned by the given methods. |
| #init_internals, #initialize_internals_callback, | |
| #to_ary |
|
| #init_with_attributes | Initialize an empty model object from |
| #initialize_dup |
This class handles dynamic methods through the method_missing method in the class ActiveModel::AttributeMethods
Boolean
(readonly)
# File 'activerecord/lib/active_record/internal_metadata.rb', line 16
def enabled? ActiveRecord::Base.connection. end
# File 'activerecord/lib/active_record/internal_metadata.rb', line 34
def [](key) return unless enabled? where(key: key).pick(:value) end
# File 'activerecord/lib/active_record/internal_metadata.rb', line 28
def []=(key, value) return unless enabled? find_or_initialize_by(key: key).update!(value: value) end
Creates an internal metadata table with columns key
and value
# File 'activerecord/lib/active_record/internal_metadata.rb', line 41
def create_table return unless enabled? unless connection.table_exists?(table_name) connection.create_table(table_name, id: false) do |t| t.string :key, **connection. t.string :value t. end end end
# File 'activerecord/lib/active_record/internal_metadata.rb', line 53
def drop_table return unless enabled? connection.drop_table table_name, if_exists: true end
# File 'activerecord/lib/active_record/internal_metadata.rb', line 20
def primary_key "key" end
# File 'activerecord/lib/active_record/internal_metadata.rb', line 24
def table_name "#{table_name_prefix}#{}#{table_name_suffix}" end


Sandwich Clicker
Sand: 0
Sandwiches: 0
Get 1 sand
Make 1 sandwich (1 sand)
The Sand Witch
Spell of Undersanding (5 sandwiches) (Resets sand requirements back to the beginning)
Spell of Oversanding (10 sandwiches) (Increases sand obtained from clicking by +1)
Spell of Sandwiching (10 sandwiches) (Increases the amount of sandwiches made by +1)
Spell of Calming (1000 sandwiches) (Reduces the amount of sand needed in sandstorm by 20%)
Sand Blessing (1 artifact) (Dramatically increases the amount of sand given per click)
Sandwich Blessing (1 artifact) (Dramatically increases the amount of sandwiches made)
SANDSTORM
Throw 1000 sand into the sandstorm


Sales Report
Revenue & number of customers reports
Goal Completion
Get new quotes
160/200
Get new customers
31/40
Reduce churn
4%/8%
Latest Orders
| Order | Origin | dest | goods | mode | Status | total KTons | total M$ |
|---|---|---|---|---|---|---|---|
| OR124 | Arizona | New York | Nonmetallic minerals | Air (include truck-air) | Shipped | 0.0142 | 93.6012 |
| OR125 | Louisiana | Texas | Chemical prods. | Water | Delivered | 7.2634 | 1.8346 |
| OR126 | California | Idaho | Basic chemicals | Rail | Pending | 41.2973 | 53.884 |
| OR127 | Washington | Texas | Machinery | Air (include truck-air) | Processing | 0.4856 | 31.7595 |
| OR128 | Oregon | Minnesota | Furniture | Truck | Delivered | 4.4454 | 38.116 |
| OR132 | Maine | Rhode Island | Other ag prods. | Truck | Delivered | 4.9298 | 1.9499 |
| OR133 | Michigan | Massachusetts | Coal-n.e.c. | Multiple modes & mail | Pending | 0.1966 | 0.8373 |
| OR134 | Kentucky | Texas | Crude petroleum | Water | Processing | 10.6991 | 7.1687 |
| OR135 | Iowa | Georgia | Alcoholic beverages | Multiple modes & mail | Delivered | 402.7126 | 290.7233 |
| OR136 | Washington | Kansas | Paper articles | Truck | Pending | 0.0043 | 0.1885 |
| OR137 | Illinois | Arkansas | Misc. mfg. prods. | Truck | Pending | 15.779 | 97.2067 |
| OR138 | California | Iowa | Precision instruments | Water | Processing | 0.8294 | 5.0889 |
| OR139 | Virginia | Alabama | Other ag prods. | Water | Shipped | 0.0178 | 0.0172 |


The PolyXpress player is a web application that allows you to experience location-based stories on all of your iOS and android devices. It takes you on a journey through real-world locations where you interact with your environment as a multimedia story unfolds.
PolyXpress Mobile Designer allows you to create PolyXpress, location-based stories. Once you have everything just right, you can publish your story and share it with PolyXpress users around the world. (The full desktop browser designer tool will be released soon.)
This field tool provides the means to determine the GPS coordinates for your present location and also associate short notes. As you build your story, it will help you record points of interest.


Input files
Broadband catalog
Gsf reads the ascii catalog specified with CAT_BB
in the configuration file.
The catalog format is similar to EAzY (Brammer et al. 2008)
and FAST (Kriek et al. 2009) and should be formatted as;
ID redshift [flux for filter 1] [flux error for filter 1]…
For example, if FILTER
in your configuration is assigned “202,205,…” (where the numbers correspond to filter response files; Filter response curve), the header of the broadband catalog has to be set as;
# ID redshift F202 E202 F205 E205…
(See also the example data provided in “example” directory.)
The redshift column in the ascii catalog is optional. If the redshift column is not included, redshift needs to be specified by ZGAL
in the configuration file.
The flux unit needs to be in f_nu, with a magnitude zero point \(m_0=25\), i.e.
Filter response curve
FILTER
array correspond to the response curve files stored in DIR_FILT
.
For example, if one of the keywords in FILTER
is “205”,
gsf will look into DIR_FILT
directory to find a filter response file named “205.fil”.
Standard filter response curve files are available in the package (cloned from EAzY), while users can add their own filter response files with the format as below;
# [Column_number] [Wavelength_in_AA] [Response]
Spectral data
When spectral data are provided, gsf reads the ascii spectral file for the target object, in DIR_EXTR
in the configuration file. The file name should be specified by SPEC_FILE
, that is formatted as;
# [Wavelength_in_AA] [Flux_nu] [Error_flux_nu]
Units of flux and error need to be in f_nu with a magnitude zero point \(m_0=25\).
For grism spectra, users are asked to provide morphological parameters of the target to appropriately convolve spectral templates to the size of the source. In the current version, gsf convolves model templates either with a 1-dimensional Moffat function,
or Gaussian,
The parameters should be stored in the path speficied by MORP_FILE
, in the following format (ascii);
# A gamma alpha
for both cases (i.e. put an arbitrary number for alpha if Gaussian). A is a normalization constant.


Events
The two days program is organized in two tracks.
8th to 12th class students who are highly motivated and interested in space science and technology can register in the program through online. 100 Students will be selected based on a personal interview. Registrations will be closed on 24 January 2017. The selected students will get an opportunity to participate in a two days residential program held at FISAT Campus. The different events for the two days residential programs are as follows. Please click the event to know the details
Eminent scientists and researchers from pioneer research institutes will be delivering lectures on various topics on space science and technology. Students will get an opportunity to interact with these scientists and clarify their doubts with them.
A quiz program will be conducted for the students to monitor the knowledge base of the students in the field of space science and technology. There will be a preliminary round of online quiz for the selected 100 students. The Top 6 winners of the preliminary round will be selected for the grand finale. Winners of the Quiz program will win amazing prizes.
In this workshop, the students will get training in making a telescope. Expertes from IUCAA will be leading the workshops. This will be really beneficial for students to enhance their hands on ability.
Indian Institute of Astrophysics, Bangalore and Inter University Centre for Astronomy and Astro Physics will be arranging telescope facilities for students for sky watching. This will give an opportunity for the students to see different planets and other extra terrestrial objects in a clear manner.
Science toys always generate curiosity among students towards different science principles. It also provides a platform for students to understand the fundamental scientific principles thoroughly. This session will be handled by experts from IUCAA, Pune
Virtual Reality space walk will definitely be a novel experience for the students. This programs aims at using the virtual reality technology in exhibiting different space related events to students. This technology provides the students a real time experience in space.
The students can experience planetarium here in our campus.
Science games will be a fun event for the visiting kids. Simple games are set up at varius location in the campus. Students can participate in these games and learn some scientific principles. Each science game will be associated with one or more science principles. This will enhance the knowledge and understanding of students about different scientific principles through interesting games.
Different competitions are organized for the selected 100 students to monitor their observation skills, reasoning skills, science communication skills etc. All these competitions will be used for selecting “FISAT Young Scientists”. The competitions and their rules and regulations will be intimated to students.
Individual students and educational organizations can visit the campus on these two days to enhance their knowledge and to experience the facilities provided.
Vikram Sarabai Space Centre, Indian Space Research Organisation (ISRO) is organsing a Space Exhibition. The visiting students can see the exhibition on these days.
Eminent Scientists and professors from different reputed organizations are giving popular lectures on various space related Topics. Educational Organizations can book slots for popular lectures on these days. Those you want to book slot for popular lecture can contact the convener of the program.
Science toys always generate curiosity among students towards different science principles. It also provides a platform for students to understand the fundamental scientific principles thoroughly. This session will be handled by experts from IUCAA, Pune
Virtual Reality space walk will definitely be a novel experience for the students. This programs aims at using the virtual reality technology in exhibiting different space related events to students. This technology provides the students a real time experience in space.
The students can experience planetarium here in our campus.
Science games will be a fun event for the visiting kids. Simple games are set up at varius location in the campus. Students can participate in these games and learn some scientific principles. Each science game will be associated with one or more science principles. This will enhance the knowledge and understanding of students about different scientific principles through interesting games.
Amazing Fun Events are waiting for the visiting students.


You are now ready to negotiate PIC and MAT for the access to Sopophorous beans genetic resources. The user explains that he is willing to improve the beans’ genetic resources for perfecting a magic potion.He insists that the genetic resource he is wishing to access be kept strictly confidential.
YOU MUST CHOOSE:
Grant PIC and MAT only for research purposes. The contract also stipulates that no patenting of the genetic resources or associated magic knowledge is allowed.
Grant PIC and MAT for commercial purposes, patenting and commercializing the products is allowed in exchange for a share in all the profits. You agree to a milestone payment if a patent is granted.
You refuse to grant PIC or MAT. It is your genetic resource and you will not have it exploited.


Serverless Egg.js Application
better enterprise frameworks and apps with Node.js & Koa
This website is hosted by
Serverless Framework


weka.core.expressionlanguage
package provides functionality to
easily create simple languages.See: Description
weka.core.expressionlanguage
package provides functionality to
easily create simple languages.
It does so through creating an AST (abstract syntax tree) that can then be
evaluated.
At the heart of the AST is the Node
interface. It's an empty interface to mark types to be an AST node.
Thus there are no real constraints on AST nodes so that they have as much
freedom as possible to reflect abstractions of programs.
To give a common base to build upon the Primitives
class provides the subinterfaces for the primitive boolean
(Primitives.BooleanExpression
),
double (Primitives.DoubleExpression
)
and String (Primitives.StringExpression
)
types.
It furthermore provides implementations of constants and variables of those
types.
Most extensibility is achieved through adding macros to a language. Macros
allow for powerful meta-programming since they directly work with AST nodes.
The Macro
interface defines what a
macro looks like.
Variable and macro lookup is done through
VariableDeclarations
and
MacroDeclarations
resp. Furthermore,
both can be combined through
VariableDeclarationsCompositor
and MacroDeclarationsCompositor
resp.
This really allows to add built-in variables and powerful built-in functions
to a language.
Useful implementations are:
SimpleVariableDeclarations
MathFunctions
IfElseMacro
JavaMacro
NoVariables
NoMacros
InstancesHelper
StatsHelper
weka.core.expressionlanguage.parser
package.
However the framework allows for other means to construct an AST if needed.
Built-in operators like (+, -, *, / etc) are a special case, since they can
be seen as macros, however they are strongly connected to the parser too.
To separate the parser and these special macros there is the
Operators
class which can be used
by the parser to delegate operator semantics elsewhere.
Node
interface. The
Macro
interface allows for powerful
meta-programming which is an important part of the extensibility features. The
Primitives
class gives a good
basis for the primitive boolean, double & String types.
The parser is responsible for building up the AST structure. It delegates
operator semantics to Operators
.
Symbol lookup is done through the
VariableDeclarations
and
MacroDeclarations
interfaces which
can be combined with the
VariableDeclarationsCompositor
and MacroDeclarationsCompositor
classes resp.
MathExpression
,
AddExpression
and
SubsetByExpression
.
A commonly used language is:
// exposes instance values and 'ismissing' macro
InstancesHelper instancesHelper = new InstancesHelper(dataset);
// creates the AST
Node node = Parser.parse(
// expression
expression, // textual representation of the program
// variables
instancesHelper,
// macros
new MacroDeclarationsCompositor(
instancesHelper,
new MathFunctions(),
new IfElseMacro(),
new JavaMacro()
)
);
// type checking is neccessary, but allows for greater flexibility
if (!(node instanceof DoubleExpression))
throw new Exception("Expression must be of boolean type!");
DoubleExpression program = (DoubleExpression) node;
weka.core.mathematicalexpression
package,
weka.core.AttributeExpression
class and the
weka.filters.unsupervised.instance.subsetbyexpression
package.
Due to their similarities it was decided to unify them into one expressionlanguage.
However backwards compatibility was an important goal, that's why there are
some quite redundant parts in the language (e.g. both 'and' and '&' are operators
for logical and).Copyright © 2018 University of Waikato, Hamilton, NZ. All Rights Reserved.


Tua Tagovailoa injury update: Prognosis 'excellent' after successful hip surgery
by Ben SprattAlabama quarterback Tua Tagovailoa has undergone successful surgery, the team announcedMonday.
The 21-year-old, whowas taken off the field on a cart in the second quarter ofAlabama's 38-7 win over Mississippi Statehaving suffered a season-ending dislocated hip and posterior wall fracture,had an operation in Houston. The team isoptimistic on his recovery.
A statement from orthopaedic surgeon Lyle Cain, released by Alabama, read: "Tua underwent successful surgery on his right hip Monday morning in Houston. The procedure went as planned, and he is resting comfortably.
"Tua's prognosis is excellent, and we expect him to make a full recovery. He will return to Tuscaloose in the next several days to begin his rehab."
NFL MOCK DRAFT 2020:
Tua drops out of first round after injury
Tagovailoa, along with LSU quarterback Joe Burrow, has been in the conversation to be the first overall pick in the 2020 NFL Draft.
He had completed 14 of his 18 passes for 256 yards and two touchdowns before the injury.
Tagovailoa had justreturned from ankle surgery the previous week in a 46-41 defeat at home to Burrow and LSU.


| Vendor Name | Calian, Ltd |
|---|---|
| Reference Number | 16-055 |
| Contract Date | 25-6-2015 |
| Description of Work | Services (R&D) |
| Delivery Date | 31-8-2015 |
| Contract Value | $89,399.50 |
| Comments | This is a notice of the restatement of Contract 16-055 dated 13/05/2015. The contract was misstated for $75,321.50 and has been corrected.This item contains one or more amendments. The contract was competitively sourced. |
| Additional Comments |


Oak Park Township wants to help its youth develop a positive sense of community and responsibility. To do this, we offer high-quality educations, recreational and vocation volunteer opportunities to enrich and address community needs and help young people develop a commitment to service.
For more information about current youth volunteer opportunities, please use our "Contact Us" form and select Youth Services, or call:
Susan Stearns
Youth Services
105 S Oak Park Ave
Oak Park, IL 60302
708.445.2727. ext. 127


Toggle navigation
e-Watch Store
Home page
(current)
Products
Watches for Men
Watches for Women
Watches for Kids
Luxury Watchs
Others
About us
Contact us
${sessionScope.account}
Submit
Logout


Class SquareTubing, that holds all the nessesary information for SquareTubing and it's details therefore we can use in the interface.
More...
#include <square_tubing.h>
Class SquareTubing, that holds all the nessesary information for SquareTubing and it's details therefore we can use in the interface.
◆ SquareTubing()
| MassCalculator::Shapes::SquareTubing::SquareTubing |
( |
meter_t |
side, |
|
|
meter_t |
thickness, |
|
|
meter_t |
length |
|
) |
| |
◆ getInnerDiagonal()
| meter_t MassCalculator::Shapes::SquareTubing::getInnerDiagonal |
( |
void |
| ) |
const |
Get the inner Diagonal object.
- Returns
- meter_t Inner Diagonal of the SquareTubing
◆ getLength()
| meter_t MassCalculator::Shapes::SquareTubing::getLength |
( |
void |
| ) |
const |
Get the Length object.
- Returns
- meter_t Length of the SquareTubing
◆ getOutterDiagonal()
| meter_t MassCalculator::Shapes::SquareTubing::getOutterDiagonal |
( |
void |
| ) |
const |
Get the outter Diagonal object.
- Returns
- meter_t Outter Diagonal of the SquareTubing
◆ getSide()
| meter_t MassCalculator::Shapes::SquareTubing::getSide |
( |
void |
| ) |
const |
Get the Side object.
- Returns
- meter_t Side of the SquareTubing
◆ getSurfaceArea()
| square_meter_t MassCalculator::Shapes::SquareTubing::getSurfaceArea |
( |
void |
| ) |
const |
Get the Surface Area object.
- Returns
- square_meter_t Surface Are of the SquareTubing
◆ getThickness()
| meter_t MassCalculator::Shapes::SquareTubing::getThickness |
( |
void |
| ) |
const |
Get the Thickness object.
- Returns
- meter_t Thickness of the SquareTubing
◆ getType()
| std::string MassCalculator::Shapes::SquareTubing::getType |
( |
void |
| ) |
const |
Get the type as string.
- Returns
- std::string Type as string
◆ getVolume()
| cubic_meter_t MassCalculator::Shapes::SquareTubing::getVolume |
( |
void |
| ) |
const |
Get the Volume object.
- Returns
- cubic_meter_t Volume of the SquareTubing
◆ setSize()
| bool MassCalculator::Shapes::SquareTubing::setSize |
( |
meter_t |
side, |
|
|
meter_t |
thickness, |
|
|
meter_t |
length |
|
) |
| |
Set the Size object.
- Parameters
-
- Returns
- true If setting the size is successful
-
false If setting the size fails
The documentation for this class was generated from the following files:
- /home/runner/work/masscalculator.github.io/masscalculator.github.io/MassCalculator/masscalculator-core/libraries/masscalculator-core/include/masscalculator/masscalculator-core/shapes/square_tubing.h
- /home/runner/work/masscalculator.github.io/masscalculator.github.io/MassCalculator/masscalculator-core/libraries/masscalculator-core/src/shapes/square_tubing.cc


{% if feed.error %}
Last time it was checked, the feed had the following error:
{{ feed.error }}
The feed is still being checked.
The feed is no longer being checked.


|
|
@@ -32,6 +32,8 @@ class TestResponse: KituraTest { |
|
static var allTests: [(String, (TestResponse) -> () throws -> Void)] {
|
|
static var allTests: [(String, (TestResponse) -> () throws -> Void)] {
|
|
return [
|
|
return [
|
|
("testSimpleResponse", testSimpleResponse),
|
|
("testSimpleResponse", testSimpleResponse),
|
|
|
|
+ ("testResponseNoEndOrNext", testResponseNoEndOrNext),
|
|
|
|
+ ("testEmptyHandler", testEmptyHandler),
|
|
("testPostRequest", testPostRequest),
|
|
("testPostRequest", testPostRequest),
|
|
("testPostRequestTheHardWay", testPostRequestTheHardWay),
|
|
("testPostRequestTheHardWay", testPostRequestTheHardWay),
|
|
("testPostJSONRequest", testPostRequest),
|
|
("testPostJSONRequest", testPostRequest),
|
|
|
@@ -74,7 +76,39 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received\n\n")
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received\n\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
|
|
+ }
|
|
|
|
+ expectation.fulfill()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ func testResponseNoEndOrNext() {
|
|
|
|
+ performServerTest(router) { expectation in
|
|
|
|
+ self.performRequest("get", path:"/noEndOrNext", callback: {response in
|
|
|
|
+ XCTAssertEqual(response?.statusCode, HTTPStatusCode.OK, "HTTP Status code was \(response?.statusCode)")
|
|
|
|
+ XCTAssertNotNil(response?.headers["Date"], "There was No Date header in the response")
|
|
|
|
+ do {
|
|
|
|
+ let body = try response?.readString()
|
|
|
|
+ XCTAssertEqual(body, "<!DOCTYPE html>noEndOrNext\n\n")
|
|
|
|
+ } catch {
|
|
|
|
+ XCTFail("Error reading body")
|
|
|
|
+ }
|
|
|
|
+ expectation.fulfill()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ func testEmptyHandler() {
|
|
|
|
+ performServerTest(router) { expectation in
|
|
|
|
+ self.performRequest("get", path:"/emptyHandler", callback: {response in
|
|
|
|
+ XCTAssertEqual(response?.statusCode, HTTPStatusCode.serviceUnavailable, "HTTP Status code was \(response?.statusCode)")
|
|
|
|
+ XCTAssertNotNil(response?.headers["Date"], "There was No Date header in the response")
|
|
|
|
+ do {
|
|
|
|
+ let body = try response?.readString()
|
|
|
|
+ XCTAssertNil(body, "No body expected, but was received: '\(body!)'")
|
|
|
|
+ } catch {
|
|
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -91,7 +125,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received text body: plover\nxyzzy\n\n\n")
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received text body: plover\nxyzzy\n\n\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -109,7 +143,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "Read 13 bytes")
|
|
XCTAssertEqual(body, "Read 13 bytes")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -139,7 +173,7 @@ class TestResponse: KituraTest { |
|
let returnedJSON = JSON.parse(string: body)
|
|
let returnedJSON = JSON.parse(string: body)
|
|
XCTAssertEqual(returnedJSON, jsonToTest)
|
|
XCTAssertEqual(returnedJSON, jsonToTest)
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}, headers: ["Content-Type": "application/json"]) { req in
|
|
}, headers: ["Content-Type": "application/json"]) { req in
|
|
|
@@ -164,7 +198,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received text body: plover\nxyzzy\n\n\n")
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received text body: plover\nxyzzy\n\n\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -183,7 +217,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received URL encoded body
 [\"swift\": \"rocks\"] \n\n")
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received URL encoded body
 [\"swift\": \"rocks\"] \n\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -200,7 +234,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received URL encoded body
 [\"swift\": \"rocks\"] \n\n")
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received URL encoded body
 [\"swift\": \"rocks\"] \n\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -248,7 +282,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "text text(\"text default\") file1 a.txt text(\"Content of a.txt.\") file2 a.html text(\"<!DOCTYPE html><title>Content of a.html.</title>\") ")
|
|
XCTAssertEqual(body, "text text(\"text default\") file1 a.txt text(\"Content of a.txt.\") file2 a.html text(\"<!DOCTYPE html><title>Content of a.html.</title>\") ")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -275,7 +309,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, " text(\"text default\") file1 a.txt text(\"Content of a.txt.\") file2 a.html text(\"<!DOCTYPE html><title>Content of a.html.</title>\") ")
|
|
XCTAssertEqual(body, " text(\"text default\") file1 a.txt text(\"Content of a.txt.\") file2 a.html text(\"<!DOCTYPE html><title>Content of a.html.</title>\") ")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -305,7 +339,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, " text(\"text default\") ")
|
|
XCTAssertEqual(body, " text(\"text default\") ")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -326,7 +360,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "Cannot POST /multibodytest.")
|
|
XCTAssertEqual(body, "Cannot POST /multibodytest.")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}) {req in
|
|
}) {req in
|
|
|
@@ -390,7 +424,7 @@ class TestResponse: KituraTest { |
|
"
q=\(expectedReturnedQueryParameter)
" +
|
|
"
q=\(expectedReturnedQueryParameter)
" +
|
|
"
u1=Ploni Almoni\n\n")
|
|
"
u1=Ploni Almoni\n\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -435,7 +469,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertNotNil(body?.range(of: "ibm"), "response does not contain IBM")
|
|
XCTAssertNotNil(body?.range(of: "ibm"), "response does not contain IBM")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -451,7 +485,7 @@ class TestResponse: KituraTest { |
|
let errorDescription = "foo is nil"
|
|
let errorDescription = "foo is nil"
|
|
XCTAssertEqual(body, "Caught the error: \(errorDescription)")
|
|
XCTAssertEqual(body, "Caught the error: \(errorDescription)")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -467,7 +501,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "get 1\nget 2\n")
|
|
XCTAssertEqual(body, "get 1\nget 2\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -479,7 +513,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "post received")
|
|
XCTAssertEqual(body, "post received")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -647,7 +681,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Hi from Kitura!\n\n")
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Hi from Kitura!\n\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}, headers: ["Accept" : "text/html"])
|
|
}, headers: ["Accept" : "text/html"])
|
|
|
@@ -662,7 +696,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "Hi from Kitura!")
|
|
XCTAssertEqual(body, "Hi from Kitura!")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}, headers: ["Accept" : "text/plain"])
|
|
}, headers: ["Accept" : "text/plain"])
|
|
|
@@ -676,7 +710,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "default")
|
|
XCTAssertEqual(body, "default")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
}, headers: ["Accept" : "text/cmd"])
|
|
}, headers: ["Accept" : "text/cmd"])
|
|
|
@@ -726,7 +760,7 @@ class TestResponse: KituraTest { |
|
XCTAssertEqual(body, "/**/ testfn(\(expected))")
|
|
XCTAssertEqual(body, "/**/ testfn(\(expected))")
|
|
XCTAssertEqual(response?.headers["Content-Type"]?.first, "application/javascript")
|
|
XCTAssertEqual(response?.headers["Content-Type"]?.first, "application/javascript")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -762,7 +796,7 @@ class TestResponse: KituraTest { |
|
XCTAssertEqual(body, "/**/ testfn(\(expected))")
|
|
XCTAssertEqual(body, "/**/ testfn(\(expected))")
|
|
XCTAssertEqual(response?.headers["Content-Type"]?.first, "application/javascript")
|
|
XCTAssertEqual(response?.headers["Content-Type"]?.first, "application/javascript")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -782,7 +816,7 @@ class TestResponse: KituraTest { |
|
XCTAssertEqual(body, "/**/ testfn(\(expected))")
|
|
XCTAssertEqual(body, "/**/ testfn(\(expected))")
|
|
XCTAssertEqual(response?.headers["Content-Type"]?.first, "application/javascript")
|
|
XCTAssertEqual(response?.headers["Content-Type"]?.first, "application/javascript")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -846,7 +880,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Filtered\n\n")
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Filtered\n\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -863,7 +897,7 @@ class TestResponse: KituraTest { |
|
_ = try response?.read(into: &body)
|
|
_ = try response?.read(into: &body)
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received\n\n".data(using: .utf8)!)
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Received\n\n".data(using: .utf8)!)
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -880,7 +914,7 @@ class TestResponse: KituraTest { |
|
let json = JSON(data: body)
|
|
let json = JSON(data: body)
|
|
XCTAssertEqual(json["some"], "json")
|
|
XCTAssertEqual(json["some"], "json")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -895,7 +929,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Index\n")
|
|
XCTAssertEqual(body, "<!DOCTYPE html>Index\n")
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
|
|
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
|
@@ -913,7 +947,7 @@ class TestResponse: KituraTest { |
|
let body = try response?.readString()
|
|
let body = try response?.readString()
|
|
XCTAssertEqual(body?.lowercased(), "forbidden<!DOCTYPE html>forbidden\n\n".lowercased())
|
|
XCTAssertEqual(body?.lowercased(), "forbidden<!DOCTYPE html>forbidden\n\n".lowercased())
|
|
} catch {
|
|
} catch {
|
|
- XCTFail("No response body")
|
|
+ XCTFail("Error reading body")
|
|
}
|
|
}
|
|
expectation.fulfill()
|
|
expectation.fulfill()
|
|
})
|
|
})
|
|
|
@@ -950,6 +984,14 @@ class TestResponse: KituraTest { |
|
next()
|
|
next()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ router.get("/noEndOrNext") { _, response, _ in
|
|
|
|
+ response.headers["Content-Type"] = "text/html; charset=utf-8"
|
|
|
|
+ response.send("<!DOCTYPE html>noEndOrNext\n\n")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ router.get("/emptyHandler") { _, _, _ in
|
|
|
|
+ }
|
|
|
|
+
|
|
router.get("/zxcv/:p1") { request, response, next in
|
|
router.get("/zxcv/:p1") { request, response, next in
|
|
response.headers["Content-Type"] = "text/html; charset=utf-8"
|
|
response.headers["Content-Type"] = "text/html; charset=utf-8"
|
|
let p1 = request.parameters["p1"] ?? "(nil)"
|
|
let p1 = request.parameters["p1"] ?? "(nil)"
|
|
|
|
I don't see a need to test again for !state.invokeSend. We are the deinit. No one is suppose to have a reference.


Video: National Geographic Documentary - Polar Bears Lifes - Wildlife Animals by natGeoHD channel
Audio: Stelle Stårmfloij(Quiet Storm Surge) by So I'm An Islander is licensed under a Attribution-ShareAlike 3.0 Unported license.
Spring has arrived in the Arctic;
the cubs born in November are out of the maternity den for the first time, and the hunt for seals has already begun.
The sea ice from winter has started to melt, and ice flakes float around the cold vast landscape.
The hunt intensifies as the ice melts in a fast pace and the ringed seals are a long swim away.
The mother bear must act fast, she cannot go too far from the defenceless cubs,
but she must find food before summer when ice will be sparse.
I
t did not used to be like this. They could froth on seals and raise healthy cubs,
growing in population and being a vital part to the ecosystem, but that was before.
As our planet is going through changes, some will be more vulnerable and become a victim to the changing of their habitat.
Polar bears are in a fragile position, everything they have known and survived on is in a fast transition, and they have to adapt fast.
Polar Bear Facts
Number of polar bears
22,000 - 31,000
Where they live
Northern Hemisphere, Norway, Canada, Russia, Greenland and the United States
Changes
to the sea ice makes the polar bear use all of its skills in swimming to find food.
The sea ice melts every summer, but less and less comes back for winter. Strong as they are,
the bears have never had to venture for this long before, up to days at a time even.
That is the new reality of survival now, even having to risk the cubs' chances when doing so.
These permanent changes will make them migrate to wherever there still is ice,
which leaves them wandering in new territories and their proximity to humans grow ever closer.
The changes to the sea ice is fast, the ice is younger, thinner and moving more than it has ever done before.
The ice helps maintain the cold climate that so many species thrive in, but now their habitat is disappearing
and the ecosystem of the Arctic is going to endure fatal consequences. Never before has there been such high
temperatures, never before has the polar bear had to change its ways, never before have things looked so hopeless.
Climate Change Facts
Sea ice melted
13.4% every decade since 1979
Expected rise in sea level
1 meter by 2100
Expected loss of polar bear habitat
2/3 in 2050
Rise in temperature over
5°C in the next 100 years
Direct reasons for polar bear extinction
Malnutrition and starvation from loss of sea ice
Sea Ice disappearing completely
Predicted to be 2080
The polar bears risk
becoming endangered because the warming continues without stopping.
Humans are not doing anything drastic to change what is happening, although everything living must
suffer the bad decisions of greedy and destructive behaviours of humans.
Will change come too late? Will the polar bear make the fight? Or will the zoo be the only place for them in the future?
Locked up in a cage away from freedom and blue, clean and diverse seas.
Ecosystem Facts
Balance
If the ecosystem is out of balance, it is a sign that one or more species are unhealthy.
Apex predator
The polar bear is an apex predator,
a role that is important for species control in their surroundings as it helps maintain a balance.
Species Reliance
If they are unable to hunt their main food source, the seal, other species will be threatened, as they will be the polar bears next target.
The Food Chain
The leftovers from the hunted seal is important food for the Arctic Fox and other species like birds etc.
Herbivores
If the polar bear is not there, it and others who depend on their catch will become herbivores, which will diminish food sources for natural herbivores.
The mother of the cubs has successfully hunted a meal. It will last them for a while,
but the struggle is not over. She returns to her cubs, and life continues as it has,
with the ever-growing concern for their food security and growth.
Change is already happening and the road back to normal is far reaching, if even ever happening again.
The new normal brings them closer to different habitats, where humans also live,
and new threats bring more uncertainty and fear. One thing is certain however,
the future is unclear and man-made destruction will continue to affect these magnificent animals.
How the ecosystem will function without them remains to be seen,
but it will have a massive effect on ocean life in the Arctic.


i am a 15 year old student in rosary sisters high school
i have been dancing ballet since i was 4 years old and i also started dancing contemporary this year , i am a MEETer and a MUNer,
i also learned how to daance dabkeh but did not continue, i also took piano lessons for 2 years but had to stop because there was a clash
between the time of the lessens of ballet nd piano , also my mom put me and my twin brother in swimming lessons since we were 2 beause
she was worried about us when we travel , i also did karate for 3 years


I was on a holiday with a couple of friends in a forest in the Netherlands, my home country. We had bought about five grams of dried mushrooms which we planned to take in two go's. We all had experimented with mushrooms before, me twice, dried mushrooms as well, but I ate those. At the beginning of this two-week holiday, I would say three days after we had arrived we all went out into the forest and ate about 2-3 grams each (I mention this because it might be important for the effect the smoking of the mushrooms had on me later that week) Anyway, the trip was strong, the mushrooms potent.
About five days later we were ready to go to sleep, already in our sleeping bags, each in a separate tent (4 blokes) and we came upon the idea of smoking a chillum with mushrooms.
At this time I was very relaxed, had nothing specifically to worry about in my life and felt good on the whole. This holiday had been good fun so far, it was a kind of big workshop festival, we were partaking in workshops on arts, music, writing etc. all very creative.
So that was how I felt; no worries, no hassle, relaxed and well-rested, well fed and healthy. Mind you, we were steady users of marijuana, smoking about a gram or 2 a day so that was already in my system by the time we started smoking the mushrooms.
The only preparations I made was preparing the Chillum and something I always did when smoking it was touch it against my forehead, breath deeply in and out a couple of times and then I would light it, as I did now. This must have been about 2 o'clock at night. Apart from the marijuana I wasn't taking anything else, no alcohol, no coffee, nothing.
What I experienced wasn't much. The thing I remember most clearly is that I felt a sort of pressure build up inside my head, seemingly coming from outside but then I reasoned it was probably coming from inside. It felt a bit like your head can feel just before or just after you've had or have a cold coming on. Another thing I noticed was that my perception of darkness was slightly different as I seemed to see more purplish dots in the blackness. That was basically all I felt.
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.


---
title: Kombinationsfilter
layout: default
category: demos
schema:
- name: color
filters: [ red, blue, yellow ]
- name: size
filters: [ small, wide, tall, big ]
- name: shape
filters : [ round, square ]
---
Filters can be combined. In addition to filtering for just .red
or .tall
, you can pass in a filter selector of both: .red.tall
.Filters
{% for group in page.schema %}
{{ group.name }}


GrimoireJS
========
GrimoireJS: Magic item generator for the Pathfinder tabletop RPG
Written by Russell Champoux
This project contains a series of function under the 'Grimoire' object.
Jquery and lodash (or underscore) are required by this project
Grimoire currently only rolls for items based on the Pathfinder Core Rulebook.
I hope to add roll tables for the Pathfinder Advanced Player's Guide soon
While the primary purpose of this project is to be used as a library accessed by other projects, you can manually generate items by following these steps
- Open grimoire.html in a web browser
- Hit F12 to open the developer console
- All commands are within the following objects:
- Grimoire
- Armors
- Weapons
- Deities
- Intelligence
- Potions
- Rings
- Rods
- Scrolls
- Shields
- Staves
- Wands
- Weapons
- WondrousItems
Tips
- All get*() function take a "type" argument that can be either 'minor', 'medium', or 'major'
- Try running Grimoire.getItems(2,2,2) to generate several minor, medium, and major items
- NOTE that all non-unique weapons are returned as "minor/medium/major melee/range weapon". It is up to the GM to determine what specific weapon this resolves to. It is recommend to check what proficiencies your players have. :)
- Many get*() functions also have an optional paramater "source" that specifies which source material to pull from. Currently, only "CRB" and "APG" are supported.
One of the funnest things in this library (imho) is the item intelligence module.
Create an intelligence by running Intelligence.getItemIntelligence().print()
Send questions, feedback, or bug reports/fixes to RussellChamp [at] gmail [dot] com
To do
- Make interactive webpage
- Already input spells for wizard/sorceror, cleric, and druid. Check for other arcane and divine spells from other classes


Skeduler is an ultimate platform for Home Service Companies. It was an outsourcing project for Incwell Venture. This software is used for Ultimate Job
Management and Scheduling. It is based on a micro-service architecture that uses programming
languages like Python, Laravel (PHP), ReactJS, and NodeJS. I got a chance to work for 3 months on
this project and was able to develop and maintain the micro-components of the system.
Try it here
Languages Used
Awesome Features
- Micro Service Architecture
- Online Payment
- Multi-tenant
- Load Balance
- Reports and Analytics
- Business Intelligence


Before Change
def get_rel_json(self):
rel2id = {0:"NA"}
with open(self.relation_file_name,"r",encoding = "utf8") as fr:
for line in fr.readlines():
try:
relation = line.split(",")[0]
relation = relation[2:len(relation)-1]
rel2id[len(rel2id)] = relation
except:
raise ValueError
with open(self.relation_json_file_name,"w") as fw:
json.dump(rel2id,fw)
def get_dataset_json(self):
After Change
def get_rel_json(self):
rel2id = {"NA":0}
relation_list = ["instance of", "has part", "subclass of", "parent taxon", "material used",
"natural product of taxon"]
//rel2id = {}
for x in relation_list:
rel2id[x] = len(rel2id)
with open(self.relation_json_file_name,"w") as fw:
json.dump(rel2id,fw,ensure_ascii=False,indent = 4, separators=(",", ": "))
def get_dataset_json(self):


1 2 3 4 5 6 7 8 9 10 11 12
13 14 15
16
17 package xdc.runtime;
18
19 /*!
20 * ======== Startup ========
21 * The `xdc.runtime` startup bootstrap
22 *
23 * This module manages the very early startup initialization that occurs
24 * before C's `main()` function is invoked. This initialization typically
25 * consists of setting hardware specific registers that control watchdog
26 * timers, access to memory, cache settings, clock speeds, etc.
27 *
28 * In addition to configuration parameters that allow the user to add custom
29 * startup functions, this module also provides services that allow modules
30 * to automatically add initialization functions to the startup sequence.
31 *
32 * @a(Startup Sequence)
33 * The following list defines the startup sequence and, in particular, when
34 * user provided startup functions are invoked:
35 * @p(nlist)
36 * - CPU is initialized and initial C stack setup is performed.
37 * - The function specified by `Startup.resetFxn` is called.
38 * `Startup.resetFxn` is called only on platforms where reset is performed
39 * before running a program. For example, boot code for all TI targets
40 * invokes `Startup.resetFxn`, but this function is not invoked on
41 * Microsoft targets.
42 * - C runtime initialization is performed.
43 * - Functions from the array `Startup.firstFxns` are called.
44 * - All `Mod_Module_startup` functions (see Module Initialization below)
45 * are called in a loop until all such functions return
46 * `{@link #Startup_DONE}` or the `{@link #maxPasses}` threshold is
47 * reached.
48 * - Functions from the array `Startup.lastFxns` are called.
49 * - The function `main` is called.
50 * @p
51 * The steps 4 - 6 occur during C++ static object initialization. Since
52 * the ANSI C++ Language Standard does not provide a means to control
53 * the order of C++ constructors, if a C++ constructor uses an XDC module,
54 * there is no guarantee that the module's startup function already ran.
55 * Therefore, any C++ constructor that needs XDC modules' services should
56 * call `Startup_exec` first to force all startup related functions from
57 * steps 4 - 6 to run, before the constructor uses any XDC module.
58 * @p
59 * Also, if a target does not support C++, the steps 4 - 6 will not run
60 * automatically. It is then up to a user's code to invoke `Startup_exec`,
61 * possibly as the first step in `main`.
62 * @p
63 *
64 * @a(Module Initialization)
65 * Every module can optionally define a startup function which is called
66 * before `main()`. Modules declare that they want to participate in this
67 * startup sequence via the `@ModuleStartup` attribute in the module's spec
68 * file. Modules that use this attribute must also implement the following
69 * startup function:
70 * @p(code)
71 * Int Mod_Module_startup(Int state);
72 * @p
73 * where "Mod" is the name of the module requesting startup support.
74 *
75 * The parameter to the startup function serves as "state variable" whose
76 * initial value will be `Startup_NOTDONE`. If `startup()` returns a value
77 * other than `Startup_DONE`, it will be called in a subsequent pass with this
78 * return value passed in as `state`. To ensure this process terminates,
79 * no startup function is ever called more than `{@link #maxPasses}`
80 * times.
81 *
82 * For situations in which the startup of one module depends upon another
83 * having completed its startup processing, the following function is
84 * automatically defined for all modules and proxies:
85 * @p(code)
86 * Bool Mod_Module_startupDone();
87 * @p
88 * where "Mod" is the name of some module or proxy. These predicates can
89 * be used as guards inside of a startup function to probe whether a
90 * particular module has completed its own startup processing. As a
91 * convenience, the function `Startup_rtsDone()` probes the necessary set of
92 * `xdc.runtime` modules required to support instance `create()` functions, and
93 * should be called before any startup-time instance creation and/or
94 * memory allocation is performed.
95 * @p(code)
96 * Int Mod_Module_startup(Int state)
97 * {
98 * if (!Startup_rtsDone()) {
99 * return (Startup_NOTDONE);
100 * }
101 * .
102 * .
103 * .
104 * return (Startup_DONE);
105 * }
106 * @p
107 *
108 * @a(Examples)
109 * The following code shows how to add custom startup functions to this module.
110 * @p(code)
111 * var Startup = xdc.useModule('xdc.runtime.Startup');
112 * Startup.resetFxn = "&myResetFxn";
113 * Startup.firstFxns[Startup.firstFxns.length++] = "&myFirst";
114 * Startup.lastFxns[Startup.lastFxns.length++] = "&myLast";
115 * @p
116 *
117 */
118 @Template("./Startup.xdt")
119 @DirectCall
120
121 module Startup {
122
123 /*!
124 * ======== DONE ========
125 * Returned from module startup functions no further calls are required
126 */
127 const Int DONE = -1;
128
129 /*!
130 * ======== NOTDONE ========
131 * Initial value of state argument passed to module startup functions
132 */
133 const Int NOTDONE = 0;
134
135 /*!
136 * ======== ModuleView ========
137 * @_nodoc
138 */
139 metaonly struct ModuleView {
140 Bool rtsStartupDone;
141 Bool startupBegun;
142 String resetFxn;
143 String firstFxns[];
144 String lastFxns[];
145 }
146
147 /*!
148 * ======== StartupStateView ========
149 * @_nodoc
150 */
151 metaonly struct StartupStateView {
152 Int order;
153 String moduleName;
154 String done;
155 }
156
157 /*!
158 * ======== rovViewInfo ========
159 * @_nodoc
160 */
161 @Facet
162 metaonly config xdc.rov.ViewInfo.Instance rovViewInfo =
163 xdc.rov.ViewInfo.create({
164 viewMap: [
165 ['Module',
166 {
167 type: xdc.rov.ViewInfo.MODULE,
168 viewInitFxn: 'viewInitModule',
169 structName: 'ModuleView'
170 }
171 ],
172 ['Startup State',
173 {
174 type: xdc.rov.ViewInfo.MODULE_DATA,
175 viewInitFxn: 'viewInitStartupState',
176 structName: 'StartupStateView'
177 }
178 ]
179 ]
180 });
181
182 /*!
183 * ======== maxPasses ========
184 * Max number of iterations over the set of startup functions
185 */
186
187 config Int maxPasses = 32;
188
189 /*!
190 * ======== InitFxn ========
191 * Type of function assignable to `firstFxns`, `lastFxns`, or `resetFxn`
192 */
193 typedef Void (*InitFxn)();
194
195 /*!
196 * ======== firstFxns ========
197 * List of functions called before module startup
198 *
199 * @see
200 * #xdoc-sect-2 Startup Sequence
201 */
202
203 config InitFxn firstFxns[length] = [];
204
205 /*!
206 * ======== lastFxns ========
207 * List of functions called after module startup
208 *
209 * @see
210 * #xdoc-sect-2 Startup Sequence
211 */
212
213 config InitFxn lastFxns[length] = [];
214
215 /*!
216 * ======== resetFxn ========
217 * Function to be called by during initialization
218 *
219 * This function is called only on platforms where reset is performed
220 * before running the program. The purpose of this function is to set up
221 * the hardware registers (cache, external memory interface, etc.) before
222 * any other code executes.
223 *
224 * This function is called as early as possible in the
225 * {@link #xdoc-sect-2 program initialization} process.
226 *
227 * @see
228 * #xdoc-sect-2 Startup Sequence
229 */
230
231 metaonly config InitFxn resetFxn = null;
232
233 /*!
234 * ======== exec ========
235 * Execute the startup functions of all resident modules
236 *
237 * Note that this function is idempotent, and can be called at any point
238 * in the platform/target startup sequence in which "ordinary" C functions
239 * can execute. By default, this function is called as part of the
240 * standard C++ static initialization sequence.
241 *
242 * If your target compiler does not support C++, this function must be
243 * called at least once prior to using any `xdc.runtime` modules.
244 * Simply call this function at the very beginning of `main()`.
245 */
246
247 Void exec();
248
249 /*!
250 * ======== rtsDone ========
251 * Query the state of the `xdc.runtime` package
252 *
253 * This function is used by module startup functions to determine when it
254 * is possible to use the `xdc.runtime` modules; e.g. to allocate memory,
255 * create instances managed by some module (even those outside the
256 * `xdc.runtime` package), call a `Log` function, etc.
257 *
258 * @a(returns)
259 * Returns `TRUE` when all `xdc.runtime` modules have completed
260 * initialization.
261 */
262
263 Bool rtsDone();
264
265 internal:
266
267 /*!
268 * ======== reset ========
269 * Application-specific reset function
270 *
271 * This function is defined in `Startup.xdt`
272 * (`xdc_runtime_Startup_reset__I`) and is called as early as possible in
273 * the {@link #xdoc-sect-2 program initialization} process; for many
274 * platforms, it is called prior the the initialization of the C
275 * runtime environment.
276 *
277 * @see
278 * #xdoc-sect-2 Startup Sequence
279 */
280 Void reset();
281
282 Void startMods(Int state[], Int len);
283 readonly config Void (*startModsFxn)(Int[], Int) = startMods;
284
285 extern Void execImplFxn() = xdc_runtime_Startup_exec__I;
286
287 readonly config Void (*execImpl)() = execImplFxn;
288
289 typedef Int (*SFxn)(Int);
290
291 config SFxn sfxnTab[];
292
293 /*!
294 * ======== sfxnRts ========
295 * Array of runtime modules' startup functions
296 *
297 * This array also contains startup functions of the modules that inherit
298 * from interfaces in `xdc.runtime`. Functions added to this array are
299 * called only once before the startup procedure for all modules begins.
300 *
301 * @see
302 * #xdoc-sect-2 Startup Sequence
303 */
304 config Bool sfxnRts[];
305
306 /*!
307 * ======== getState ========
308 * Function that returns the value of the startup state.
309 *
310 * Modules for which the config C code is generated separately, and
311 * possibly before the configuration step is run, must call a function
312 * to get their startup state. They cannot reach into the state array
313 * directly because they don't know their indices in that array.
314 */
315 Int getState(Types.ModuleId id);
316
317 /*!
318 * ======== IdMap ========
319 * keeps track of modules in stateTab and their module IDs for purposes
320 * of the function getState.
321 */
322 struct IdMap {
323 UInt ind;
324 Types.ModuleId modId;
325 }
326
327 struct Module_State {
328 Int *stateTab;
329 Bool execFlag;
330 Bool rtsDoneFlag;
331 };
332
333 }
334 335 336
337


| 1 | package kjarkko.stardust.util; | |
| 2 | ||
| 3 | import static java.lang.Math.*; | |
| 4 | ||
| 5 | /** | |
| 6 | * A simple (double, double) coordinate. | |
| 7 | * | |
| 8 | * @author jarkko | |
| 9 | */ | |
| 10 | public class Coordinate { | |
| 11 | ||
| 12 | private double x; | |
| 13 | private double y; | |
| 14 | ||
| 15 | /** | |
| 16 | * New coordinate. | |
| 17 | * | |
| 18 | * @param x location | |
| 19 | * @param y location | |
| 20 | */ | |
| 21 | public Coordinate(double x, double y) { | |
| 22 | this.x = x; | |
| 23 | this.y = y; | |
| 24 | } | |
| 25 | ||
| 26 | /** | |
| 27 | * Calculates the distance between the two coordinates in meters. | |
| 28 | * | |
| 29 | * @param that the other coordinate | |
| 30 | * @return the distance between the two in meters | |
| 31 | */ | |
| 32 | public double distance(Coordinate that) { | |
| 33 |
1
1. distance : replaced return of double value with -(x + 1) for kjarkko/stardust/util/Coordinate::distance → KILLED |
return sqrt( |
| 34 | pow(xDistance(that), 2) | |
| 35 |
1
1. distance : Replaced double addition with subtraction → KILLED |
+ pow(yDistance(that), 2)); |
| 36 | } | |
| 37 | ||
| 38 | /** | |
| 39 | * The distance between the two coordinates (x). | |
| 40 | * | |
| 41 | * @param that the other coordinate | |
| 42 | * @return distance between the x coordinates | |
| 43 | */ | |
| 44 | public double xDistance(Coordinate that) { | |
| 45 |
2
1. xDistance : Replaced double subtraction with addition → KILLED 2. xDistance : replaced return of double value with -(x + 1) for kjarkko/stardust/util/Coordinate::xDistance → KILLED |
return abs(this.x - that.x); |
| 46 | } | |
| 47 | ||
| 48 | /** | |
| 49 | * The distance between the two coordinates (y). | |
| 50 | * | |
| 51 | * @param that the other coordinate | |
| 52 | * @return distance between the y coordinates | |
| 53 | */ | |
| 54 | public double yDistance(Coordinate that) { | |
| 55 |
2
1. yDistance : Replaced double subtraction with addition → KILLED 2. yDistance : replaced return of double value with -(x + 1) for kjarkko/stardust/util/Coordinate::yDistance → KILLED |
return abs(this.y - that.y); |
| 56 | } | |
| 57 | ||
| 58 | public double getX() { | |
| 59 |
1
1. getX : replaced return of double value with -(x + 1) for kjarkko/stardust/util/Coordinate::getX → KILLED |
return x; |
| 60 | } | |
| 61 | ||
| 62 | public double getY() { | |
| 63 |
1
1. getY : replaced return of double value with -(x + 1) for kjarkko/stardust/util/Coordinate::getY → KILLED |
return y; |
| 64 | } | |
| 65 | ||
| 66 | public void setX(double x) { | |
| 67 | this.x = x; | |
| 68 | } | |
| 69 | ||
| 70 | public void setY(double y) { | |
| 71 | this.y = y; | |
| 72 | } | |
| 73 | ||
| 74 | /** | |
| 75 | * Adds the value to the x coordinate. | |
| 76 | * | |
| 77 | * @param x the value to be added to the x coordinate | |
| 78 | */ | |
| 79 | public void addX(double x) { | |
| 80 |
1
1. addX : Replaced double addition with subtraction → KILLED |
this.x += x; |
| 81 | } | |
| 82 | ||
| 83 | /** | |
| 84 | * Adds the value to the y coordinate. | |
| 85 | * | |
| 86 | * @param y the value to be added to the y coordinate | |
| 87 | */ | |
| 88 | public void addY(double y) { | |
| 89 |
1
1. addY : Replaced double addition with subtraction → KILLED |
this.y += y; |
| 90 | } | |
| 91 | } | |
Mutations | ||
| 33 |
1.1 |
|
| 35 |
1.1 |
|
| 45 |
1.1 2.2 |
|
| 55 |
1.1 2.2 |
|
| 59 |
1.1 |
|
| 63 |
1.1 |
|
| 80 |
1.1 |
|
| 89 |
1.1 |


1.5.6 2011-02-01
- Allow activesupport 3.0.0+
1.5.5 2010-05-25
- Allow activesupport 2.3.5+
1.5.4 2010-02-16
- mocha, cucumber and shoulda are development dependencies (fixes requirement for thoughtbot-shoulda too)
1.5.3 2010-02-11
- Forced rubigen to use activesupport 2.3.5 (as the last < 3.0 version). It will upgrade to use 3.0.0 when it is released.
1.5.2 2009-01-12
- Trying to remove a circular rubigen->newgem->rubigen dependency issue
1.5.1 2008-12-29
- Return write_manifest which was accidently removed
- Moved website into gh-pages branch; thus moving homepage from rubigen.rubforge.org -> drnic.github.com/rubigen
1.5.0 2008-12-27
- Preparation for integration back into Rails
- —git/-g option for generated files to be added via git commands
- after_generate hook for generators (used as rails’ templates mechanism)
- bumped activesupport requirement to 2.2.2
- upgraded internal files to support latest newgem (removed config/ folder, moved config to Rakefile)
- support for RAILS_ROOT as a destination root
- removed references to Merb which now has its own generator system; can access any merb generators via `rubigen` helper app
- RubiGen::Base.active can be changed to a RubiGen::Base subclass that will be used for lookups (e.g. RubiGen::Base.active = Rails::Generator::Base)
1.4.0 2008-12-11
- rubigen tests now pass against ruby 1.9.0 and ruby 1.9.1(prerelease 2)
- puts are sent to an explicit stdout which can be STDOUT or a StringIO passed from tests; test output is now clean!
1.3.4 2008-11-12
- ruby_app: fixed reference to non-existent version.rb [jperkins]
1.3.3 2008-10-21
- prepend_sources correctly places arguments at start of sources list
- removed lib/rubigen/version.rb; RubiGen::VERSION is in lib/rubigen.rb now; there is no RubiGen::VERSION::STRING
1.3.2 2008-05-19
- app_gen/bin - includes #!/usr/bin/env ruby
- added examples of file_copy_each and template_copy_each to generators
1.3.1 2008-04-25
- Fixed the require statements in generated tests for rails/merb generators
- Rails::Generator::Base is a valid generator superclass
- Rails generators have alternate template (based on standard NamedBase)
- test helpers define RAILS_ROOT for rails generators
1.3.0 2008-04-25
- component_generator: specific subclasses for rails + merb generators, not the generic RubiGen::Base
1.2.3 2008-02-22
- Remove -wKU flags from install_rubigen_scripts + ruby_app apps
1.2.2 2008-02-20
- Removing one File.expand_path
1.2.1 2008-02-19
- Fixed rake post_news/email output bug (“\n\n”)
- removed bad " from generator banner strings
- destination_path/root have File.expand_path applied to them to ensure base_name gives useful term
- generate/destroy set APP_ROOT with expand_path too
1.2.0 2008-02-14
- application_generator’s bin now looks for generator within local source, not within an install gem - so the bin/foo can be run in development without requiring installation.
- New collision option i - ignore all collisions; works like a which forces all collisions to overwrite existing files; i skips all collisions.
- Supported test scope for install_rubigen_scripts: javascript_test
1.1.1 2007-11-08
- active_support is now a dependency of this gem on install (it was being used but wasn’t a dependency)
1.1.0 2007-11-05
- Promoted ‘application_generator’ and ‘component_generator’ to Rubigen
from NewGem project (they are available even if newgem not installed)
- install_rubigen_scripts default test fixed by mapping scopes to strings
- version.js uploaded to website
1.0.8 2007-11-03
- install_rubigen_scripts adds ‘test_unit’ to scopes unless a test-related scope is added
- remove examples directory because it’s redundant. See rails gem. [Winston Tsang]
- Add missing template empty_log. [Winston Tsang]
- Moved test_unit generator to test_unit scope (instead of global scope)
- generator_full_paths now returns the sources in reverse order [thx hassox]
1.0.7 2007-11-02
- Moved test_unit generator to test_unit scope (instead of global scope)
1.0.6 2007-10-18
- Templates can end with .erb (e.g. model.rb.erb) and template_copy_each will remove the .erb extension (create model.rb)
1.0.5 2007-10-08
- Added Jeremy Kemper to license/copyright/gem author list.
1.0.4 2007-09-07
- New manifest actions:
- m.folder - copies over all files in folder into target path
- helper run_generator returns generator instance (so you can assert instance variables/methods etc)
- base_name method for generators - returns basename of destination_root, unless its trunk/tags/branches
1.0.3 2007-08-22
- /generators folder is automatically picked up by all component/app generators [bug fix]
1.0.2 2007-08-22
- Renamed rubigen_install_script -> install_rubigen_script
- install_rubigen_script is now a component generator so can be reused by other generators to create script/generate
- Added “Thanks to Jeremy Kemper” into website
- Cleaned up USAGE for test_unit
- If a generator does not have a USAGE file, then it is invisible from lists of available generators. This will be the mechanism for having hidden generators (e.g. install_rubigen_scripts)
1.0.1 2007-08-20
- Moved builtin generators into root folders, away from lib folder, to protected them from ri/rdocs processes (which didn’t like ERb <%= %> inside Ruby files)
- New app: rubigen_install_script
- adds script/generate and script/destroy to current folder
1.0.0 2007-08-17
- 1 major enhancement:
- Initial release


Single Flower
Purchase an original flower from Q-Summit
Lilium (Linnaean )
Height : 25 cm
Width : 10 cm
Price : 15 $
Buy
Your details
First name*
Last name*
Street*
House number*
Additional details
Pay


Hi, I am Prajval M (@26prajval98) I am a junior year undergraduate student pursuing Computer
Engineering at National Institue of Technology, Karnataka.
I love cooking and gaming. I am active in sports also. I play basketball, badminton, cricket
and table tennis. I also play tabla. As a typical bangalorean I love Masala Puri.
I love chocolates
Create REST APIs and one-time scripts in node to handle Big Data. Changing the structure of database (MongoDB) to optimise the query time. Optimizing existing Node.js code and migrating to v8.11 from v6.11 draw conclusions from the collections in database.
Pursing bachelor of engineering in Computer Science from NITK Surathkal. Research and exploring the
field of Computer Science.
Taking up freelance job mostly related to web development.
Class 10 - 10/10 CGPA (CBSE)
Class 12 - 97% (Karnataka State Board)
CGPA - 9.12 (Till 4th)
App which allows users to find maids nearby. The app provides maid as an instant service. This was developed using Golang and MySQL database in the server, and the client using react.js and redux.
View ProjectIt allows users to log in and track their expenditure. Backend uses Node.js. Passport.js is used for authentication and Facebook OAuth is also used. Frontend uses Vue.js and axios.
View ProjectThe website is for IET NITK, of which I am an executive member of. This was made with React and firebase. An online test for the recruitment was conducted in this platform.
View ProjectImplementation of image procesing algorithms in python as per the course from mars to hollywood with a stop at the hospital
View ProjectImplementation of fq-pie in ns3. fq-pie is an AQM algorithm which are used in routers to manage the packets and reduce queueing delay. fq-pie is a combination of flow queueing and pie algorithm.
View Project


Basic tc-countdown Demo
{{remaining.days}} days, {{remaining.hours}} hours, {{remaining.minutes}} minutes remain.


LightboxSE jQuery Plugin Examples
Individual Images
Image 1
Image 2
Image 3
Image 4
Slideshow
Image 1
Image 2
Image 3
Image 4
( Image 1
Image 2 )
( Image 3
Image 4 )
Misc Content
( YouTube Video )
( Website )


About
Work
Contact
Hey I'm Mimic.
a web developer
Here are some of my projects...
Tribute Page
Random Quote Machine
JavaScript Calculator
Map Data Across the Globe
https://cloud.githubusercontent.com/assets/15967809/17642774/7d091806-6171-11e6-8d47-ecf2f2833fe2.png
Wikipedia Viewer
Tic Tac Toe Game
Show all
Let's work together...
How do you take your coffee?
Facebook
Github
Twitter
Send a mail
Call me