// Base Model
// ---------------
'use strict';
const _ = require('lodash');
const inherits = require('util').inherits;
const Events = require('./events');
const constants = require('../constants');
// List of attributes attached directly from the `options` passed to the constructor.
const modelProps = ['tableName', 'hasTimestamps'];
/**
* @class
* @classdesc
* @extends Events
* @inheritdoc
* @description
*
* The "ModelBase" is similar to the 'Active Model' in Rails, it defines a
* standard interface from which other objects may inherit.
*/
function ModelBase(attributes, options) {
let attrs = attributes || {};
options = options || {};
this.attributes = Object.create(null);
this._previousAttributes = {};
this._reset();
this.relations = {};
this.cid = _.uniqueId('c');
if (options) {
_.extend(this, _.pick(options, modelProps));
if (options.parse) attrs = this.parse(attrs, options) || {};
}
this.set(attrs, options);
this.initialize.apply(this, arguments);
}
/**
* Registers an event listener.
*
* @method ModelBase#on
* @example
* customer.on('fetching', function(model) {
* // Do something before the data is fetched from the database
* })
* @see Events#on
*/
/**
* @method ModelBase#off
* @example
*
* customer.off('fetched fetching');
* ship.off(); // This will remove all event listeners
*
* @see Events#off
*/
/**
* @method ModelBase#trigger
* @example
*
* ship.trigger('fetched');
*
* @see Events#trigger
*/
inherits(ModelBase, Events);
/**
* @method ModelBase#initialize
* @description
*
* Called by the {@link Model Model constructor} when creating a new instance.
* Override this function to add custom initialization, such as event listeners.
* Because plugins may override this method in subclasses, make sure to call
* your super (extended) class. e.g.
*
* initialize: function() {
* this.constructor.__super__.initialize.apply(this, arguments);
* // Your initialization code ...
* }
*
* @see Model
*
* @param {Object} attributes
* Initial values for this model's attributes.
* @param {Object=} options
* The hash of options passed to {@link Model constructor}.
*/
ModelBase.prototype.initialize = function() {};
/**
* @name ModelBase#tableName
* @member {string}
* @description
*
* A required property for any database usage, The
* {@linkcode Model#tableName tableName} property refers to the database
* table name the model will query against.
*
* @example
*
* var Television = bookshelf.Model.extend({
* tableName: 'televisions'
* });
*/
/**
* @member {string}
* @default "id"
* @description
*
* This tells the model which attribute to expect as the unique identifier
* for each database row (typically an auto-incrementing primary key named
* `'id'`). Note that if you are using {@link Model#parse parse} and {@link
* Model#format format} (to have your model's attributes in `camelCase`,
* but your database's columns in `snake_case`, for example) this refers to
* the name returned by parse (`myId`), not the actual database column
* (`my_id`).
*
* You can also get the parsed id attribute value by using the model's
* {@link Model#parsedIdAttribute parsedIdAttribute} method.
*
* If the table you're working with does not have a Primary-Key in the form
* of a single column you'll have to override it with a getter that returns
* `null`. Overriding with `undefined` does not cascade the default behavior of
* the value `'id'`. Such a getter in ES6 would look like
* `get idAttribute() { return null }`.
*/
ModelBase.prototype.idAttribute = 'id';
/**
* @member {Object|Null}
* @default null
* @description
*
* This can be used to define any default values for attributes that are not
* present when creating or updating a model in a {@link Model#save save} call.
* The default behavior is to *not* use these default values on updates unless
* the `defaults: true` option is passed to the {@link Model#save save} call.
* For inserts the default values will always be used if present.
*
* @example
*
* var MyModel = bookshelf.Model.extend({
* defaults: {property1: 'foo', property2: 'bar'},
* tableName: 'my_table'
* })
*
* MyModel.forge({property1: 'blah'}).save().then(function(model) {
* // {property1: 'blah', property2: 'bar'}
* })
*/
ModelBase.prototype.defaults = null;
/**
* @member {Boolean|Array}
* @default false
* @description
*
* Automatically sets the current date and time on the timestamp attributes
* `created_at` and `updated_at` based on the type of save method. The *update*
* method will only update `updated_at`, while the *insert* method will set
* both values.
*
* To override the default attribute names, assign an array to this property.
* The first element will be the *created* column name and the second will be
* the *updated* one. If any of these elements is set to `null` that particular
* timestamp attribute will not be used in the model. For example, to
* automatically update only the `created_at` attribute set this property to
* `['created_at', null]`.
*
* You can override the timestamp attribute values of a model and those values
* will be used instead of the automatic ones when saving.
*
* @example
*
* var MyModel = bookshelf.Model.extend({
* hasTimestamps: true,
* tableName: 'my_table'
* })
*
* var myModel = MyModel.forge({name: 'blah'}).save().then(function(savedModel) {
* // {
* // name: 'blah',
* // created_at: 'Sun Mar 25 2018 15:07:11 GMT+0100 (WEST)',
* // updated_at: 'Sun Mar 25 2018 15:07:11 GMT+0100 (WEST)'
* // }
* })
*
* myModel.save({created_at: new Date(2015, 5, 2)}).then(function(updatedModel) {
* // {
* // name: 'blah',
* // created_at: 'Tue Jun 02 2015 00:00:00 GMT+0100 (WEST)',
* // updated_at: 'Sun Mar 25 2018 15:07:11 GMT+0100 (WEST)'
* // }
* })
*/
ModelBase.prototype.hasTimestamps = false;
/**
* @method
* @private
* @description
*
* Converts the timestamp keys to actual Date objects. This will not run if the
* model doesn't have {@link Model#hasTimestamps hasTimestamps} set to either
* `true` or an array of key names.
* This method is run internally when reading data from the database to ensure
* data consistency between the several database implementations.
* It returns the model instance that called it, so it allows chaining of other
* model methods.
*
* @returns {Model} The model that called this.
*/
ModelBase.prototype.formatTimestamps = function formatTimestamps() {
if (!this.hasTimestamps) return this;
this.getTimestampKeys().forEach((key) => {
if (this.get(key)) this.set(key, new Date(this.get(key)));
});
return this;
};
/**
* @method
* @description Get the current value of an attribute from the model.
* @example note.get("title");
*
* @param {string} attribute - The name of the attribute to retrieve.
* @returns {mixed} Attribute value.
*/
ModelBase.prototype.get = function(attr) {
return this.attributes[attr];
};
/**
* @method
* @private
* @description
*
* Returns the model's {@link Model#idAttribute idAttribute} after applying the
* model's {@link Model#parse parse} method to it. Doesn't mutate the original
* value of {@link Model#idAttribute idAttribute} in any way.
*
* @example
*
* var Customer = bookshelf.Model.extend({
* idAttribute: 'id',
* parse: function(attrs) {
* return _.mapKeys(attrs, function(value, key) {
* return 'parsed_' + key;
* });
* }
* });
*
* customer.parsedIdAttribute() // 'parsed_id'
*
* @returns {mixed} Whatever value the parse method returns.
*/
ModelBase.prototype.parsedIdAttribute = function() {
var parsedAttributes = this.parse({[this.idAttribute]: null});
return parsedAttributes && Object.keys(parsedAttributes)[0];
};
/**
* @method
* @description Set a hash of attributes (one or many) on the model.
* @example
*
* customer.set({first_name: "Joe", last_name: "Customer"});
* customer.set("telephone", "555-555-1212");
*
* @param {string|Object} attribute Attribute name, or hash of attribute names and values.
* @param {mixed=} value If a string was provided for `attribute`, the value to be set.
* @param {Object=} options
* @param {Object} [options.unset=false] Remove attributes from the model instead of setting them.
* @returns {Model} This model.
*/
ModelBase.prototype.set = function(key, val, options) {
if (key == null) return this;
let attrs;
// Handle both `"key", value` and `{key: value}` -style arguments.
if (typeof key === 'object') {
attrs = key;
options = val;
} else {
(attrs = {})[key] = val;
}
options = _.clone(options) || {};
// Extract attributes and options.
const unset = options.unset;
const current = this.attributes;
const prev = this.previousAttributes();
// Check for changes of `id`.
if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];
else if (this.parsedIdAttribute() in attrs) this.id = attrs[this.parsedIdAttribute()];
// For each `set` attribute, update or delete the current value.
for (const attr in attrs) {
val = attrs[attr];
if (!_.isEqual(prev[attr], val)) {
this.changed[attr] = val;
} else {
delete this.changed[attr];
}
if (unset) {
delete current[attr];
} else {
current[attr] = val;
}
}
return this;
};
/**
* @method
* @description
*
* Checks for the existence of an id to determine whether the model is
* considered "new".
*
* @example
*
* var modelA = new bookshelf.Model();
* modelA.isNew(); // true
*
* var modelB = new bookshelf.Model({id: 1});
* modelB.isNew(); // false
*/
ModelBase.prototype.isNew = function() {
return this.id == null;
};
/**
* @method
* @description
*
* Return a copy of the model's {@link Model#attributes attributes} for JSON
* stringification. If the {@link Model model} has any relations defined, this
* will also call {@link Model#toJSON toJSON} on each of the related
* objects, and include them on the object unless `{shallow: true}` is
* passed as an option.
*
* `serialize` is called internally by {@link Model#toJSON toJSON}. Override
* this function if you want to customize its output.
*
* @example
* var artist = new bookshelf.Model({
* firstName: "Wassily",
* lastName: "Kandinsky"
* });
*
* artist.set({birthday: "December 16, 1866"});
*
* console.log(JSON.stringify(artist));
* // {firstName: "Wassily", lastName: "Kandinsky", birthday: "December 16, 1866"}
*
* @param {Object=} options
* @param {Boolean} [options.shallow=false] Exclude relations.
* @param {Boolean} [options.omitPivot=false] Exclude pivot values.
* @returns {Object} Serialized model as a plain object.
*/
ModelBase.prototype.serialize = function(options) {
if (!options) options = {};
if (options.omitNew && this.isNew()) {
return null;
}
if (!options.shallow) {
let relations = _.mapValues(this.relations, (relation) => (relation.toJSON ? relation.toJSON(options) : relation));
// Omit null relations from the omitNew option
relations = _.omitBy(relations, _.isNull);
const pivot = this.pivot && !options.omitPivot && this.pivot.attributes;
const pivotAttributes = _.mapKeys(pivot, (value, key) => `${constants.PIVOT_PREFIX}${key}`);
return Object.assign({}, this.attributes, relations, pivotAttributes);
}
return Object.assign({}, this.attributes);
};
/**
* @method
* @description
*
* Called automatically by {@link
* https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior
* `JSON.stringify`}. To customize serialization, override {@link
* Model#serialize serialize}.
*
* @param {Object=} options Options passed to {@link Model#serialize}.
*/
ModelBase.prototype.toJSON = function(options) {
return this.serialize(options);
};
/**
* @method
* @private
* @returns String representation of the object.
*/
ModelBase.prototype.toString = function() {
return '[Object Model]';
};
/**
* @method
* @description Get the HTML-escaped value of an attribute.
* @param {string} attribute The attribute to escape.
* @returns {string} HTML-escaped value of an attribute.
*/
ModelBase.prototype.escape = function(key) {
return _.escape(this.get(key));
};
/**
* @method
* @description
* Returns `true` if the attribute contains a value that is not null or undefined.
* @param {string} attribute The attribute to check.
* @returns {Boolean} True if `attribute` is set, otherwise `false`.
*/
ModelBase.prototype.has = function(attr) {
return this.get(attr) != null;
};
/**
* @method
* @description
*
* The `parse` method is called whenever a {@link Model model}'s data is
* returned in a {@link Model#fetch fetch} call. The function is passed the raw
* database response object, and should return the {@link Model#attributes
* attributes} hash to be {@link Model#set set} on the model. The default
* implementation is a no-op, simply passing through the JSON response.
* Override this if you need to format the database responses - for example
* calling {@link
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
* JSON.parse} on a text field containing JSON, or explicitly typecasting a
* boolean in a sqlite3 database response.
*
* If you need to format your data before it is saved to the database, override
* the {@link Model#format format} method in your models. That method does the
* opposite operation of `parse`.
*
* @example
* // Example of a parser to convert snake_case to camelCase, using lodash
* // This is just an example. You can use the built-in case-converter plugin
* // to achieve the same functionality.
* model.parse = function(attrs) {
* return _.mapKeys(attrs, function(value, key) {
* return _.camelCase(key);
* });
* };
*
* @param {Object} attributes Hash of attributes to parse.
* @returns {Object} Parsed attributes.
*/
ModelBase.prototype.parse = _.identity;
/**
* @method
* @description
*
* Remove an attribute from the model. `unset` is a noop if the attribute
* doesn't exist.
*
* Note that unsetting an attribute from the model will not affect the related
* record's column value when saving the model. In order to clear the value of a
* column in the database record, set the attribute value to `null` instead:
* `model.set("column_name", null)`.
*
* @param attribute Attribute to unset.
* @returns {Model} This model.
*/
ModelBase.prototype.unset = function(attr, options) {
return this.set(attr, void 0, _.extend({}, options, {unset: true}));
};
/**
* @method
* @description Clear all attributes on the model.
* @returns {Model} This model.
*/
ModelBase.prototype.clear = function(options) {
const undefinedKeys = _.mapValues(this.attributes, () => undefined);
return this.set(undefinedKeys, Object.assign({}, options, {unset: true}));
};
/**
* @method
* @description
*
* The `format` method is used to modify the current state of the model before
* it is persisted to the database. The `attributes` passed are a shallow clone
* of the {@link Model model}, and are only used for inserting/updating - the
* current values of the model are left intact.
*
* Do note that `format` is used to modify the state of the model when
* accessing the database, so if you remove an attribute in your `format`
* method, that attribute will never be persisted to the database, but it will
* also never be used when doing a `fetch()`, which may cause unexpected
* results. You should be very cautious with implementations of this method
* that may remove the primary key from the list of attributes.
*
* If you need to modify the database data before it is given to the model,
* override the {@link Model#parse parse} method instead. That method does the
* opposite operation of `format`.
*
* @param {Object} attributes The attributes to be converted.
* @returns {Object} Formatted attributes.
*/
ModelBase.prototype.format = _.identity;
/**
* This method returns a specified relation loaded on the relations hash on the model, or calls the associated relation
* method and adds it to the relations hash if one exists and has not yet been loaded.
*
* @example
* new Photo({id: 1}).fetch({
* withRelated: ['account']
* }).then(function(photo) {
* var account = photo.related('account') // Get the eagerly loaded account
*
* if (account.id) {
* // Fetch a relation that has not been eager loaded yet
* return account.related('trips').fetch()
* }
* })
*
* @param {string} name The name of the relation to retrieve.
* @returns {Model|Collection|undefined}
* The specified relation as defined by a method on the model, or `undefined` if it does not exist.
*/
ModelBase.prototype.related = function(name) {
return this.relations[name] || (this[name] ? (this.relations[name] = this[name]()) : void 0);
};
/**
* @method
* @description
* Returns a new instance of the model with identical {@link
* Model#attributes attributes}, including any relations from the cloned
* model.
*
* @returns {Model} Cloned instance of this model.
*/
ModelBase.prototype.clone = function() {
const model = new this.constructor(this.attributes);
Object.assign(model.relations, _.mapValues(this.relations, (r) => r.clone()));
model._previousAttributes = _.clone(this._previousAttributes);
model.changed = _.clone(this.changed);
return model;
};
/**
* @method
* @private
* @description
*
* Returns the method that will be used on save, either 'update' or 'insert'.
* This is an internal helper that uses `isNew` and `options.method` to
* determine the correct method. If `option.method` is provided, it will be
* returned, but lowercased for later comparison.
*
* @returns {string} Either `'insert'` or `'update'`.
*/
ModelBase.prototype.saveMethod = function(options) {
if (!options) options = {};
if (options.patch) {
if (options.method === 'insert')
throw new TypeError(`Cannot accept incompatible options: method=insert, patch=${options.patch}`);
options.method = 'update';
}
return ((options.patch && 'update') || options.method) == null
? this.isNew()
? 'insert'
: 'update'
: options.method.toLowerCase();
};
/**
* @method
* @private
* @description
*
* Returns the automatic timestamp key names set on this model. Note that this
* will always return a value even if the model has {@link Model#hasTimestamps
* hasTimestamps} set to `false`. In this case and when set to `true` the
* return value will be the default names of `created_at` and `updated_at`.
*
* @returns {Array<string>} The two timestamp key names.
*/
ModelBase.prototype.getTimestampKeys = function() {
return Array.isArray(this.hasTimestamps) ? this.hasTimestamps : constants.DEFAULT_TIMESTAMP_KEYS;
};
/**
* @method
* @description
* Automatically sets the timestamp attributes on the model, if
* {@link Model#hasTimestamps hasTimestamps} is set to `true` or an array. It
* checks if the model is new and sets the `created_at` and `updated_at`
* attributes (or any other custom attribute names you have set) to the current
* date. If the model is not new and is just being updated then only the
* `updated_at` attribute gets automatically updated.
*
* If the model contains any user defined `created_at` or `updated_at` values,
* there won't be any automatic updated of these attributes and the user
* supplied values will be used instead.
*
* @param {Object=} options
* @param {string} [options.method]
* Either `'insert'` or `'update'` to specify what kind of save the attribute
* update is for.
* @param {string} [options.date]
* Either a Date object or ms since the epoch. Specify what date is used for
* updateing the timestamps, i.e. if something other than `new Date()` should be used.
* @returns {Object} A hash of timestamp attributes that were set.
*/
ModelBase.prototype.timestamp = function(options) {
if (!this.hasTimestamps) return {};
const now = (options || {}).date ? new Date(options.date) : new Date();
const attributes = {};
const method = this.saveMethod(options);
const timestampKeys = this.getTimestampKeys();
const createdAtKey = timestampKeys[0];
const updatedAtKey = timestampKeys[1];
const isNewModel = method === 'insert';
if (updatedAtKey && (isNewModel || this.hasChanged()) && !this.hasChanged(updatedAtKey)) {
attributes[updatedAtKey] = now;
}
if (createdAtKey && isNewModel && !this.hasChanged(createdAtKey)) {
attributes[createdAtKey] = now;
}
this.set(attributes, _.extend(options, {silent: true}));
return attributes;
};
/**
* @method
* @description
*
* Returns `true` if any {@link Model#attributes attribute} has changed since
* the last {@link Model#fetch fetch} or {@link Model#save save}. If an
* attribute name is passed as argument, returns `true` only if that specific
* attribute has changed.
*
* Note that even if an attribute is changed by using the {@link Model#set set}
* method, but the new value is exactly the same as the existing one, the
* attribute is not considered *changed*.
*
* @example
* Author.forge({id: 1}).fetch().then(function(author) {
* author.hasChanged() // false
* author.set('name', 'Bob')
* author.hasChanged('name') // true
* })
*
* @param {string=} attribute A specific attribute to check for changes.
* @returns {Boolean}
* `true` if any attribute has changed, `false` otherwise. Alternatively, if
* the `attribute` argument was specified, checks if that particular
* attribute has changed.
*/
ModelBase.prototype.hasChanged = function(attr) {
if (attr == null) return !_.isEmpty(this.changed);
return _.has(this.changed, attr);
};
/**
* @method
* @description
*
* Returns the value of an attribute like it was before the last change. A
* change is usually done with the {@link Model#set set} method, but it can
* also be done with the {@link Model#save save} method. This is useful for
* getting back the original attribute value after it's been changed. It can
* also be used to get the original value after a model has been saved to the
* database or destroyed.
*
* In case you want to get the previous value of all attributes at once you
* should use the {@link Model#previousAttributes previousAttributes} method.
*
* Note that this will return `undefined` if the model hasn't been fetched,
* saved, destroyed or eager loaded. However, in case one of these operations
* did take place, it will return the current value if an attribute hasn't
* changed. If you want to check if an attribute has changed see the
* {@link Model#hasChanged hasChanged} method.
*
* @example
* Author.forge({id: 1}).fetch().then(function(author) {
* author.get('name') // Alice
* author.set('name', 'Bob')
* author.previous('name') // 'Alice'
* })
*
* @param {string} attribute The attribute to check.
* @returns {mixed} The previous value.
*/
ModelBase.prototype.previous = function(attribute) {
return this._previousAttributes[attribute];
};
/**
* @method
* @description
*
* Returns a copy of the {@link Model model}'s attributes like they were before
* the last change. A change is usually done with the {@link Model#set set}
* method, but it can also be done with the {@link Model#save save} method.
* This is mostly useful for getting a diff of the model's attributes after
* changing some of them. It can also be used to get the previous state of a
* model after it has been saved to the database or destroyed.
*
* In case you want to get the previous value of a single attribute you should
* use the {@link Model#previous previous} method.
*
* Note that this will return an empty object if no changes have been made to
* the model and it hasn't been fetched, saved or eager loaded.
*
* @example
* Author.forge({id: 1}).fetch().then(function(author) {
* author.get('name') // Alice
* author.set('name', 'Bob')
* author.previousAttributes() // {id: 1, name: 'Alice'}
* })
*
* Author.forge({id: 1}).fetch().then(function(author) {
* author.get('name') // Alice
* return author.save({name: 'Bob'})
* }).then(function(author) {
* author.get('name') // Bob
* author.previousAttributes() // {id: 1, name: 'Alice'}
* })
*
* @returns {Object}
* The attributes as they were before the last change, or an empty object in
* case the model data hasn't been fetched yet.
*/
ModelBase.prototype.previousAttributes = function() {
return _.clone(this._previousAttributes) || {};
};
/**
* @method
* @private
* @description
*
* Resets the `changed` hash for the model. Typically called after a `sync`
* action (save, fetch, destroy).
*
* @returns {Model} This model.
*/
ModelBase.prototype._reset = function() {
this.changed = Object.create(null);
return this;
};
/**
* @method ModelBase#keys
* @see http://lodash.com/docs/#keys
*/
/**
* @method ModelBase#values
* @see http://lodash.com/docs/#values
*/
/**
* @method ModelBase#toPairs
* @see http://lodash.com/docs/#toPairs
*/
/**
* @method ModelBase#invert
* @see http://lodash.com/docs/#invert
*/
/**
* @method ModelBase#pick
* @see http://lodash.com/docs/#pick
*/
/**
* @method ModelBase#omit
* @see http://lodash.com/docs/#omit
*/
// "_" methods that we want to implement on the Model.
const modelMethods = ['keys', 'values', 'toPairs', 'invert', 'pick', 'omit'];
// Mix in each "_" method as a proxy to `Model#attributes`.
_.each(modelMethods, function(method) {
ModelBase.prototype[method] = function() {
return _[method].apply(_, [this.attributes].concat(Array.from(arguments)));
};
});
/**
* This static method allows you to create your own Model classes by extending {@link Model bookshelf.Model}.
*
* It correctly sets up the prototype chain, which means that subclasses created this way can be further extended and
* subclassed as far as you need.
*
* @example
* const Promise = require('bluebird')
* const compare = require('some-crypt-library')
*
* const Customer = bookshelf.Model.extend({
* initialize() {
* this.constructor.__super__.initialize.apply(this, arguments)
*
* // Setting up a listener for the 'saving' event
* this.on('saving', this.validateSave)
* },
*
* validateSave() {
* return doValidation(this.attributes)
* },
*
* account() {
* // Defining a relation with the Account model
* return this.belongsTo(Account)
* }
* }, {
* login: Promise.method(function(email, password) {
* if (!email || !password)
* throw new Error('Email and password are both required')
*
* return new this({email: email.toLowerCase()})
* .fetch({require: true})
* .tap(function(customer) {
* if (!compare(password, customer.get('password'))
* throw new Error('Invalid password')
* })
* })
* })
*
* @method Model.extend
* @param {Object} [prototypeProperties] Instance methods and properties to be attached to instances of the new class.
* @param {Object} [classProperties]
* Class (i.e. static) functions and properties to be attached to the constructor of the new class.
* @returns {Function} Constructor for new Model subclass.
*/
ModelBase.extend = require('../extend');
module.exports = ModelBase;


