Subclasses of this class represent database tables.
Subclass can be created like this:
var MoronModel = require('moron').MoronModel;
function Person() {
MoronModel.apply(this, arguments);
}
MoronModel.extend(Person);
module.exports = Person;
// Table name is the only required property.
Person.tableName = 'Person';
// This is not the database schema! Nothing is generated based on this. Whenever a
// Person object is created from a JSON object, the JSON is checked against this
// schema. For example when you call Person.fromJson({firstName: 'Jennifer'});
Person.jsonSchema = {
type: 'object',
required: ['firstName', 'lastName'],
properties: {
id: {type: 'integer'},
parentId: {type: ['integer', 'null']},
firstName: {type: 'string', minLength: 1, maxLength: 255},
lastName: {type: 'string', minLength: 1, maxLength: 255},
age: {type: 'number'},
address: {
type: 'object',
properties: {
street: {type: 'string'},
city: {type: 'string'},
zipCode: {type: 'string'}
}
}
}
};
// This object defines the relations to other models.
Person.relationMappings = {
pets: {
relation: MoronModel.OneToManyRelation,
// The related model. This can be either a MoronModel subclass constructor or an
// absolute file path to a module that exports one. We use the file path version
// here to prevent require loops.
modelClass: __dirname + '/Animal',
join: {
from: 'Person.id',
to: 'Animal.ownerId'
}
},
movies: {
relation: MoronModel.ManyToManyRelation,
modelClass: __dirname + '/Movie',
join: {
from: 'Person.id',
// ManyToMany relation needs the `through` object to describe the join table.
through: {
from: 'Person_Movie.personId',
to: 'Person_Movie.movieId'
},
to: 'Movie.id'
}
},
children: {
relation: MoronModel.OneToManyRelation,
modelClass: Person,
join: {
from: 'Person.id',
to: 'Person.parentId'
}
}
};
Extends
Members
-
<static> idColumn :String
-
Name of the primary key column in the database table.
Defaults to 'id'.
Type:
- String
-
<static> jsonAttributes :Array.<String>
-
Properties that should be saved to database as JSON strings.
The properties listed here are serialized to JSON strings upon insertion to the database and parsed back to objects when models are read from the database. Combined with the postgresql's json or jsonb data type, this is a powerful way of representing documents as single database rows.
If this property is left unset all properties declared as objects or arrays in the
jsonSchema
are implicitly added to this list.Example:
Person.jsonAttributes = ['address']; var jennifer = Person.fromJson({ name: 'Jennifer', address: { address: 'Someroad 10', zipCode: '1234', city: 'Los Angeles' } }); var dbRow = jennifer.$toDatabaseJson(); console.log(dbRow); // --> {name: 'Jennifer', address: '{"address":"Someroad 10","zipCode":"1234","city":"Los Angeles"}'}
Type:
- Array.<String>
-
<static> ManyToManyRelation :MoronManyToManyRelation
-
may-to-many relation type.
Type:
-
<static> OneToManyRelation :MoronOneToManyRelation
-
one-to-many relation type.
Type:
-
<static> OneToOneRelation :MoronOneToOneRelation
-
one-to-many relation type.
Type:
-
<static> relationMappings :Object.<String, MoronRelationMapping>
-
This property defines the relations to other models.
Relations to other models can be defined by setting this property. The best way to explain how to do this is by example:
Person.relationMappings = { pets: { relation: MoronModel.OneToManyRelation, modelClass: Animal, join: { from: 'Person.id', to: 'Animal.ownerId' } }, father: { relation: MoronModel.OneToOneRelation, modelClass: Person, join: { from: 'Person.fatherId', to: 'Person.id' } }, movies: { relation: MoronModel.ManyToManyRelation, modelClass: Movie, join: { from: 'Person.id', through: { from: 'Person_Movie.actorId', to: 'Person_Movie.movieId' }, to: 'Movie.id' } } };
relationMappings is an object whose keys are relation names and values define the relation. The
join
property in addition to the relation type define how the models are related to one another. Thefrom
andto
properties of thejoin
object define the database columns through which the models are associated. Note that neither of these columns need to be primary keys. They can be any columns!. In the case of ManyToManyRelation also the join table needs to be defined. This is done using thethrough
object.The
modelClass
passed to the relation mappings is the class of the related model. It can be either a MoronModel subclass constructor or an absolute path to a module that exports one. Using file paths is a handy way to prevent require loops.Type:
- Object.<String, MoronRelationMapping>
-
<static> tableName :String
-
Name of the database table of this model.
Type:
- String
Methods
-
<static> bindKnex (knex) → {MoronModel}
-
Creates a subclass of this class that is bound to the given knex.
This method can be used to bind a MoronModel subclass to multiple databases for example in a multi tenant system.
Example:
var knex1 = require('knex')({ client: 'sqlite3', connection: { filename: 'database1.db' } }); var knex2 = require('knex')({ client: 'sqlite3', connection: { filename: 'database2.db' } }); SomeModel.knex(null); var BoundModel1 = SomeModel.bindKnex(knex1); var BoundModel2 = SomeModel.bindKnex(knex2); // Throws since the knex instance is null. SomeModel.query().then(); // Works. BoundModel1.query().then(function (models) { console.log(models[0] instanceof SomeModel); // --> true console.log(models[0] instanceof BoundModel1); // --> true }); // Works. BoundModel2.query().then(function (models) { console.log(models[0] instanceof SomeModel); // --> true console.log(models[0] instanceof BoundModel2); // --> true });
Parameters:
Name Type Description knex
knex Returns:
- Type
- MoronModel
-
<static> ensureModel (model, options) → {MoronModel}
-
Ensures that the given model is an instance of this class.
If
model
is already an instance of this class, nothing is done.Parameters:
Name Type Argument Description model
MoronModel | Object options
MoronModelOptions <optional>
Returns:
- Type
- MoronModel
-
<static> ensureModelArray (input, options) → {Array.<MoronModel>}
-
Ensures that each element in the given array is an instance of this class.
If an element is already an instance of this class, nothing is done for it.
Parameters:
Name Type Argument Description input
Array.<(MoronModel|Object)> options
MoronModelOptions <optional>
Returns:
- Type
- Array.<MoronModel>
-
<static> generateId () → {*}
-
Generates an identifier for the inserted models of this class.
Implement this to return an identifier if you wish to generate them in the code instead of the database. By default this method returns null which indicates that the database should generate the identifier.
Returns:
- Type
- *
-
<static> getFullIdColumn () → {String}
-
Full identifier column name like 'SomeTable.id'.
Returns:
- Type
- String
-
<static> getIdProperty () → {String}
-
Returns the name of the identifier property.
The identifier property is equal to the
idColumn
if$parseDatabaseJson
is not implemented. If$parseDatabaseJson
is implemented it may change the id property's name. This method passes theidColumn
through$parseDatabaseJson
.Returns:
- Type
- String
-
<static> getRelation () → {MoronRelation}
-
Get a relation by name.
This should not be used to make queries. Use
$relatedQuery
orloadRelated
instead.Returns:
- Type
- MoronRelation
-
<static> getRelations () → {Object.<String, MoronRelation>}
-
All relations of this class.
Returns:
- Type
- Object.<String, MoronRelation>
-
<static> knex (knex) → {knex|undefined}
-
Get/Set the knex connection for this model class.
Subclasses inherit the connection. A system-wide knex instance can be set by calling
MoronModel.knex(knex)
. This works even after subclasses have been created.var knex = require('knex')({ client: 'sqlite3', connection: { filename: 'database.db' } }); MoronModel.knex(knex); knex = MoronModel.knex();
Parameters:
Name Type Argument Description knex
knex <optional>
The knex to set.
Returns:
- Type
- knex | undefined
-
<static> knexQuery () → {knex.QueryBuilder}
-
Shortcut for
SomeModel.knex().table(SomeModel.tableName)
.Returns:
- Type
- knex.QueryBuilder
-
<static> loadRelated ($models, expression) → {*}
-
Exactly like $loadRelated but for multiple instances.
Person.loadRelated([person1, person2], 'children.pets').then(function (persons) { var person1 = persons[0]; var person2 = persons[1]; });
Parameters:
Name Type Description $models
Array.<(MoronModel|Object)> expression
String | MoronRelationExpression Returns:
- Type
- *
-
<static> query () → {MoronQueryBuilder}
-
Creates a query builder for this table.
The returned query builder has all the methods a knex query builder has. See MoronQueryBuilder and knexjs.org for more information.
Read models from the database:
// Get all rows. Person.query().then(function(allPersons) { console.log('there are', allPersons.length, 'persons in the database'); }); // Example of a more complex WHERE clause. This generates: // SELECT * FROM "Person" WHERE ("firstName" = 'Jennifer' AND "age" < 30) OR ("firstName" = "Mark" AND "age" > 30) Person .query() .where(function () { this.where('firstName', 'Jennifer').where('age', '<', 30); }) .orWhere(function () { this.where('firstName', 'Mark').where('age', '>', 30); }) .then(function (marksAndJennifers) { console.log(marksAndJennifers); }); // Get a subset of rows and fetch related models for each row. Person .query() .where('age', '>', 60) .eager('children.children.movies') .then(function (oldPeople) { console.log('some old person\'s grand child has appeared in', oldPeople[0].children[0].children[0].movies.length, 'movies'); });
Insert models to the database:
Person.query().insert({firstName: 'Sylvester', lastName: 'Stallone'}).then(function (sylvester) { console.log(sylvester.fullName()); // --> 'Sylvester Stallone'. }); // Batch insert. This only works on Postgresql as it is the only database that returns the // identifiers of _all_ inserted rows. If you need to do batch inserts on other databases use // *knex* directly. (See .knexQuery() method). Person .query() .insert([ {firstName: 'Arnold', lastName: 'Schwarzenegger'}, {firstName: 'Sylvester', lastName: 'Stallone'} ]) .then(function (inserted) { console.log(inserted[0].fullName()); // --> 'Arnold Schwarzenegger' });
update
andpatch
can be used to update models. Only difference between the mentioned methods is thatupdate
validates the input objects using the model class's full jsonSchema andpatch
ignores therequired
property of the schema. Useupdate
when you want to update all properties of a model andpatch
when only a subset should be updated.Person .query() .update({firstName: 'Jennifer', lastName: 'Lawrence', age: 35}) .where('id', jennifer.id) .then(function (updatedJennifer) { console.log('Jennifer is now', updatedJennifer.age, 'years old'); }); // This will throw assuming that `firstName` or `lastName` is a required property for a Person. Person.query().patch({age: 100}); // This will _not_ throw. Person .query() .patch({age: 100}) .then(function () { console.log('Everyone is now 100 years old'); });
Models can be deleted using the delete method. Naturally the delete query can be chained with any knex methods:
Person .query() .delete() .where('age', '>', 90) .then(function () { console.log('anyone over 90 is now removed from the database'); });
Returns:
- Type
- MoronQueryBuilder
-
$afterValidate (json, options)
-
This is called after successful validation.
You can do further validation here and throw a MoronValidationError if something goes wrong.
Parameters:
Name Type Argument Description json
Object <optional>
The JSON object to validate.
options
MoronModelOptions <optional>
Optional options.
- Inherited From:
-
$beforeValidate (jsonSchema, json, options) → {Object}
-
This is called before validation.
Here you can dynamically edit the jsonSchema if needed.
Parameters:
Name Type Argument Description jsonSchema
Object A deep clone of this class's jsonSchema.
json
Object The JSON object to be validated.
options
MoronModelOptions <optional>
Optional options.
- Inherited From:
Returns:
The (possibly) modified jsonSchema.
- Type
- Object
-
$clone () → {MoronModelBase}
-
Returns a deep copy of this model.
If this object has instances of MoronModelBase as properties (or arrays of them) they are cloned using their
.$clone()
method.- Inherited From:
Returns:
- Type
- MoronModelBase
-
$formatDatabaseJson (json) → {Object}
-
This is called when a MoronModelBase is converted to database format.
Converts the JSON object from the internal format to the database format.
Parameters:
Name Type Description json
Object The JSON object in internal format.
- Inherited From:
Returns:
The JSON object in database format.
- Type
- Object
-
$formatJson (json) → {Object}
-
This is called when a MoronModelBase is converted to JSON.
Parameters:
Name Type Description json
Object The JSON object in internal format
- Inherited From:
Returns:
The JSON object in external format.
- Type
- Object
-
$id (id) → {*}
-
Returns or sets the identifier of a model instance.
// Returns the id. model.$id(); // Sets the id. model.$id(100);
The identifier property does not have to be accessed or set using this method. If the identifier property is known it can be accessed or set just like any other property:
console.log(model.id); model.id = 100;
This method is just a helper for the cases where the id property is not known.
Parameters:
Name Type Argument Description id
* <optional>
Returns:
- Type
- *
-
$loadRelated (relationExpression) → {Promise}
-
Loads related models using a MoronRelationExpression.
Example:
jennifer.$loadRelated('[pets, children.[pets, father]]').then(function (jennifer) { console.log('Jennifer has', jennifer.pets.length, 'pets'); console.log('Jennifer has', jennifer.children.length, 'children'); console.log('Jennifer\'s first child has', jennifer.children[0].pets.length, 'pets'); console.log('Jennifer had her first child with', jennifer.children[0].father.name); });
Parameters:
Name Type Description relationExpression
String | MoronRelationExpression - See:
-
- MoronRelationExpression for more examples on relation expressions.
Returns:
- Type
- Promise
-
$parseDatabaseJson (json) → {Object}
-
This is called when a MoronModelBase is created from a database JSON object.
Converts the JSON object from the database format to the internal format.
Parameters:
Name Type Description json
Object The JSON object in database format.
- Inherited From:
Returns:
The JSON object in internal format.
- Type
- Object
-
$parseJson (json, options) → {Object}
-
This is called when a MoronModelBase is created from a JSON object.
Converts the JSON object to the internal format.
Parameters:
Name Type Argument Description json
Object The JSON object in external format.
options
MoronModelOptions <optional>
Optional options.
- Inherited From:
Returns:
The JSON object in internal format.
- Type
- Object
-
$query () → {MoronQueryBuilder}
-
Creates a query builder for this model instance.
The returned query builder has all the methods a knex query builder has. See MoronQueryBuilder and knexjs.org for more information.
All queries built using the returned builder only affect this instance.
Examples:
Re-fetch the instance from the database:
person.$query().then(function (person) { console.log(person); });
Insert a new model to database:
Person.fromJson({firstName: 'Jennifer'}).$query().insert().then(function (jennifer) { console.log(jennifer.id); });
Patch a model:
person.$query().patch({lastName: 'Cooper'}).then(function (person) { console.log(person.lastName); // --> 'Cooper'. });
Delete a model.
person.$query().delete().then(function () { console.log('person deleted'); });
Returns:
- Type
- MoronQueryBuilder
-
$relatedQuery (relationName) → {MoronQueryBuilder}
-
Use this to build a query that only affects the models related to this instance through a relation.
The returned query builder has all the methods a knex query builder has. See MoronQueryBuilder and knexjs.org for more information.
Examples:
Fetch all models related to this instance through a relation. The fetched models are also stored to the owner model's property named after the relation:
jennifer.$relatedQuery('pets').then(function (pets) { console.log('jennifer has', pets.length, 'pets'); console.log(jennifer.pets === pets); // --> true });
The related query is just like any other query. All knex methods are available:
jennifer .$relatedQuery('pets') .select('Animal.*', 'Person.name as ownerName') .where('species', '=', 'dog') .orWhere('breed', '=', 'cat') .innerJoin('Person', 'Person.id', 'Animal.ownerId') .orderBy('Animal.name') .then(function (dogsAndCats) { // All the dogs and cats have the owner's name "Jennifer" joined as the `ownerName` property. console.log(dogsAndCats); });
This inserts a new model to the database and binds it to the owner model as defined by the relation:
jennifer .$relatedQuery('pets') .insert({species: 'dog', name: 'Fluffy'}) .then(function (waldo) { console.log(waldo.id); });
To add an existing model to a relation the
relate
method can be used. In this example the dogfluffy
already exists in the database but it isn't related tojennifer
through thepets
relation. We can make the connection like this:jennifer .$relatedQuery('pets') .relate(fluffy.id) .then(function () { console.log('fluffy is now related to jennifer through pets relation'); });
The connection can be removed using the
unrelate
method. Again, this doesn't delete the related model. Only the connection is removed. For example in the case of ManyToMany relation the join table entries are deleted.jennifer .$relatedQuery('pets') .unrelate() .where('id', fluffy.id) .then(function () { console.log('jennifer no longer has fluffy as a pet'); });
Related models can be deleted using the delete method. Note that in the case of ManyToManyRelation the join table entries are not deleted. Naturally the delete query can be chained with any knex methods.
jennifer .$relatedQuery('pets') .delete() .where('species', 'cat') .then(function () { console.log('jennifer no longer has any cats'); });
update
andpatch
can be used to update related models. Only difference between the mentioned methods is thatupdate
validates the input objects using the related model class's full schema andpatch
ignores therequired
property of the schema. Useupdate
when you want to update all properties of a model andpatch
when only a subset should be updated.jennifer .$relatedQuery('pets') .update({species: 'dog', name: 'Fluffy the great', vaccinated: false}) .where('id', fluffy.id) .then(function (updatedFluffy) { console.log('fluffy\'s new name is', updatedFluffy.name); }); // This will throw assuming that `name` or `species` is a required property for an Animal. jennifer.$relatedQuery('pets').patch({vaccinated: true}); // This will _not_ throw. jennifer .$relatedQuery('pets') .patch({vaccinated: true}) .where('species', 'dog') .then(function () { console.log('jennifer just got all her dogs vaccinated'); });
Parameters:
Name Type Description relationName
String Name of the relation.
Returns:
- Type
- MoronQueryBuilder
-
$setDatabaseJson (json)
-
Sets the values from a JSON object in database format.
Calls
this.$parseDatabaseJson()
.Parameters:
Name Type Description json
Object The JSON object in database format.
- Inherited From:
-
$setJson (json, options)
-
Sets the values from a JSON object.
Validates the JSON before setting values. Calls
this.$parseJson()
.Parameters:
Name Type Argument Description json
Object The JSON object to set.
options
MoronModelOptions <optional>
Optional options.
- Inherited From:
Throws:
MoronValidationError If validation fails.
-
$toDatabaseJson () → {Object}
-
Exports this model as a database JSON object.
Calls
$formatDatabaseJson()
.- Inherited From:
Returns:
This model as a JSON object in database format.
- Type
- Object
-
$toJson () → {Object}
-
Exports this model as a JSON object.
Calls
$formatJson()
.- Inherited From:
Returns:
This model as a JSON object.
- Type
- Object
-
$validate (json, options) → {Object}
-
Validates the given JSON object.
Calls
$beforeValidation
and$afterValidation
methods. This method is called automatically fromfromJson
and$setJson
methods. This method can also be called explicitly when needed.Parameters:
Name Type Argument Description json
Object <optional>
If not given ==> this.
options
MoronModelOptions <optional>
Optional options.
- Inherited From:
Throws:
-
If validation fails.
- Type
- MoronValidationError
Returns:
The input json
- Type
- Object
-
toJSON ()
-
Alias for
this.$toJson()
.For JSON.stringify compatibility.
- Inherited From:


Hi, My name is Rishabh Bansal, and I'm a senior stuying Computer Engineering at Iowa State University. I am a passionate and strong academic achiever with excellent research, time management and problem solving skills.
I Love to solve problems. Whether it's finding the most elegant way to write a line of code or figuring out which cord fits best into a progression, I love the challenge of finding a way and discovering solutions. As long as there's a problem to solve or a challenge to puzzle over, it's bound to be something I Love!!
Experience
Avg Lines Of Code
Published Paper
Total Projects
Total Awards
Micron Technology, Inc. is an American producer of computer memory and computer data storage including dynamic random-access memory, flash memory, and USB flash drives. Micron is the world's 3rd largest manufacturer of DRAM and NAND memory chips.
The District of Columbia Water and Sewer Authority provides drinking water, sewage collection and sewage treatment in Washington, D.C.
AWS Certified
2020
GitHub Pages Website
Promo
2020
Student Amasaddor for Admission Office
2020
Gold Scholoarship ISU
2018
Member of Cloud Computing Confluence- Amity University
2018
Cambridge Model United Nation-Vice President
2017


For this Opportunity, Coordel will make the following allocation to approved participants on successful completion of the work and availability of unallocated active membership licenses:
Licenses: {licenseCount}
Monthly revenue: ${monthly} = {licenseCount} x $10 Membership Fee x 50% Commission


| 2013 | 2013 | 2014 | 2014 | |
|---|---|---|---|---|
| Spending | Growth(%) | Spending | Growth(%) | |
| Devices | 669 | -1.2 | 697 | 4.3 |
| Data Center Systems | 140 | -0.3 | 143 | 2.6 |
| Enterprise Software | 300 | 5.2 | 320 | 6.8 |
| IT Services | 922 | 1.8 | 963 | 4.5 |
| Telecom Services | 1,622 | -0.5 | 1,653 | 1.2 |
| Overall IT | 3,663 | 0.4 | 3,777 | 3.1 |


|
Motor-Bluetooth
2.0
Nico Lingg
|
Makrodefinitionen | |
| #define | PWM_IR_PWMMRn(n) ((uint32_t)((n<4)?(1<<n):(1<<(n+4)))) |
| #define | PWM_IR_PWMCAPn(n) ((uint32_t)(1<<(n+4))) |
| #define | PWM_IR_BITMASK ((uint32_t)(0x0000073F)) |
| #define | PWM_TCR_BITMASK ((uint32_t)(0x0000000B)) |
| #define | PWM_TCR_COUNTER_ENABLE ((uint32_t)(1<<0)) |
| #define | PWM_TCR_COUNTER_RESET ((uint32_t)(1<<1)) |
| #define | PWM_TCR_PWM_ENABLE ((uint32_t)(1<<3)) |
| #define | PWM_CTCR_BITMASK ((uint32_t)(0x0000000F)) |
| #define | PWM_CTCR_MODE(n) ((uint32_t)(n&0x03)) |
| #define | PWM_CTCR_SELECT_INPUT(n) ((uint32_t)((n&0x03)<<2)) |
| #define | PWM_MCR_BITMASK ((uint32_t)(0x001FFFFF)) |
| #define | PWM_MCR_INT_ON_MATCH(n) ((uint32_t)(1<<(((n&0x7)<<1)+(n&0x07)))) |
| #define | PWM_MCR_RESET_ON_MATCH(n) ((uint32_t)(1<<(((n&0x7)<<1)+(n&0x07)+1))) |
| #define | PWM_MCR_STOP_ON_MATCH(n) ((uint32_t)(1<<(((n&0x7)<<1)+(n&0x07)+2))) |
| #define | PWM_CCR_BITMASK ((uint32_t)(0x0000003F)) |
| #define | PWM_CCR_CAP_RISING(n) ((uint32_t)(1<<(((n&0x2)<<1)+(n&0x1)))) |
| #define | PWM_CCR_CAP_FALLING(n) ((uint32_t)(1<<(((n&0x2)<<1)+(n&0x1)+1))) |
| #define | PWM_CCR_INT_ON_CAP(n) ((uint32_t)(1<<(((n&0x2)<<1)+(n&0x1)+2))) |
| #define | PWM_PCR_BITMASK (uint32_t)0x00007E7C |
| #define | PWM_PCR_PWMSELn(n) ((uint32_t)(((n&0x7)<2) ? 0 : (1<<n))) |
| #define | PWM_PCR_PWMENAn(n) ((uint32_t)(((n&0x7)<1) ? 0 : (1<<(n+8)))) |
| #define | PWM_LER_BITMASK ((uint32_t)(0x0000007F)) |
| #define | PWM_LER_EN_MATCHn_LATCH(n) ((uint32_t)((n<7) ? (1<<n) : 0)) |
| #define | PARAM_PWMx(n) (((uint32_t *)n)==((uint32_t *)LPC_PWM1)) |
| #define | PARAM_PWM1_MATCH_CHANNEL(n) ((n>=0) && (n<=6)) |
| #define | PARAM_PWM1_CHANNEL(n) ((n>=1) && (n<=6)) |
| #define | PARAM_PWM1_EDGE_MODE_CHANNEL(n) ((n>=2) && (n<=6)) |
| #define | PARAM_PWM1_CAPTURE_CHANNEL(n) ((n==0) || (n==1)) |
| #define | PARAM_PWM_INTSTAT(n) |
| #define PARAM_PWM1_CAPTURE_CHANNEL | ( | n | ) | ((n==0) || (n==1)) |
Macro check PWM1 capture channel mode
| #define PARAM_PWM1_CHANNEL | ( | n | ) | ((n>=1) && (n<=6)) |
Macro check PWM1 channel value
| #define PARAM_PWM1_EDGE_MODE_CHANNEL | ( | n | ) | ((n>=2) && (n<=6)) |
Macro check PWM1 edge channel mode
| #define PARAM_PWM1_MATCH_CHANNEL | ( | n | ) | ((n>=0) && (n<=6)) |
Macro check PWM1 match channel value
| #define PARAM_PWM_INTSTAT | ( | n | ) |
Macro check PWM1 interrupt status type
| #define PARAM_PWMx | ( | n | ) | (((uint32_t *)n)==((uint32_t *)LPC_PWM1)) |
Macro to determine if it is valid PWM peripheral or not
| #define PWM_CCR_BITMASK ((uint32_t)(0x0000003F)) |
CCR register mask
| #define PWM_CCR_CAP_FALLING | ( | n | ) | ((uint32_t)(1<<(((n&0x2)<<1)+(n&0x1)+1))) |
PCAPn is falling edge sensitive
| #define PWM_CCR_CAP_RISING | ( | n | ) | ((uint32_t)(1<<(((n&0x2)<<1)+(n&0x1)))) |
PCAPn is rising edge sensitive
| #define PWM_CCR_INT_ON_CAP | ( | n | ) | ((uint32_t)(1<<(((n&0x2)<<1)+(n&0x1)+2))) |
PWM interrupt is generated on a PCAP event
| #define PWM_CTCR_BITMASK ((uint32_t)(0x0000000F)) |
CTCR register mask
| #define PWM_CTCR_MODE | ( | n | ) | ((uint32_t)(n&0x03)) |
PWM Counter-Timer Mode
| #define PWM_CTCR_SELECT_INPUT | ( | n | ) | ((uint32_t)((n&0x03)<<2)) |
PWM Capture input select
| #define PWM_IR_BITMASK ((uint32_t)(0x0000073F)) |
IR register mask
| #define PWM_IR_PWMCAPn | ( | n | ) | ((uint32_t)(1<<(n+4))) |
Interrupt flag for capture input
| #define PWM_IR_PWMMRn | ( | n | ) | ((uint32_t)((n<4)?(1<<n):(1<<(n+4)))) |
Interrupt flag for PWM match channel for 6 channel
| #define PWM_LER_BITMASK ((uint32_t)(0x0000007F)) |
LER register mask
| #define PWM_LER_EN_MATCHn_LATCH | ( | n | ) | ((uint32_t)((n<7) ? (1<<n) : 0)) |
PWM MATCHn register update control
| #define PWM_MCR_BITMASK ((uint32_t)(0x001FFFFF)) |
MCR register mask
| #define PWM_MCR_INT_ON_MATCH | ( | n | ) | ((uint32_t)(1<<(((n&0x7)<<1)+(n&0x07)))) |
generate a PWM interrupt when a MATCHn occurs
| #define PWM_MCR_RESET_ON_MATCH | ( | n | ) | ((uint32_t)(1<<(((n&0x7)<<1)+(n&0x07)+1))) |
reset the PWM when a MATCHn occurs
| #define PWM_MCR_STOP_ON_MATCH | ( | n | ) | ((uint32_t)(1<<(((n&0x7)<<1)+(n&0x07)+2))) |
stop the PWM when a MATCHn occurs
| #define PWM_PCR_BITMASK (uint32_t)0x00007E7C |
PCR register mask
| #define PWM_PCR_PWMENAn | ( | n | ) | ((uint32_t)(((n&0x7)<1) ? 0 : (1<<(n+8)))) |
enable PWM output n
| #define PWM_PCR_PWMSELn | ( | n | ) | ((uint32_t)(((n&0x7)<2) ? 0 : (1<<n))) |
PWM output n is a single edge controlled output
| #define PWM_TCR_BITMASK ((uint32_t)(0x0000000B)) |
TCR register mask
| #define PWM_TCR_COUNTER_ENABLE ((uint32_t)(1<<0)) |
PWM Counter Enable
| #define PWM_TCR_COUNTER_RESET ((uint32_t)(1<<1)) |
PWM Counter Reset
| #define PWM_TCR_PWM_ENABLE ((uint32_t)(1<<3)) |
PWM Enable


With the Smart Planter, your kitchen will be one step closer to having all your appliances controlled centrally. You can place the Planter in your kitchen or your living room, where the slick design will fit right in, regardless of surroundings.
The Smart Planter allows you to have a small microcosm in your home. The Planter controls almost all conditions inside it: temperature, wind speed, humidity and light will all be regulated by the controller as you want it to.
There is an extensive set of commands which you can use to communicate with the bot, and update the status of your Planter. You can say "Add basil" or "Remove basil" to either add or remove a plant of a specific species from your Planter.
The bot can also give you gardening information: write "Recommend me a plant" for the bot to recommend you a plant that suits the conditions of your Planter, or ask specifics about a plant such as "How do I use basil?" for how to best use your plants.
The Planter will automatically control the light cycle, but you can override this if you wish to do so. You can for example tell the bot "Turn the lights off in 1 hour and a half" or if you want to set a daily cycle, you can write "Turn the lights on everyday at 6:42 and off at 19:49".
If you want to know how the Planter is doing, you can simply ask "What's up?" to get a status on the conditions inside, and how fit they are for your plants. The facebook chat will also have the colour updated according to how your plants are doing.
Whenever you interact with the facebook bot, our server runs a Python script where we then hold all of your details, incl. Planter history and plants in your tank. Your info will not be shared with anyone else, as everyone is given unique thread ID via Facebook.
On the back-end, the server sends data to the microcontroller every minute or when you talk to the bot. The server tells the microcontroller what the ideal conditions should be depending on your plants, and as long as you have the system set to automatic, it will monitor the environment itself. That means that even if your internet or our servers go down, your board will still take care of your plants.
"Now growing plants is easy, even for an average guy like me!"
"Thanks to Smart Planter, I no longer have to worry about my plants when I'm performing!"
"Never before has my food been so flavoursome! Smart Planter grows the best herbs!"


Sana Muhammad, 35, was shot in the abdomen by Ramanodge Unmathallegadoo at her Ilford home on 12 November, 2018.
He hid in the shed in his ex-partner's garden armed with two crossbows, bolts, a knife, duct tape, cable ties and a hammer, the Old Bailey heard.
Unmathallegadoo, 51, was jailed for life with a minimum of 33 years.
Mrs Muhammad's son - her sixth child - survived the attack and was delivered by Caesarean section, the court heard.
On the morning of November 12, the defendant, armed with two crossbows, was disturbed by Mrs Muhammad's husband Imtiaz, who had gone to the shed to store a box.
Unmathallegadoo ran into the house and shot his ex-wife with an 18-inch arrow as she fled upstairs.
Judge Mark Lucraft QC described the killing as "brutal and evil", saying if it was not for the presence of her children, Unmathallegadoo would have shot Mr Muhammad too.
Jurors heard Unmathallegadoo had been plotting the attack for weeks - buying two crossbows which were discovered near his ex-wife's home by a neighbour in March 2018.
"You have carefully planned this attack. You had two loaded crossbows and I'm entirely satisfied you intended an attack on Sana and then on Imtiaz," the judge said.
"One can only assume that you were jealous of their life together and the fact that they had formed a loving bond between themselves and with your children."
'My best friend'
Mrs Muhammad's widower previously paid tribute to his outgoing "soul mate".
"She was very friendly, talkative and always made me laugh. She was my soul mate, my best friend, my wife, my companion and my everything and I love her dearly.
"Ram must have been very jealous of the life Sana and I had and that we were living a happy life."
The court heard the victim was 16 when she entered into an arranged marriage with the defendant, then aged 30, in Mauritius.
Their relationship ended in 2012 after an incident where she jumped from an upstairs window and broke her ankle.
Mrs Muhammed filed for an order which banned the defendant from going within 100 metres of her home.
It was still in place at the time of the attack.


// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Copyright 2007 Google Inc. All Rights Reserved. /** * @fileoverview Browser history stack management class. * * The goog.History object allows a page to create history state without leaving * the current document. This allows users to, for example, hit the browser's * back button without leaving the current page. * * The history object can be instantiated in one of two modes. In user visible * mode, the current history state is shown in the browser address bar as a * document location fragment (the portion of the URL after the '#'). These * addresses can be bookmarked, copied and pasted into another browser, and * modified directly by the user like any other URL. * * If the history object is created in invisible mode, the user can still * affect the state using the browser forward and back buttons, but the current * state is not displayed in the browser address bar. These states are not * bookmarkable or editable. * * It is possible to use both types of history object on the same page, but not * currently recommended due to browser deficiencies. * * Tested to work in: *
 *
Firefox 1.0-3.6
 *
Internet Explorer 5.5-8.0
 *
Opera 9
 *
Safari 1.3-2.0, but not very well.
 *
 * * Shipping versions of Safari are incapable of creating and then reading * history states due to a browser bug. The bugs have been fixed in Webkit * nightly builds (tested on version 420+.) Older Safaris still fire the same * navigation events as other browsers while browsing forward, but creates dead * history states for going backward. Unfortunately, replacing the location * does not seem to help, the history states are created anyway. * * @see ../demos/history1.html * @see ../demos/history2.html */ /* Some browser specific implementation notes: * * Firefox (through version <IP_ADDRESS>): * * Ideally, navigating inside the hidden iframe could be done using * about:blank#state instead of a real page on the server. Setting the hash on * about:blank creates history entries, but the hash is not recorded and is lost * when the user hits the back button. This is true in Opera as well. A blank * HTML page must be provided for invisible states to be recorded in the iframe * hash. * * After leaving the page with the History object and returning to it (by * hitting the back button from another site), the last state of the iframe is * overwritten. The most recent state is saved in a hidden input field so the * previous state can be restored. * * Firefox does not store the previous value of dynamically generated input * elements. To save the state, the hidden element must be in the HTML document, * either in the original source or added with document.write. If a reference * to the input element is not provided as a constructor argument, then the * history object creates one using document.write, in which case the history * object must be created from a script in the body element of the page. * * Manually editing the address field to a different hash link prevents further * updates to the address bar. The page continues to work as normal, but the * address shown will be incorrect until the page is reloaded. * * NOTE: It should be noted that Firefox will URL encode any non-regular * ascii character, along with |space|, ", <, and >, when added to the fragment. * If you expect these characters in your tokens you should consider that * setToken('') would result in the history fragment "%3Cb%3E", and * "espére" would show "esp%E8re". (IE allows unicode characters in the * fragment) * * TODO: Should we encapsualte this escaping into the API for visible * history and encode all characters that aren't supported by Firefox? It also * needs to be optional so apps can elect to handle the escaping themselves. * * * Internet Explorer (through version 7.0): * * IE does not modify the history stack when the document fragment is changed. * We create history entries instead by using document.open and document.write * into a hidden iframe. * * IE destroys the history stack when navigating from /foo.html#someFragment to * /foo.html. The workaround is to always append the # to the URL. This is * somewhat unfortunate when loading the page without any # specified, because * a second "click" sound will play on load as the fragment is automatically * appended. If the hash is always present, this can be avoided. * * Manually editing the hash in the address bar in IE6 and then hitting the back * button can replace the page with a blank page. This is a Bad User Experience, * but probably not preventable. * * Internet Explorer 8.0, Webkit 532.1 and Gecko 1.9.2: * * IE8 has introduced the support to the HTML5 onhashchange event, which means * we don't have to do any polling to detect fragment changes. Chrome and * Firefox have added it on their newer builds, wekbit 532.1 and gecko 1.9.2. * http://www.w3.org/TR/html5/history.html * NOTE: it is important to note that the document needs to have the * <!DOCTYPE html> tag to enable the IE8 HTML5 mode. If the tag is not present, * IE8 will enter IE7 compatibility mode (which can also be enabled manually). * * Opera (through version 9.02): * * Navigating through pages at a rate faster than some threshhold causes Opera * to cancel all outstanding timeouts and intervals, including the location * polling loop. Since this condition cannot be detected, common input events * are captured to cause the loop to restart. * * location.replace is adding a history entry inside setHash_, despite * documentation that suggests it should not. * * * Safari (through version 2.0.4): * * After hitting the back button, the location.hash property is no longer * readable from JavaScript. This is fixed in later WebKit builds, but not in * currently shipping Safari. For now, the only recourse is to disable history * states in Safari. Pages are still navigable via the History object, but the * back button cannot restore previous states. * * Safari sets history states on navigation to a hashlink, but doesn't allow * polling of the hash, so following actual anchor links in the page will create * useless history entries. Using location.replace does not seem to prevent * this. Not a terribly good user experience, but fixed in later Webkits. * * * WebKit (nightly version 420+): * * This almost works. Returning to a page with an invisible history object does * not restore the old state, however, and there is no pageshow event that fires * in this browser. Holding off on finding a solution for now. * * * Safari (version 3 and later) * TODO: Investigate Safari 3. It almost works, but the forward * button seems to fail. */ goog.provide('goog.History'); goog.provide('goog.History.Event'); goog.provide('goog.History.EventType'); goog.require('goog.Timer'); goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.events.BrowserEvent'); goog.require('goog.events.Event'); goog.require('goog.events.EventHandler'); goog.require('goog.events.EventTarget'); goog.require('goog.events.EventType'); goog.require('goog.string'); goog.require('goog.userAgent'); /** * A history management object. Can be instantiated in user-visible mode (uses * the address fragment to manage state) or in hidden mode. This object should * be created from a script in the document body before the document has * finished loading. * * To store the hidden states in browsers other than IE, a hidden iframe is * used. It must point to a valid html page on the same domain (which can and * probably should be blank.) * * Sample instantiation and usage: * *
 * // Instantiate history to use the address bar for state. * var h = new goog.History(); * goog.events.listen(h, goog.History.EventType.NAVIGATE, navCallback); * h.setEnabled(true); * * // Any changes to the location hash will call the following function. * function navCallback(e) { * alert('Navigated to state "' + e.token + '"'); * } * * // The history token can also be set from code directly. * h.setToken('foo'); *
 * * @param {boolean=} opt_invisible True to use hidden history states instead of * the user-visible location hash. * @param {string=} opt_blankPageUrl A URL to a blank page on the same server. * Required if opt_invisible is true. This URL is also used as the src * for the iframe used to track history state in IE (if not specified the * iframe is not given a src attribute). Access is Denied error may * occur in IE7 if the window's URL's scheme is https, and this URL is * not specified. * @param {HTMLInputElement=} opt_input The hidden input element to be used to * store the history token. If not provided, a hidden input element will * be created using document.write. * @param {HTMLIFrameElement=} opt_iframe The hidden iframe that will be used by * IE for pushing history state changes, or by all browsers if opt_invisible * is true. If not provided, a hidden iframe element will be created using * document.write. * @constructor * @extends {goog.events.EventTarget} */ goog.History = function(opt_invisible, opt_blankPageUrl, opt_input, opt_iframe) { goog.events.EventTarget.call(this); if (opt_invisible && !opt_blankPageUrl) { throw Error('Can\'t use invisible history without providing a blank page.'); } var input; if (opt_input) { input = opt_input; } else { var inputId = 'history_state' + goog.History.historyCount_; document.write(goog.string.subs(goog.History.INPUT_TEMPLATE_, inputId, inputId)); input = goog.dom.getElement(inputId); } /** * An input element that stores the current iframe state. Used to restore * the state when returning to the page on non-IE browsers. * @type {HTMLInputElement} * @private */ this.hiddenInput_ = (/** @type {HTMLInputElement} */ input); /** * The window whose location contains the history token fragment. This is * the window that contains the hidden input. It's typically the top window. * It is not necessarily the same window that the js code is loaded in. * @type {Window} * @private */ this.window_ = opt_input ? goog.dom.getWindow(goog.dom.getOwnerDocument(opt_input)) : window; /** * The initial page location with an empty hash component. If the page uses * a BASE element, setting location.hash directly will navigate away from the * current document. To prevent this, the full path is always specified. The # * character is appended to the base URL, since removing the hash entirely * once it has been set reloads the entire page. * @type {string} * @private */ this.baseUrl_ = this.window_.location.href.split('#')[0] + '#'; /** * The base URL for the hidden iframe. Must refer to a document in the * same domain as the main page. * @type {string|undefined} * @private */ this.iframeSrc_ = opt_blankPageUrl; if (goog.userAgent.IE && !opt_blankPageUrl) { this.iframeSrc_ = window.location.protocol == 'https' ? 'https:///' : 'javascript:""'; } /** * A timer for polling the current history state for changes. * @type {goog.Timer} * @private */ this.timer_ = new goog.Timer(goog.History.PollingType.NORMAL); /** * True if the state tokens are displayed in the address bar, false for hidden * history states. * @type {boolean} * @private */ this.userVisible_ = !opt_invisible; /** * An object to keep track of the history event listeners. * @type {goog.events.EventHandler} * @private */ this.eventHandler_ = new goog.events.EventHandler(this); if (opt_invisible || goog.userAgent.IE && !goog.History.HAS_ONHASHCHANGE) { var iframe; if (opt_iframe) { iframe = opt_iframe; } else { var iframeId = 'history_iframe' + goog.History.historyCount_; var srcAttribute = this.iframeSrc_ ? 'src="' + goog.string.htmlEscape(this.iframeSrc_) + '"' : ''; document.write(goog.string.subs(goog.History.IFRAME_TEMPLATE_, iframeId, srcAttribute)); iframe = goog.dom.getElement(iframeId); } /** * Internet Explorer uses a hidden iframe for all history changes. Other * browsers use the iframe only for pushing invisible states. * @type {HTMLIFrameElement} * @private */ this.iframe_ = (/** @type {HTMLIFrameElement} */ iframe); /** * Whether the hidden iframe has had a document written to it yet in this * session. * @type {boolean} * @private */ this.unsetIframe_ = true; } if (goog.userAgent.IE && !goog.History.HAS_ONHASHCHANGE) { // IE relies on the hidden input to restore the history state from previous // sessions, but input values are only restored after window.onload. Set up // a callback to poll the value after the onload event. this.eventHandler_.listen(this.window_, goog.events.EventType.LOAD, this.onDocumentLoaded); /** * IE-only variable for determining if the document has loaded. * @type {boolean} * @protected */ this.documentLoaded = false; /** * IE-only variable for storing whether the history object should be enabled * once the document finishes loading. * @type {boolean} * @private */ this.shouldEnable_ = false; } // Set the initial history state. if (this.userVisible_) { this.setHash_(this.getToken(), true); } else { this.setIframeToken_(this.hiddenInput_.value); } goog.History.historyCount_++; }; goog.inherits(goog.History, goog.events.EventTarget); /** * Status of when the object is active and dispatching events. * @type {boolean} * @private */ goog.History.prototype.enabled_ = false; /** * Whether the object is performing polling with longer intervals. This can * occur for instance when setting the location of the iframe when in invisible * mode and the server that is hosting the blank html page is down. In FF, this * will cause the location of the iframe to no longer be accessible, with * permision denied exceptions being thrown on every access of the history * token. When this occurs, the polling interval is elongated. This causes * exceptions to be thrown at a lesser rate while allowing for the history * object to resurrect itself when the html page becomes accessible. * @type {boolean} * @private */ goog.History.prototype.longerPolling_ = false; /** * The last token set by the history object, used to poll for changes. * @type {?string} * @private */ goog.History.prototype.lastToken_ = null; /** * Whether the browser supports HTML5 history management. * {@link http://www.w3.org/TR/html5/history.html}. * @type {boolean} * @protected */ goog.History.HAS_ONHASHCHANGE = goog.userAgent.IE && document.documentMode >= 8 || goog.userAgent.GECKO && goog.userAgent.isVersion('1.9.2') || goog.userAgent.WEBKIT && goog.userAgent.isVersion('532.1'); /** * If not null, polling in the user invisible mode will be disabled until this * token is seen. This is used to prevent a race condition where the iframe * hangs temporarily while the location is changed. * @type {?string} * @private */ goog.History.prototype.lockedToken_ = null; /** * Disposes of the object. */ goog.History.prototype.disposeInternal = function() { goog.History.superClass_.disposeInternal.call(this); this.eventHandler_.dispose(); this.setEnabled(false); }; /** * Starts or stops the History polling loop. When enabled, the History object * will immediately fire an event for the current location. The caller can set * up event listeners between the call to the constructor and the call to * setEnabled. * * On IE, actual startup may be delayed until the iframe and hidden input * element have been loaded and can be polled. This behavior is transparent to * the caller. * * @param {boolean} enable Whether to enable the history polling loop. */ goog.History.prototype.setEnabled = function(enable) { if (enable == this.enabled_) { return; } if (goog.userAgent.IE && !goog.History.HAS_ONHASHCHANGE && !this.documentLoaded) { // Wait until the document has actually loaded before enabling the // object or any saved state from a previous session will be lost. this.shouldEnable_ = enable; return; } if (enable) { if (goog.userAgent.OPERA) { // Capture events for common user input so we can restart the timer in // Opera if it fails. Yes, this is distasteful. See operaDefibrillator_. this.eventHandler_.listen(this.window_.document, goog.History.INPUT_EVENTS_, this.operaDefibrillator_); } else if (goog.userAgent.GECKO) { // Firefox will not restore the correct state after navigating away from // and then back to the page with the history object. This can be fixed // by restarting the history object on the pageshow event. this.eventHandler_.listen(this.window_, 'pageshow', this.onShow_); } // TODO: make HTML5 and invisible history work by listening to the // iframe # changes instead of the window. if (goog.History.HAS_ONHASHCHANGE && this.userVisible_) { this.eventHandler_.listen( this.window_, goog.events.EventType.HASHCHANGE, this.onHashChange_); this.enabled_ = true; this.dispatchEvent(new goog.History.Event(this.getToken())); } else if (!goog.userAgent.IE || this.documentLoaded) { // Start dispatching history events if all necessary loading has // completed (always true for browsers other than IE.) this.eventHandler_.listen(this.timer_, goog.Timer.TICK, this.check_); this.enabled_ = true; // Prevent the timer from dispatching an extraneous navigate event. // However this causes the hash to get replaced with a null token in IE. if (!goog.userAgent.IE) { this.lastToken_ = this.getToken(); } this.timer_.start(); this.dispatchEvent(new goog.History.Event(this.getToken())); } } else { this.enabled_ = false; this.eventHandler_.removeAll(); this.timer_.stop(); } }; /** * Callback for the window onload event in IE. This is necessary to read the * value of the hidden input after restoring a history session. The value of * input elements is not viewable until after window onload for some reason (the * iframe state is similarly unavailable during the loading phase.) If * setEnabled is called before the iframe has completed loading, the history * object will actually be enabled at this point. * @protected */ goog.History.prototype.onDocumentLoaded = function() { this.documentLoaded = true; if (this.hiddenInput_.value) { // Any saved value in the hidden input can only be read after the document // has been loaded due to an IE limitation. Restore the previous state if // it has been set. this.setIframeToken_(this.hiddenInput_.value, true); } this.setEnabled(this.shouldEnable_); }; /** * Handler for the Gecko pageshow event. Restarts the history object so that the * correct state can be restored in the hash or iframe. * @param {goog.events.BrowserEvent} e The browser event. * @private */ goog.History.prototype.onShow_ = function(e) { // NOTE: persisted is a property passed in the pageshow event that // indicates whether the page is being persisted from the cache or is being // loaded for the first time. if (e.getBrowserEvent()['persisted']) { this.setEnabled(false); this.setEnabled(true); } }; /** * Handles HTML5 onhashchange events on browsers where it is supported. * This is very similar to {@link #check_}, except that it is not executed * continuously. It is only used when {@code goog.History.HAS_ONHASHCHANGE} is * true. * @param {goog.events.BrowserEvent} e The browser event. * @private */ goog.History.prototype.onHashChange_ = function(e) { var hash = this.getLocationFragment_(this.window_); if (hash != this.lastToken_) { this.update_(hash); } }; /** * @return {string} The current token. */ goog.History.prototype.getToken = function() { if (this.lockedToken_ !== null) { // XXX: type checker bug! return /** @type {string} */ (this.lockedToken_); } else if (this.userVisible_) { return this.getLocationFragment_(this.window_); } else { return this.getIframeToken_() || ''; } }; /** * Sets the history state. When user visible states are used, the URL fragment * will be set to the provided token. Sometimes it is necessary to set the * history token before the document title has changed, in this case IE's * history drop down can be out of sync with the token. To get around this * problem, the app can pass in a title to use with the hidden iframe. * @param {string} token The history state identifier. * @param {string=} opt_title Optional title used when setting the hidden iframe * title in IE. */ goog.History.prototype.setToken = function(token, opt_title) { this.setHistoryState_(token, false, opt_title); }; /** * Replaces the current history state without affecting the rest of the history * stack. * @param {string} token The history state identifier. * @param {string=} opt_title Optional title used when setting the hidden iframe * title in IE. */ goog.History.prototype.replaceToken = function(token, opt_title) { this.setHistoryState_(token, true, opt_title); }; /** * Gets the location fragment for the current URL. We don't use location.hash * directly as the browser helpfully urlDecodes the string for us which can * corrupt the tokens. For example, if we want to store: label/%2Froot it would * be returned as label//root. * @param {Window} win The window object to use. * @return {string} The fragment. * @private */ goog.History.prototype.getLocationFragment_ = function(win) { var loc = win.location.href; var index = loc.indexOf('#'); return index < 0 ? '' : loc.substring(index + 1); }; /** * Sets the history state. When user visible states are used, the URL fragment * will be set to the provided token. Setting opt_replace to true will cause the * navigation to occur, but will replace the current history entry without * affecting the length of the stack. * * @param {string} token The history state identifier. * @param {boolean} replace Set to replace the current history entry instead of * appending a new history state. * @param {string=} opt_title Optional title used when setting the hidden iframe * title in IE. * @private */ goog.History.prototype.setHistoryState_ = function(token, replace, opt_title) { if (this.getToken() != token) { if (this.userVisible_) { this.setHash_(token, replace); if (!goog.History.HAS_ONHASHCHANGE) { if (goog.userAgent.IE) { // IE must save state using the iframe. this.setIframeToken_(token, replace, opt_title); } } // This condition needs to be called even if // goog.History.HAS_ONHASHCHANGE is true so the NAVIGATE event fires // sychronously. if (this.enabled_) { this.check_(); } } else { // Fire the event immediately so that setting history is synchronous, but // set a suspendToken so that polling doesn't trigger a 'back'. this.setIframeToken_(token, replace); this.lockedToken_ = this.lastToken_ = this.hiddenInput_.value = token; this.dispatchEvent(new goog.History.Event(token)); } } }; /** * Sets or replaces the URL fragment. The token does not need to be URL encoded * according to the URL specification, though certain characters (like newline) * are automatically stripped. * * If opt_replace is not set, non-IE browsers will append a new entry to the * history list. Setting the hash does not affect the history stack in IE * (unless there is a pre-existing named anchor for that hash.) * * Older versions of Webkit cannot query the location hash, but it still can be * set. If we detect one of these versions, always replace instead of creating * new history entries. * * window.location.replace replaces the current state from the history stack. * http://www.whatwg.org/specs/web-apps/current-work/#dom-location-replace * http://www.whatwg.org/specs/web-apps/current-work/#replacement-enabled * * @param {string} hash The new string to set. * @param {boolean=} opt_replace Set to true to replace the current token * without appending a history entry. * @private */ goog.History.prototype.setHash_ = function(hash, opt_replace) { // The page is reloaded if the hash is removed, so the '#' must always be // appended to the base URL, even if setting an empty token. var url = this.baseUrl_ + (hash || ''); var loc = this.window_.location; if (url != loc.href) { if (opt_replace) { loc.replace(url); } else { loc.href = url; } } }; /** * Sets the hidden iframe state. On IE, this is accomplished by writing a new * document into the iframe. In Firefox, the iframe's URL fragment stores the * state instead. * * Older versions of webkit cannot set the iframe, so ignore those browsers. * * @param {string} token The new string to set. * @param {boolean=} opt_replace Set to true to replace the current iframe state * without appending a new history entry. * @param {string=} opt_title Optional title used when setting the hidden iframe * title in IE. * @private */ goog.History.prototype.setIframeToken_ = function(token, opt_replace, opt_title) { if (this.unsetIframe_ || token != this.getIframeToken_()) { this.unsetIframe_ = false; token = goog.string.urlEncode(token); if (goog.userAgent.IE) { // Caching the iframe document results in document permission errors after // leaving the page and returning. Access it anew each time instead. var doc = goog.dom.getFrameContentDocument(this.iframe_); doc.open('text/html', opt_replace ? 'replace' : undefined); doc.write( goog.string.subs(goog.History.IFRAME_SOURCE_TEMPLATE_, goog.string.htmlEscape((/** @type {string} */ opt_title || this.window_.document.title)), token)); doc.close(); } else { var url = this.iframeSrc_ + '#' + token; // In Safari, it is possible for the contentWindow of the iframe to not // be present when the page is loading after a reload. var contentWindow = this.iframe_.contentWindow; if (contentWindow) { if (opt_replace) { contentWindow.location.replace(url); } else { contentWindow.location.href = url; } } } } }; /** * Return the current state string from the hidden iframe. On internet explorer, * this is stored as a string in the document body. Other browsers use the * location hash of the hidden iframe. * * Older versions of webkit cannot access the iframe location, so always return * null in that case. * * @return {?string} The state token saved in the iframe (possibly null if the * iframe has never loaded.). * @private */ goog.History.prototype.getIframeToken_ = function() { if (goog.userAgent.IE) { var doc = goog.dom.getFrameContentDocument(this.iframe_); return doc.body ? goog.string.urlDecode(doc.body.innerHTML) : null; } else { // In Safari, it is possible for the contentWindow of the iframe to not // be present when the page is loading after a reload. var contentWindow = this.iframe_.contentWindow; if (contentWindow) { var hash; /** @preserveTry */ try { // Iframe tokens are urlEncoded hash = goog.string.urlDecode(this.getLocationFragment_(contentWindow)); } catch (e) { // An exception will be thrown if the location of the iframe can not be // accessed (permission denied). This can occur in FF if the the server // that is hosting the blank html page goes down and then a new history // token is set. The iframe will navigate to an error page, and the // location of the iframe can no longer be accessed. Due to the polling, // this will cause constant exceptions to be thrown. In this case, // we enable longer polling. We do not have to attempt to reset the // iframe token because (a) we already fired the NAVIGATE event when // setting the token, (b) we can rely on the locked token for current // state, and (c) the token is still in the history and // accesible on forward/back. if (!this.longerPolling_) { this.setLongerPolling_(true) } return null; } // There was no exception when getting the hash so turn off longer polling // if it is on. if (this.longerPolling_) { this.setLongerPolling_(false); } return hash || null; } else { return null; } } }; /** * Checks the state of the document fragment and the iframe title to detect * navigation changes. If {@code goog.History.HAS_ONHASHCHANGE} is * {@code false}, then this runs approximately twenty times per second. * @private */ goog.History.prototype.check_ = function() { if (this.userVisible_) { var hash = this.getLocationFragment_(this.window_); if (hash != this.lastToken_) { this.update_(hash); } } // IE uses the iframe for state for both the visible and non-visible version. if (!this.userVisible_ || goog.userAgent.IE && !goog.History.HAS_ONHASHCHANGE) { var token = this.getIframeToken_() || ''; if (this.lockedToken_ == null || token == this.lockedToken_) { this.lockedToken_ = null; if (token != this.lastToken_) { this.update_(token); } } } }; /** * Updates the current history state with a given token. Called after a change * to the location or the iframe state is detected by poll_. * * @param {string} token The new history state. * @private */ goog.History.prototype.update_ = function(token) { this.lastToken_ = this.hiddenInput_.value = token; if (this.userVisible_) { if (goog.userAgent.IE && !goog.History.HAS_ONHASHCHANGE) { this.setIframeToken_(token); } this.setHash_(token); } else { this.setIframeToken_(token); } this.dispatchEvent(new goog.History.Event(this.getToken())); }; /** * Sets if the history oject should use longer intervals when polling. * * @param {boolean} longerPolling Whether to enable longer polling. * @private */ goog.History.prototype.setLongerPolling_ = function(longerPolling) { if (this.longerPolling_ != longerPolling) { this.timer_.setInterval(longerPolling ? goog.History.PollingType.LONG : goog.History.PollingType.NORMAL); } this.longerPolling_ = longerPolling; }; /** * Opera cancels all outstanding timeouts and intervals after any rapid * succession of navigation events, including the interval used to detect * navigation events. This function restarts the interval so that navigation can * continue. Ideally, only events which would be likely to cause a navigation * change (mousedown and keydown) would be bound to this function. Since Opera * seems to ignore keydown events while the alt key is pressed (such as * alt-left or right arrow), this function is also bound to the much more * frequent mousemove event. This way, when the update loop freezes, it will * unstick itself as the user wiggles the mouse in frustration. * @private */ goog.History.prototype.operaDefibrillator_ = function() { this.timer_.stop(); this.timer_.start(); }; /** * List of user input event types registered in Opera to restart the history * timer (@see goog.History#operaDefibrillator_). * @type {Array.<string>} * @private */ goog.History.INPUT_EVENTS_ = [goog.events.EventType.MOUSEDOWN, goog.events.EventType.KEYDOWN, goog.events.EventType.MOUSEMOVE]; /** * Minimal HTML page used to populate the iframe in Internet Explorer. The title * is visible in the history dropdown menu, the iframe state is stored as the * body innerHTML. * @type {string} * @private */ goog.History.IFRAME_SOURCE_TEMPLATE_ = '<title>%s</title>%s'; /** * HTML template for an invisible iframe. * @type {string} * @private */ goog.History.IFRAME_TEMPLATE_ = ''; /** * HTML template for an invisible named input element. * @type {string} * @private */ goog.History.INPUT_TEMPLATE_ = '<input type="text" name="%s" id="%s" style="display:none" />'; /** * Counter for the number of goog.History objects that have been instantiated. * Used to create unique IDs. * @type {number} * @private */ goog.History.historyCount_ = 0; /** * Types of polling. The values are in ms of the polling interval. * @enum {number} */ goog.History.PollingType = { NORMAL: 150, LONG: 10000 }; /** * Constant for the history change event type. * @enum {string} */ goog.History.EventType = { NAVIGATE: 'navigate' }; /** * Event object dispatched after navigation events. * @param {string} token The string identifying the new history state. * @constructor * @extends {goog.events.Event} */ goog.History.Event = function(token) { goog.events.Event.call(this, goog.History.EventType.NAVIGATE); /** * The current history state. * @type {string} */ this.token = token; }; goog.inherits(goog.History.Event, goog.events.Event);


| make_expectation {testthat} | R Documentation |
This a convenience function to make a expectation that checks that input stays the same.
make_expectation(x, expectation = "equals")
x |
a vector of values |
expectation |
the type of equality you want to test for
( |
x <- 1:10 make_expectation(x) make_expectation(mtcars$mpg) df <- data.frame(x = 2) make_expectation(df)


Class TheRectTransform
Inheritance
System.Object
TheRectTransform
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: TheEngine.dll
public class TheRectTransform : TheComponent
Properties
|
Improve this Doc
View Source
Declaration
public TheVector3 Anchor { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool OnClick { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public bool OnClickDown { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public bool OnClickUp { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public bool OnMouseEnter { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public bool OnMouseOut { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public bool OnMouseOver { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public TheVector3 Position { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public TheVector3 Rotation { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public TheVector3 Size { get; set; }
Property Value


COVID-19's effects in the U.S. can be seen in almost all industries and areas of life, from changes in the way we work and travel to how we shop. One of the most surprising, yet understandable changes that have occurred is the surge in dog adoptions.
The Washington Post reported that increased consumer demand has even led to waiting lists for certain breeds of dogs. With so much interest in adopting these four-legged-pals, our team got together to compare dog breed height/weight and intelligence with the hopes of helping others with selecting their future best friends.
Dog intelligence is determined by the aptitude demonstrated for obeying the first command (we will refer to this as the obedience ratio), and the repetition needed for a dog to understand a new command. Why is dog intelligence important? This dictates the approximate speed at which a dog will learn a new command and their track-record in obeying commands given, which can greatly reduce training time. Training is integral so that your new furry friend becomes acclimated to their new home, understands their place in the household, as well as their boundaries and expectations.
Regardless of their obedience level, all dogs do have the ability to learn and obey commands, it just may take more investment from their owner in the form of time and repetition. Intelligence is not the only factor that should be considered in the adoption process, please also consider breed-specific dog behaviors and health issues.
We hope that our data insights will help individuals and families seeking a furry best friend to approximate the time investment needed to train their new family member. Dog training will encourage desirable behaviors that will contribute to a happy life for the entire family.
The ETL repository may be accessed at https://github.com/alissavokes/ETL-Dog-Intelligence.
Our original data sources were formatted as CSV files. Both data sets were obtained from data.world, and have been included below.
Once the data was reviewed, we identified a few issues that we needed to address in the data cleaning step, such as breed name inconsistencies, and missing/invalid values.
Using Pandas, the following steps were taken to address the identified issues.
Once the cleaning was finalized, a PostgreSQL connection was initiated and the cleaned tables were loaded into the database. The tables were then merged using a SQL command and exported as a CSV file. This table may be found in the "Final Table" section of our website.
Our group determined to merge the two tables into one in order to simplify our approach to pulling and evaluating information.
Dog size factors, such as height and weight, and intelligence (in the form of the obedience ratio) were compared. The top 10 most intelligent breeds reflect dog weights that range from less than 10 lbs and up to 100 lbs. The results indicate that intelligence is derived from other breed-specific variables. We concluded that there is not a strong correlation between average breed size and intelligence as a variety of dog breeds of all sizes were found in each intelligence category.
| Breed | Average Weight (lbs) | Classification | Obedience | Repetitions Lower | Repetitions Upper |
|---|---|---|---|---|---|
| German Shepherd | 82.5 | Brightest Dogs | 0.95 | 1 | 4 |
| Labrador Retriever | 67.5 | Brightest Dogs | 0.95 | 1 | 4 |
| Doberman Pinscher | 80.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Rottweiler | 100.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Belgian Sheepdog | 67.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Breed | Average Weight (lbs) | Average Height (inches) | Classification | Obedience | Repetitions Lower | Repetitions Upper |
|---|---|---|---|---|---|---|
| Papillon | 7.5 | 9.5 | Brightest Dogs | 0.95 | 1 | 4 |
| Shetland Sheepdog | 17.0 | 14.5 | Brightest Dogs | 0.95 | 1 | 4 |
| American Cocker Spaniel | 25.0 | 15.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Standard Schnauzer | 33.0 | 18.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| English Cocker Spaniel | 30.0 | 16.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Breed | Average Weight (lbs) | Classification | Obedience | Repetitions Lower | Repetitions Upper |
|---|---|---|---|---|---|
| Border Collie | 40.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Shetland Sheepdog | 17.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Labrador Retriever | 67.5 | Brightest Dogs | 0.95 | 1 | 4 |
| Australian Cattle Dog | 40.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Doberman Pinscher | 80.0 | Brightest Dogs | 0.95 | 1 | 4 |
| German Shepherd | 82.5 | Brightest Dogs | 0.95 | 1 | 4 |
| Golden Retriever | 65.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Rottweiler | 100.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Poodle Standard | 45.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Papillon | 7.5 | Brightest Dogs | 0.95 | 1 | 4 |
| Dog Size | Dog Count | Average Obediance | Average Low Repetitions | Average Upper Repetitions |
|---|---|---|---|---|
| small dogs < 35 lbs | 49 | 0.51 | 28.00 | 47.61 |
| medium dogs - between 35 and 65 lbs | 35 | 0.60 | 24.00 | 36.49 |
| large dogs > 65 lbs | 28 | 0.56 | 25.86 | 40.39 |
The results indicate that medium-sized dog breeds have a higher level of intelligence on average when compared to large and small dog breeds.
| Breed | Average Height (inches) | Average Weight (lbs) | Classification | Obedience | Repetitions Lower | Repetitions Upper |
|---|---|---|---|---|---|---|
| Akita | 27.0 | 100.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Bernese Mountain Dog | 25.0 | 97.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Bloodhound | 25.0 | 100.0 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| Borzoi | 27.0 | 85.0 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| Bullmastiff | 26.0 | 115.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Great Dane | 32.0 | 140.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Great Pyrenees | 29.5 | 107.5 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Irish Wolfhound | 31.5 | 120.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Kuvasz | 29.0 | 95.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Mastiff | 28.5 | 182.5 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| Newfoundland | 27.0 | 125.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Otterhound | 25.0 | 87.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Rottweiler | 24.5 | 100.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Saint Bernard | 26.5 | 150.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Afghan Hound | 26.0 | 55.0 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| American Foxhound | 23.5 | 67.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Belgian Malinois | 24.0 | 62.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Belgian Sheepdog | 24.0 | 67.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Belgian Tervuren | 24.0 | 67.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Boxer | 23.0 | 67.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Briard | 25.0 | 75.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Chesapeake Bay Retriever | 23.5 | 65.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Clumber Spaniel | 19.5 | 50.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Collie | 24.0 | 62.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Curly Coated Retriever | 26.0 | 72.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Doberman Pinscher | 27.0 | 80.0 | Brightest Dogs | 0.95 | 1 | 4 |
| English Foxhound | 23.5 | 67.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| English Setter | 25.0 | 62.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| German Shepherd | 24.0 | 82.5 | Brightest Dogs | 0.95 | 1 | 4 |
| German Shorthaired Pointer | 23.5 | 65.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| German Wirehaired Pointer | 24.0 | 65.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Giant Schnauzer | 26.5 | 72.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Golden Retriever | 22.5 | 65.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Gordon Setter | 25.0 | 62.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Greyhound | 28.5 | 65.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Irish Setter | 26.0 | 65.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Labrador Retriever | 22.5 | 67.5 | Brightest Dogs | 0.95 | 1 | 4 |
| Old English Sheepdog | 22.0 | 62.5 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Poodle Standard | 20.0 | 45.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Rhodesian Ridgeback | 25.5 | 77.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Scottish Deerhound | 30.0 | 92.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Weimaraner | 26.0 | 77.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Airedale Terrier | 23.0 | 45.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| American Staffordshire Terrier | 18.0 | 45.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| American Water Spaniel | 16.5 | 35.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Australian Cattle Dog | 18.5 | 40.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Australian Shepherd | 20.5 | 50.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Basset Hound | 14.0 | 45.0 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| Bearded Collie | 21.0 | 50.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Border Collie | 20.0 | 40.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Brittany | 19.0 | 35.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Bulldog | 14.0 | 55.0 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| Bull Terrier | 21.5 | 60.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Chinese Shar Pei | 19.0 | 50.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Chow Chow | 20.5 | 50.0 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| American Cocker Spaniel | 15.5 | 25.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| English Cocker Spaniel | 16.0 | 30.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Dalmatian | 21.0 | 57.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| English Springer Spaniel | 20.0 | 50.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Field Spaniel | 18.0 | 42.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Flat Coated Retriever | 22.5 | 65.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Finnish Spitz | 17.5 | 33.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Ibizan Hound | 25.5 | 48.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Irish Terrier | 18.5 | 26.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Irish Water Spaniel | 16.5 | 55.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Keeshond | 18.0 | 42.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Kerry Blue Terrier | 19.0 | 37.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Norwegian Elkhound | 19.5 | 50.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Pharaoh Hound | 23.0 | 50.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Pointer | 22.5 | 55.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Portuguese Water Dog | 21.5 | 51.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Saluki | 25.5 | 52.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Samoyed | 21.5 | 57.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Siberian Husky | 21.5 | 50.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Staffordshire Bull Terrier | 15.0 | 26.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Standard Schnauzer | 18.0 | 33.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Vizsla | 57.0 | 23.5 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Welsh Springer Spaniel | 17.5 | 40.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Wirehaired Pointing Griffon | 22.0 | 52.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Australian Terrier | 10.0 | 12.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Basenji | 17.0 | 21.0 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| Beagle | 14.5 | 24.0 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| Bedlington Terrier | 15.5 | 20.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Bichon Frise | 10.5 | 14.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Border Terrier | 13.5 | 13.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Boston Terrier | 14.5 | 20.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Brussels Griffon | 7.5 | 9.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Cairn Terrier | 9.5 | 14.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Cardigan Welsh Corgi | 11.0 | 30.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| King Charles Spaniel | 12.5 | 17.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Dachshund | 8.5 | 24.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Dandie Dinmont Terrier | 21.0 | 9.5 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Smooth Fox Terrier | 14.5 | 17.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Wire Fox Terrier | 14.5 | 17.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| French Bulldog | 11.5 | 22.5 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Lakeland Terrier | 13.5 | 16.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Manchester Terrier Standard | 15.5 | 17.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Pug | 10.5 | 18.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Puli | 16.5 | 31.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Schipperke | 11.5 | 15.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Scottish Terrier | 11.0 | 20.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Sealyham Terrier | 12.0 | 19.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Shetland Sheepdog | 14.5 | 17.0 | Brightest Dogs | 0.95 | 1 | 4 |
| Shiba Inu | 14.5 | 22.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Shih Tzu | 9.5 | 12.5 | Lowest Degree of Working/Obedience Intelligence | 0.00 | 81 | 100 |
| Australian Silky Terrier | 9.5 | 9.5 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Skye Terrier | 10.0 | 25.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Tibetan Spaniel | 10.0 | 12.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Tibetan Terrier | 15.5 | 25.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Welsh Terrier | 15.0 | 20.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| West Highland White Terrier | 11.0 | 14.0 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Whippet | 20.0 | 28.5 | Average Working/Obedience Intelligence | 0.50 | 26 | 40 |
| Affenpinscher | 10.5 | 10.0 | Above Average Working Dogs | 0.70 | 16 | 25 |
| Chihuahua | 7.5 | 3.5 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Chinese Crested | 12.0 | 8.5 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Italian Greyhound | 13.5 | 8.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Japanese Chin | 9.5 | 7.5 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Maltese | 9.0 | 5.0 | Fair Working/Obedience Intelligence | 0.30 | 41 | 80 |
| Papillon | 9.5 | 7.5 | Brightest Dogs | 0.95 | 1 | 4 |
| Pomeranian | 12.0 | 5.0 | Excellent Working Dogs | 0.85 | 5 | 15 |
| Yorkshire Terrier | 8.0 | 5.0 | Above Average Working Dogs | 0.70 | 16 | 25 |


Indian boy, 3, dies days after falling into scalding pot of curry stew: reports
by Paulina DedajA 3-year-old boy in India died this week of burn injuries after falling into a giant pot of curry stew.
The toddler, identified only as P. Aarush, died Tuesday -- two days after falling into a pot of sambar that was being cooked for a party in Shabad, a small town in the state of Telangana, the New Indian Express reported.
Sambar is a popular curry-based stew made predominantly in southern India and Sri Lanka.
The boy’s father told police that the accident happened around noon Sunday when he was playing around the cooking area.
He was taken to a government hospital before being transported to a general hospital where he later died, New Delhi Television Limited reported.
CLICK HERE TO GET THE FOX NEWS APP
It was the second tragic death under similar circumstances in less than a week.
A 6-year-old boy also died after falling into a cooking pot of sambar on Nov. 13. The accident occurred at the boy's school in Panyam village at lunchtime, India Today reported.


|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use mdes.slick.sui | |
| mdes.slick.sui | Contains a set of Sui components and utilities. |
| mdes.slick.sui.layout | Contains classes for layout handling. |
| mdes.slick.sui.skin | Contains classes and utilities for making skins and appearances. |
| mdes.slick.sui.skin.simple | Contains classes used by SimpleSkin, the default skin for SUI. |
| mdes.slick.sui.test | Contains classes for testing various features in SUI. |
| mdes.slick.sui.theme | Contains classes and utilities for color themes. |
| Classes in mdes.slick.sui used by mdes.slick.sui | |
| Button
A basic, clickable button component. |
|
| CheckBox
|
|
| Component
An abstract base component which all other components must derive from. |
|
| Container
|
|
| Dimension
A simple Dimension (width, height) for components. |
|
| Display
This acts as a top-level component which renders various SuiContainers. |
|
| Frame
A dialog window which can be moved, resized, and hidden. |
|
| Frame.CloseButton
|
|
| Frame.Resizer
|
|
| Frame.TitleBar
|
|
| Label
Label is the base class for displaying a String and/or Image on a component. |
|
| Padding
The Padding class holds the basic insets for a component. |
|
| Point
A simple Point class to hold (x,y) coordinates. |
|
| ScrollBar
|
|
| ScrollBar.IncDecListener
|
|
| ScrollConstants
This class contains a set of constants used with scroll bars and scrollable components (such as sliders). |
|
| ScrollPane
|
|
| Skin
|
|
| Slider
|
|
| TextArea
|
|
| TextArea.Line
|
|
| TextComponent
|
|
| TextField
|
|
| Theme
Buttons, text fields and windows are rendered using the colors defined in the current Theme. |
|
| ToggleButton
|
|
| ToolTip
|
|
| Window
A class that is used to create layerable window overlays. |
| Classes in mdes.slick.sui used by mdes.slick.sui.layout | |
| Container
|
| Classes in mdes.slick.sui used by mdes.slick.sui.skin | |
| Button
A basic, clickable button component. |
|
| CheckBox
|
|
| Component
An abstract base component which all other components must derive from. |
|
| Frame.Resizer
|
|
| Frame.TitleBar
|
|
| Label
Label is the base class for displaying a String and/or Image on a component. |
|
| Padding
The Padding class holds the basic insets for a component. |
|
| Point
A simple Point class to hold (x,y) coordinates. |
|
| ScrollBar
|
|
| ScrollConstants
This class contains a set of constants used with scroll bars and scrollable components (such as sliders). |
|
| ScrollPane
|
|
| Skin
|
|
| Slider
|
|
| TextComponent
|
|
| Theme
Buttons, text fields and windows are rendered using the colors defined in the current Theme. |
|
| ToggleButton
|
| Classes in mdes.slick.sui used by mdes.slick.sui.skin.simple | |
| Button
A basic, clickable button component. |
|
| CheckBox
|
|
| Component
An abstract base component which all other components must derive from. |
|
| Container
|
|
| Frame
A dialog window which can be moved, resized, and hidden. |
|
| Frame.Resizer
|
|
| Frame.TitleBar
|
|
| Label
Label is the base class for displaying a String and/or Image on a component. |
|
| Point
A simple Point class to hold (x,y) coordinates. |
|
| ScrollBar
|
|
| ScrollConstants
This class contains a set of constants used with scroll bars and scrollable components (such as sliders). |
|
| ScrollPane
|
|
| Skin
|
|
| Slider
|
|
| TextArea
|
|
| TextComponent
|
|
| TextField
|
|
| Theme
Buttons, text fields and windows are rendered using the colors defined in the current Theme. |
|
| Timer
A simple Sui-based Timer for using delays and "waits" within a GUI environment. |
|
| ToggleButton
|
|
| ToolTip
|
|
| Window
A class that is used to create layerable window overlays. |
| Classes in mdes.slick.sui used by mdes.slick.sui.test | |
| Component
An abstract base component which all other components must derive from. |
|
| Container
|
|
| Frame
A dialog window which can be moved, resized, and hidden. |
|
| Window
A class that is used to create layerable window overlays. |
| Classes in mdes.slick.sui used by mdes.slick.sui.theme | |
| Theme
Buttons, text fields and windows are rendered using the colors defined in the current Theme. |
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |


--- layout: ion_page title: Basic Suturing Workshop 2017 permalink: /basicsuturing1617/ feature-img: /Suturing2017.jpg category: event ---
The basic suturing workshop will be held on 4 and 5 February 2017. It aims to introduce introduce basic knot-tying and suturing skills to medical students. Each session will be led by a surgeon and students will be able to practise on bananas, diving suits and skin models. We hope that through this workshop, students may gain an early exposure to suturing techniques as well as develop an interest in surgery as a prospective career.
*Actual teaching is subject to the tutor’s discretion and the progress of each group of students
$140 (member) $160 (non-member)
120 (Both universities combined; 20 participants per workshop)
4th February (Sat) at PWH (Rooms 303 and 304, Li Ka Shing Medical Sciences Building, Prince of Wales Hospital, Sha Tin, N.T.)
5th February (Sun) at HKU (Tutorial Rooms 4 and 5, 1/F, William MW Mong Block, University of Hong Kong, 21 Sassoon Road)
1. Fill in the Google Form by 30 January 2017 (Monday).
2. A confirmation email will be sent within 1-2 days to inform you of your allocated workshop session.
3. Please transfer the fee to our Bank of China account: 012-608-1-023782-4 and send us a soft copy of your receipt by email or directly to one of our students in charge by WhatsApp on or before 3 February 2017 (Friday).
** Should applicants fail to submit the application fee, or provide the receipt on time, his/her application may be voided. **
Please note that an advanced suturing workshop will be held later, and only students who have joined this basic workshop will be able to participate.
PIC: Gary Cheung (HKU) 6359 3690, Aemon Wong (CUHK) 9527 9379 or Evan Shang (CUHK) 5939 7103.
Email: ssahk1617@gmail.com


A SMS containing a confirmation code was sent to your phone.
Please, enter the code below
Fiat will be immediately withdrawn from your bank account. The bitcoins will be purchased and deposited to your wallet ({{index.walletName}}) in 2-4 business days.
A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business days.


Use this site to keep up to date with Irish and UK racing.
On the racemeetings page you can view the upcoming race meetings for the next 30 days as and when they are available on Betfair. Click the upcoming race meetings button to view.
On the racemeetings page you can also view the upcoming races listed chronologically. The races included are those listed on Betfair for the race meetings above. Click the Upcoming Races button to view.
On the horseviewer page you can see info on all the horses stored in our database. The data is stored in our database from betfair. You can update it manually using the buttons provided.
Unfortunately the races tracker with predictions is still under construction. Check back soon it will be available shortly !!


pythologist
pythologist
Docs
»
Index
Index
A
|
B
|
C
|
D
|
E
|
F
|
G
|
I
|
K
|
M
|
N
|
P
|
Q
|
R
|
S
|
T
|
W
|
Z
A
add_sample_path() (pythologist_reader.formats.inform.immunoprofile.CellProjectInFormImmunoProfile method)
append_sample() (pythologist_reader.CellProjectGeneric method)
B
binary_calls() (pythologist_reader.CellFrameGeneric method)
binary_image_dilation() (in module pythologist_image_utilities)
build_segmentation_image() (pythologist.interface.SegmentationImages method)
C
cartesian() (pythologist.CellDataFrame method)
cdf() (pythologist_reader.CellFrameGeneric property)
(pythologist_reader.CellProjectGeneric property)
(pythologist_reader.CellSampleGeneric property)
cell_map() (pythologist_reader.CellFrameGeneric method)
cell_map_image() (pythologist_reader.CellFrameGeneric method)
CellDataFrame (class in pythologist)
CellFrameGeneric (class in pythologist_reader)
CellProjectGeneric (class in pythologist_reader)
CellProjectInForm (class in pythologist_reader.formats.inform.sets)
CellProjectInFormCustomMask (class in pythologist_reader.formats.inform.custom)
CellProjectInFormImmunoProfile (class in pythologist_reader.formats.inform.immunoprofile)
CellProjectInFormLineArea (class in pythologist_reader.formats.inform.custom)
CellSampleGeneric (class in pythologist_reader)
CellSampleInFormImmunoProfile (class in pythologist_reader.formats.inform.immunoprofile)
channel_image_dataframe() (pythologist_reader.CellProjectGeneric property)
collapse_phenotypes() (pythologist.CellDataFrame method)
combine_regions() (pythologist.CellDataFrame method)
concat() (pythologist.CellDataFrame class method)
contacts() (pythologist.CellDataFrame method)
convert_cascading_scores_to_mutually_exclusive_ordinal_binary() (pythologist.CellDataFrame method)
counts() (pythologist.CellDataFrame method)
D
db() (pythologist.CellDataFrame property)
drop_scored_calls() (pythologist.CellDataFrame method)
E
edge_map() (pythologist_reader.CellFrameGeneric method)
edge_map_image() (pythologist_reader.CellFrameGeneric method)
F
fill_phenotype_calls() (pythologist.CellDataFrame method)
fill_phenotype_label() (pythologist.CellDataFrame method)
flood_fill() (in module pythologist_image_utilities)
frame_columns() (pythologist.CellDataFrame property)
frame_ids() (pythologist_reader.CellSampleGeneric property)
frame_iter() (pythologist_reader.CellProjectGeneric method)
(pythologist_reader.CellSampleGeneric method)
G
gates() (pythologist_reader.formats.inform.sets.CellProjectInForm property)
get_channels() (pythologist_reader.CellFrameGeneric method)
get_data() (pythologist_reader.CellFrameGeneric method)
get_frame() (pythologist_reader.CellSampleGeneric method)
get_image() (pythologist_reader.CellFrameGeneric method)
(pythologist_reader.CellProjectGeneric method)
get_labeled_raw() (pythologist_reader.CellFrameGeneric method)
(pythologist_reader.CellProjectGeneric method)
(pythologist_reader.CellSampleGeneric method)
get_measured_regions() (pythologist.CellDataFrame method)
get_raw() (pythologist_reader.CellFrameGeneric method)
get_sample() (pythologist_reader.CellProjectGeneric method)
get_valid_cell_indecies() (pythologist.CellDataFrame method)
I
id() (pythologist_reader.CellFrameGeneric property)
(pythologist_reader.CellProjectGeneric property)
(pythologist_reader.CellSampleGeneric property)
image_edges() (in module pythologist_image_utilities)
interaction_map() (pythologist_reader.CellFrameGeneric method)
is_uniform() (pythologist.CellDataFrame method)
K
key() (pythologist_reader.CellProjectGeneric property)
(pythologist_reader.CellSampleGeneric property)
M
make_binary_image_array() (in module pythologist_image_utilities)
map_image_ids() (in module pythologist_image_utilities)
median_id_coordinates() (in module pythologist_image_utilities)
merge_scores() (pythologist.CellDataFrame method)
microns_per_pixel() (pythologist.CellDataFrame property)
(pythologist_reader.CellProjectGeneric property)
N
NearestNeighbors (class in pythologist.measurements.spatial.nearestneighbors)
nearestneighbors() (pythologist.CellDataFrame method)
P
permute_phenotype_labels() (pythologist.CellDataFrame method)
phenotype_calls() (pythologist_reader.CellFrameGeneric method)
phenotypes() (pythologist.CellDataFrame property)
phenotypes_to_regions() (pythologist.CellDataFrame method)
phenotypes_to_scored() (pythologist.CellDataFrame method)
processed_image() (pythologist_reader.CellFrameGeneric property)
processed_image_id() (pythologist_reader.CellFrameGeneric property)
project_columns() (pythologist.CellDataFrame property)
project_name() (pythologist_reader.CellProjectGeneric property)
prune_neighbors() (pythologist.CellDataFrame method)
pythologist_image_utilities (module)
Q
qc() (pythologist.CellDataFrame method)
(pythologist_reader.CellProjectGeneric method)
(pythologist_reader.formats.inform.sets.CellProjectInForm method)
R
read_hdf() (pythologist.CellDataFrame class method)
read_path() (pythologist_reader.formats.inform.custom.CellProjectInFormCustomMask method)
(pythologist_reader.formats.inform.custom.CellProjectInFormLineArea method)
(pythologist_reader.formats.inform.immunoprofile.CellSampleInFormImmunoProfile method)
(pythologist_reader.formats.inform.sets.CellProjectInForm method)
read_tiff_stack() (in module pythologist_image_utilities)
regions() (pythologist.CellDataFrame property)
regions_to_scored() (pythologist.CellDataFrame method)
rename_phenotype() (pythologist.CellDataFrame method)
rename_region() (pythologist.CellDataFrame method)
rename_scored_calls() (pythologist.CellDataFrame method)
S
sample_columns() (pythologist.CellDataFrame property)
sample_ids() (pythologist_reader.CellProjectGeneric property)
sample_iter() (pythologist_reader.CellProjectGeneric method)
scored_names() (pythologist.CellDataFrame property)
scored_to_phenotype() (pythologist.CellDataFrame method)
segmentation_images() (pythologist.CellDataFrame method)
segmentation_info() (pythologist_reader.CellFrameGeneric method)
SegmentationImageOutput (class in pythologist.interface)
SegmentationImages (class in pythologist.interface)
serialize() (pythologist.CellDataFrame method)
set_data() (pythologist_reader.CellFrameGeneric method)
set_id() (pythologist_reader.CellProjectGeneric method)
set_interaction_map() (pythologist_reader.CellFrameGeneric method)
set_processed_image_id() (pythologist_reader.CellFrameGeneric method)
set_regions() (pythologist_reader.CellFrameGeneric method)
shape() (pythologist_reader.CellFrameGeneric property)
subset() (pythologist.CellDataFrame method)
T
table_names() (pythologist_reader.CellFrameGeneric property)
threshold() (pythologist.CellDataFrame method)
threshold_on_mutually_exclusive_ordinal_labels() (pythologist.CellDataFrame method)
to_hdf() (pythologist.CellDataFrame method)
W
watershed_image() (in module pythologist_image_utilities)
write_to_path() (pythologist.interface.SegmentationImageOutput method)
Z
zero_fill_missing_phenotypes() (pythologist.CellDataFrame method)
zero_fill_missing_scores() (pythologist.CellDataFrame method)


The following users are administators of this dataset and can give you access:
{% for ar in accessrights %}
{% if ar.ar_is_admin %}
{{ar.ar_email}};
{% endif %}
{% endfor %}
Data users
In addition, the following users have access to this data and may be able to help you with queries:
{% for ar in accessrights %}
{% if not ar.ar_is_admin %}
{{ar.ar_email}};
{% endif %}
{% endfor %}