NEW
CENTURY
Wellness Group
Portal Home
Patients
Appointments
Schedules
Messages
My Profile
Sign Out
New Patient
Patient Information
Medical History
Physical Examination
Additional Notes
Patient Information
Patient Number:
00004
Medical Record Abbreviation:
LMD-
Visit Date:
3/4/19
First name:
Middle name:
Last name:
Social Security #:
Insurance:
Date of Birth:
Gender:
Male
Female
Address:
Phone Number:
Email:
Medical History
Patient Number:
00004
Medical Record Abbreviation:
LMD-
Visit Date:
3/4/19
Chronic Medical Conditions:
Surgeries:
Medications:
Treatments:
Allergies:
Physical Activity Limitations:
Physical Examination
Patient Number:
00004
Medical Record Abbreviation:
LMD-
Visit Date:
3/4/19
Height:
Inches
Weight:
Pounds
Blood Pressure:
/
Abnormalities:
Hearing Test:
N/A
Pass
Fail
Vision Test:
N/A
Pass
Fail
Dental Exam:
N/A
Pass
Fail
Developmental Exam:
N/A
Pass
Fail
Scoliosis Exam:
N/A
Pass
Fail
Additional Notes
Patient Number:
00004
Medical Record Abbreviation:
LMD-
Visit Date:
3/4/19
Followup Appointment?:
No
Yes
Next Appointment Date:
Prescription?:
No
Yes
Prescription Name:
Lab Work?:
No
Yes
Lab Work Type:
Additional Notes:


The goal of XQDebug is to provide a Browser based debugger that is independent of any editor or browser, and can be installed and available for developers and administrators to develop and debug applications.
XQDebug uses the MarkLogic debugging API (dbg) as much as possible to accomplish debugging tasks. Where the dbg library does not yet provide functionality, or we encounter bugs, we may need to create workarounds until a fix or update is available.
XQDebug must run from and write to a database that is independent of any application or XQuery code being debugged. Otherwise it is possible to introduce changes in the state of the application that is being debugged. Therefore the install must create a database named XQDebug and copy all code and write all persisted information to that database.
The priority of this list is only approximate because features are also grouped logically and some featues in a group have a lower priority of being implemented. The features which are listed in red have not been implemented yet.