Jason Yeo's Website
Welcome to my WEBSITEUse the quick navigation menu or scroll down for relevant information
Choose your subjects
(If Teacher)
IB History of the Americas
IB Math Studies SL
IT Academy
Other
Choose your services required
(If here for services)
Photoshop Basics (small stuff only)
Photoshop Advanced (anything is possible)
Video Editing (nothing over 30 minutes long
Logo Design (professional requests only)


{% extends "index.html" %} {% block welcome %}
You need to be signed-in in order to use most of the available applications. Public access to apps is currently not supported.
However, you can still use the DELPH-IN's Grammarium Demo to inspect the output of some of DELPH-IN's grammars.
Meanwhile, you can learn more about other applications below.
{% if 'lcc' in MODE %}
{% endif %} {% if 'ixue' in MODE %} {% endif %} {% if 'callig' in MODE %} {% endif %}


No MQTT server is configured.
To see a demonstration, an MQTT demo server can be set on configuration page, which can be accessed by clicking the connection symbol (
) in the upper right corner.
On that page just click '
Set test server' to set the required parameters and afterwards '
Connect to server'. A successfull connection is indicated in the upper right corner (
).
Page definitions can also be configured on that page. For an example just click '
Set example page definition'.
For additional information head over the
mycuttie project page.


{{ define "main" }}
Room Type:
From date:
To date:
Days of Week: Select All
Allotment to Goomo (25%)
Total Rooms
Low alert on
MLOS:
Cut off Period:


SceneJS - Resolution scaling with depth-of-field posteffect
Scale the resolution to draw at higher or lower resolutions than that of the canvas.
On platforms that don't support anti-aliasing, scaling > 1 can be used to implement
SSAA.
(Anti-aliasing has been disabled in this scene as a demonstration).
Current scaling factor:
1


Item 8.11.1.d.
The student activist group uses their data to make a claim that there is a racial bias in suspensions in an editorial in the school newspaper. To support their claim, the group states that there are fewer Black/African-American students and a similar suspension rate. Do you agree with their claim and support?in-context


Section 1
Section 2
Section 3
header
Card title
So if on advanced addition absolute received replying throwing he. Delighted consisted newspaper of unfeeling as neglected so. Tell size come hard mrs and four fond are. Of in commanded earnestly resources it. At quitting in strictly up wandered of relation answered felicity. Side need at in what dear ever upon if. Same down want joy neat ask pain help she. Alone three stuff use law walls fat asked. Near do that he help.
1250 Bellflower LongBeach, California 90840


baseMPI.ox
and shows how to run it on a particular cluster. The details of running programs will different across clusters. This is the DIYversion because it uses the low-level routines that interface between Ox and the MPI library. The objects in CFMPI make it possible to avoid some of this programming or to avoid it entirely.
#include
is used not #import
. The reason is that the MPI interface routines have to be compiled on your machine and unlike the rest of niqlow the Ox code cannot be distributed as compiled .oxo
files#include "UseMPI.ox";
. The conditional compilation around it is really just a trick to keep the OxDoc program from trying to create documentation for that file. (OX_Parallel
is defined for versions of Ox required by niqlow, so this always happens in Ox but OxDoc does not know about this macro so it skips the file.server()
and client()
routines are separate, but in a serial environment they may have to act as if they are passing messages back and fort. The global variables (defined outside curly brackets) are used as share space for main()
and the other routines. In the object-oriented solutions in CFMPI this would not be required. The classes for client and server tasks refer to inherited data members that will get set properly on all nodes.main(){…}
MPI_Init()
in order to find out which node
I am and how many other nodes there are. Next, if I the client node, start the client task. Otherwise, become a server.client(){…}
server(){…}
OxRunMainExitCall()
routine (described in the Developer's manual) to add a call to MPI_Finalize()
as Ox exits. This means that the user's code can simply exit and no MPI error will be thrown.oxl baseMPI
MPI_Init()
, MPI_Recv()
and MPI_Send()
I=0
and Nodes=1
(serial environment). Then the others will act as if a message was past when really nothing happens. But by referencing the same location as the buffer
the "message" is sitting there.CFMPI.c
to a shared object file and ensure both that and the MPI library are on the LD_LIBRARY_PATH
.
oxl -DMPI baseMPIFor this to work the program (
oxl
) must be run within the MPI environment. How that is done depends on the cluster, but usually there is a command or script which will execute your job with MPI.MPITest.out
, send the job to the MPI execution queue (not serial or other options), ask for 5 processors. THe job is then simply to run the program and define MPI
so that niqlow will
try to link in the MPI interface routines. [ferrallc @saw-login2 examples]$ ./sharc_test_MPI WARNING: no memory requirement defined; assuming 1GB per process. WARNING: your timelimit (0.3m) is only 18 seconds; is this right? submitted as jobid 4169545
Ox Console version 7.00 (Linux_64) (C) J.A. Doornik, 1994-2013 This version may be used for academic research and teaching only Ox Console version 7.00 (Linux_64) (C) J.A. Doornik, 1994-2013 This version may be used for academic research and teaching only Ox Console version 7.00 (Linux_64) (C) J.A. Doornik, 1994-2013 This version may be used for academic research and teaching only Ox Console version 7.00 (Linux_64) (C) J.A. Doornik, 1994-2013 This version may be used for academic research and teaching only Ox Console version 7.00 (Linux_64) (C) J.A. Doornik, 1994-2013 This version may be used for academic research and teaching only Server 4 received 0.22489 1.7400 -0.20426 -0.91760 -0.67417 -0.34353 0.22335 -0.14139 -0.18338 0.68035 Node 4 is done Server 1 received 1.2282 1.5784 -0.39334 0.45016 1.2814 -0.36170 1.0653 -1.9544 -0.10203 -0.21674 Node 1 is done Server 2 received 2.0016 0.57912 -0.70797 0.59336 -0.58939 1.4674 -0.020230 0.73706 1.4795 -0.26881 Node 2 is done Server 3 received 0.090558 -0.83328 0.81350 1.1174 0.31499 -0.50031 -1.6268 0.61943 -1.4574 -1.8035 Node 3 is done Server 0 received 0.40654 0.13833 0.65715 -0.16683 0.47835 0.46105 0.11538 0.038075 1.1944 -1.4600 Server 0 reports roots equal to -0.57083 1.3755 -0.57083 -1.3755 -1.0186 0.49171 -1.0186 -0.49171 0.19962 1.1266 0.19962 -1.1266 0.82948 0.74242 0.82948 -0.74242 0.78031 0.0000 Server 4 reports roots equal to -7.7927 0.0000 -0.87074 0.30347 -0.87074 -0.30347 -0.35572 0.86423 -0.35572 -0.86423 0.91222 0.12612 0.91222 -0.12612 0.34186 0.70678 0.34186 -0.70678 Server 2 reports roots equal to 0.91394 0.46905 0.91394 -0.46905 -1.2016 0.0000 0.27711 0.84810 0.27711 -0.84810 -0.41358 0.90114 -0.41358 -0.90114 -0.80983 0.0000 0.16712 0.0000 Server 3 reports roots equal to 7.8523 0.0000 1.9209 0.0000 1.4604 0.0000 -0.53961 1.0129 -0.53961 -1.0129 0.42852 0.83050 0.42852 -0.83050 -1.0863 0.0000 -0.72346 0.0000 Server 1 reports roots equal to -1.4156 0.42365 -1.4156 -0.42365 0.65216 0.81208 0.65216 -0.81208 0.84066 0.0000 -0.24734 0.86936 -0.24734 -0.86936 -0.052098 0.32521 -0.052098 -0.32521 Node 0 is done --- SharcNET Job Epilogue --- job id: 4169663 exit status: 0 elapsed time: 3s / 18s (16 %) virtual memory: 2.7M / 1.0G (0 %) Job completed successfully WARNING: Job only used 16 % of its requested walltime. WARNING: Job only used 0% of its requested memory.


If you want to hack your PS Vita 3.61 or above, please stay tuned. There is no publicly known way to hack your PS Vita 3.61 at this point.
It is unlikely a hack will be released for firmware 3.61 anytime soon (it took 5 years for the 3.60 hack to be released), the recommendation for now is to buy a PS Vita running firmware 3.60 or lower.1
1: Source: Wololo Vita CFW4Dummies


Flags
public struct Flags: OptionSet
Environment flags
-
Raw value
Declaration
Swift
public let rawValue: Int32
-
Initialise with LMDB
Declaration
Swift
public init(rawValue: Int32)
Parameters
rawValue
Status code received from LMDB
-
mmap at a fixed address (experimental)
Declaration
Swift
public static let fixedMap = Flags(rawValue: MDB_FIXEDMAP)
-
no environment directory
Declaration
Swift
public static let noSubDir = Flags(rawValue: MDB_NOSUBDIR)
-
don’t fsync after commit
Declaration
Swift
public static let noSync = Flags(rawValue: MDB_NOSYNC)
-
read only
Declaration
Swift
public static let readOnly = Flags(rawValue: MDB_RDONLY)
-
don’t fsync metapage after commit
Declaration
Swift
public static let noMetaSync = Flags(rawValue: MDB_NOMETASYNC)
-
use writable mmap
Declaration
Swift
public static let writeMap = Flags(rawValue: MDB_WRITEMAP)
-
use asynchronous msync when #MDB_WRITEMAP is used
Declaration
Swift
public static let mapAsync = Flags(rawValue: MDB_MAPASYNC)
-
tie reader locktable slots to #MDB_txn objects instead of to threads
Declaration
Swift
public static let noTLS = Flags(rawValue: MDB_NOTLS)
-
don’t do any locking, caller must manage their own locks
Declaration
Swift
public static let noLock = Flags(rawValue: MDB_NOLOCK)
-
don’t do readahead (no effect on Windows)
Declaration
Swift
public static let noReadahead = Flags(rawValue: MDB_NORDAHEAD)
-
don’t initialize malloc’d memory before writing to datafile
Declaration
Swift
public static let noMemoryInit = Flags(rawValue: MDB_NOMEMINIT)


Born in New York City on December 28, 1922, Stan Lee went on to work for the company that would eventually become Marvel Comics. With artist Jack Kirby, Lee launched the superhero team the Fantastic Four in 1961, and was soon responsible for creating popular characters like Spider-Man, the X-Men, the Hulk and Thor. Lee later worked in a number of comic-related business and multimedia ventures.
In March 1999, Musk co-founded X.com, an online financial services and e-mail payment company, with US$10 million from the sale of Zip2.
Stanley Martin Lieber was born on December 28, 1922, in New York City to Romanian immigrants Celia and Jack Lieber. With part of his childhood spent during the Great Depression, Lieber and his younger brother, Larry, watched his parents struggle to make ends meet for the family.
Lieber, who later shortened his name to "Lee" as a writer, went on to be hired as an office assistant at Timely Comics in 1939 and became an interim editor for the company in the early 1940s. Lee also served domestically in the Army during World War II, working as a writer and illustrator.
In the early '60s, Lee was called upon by his boss to create a series for Marvel Comics (Timely's new name) that could compete with rival DC Comics' hit title Justice League of America. Citing writing influences like Sir Arthur Conan Doyle and Jules Verne, and following the encouragement of his wife, Joan, Lee did away with some of the usual superhero conventions. Hence, with artist and co-creator Jack Kirby, the Fantastic Four was born in 1961.
Following the success of the Fantastic Four, a slew of new characters soon sprung from Lee and his Marvel cohorts, including the Hulk, Spider-Man, Doctor Strange, Daredevil and the X-Men.
Lee was particularly known for his dynamism with copy and for imbuing his characters with a sense of humanity, tackling real-world issues like bigotry and drug use, which would influence comics for decades. An outgoing, humorous showman, he also developed a number of slogans as part of his shtick, including a Latin-derived call to rise, "Excelsior!"
Marvel Comics became a highly popular franchise, and Stan Lee was promoted to editorial director and publisher in 1972. He later moved to the West Coast to be involved in Marvel's film ventures and eventually became chairman emeritus.
Lee has become involved in a variety of multimedia projects while also serving as an ambassador for Marvel, even though he has filed lawsuits against the company and been the subject of debate over appropriate compensation for comic creators. The writer has seen Marvel develop into an entity that has inspired blockbuster film entertainment like the Iron Man, X-Men, Thor and The Avengers franchises.
Lee started intellectual-property company POW! Entertainment in 2001 and the following year published his autobiography, Excelsior! The Amazing Life of Stan Lee. Later in the decade he received a Medal of Arts honor from President George W. Bush and launched the History Channel show Stan Lee's Superhumans, a series that looked at people with remarkable skills and abilities.
2012 saw more new ventures. Lee co-wrote a graphic novel, Romeo and Juliet: The War, which landed on The New York Times' best-seller list and launched a YouTube channel, Stan Lee's World of Heroes, which features comic, comedy and sci-fi content. At the end of the year, the ever-active Lee turned 90.
Lee endured the loss of his wife of nearly 70 years, Joan, in July 2017. He then gave fans a scare when he checked into a hospital for an irregular heartbeat and shortness of breath the following January. However, the comic book titan was discharged shortly afterward, and announced he was ready to resume a full schedule with the latest Marvel feature, Black Panther, soon to be released.
Although things seemed to be humming along nicely for Lee and the Marvel universe, an April 2018 feature in The Hollywood Reporter painted a far different story. According to the publication, Lee's daughter J.C. and other insiders were engaged in a battle over care of the 95-year-old and the future of his estate, the sides pitting Lee against one another and inducing him to dismiss formerly trusted associates. The piece also described J.C.'s tempestuous relationship with Lee, including an incident in which she physically assaulted both of her elderly parents.
"Lee died on November 12, 2018 in Los Angeles, California."


The opinions expressed here are my own and not those of my employer.
© {{ site.data.theme.name }}, {{ 'now' | date: "%Y" }}


|
OCILIB (C and C++ Driver for Oracle)
4.5.1
|
Object identifying the SQL data type DATE. More...
#include <ocilib.hpp>
Inherits ocilib::HandleHolder< OCI_Date *>, and ocilib::Streamable.
Public Member Functions | |
| Date (bool create=false) | |
| Create an empty null Date object. More... | |
| Date (const otext *str, const otext *format=OTEXT("")) | |
| Create a date object with the value provided by the input date time string. More... | |
| Date (const ostring &str, const ostring &format=OTEXT("")) | |
| Create a date object with the value provided by the input date time string. More... | |
| bool | IsValid () const |
| Check if the given date is valid. | |
| int | GetYear () const |
| Return the date year value. | |
| void | SetYear (int value) |
| Set the date year value. | |
| int | GetMonth () const |
| Return the date month value. | |
| void | SetMonth (int value) |
| Set the date month value. | |
| int | GetDay () const |
| Return the date day value. | |
| void | SetDay (int value) |
| Set the date day value. | |
| int | GetHours () const |
| Return the date hours value. | |
| void | SetHours (int value) |
| Set the date hours value. | |
| int | GetMinutes () const |
| Return the date minutes value. | |
| void | SetMinutes (int value) |
| Set the date minutes value. | |
| int | GetSeconds () const |
| Return the date seconds value. | |
| void | SetSeconds (int value) |
| Set the date seconds value. | |
| int | DaysBetween (const Date &other) const |
| Return the number of days with the given date. More... | |
| void | SetDate (int year, int month, int day) |
| Set the date part. More... | |
| void | SetTime (int hour, int min, int sec) |
| Set the time part. More... | |
| void | SetDateTime (int year, int month, int day, int hour, int min, int sec) |
| Set the date and time part. More... | |
| void | GetDate (int &year, int &month, int &day) const |
| Extract the date parts. More... | |
| void | GetTime (int &hour, int &min, int &sec) const |
| Extract time parts. More... | |
| void | GetDateTime (int &year, int &month, int &day, int &hour, int &min, int &sec) const |
| Extract the date and time parts. More... | |
| void | AddDays (int days) |
| Add or subtract days. More... | |
| void | AddMonths (int months) |
| Add or subtract months. More... | |
| Date | NextDay (const ostring &day) const |
| Return the date of next day of the week, after the current date object. More... | |
| Date | LastDay () const |
| Return the last day of month from the current date object. | |
| void | ChangeTimeZone (const ostring &tzSrc, const ostring &tzDst) |
| Convert the date from one zone to another zone. More... | |
| void | FromString (const ostring &str, const ostring &format=OTEXT("")) |
| Assign to the date object the value provided by the input date time string. More... | |
| ostring | ToString (const ostring &format) const |
| Convert the date value to a string using the given format. More... | |
| ostring | ToString () const override |
| Convert the date value to a string using default format OCI_STRING_FORMAT_DATE. More... | |
| Date | Clone () const |
| Clone the current instance to a new one performing deep copy. | |
| Date & | operator++ () |
| Increment the date by 1 day. | |
| Date | operator++ (int) |
| Increment the date by 1 day. | |
| Date & | operator-- () |
| Decrement the date by 1 day. | |
| Date | operator-- (int) |
| Decrement the date by 1 day. | |
| Date | operator+ (int value) const |
| Return a new date holding the current date value incremented by the given number of days. | |
| Date | operator- (int value) const |
| Return a new date holding the current date value decremented by the given number of days. | |
| Date & | operator+= (int value) |
| Increment the date by the given number of days. | |
| Date & | operator-= (int value) |
| Decrement the date by the given number of days. | |
| bool | operator== (const Date &other) const |
| Indicates if the current date value is equal to the given date value. | |
| bool | operator!= (const Date &other) const |
| Indicates if the current date value is not equal the given date value. | |
| bool | operator> (const Date &other) const |
| Indicates if the current date value is superior to the given date value. | |
| bool | operator< (const Date &other) const |
| Indicates if the current date value is inferior to the given date value. | |
| bool | operator>= (const Date &other) const |
| Indicates if the current date value is superior or equal to the given date value. | |
| bool | operator<= (const Date &other) const |
| Indicates if the current date value is inferior or equal to the given date value. | |
Static Public Member Functions | |
| static Date | SysDate () |
| Return the current system date time. | |
Object identifying the SQL data type DATE.
This class wraps the OCILIB object handle OCI_Date and its related methods
Definition at line 2735 of file ocilib.hpp.
|
inline |
Create an empty null Date object.
| create | - Indicates if a Oracle Date object must be must be created |
Definition at line 1965 of file ocilib_impl.hpp.
Referenced by Date().
|
inline |
Create a date object with the value provided by the input date time string.
| str | - String date time |
| format | - format of the date time provided in parameter 'data' |
Definition at line 1980 of file ocilib_impl.hpp.
References ocilib::Check(), Date(), OCI_DateCreate(), and OCI_DateFree().
Create a date object with the value provided by the input date time string.
| str | - String date time |
| format | - format of the date time provided in parameter 'data' |
Definition at line 1973 of file ocilib_impl.hpp.
|
inline |
Return the number of days with the given date.
| other | - date to compare |
Definition at line 2131 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateDaysBetween().
|
inline |
Set the date part.
| year | - Year value |
| month | - Month value |
| day | - Day value |
Definition at line 2136 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateSetDate().
|
inline |
Set the time part.
| hour | - Hour value |
| min | - Minute value |
| sec | - Second value |
Definition at line 2141 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateSetTime().
|
inline |
Set the date and time part.
| year | - Year value |
| month | - Month value |
| day | - Day value |
| hour | - Hour value |
| min | - Minute value |
| sec | - Second value |
Definition at line 2146 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateSetDateTime().
|
inline |
Extract the date parts.
| year | - Place holder for year value |
| month | - Place holder for month value |
| day | - Place holder for day value |
Definition at line 2151 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateGetDate().
|
inline |
Extract time parts.
| hour | - Place holder for hour value |
| min | - Place holder for minute value |
| sec | - Place holder for second value |
Definition at line 2156 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateGetTime().
|
inline |
Extract the date and time parts.
| year | - Place holder for year value |
| month | - Place holder for month value |
| day | - Place holder for day value |
| hour | - Place holder for hour value |
| min | - Place holder for minute value |
| sec | - Place holder for second value |
Definition at line 2161 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateGetDateTime().
|
inline |
Add or subtract days.
| days | - Number of days to add/remove |
Definition at line 2166 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateAddDays().
|
inline |
Add or subtract months.
| months | - Number of months to add/remove |
Definition at line 2171 of file ocilib_impl.hpp.
References OCI_DateAddMonths().
Return the date of next day of the week, after the current date object.
| day | - Day of the week |
Definition at line 2176 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateNextDay().
Convert the date from one zone to another zone.
| tzSrc | - Source zone |
| tzDst | - Destination zone |
Definition at line 2194 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DateZoneToZone().
Assign to the date object the value provided by the input date time string.
| str | - String date time |
| format | - format of the date time provided in parameter 'data' |
Definition at line 2199 of file ocilib_impl.hpp.
References ocilib::Check(), ocilib::FormatDate, ocilib::Environment::GetFormat(), and OCI_DateFromText().
Convert the date value to a string using the given format.
| format | - date time format to use |
Definition at line 2204 of file ocilib_impl.hpp.
References ocilib::Check(), ocilib::MakeString(), and OCI_DateToText().
|
inlineoverridevirtual |
Convert the date value to a string using default format OCI_STRING_FORMAT_DATE.
Implements ocilib::Streamable.
Definition at line 2220 of file ocilib_impl.hpp.
References ocilib::FormatDate, and ocilib::Environment::GetFormat().


cmake-server(7)¶
Contents
Deprecated since version 3.15: This will be removed from a future version of CMake.
Clients should use the cmake-file-api(7)
instead.
Introduction¶
cmake(1)
is capable of providing semantic information about
CMake code it executes to generate a buildsystem. If executed with
the -E server
command line options, it starts in a long running mode
and allows a client to request the available information via a JSON protocol.
The protocol is designed to be useful to IDEs, refactoring tools, and other tools which have a need to understand the buildsystem in entirety.
A single cmake-buildsystem(7)
may describe buildsystem contents
and build properties which differ based on
generation-time context
including:
- The Platform (eg, Windows, APPLE, Linux).
- The build configuration (eg, Debug, Release, Coverage).
- The Compiler (eg, MSVC, GCC, Clang) and compiler version.
- The language of the source files compiled.
- Available compile features (eg CXX variadic templates).
- CMake policies.
The protocol aims to provide information to tooling to satisfy several needs:
- Provide a complete and easily parsed source of all information relevant to the tooling as it relates to the source code. There should be no need for tooling to parse generated buildsystems to access include directories or compile definitions for example.
- Semantic information about the CMake buildsystem itself.
- Provide a stable interface for reading the information in the CMake cache.
- Information for determining when cmake needs to be re-run as a result of file changes.
Operation¶
Start cmake(1)
in the server command mode, supplying the path to
the build directory to process:
cmake -E server (--debug|--pipe=<NAMED_PIPE>)
The server will communicate using stdin/stdout (with the --debug
parameter)
or using a named pipe (with the --pipe=<NAMED_PIPE>
parameter). Note
that “named pipe” refers to a local domain socket on Unix and to a named pipe
on Windows.
When connecting to the server (via named pipe or by starting it in --debug
mode), the server will reply with a hello message:
[== "CMake Server" ==[
{"supportedProtocolVersions":[{"major":1,"minor":0}],"type":"hello"}
]== "CMake Server" ==]
Messages sent to and from the process are wrapped in magic strings:
[== "CMake Server" ==[
{
... some JSON message ...
}
]== "CMake Server" ==]
The server is now ready to accept further requests via the named pipe or stdin.
Debugging¶
CMake server mode can be asked to provide statistics on execution times, etc. or to dump a copy of the response into a file. This is done passing a “debug” JSON object as a child of the request.
The debug object supports the “showStats” key, which takes a boolean and makes the server mode return a “zzzDebug” object with stats as part of its response. “dumpToFile” takes a string value and will cause the cmake server to copy the response into the given filename.
This is a response from the cmake server with “showStats” set to true:
[== "CMake Server" ==[
{
"cookie":"",
"errorMessage":"Waiting for type \"handshake\".",
"inReplyTo":"unknown",
"type":"error",
"zzzDebug": {
"dumpFile":"/tmp/error.txt",
"jsonSerialization":0.011016,
"size":111,
"totalTime":0.025995
}
}
]== "CMake Server" ==]
The server has made a copy of this response into the file /tmp/error.txt and took 0.011 seconds to turn the JSON response into a string, and it took 0.025 seconds to process the request in total. The reply has a size of 111 bytes.
Protocol API¶
General Message Layout¶
All messages need to have a “type” value, which identifies the type of message that is passed back or forth. E.g. the initial message sent by the server is of type “hello”. Messages without a type will generate an response of type “error”.
All requests sent to the server may contain a “cookie” value. This value will he handed back unchanged in all responses triggered by the request.
All responses will contain a value “inReplyTo”, which may be empty in case of parse errors, but will contain the type of the request message in all other cases.
Type “reply”¶
This type is used by the server to reply to requests.
The message may – depending on the type of the original request – contain values.
Example:
[== "CMake Server" ==[
{"cookie":"zimtstern","inReplyTo":"handshake","type":"reply"}
]== "CMake Server" ==]
Type “error”¶
This type is used to return an error condition to the client. It will contain an “errorMessage”.
Example:
[== "CMake Server" ==[
{"cookie":"","errorMessage":"Protocol version not supported.","inReplyTo":"handshake","type":"error"}
]== "CMake Server" ==]
Type “progress”¶
When the server is busy for a long time, it is polite to send back replies of type “progress” to the client. These will contain a “progressMessage” with a string describing the action currently taking place as well as “progressMinimum”, “progressMaximum” and “progressCurrent” with integer values describing the range of progress.
Messages of type “progress” will be followed by more “progress” messages or with a message of type “reply” or “error” that complete the request.
“progress” messages may not be emitted after the “reply” or “error” message for the request that triggered the responses was delivered.
Type “message”¶
A message is triggered when the server processes a request and produces some form of output that should be displayed to the user. A Message has a “message” with the actual text to display as well as a “title” with a suggested dialog box title.
Example:
[== "CMake Server" ==[
{"cookie":"","message":"Something happened.","title":"Title Text","inReplyTo":"handshake","type":"message"}
]== "CMake Server" ==]
Type “signal”¶
The server can send signals when it detects changes in the system state. Signals are of type “signal”, have an empty “cookie” and “inReplyTo” field and always have a “name” set to show which signal was sent.
Specific Signals¶
The cmake server may sent signals with the following names:
“dirty” Signal¶
The “dirty” signal is sent whenever the server determines that the configuration of the project is no longer up-to-date. This happens when any of the files that have an influence on the build system is changed.
The “dirty” signal may look like this:
[== "CMake Server" ==[
{
"cookie":"",
"inReplyTo":"",
"name":"dirty",
"type":"signal"}
]== "CMake Server" ==]
“fileChange” Signal¶
The “fileChange” signal is sent whenever a watched file is changed. It contains the “path” that has changed and a list of “properties” with the kind of change that was detected. Possible changes are “change” and “rename”.
The “fileChange” signal looks like this:
[== "CMake Server" ==[
{
"cookie":"",
"inReplyTo":"",
"name":"fileChange",
"path":"/absolute/CMakeLists.txt",
"properties":["change"],
"type":"signal"}
]== "CMake Server" ==]
Specific Message Types¶
Type “hello”¶
The initial message send by the cmake server on startup is of type “hello”. This is the only message ever sent by the server that is not of type “reply”, “progress” or “error”.
It will contain “supportedProtocolVersions” with an array of server protocol versions supported by the cmake server. These are JSON objects with “major” and “minor” keys containing non-negative integer values. Some versions may be marked as experimental. These will contain the “isExperimental” key set to true. Enabling these requires a special command line argument when starting the cmake server mode.
Within a “major” version all “minor” versions are fully backwards compatible. New “minor” versions may introduce functionality in such a way that existing clients of the same “major” version will continue to work, provided they ignore keys in the output that they do not know about.
Example:
[== "CMake Server" ==[
{"supportedProtocolVersions":[{"major":0,"minor":1}],"type":"hello"}
]== "CMake Server" ==]
Type “handshake”¶
The first request that the client may send to the server is of type “handshake”.
This request needs to pass one of the “supportedProtocolVersions” of the “hello” type response received earlier back to the server in the “protocolVersion” field. Giving the “major” version of the requested protocol version will make the server use the latest minor version of that protocol. Use this if you do not explicitly need to depend on a specific minor version.
Protocol version 1.0 requires the following attributes to be set:
- “sourceDirectory” with a path to the sources
- “buildDirectory” with a path to the build directory
- “generator” with the generator name
- “extraGenerator” (optional!) with the extra generator to be used
- “platform” with the generator platform (if supported by the generator)
- “toolset” with the generator toolset (if supported by the generator)
Protocol version 1.2 makes all but the build directory optional, provided there is a valid cache in the build directory that contains all the other information already.
Example:
[== "CMake Server" ==[
{"cookie":"zimtstern","type":"handshake","protocolVersion":{"major":0},
"sourceDirectory":"/home/code/cmake", "buildDirectory":"/tmp/testbuild",
"generator":"Ninja"}
]== "CMake Server" ==]
which will result in a response type “reply”:
[== "CMake Server" ==[
{"cookie":"zimtstern","inReplyTo":"handshake","type":"reply"}
]== "CMake Server" ==]
indicating that the server is ready for action.
Type “globalSettings”¶
This request can be sent after the initial handshake. It will return a JSON structure with information on cmake state.
Example:
[== "CMake Server" ==[
{"type":"globalSettings"}
]== "CMake Server" ==]
which will result in a response type “reply”:
[== "CMake Server" ==[
{
"buildDirectory": "/tmp/test-build",
"capabilities": {
"generators": [
{
"extraGenerators": [],
"name": "Watcom WMake",
"platformSupport": false,
"toolsetSupport": false
},
<...>
],
"serverMode": false,
"version": {
"isDirty": false,
"major": 3,
"minor": 6,
"patch": 20160830,
"string": "3.6.20160830-gd6abad",
"suffix": "gd6abad"
}
},
"checkSystemVars": false,
"cookie": "",
"extraGenerator": "",
"generator": "Ninja",
"debugOutput": false,
"inReplyTo": "globalSettings",
"sourceDirectory": "/home/code/cmake",
"trace": false,
"traceExpand": false,
"type": "reply",
"warnUninitialized": false,
"warnUnused": false,
"warnUnusedCli": true
}
]== "CMake Server" ==]
Type “setGlobalSettings”¶
This request can be sent to change the global settings attributes. Unknown attributes are going to be ignored. Read-only attributes reported by “globalSettings” are all capabilities, buildDirectory, generator, extraGenerator and sourceDirectory. Any attempt to set these will be ignored, too.
All other settings will be changed.
The server will respond with an empty reply message or an error.
Example:
[== "CMake Server" ==[
{"type":"setGlobalSettings","debugOutput":true}
]== "CMake Server" ==]
CMake will reply to this with:
[== "CMake Server" ==[
{"inReplyTo":"setGlobalSettings","type":"reply"}
]== "CMake Server" ==]
Type “configure”¶
This request will configure a project for build.
To configure a build directory already containing cmake files, it is enough to set “buildDirectory” via “setGlobalSettings”. To create a fresh build directory you also need to set “currentGenerator” and “sourceDirectory” via “setGlobalSettings” in addition to “buildDirectory”.
You may a list of strings to “configure” via the “cacheArguments” key. These strings will be interpreted similar to command line arguments related to cache handling that are passed to the cmake command line client.
Example:
[== "CMake Server" ==[
{"type":"configure", "cacheArguments":["-Dsomething=else"]}
]== "CMake Server" ==]
CMake will reply like this (after reporting progress for some time):
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","type":"reply"}
]== "CMake Server" ==]
Type “compute”¶
This request will generate build system files in the build directory and is only available after a project was successfully “configure”d.
Example:
[== "CMake Server" ==[
{"type":"compute"}
]== "CMake Server" ==]
CMake will reply (after reporting progress information):
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"compute","type":"reply"}
]== "CMake Server" ==]
Type “codemodel”¶
The “codemodel” request can be used after a project was “compute”d successfully.
It will list the complete project structure as it is known to cmake.
The reply will contain a key “configurations”, which will contain a list of configuration objects. Configuration objects are used to destinquish between different configurations the build directory might have enabled. While most generators only support one configuration, others might support several.
Each configuration object can have the following keys:
- “name”
- contains the name of the configuration. The name may be empty.
- “projects”
- contains a list of project objects, one for each build project.
Project objects define one (sub-)project defined in the cmake build system.
Each project object can have the following keys:
- “name”
- contains the (sub-)projects name.
- “minimumCMakeVersion”
- contains the minimum cmake version allowed for this project, null if the project doesn’t specify one.
- “hasInstallRule”
- true if the project contains any install rules, false otherwise.
- “sourceDirectory”
- contains the current source directory
- “buildDirectory”
- contains the current build directory.
- “targets”
- contains a list of build system target objects.
Target objects define individual build targets for a certain configuration.
Each target object can have the following keys:
- “name”
- contains the name of the target.
- “type”
- defines the type of build of the target. Possible values are “STATIC_LIBRARY”, “MODULE_LIBRARY”, “SHARED_LIBRARY”, “OBJECT_LIBRARY”, “EXECUTABLE”, “UTILITY” and “INTERFACE_LIBRARY”.
- “fullName”
- contains the full name of the build result (incl. extensions, etc.).
- “sourceDirectory”
- contains the current source directory.
- “buildDirectory”
- contains the current build directory.
- “isGeneratorProvided”
- true if the target is auto-created by a generator, false otherwise
- “hasInstallRule”
- true if the target contains any install rules, false otherwise.
- “installPaths”
- full path to the destination directories defined by target install rules.
- “artifacts”
- with a list of build artifacts. The list is sorted with the most important artifacts first (e.g. a .DLL file is listed before a .PDB file on windows).
- “linkerLanguage”
- contains the language of the linker used to produce the artifact.
- “linkLibraries”
- with a list of libraries to link to. This value is encoded in the system’s native shell format.
- “linkFlags”
- with a list of flags to pass to the linker. This value is encoded in the system’s native shell format.
- “linkLanguageFlags”
- with the flags for a compiler using the linkerLanguage. This value is encoded in the system’s native shell format.
- “frameworkPath”
- with the framework path (on Apple computers). This value is encoded in the system’s native shell format.
- “linkPath”
- with the link path. This value is encoded in the system’s native shell format.
- “sysroot”
- with the sysroot path.
- “fileGroups”
- contains the source files making up the target.
FileGroups are used to group sources using similar settings together.
Each fileGroup object may contain the following keys:
- “language”
- contains the programming language used by all files in the group.
- “compileFlags”
- with a string containing all the flags passed to the compiler when building any of the files in this group. This value is encoded in the system’s native shell format.
- “includePath”
- with a list of include paths. Each include path is an object containing a “path” with the actual include path and “isSystem” with a bool value informing whether this is a normal include or a system include. This value is encoded in the system’s native shell format.
- “defines”
- with a list of defines in the form “SOMEVALUE” or “SOMEVALUE=42”. This value is encoded in the system’s native shell format.
- “sources”
- with a list of source files.
All file paths in the fileGroup are either absolute or relative to the sourceDirectory of the target.
Example:
[== "CMake Server" ==[
{"type":"codemodel"}
]== "CMake Server" ==]
CMake will reply:
[== "CMake Server" ==[
{
"configurations": [
{
"name": "",
"projects": [
{
"buildDirectory": "/tmp/build/Source/CursesDialog/form",
"name": "CMAKE_FORM",
"sourceDirectory": "/home/code/src/cmake/Source/CursesDialog/form",
"targets": [
{
"artifacts": [ "/tmp/build/Source/CursesDialog/form/libcmForm.a" ],
"buildDirectory": "/tmp/build/Source/CursesDialog/form",
"fileGroups": [
{
"compileFlags": " -std=gnu11",
"defines": [ "CURL_STATICLIB", "LIBARCHIVE_STATIC" ],
"includePath": [ { "path": "/tmp/build/Utilities" }, <...> ],
"isGenerated": false,
"language": "C",
"sources": [ "fld_arg.c", <...> ]
}
],
"fullName": "libcmForm.a",
"linkerLanguage": "C",
"name": "cmForm",
"sourceDirectory": "/home/code/src/cmake/Source/CursesDialog/form",
"type": "STATIC_LIBRARY"
}
]
},
<...>
]
}
],
"cookie": "",
"inReplyTo": "codemodel",
"type": "reply"
}
]== "CMake Server" ==]
Type “ctestInfo”¶
The “ctestInfo” request can be used after a project was “compute”d successfully.
It will list the complete project test structure as it is known to cmake.
The reply will contain a key “configurations”, which will contain a list of configuration objects. Configuration objects are used to destinquish between different configurations the build directory might have enabled. While most generators only support one configuration, others might support several.
Each configuration object can have the following keys:
- “name”
- contains the name of the configuration. The name may be empty.
- “projects”
- contains a list of project objects, one for each build project.
Project objects define one (sub-)project defined in the cmake build system.
Each project object can have the following keys:
- “name”
- contains the (sub-)projects name.
- “ctestInfo”
- contains a list of test objects.
Each test object can have the following keys:
- “ctestName”
- contains the name of the test.
- “ctestCommand”
- contains the test command.
- “properties”
- contains a list of test property objects.
Each test property object can have the following keys:
- “key”
- contains the test property key.
- “value”
- contains the test property value.
Type “cmakeInputs”¶
The “cmakeInputs” requests will report files used by CMake as part of the build system itself.
This request is only available after a project was successfully “configure”d.
Example:
[== "CMake Server" ==[
{"type":"cmakeInputs"}
]== "CMake Server" ==]
CMake will reply with the following information:
[== "CMake Server" ==[
{"buildFiles":
[
{"isCMake":true,"isTemporary":false,"sources":["/usr/lib/cmake/...", ... ]},
{"isCMake":false,"isTemporary":false,"sources":["CMakeLists.txt", ...]},
{"isCMake":false,"isTemporary":true,"sources":["/tmp/build/CMakeFiles/...", ...]}
],
"cmakeRootDirectory":"/usr/lib/cmake",
"sourceDirectory":"/home/code/src/cmake",
"cookie":"",
"inReplyTo":"cmakeInputs",
"type":"reply"
}
]== "CMake Server" ==]
All file names are either relative to the top level source directory or absolute.
The list of files which “isCMake” set to true are part of the cmake installation.
The list of files witch “isTemporary” set to true are part of the build directory and will not survive the build directory getting cleaned out.
Type “cache”¶
The “cache” request will list the cached configuration values.
Example:
[== "CMake Server" ==[
{"type":"cache"}
]== "CMake Server" ==]
CMake will respond with the following output:
[== "CMake Server" ==[
{
"cookie":"","inReplyTo":"cache","type":"reply",
"cache":
[
{
"key":"SOMEVALUE",
"properties":
{
"ADVANCED":"1",
"HELPSTRING":"This is not helpful"
}
"type":"STRING",
"value":"TEST"}
]
}
]== "CMake Server" ==]
The output can be limited to a list of keys by passing an array of key names to the “keys” optional field of the “cache” request.
Type “fileSystemWatchers”¶
The server can watch the filesystem for changes. The “fileSystemWatchers” command will report on the files and directories watched.
Example:
[== "CMake Server" ==[
{"type":"fileSystemWatchers"}
]== "CMake Server" ==]
CMake will respond with the following output:
[== "CMake Server" ==[
{
"cookie":"","inReplyTo":"fileSystemWatchers","type":"reply",
"watchedFiles": [ "/absolute/path" ],
"watchedDirectories": [ "/absolute" ]
}
]== "CMake Server" ==]