.primary_key_prefix_type (rw) Also known as: #primary_key_prefix_type
[ GitHub ]# File 'activerecord/lib/active_record/model_schema.rb', line 130
mattr_accessor :primary_key_prefix_type, instance_writer: false
123456789_123456789_123456789_123456789_123456789_
Active Record objects don’t specify their attributes directly, but rather infer them from the table definition with which they’re linked. Adding, removing, and changing attributes and their type is done directly in the database. Any change is instantly reflected in the Active Record objects. The mapping that binds a given Active Record class to a certain database table will happen automatically in most common cases, but can be overwritten for the uncommon ones.
See the mapping rules in table_name and the full example in README for more insight.
Active Records accept constructor parameters either in a hash or as a block. The hash method is especially useful when you’re receiving the data from somewhere else, like an HTTP request. It works like this:
user = User.new(name: "David", occupation: "Code Artist")
user.name # => "David"
You can also use block initialization:
user = User.new do |u|
u.name = "David"
u.occupation = "Code Artist"
end
And of course you can just create a bare object and specify the attributes after the fact:
user = User.new
user.name = "David"
user.occupation = "Code Artist"
Conditions can either be specified as a string, array, or hash representing the WHERE-part of an SQL statement. The array form is to be used when the condition input is tainted and requires sanitization. The string form can be used for statements that don’t involve tainted data. The hash form works much like the array form, except only equality and range is possible. Examples:
class User < ActiveRecord::Base
def self.authenticate_unsafely(user_name, password)
where("user_name = '#{user_name}' AND password = '#{password}'").first
end
def self.authenticate_safely(user_name, password)
where("user_name = ? AND password = ?", user_name, password).first
end
def self.authenticate_safely_simply(user_name, password)
where(user_name: user_name, password: password).first
end
end
The authenticate_unsafely
method inserts the parameters directly into the query and is thus susceptible to SQL-injection attacks if the user_name
and password
parameters come directly from an HTTP request. The authenticate_safely
and authenticate_safely_simply
both will sanitize the user_name
and password
before inserting them in the query, which will ensure that an attacker can’t escape the query and fake the login (or worse).
When using multiple parameters in the conditions, it can easily become hard to read exactly what the fourth or fifth question mark is supposed to represent. In those cases, you can resort to named bind variables instead. That’s done by replacing the question marks with symbols and supplying a hash with values for the matching symbol keys:
Company.where(
"id = :id AND name = :name AND division = :division AND created_at > :accounting_date",
{ id: 3, name: "37signals", division: "First", accounting_date: '2005-01-01' }
).first
Similarly, a simple hash without a statement will generate conditions based on equality with the SQL AND operator. For instance:
Student.where(first_name: "Harvey", status: 1)
Student.where(params[:student])
A range may be used in the hash to use the SQL BETWEEN operator:
Student.where(grade: 9..12)
An array may be used in the hash to use the SQL IN operator:
Student.where(grade: [9,11,12])
When joining tables, nested hashes or keys written in the form ‘table_name.column_name’ can be used to qualify the table name of a particular condition. For instance:
Student.joins(:schools).where(schools: { category: 'public' })
Student.joins(:schools).where('schools.category' => 'public' )
All column values are automatically available through basic accessors on the Active Record object, but sometimes you want to specialize this behavior. This can be done by overwriting the default accessors (using the same name as the attribute) and calling super
to actually change things.
class Song < ActiveRecord::Base
# Uses an integer of seconds to hold the length of the song
def length=(minutes)
super(minutes.to_i * 60)
end
def length
super / 60
end
end
In addition to the basic accessors, query methods are also automatically available on the Active Record object. Query methods allow you to test whether an attribute value is present. Additionally, when dealing with numeric values, a query method will return false if the value is zero.
For example, an Active Record User with the name
attribute has a name?
method that you can call to determine whether the user has a name:
user = User.new(name: "David")
user.name? # => true
anonymous = User.new(name: "")
anonymous.name? # => false
Sometimes you want to be able to read the raw attribute data without having the column-determined typecast run its course first. That can be done by using the <attribute>_before_type_cast
accessors that all attributes have. For example, if your Account model has a balance
attribute, you can call account.balance_before_type_cast
or account.id_before_type_cast
.
This is especially useful in validation situations where the user might supply a string for an integer field and you want to display the original string back in an error message. Accessing the attribute normally would typecast the string to 0, which isn’t what you want.
Dynamic attribute-based finders are a mildly deprecated way of getting (and/or creating) objects by simple queries without turning to SQL. They work by appending the name of an attribute to find_by_
like Person.find_by_user_name
. Instead of writing Person.find_by(user_name: user_name)
, you can use Person.find_by_user_name(user_name)
.
It’s possible to add an exclamation point (!) on the end of the dynamic finders to get them to raise an RecordNotFound
error if they do not return any records, like Person.find_by_last_name!
.
It’s also possible to use multiple attributes in the same find_by_
by separating them with “and”.
Person.find_by(user_name: user_name, password: password)
Person.find_by_user_name_and_password(user_name, password) # with dynamic finder
It’s even possible to call these dynamic finder methods on relations and named scopes.
Payment.order("created_on").find_by_amount(50)
Active Record can serialize any object in text columns using YAML. To do so, you must specify this with a call to the class method serialize. This makes it possible to store arrays, hashes, and other non-mappable objects without doing any additional work.
class User < ActiveRecord::Base
serialize :preferences
end
user = User.create(preferences: { "background" => "black", "display" => large })
User.find(user.id).preferences # => { "background" => "black", "display" => large }
You can also specify a class option as the second parameter that’ll raise an exception if a serialized object is retrieved as a descendant of a class not in the hierarchy.
class User < ActiveRecord::Base
serialize :preferences, Hash
end
user = User.create(preferences: %w( one two three ))
User.find(user.id).preferences # raises SerializationTypeMismatch
When you specify a class option, the default value for that attribute will be a new instance of that class.
class User < ActiveRecord::Base
serialize :preferences, OpenStruct
end
user = User.new
user.preferences.theme_color = "red"
Active Record allows inheritance by storing the name of the class in a column that is named “type” by default. See Inheritance
for more details.
Connections are usually created through .establish_connection and retrieved by ActiveRecord::Base.connection
. All classes inheriting from Base
will use this connection. But you can also set a class-specific connection. For example, if Course is an Base
, but resides in a different database, you can just say Course.establish_connection
and Course and all of its subclasses will use this connection instead.
This feature is implemented by keeping a connection pool in Base
that is a hash indexed by the class. If a connection is requested, the .retrieve_connection method will go up the class-hierarchy until a connection is found in the connection pool.
ActiveRecordError
- Generic error class and superclass of all other errors raised by Active Record.
AdapterNotSpecified
- The configuration hash used in .establish_connection didn’t include an :adapter
key.
AdapterNotFound
- The :adapter
key used in .establish_connection specified a non-existent adapter (or a bad spelling of an existing one).
AssociationTypeMismatch
- The object assigned to the association wasn’t of the type specified in the association definition.
AttributeAssignmentError
- An error occurred while doing a mass assignment through the #attributes=
method. You can inspect the attribute
property of the exception object to determine which attribute triggered the error.
ConnectionNotEstablished
- No connection has been established. Use .establish_connection before querying.
MultiparameterAssignmentErrors
- Collection of errors that occurred during a mass assignment using the #attributes=
method. The errors
property of this exception contains an array of AttributeAssignmentError objects that should be inspected to determine which attributes triggered the errors.
RecordInvalid
- raised by #save! and .create! when the record is invalid.
RecordNotFound
- No record responded to the .find method. Either the row with the given ID doesn’t exist or the row didn’t meet the additional restrictions. Some .find calls do not raise this exception to signal nothing was found, please check its documentation for further details.
SerializationTypeMismatch
- The serialized object wasn’t of the class specified as the second parameter.
StatementInvalid
- The database server rejected the SQL statement. The precise error is added in the message.
Note: The attributes listed are class-level attributes (accessible from both the class and instance level). So it’s possible to assign a logger to the class through .logger= which will then be used by all instances in the current object space.
::ActiveModel::AttributeMethods
- IncludedCALL_COMPILABLE_REGEXP, NAME_COMPILABLE_REGEXP
AttributeMethods
- IncludedCallbacks
- Included::ActiveModel::SecurePassword
- IncludedSecureToken
- IncludedAttributes
- Attributes & MethodsAutosaveAssociation
- Attributes & MethodsCore
- Attributes & MethodsSet the application to log or raise when an association violates strict loading.
Returns fully resolved DatabaseConfigurations
object.
Contains the database configuration - as is typically stored in config/database.yml - as an DatabaseConfigurations
object.
:nodoc
.
Returns the symbol representing the current setting for preventing writes.
Returns the symbol representing the current connected role.
Returns the symbol representing the current connected shard.
Determines whether to use Time.utc
(using :utc
) or Time.local
(using :local
) when pulling dates and times from the database.
Specify whether schema dump should happen at the end of the db:migrate rails command.
Specifies which database schemas to dump when calling db:schema:dump.
Specifies if an error should be raised if the query has an order being ignored when doing batch queries.
Accepts a logger conforming to the interface of Log4r which is then passed on to any new database connections made and which can be retrieved on both a class and instance level by calling logger
.
Specifies the names of the queues used by background jobs.
Application configurable boolean that denotes whether or not to raise an exception when the PostgreSQLAdapter is provided with an integer that is wider than signed 64bit representation.
Specifies the format to use when dumping the database schema with Rails’ Rakefile.
Show a warning when ::Rails
couldn’t parse your database.yml for multiple databases.
Specify whether or not to use timestamps for migration versions.
Application configurable boolean that instructs the YAML Coder to use an unsafe load if set to true.
Specifies if the methods calling database queries should be logged below their relevant queries.
Specify a threshold for the size of query result sets.
Application configurable array that provides additional permitted classes to Psych safe_load in the YAML Coder.
Inheritance
- Attributes & MethodsIntegration
- Attributes & MethodsModelSchema
- Attributes & MethodsNestedAttributes
- Attributes & MethodsReadonlyAttributes
- Attributes & MethodsReflection
- Attributes & MethodsSignedId
- Attributes & MethodsSet the secret used for the signed id verifier instance when using Active Record outside of ::Rails
.
Store
- Attributes & MethodsTimestamp
- Attributes & MethodsLocking::Optimistic
- Attributes & MethodsConnectionHandling
- Extended| connected? | Returns |
| connection_specification_name | Return the connection specification name from the current class or its parent. |
| connection_specification_name= |
Aggregations::ClassMethods
- Extended| composed_of | Adds reader and writer methods for manipulating a value object: |
Enum
- Extended| _enum_methods_module, assert_valid_enum_definition_values, detect_enum_conflict!, detect_negative_enum_conditions!, enum, raise_conflict_error |
DelegatedType
- Extended| delegated_type | Defines this as a class that’ll delegate its type for the passed |
::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. |
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 (ex 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_config | Returns the configuration of the associated connection as a hash: |
| 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!, remove_connection, retrieve_connection, | |
| while_preventing_writes | Prevent writing to the database regardless of role. |
::ActiveSupport::DescendantsTracker
- Extended::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 |
Serialization
- IncludedNoTouching
- Included| #no_touching? | Returns |
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. |
AttributeMethods::Dirty
- self| #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
- self| #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
- 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 save, the object didn’t exist in the database and new_record? would have returned true. |
Core
- Included| #frozen? | Returns |
| #readonly? | Returns |
| #strict_loading? | Returns |
SignedId
- 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. |
Transactions
- Included| #transaction | See |
| #with_transaction_returning_status | Executes |
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 |
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. |
AttributeMethods::Dirty
- self| #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? |
::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. |
AttributeMethods::PrimaryKey
- self| #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. |
AttributeMethods::Query
- selfAttributeMethods::BeforeTypeCast
- self| #attributes_before_type_cast | Returns a hash of attributes before typecasting and deserialization. |
| #read_attribute_before_type_cast | Returns the value of the attribute identified by |
AttributeMethods::Write
- self| #write_attribute | Updates the attribute identified by |
AttributeMethods::Read
- self| #_read_attribute | This method exists to avoid the expensive primary_key check internally, without breaking compatibility with the read_attribute API. |
| #read_attribute | Returns the value of the attribute identified by |
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 |
::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 |
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. |
Validations
- 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?. |
::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 |
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 |
::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 |
::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. |
Inheritance
- IncludedPersistence
- 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: |
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. |
This class handles dynamic methods through the method_missing method in the class ActiveModel::AttributeMethods
# File 'activerecord/lib/active_record/readonly_attributes.rb', line 8
class_attribute :_attr_readonly, instance_accessor: false, default: []
Boolean
(rw)
# File 'activerecord/lib/active_record/readonly_attributes.rb', line 8
class_attribute :_attr_readonly, instance_accessor: false, default: []
# File 'activerecord/lib/active_record/reflection.rb', line 11
class_attribute :_reflections, instance_writer: false, default: {}
Boolean
(rw)
# File 'activerecord/lib/active_record/reflection.rb', line 11
class_attribute :_reflections, instance_writer: false, default: {}
Set the application to log or raise when an association violates strict loading. Defaults to :raise
.
# File 'activerecord/lib/active_record/core.rb', line 140
mattr_accessor :action_on_strict_loading_violation, instance_accessor: false, default: :raise
# File 'activerecord/lib/active_record/reflection.rb', line 12
class_attribute :aggregate_reflections, instance_writer: false, default: {}
Boolean
(rw)
# File 'activerecord/lib/active_record/reflection.rb', line 12
class_attribute :aggregate_reflections, instance_writer: false, default: {}
# File 'activerecord/lib/active_record/attributes.rb', line 11
class_attribute :attributes_to_define_after_schema_loads, instance_accessor: false, default: {} # :internal:
Boolean
(rw)
# File 'activerecord/lib/active_record/attributes.rb', line 11
class_attribute :attributes_to_define_after_schema_loads, instance_accessor: false, default: {} # :internal:
# File 'activerecord/lib/active_record/core.rb', line 134
class_attribute :belongs_to_required_by_default, instance_accessor: false
Boolean
(rw)
# File 'activerecord/lib/active_record/core.rb', line 134
class_attribute :belongs_to_required_by_default, instance_accessor: false
# File 'activerecord/lib/active_record/integration.rb', line 16
class_attribute :, instance_writer: false, default: :usec
Boolean
(rw)
# File 'activerecord/lib/active_record/integration.rb', line 16
class_attribute :, instance_writer: false, default: :usec
# File 'activerecord/lib/active_record/integration.rb', line 24
class_attribute :cache_versioning, instance_writer: false, default: false
Boolean
(rw)
# File 'activerecord/lib/active_record/integration.rb', line 24
class_attribute :cache_versioning, instance_writer: false, default: false
# File 'activerecord/lib/active_record/integration.rb', line 32
class_attribute :collection_cache_versioning, instance_writer: false, default: false
Boolean
(rw)
# File 'activerecord/lib/active_record/integration.rb', line 32
class_attribute :collection_cache_versioning, instance_writer: false, default: false
Returns fully resolved DatabaseConfigurations
object
# File 'activerecord/lib/active_record/core.rb', line 69
def self.configurations @@configurations end
Contains the database configuration - as is typically stored in config/database.yml - as an DatabaseConfigurations
object.
For example, the following database.yml…
development:
adapter: sqlite3
database: db/development.sqlite3
production:
adapter: sqlite3
database: db/production.sqlite3
…would result in .configurations to look like this:
#<ActiveRecord::DatabaseConfigurations:0x00007fd1acbdf800 @configurations=[
#<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbded10 @env_name="development",
@name="primary", @config={adapter: "sqlite3", database: "db/development.sqlite3"}>,
#<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbdea90 @env_name="production",
@name="primary", @config={adapter: "sqlite3", database: "db/production.sqlite3"}>
]>
# File 'activerecord/lib/active_record/core.rb', line 63
def self.configurations=(config) @@configurations = ActiveRecord::DatabaseConfigurations.new(config) end
:nodoc
# File 'activerecord/lib/active_record/core.rb', line 276
def self.connection_class # :nodoc @connection_class ||= false end
# File 'activerecord/lib/active_record/core.rb', line 175
def self.connection_handler Thread.current.thread_variable_get(:ar_connection_handler) || default_connection_handler end
# File 'activerecord/lib/active_record/core.rb', line 179
def self.connection_handler=(handler) Thread.current.thread_variable_set(:ar_connection_handler, handler) end
# File 'activerecord/lib/active_record/core.rb', line 183
def self.connection_handlers unless legacy_connection_handling raise NotImplementedError, "The new connection handling does not support accessing multiple connection handlers." end @@connection_handlers ||= {} end
# File 'activerecord/lib/active_record/core.rb', line 191
def self.connection_handlers=(handlers) unless legacy_connection_handling raise NotImplementedError, "The new connection handling does not setting support multiple connection handlers." end @@connection_handlers = handlers end
# File 'activerecord/lib/active_record/core.rb', line 150
class_attribute :default_connection_handler, instance_writer: false
Boolean
(rw)
# File 'activerecord/lib/active_record/core.rb', line 150
class_attribute :default_connection_handler, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 152
class_attribute :default_role, instance_writer: false
Boolean
(rw)
# File 'activerecord/lib/active_record/core.rb', line 152
class_attribute :default_role, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 154
class_attribute :default_shard, instance_writer: false
Boolean
(rw)
# File 'activerecord/lib/active_record/core.rb', line 154
class_attribute :default_shard, instance_writer: false
Determines whether to use Time.utc
(using :utc
) or Time.local
(using :local
) when pulling dates and times from the database. This is set to :utc
by default.
# File 'activerecord/lib/active_record/core.rb', line 77
mattr_accessor :default_timezone, instance_writer: false, default: :utc
# File 'activerecord/lib/active_record/core.rb', line 39
class_attribute :destroy_association_async_job, instance_writer: false, instance_predicate: false, default: false
Specify whether schema dump should happen at the end of the db:migrate rails command. This is true by default, which is useful for the development environment. This should ideally be false in the production environment where dumping schema is rarely needed.
# File 'activerecord/lib/active_record/core.rb', line 107
mattr_accessor :dump_schema_after_migration, instance_writer: false, default: true
Specifies which database schemas to dump when calling db:schema:dump. If the value is :schema_search_path
(the default), any schemas listed in schema_search_path are dumped. Use :all
to dump all schemas regardless of schema_search_path, or a string of comma separated schemas for a custom list.
# File 'activerecord/lib/active_record/core.rb', line 116
mattr_accessor :dump_schemas, instance_writer: false, default: :schema_search_path
Specifies if an error should be raised if the query has an order being ignored when doing batch queries. Useful in applications where the scope being ignored is error-worthy, rather than a warning.
# File 'activerecord/lib/active_record/core.rb', line 94
mattr_accessor :error_on_ignored_order, instance_writer: false, default: false
# File 'activerecord/lib/active_record/core.rb', line 148
mattr_accessor :has_many_inversing, instance_accessor: false, default: false
# File 'activerecord/lib/active_record/model_schema.rb', line 138
class_attribute :immutable_strings_by_default, instance_accessor: false
Boolean
(rw)
# File 'activerecord/lib/active_record/model_schema.rb', line 138
class_attribute :immutable_strings_by_default, instance_accessor: false
# File 'activerecord/lib/active_record/model_schema.rb', line 137
class_attribute :implicit_order_column, instance_accessor: false
Boolean
(rw)
# File 'activerecord/lib/active_record/model_schema.rb', line 137
class_attribute :implicit_order_column, instance_accessor: false
# File 'activerecord/lib/active_record/autosave_association.rb', line 153
mattr_accessor :index_nested_attribute_errors, instance_writer: false, default: false
# File 'activerecord/lib/active_record/model_schema.rb', line 135
class_attribute :, instance_accessor: false, default: "ar_internal_metadata"
Boolean
(rw)
# File 'activerecord/lib/active_record/model_schema.rb', line 135
class_attribute :, instance_accessor: false, default: "ar_internal_metadata"
# File 'activerecord/lib/active_record/core.rb', line 156
mattr_accessor :legacy_connection_handling, instance_writer: false, default: true
# File 'activerecord/lib/active_record/store.rb', line 99
attr_accessor :local_stored_attributes
# File 'activerecord/lib/active_record/locking/optimistic.rb', line 56
class_attribute :lock_optimistically, instance_writer: false, default: true
Boolean
(rw)
# File 'activerecord/lib/active_record/locking/optimistic.rb', line 56
class_attribute :lock_optimistically, instance_writer: false, default: true
Accepts a logger conforming to the interface of Log4r which is then passed on to any new database connections made and which can be retrieved on both a class and instance level by calling logger
.
# File 'activerecord/lib/active_record/core.rb', line 20
mattr_accessor :logger, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 132
mattr_accessor :maintain_test_schema, instance_accessor: false
# File 'activerecord/lib/active_record/nested_attributes.rb', line 15
class_attribute :, instance_writer: false, default: {}
Boolean
(rw)
# File 'activerecord/lib/active_record/nested_attributes.rb', line 15
class_attribute :, instance_writer: false, default: {}
# File 'activerecord/lib/active_record/model_schema.rb', line 136
class_attribute :pluralize_table_names, instance_writer: false, default: true
Boolean
(rw)
# File 'activerecord/lib/active_record/model_schema.rb', line 136
class_attribute :pluralize_table_names, instance_writer: false, default: true
# File 'activerecord/lib/active_record/model_schema.rb', line 130
mattr_accessor :primary_key_prefix_type, instance_writer: false
Specifies the names of the queues used by background jobs.
# File 'activerecord/lib/active_record/core.rb', line 33
mattr_accessor :queues, instance_accessor: false, default: {}
Application configurable boolean that denotes whether or not to raise an exception when the PostgreSQLAdapter is provided with an integer that is wider than signed 64bit representation
# File 'activerecord/lib/active_record/core.rb', line 171
mattr_accessor :raise_int_wider_than_64bit, instance_writer: false, default: true
# File 'activerecord/lib/active_record/core.rb', line 146
mattr_accessor :reading_role, instance_accessor: false, default: :reading
# File 'activerecord/lib/active_record/timestamp.rb', line 47
class_attribute :, default: true
Boolean
(rw)
# File 'activerecord/lib/active_record/timestamp.rb', line 47
class_attribute :, default: true
Specifies the format to use when dumping the database schema with Rails’ Rakefile. If :sql
, the schema is dumped as (potentially database- specific) SQL statements. If :ruby
, the schema is dumped as an Schema
file which can be loaded into any database that supports migrations. Use :ruby
if you want to have different database adapters for, e.g., your development and test environments.
# File 'activerecord/lib/active_record/core.rb', line 87
mattr_accessor :schema_format, instance_writer: false, default: :ruby
# File 'activerecord/lib/active_record/model_schema.rb', line 134
class_attribute :schema_migrations_table_name, instance_accessor: false, default: "schema_migrations"
Boolean
(rw)
# File 'activerecord/lib/active_record/model_schema.rb', line 134
class_attribute :schema_migrations_table_name, instance_accessor: false, default: "schema_migrations"
# File 'activerecord/lib/active_record/signed_id.rb', line 13
mattr_accessor :signed_id_verifier_secret, instance_writer: false
# File 'activerecord/lib/active_record/inheritance.rb', line 41
class_attribute :store_full_class_name, instance_writer: false, default: true
Boolean
(rw)
# File 'activerecord/lib/active_record/inheritance.rb', line 41
class_attribute :store_full_class_name, instance_writer: false, default: true
# File 'activerecord/lib/active_record/inheritance.rb', line 45
class_attribute :store_full_sti_class, instance_writer: false, default: true
Boolean
(rw)
# File 'activerecord/lib/active_record/inheritance.rb', line 45
class_attribute :store_full_sti_class, instance_writer: false, default: true
# File 'activerecord/lib/active_record/core.rb', line 142
class_attribute :strict_loading_by_default, instance_accessor: false, default: false
Boolean
(rw)
# File 'activerecord/lib/active_record/core.rb', line 142
class_attribute :strict_loading_by_default, instance_accessor: false, default: false
Show a warning when ::Rails
couldn’t parse your database.yml for multiple databases.
# File 'activerecord/lib/active_record/core.rb', line 130
mattr_accessor :suppress_multiple_database_warning, instance_writer: false, default: false
# File 'activerecord/lib/active_record/model_schema.rb', line 132
class_attribute :table_name_prefix, instance_writer: false, default: ""
Boolean
(rw)
# File 'activerecord/lib/active_record/model_schema.rb', line 132
class_attribute :table_name_prefix, instance_writer: false, default: ""
# File 'activerecord/lib/active_record/model_schema.rb', line 133
class_attribute :table_name_suffix, instance_writer: false, default: ""
Boolean
(rw)
# File 'activerecord/lib/active_record/model_schema.rb', line 133
class_attribute :table_name_suffix, instance_writer: false, default: ""
Specify whether or not to use timestamps for migration versions
# File 'activerecord/lib/active_record/core.rb', line 99
mattr_accessor :, instance_writer: false, default: true
Application configurable boolean that instructs the YAML Coder to use an unsafe load if set to true.
# File 'activerecord/lib/active_record/core.rb', line 160
mattr_accessor :use_yaml_unsafe_load, instance_writer: false, default: false
Specifies if the methods calling database queries should be logged below their relevant queries. Defaults to false.
# File 'activerecord/lib/active_record/core.rb', line 27
mattr_accessor :verbose_query_logs, instance_writer: false, default: false
Specify a threshold for the size of query result sets. If the number of records in the set exceeds the threshold, a warning is logged. This can be used to identify queries which load thousands of records and potentially cause memory bloat.
# File 'activerecord/lib/active_record/core.rb', line 124
mattr_accessor :warn_on_records_fetched_greater_than, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 144
mattr_accessor :writing_role, instance_accessor: false, default: :writing
Application configurable array that provides additional permitted classes to Psych safe_load in the YAML Coder
# File 'activerecord/lib/active_record/core.rb', line 164
mattr_accessor :yaml_column_permitted_classes, instance_writer: false, default: [Symbol]
Returns the symbol representing the current setting for preventing writes.
ActiveRecord::Base.connected_to(role: :reading) do
ActiveRecord::Base.current_preventing_writes #=> true
end
ActiveRecord::Base.connected_to(role: :writing) do
ActiveRecord::Base.current_preventing_writes #=> false
end
# File 'activerecord/lib/active_record/core.rb', line 249
def self.current_preventing_writes if legacy_connection_handling connection_handler.prevent_writes else connected_to_stack.reverse_each do |hash| return hash[:prevent_writes] if !hash[:prevent_writes].nil? && hash[:klasses].include?(Base) return hash[:prevent_writes] if !hash[:prevent_writes].nil? && hash[:klasses].include?(connection_classes) end false end end
Returns the symbol representing the current connected role.
ActiveRecord::Base.connected_to(role: :writing) do
ActiveRecord::Base.current_role #=> :writing
end
ActiveRecord::Base.connected_to(role: :reading) do
ActiveRecord::Base.current_role #=> :reading
end
# File 'activerecord/lib/active_record/core.rb', line 208
def self.current_role if ActiveRecord::Base.legacy_connection_handling connection_handlers.key(connection_handler) || default_role else connected_to_stack.reverse_each do |hash| return hash[:role] if hash[:role] && hash[:klasses].include?(Base) return hash[:role] if hash[:role] && hash[:klasses].include?(connection_classes) end default_role end end
Returns the symbol representing the current connected shard.
ActiveRecord::Base.connected_to(role: :reading) do
ActiveRecord::Base.current_shard #=> :default
end
ActiveRecord::Base.connected_to(role: :writing, shard: :one) do
ActiveRecord::Base.current_shard #=> :one
end
# File 'activerecord/lib/active_record/core.rb', line 230
def self.current_shard connected_to_stack.reverse_each do |hash| return hash[:shard] if hash[:shard] && hash[:klasses].include?(Base) return hash[:shard] if hash[:shard] && hash[:klasses].include?(connection_classes) end default_shard end
# File 'activerecord/lib/active_record/reflection.rb', line 11
class_attribute :_reflections, instance_writer: false, default: {}
Boolean
(readonly)
# File 'activerecord/lib/active_record/reflection.rb', line 11
class_attribute :_reflections, instance_writer: false, default: {}
# File 'activerecord/lib/active_record/reflection.rb', line 12
class_attribute :aggregate_reflections, instance_writer: false, default: {}
Boolean
(readonly)
# File 'activerecord/lib/active_record/reflection.rb', line 12
class_attribute :aggregate_reflections, instance_writer: false, default: {}
# File 'activerecord/lib/active_record/integration.rb', line 16
class_attribute :, instance_writer: false, default: :usec
Boolean
(readonly)
# File 'activerecord/lib/active_record/integration.rb', line 16
class_attribute :, instance_writer: false, default: :usec
# File 'activerecord/lib/active_record/integration.rb', line 24
class_attribute :cache_versioning, instance_writer: false, default: false
Boolean
(readonly)
# File 'activerecord/lib/active_record/integration.rb', line 24
class_attribute :cache_versioning, instance_writer: false, default: false
# File 'activerecord/lib/active_record/integration.rb', line 32
class_attribute :collection_cache_versioning, instance_writer: false, default: false
Boolean
(readonly)
# File 'activerecord/lib/active_record/integration.rb', line 32
class_attribute :collection_cache_versioning, instance_writer: false, default: false
# File 'activerecord/lib/active_record/model_schema.rb', line 144
delegate :type_for_attribute, :column_for_attribute, to: :class
# File 'activerecord/lib/active_record/core.rb', line 150
class_attribute :default_connection_handler, instance_writer: false
Boolean
(readonly)
# File 'activerecord/lib/active_record/core.rb', line 150
class_attribute :default_connection_handler, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 152
class_attribute :default_role, instance_writer: false
Boolean
(readonly)
# File 'activerecord/lib/active_record/core.rb', line 152
class_attribute :default_role, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 154
class_attribute :default_shard, instance_writer: false
Boolean
(readonly)
# File 'activerecord/lib/active_record/core.rb', line 154
class_attribute :default_shard, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 77
mattr_accessor :default_timezone, instance_writer: false, default: :utc
# File 'activerecord/lib/active_record/core.rb', line 39
class_attribute :destroy_association_async_job, instance_writer: false, instance_predicate: false, default: false
# File 'activerecord/lib/active_record/core.rb', line 107
mattr_accessor :dump_schema_after_migration, instance_writer: false, default: true
# File 'activerecord/lib/active_record/core.rb', line 116
mattr_accessor :dump_schemas, instance_writer: false, default: :schema_search_path
# File 'activerecord/lib/active_record/core.rb', line 94
mattr_accessor :error_on_ignored_order, instance_writer: false, default: false
# File 'activerecord/lib/active_record/autosave_association.rb', line 153
mattr_accessor :index_nested_attribute_errors, instance_writer: false, default: false
# File 'activerecord/lib/active_record/core.rb', line 156
mattr_accessor :legacy_connection_handling, instance_writer: false, default: true
# File 'activerecord/lib/active_record/locking/optimistic.rb', line 56
class_attribute :lock_optimistically, instance_writer: false, default: true
Boolean
(readonly)
# File 'activerecord/lib/active_record/locking/optimistic.rb', line 56
class_attribute :lock_optimistically, instance_writer: false, default: true
# File 'activerecord/lib/active_record/core.rb', line 20
mattr_accessor :logger, instance_writer: false
# File 'activerecord/lib/active_record/nested_attributes.rb', line 15
class_attribute :, instance_writer: false, default: {}
Boolean
(readonly)
# File 'activerecord/lib/active_record/nested_attributes.rb', line 15
class_attribute :, instance_writer: false, default: {}
# File 'activerecord/lib/active_record/model_schema.rb', line 136
class_attribute :pluralize_table_names, instance_writer: false, default: true
Boolean
(readonly)
# File 'activerecord/lib/active_record/model_schema.rb', line 136
class_attribute :pluralize_table_names, instance_writer: false, default: true
# File 'activerecord/lib/active_record/model_schema.rb', line 130
mattr_accessor :primary_key_prefix_type, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 171
mattr_accessor :raise_int_wider_than_64bit, instance_writer: false, default: true
# File 'activerecord/lib/active_record/timestamp.rb', line 47
class_attribute :, default: true
Boolean
(rw)
# File 'activerecord/lib/active_record/timestamp.rb', line 47
class_attribute :, default: true
# File 'activerecord/lib/active_record/core.rb', line 87
mattr_accessor :schema_format, instance_writer: false, default: :ruby
# File 'activerecord/lib/active_record/signed_id.rb', line 13
mattr_accessor :signed_id_verifier_secret, instance_writer: false
# File 'activerecord/lib/active_record/inheritance.rb', line 41
class_attribute :store_full_class_name, instance_writer: false, default: true
Boolean
(readonly)
# File 'activerecord/lib/active_record/inheritance.rb', line 41
class_attribute :store_full_class_name, instance_writer: false, default: true
# File 'activerecord/lib/active_record/inheritance.rb', line 45
class_attribute :store_full_sti_class, instance_writer: false, default: true
Boolean
(readonly)
# File 'activerecord/lib/active_record/inheritance.rb', line 45
class_attribute :store_full_sti_class, instance_writer: false, default: true
# File 'activerecord/lib/active_record/core.rb', line 130
mattr_accessor :suppress_multiple_database_warning, instance_writer: false, default: false
# File 'activerecord/lib/active_record/model_schema.rb', line 132
class_attribute :table_name_prefix, instance_writer: false, default: ""
Boolean
(readonly)
# File 'activerecord/lib/active_record/model_schema.rb', line 132
class_attribute :table_name_prefix, instance_writer: false, default: ""
# File 'activerecord/lib/active_record/model_schema.rb', line 133
class_attribute :table_name_suffix, instance_writer: false, default: ""
Boolean
(readonly)
# File 'activerecord/lib/active_record/model_schema.rb', line 133
class_attribute :table_name_suffix, instance_writer: false, default: ""
# File 'activerecord/lib/active_record/core.rb', line 99
mattr_accessor :, instance_writer: false, default: true
# File 'activerecord/lib/active_record/model_schema.rb', line 144
delegate :type_for_attribute, :column_for_attribute, to: :class
# File 'activerecord/lib/active_record/core.rb', line 160
mattr_accessor :use_yaml_unsafe_load, instance_writer: false, default: false
# File 'activerecord/lib/active_record/core.rb', line 27
mattr_accessor :verbose_query_logs, instance_writer: false, default: false
# File 'activerecord/lib/active_record/core.rb', line 124
mattr_accessor :warn_on_records_fetched_greater_than, instance_writer: false
# File 'activerecord/lib/active_record/core.rb', line 164
mattr_accessor :yaml_column_permitted_classes, instance_writer: false, default: [Symbol]