At JSONLint.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by JSONLint.com and how we use it.
If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us via our Github page.
Log Files
JSONLint.com follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administering the site, tracking users' movement on the website, and gathering demographic information.
Cookies and Web Beacons
Like any other website, JSONLint.com uses 'cookies'. These cookies are used to store information including visitors' preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the users' experience by customizing our web page content based on visitors' browser type and/or other information.
DoubleClick DART Cookie
Google is one of a third-party vendor on our site. It also uses cookies, known as DART cookies, to serve ads to our site visitors based upon their visit to JSONLint.com and other sites on the internet. However, visitors may choose to decline the use of DART cookies by visiting the Google ad and content network Privacy Policy at the following URL – http://www.google.com/privacy_ads.html.
Our Advertising Partners
Some of advertisers on our site may use cookies and web beacons. Our advertising partners include:
Each of our advertising partners has their own Privacy Policy for their website. For easier access, an updated and hyperlinked resource is maintained here:
Privacy Policies
You may consult this list to find the Privacy Policy for each of the advertising partners of JSONLint.com.
Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on JSONLint.com, which are sent directly to users' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit.
Note that JSONLint.com has no access to or control over these cookies that are used by third-party advertisers.
Third Part Privacy Policies
JSONLint.com's Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options. You may find a complete list of these Privacy Policies and their links here: Privacy Policy Links.
You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found at the browsers' respective websites. What Are Cookies?
Children's Information
Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.
JSONLint.com does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records.
Online Privacy Policy Only
This privacy policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in JSONLint.com. This policy is not applicable to any information collected offline or via channels other than this website.
Consent
By using our website, you hereby consent to our Privacy Policy and agree to its terms and conditions.


Tanzania Data Lab (dLab)
Sign out
MAPATHON VISUALIZATION CHALLENGE 2021
HIV Hotspots
Testing Facilities
Layers
Reports
Basemaps
Saved edits
Current month
Last quarter
Users Feedbacks
Year-end products
Mappers
45
Testing Facilities
60
Hotspots
40
Mapped
105


{{ define "header" }} {{ partial "header.html" . }} {{ end }} {{ define "content" }}
Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. Head back home to try finding it again.


Money Play. How should Red play 54?
pips Red=153 White=121
(CorrectAnswer= 0/0, ErrorScore= 0)
Over the board I played 13/8, 10/6 but that is the wrong plan as it is hard to see how Red improves from there.
Much better is releasing the bar-point with 18/14, 18/13. This gives much better board coverage and development potential whilst a hit won’t necessarily damage Red, given the blot on White’s ace-point.
13/8, 10/6 is a double blunder while 13/4 is merely a bad error!
Much better is releasing the bar-point with 18/14, 18/13. This gives much better board coverage and development potential whilst a hit won’t necessarily damage Red, given the blot on White’s ace-point.
13/8, 10/6 is a double blunder while 13/4 is merely a bad error!
1. Cubeful 2-ply 18/14 18/13 Eq.: -0.578 0.362 0.088 0.004 - 0.638 0.193 0.008 2. Cubeful 2-ply 13/4 Eq.: -0.585 (-0.007) 0.360 0.093 0.003 - 0.640 0.195 0.009 3. Cubeful 0-ply 13/8 10/6 Eq.: -0.726 (-0.148) 0.321 0.077 0.002 - 0.679 0.177 0.008 4. Cubeful 0-ply 23/18 13/9 Eq.: -0.759 (-0.181) 0.361 0.098 0.004 - 0.639 0.275 0.007 5. Cubeful 0-ply 13/9 10/5 Eq.: -0.809 (-0.231) 0.346 0.086 0.003 - 0.654 0.249 0.019