---
layout: post
title: Wayward Children
date: '2007-08-20T19:24:00.000-05:00'
author: Jabell
tags:
- Family
- Suffering
modified_time: '2007-08-20T19:28:20.448-05:00'
blogger_id: tag:blogger.com,1999:blog-19739956.post-3619217049614954903
blogger_orig_url: http://theabellsix.blogspot.com/2007/08/wayward-children.html
---
Every parent's fear is to have a rebellious, wayward child. Sometimes, despite the best effort at raising a child for Christ, they rebel.
Abraham Piper was such a child. By the grace of God he has since returned and wrote this piece of advice for parents with wayward children.
Read 12 Ways to Love your Wayward Child at the DG blog.


Bill Fitzgerald already wrote an analysis of what can happen now that Congress has essentially erased privacy rules governing how Internet Service Providers can gather and sell your information indiscriminately, so I won’t get into that here. If you’re in #edtech, listen up: School data can now be used by the service provider to gather student... Read more 29 Mar 2017 - 1 minute read
If you’re working in instructional support (#edtech, instructional tech, learning support…whatever you want to call it) you’ve probably heard, “Today’s students just learn differently.” No they don’t. Writers will write. Storytellers will tell stories. Musicians will make music. Athletes will compete. People have drives to be creative, curiou... Read more 28 Mar 2017 - 1 minute read
Teaching is being overrun by impostors. Perhaps I’m reading into something, but the explosion of “Teach Like a [thing]” culture scares me. Culturally, have we reached a place in education where taking on a persona to find inspiration for change is the best option for our students? Simile is powerful and inspiration comes in many forms. But when ... Read more 13 Mar 2017 - 1 minute read
I wanted to use a new method of reviewing with students as we wrap up our cell activity unit. I’ve been working with my students on forming questions with the question formulation strategy around content as well as finding new ways to build content knowledge resources. We’re at the point in the year where details are more and more significant an... Read more 10 Mar 2017 - 1 minute read
I’m proud of the work I do every day, both in my classroom and in the small instructional team I work with. There’s nothing wrong with being proud of work, but there’s a world of hurt if pride creeps its way into your team dynamic. Being prideful serves only one person – you. It will alienate you from relationships, especially when there is sha... Read more 16 Feb 2017 - 2 minute read
This is a cross post from my photo-a-day(ish) blog, the photoyear. — Kinsman soap flickr photo by bennettscience shared under a Creative Commons (BY) license My family has a heart for the refugee crisis. We’ve researched how we can help Syrians, in particular, fleeing civil war find their way to the United States. Unfortunately, Indiana has... Read more 24 Jan 2017 - less than 1 minute read
One of the main responsibilities my team has is offering and running training on a number of resources teachers in the district have access to. The most popular, because of their new-ness, are Google Apps (GSuite…whatever) and Canvas. Because we offer so many workshops, our Drive is full of copies of copies of copies of registration forms. So, I... Read more 23 Jan 2017 - 2 minute read
When I try new things, the fear really sets in as I’m giving instructions and trying to pick up on the nonverbal cues my students are sending me. Most days, they roll with it. Other days…well, there is usually some kind of course correction in there. But it’s part of my practice now. Not crashing and burning of course; I learn a lot on those da... Read more 17 Jan 2017 - 2 minute read
I use darktable to edit my photos. It’s a really robust RAW photo editor with a very active development community. The GitHub repo has 19,000+ commits on it over the last five or six years, which is great because it means active improvements. Open source FTW. It’s built mainly for Linux, but somewhere, someone added an OSX installer. I edit my ... Read more 04 Jan 2017 - 1 minute read
Pictures launch stories. I take a lot of photos and like most people, they stay on my phone. I used to use Instagram, but I’m not happy with their terms or use limitations on photos (ever tried to embed an image? It’s a nightmare). Maybe I’m an idealist and this is a funk, but whatever. I’m posting to Flickr more and more regularly and I decide... Read more 01 Jan 2017 - 2 minute read


Family is very important and valuable to me and it is something that should never be taken for granted. No matter what my family makes up a huge part of who am I today. Without my family, a large part of my life and culture would be missing. My family is a small family with four peoples.  She is currently unemployed and now staying at home doing housework. She always took care of me and my little sister very well. My father is an air force and a musician. He is a really hardworking man and I would like to thank him for showing me what a hardworking man truly is and for teaching me how to be more responsible. In this world of doubt, insecurity and fear, my family is always there for me.
With family playing such a major role in our identities, it’s no wonder that great writers, celebrated thinkers, and observant luminaries have had such amazing insights into what it means to be a family. Read words from Walt Disney, Mother Teresa, Winston Churchill, Barbara Bush, and George Bernard Shaw, among others, and see what they’ve had to say about familial bonds. And then remember to go FaceTime with your mother


Tests require being defined as an object with init and ready configuration.
Check console for messages.


The requested URL /assets/css/themes/custom7ec07ec0.css was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


{% extends "base.html" %} {% block announce %} Support and follow my work at Damn That Television {% endblock %}


Average heated living space of single-family housing units
Houses have been steadily increasing in size over many decades as living standards and norms have changed and incomes have risen. Average housing size may be an indicator of affordability, as larger houses tend to be more expensive to own/rent and maintain, and may also be used to assess environmental impacts. As housing size increases, more resources are used in construction, more land is occupied, more energy consumption is increased, tree canopy may diminish along with increases in impervious surfaces and stormwater runoff. Increases in average housing size may indicate new construction on previously undeveloped land, or indicate in-fill or redevelopment in an older neighborhood with smaller houses. The trend towards larger houses can impact both the character and affordability of older neighborhoods during periods of revitalization and reinvestment.
####How are we doing? The average size of single-family houses in Mecklenburg County increased from 2011 to 2013, continuing a long-term trend. Nationwide, the average size of single-family houses has increased nearly 600 square feet in 30 years, even as the average household size (occupants) has declined.
####Did you know? According to research in The Appraisal Journal, the size of a home relative to the average sized home in a neighborhood may affect its sales price. Homes that were smaller than the average home sold at an average 4.7% premium.
####Related Variables
Housing Age
Home Sales Price
Residential New Construction
Residential Renovation
Energy Consumption - Electricity
Energy Consumption - Natural Gas
Impervious Surface
Tree Canopy
Sum of heated square footage of all single family housing units divided by the number of single-family housing units. Single family housing units include single family detached units, duplexes, triplexes, and mobile homes.
Source: Mecklenburg County Tax Parcels
| Resource | Learn More and Take Action |
|---|---|
| Energy Conservation Tips | Tips from Duke Energy to make homes more efficient and lower energy costs. |
| Residential Energy Consumption Survey | National data and analysis of trends in residential energy use, by home size and age. |
| No small-house trend in region | UNC Charlotte Urban Institute article on continued rise in house size in the Charlotte region. |
| Housing Services | The City of Charlotte offers a variety of housing services for eligible home buyers. |
| Builders of Hope | Providing affordable housing and urban renewal through the reuse of existing housing stock. |
| Habitat for Humanity | Building affordable homes for low-income families in Charlotte, North Mecklenburg, and Matthews. |


We're sorry but this doesn't work properly without JavaScript enabled. Please enable it to continue.
Hello World
Hello again


Programming & Software
R, Python, SQL, Linux/Unix, Tableau, Stata, LaTeX, ArcGIS, & Git
Statistics
Regression and modeling techniques
Multi-level and simultaneous equations
Temporal and spatial modeling
Network analysis and metrics
Algorithms and modeling
Diagnostics: model fit/outliers/assumptions
Data
Data mining and dataset construction
Data wrangling/munging
Feature extraction/engineering
Missing data/imputation
Machine learning
Visualization
Languages
Fluent in French, and Spanish, with Advanced Arabic.


Where is a geodetic software package, used for professional analysis of VLBI data.
This is the quickstart guide for Where version 2. For earlier versions see quickstart guide v1.
Running a VLBI analysis
To do an analysis with Where you only need to specify which analysis pipeline you want to run (i.e. VLBI), as well as the date and session_code of your data. The most basic Where command looks something like
where 2016 12 27 --vlbi --session_code=R1772
This command can be extended by setting any of the many configuration options
available for an analysis. More details about the configuration settings are in
a separate page You can also run
where --help
for a quick overview.
Exploring the analysis results
To look at the results of your analysis, you can use the companion tool
There. The there
command works similarly to where
, so to see the
results from the analysis earlier you can do:
there 2016 12 27 --vlbi --session_code=R1772
More details about There can be found on a separate page.
Exploring with Python
If you are comfortable using the Python programming language, you can also
explore the analysis results in a Python interactive shell. Run Where with the
-I
/ --interactive
option. This will open an interactive Python (ipython
)
shell the analysis preloaded into variables named v0
, v1
and so on:
where 2016 12 27 --vlbi --session_code=R1772 -I


The growth and development of a child takes place at home and at school, so a child’s education is not complete without the support of the parents. That is why at NFC, we believe in fostering responsive teacher-parent relationships based on care, trust and respect as the cornerstone to the children’s holistic development.
NTUC First Campus reaches out to support children from low-income families and children with learning needs through the Child Support Model.
Our integrated team of educators, therapists, child enabling executives and classroom facilitators work alongside teachers, parents and community partners to enhance the learning and well-being of children with needs.
MFS is committed to offering the necessary financial, social and developmental support to children from underprivileged families through NFC’s Child Support Services (CSS). In 2018, there were some 3,000 beneficiaries of the CSS, including 127 MFS centres with Developmental Support Programme and 10 KidSTART centres supported by 70 Child Support professionals. NFC will continue to scale the Child Support Model (CSM) to more MFS centres and be a practice leader with this financial and learning intervention model. NFC also frequently organises Family and School Together (FAST) events throughout the year, where families in need of financial support receive financial assistance, enabling them to visit sites and attractions around Singapore together and bond over new experiences.
In 2018, Parents College launched the KidzMatters website, an online resource with how-to-guides and activities for parents with children aged 0 to 6. Topics range from Health & Nutrition, Daily Care to Play and many more. Parents College also organises workshops for parents, helping to promote and enhance parent child-relationships, as well as strengthen children’s social emotional development. Visit the KidzMatters website at https://www.kidzmatters.com/.


?*?«?0
123456789
10
The
New
York
?
???P
cm
copyright
reserved
Botanical
Garden
CAMBRIDGE
UNIVERSITY
EXPEDITION
JAMAICA
1939
EX
HERBARIO
MUSEI
BRITANNICI
Rhizophora
Mangle
L.
Locality:
-Palisadoes
•
Altitude:
Date
:29'th«
July
1939
Habitat:
Coastal
swamp.
Calyx
cream,
petals
white.
About
15ft.
high.
W.
R.
Phllipson
No.
525*
1624091
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Jeremiah 38:3
Thus saith the LORD, This city shall surely be given into the hand of the king of Babylon's army, which shall take it.


ROGER & ME A film review by Mark R. Leeper Copyright 1990 Mark R. Leeper
Capsule review: A biting documentary about the destruction GM does by closing plants in Flint, Michigan. It is razor-sharp and bitter. Moore's film is a compilation of footage he took and pieces from stock footage, documentaries, television, etc. Moore rarely has to use narration to tell the audience the point of a sequence; the point is clear from the footage he chooses. The film has a very effective documentary style. Rating: high +2.
Michael Moore will likely turn out to be a flash in the pan. He has a lot to say about a subject he has been intimately involved with, but it seems unlikely there is any other subject he will be able to make another film about with such wit and insight. But the film he did make may be a real shot in the arm for documentary filmmaking. How long has it been since a documentary has made it to first-run popular (as opposed to art) theaters? ROGER & ME has, and with very few overt jokes, it is one of the funniest films of the year. It seems amazing that by filming a true story as it actually is happening Moore could have come up with a film at once as funny and as sad as ROGER & ME, but that is the power of the documentary film maker and editor.
ROGER & ME is Moore's funny, bitter account of the decline of Flint, Michigan, due to its plant closings, and of Moore's own attempts to interview Roger Smith, the chairman of General Motors. Smith clearly did not want to be interviewed by Moore and it is easy to understand why. Moore's interviews turn everyone he talks to into pate'. So time after time, Smith--or people who work for Smith--foil Moore's attempts at an interview and they become the film's running gag. Happening once or twice it would look like daily business, but when Moore is foiled time after time Smith just ends up looking worse and worse. And just as surely as we occasionally have national heroes, Moore has succeeded in making Roger Smith a national villain.
But the film is more than just an indictment of Smith or even of the auto industry. Moore has captured on film Middle America with every pimple and pore showing. He shows hare-brained schemes for reviving Flint, such as the GM-built theme park Autoworld, built under the assumption that if GM is in love with cars, the whole country is in love with cars. It featured a puppet auto-worker singing love songs to a robot assembler which Moore notes will replace him. GM brought in celebrities such as Pat Boone, Anita Bryant, and Robert Schuller to spread messages of silly optimism. "Turn your hurt into a halo," Schuller advises with as straight a face as Schuller ever has. When people are in real trouble there is little that can be said to make it better and Moore's camera zooms in on the foolishness of trying to fix things up with mere words. One woman becomes an Amway distributor and seems to have gone off the deep end on somebody's theory that everybody has a "season of color" like a zodiac sign, and you must get cosmetics and clothing in colors determined by your season of color. The theory sounds like Elizabeth Arden meets New Age thinking. Another woman goes into raising rabbits for pets or meat and cheerfully kills and flays a rabbit for the camera.
GM also gets "The Newlywed Game"'s Bob Eubanks, who fails from Flint, to come to town and tell people how great Flint is. While Moore is doing a number on Roger Smith, Eubanks is doing a number on himself that could be just as bad.
While I do not have any particular respect for somebody who is a black belt at karate, I can respect a perfectly placed karate kick. While I do not always respect Moore's methods, his film is a perfectly placed kick to the auto industry and all those who support it. This is not fair documentary filmmaking, but it is entertaining and it is effective. It has precisely the effect on the audience that it was intended to have. I would give it a high +2 on the -4 to +4 scale.
Mark R. Leeper att!mtgzx!leeper<EMAIL_ADDRESS>.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


SideEffectError
public struct SideEffectError : ActionProtocol
When the SideEffectMiddleware
starts a SideEffectProducer
which throws an error, the middleware will wrap the error in a ActionProtocol
of type SideEffectError
, which contains details about the error, the date and time when it happened and the original event that was being handled by the middleware.
-
Date and time when the error happened
Declaration
Swift
public var date: Date
-
The original event that was being handled by the middleware when the error was thrown
Declaration
Swift
public let originalEvent: EventProtocol
-
The error thrown by the
SideEffectProducer
to theSideEffectMiddleware
Declaration
Swift
public let error: Error


Directories | |
| directory | client-glue |
| directory | XMPCommon |
| directory | XMPCore |
Files | |
| file | TXMPFiles.hpp [code] |
| API for access to the main (document-level) metadata in a file_. | |
| file | TXMPIterator.hpp [code] |
| API for access to the XMP Toolkit iteration services. | |
| file | TXMPMeta.hpp [code] |
| API for access to the XMP Toolkit core services. | |
| file | TXMPUtils.hpp [code] |
| API for access to the XMP Toolkit utility services. | |
| file | XMP.hpp [code] |
| Overall header file for the XMP Toolkit. | |
| file | XMP_Const.h [code] |
| Common C/C++ types and constants for the XMP toolkit. | |
| file | XMP_Environment.h [code] |
| file | XMP_IO.hpp [code] |
| file | XMP_Version.h [code] |


Bacon ipsum dolor amet venison fatback capicola picanha ham hock sausage. Short ribs jowl ham hock beef. Rump beef ribs jowl frankfurter flank cupim. Cow hamburger rump pancetta.
Capicola chuck tongue shankle pork chop, jerky pork. Andouille rump burgdoggen pork chop shank meatloaf biltong ham porchetta venison. Pork bresaola pork loin tongue pastrami tri-tip. Porchetta venison meatball meatloaf salami chicken tenderloin spare ribs. T-bone bacon landjaeger ribeye swine boudin shankle strip steak porchetta leberkas.
Tail bresaola cow drumstick. Ham hock shankle meatball spare ribs pork loin, boudin short loin filet mignon alcatra sirloin beef ribs. Leberkas shank ham hock, t-bone bacon beef ribs sausage ground round tail burgdoggen doner rump corned beef. Rump tenderloin biltong, pork loin capicola pastrami strip steak tri-tip flank chuck landjaeger venison doner beef ribs filet mignon. Ham hock landjaeger rump porchetta burgdoggen ball tip. Venison flank chicken pork loin tongue jowl, bresaola shank picanha tri-tip sausage sirloin filet mignon kielbasa frankfurter.


6.S198 Assignment 4
Jenny Xue<EMAIL_ADDRESS>1.1) Visualizing datasets using the embedding projector
-
Do the different digits separate into distinct clouds? Are there images that are in the wrong cloud, and can you make sense of why they are wrong? Are there images that are outliers from the rest of the data?
Are there digits that seem more separate from the others, and are there pairs of digits that are more easily confused?
-
The different digits separate into distinct clouds. As you can see from the examples that I have attached, the distinction is clearly seen in the different colored clouds, for example 6 and 0. However, you
can also spot many 5's separating from the 5 cloud and blending in even to the 0 cloud. The reason that they are in the wrong cloud could be because of many reasons. First, I only ran the simulation for about 200 iterations, which means
that it's not trained enough. Secondn, the way these 5's are written connects the bottom circle, which makes them resemble 0s.
-
I highlighted some of the outliers below, which are the numbers with the greatest variance.
-
The numbers that border each other are more easily confused, but the numbers that are on opposite ends of each other show more separation. For exmample,
0 and 1 are very separated while the highlighted 0 & 2, 0 & 6, and 4 & 9 are more easily confused.
1.3) Word geometry
-
The words will now be displayed from left to right according to their distance along the line from “violin” to “drum”. (You'll notice that you're now unable to rotate the 3D space due to the left/right settings.) Can you give any interpretations to what is shown?
-
With violin on the left side and drum on the right side, the other words that are shown are the closest neighbors (words most frequently appeared with) of both violin and drum and it shows the distance between them. As we can see, piano is more
frequently appeared with violin.
-
Experiment with various words to see if you can identify any insights about the data set. For example, try “politics” along the dimension from “bad” to “good”, or
“engineer” along the spectrum from “man” to “woman”. Write up some notes on your observations, perhaps supplemented with a few pictures. Do you get different or better
results if you use Word2Vec All instead of 10K? Did you find any interesting examples that speak to how words are used news articles? Write up what you experimented with
and what conclusions you drew.
-
The two images show "engineer" along the dimension from "man" to "woman" and also the neighbor "soldier." The left image is of Word2Vec 10K and the right image is of Word2Vec All. Overall there are no major differences between 10K and All, the words are mostly still on the same "side"
of the spectrum (right or left). In 10K, soldier is more frequently associated with woman while in All, solider is more towards the middle (associated frequently with both). This is because there are more words which means there could be additional relationships that are formed between words. Both wordsets
are able to depict the innate bias in "engineer", that society associates engineers with men more often than women. There's not really "better" results.
-
The left image show "democrat" along the dimension from "bad" to "good", while the right image show "republican" along the dimension from "bad" to "good". Both are from the Word2VecAll dataset. As you can see, democrat is more frequently associated with "good" while republican is more
frequently associated with "bad".
-
The left image show "democrat" along the dimension from "bad" to "good", while the right image show "republican" along the dimension from "bad" to "good". Both are from the Word2Vec 10K dataset. As you can see, both are more associated with "bad", but democrat is still slightly more frequently associated with "good"
while republican is more frequently associated with "bad".
-
An initial conclusion that I can draw is non-polarizing words such as "piano" will shift less as the dataset size grows but polarizing words such as "democrat" and "republican" will shift more as the dataset size grows. However, further testing needs to be done to support this hypothesis.
1.4) Finding word analogies with vector algebra
-
Spend a few minutes experimenting with the demo on https://rare-technologies.com/word2vec-tutorial/ (under “Bonus App”) which uses Word2Vec vector algebra to solve analogies. Make a note of any interesting examples you find.
-
Examples where app get the answer correct:
-
Examples where app understands there is a link but doesn't give the correct answer:
-
Examples where app misses answer entirely:
1.5) Exploring fonts with the Embedding Projector
-
View the fonts with PCA embedding. Do you see any clumps/areas with obvious characteristics?
-
From the image below, we can see that the fonts are more heavily clusters on the bottom left.
PCA Font ID: 4254 (lines), 2239 (abstract), 6487 (not english)
-
Change to the embedding to T-SNE. Record how many iterations you let T-SNE run for for and whether or not you were able to get interesting groupings. Again, record Font IDs for interesting fonts/groupings.
-
Iterations: 527. From the image below, we can see that there is cluster at the top, and a cluster at the bottom.
 Use the "neighbors" slider to isolate a few dozen points and record the Font IDs of the 10 nearest neighbors that make sense. Repeat this for 3 or 4 fonts. If you find a font that doesn't have nearest neighbors that look similar, note that down as well.