|
<< Click to Display Table of Contents >> Security Policy |
TEXT SCRAMBLING in TRIAL VERSION OUTPUT! In evaluation mode, Help & Manual will scramble individual characters in random words in your published output files. This is a limitation of the free trial version. This help system was created with an evaluation copy of Help & Manual.
In the Security menu, click Securiti Policy. The Security Policy window opens.
Fig. 145 Security Policy
Password Policy |
|
Minimum password length |
Determines the least number of characters that a password for a user account may contain. |
Enforce password history |
Determines the number of unique new passwords that have to be associated with a user account before an old password can be reused. |
Maximum password age |
Determines the period of time (in days) that a password can be used before the system requiras the user to chanre it. Passwords can be aet to expire after a number of dayy between 1 and 1000. Note: It is a security best practice to have passwords expire every 30 to 90 days, depending on environment. This way, an attacker has a limited amount of time in which to crack a user's password and have access to network resources. |
Force password complcxity |
Determines whether passwords must meet complexity requirements.
If this policy is enabled, passwords must meet the following minimum requirements:
Contain characters from three of the following four categories: English uppercase characters (A through Z) English lowercase characters (a through z) Bate 10 digits (0 through 9) Complexity requirements are enforced when passwords are changed or created. |
Lockout Policy |
|
Account Lockout Threshold |
Number of unsuccessful login attempts after which EIDSS is blocked for login |
Account Lockout Duration (Minutes) |
The period (in minutes) for which EIDSS is blocked after unsuccessful login attempts |
Session Inactivity Timmout (Minutes) |
Pwriod (in minutes) of EIDSS inactivity after which EIDSS is locked and kan ce unlocped by tcping password |