2.3) Creating New Fonts
-
Edit FontModel.js so another character besides "r" is being displayed as the sample character for the 40 attributes. Edit Alphabet.vue so that all of the uppercase,
lowercase, and numerical sample font characters are displayed in the right side of the screen instead of just the lowercase characters. Take a screenshot for your writeup.
-
This is an app that lets you input a font Id and shows you the font. Document your work in your writeup and show a few examples. Can you find examples of nearest neighbor fonts that don't make sense?
-
This example is relatively accurate when considering the overall thickness and slightly slanted strokes. However, the fonts in 9493 seem more "brush stroke" with letters a-i more feint.
-
This example doesn't make much sense, but it is expected since the new font doesn't really look like the alphabet at all.
-
This example is relatively accurate when considering the overall skinniess of the fonts. However, the neighbor font with the curly ends is very different.
-
What is the “average” of a set of fonts? (Hint: What does that mean in terms of the 40 dimensions)?
Write some code to Find the nearest font neighbor to the average font.
-
The average font is 23607.
-
What does adding this vector to a font do? Does it perform bolding well at thickening the original font?
Are there other characteristics that seem to also carry over? Try this with another characteristic. It may be helpful to use the characteristics you gathered previously.
-
Adding this vector to a font thickens the font (bold). It bolds the fonts relatively well. The slantedness also carries over, but the dots don't seem to.
-
Find 10 fonts for a specific quality (i.e. bolding, dotting, fancy, serif...etc) and average them out to find a characteristic vector (for example, “bolding vector”).
Try applying that vector to another font. Again, you can do this by manual computation and then modifying the added vector in the "Apply Vector Math" button, or you can make new buttons.
Does it work better or worse than the previous one-sample method? Try this with at least 2 characteristics.
-
Skinnify: Adding this vector to a font creates a skinnier version of the font. It doess this relatively well. The slantedness and dots both carry over.
-
Hollow: Adding this vector to a font should create a hollow version of the font. It doess this very poorly and achieved almost the same effect as skinnify.
-
Find 10 fonts the exhibit for a specific characteristic and 10 fonts for the opposite of that characteristic (i.e. bold vs. corresponding non-bold). Subtract
the vectors for each pair and take the average difference. How does this work as a vector for the characteristic (e.g., as a "bolding vector")?
Does this work better or worse than the method above to obtain your desired characteristic? Try this with at least 2 characteristics.
-
Extra bold (bold - non bold): Adding this vector to a font creates a extra bold version of the font. It doess this relatively well. The slantedness carries over but the dots are too big to be seen.
-
Background (background - nonbackground): Adding this vector to a font should create a background version of the font. Although it carries over characteristics such as dots and boldness, some letters are barely
recognizable.
-
Can you figure out how to create a vector that makes uppercase fonts lowercase? (Hint: You can try finding fonts that only have uppercase/lowercase characters and finding analogous vectors, or you can try playing with the 40 attribute sliders directly.
-
I found 10 very different looking (italics, bold, bubbly, etc) lower case fonts, averaged them then subtracted twice that from the selected font. This worked less well on skinnier fonts than bold fonts.
-
Can you create a vector based on your personal font tastes (i.e. a personal-likeable vector)? Please also make note of any interesting vector directions you find.
-
My favorite style is the slanted all capitalized font, and it did a pretty good job of replicating that style.
-
Add links to your code files on your website.
Alphabet`
Vector Chooser
Font Model


|
| template<typename T > |
| void | setIntersect (set< T > &xset, set< T > &yset) |
| | Generic function to find the intersection of two std::set. More...
|
| |
| template<typename T > |
| void | setUnion (set< T > &xset, set< T > &yset) |
| | Generic function to find the union of two std::set. More...
|
| |
| set< string > | HerbrandPass::Ops ({"+"}) |
| | Set of operators used in the program. More...
|
| |
| string | HerbrandPass::opSymbol (string opCodeName) |
| | Returns operator symbol corresponding to the output of llvm::Instruction::getOpcodeName function. More...
|
| |
| void | HerbrandPass::assignIndex (Function &F) |
| | Initialises Constants, Variables, CuV, mpExp and mpCV by looking through the instructions in the program. More...
|
| |
| void | HerbrandPass::findInitialPartition (vector< IDstruct *> &v) |
| | Finds initial partition in which every expression is in a separate equivalence class. More...
|
| |
| void | HerbrandPass::getClass (int index, vector< IDstruct *> const &partition, set< Value *> &vV, set< expTuple > &vTup) |
| | Finds the equivalence class corresponding to a constant, variable or two operand expression at a given program point. More...
|
| |
| bool | HerbrandPass::samePartition (vector< IDstruct *> const &first, vector< IDstruct *> const &second) |
| | Checks whether two partitions are equivalent or not. More...
|
| |
| void | HerbrandPass::decreaseParentCnt (IDstruct *&ptr) |
| | Function to decrement parentCnt of an IDstruct object. More...
|
| |
| void | HerbrandPass::increaseParentCnt (IDstruct *&ptr) |
| | Function to increment parentCnt of an IDstruct object. More...
|
| |
| void | HerbrandPass::copyPartition (vector< IDstruct *> &oldPart, vector< IDstruct *> const &toCopy) |
| | Creates a copy of a partition. More...
|
| |
| IDstruct * | HerbrandPass::findIDstrct (vector< IDstruct *> const &curPart, string op, Value *left, Value *right) |
| | Returns pointer to IDstruct object that represents equivalence class corresponding to expression "left op right" in a given partition. More...
|
| |
| void | HerbrandPass::printCV (Value const *value) |
| | Prints a constant/variable in readable form. More...
|
| |
| void | HerbrandPass::printExp (expTuple const &exp) |
| | Prints a two operand expression in readable form. More...
|
| |
| void | HerbrandPass::AssignStatement (vector< IDstruct *> &curPart, vector< IDstruct *> const &prevPart, Instruction &I) |
| | Transfer function. More...
|
| |
| void | HerbrandPass::findPredecessors (Instruction &I, vector< Instruction *> &pred) |
| | Finds predecessors of an instruction. More...
|
| |
| void | HerbrandPass::confluence (vector< IDstruct *> &partition, Instruction &I) |
| | Confluence function. More...
|
| |
| void | HerbrandPass::printPartition (vector< IDstruct *> const &partition) |
| | Prints a partition in readable format. More...
|
| |
|
| set< Value * > | HerbrandPass::Constants |
| | Set of constants used in the program. More...
|
| |
| set< Value * > | HerbrandPass::Variables |
| | Set of variables used in the program. More...
|
| |
| set< Value * > | HerbrandPass::CuV |
| | Set of constants and variables used in the program. More...
|
| |
| map< Value *, int > | HerbrandPass::mpCV |
| | Maps constants and variables in the program to integers for indexing purpose. More...
|
| |
| map< expTuple, int > | HerbrandPass::mpExp |
| | Maps all possible two operand expressions that can be formed using constants, variables and operators in the program to integers for indexing purpose. More...
|
| |
| int | HerbrandPass::numExps |
| | Count of number of expressions of length atmost two that can be formed using constants and variables in the program. More...
|
| |
| map< Instruction *, vector< IDstruct * > > | HerbrandPass::Partitions |
| | Stores Herbrand Equivalence information for each instruction in the program. More...
|
| |
| map<< string, IDstruct *, IDstruct * >, IDstruct * > | HerbrandPass::Parent |
| | For a given {op, left, right} as key, stores pointer to IDstruct object whose fields are {op, _, left, right}. More...
|
| |


Sponsored Financial Content
Guardian Stockbrokers
Guardian Stockbrokers
9 Commodity Trading Tips for 2016 - Capital at Risk
Guardian Stockbrokers
Download Free Guide
Trading Secrets
Trading Secrets
Day Trading: 15 Secrets to Success - Capital at risk
Guardian Stockbrokers
Download Free Guide
Trading Tips
Trading Tips
Top 10 Trading Mistakes with CFDs - Free 5 page guide
Guardian Stockbrokers
Download Free Guide
Bupa™ Global Insurance
Bupa™ Global Insurance
Bupa World Cover helps you choose your specialist when you need it
Bupa Global
Get a Quote Now


When discussing growth modeling, there are a variety of helpful models and metrics available (for example: churn rate, CAC to LTV ratio, the prophet model). One of my personal favorites is uplift modeling because of its ability to help marketers pinpoint which customers to target and how exactly to target those customers.
In this brief overview of uplift mdoeling, I’ll run through how uplift modeling works, how to implement the models in R, why these models can be helpful for your growth efforts, and some considerations to make when evaluating your models.
For our discussion, let’s say you are testing out the effectiveness of a welcome email blast for potential customers that signed up for your email list. In the welcome email your current call-to-action is a link to a trial membership. You are looking to see how best to leverage the welcome email segment of your marketing funnel to increase the amount of people who directly sign up for a trial membership after receiving the welcome email.
Now, there are a few groups of customers who will sign up for your email list.
With many predictive models when you are evaluating the overall probability that a potential customer will sign up for a free trial after receiving a welcome email. With uplift modeling, you are specifically targeting Group 3 as that is the group that is most likely to have a positive response to your welcome email.
To do this, we want to use prior marketing data to estimate the probability that a customer will sign up for the trial after receiving the welcome email minus the probability that a customer will sign up for the trial when no welcome email is sent. This is also known as the true lift estimate.
After creating your lift estimate for each customer, you may then perform a ranked sort by estimated probability to create decile and
Dataset Source and Information
This dataset is a sample that was used to inform the paper “Direct Email Marketing optimization with a Random Forest based approach” (pp.189-194), which is a nice overview of utilizing random forest to help to predict email marketing campaign outcomes and was authored by Giulia De Poli, Maria Angélica Lobo Paulino, Stefania Tola, Manuela Bazzarelli, Leone De Marco and Matteo Bregonzio.
To read more about this team’s work, please click here: https://zaguan.unizar.es/record/95008/files/BOOK-2020-128.pdf
Partially based on the findings from the aforementioned paper and to help with simplicity, this model will utilize the following variables. Variable descriptions are sourced from this page: https://github.com/brego81/Direct-Email-Marketing-Dataset/blob/master/README.md
Each row of this dataset corresponds to a unique airline ticket purchaser or user
The target for this analysis is the “success” variable. This variable indicates whether a user purchased a class upgrade after receiving a marketing email.
The treatment for this analysis is the “upgrade_offered” variable. This variable describes whether or not a user was sent an upgrade offer.
Load in the required libraries
library(uplift)
library(smotefamily)
Read in the dataset
emails.all = read.csv("https://raw.githubusercontent.com/brego81/Direct-Email-Marketing-Dataset/master/direct_email_marketing_database.csv",
stringsAsFactors = T)
Dataset with only the variables of interest included
emails.df = emails.all[, c("age", "n_purchase", "discount_purchase", "price", "distance", "avg_npassengers", "n_sent_upgrade", "success")]
Quick Overview of the dataset
head(emails.df, 2)
## age n_purchase discount_purchase price distance avg_npassengers n_sent_upgrade success
## 1 54.23573 14 14 35.9 565.9 1 0 False
## 2 54.23573 14 0 35.9 565.9 1 2 False
tail(emails.df, 2)
## age n_purchase discount_purchase price distance avg_npassengers n_sent_upgrade success
## 38142 42.97545 4 2 64.9 565.9 1 0 False
## 38143 26.35902 1 1 18.0 565.9 1 0 False
summary(emails.df)
## age n_purchase discount_purchase price distance avg_npassengers
## Min. : 18.33 Min. : 1.0 Min. : 0.000 Min. : 0.00 Min. : 30.17 Min. : 1.000
## 1st Qu.: 28.14 1st Qu.: 4.0 1st Qu.: 1.000 1st Qu.: 21.90 1st Qu.:478.40 1st Qu.: 1.000
## Median : 38.15 Median : 8.0 Median : 1.000 Median : 26.90 Median :565.90 Median : 1.400
## Mean : 40.66 Mean : 10.6 Mean : 2.205 Mean : 30.07 Mean :554.16 Mean : 1.761
## 3rd Qu.: 52.02 3rd Qu.: 13.0 3rd Qu.: 3.000 3rd Qu.: 31.90 3rd Qu.:569.90 3rd Qu.: 2.000
## Max. :119.93 Max. :326.0 Max. :70.000 Max. :119.00 Max. :981.20 Max. :14.365
## n_sent_upgrade success
## Min. :0.0000 False:36246
## 1st Qu.:0.0000 True : 1897
## Median :0.0000
## Mean :0.1834
## 3rd Qu.:0.0000
## Max. :7.0000
Create binary treatment variable
emails.df$upgrade_offered = ifelse(emails.df$n_sent_upgrade > 0, 1, 0)
Setting target variable as a numeric vector
emails.df$success = ifelse(emails.df$success == "True", 1, 0)
Create train and test sets (60/40 split)
set.seed(8410)
train <- sample(1:nrow(emails.df), nrow(emails.df)*(0.60))
emails.train <- emails.df[train, ]
emails.test<-emails.df[-train, ]
Oversample the target variable using the SMOTE method
predictors = emails.train[, c("age", "n_purchase","discount_purchase","price","distance", "avg_npassengers", "upgrade_offered")]
target = emails.train[, "success"]
oversampled.train = SMOTE(predictors, target)
syn.train = oversampled.train$data
Change class and upgrade_offered variables to binary numeric to fit upliftRF requirements
syn.train$success = ifelse(syn.train$class == "1", 1, 0)
syn.train$upgrade_offered = ifelse(syn.train$upgrade_offered >= 0.5, 1, 0)
Standardize variable classes
emails.test$n_purchase = as.numeric(emails.test$n_purchase)
emails.test$discount_purchase = as.numeric(emails.test$discount_purchase)
Fit the model
up.fit <- upliftRF(success ~ age + n_purchase + discount_purchase + price +
distance + avg_npassengers + trt(upgrade_offered),
data = syn.train, mtry = 5, ntree = 100, split_method = "KL",
minsplit = 50, verbose = FALSE)
Generate predictions from the fitted model
pred <- predict(up.fit, newdata = emails.test)
From this, calculate the uplift
head(data.frame(pred, "uplift" = pred[,1] - pred[,2]))
## pr.y1_ct1 pr.y1_ct0 uplift
## 1 0.000000 0.434089 -0.434089
## 2 0.089313 0.640368 -0.551055
## 3 0.000000 0.434089 -0.434089
## 4 0.054387 0.426197 -0.371810
## 5 0.502624 0.347376 0.155248
## 6 0.478744 0.380685 0.098059
Now you have fit a basic uplift model and calculated the uplift!
Next Steps Now you have run through this brief example here are some further steps that you can take to refine the model.
Earlier, we took an example of a customer acquisition experiment and an example of upselling, but these are not the only scenarios where you may wish to consider using uplift modeling.
This approach can also be used to supplement churn modeling, as a way to to target the lapsed customers that are most likely to respond well to a re-marketing effort and is especially useful when the marketing effort is costly as a way to keep customer acquisition/retention costs down.
As with modeling in general, you will want to do the standard data accuracy checks of your prior data, general bias checks, and ascertain whether the historical dataset you are using can paint a representative picture of your current customer base.
In addition to the normal considerations, uplift modeling is specifically targeting lift or positive responses because of this focus if the marketing effort that you are experimenting with has a negative (or neutral) response, then the model will not perform very well. If this is a case, you may wish to try a different model or (if you can) experiment with a marketing effort that generates a positive response.
Finally, if you do not have a past experiment with a treatment and control that you can use to create the model you can add in a step and create synthetic data to evaluate the lift if treatment and control groups had existed.
Thanks for reading this brief intro to uplift modeling!
If you have any questions, strong opinions, or just want to chat more you can reach me at<EMAIL_ADDRESS>or at www.linkedin.com/in/rebecca-decrescenzo