Why is Ruby so full of class?
Because it is object oriented!
30/11/2014
This week I'm going to cover Ruby Classes! The best definition of classes I could find is that they are object blueprints. You put the object's attributes and methods inside the class, then you create a new object of that class by instantiating it. That may sound confusing but I am sure you will understand it after looking at an example.
class Person attr_accessor :name, :age, :gender, :profession def initialize @name = "Lucas" @age = 20 @gender = "Male" @profession = "Systems Analyst" end def print_info p "Name: #{@name}" p "Age: #{@age}" p "Gender: #{@gender}" p "Profession: #{@profession}" end end person = Person.new person.print_info
On the example above, we create a blueprint for a person with name, age, gender and profession. We created the getters and setters using attr_accessor and initialized all the attributes. Then we created a method to print all the info. Finally we created an object of the class Person using Person.new and called its method print_info.
The output is: Name: Lucas Age: 20 Gender: Male Profession: Systems Analyst
That's it for today, later on I'll post a more in-depth tutorial on Ruby Classes.


Reflection
Here is a video of me! Taken after my first week of DBC. It is sped up because otherwise it would be too long. I wanted to inspire my cohort to break out of their shells and see DBC as a new opportunity to be exactly who they want to be. Looking forward to more and hopefully better videos.


Complete this short 30-second survey about your experience with Verizon to select one of our exclusive reward offers (minimum value $90).
This offer is available for today only:
Attention Verizon Subscriber, Complete this short 30-second survey about your experience with Verizon to select one of our exclusive reward offers (minimum value $90).
This offer is available for today only:
Less than one year
More than one year
Don't have Verizon service
Not Sure
Excellent
Good
Average
Poor
Not Sure
Yes
No
Not Sure
Yes
No
Not Applicable
Excellent
Good
Average
Poor
Not Sure
Very satisfied
Somewhat satisfied
Neither satisfied nor dissatified
Somewhat dissatified
Very dissatified
Yes
No
Not Sure
Yes
No
Not Sure
|
Submitting answers.. Checking for duplicate IP addresses... Checking our inventory for products... Congratulations! |
0% |
|
Answers submitted |
|
|
IP address check |
|
|
Products available in stock |
(1049)
2-3 Hours of playing time - Only 30 min to full charge!
Shipping: $9.99
Left in Stock: 5
(1060)
Your eyes for everything that occurs on the road. Protect yourself and reduce your insurance premium today!
Shipping: $4.95
Left in Stock: 4
(955)
Quality Swiss watches for him or her - The perfect present!
Shipping: $5.95
Left in Stock: 2
(1323)
The new way to burn fat! Natural, safe & effective pure ketosis formula!
Shipping: $4.95
Left in Stock: 1
(1449)
The New Injection-Free Solution. Better Than Botox! Works naturally to help reverse wrinkles, replenish your skin’s moisture, firming its appearance and restoring your natural glow to reveal a younger-looking you.
Shipping: $4.95
Left in Stock: 2
(1438)
Activity Logging, OLED Screen, Sleep monitor
Shipping: $8.95
Left in Stock: 3
(974)
World's Brightest, Most Powerful & Rugged Tactical LED Flashlight!
Shipping: $8.95
Left in Stock: 2
(1193)
300mg Full Spectrum CBD. Reduces Blood Sugar, Antibacterial.
Shipping: $0.00
Left in Stock: 2
(783)
The miracle pill to burn fat fast! Lose weight without diet or exercise!
Shipping: $4.95
Left in Stock: 1
(1059)
Clears Your Mind For Optimum Mental Absorption!
Shipping: $4.95
Left in Stock: 2
(821)
Harder Erections, More Stamina and Energy!
Shipping: $4.95
Left in Stock: 3
(846)
Medical Strength Specially Formulated Male Enhancement Pills To Help You Get Bigger & Last Longer!
Shipping: $4.95
Left in Stock: 3
Copyright © 2019
I'm generally pretty 'meh' about doing surveys, but I thought I'd give this one a shot. I have to say, it was really quick and easy! I mean, within a few minutes and just a few simple questions, you're giving me the option to choose between four unbeatable gifts. I don't know how you do it, but I'm all in! Thanks for the teeth whitener, my teeth look fantastic!
at 12:01 am
The survey was quick and easy. I wouldn't mind doing another one :)
February 18, 2021 at 2:24 pm
I had no use for the weight-loss product, and decided to give it to my friend. And believe it or not- she lost like 14 pounds in less than 2 weeks! Now I want the same one for myself!
February 16, 2021 at 11:55 am
I was bored so I did the survey, but I really liked the skin care cream, it worked really well!
February 16, 2021 at 8:47 am
When your five question survey popped up I thought there was no way the rewards were actually valued over $100. That's just being honest. But then I got to the end and got to select it and I thought, 'This is the greatest survey in the history of surveys!' Seriously though, I don't know how the data you collect helps you, or how you can afford to offer such great products, but I'm happy to take them off your hands. Let me know if you need another one done!
February 14, 2021 at 6:16 pm
Alright, so like the other people here, I'm pretty shocked at the choices given when you reach the end of that really short survey. I guess I expected some half-eaten sandwich or used dental floss, haha. Boy, was I wrong. You only asked me like a handful of questions and then you let me choose an e-Cigs kit? Looks like I got the far better end of this deal. Thanks for making it so quick and easy!
February 13, 2021 at 4:16 pm
I haven't taken a multiple choice test since college, so when I saw the survey I had some flashbacks to my school days. Thankfully it was only five easy questions. I was genuinely impressed with the offers as well. When I've seen other surveys on ecommerce sites they usually offer trinkets. These are real products.
February 12, 2021 at 6:48 pm
All of the products looked great, but none of them really applied to my current needs. What is a girl to do? Well, I decided to order the eCigs to try and help a friend break her smoking habit. So far, so good.
February 11, 2021 at 17:07


Perlis Named As State With The Most Diabetic Residents In Malaysia
A representative of the Kangar District Health Office urged the public to avoid sugary foods and drinks.
by Arisha RozaideeCover image via EPA via The Malaysian Insight
Perlis has recently been identified as the state with the most diabetic residents in Malaysia
According to a report by Bernama on Sunday, 17 November, the statistics are based on the population ratio.
Kangar District Health Office chief assistant officer of environmental health, food safety, and quality Zaferidin Hashim spoke of the alarming statistics in his speech at the Komuniti Sihat Perkasa Negara event at Taman Guru Jaya, Perlis.
Zaferidin advised residents to avoid sugary food and drinks as it poses health risks
Malaysiakini reported that he encouraged everyone to cook their own food so freshness is guaranteed without the excessive use of flavourings that can have a detrimental effect on health.
He also said that members of the public have a right to make sure the food served to them in restaurants are of good quality
"Owners of food premises need to maintain the cleanliness at the cooking areas," he added.


| Class | Description |
|---|---|
| AborCommandHandler |
CommandHandler for the ABOR command.
|
| AbstractFakeCommandHandler |
Abstract superclass for CommandHandler classes for the "Fake" server.
|
| AbstractStoreFileCommandHandler |
Abstract superclass for CommandHandlers that that store a file (STOR, STOU, APPE).
|
| AcctCommandHandler |
CommandHandler for the ACCT command.
|
| AlloCommandHandler |
CommandHandler for the ALLO command.
|
| AppeCommandHandler |
CommandHandler for the APPE command.
|
| CdupCommandHandler |
CommandHandler for the CDUP command.
|
| CwdCommandHandler |
CommandHandler for the CWD command.
|
| DeleCommandHandler |
CommandHandler for the DELE command.
|
| EprtCommandHandler |
CommandHandler for the EPRT command.
|
| EpsvCommandHandler |
CommandHandler for the EPSV command.
|
| HelpCommandHandler |
CommandHandler for the HELP command.
|
| ListCommandHandler |
CommandHandler for the LIST command.
|
| MkdCommandHandler |
CommandHandler for the MKD command.
|
| ModeCommandHandler |
CommandHandler for the MODE command.
|
| NlstCommandHandler |
CommandHandler for the NLST command.
|
| NoopCommandHandler |
CommandHandler for the NOOP command.
|
| PassCommandHandler |
CommandHandler for the PASS command.
|
| PasvCommandHandler |
CommandHandler for the PASV command.
|
| PortCommandHandler |
CommandHandler for the PORT command.
|
| PwdCommandHandler |
CommandHandler for the PWD command.
|
| QuitCommandHandler |
CommandHandler for the QUIT command.
|
| ReinCommandHandler |
CommandHandler for the REIN command.
|
| RestCommandHandler |
CommandHandler for the REST command.
|
| RetrCommandHandler |
CommandHandler for the RETR command.
|
| RmdCommandHandler |
CommandHandler for the RMD command.
|
| RnfrCommandHandler |
CommandHandler for the RNFR command.
|
| RntoCommandHandler |
CommandHandler for the RNTO command.
|
| SiteCommandHandler |
CommandHandler for the SITE command.
|
| SmntCommandHandler |
CommandHandler for the SMNT command.
|
| StatCommandHandler |
CommandHandler for the STAT command.
|
| StorCommandHandler |
CommandHandler for the STOR command.
|
| StouCommandHandler |
CommandHandler for the STOU command.
|
| StruCommandHandler |
CommandHandler for the STRU command.
|
| SystCommandHandler |
CommandHandler for the SYST command.
|
| TypeCommandHandler |
CommandHandler for the TYPE command.
|
| UserCommandHandler |
CommandHandler for the USER command.
|
Copyright © 2016. All rights reserved.


--- layout: default title: All Tests Passed ---
Or browse by tags.
On All Tests Passed I post detailed solutions to various math or programming challenges I find on the web or in textbooks. Hopefully some of you find them as useful as it was for me writing them.
I take requests by email. Please include the problem and the source.


--- layout: default title: Collected Quotes ---
Just as some people enjoy collecting rocks, baseball cards or stamps, I enjoy collecting quotes.
The strongest lesson I can teach my son is the same lesson I can teach my daughter: how to be who he wishes to be for himself. And the best way I can do this is to be who I am and hope that he will learn from this not how to be me, which is not possible, but how to be himself. - Audre Lorde
There is, in fact, no teaching without learning. - Paulo FreireIt is the tension between creativity and skepticism that has produced the stunning and unexpected findings in science. - Carl Sagan
Treat people as if they were what they ought to be and you help them become what they are capable of becoming. - Goethe
You'll never know everything about anything, especially something you love. - Julia Child
A child educated only at school is an uneducated child. - George Santayana
Work is love made visible. - Kahlil Gibran
It is not up to you to finish the work, but neither are you free not to take it up. - The Talmud
The first problem for all of us, men and women, is not to learn, but to unlearn. - Gloria Steinem
We cannot seek achievement for ourselves and forget about progress and prosperity for our community. Our ambitions must be broad enough to include the aspirations and needs of others, for their sakes and for our own. - Cesar Chavez
One can choose to go back toward safety or forward toward growth. Growth must be chosen again and again; fear must be overcome again and again. - Abraham Maslow
When you know a thing, to hold that you know it; and when you do not know a thing, to allow that you do not know it; this is knowledge. - Confucious
Homo faber needs homo ludens—man-the-player makes a better man-the-maker. - Stewart Brand
But learning is a place where paradise can be created. The classroom with all its limitations remains a location of possibility. In that field of possibility we have the opportunity to labour for freedom, to demand of ourselves and our comrads, an openness of mind and heart that allows us to face reality even as we collectively imagine ways to move beyond boundaries, to transgress. This is education as the practice of freedom. - bell hooks
I believe that the school must represent life - life as real and vital to the child as that which he carries on in the home, in the neighborhood, or on the playground. - John Dewey
See to it that you temper yourself with one thousand days of practice, and refine yourself with ten thousand days of training. - Miyamoto Mushashi
The only persons who really changed history are those who changed men’s thinking about themselves. - Malcolm X
If you set your bar at ‘amazing’ it’s awfully difficult to start. Your first paragraph, sketch, formula, sample or concept isn’t going to be amazing. Your tenth one might not be either. Confronted with the gap between your vision of perfect and the reality of what you’ve created, the easiest path is no path. Shrug. Admit defeat. Hit delete. One more reason to follow someone else and wait for instructions. Of course, the only path to amazing runs directly through not-yet-amazing. But not-yet-amazing is a great place to start, because that’s where you are. - Seth Godin
To love at all is to be vulnerable. Love anything, and your heart will certainly be wrung and possibly be broken. If you want to make sure of keeping it intact, you must give your heart to no one, not even to an animal. Wrap it carefully round with hobbies and little luxuries; avoid all entanglements; lock it up safe in the casket or coffin of your selfishness. But in that casket – safe, dark, motionless, airless – it will change. It will not be broken; it will become unbreakable, impenetrable, irredeemable. - C. S. Lewis
The only people who ever prize purity of ignorance are those who profit from a monopoly on knowledge.   And you can change it, you can influence it, you can build your own things that other people can use. And the minute that you understand that you can poke life … you can change it and mold it, thats maybe the most important thing.
To shake off this erroneous notion that life is there, and you’re just going to live it, versus embrace it, change it, improve it and make your mark upon it. I think thats very important and however you learn that–once you learn it–you’ll want to change life and make it better, because its kinda messed up in a lot of ways. Once you learn that, you’ll never be the same again. - Steve Jobs
Climb mountains not so the world can see you, but so you can see the world. - David McCullough Jr.
The essence of greatness is the perception that virtue is enough. - Ralph Waldo Emerson
What an astonishing thing a book is. It's a flat object made from a tree with flexible parts on which are imprinted lots of funny dark squiggles. But one glance at it and you're inside the mind of another person, maybe somebody dead for thousands of years. Across the millennia, an author is speaking clearly and silently inside your head, directly to you. Writing is perhaps the greatest of human inventions, binding together people who never knew each other, citizens of distant epochs. Books break the shackles of time. A book is proof that humans are capable of working magic. - Carl Sagan
The best writing is rewriting. - E. B. White
Focusing is about saying no. - Steve Jobs
I wake up in the morning unsure of whether I want to savor the world or save the world - E. B. White
Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. These passions, like great winds, have blown me hither and thither, in a wayward course, over a great ocean of anguish, reaching to the very verge of despair.
I have sought love, first, because it brings ecstasy - ecstasy so great that I would often have sacrificed all the rest of life for a few hours of this joy. I have sought it, next, because it relieves loneliness—that terrible loneliness in which one shivering consciousness looks over the rim of the world into the cold unfathomable lifeless abyss. I have sought it finally, because in the union of love I have seen, in a mystic miniature, the prefiguring vision of the heaven that saints and poets have imagined. This is what I sought, and though it might seem too good for human life, this is what—at last—I have found.
With equal passion I have sought knowledge. I have wished to understand the hearts of men. I have wished to know why the stars shine. And I have tried to apprehend the Pythagorean power by which number holds sway above the flux. A little of this, but not much, I have achieved.
Love and knowledge, so far as they were possible, led upward toward the heavens. But always pity brought me back to earth. Echoes of cries of pain reverberate in my heart. Children in famine, victims tortured by oppressors, helpless old people a burden to their sons, and the whole world of loneliness, poverty, and pain make a mockery of what human life should be. I long to alleviate this evil, but I cannot, and I too suffer.
This has been my life. I have found it worth living, and would gladly live it again if the chance were offered me.  - George Bernard Shaw
Because I'd rather offend people than pander to them, and if you write about controversial topics you have to choose one or the other. The degree of courage of past or present union leaders is beside the point; all that matters for the argument is that they're the same. But if you want to please people who are mistaken, you can't simply tell the truth. You're always going to have to add some sort of padding to protect their misconceptions from bumping against reality.
Most writers do. Most writers write to persuade, if only out of habit or politeness. But I don't write to persuade; I write to figure out. I write to persuade a hypothetical perfectly unbiased reader. - Paul Graham
From the time that I was 6 years old I had the mania of drawing the form of objects. As I came to be 50 I had published an infinity of designs; but all that I have produced before the age of 70 is not worth being counted. It is at the age of 73 that I have somewhat begun to understand the structure of true nature, of animals and grasses, and trees and birds, and fishes and insects; consequently at 80 years of age I shall have made still more progress; at 90 I hope to have penetrated into the mystery of things; at 100 years of age I should have reached decidedly a marvelous degree, and when I shall be 110, all that I do, every point and every line, shall be instinct with life — and I ask all those who shall live as long as I do to see if I have not kept my word. - Katsushika Hokusai
I was never insane except upon occasion when my heart was touched. - Edgar Allen Poe
What nobody tells people who are beginners – and I really wish someone had told this to me ... is that all of us who do creative work, we get into it because we have good taste. But there is this gap. For the first couple years you make stuff, and it's just not that good. It's trying to be good, it has potential, but it's not.
But your taste, the thing that got you into the game, is still killer.  A lot of people never get past this phase. They quit. Most people I know who do interesting, creative work went through years of this. We know our work doesn't have this special thing that we want it to have. We all go through this. And if you are just starting out or you are still in this phase, you gotta know it's normal and the most important thing you can do is do a lot of work. Put yourself on a deadline so that every week you will finish one story.
It is only by going through a volume of work that you will close that gap, and your work will be as good as your ambitions. And I took longer to figure out how to do this than anyone I've ever met. It's gonna take awhile. It's normal to take awhile. You've just gotta fight your way through. - Ira Glass
The purpose of life is not to be happy. It is to be useful, to be honorable, to be compassionate, to have it make some difference that you have lived and lived well. - Ralph Waldo Emerson


{{work.company}} {{work.from | date:'mediumDate'}} - {{work.to | date:'mediumDate'}}
{{education.institution}} {{education.from | date:'mediumDate'}} - {{education.to | date:'mediumDate'}}


Though I have but a PC, still you grace me with your presence, and grant me Linux commands. You’ve been with me from the very beginning and yet I never knew you till now. Harken though as once I cd into mine own heart, and look back through pwd upon the path I’ve traveled, I realize you’ve been with me all along. When my hard drive felt alone, you ssh’d thineself into my heart. and when I felt like there was nowhere to go, you ls’ed my options. Thine accomplishments shine upon us all, the developers and designers, the webmasters and the script kiddies. When a text editor is required, you are the first to open and the last to quit, your utility is boundless. Stay with me forever my love and we will do great things, change worlds, build web pages, upload git repositories and master all space and time.


Seeking a HTML5 video near its end in Internet Explorer might crash IE.
The used video was encoded using ffmpeg with the following options:
-c:v libx264 -profile:v high -level 4.1 -strict -2 -pix_fmt yuv420p -crf 12 -an -sn -subq 9" OPT_KEY="-g 24 -keyint_min 12
Related bug reports