User files required for the Fortran code¶
The Makefile in an application directory shows the set of Fortran source code files that are being used. Most of these files are typically in one of the libraries, but a few subroutines must be provided by the user in order to specify the hyperbolic problem to be solved and the initial conditions. Other subroutines may also be provided that are application-specific. This page summarizes some of the most common user-modified routines.
The calling sequence for each subroutine differs with the number of space dimensions. The sample calling sequences shown below are for one space dimension.
The subroutines described below have default versions in the corresponding library and the Makefile can point to these if application-specific versions are not needed.
See the examples in the following directories for additional samples:
- $CLAW/classic/examples
- $CLAW/amrclaw/examples
- $CLAW/geoclaw/examples
You can also browse from the Galleries of all Clawpack applications to the README file for an example and then to the source code for the application-specific codes.
Specifying the initial conditions¶
Calling sequence in 1d:
subroutine qinit(meqn,mbc,mx,xlower,dx,q,maux,aux)
See the qinit default routines for other calling sequences and the proper declaration of input/output parameters.
Typically every application directory contains a file qinit.f or qinit.f90 that sets the initial conditions, typically in a loop such as:
do i=1,mx
xi = xlower + (i-0.5d0)*dx
q(1,i) = xi**2
enddo
This loop would set the value of \(q^1\) in the i’th cell to \(x_i^2\) where \(x_i\) is the cell center. For the finite volume methods used in Clawpack, the initial data should really be set to be the cell average of the data over each grid cell, determined by integrating the data for the PDE. If the initial data is given by a smooth function, then evaluating the function at the center of the grid cell generally agrees with the cell average to \({\cal O}(\Delta x^2)\) and is consistent with the second-order accurate high-resolution methods being used in Clawpack.
For a system of more than 1 equation, you must set q(m,i) for m = 1, 2, ..., num_eqn.
For adaptive mesh refinement codes, the qinit subroutine will be called for each grid patch at the initial time, so it is always necessary to compute the cell centers based on the information passed in.
Specifying the Riemann solver¶
The Riemann solver defines the hyperbolic equation that is being solved and does the bulk of the computational work – it is called at every cell interface every time step and returns the information about waves and speeds that is needed to update the solution.
See Riemann solvers for more details about the Riemann solvers.
All of the examples that come with Clawpack use Riemann solvers that are provided in the directory $CLAW/riemann/src, see the Makefile in one of the examples to determine what Riemann solver file(s) are being used (in two and three space dimensions, transverse Riemann solvers are also required).
The directory $CLAW/riemann/src contains Riemann solvers for many applications, including advection, acoustics, shallow water equations, Euler equations, traffic flow, Burgers’ equation, etc.
Specifying boundary conditions¶
Boundary conditions are set by the library routines:
- $CLAW/classic/src/Nd/bcN.f for the classic code (N = 1, 2, 3).
- $CLAW/amrclaw/src/Nd/bcNamr.f for the amrclaw code (N = 2, 3).
Several standard choices of boundary condition procedures are provided in these routines – see Boundary conditions for details.
For user-supplied boundary conditions that are not implemented in the library routines, the library routine can be copied to the application directory and changes made as described at User-defined boundary conditions. The Makefile should then be modified to point to the local version.
Specifying problem-specific data¶
Often an application problem has data or parameters that is most conveniently specified in a user-supplied routine named setprob. There is a library version that does nothing in case one is not specified in the application directory. As usual, the Makefile indicates what file is used.
The setprob subroutine takes no arguments. Data set in setprob is often passed in common blocks to other routines, such as qinit or the Riemann solver. This is appropriate only for data that does not change with time and does not vary in space (e.g. the gravitational constant g in the shallow water equations, or the density and bulk modulus for acoustics in a homogenous medium).
Note that named common blocks must have the same name in each routine where they are used. Check any Riemann solvers you use (including those from $CLAW/riemann/src) to see if they require some parameters to be passed in via a common block. If so, setprob is the place to set them.
For spatially-varying data, see Specifying spatially-varying data using setaux below.
Often setprob is written so that it reads in data values from a file, often called setprob.data. This makes it easier to modify parameter values without recompiling the code. It is also possible to set these values in setrun.py so that this input data is specified in the same file as other input parameters. For a sample, see $CLAW/classic/examples/acoustics_1d_heterogeneous, for example.
Specifying spatially-varying data using setaux¶
Some problems require specifying spatially varying data, for example the density and bulk modulus for acoustics in a heterogenous medium might vary in space and in principle could be different in each grid cell. The best way to specify such data is by use of auxiliary arrays that are created whenever a grid patch for the solution is created and have the same number of cells with num_aux components in each cell. The value num_aux is specified in setrun.py, and the contents of the aux arrays are filled by a subroutine named setaux, which in one dimension has the calling sequence:
subroutine setaux(mbc,mx,xlower,dx,maux,aux)
See the setaux default routines for other calling sequences and the proper declaration of input/output parameters.
If adaptive refinement is being used, then every time a new grid patch is created at any refinement level this subroutine will be called to fill in the corresponding aux arrays. For a sample, see $CLAW/classic/examples/acoustics_1d_heterogeneous, for example.
If the aux arrays need to be time-dependent, the easiest way to adjust them each time step is in the routine b4step described below.
Using b4step for work to be done before each time step¶
The routine b4stepN is called in N space dimensions (N=1,2,3) just before a time step is taken (and after ghost cells have been filled by the boundary conditions). The library version of this routine does nothing, but this can be modified to do something prior to every time step.
In one dimension the calling sequence is:
subroutine b4step1(mbc,mx,meqn,q,xlower,dx,t,dt,maux,aux)
See the b4step default routines for other calling sequences and the proper declaration of input/output parameters.
For example, in $CLAW/amrclaw/examples/advection_2d_swirl the advection equation is solved with an advection velocity that varies in time as well as space. This is initialized for each grid patch in setaux, but is adjusted each time step in b4step2.
Using src for source terms¶
Problems of the form \(q_t(x,t) + f(q(x,t))_x = \psi(q,x,t)\) can be solved using a fractional step approach, as described in Chapter 17 of [LeVeque-FVMHP]. The user can provide a subroutine named srcN in N space dimensions that takes a single time step on the equation \(q_t = \psi\). In one dimension the calling sequence is:
subroutine src1(meqn,mbc,mx,xlower,dx,q,maux,aux,t,dt)
On output the q array should have been updated by using the input values as initial data for a single step of length dt starting at time t.
See the src default routines for other calling sequences and the proper declaration of input/output parameters.
The library version of srcN does nothing. If you copy this to an application directory and modify for your equation, you must modify the Makefile to point to the local version. You must also set the source_split parameter in setrun.py (see Specifying classic run-time parameters in setrun.py) to either “godunov” or “strang”. In the former case, the 1st order Godunov splitting is used (after each time step on the homogenous hyperbolic equation, a time step of the same length is taken on the source terms). In the latter case the 2nd order Strang splitting is used: the time step on the hyperbolic part is both preceeded and followed by a time step of half the length on the source terms.
For an example where source terms are used, see $CLAW/classic/examples/acoustics_2d_radial/1drad where a one-dimensional acoustic equation with a geometric source term is solved in order to provide a reference solution for the two-dimensional radially symmetric problem solved in $CLAW/classic/examples/acoustics_2d_radial.
Using src1d for source terms with AMRClaw¶
When the AMRClaw code is used for a problem in 2 or 3 dimensions with source terms, then a subroutine srcN must be provided as described above. In addition, for the AMR procedure to work properly it is also necessary to provide another subroutine src1d with calling sequence:
subroutine src1d(meqn,mbc,mx1d,q1d,maux,aux1d,t,dt)
See the src1d default routines for other calling sequences and the proper declaration of input/output parameters.
This routine should be a simplified version of src2 or src3 that takes a one-dimensional set of data in q1d rather than a full 2- or 3-dimensional array of data. The input array aux1d has the corresponding set of auxiliary variables in case these are needed in stepping forward with the source terms.
If the source terms depend only on q, it should be easy to adapt src2 to create this routine, simply by looping over i=1:mx1d rather than over a multi-dimensional array.
This routine is used in computing adjustments around a fine grid patch that are needed in order to maintain global conservation after values in a coarser grid cell have been overwritten with the average of the more accurate fine grid values. Adjustment of the coarse grid values in the cells bordering this patch is then required to maintain conservation. This requires solving a set of Riemann problems between fine-grid and coarse-grid values around the edge of the patch and src1d is used in advancing coarse grid values to intermediate time steps.
The code may work fine without applying source terms in this context, so using the dummy library routine src1d might be successful even when source terms are present.


It's fascinating to solve algothmic problems, follow Yanzhan to learn more!
solution:
class Solution {
int count = 0;
map<string, string> cache;
string prefix = "http://tinyurl.com/";
public:
// Encodes a URL to a shortened URL.
string encode(string longUrl) {
count++;
cache[to_string(count)] = longUrl;
return prefix + to_string(count);
}
// Decodes a shortened URL to its original URL.
string decode(string shortUrl) {
auto token = shortUrl.substr(prefix.size());
return cache[token];
}
};
// Your Solution object will be instantiated and called as such:
// Solution solution;
// solution.decode(solution.encode(url));


Throughout this year, we did a lot of meaningful things. Here, we summarize the work we did according to the medal criteria. You can click on the links below to go to the respective pages.
We performed a measurement approach with gold nanoparticle-based colorimetric detection using DNA aptamers. It is well known that short ssDNA is readily adsorbed onto the surface of AuNPs without any modification and that such ssDNA-treated AuNPs are more stable than untreated ones. With this in mind, to test the usefulness of the aptamer for the kanamycin, we applied a colorimetric method using AuNP aggregation. When salt was added to the solution containing ssDNA aptamer-treated AuNPs, the color of the solution didn't change, but when the kanamycin was added into the system, the AuNPs aggregated and exhibited a change of color from red to purple. We used A620/A520 to reflect this change.
We use mathematical modeling to determine parameters and narrow our
range of options. Specifically, three models were adopted for our
project: The binding of aptamers to target spots, the appropriate time
for growth of hydrogels and the determination of inhibitor.
the first model, we established several equations based on the
molecular mechanism in cell micro-environment and solved them.
the second model, we used post feedback neural network to predict the
radius of colloidal particles in given time. By training the network
with experimental data, we can get an approximate mapping from time to
radius of colloidal particles.
In the third model, we
interpreted the issue as an optimization problem and used
thermodynamics theory to quantify the objective and constraint
functions.
As the project began, we interviewed hospitals, medical treatments supply companies and professional scientific research institutions and were inspired to come up with our project of Circulating Tumor Cells (CTCs) capturing. We also contacted some researchers in related fields to ensure the viability of using aptamer and DNA hydrogel to recognize and encapsulate CTCs. With our project being carrying out, we also received guidance from many professors and experts. Especially thanks to HaploX for their support.
We helped a high school to establish their synthetic biology community, and also launched a long-term teaching and experimenting development plan for the high school. We organized debate competitions in our university to discuss the issues involved in the project from different perspectives, which turned out the strengthening our project’s connection to the society. This year, we continued our university's iGEM Student Association. We organized training courses and activities to popularize Synthetic Biology and iGEM in our university. Additionally, we held an information sharing event at the 70th anniversary celebration of our university to promote our project and conduct on-site communication.
Our project is about Circulation Tumor Cells (CTCs) capturing and we devoted ourselves to building a kit aiming at detecting and catching individual living CTCs. We never gave up applying our projects in both scientific and application fields. We successfully attracted attentions from HaploX Company, who focuses on accurate target tumor medical treatment. We are mentioned that our project aiming to living CTCs may be helpful for their technical vacancy, so we provided a business plan for HaploX at the early stage of the project. During the development of our project, HaploX kept in touch with us and even offered us a specific report of our project on their official social media account. They would also like to provide detailed sample analysis and sample detection as our feedback.


Please select the two motivating factors which are most important to you.
Please enter the names of up to twelve areas of work or projects that are exercising your mind.
Please order these activities by your factor:
{{ activity.name }}
Please order these activities by your factor:
{{ activity.name }}
| Name | {{ activity.name }} |
|
{{ activity.factor1 }} |
|
{{ activity.factor2 }} | Total | {{ activity.total }} |
|---|


Item 5.10.5.f.
We built our histogram for per capita land use change CO2 emissions. The table also has overall land use change CO2 emissions for each country (the land_use_change_co2 variable). Why is it easier to create a histogram for the land use per capita data than the overall land use CO2 emissions? Why is it more useful to use per capita data to understand patterns in emissions than overall land use CO2 totals?in-context


Tab 1 Content
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Tab 2 Content
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Tab 4 Content
| Name: | Tim Smith |
| Email: |<EMAIL_ADDRESS>|


Controller for this page: {{controllerName}}
Mixins: {{name}}
Controller inherited mixin prototype functions: {{mixinPrototypeFunctionsInherited()}}


{% extends "layout.html" %} {% block head %} {% include "includes/head.html" %} {% endblock %} {% block page_title %} Apprenticeships {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} Back to apprentice details {% include "includes/account-name-number.html" %}Edit apprentice details Apprentice name First name Last name ULN Unique learner number<PHONE_NUMBER> Date of birth For example, 31 03 1980 Day Month Year Enter the name of the framework or standard. Apprenticeship training course Level 2: Aeronautical engineering End-point assessor (optional) There are 3 end-point assessors available for this training course. You'll need to choose one now or before the training finishes. Please select an end-point assessor Institute of Mechanical Engineers EPA 2 EPA 3 What is an end-point assessor? An end-point assessor carries out a final assessment to ensure apprentices have successfully completed their apprenticeship. End-point assessment only applies to Standards. Find out more about end-point assessors Planned training start date 07 2017 Planned training finish date 09 2019 Total agreed training cost £6,555 Add a note Reference (optional) Add a reference, such as employee number or location - this won’t be seen by the training provider. Cancel and return {% endblock %}
0123456789
Level 2: Aeronautical engineering
An end-point assessor carries out a final assessment to ensure apprentices have successfully completed their apprenticeship. End-point assessment only applies to Standards.
Find out more about end-point assessors
07 2017
09 2019
£6,555
Cancel and return


The Cube-Factor Theorem
Thm: in the prime sieving algorithm, suppose we have sieved out every multiple of 2, 3, 5, ... z and have discovered p as the next prime. Then the only things to newly mark up to p^3 will be p*q for q in the list of primes we already know.Proof: For any multiple of p < p^3, write it as p*n for some 1 <= n < p^2. We want to prove that n can't be composite if p*n is going to be fancy-fresh.
So suppose n is composite. Then by the square-factor theorem and n<p^2, n has a factor that is less than p. In other words (you probably need to throw in the fundamental theorem of arithmetic here technically), this says that n has a factor that is one of the primes we've already done, so it will have been *sieved* already.
So if p*n is fresh, n has to be a prime, call it q, which is in the list we already know.
Further, these are all the fresh ones below p^3, exactly one for every prime we know, because these are all unique ones (since they are a combination of primes that hasn't happened yet, since p is new, and for p*n for n>z, n>=p, ).
QED
Isn't this tantalizing? I spent a long time trying to morph this into a stepping algorithm where you use the primes up to p^2 to get the primes up to p^3, constantly moving back and forth like a loom. Improving the old algorithm from stepping by squares to stepping by *cubes* would, on first glance, seem to be really super tubular-awesome!
Too bad there's some places it breaks down though: it would seem to imply that the *only* composites will be ones made of exactly two primes! This happens once you cross above p^3, and once your are above there all bets seemed to be off again, and I was frustrated for a long time trying to understand the pattern that was going on there.


/** * @author Ed Spencer * * A Model represents some object that your application manages. For example, one might define a Model for Users, * Products, Cars, or any other real-world object that we want to model in the system. Models are registered via the * {@link Ext.data.ModelManager model manager}, and are used by {@link Ext.data.Store stores}, which are in turn used by many * of the data-bound components in Ext. * * Models are defined as a set of fields and any arbitrary methods and properties relevant to the model. For example: * * Ext.define('User', { * extend: 'Ext.data.Model', * * config: { * fields: [ * {name: 'name', type: 'string'}, * {name: 'age', type: 'int'}, * {name: 'phone', type: 'string'}, * {name: 'alive', type: 'boolean', defaultValue: true} * ] * }, * * changeName: function() { * var oldName = this.get('name'), * newName = oldName + " The Barbarian"; * * this.set('name', newName); * } * }); * * The fields array is turned into a {@link Ext.util.MixedCollection MixedCollection} automatically by the {@link * Ext.data.ModelManager ModelManager}, and all other functions and properties are copied to the new Model's prototype. * * Now we can create instances of our User model and call any model logic we defined: * * var user = Ext.create('User', { * name : 'Conan', * age : 24, * phone: '555-555-5555' * }); * * user.changeName(); * user.get('name'); // returns "Conan The Barbarian" * * # Validations * * Models have built-in support for validations, which are executed against the validator functions in {@link * Ext.data.validations} ({@link Ext.data.validations see all validation functions}). Validations are easy to add to * models: * * Ext.define('User', { * extend: 'Ext.data.Model', * * config: { * fields: [ * {name: 'name', type: 'string'}, * {name: 'age', type: 'int'}, * {name: 'phone', type: 'string'}, * {name: 'gender', type: 'string'}, * {name: 'username', type: 'string'}, * {name: 'alive', type: 'boolean', defaultValue: true} * ], * * validations: [ * {type: 'presence', field: 'age'}, * {type: 'length', field: 'name', min: 2}, * {type: 'inclusion', field: 'gender', list: ['Male', 'Female']}, * {type: 'exclusion', field: 'username', list: ['Admin', 'Operator']}, * {type: 'format', field: 'username', matcher: /([a-z]+)[0-9]{2,3}/} * ] * } * }); * * The validations can be run by simply calling the {@link #validate} function, which returns a {@link Ext.data.Errors} * object: * * var instance = Ext.create('User', { * name: 'Ed', * gender: 'Male', * username: 'edspencer' * }); * * var errors = instance.validate(); * * # Associations * * Models can have associations with other Models via {@link Ext.data.association.HasOne}, * {@link Ext.data.association.BelongsTo belongsTo} and {@link Ext.data.association.HasMany hasMany} associations. * For example, let's say we're writing a blog administration application which deals with Users, Posts and Comments. * We can express the relationships between these models like this: * * Ext.define('Post', { * extend: 'Ext.data.Model', * * config: { * fields: ['id', 'user_id'], * belongsTo: 'User', * hasMany : {model: 'Comment', name: 'comments'} * } * }); * * Ext.define('Comment', { * extend: 'Ext.data.Model', * * config: { * fields: ['id', 'user_id', 'post_id'], * belongsTo: 'Post' * } * }); * * Ext.define('User', { * extend: 'Ext.data.Model', * * config: { * fields: ['id'], * hasMany: [ * 'Post', * {model: 'Comment', name: 'comments'} * ] * } * }); * * See the docs for {@link Ext.data.association.HasOne}, {@link Ext.data.association.BelongsTo} and * {@link Ext.data.association.HasMany} for details on the usage and configuration of associations. * Note that associations can also be specified like this: * * Ext.define('User', { * extend: 'Ext.data.Model', * * config: { * fields: ['id'], * associations: [ * {type: 'hasMany', model: 'Post', name: 'posts'}, * {type: 'hasMany', model: 'Comment', name: 'comments'} * ] * } * }); * * # Using a Proxy * * Models are great for representing types of data and relationships, but sooner or later we're going to want to load or * save that data somewhere. All loading and saving of data is handled via a {@link Ext.data.proxy.Proxy Proxy}, which * can be set directly on the Model: * * Ext.define('User', { * extend: 'Ext.data.Model', * * config: { * fields: ['id', 'name', 'email'], * proxy: { * type: 'rest', * url : '/users' * } * } * }); * * Here we've set up a {@link Ext.data.proxy.Rest Rest Proxy}, which knows how to load and save data to and from a * RESTful backend. Let's see how this works: * * var user = Ext.create('User', {name: 'Ed Spencer', email: 'ed@sencha.com'}); * * user.save(); //POST /users * * Calling {@link #save} on the new Model instance tells the configured RestProxy that we wish to persist this Model's * data onto our server. RestProxy figures out that this Model hasn't been saved before because it doesn't have an id, * and performs the appropriate action - in this case issuing a POST request to the url we configured (/users). We * configure any Proxy on any Model and always follow this API - see {@link Ext.data.proxy.Proxy} for a full list. * * Loading data via the Proxy is equally easy: * * //get a reference to the User model class * var User = Ext.ModelManager.getModel('User'); * * //Uses the configured RestProxy to make a GET request to /users/123 * User.load(123, { * success: function(user) { * console.log(user.getId()); //logs 123 * } * }); * * Models can also be updated and destroyed easily: * * //the user Model we loaded in the last snippet: * user.set('name', 'Edward Spencer'); * * //tells the Proxy to save the Model. In this case it will perform a PUT request to /users/123 as this Model already has an id * user.save({ * success: function() { * console.log('The User was updated'); * } * }); * * //tells the Proxy to destroy the Model. Performs a DELETE request to /users/123 * user.erase({ * success: function() { * console.log('The User was destroyed!'); * } * }); * * # Usage in Stores * * It is very common to want to load a set of Model instances to be displayed and manipulated in the UI. We do this by * creating a {@link Ext.data.Store Store}: * * var store = Ext.create('Ext.data.Store', { * model: 'User' * }); * * //uses the Proxy we set up on Model to load the Store data * store.load(); * * A Store is just a collection of Model instances - usually loaded from a server somewhere. Store can also maintain a * set of added, updated and removed Model instances to be synchronized with the server via the Proxy. See the {@link * Ext.data.Store Store docs} for more information on Stores. * * ###Further Reading * [Sencha Touch Data Overview](../../../core_concepts/data/data_package_overview.html) * [Sencha Touch Store Guide](../../../core_concepts/data/stores.html) * [Sencha Touch Models Guide](../../../core_concepts/data/models.html) * [Sencha Touch Proxy Guide](../../../core_concepts/data/proxies.html) */ Ext.define('Ext.data.Model', { alternateClassName: 'Ext.data.Record', mixins: { observable: 'Ext.mixin.Observable' }, /** * Provides an easy way to quickly determine if a given class is a Model * @property isModel * @type Boolean * @private */ isModel: true, requires: [ 'Ext.util.Collection', 'Ext.data.Field', 'Ext.data.identifier.Simple', 'Ext.data.ModelManager', 'Ext.data.proxy.Ajax', 'Ext.data.association.HasMany', 'Ext.data.association.BelongsTo', 'Ext.data.association.HasOne', 'Ext.data.Errors' ], config: { /** * @cfg {String} idProperty * The name of the field treated as this Model's unique `id`. Note that this field * needs to have a type of 'auto'. Setting the field type to anything else will be undone by the * framework. This is because new records that are created without an `id`, will have one generated. */ idProperty: 'id', data: null, /** * @cfg {Object[]/String[]} fields * The {@link Ext.data.Model field} definitions for all instances of this Model. * * __Note:__ this does not set the *values* of each * field on an instance, it sets the collection of fields itself. * * Sample usage: * * Ext.define('MyApp.model.User', { * extend: 'Ext.data.Model', * * config: { * fields: [ * 'id', * {name: 'age', type: 'int'}, * {name: 'taxRate', type: 'float'} * ] * } * }); * @accessor */ fields: undefined, /** * @cfg {Object[]} validations * An array of {@link Ext.data.Validations validations} for this model. */ validations: null, /** * @cfg {Object[]} associations * An array of {@link Ext.data.association.Association associations} for this model. */ associations: null, /** * @cfg {String/Object/String[]/Object[]} hasMany * One or more {@link Ext.data.association.HasMany HasMany associations} for this model. */ hasMany: null, /** * @cfg {String/Object/String[]/Object[]} hasOne * One or more {@link Ext.data.association.HasOne HasOne associations} for this model. */ hasOne: null, /** * @cfg {String/Object/String[]/Object[]} belongsTo * One or more {@link Ext.data.association.BelongsTo BelongsTo associations} for this model. */ belongsTo: null, /** * @cfg {Object/Ext.data.Proxy} proxy * The string type of the default Model Proxy. * @accessor */ proxy: null, /** * @cfg {Object/String} identifier * The identifier strategy used when creating new instances of this Model that don't have an id defined. * By default this uses the simple identifier strategy that generates id's like 'ext-record-12'. If you are * saving these records in localstorage using a LocalStorage proxy you need to ensure that this identifier * strategy is set to something that always generates unique id's. We provide one strategy by default that * generates these unique id's which is the {@link Ext.data.identifier.Uuid} strategy. */ identifier: { type: 'simple' }, /** * @cfg {String} clientIdProperty * The name of a property that is used for submitting this Model's unique client-side identifier * to the server when multiple phantom records are saved as part of the same {@link Ext.data.Operation Operation}. * In such a case, the server response should include the client id for each record * so that the server response data can be used to update the client-side records if necessary. * This property cannot have the same name as any of this Model's fields. * @accessor */ clientIdProperty: 'clientId', /** * @method getIsErased Returns `true` if the record has been erased on the server. */ isErased: false, /** * @cfg {Boolean} useCache * Change this to `false` if you want to ensure that new instances are created for each id. For example, * this is needed when adding the same tree nodes to multiple trees. */ useCache: true }, staticConfigs: [ 'idProperty', 'fields', 'validations', 'associations', 'hasMany', 'hasOne', 'belongsTo', 'clientIdProperty', 'identifier', 'useCache', 'proxy' ], statics: { EDIT : 'edit', REJECT : 'reject', COMMIT : 'commit', cache: {}, generateProxyMethod: function(name) { return function() { var prototype = this.prototype; return prototype[name].apply(prototype, arguments); }; }, generateCacheId: function(record, id) { var modelName; if (record && record.isModel) { modelName = record.modelName; if (id === undefined) { id = record.getId(); } } else { modelName = record; } return modelName.replace(/\./g, '-').toLowerCase() + '-' + id; } }, inheritableStatics: { /** * Asynchronously loads a model instance by id. Sample usage: * * MyApp.User = Ext.define('User', { * extend: 'Ext.data.Model', * fields: [ * {name: 'id', type: 'int'}, * {name: 'name', type: 'string'} * ] * }); * * MyApp.User.load(10, { * scope: this, * failure: function(record, operation) { * //do something if the load failed * }, * success: function(record, operation) { * //do something if the load succeeded * }, * callback: function(record, operation) { * //do something whether the load succeeded or failed * } * }); * * @param {Number} id The id of the model to load * @param {Object} [config] Config object containing fields: * @param {Function} config.success Called on success. * @param {Function} config.failure Called on failure. * @param {Function} config.callback Called after load. * @param {Object} config.scope Value of `this` in the above functions. * @param {Object} [scope] Same as `config.scope`. * @static * @inheritable */ load: function(id, config, scope) { var proxy = this.getProxy(), idProperty = this.getIdProperty(), record = null, params = {}, callback, operation; scope = scope || (config && config.scope) || this; if (Ext.isFunction(config)) { config = { callback: config, scope: scope }; } params[idProperty] = id; config = Ext.apply({}, config); config = Ext.applyIf(config, { action: 'read', params: params, model: this }); operation = Ext.create('Ext.data.Operation', config); if (!proxy) { Ext.Logger.error('You are trying to load a model that doesn\'t have a Proxy specified'); } callback = function(operation) { if (operation.wasSuccessful()) { record = operation.getRecords()[0] || null; Ext.callback(config.success, scope, [record, operation]); } else { Ext.callback(config.failure, scope, [record, operation]); } Ext.callback(config.callback, scope, [record, operation]); }; proxy.read(operation, callback, this); } }, /** * @property {Boolean} editing * @readonly * Internal flag used to track whether or not the model instance is currently being edited. */ editing : false, /** * @property {Boolean} dirty * @readonly * `true` if this Record has been modified. */ dirty : false, /** * @property {Boolean} phantom * `true` when the record does not yet exist in a server-side database (see {@link #setDirty}). * Any record which has a real database pk set as its id property is NOT a phantom -- it's real. */ phantom : false, /** * Creates new Model instance. * @param {Object} data An object containing keys corresponding to this model's fields, and their associated values. * @param {Number} id (optional) Unique ID to assign to this model instance. * @param {Object} [raw] * @param {Object} [convertedData] */ constructor: function(data, id, raw, convertedData) { var me = this, cached = null, useCache = me.getUseCache(), idProperty = me.getIdProperty(); data = data || convertedData || {}; // We begin by checking if an id is passed to the constructor. If this is the case we override // any possible id value that was passed in the data. if (id || id === 0) { // Lets skip using set here since it's so much faster data[idProperty] = me.internalId = id; } // If we have an id set in the data we check to see if we already have a cached instance // of this record. If that's the case then we just return that instance with the updated data // passed to this constructor. id = data[idProperty]; if (useCache && (id || id === 0)) { cached = Ext.data.Model.cache[Ext.data.Model.generateCacheId(this, id)]; if (cached) { cached.raw = raw || cached.raw; return cached.mergeData(convertedData || data || {}); } } /** * @property {Object} modified key/value pairs of all fields whose values have changed. * The value is the original value for the field. */ me.modified = {}; /** * @property {Object} raw The raw data used to create this model if created via a reader. */ me.raw = raw || data || {}; /** * @property {Array} stores * An array of {@link Ext.data.Store} objects that this record is bound to. */ me.stores = []; if (convertedData) { me.setConvertedData(data); } else { me.setData(data); } // me.id is always set to be randomly generated and should only be used for binding Observable events! me.id = me.getIdentifier().generate(me); // If it does not have an id in the data at this point, we use the one generated by the id strategy. // This means that we will treat this record as a phantom record from now on id = me.data[idProperty]; if (!id && id !== 0) { me.data[idProperty] = me.internalId = me.id; me.phantom = true; // If we only now set an id on this model, it means we setData won't have handled the inline // association data, which we will have to do now then. if (this.associations.length) { this.handleInlineAssociationData(data); } } else { // We also want to make sure that the internalId has the same value as the id in // the data object. this.internalId = id; } if (useCache) { Ext.data.Model.cache[Ext.data.Model.generateCacheId(me)] = me; } if (this.init && typeof this.init == 'function') { this.init(); } }, /** * Private function that is used when you create a record that already exists in the model cache. * In this case we loop over each field, and apply any data to the current instance that is not already * marked as being dirty on that instance. * @param {Object} data * @return {Ext.data.Model} This record. * @private */ mergeData: function(rawData) { var me = this, fields = me.getFields().items, ln = fields.length, modified = me.modified, modifiedFieldNames = [], data = me.data, i, field, fieldName, value, id; for (i = 0; i < ln; i++) { field = fields[i]; fieldName = field._name; value = rawData[fieldName]; if (value !== undefined && !modified.hasOwnProperty(fieldName)) { if (field._convert) { value = field._convert(value, me); } if(data[fieldName] !== value) { if(modifiedFieldNames.length === 0 && !me.editing) { this.beginEdit() } modifiedFieldNames.push(fieldName); } data[fieldName] = value; } else if (Ext.isFunction(field._convert)) { value = field._convert(value, me); data[fieldName] = value; } } if (me.associations.length) { me.handleInlineAssociationData(rawData); } if(modifiedFieldNames.length > 0 && me.editing) { this.endEdit(false, modifiedFieldNames); } return this; }, /** * This method is used to set the data for this Record instance. * Note that the existing data is removed. If a field is not specified * in the passed data it will use the field's default value. If a convert * method is specified for the field it will be called on the value. * @param {Object} rawData * @return {Ext.data.Model} This record. */ setData: function(rawData) { var me = this, fields = me.fields.items, ln = fields.length, isArray = Ext.isArray(rawData), data = me._data = me.data = {}, i, field, name, value, convert, id; if (!rawData) { return me; } for (i = 0; i < ln; i++) { field = fields[i]; name = field._name; convert = field._convert; if (isArray) { value = rawData[i]; } else { value = rawData[name]; if (typeof value == 'undefined') { value = field._defaultValue; } } if (convert) { value = field._convert(value, me); } data[name] = value; } id = me.getId(); if (me.associations.length && (id || id === 0)) { me.handleInlineAssociationData(rawData); } return me; }, handleInlineAssociationData: function(data) { var associations = this.associations.items, ln = associations.length, i, association, associationData, reader, proxy, associationKey; data = Ext.apply({}, data, this.raw); for (i = 0; i < ln; i++) { association = associations[i]; associationKey = association.getAssociationKey(); associationData = data[associationKey]; if (associationData) { reader = association.getReader(); if (!reader) { proxy = association.getAssociatedModel().getProxy(); // if the associated model has a Reader already, use that, otherwise attempt to create a sensible one if (proxy) { reader = proxy.getReader(); } else { reader = new Ext.data.JsonReader({ model: association.getAssociatedModel() }); } } association.read(this, reader, associationData); } } }, /** * Sets the model instance's id field to the given id. * @param {Number/String} id The new id */ setId: function(id) { var currentId = this.getId(); // Lets use the direct property instead of getter here this.set(this.getIdProperty(), id); // We don't update the this.id since we don't want to break listeners that already // exist on the record instance. this.internalId = id; if (this.getUseCache()) { delete Ext.data.Model.cache[Ext.data.Model.generateCacheId(this, currentId)]; Ext.data.Model.cache[Ext.data.Model.generateCacheId(this)] = this; } }, /** * Returns the unique ID allocated to this model instance as defined by {@link #idProperty}. * @return {Number/String} The `id`. */ getId: function() { // Lets use the direct property instead of getter here return this.get(this.getIdProperty()); }, /** * This sets the data directly without converting and applying default values. * This method is used when a Record gets instantiated by a Reader. Only use * this when you are sure you are passing correctly converted data. * @param {Object} data * @return {Ext.data.Model} This Record. */ setConvertedData: function(data) { this._data = this.data = data; return this; }, /** * Returns the value of the given field. * @param {String} fieldName The field to fetch the value for. * @return {Object} The value. */ get: function(fieldName) { return this.data[fieldName]; }, /** * Sets the given field to the given value, marks the instance as dirty. * @param {String/Object} fieldName The field to set, or an object containing key/value pairs. * @param {Object} value The value to set. */ set: function(fieldName, value) { var me = this, // We are using the fields map since it saves lots of function calls fieldMap = me.fields.map, modified = me.modified, notEditing = !me.editing, modifiedCount = 0, modifiedFieldNames = [], field, key, i, currentValue, ln, convert; /* * If we're passed an object, iterate over that object. NOTE: we pull out fields with a convert function and * set those last so that all other possible data is set before the convert function is called */ if (arguments.length == 1) { for (key in fieldName) { if (fieldName.hasOwnProperty(key)) { //here we check for the custom convert function. Note that if a field doesn't have a convert function, //we default it to its type's convert function, so we have to check that here. This feels rather dirty. field = fieldMap[key]; if (field && field.hasCustomConvert()) { modifiedFieldNames.push(key); continue; } if (!modifiedCount && notEditing) { me.beginEdit(); } ++modifiedCount; me.set(key, fieldName[key]); } } ln = modifiedFieldNames.length; if (ln) { if (!modifiedCount && notEditing) { me.beginEdit(); } modifiedCount += ln; for (i = 0; i < ln; i++) { field = modifiedFieldNames[i]; me.set(field, fieldName[field]); } } if (notEditing && modifiedCount) { me.endEdit(false, modifiedFieldNames); } } else if(modified) { field = fieldMap[fieldName]; convert = field && field.getConvert(); if (convert) { value = convert.call(field, value, me); } currentValue = me.data[fieldName]; me.data[fieldName] = value; if (field && !me.isEqual(currentValue, value)) { if (modified.hasOwnProperty(fieldName)) { if (me.isEqual(modified[fieldName], value)) { // the original value in me.modified equals the new value, so the // field is no longer modified delete modified[fieldName]; // we might have removed the last modified field, so check to see if // there are any modified fields remaining and correct me.dirty: me.dirty = false; for (key in modified) { if (modified.hasOwnProperty(key)) { me.dirty = true; break; } } } } else { me.dirty = true; // We only go one level back? modified[fieldName] = currentValue; } } if (notEditing) { me.afterEdit([fieldName], modified); } } }, /** * Checks if two values are equal, taking into account certain * special factors, for example dates. * @private * @param {Object} a The first value. * @param {Object} b The second value. * @return {Boolean} `true` if the values are equal. */ isEqual: function(a, b){ if (Ext.isDate(a) && Ext.isDate(b)) { return a.getTime() === b.getTime(); } return a === b; }, /** * Begins an edit. While in edit mode, no events (e.g. the `update` event) are relayed to the containing store. * When an edit has begun, it must be followed by either {@link #endEdit} or {@link #cancelEdit}. */ beginEdit: function() { var me = this; if (!me.editing) { me.editing = true; // We save the current states of dirty, data and modified so that when we // cancel the edit, we can put it back to this state me.dirtySave = me.dirty; me.dataSave = Ext.apply({}, me.data); me.modifiedSave = Ext.apply({}, me.modified); } }, /** * Cancels all changes made in the current edit operation. */ cancelEdit: function() { var me = this; if (me.editing) { me.editing = false; // Reset the modified state, nothing changed since the edit began me.modified = me.modifiedSave; me.data = me.dataSave; me.dirty = me.dirtySave; // Delete the saved states delete me.modifiedSave; delete me.dataSave; delete me.dirtySave; } }, /** * Ends an edit. If any data was modified, the containing store is notified (ie, the store's `update` event will * fire). * @param {Boolean} silent `true` to not notify the store of the change. * @param {String[]} modifiedFieldNames Array of field names changed during edit. */ endEdit: function(silent, modifiedFieldNames) { var me = this; if (me.editing) { me.editing = false; if (silent !== true && (me.changedWhileEditing())) { me.afterEdit(modifiedFieldNames || Ext.Object.getKeys(this.modified), this.modified); } delete me.modifiedSave; delete me.dataSave; delete me.dirtySave; } }, /** * Checks if the underlying data has changed during an edit. This doesn't necessarily * mean the record is dirty, however we still need to notify the store since it may need * to update any views. * @private * @return {Boolean} `true` if the underlying data has changed during an edit. */ changedWhileEditing: function() { var me = this, saved = me.dataSave, data = me.data, key; for (key in data) { if (data.hasOwnProperty(key)) { if (!me.isEqual(data[key], saved[key])) { return true; } } } return false; }, /** * Gets a hash of only the fields that have been modified since this Model was created or committed. * @return {Object} */ getChanges : function() { var modified = this.modified, changes = {}, field; for (field in modified) { if (modified.hasOwnProperty(field)) { changes[field] = this.get(field); } } return changes; }, /** * Returns `true` if the passed field name has been `{@link #modified}` since the load or last commit. * @param {String} fieldName {@link Ext.data.Field#name} * @return {Boolean} */ isModified : function(fieldName) { return this.modified.hasOwnProperty(fieldName); }, /** * Saves the model instance using the configured proxy. * * @param {Object/Function} [options] Options to pass to the proxy. Config object for {@link * Ext.data.Operation}. If you pass a function, this will automatically become the callback * method. For convenience the config object may also contain `success` and `failure` methods in * addition to `callback` - they will all be invoked with the Model and Operation as arguments. * * @param {Object} [scope] The scope to run your callback method in. This is only used if you * passed a function as the first argument. * * @return {Ext.data.Model} The Model instance */ save: function(options, scope) { var me = this, action = me.phantom ? 'create' : 'update', proxy = me.getProxy(), operation, callback; if (!proxy) { Ext.Logger.error('You are trying to save a model instance that doesn\'t have a Proxy specified'); } options = options || {}; scope = scope || me; if (Ext.isFunction(options)) { options = { callback: options, scope: scope }; } Ext.applyIf(options, { records: [me], action : action, model: me.self }); operation = Ext.create('Ext.data.Operation', options); callback = function(operation) { if (operation.wasSuccessful()) { Ext.callback(options.success, scope, [me, operation]); } else { Ext.callback(options.failure, scope, [me, operation]); } Ext.callback(options.callback, scope, [me, operation]); }; proxy[action](operation, callback, me); return me; }, /** * Destroys the record using the configured proxy. This will create a 'destroy' operation. * Note that this doesn't destroy this instance after the server comes back with a response. * It will however call `afterErase` on any Stores it is joined to. Stores by default will * automatically remove this instance from their data collection. * * @param {Object/Function} options Options to pass to the proxy. Config object for {@link Ext.data.Operation}. * If you pass a function, this will automatically become the callback method. For convenience the config * object may also contain `success` and `failure` methods in addition to `callback` - they will all be invoked * with the Model and Operation as arguments. * @param {Object} scope The scope to run your callback method in. This is only used if you passed a function * as the first argument. * @return {Ext.data.Model} The Model instance. */ erase: function(options, scope) { var me = this, proxy = this.getProxy(), operation, callback; if (!proxy) { Ext.Logger.error('You are trying to erase a model instance that doesn\'t have a Proxy specified'); } options = options || {}; scope = scope || me; if (Ext.isFunction(options)) { options = { callback: options, scope: scope }; } Ext.applyIf(options, { records: [me], action : 'destroy', model: this.self }); operation = Ext.create('Ext.data.Operation', options); callback = function(operation) { if (operation.wasSuccessful()) { Ext.callback(options.success, scope, [me, operation]); } else { Ext.callback(options.failure, scope, [me, operation]); } Ext.callback(options.callback, scope, [me, operation]); }; proxy.destroy(operation, callback, me); return me; }, /** * Usually called by the {@link Ext.data.Store} to which this model instance has been {@link #join joined}. Rejects * all changes made to the model instance since either creation, or the last commit operation. Modified fields are * reverted to their original values. * * Developers should subscribe to the {@link Ext.data.Store#update} event to have their code notified of reject * operations. * * @param {Boolean} [silent=false] (optional) `true` to skip notification of the owning store of the change. */ reject: function(silent) { var me = this, modified = me.modified, field; for (field in modified) { if (modified.hasOwnProperty(field)) { if (typeof modified[field] != "function") { me.data[field] = modified[field]; } } } me.dirty = false; me.editing = false; me.modified = {}; if (silent !== true) { me.afterReject(); } }, /** * Usually called by the {@link Ext.data.Store} which owns the model instance. Commits all changes made to the * instance since either creation or the last commit operation. * * Developers should subscribe to the {@link Ext.data.Store#update} event to have their code notified of commit * operations. * * @param {Boolean} [silent=false] (optional) `true` to skip notification of the owning store of the change. */ commit: function(silent) { var me = this, modified = this.modified; me.phantom = me.dirty = me.editing = false; me.modified = {}; if (silent !== true) { me.afterCommit(modified); } }, /** * @private * If this Model instance has been {@link #join joined} to a {@link Ext.data.Store store}, the store's * `afterEdit` method is called. * @param {String[]} modifiedFieldNames Array of field names changed during edit. * @param {Object} modified */ afterEdit : function(modifiedFieldNames, modified) { this.notifyStores('afterEdit', modifiedFieldNames, modified); }, /** * @private * If this Model instance has been {@link #join joined} to a {@link Ext.data.Store store}, the store's * `afterReject` method is called. */ afterReject : function() { this.notifyStores("afterReject"); }, /** * @private * If this Model instance has been {@link #join joined} to a {@link Ext.data.Store store}, the store's * `afterCommit` method is called. */ afterCommit: function(modified) { this.notifyStores('afterCommit', Ext.Object.getKeys(modified || {}), modified); }, /** * @private * Helper function used by {@link #afterEdit}, {@link #afterReject}, and {@link #afterCommit}. Calls the given method on the * {@link Ext.data.Store store} that this instance has {@link #join join}ed, if any. The store function * will always be called with the model instance as its single argument. * @param {String} fn The function to call on the store. */ notifyStores: function(fn) { var args = Ext.Array.clone(arguments), stores = this.stores; if (Ext.isArray(stores)) { var ln = stores.length, i, store; args[0] = this; for (i = 0; i < ln; ++i) { store = stores[i]; if (store !== undefined && typeof store[fn] == "function") { store[fn].apply(store, args); } } } }, /** * Creates a copy (clone) of this Model instance. * * @param {String} id A new `id`. If you don't specify this a new `id` will be generated for you. * To generate a phantom instance with a new `id` use: * * var rec = record.copy(); // clone the record with a new id * * @return {Ext.data.Model} */ copy: function(newId) { var me = this, idProperty = me.getIdProperty(), raw = Ext.apply({}, me.raw), data = Ext.apply({}, me.data); delete raw[idProperty]; delete data[idProperty]; return new me.self(null, newId, raw, data); }, /** * Returns an object containing the data set on this record. This method also allows you to * retrieve all the associated data. Note that if you should always use this method if you * need all the associated data, since the data property on the record instance is not * ensured to be updated at all times. * @param {Boolean} includeAssociated `true` to include the associated data. * @return {Object} The data. */ getData: function(includeAssociated) { var data = this.data; if (includeAssociated === true) { Ext.apply(data, this.getAssociatedData()); } return data; }, /** * Gets all of the data from this Models *loaded* associations. It does this recursively - for example if we have a * User which `hasMany` Orders, and each Order `hasMany` OrderItems, it will return an object like this: * * { * orders: [ * { * id: 123, * status: 'shipped', * orderItems: [ * // ... * ] * } * ] * } * * @return {Object} The nested data set for the Model's loaded associations. */ getAssociatedData: function() { return this.prepareAssociatedData(this, [], null); }, /** * @private * This complex-looking method takes a given Model instance and returns an object containing all data from * all of that Model's *loaded* associations. See {@link #getAssociatedData} * @param {Ext.data.Model} record The Model instance * @param {String[]} ids PRIVATE. The set of Model instance `internalIds` that have already been loaded * @param {String} associationType (optional) The name of the type of association to limit to. * @return {Object} The nested data set for the Model's loaded associations. */ prepareAssociatedData: function(record, ids, associationType) { //we keep track of all of the internalIds of the models that we have loaded so far in here var associations = record.associations.items, associationCount = associations.length, associationData = {}, recursiveAssociationQueue = [], associatedStore, associationName, associatedRecords, associatedRecord, associatedRecordCount, association, id, i, j, type, allow, recursiveAssociationItem; for (i = 0; i < associationCount; i++) { association = associations[i]; associationName = association.getName(); type = association.getType(); allow = true; if (associationType) { allow = type == associationType; } if (allow && type.toLowerCase() == 'hasmany') { //this is the hasMany store filled with the associated data associatedStore = record[association.getStoreName()]; //we will use this to contain each associated record's data associationData[associationName] = []; //if it's loaded, put it into the association data if (associatedStore && associatedStore.getCount() > 0) { associatedRecords = associatedStore.data.items; associatedRecordCount = associatedRecords.length; recursiveAssociationQueue.length = 0; //now we're finally iterating over the records in the association. We do this recursively for (j = 0; j < associatedRecordCount; j++) { associatedRecord = associatedRecords[j]; // Use the id, since it is prefixed with the model name, guaranteed to be unique id = associatedRecord.id; //when we load the associations for a specific model instance we add it to the set of loaded ids so that //we don't load it twice. If we don't do this, we can fall into endless recursive loading failures. if (Ext.Array.indexOf(ids, id) == -1) { ids.push(id); associationData[associationName][j] = associatedRecord.getData(); recursiveAssociationQueue.push({ associationName:associationName, j:j, associatedRecord:associatedRecord, ids:ids, associationType:associationType }); } } while (recursiveAssociationQueue.length > 0) { recursiveAssociationItem = recursiveAssociationQueue.shift(); Ext.apply(associationData[recursiveAssociationItem.associationName][recursiveAssociationItem.j], this.prepareAssociatedData(recursiveAssociationItem.associatedRecord, recursiveAssociationItem.ids, recursiveAssociationItem.associationType)); } } } else if (allow && (type.toLowerCase() == 'belongsto' || type.toLowerCase() == 'hasone')) { associatedRecord = record[association.getInstanceName()]; if (associatedRecord !== undefined) { id = associatedRecord.id; if (Ext.Array.indexOf(ids, id) === -1) { ids.push(id); associationData[associationName] = associatedRecord.getData(); Ext.apply(associationData[associationName], this.prepareAssociatedData(associatedRecord, ids, associationType)); } } } } return associationData; }, /** * By joining this model to an instance of a class, this model will automatically try to * call certain template methods on that instance ({@link #afterEdit}, {@link #afterCommit}, {@link Ext.data.Store#afterErase}). * For example, a Store calls join and unjoin whenever you add or remove a record to it's data collection. * This way a Store can get notified of any changes made to this record. * This functionality is usually only required when creating custom components. * @param {Ext.data.Store} store The store to which this model has been added. */ join: function(store) { Ext.Array.include(this.stores, store); }, /** * This un-joins this record from an instance of a class. Look at the documentation for {@link #join} * for more information about joining records to class instances. * @param {Ext.data.Store} store The store from which this model has been removed. */ unjoin: function(store) { Ext.Array.remove(this.stores, store); }, /** * Marks this **Record** as `{@link #dirty}`. This method is used internally when adding `{@link #phantom}` records * to a {@link Ext.data.proxy.Server#writer writer enabled store}. * * Marking a record `{@link #dirty}` causes the phantom to be returned by {@link Ext.data.Store#getUpdatedRecords} * where it will have a create action composed for it during {@link Ext.data.Model#save model save} operations. */ setDirty : function() { var me = this, name; me.dirty = true; me.fields.each(function(field) { if (field.getPersist()) { name = field.getName(); me.modified[name] = me.get(name); } }); }, /** * Validates the current data against all of its configured {@link #cfg-validations}. * @return {Ext.data.Errors} The errors object. */ validate: function() { var errors = Ext.create('Ext.data.Errors'), validations = this.getValidations().items, validators = Ext.data.Validations, length, validation, field, valid, type, i; if (validations) { length = validations.length; for (i = 0; i < length; i++) { validation = validations[i]; field = validation.field || validation.name; type = validation.type; valid = validators[type](validation, this.get(field)); if (!valid) { errors.add(Ext.create('Ext.data.Error', { field : field, message: validation.message || validators.getMessage(type) })); } } } return errors; }, /** * Checks if the model is valid. See {@link #validate}. * @return {Boolean} `true` if the model is valid. */ isValid: function(){ return this.validate().isValid(); }, /** * Returns a url-suitable string for this model instance. By default this just returns the name of the Model class * followed by the instance ID - for example an instance of MyApp.model.User with ID 123 will return 'user/123'. * @return {String} The url string for this model instance. */ toUrl: function() { var pieces = this.$className.split('.'), name = pieces[pieces.length - 1].toLowerCase(); return name + '/' + this.getId(); }, /** * Destroys this model instance. Note that this doesn't do a 'destroy' operation. If you want to destroy * the record in your localStorage or on the server you should use the {@link #erase} method. */ destroy: function() { var me = this; me.notifyStores('afterErase', me); if (me.getUseCache()) { delete Ext.data.Model.cache[Ext.data.Model.generateCacheId(me)]; } me.raw = me.stores = me.modified = null; me.callParent(arguments); }, //<debug> markDirty : function() { if (Ext.isDefined(Ext.Logger)) { Ext.Logger.deprecate('Ext.data.Model: markDirty has been deprecated. Use setDirty instead.'); } return this.setDirty.apply(this, arguments); }, //</debug> applyProxy: function(proxy, currentProxy) { return Ext.factory(proxy, Ext.data.Proxy, currentProxy, 'proxy'); }, updateProxy: function(proxy) { if (proxy) { proxy.setModel(this.self); } }, applyAssociations: function(associations) { if (associations) { this.addAssociations(associations, 'hasMany'); } }, applyBelongsTo: function(belongsTo) { if (belongsTo) { this.addAssociations(belongsTo, 'belongsTo'); } }, applyHasMany: function(hasMany) { if (hasMany) { this.addAssociations(hasMany, 'hasMany'); } }, applyHasOne: function(hasOne) { if (hasOne) { this.addAssociations(hasOne, 'hasOne'); } }, addAssociations: function(associations, defaultType) { var ln, i, association, name = this.self.modelName, associationsCollection = this.self.associations, onCreatedFn; associations = Ext.Array.from(associations); for (i = 0, ln = associations.length; i < ln; i++) { association = associations[i]; if (!Ext.isObject(association)) { association = {model: association}; } Ext.applyIf(association, { type: defaultType, ownerModel: name, associatedModel: association.model }); delete association.model; onCreatedFn = Ext.Function.bind(function(associationName) { associationsCollection.add(Ext.data.association.Association.create(this)); }, association); Ext.ClassManager.onCreated(onCreatedFn, this, (typeof association.associatedModel === 'string') ? association.associatedModel : Ext.getClassName(association.associatedModel)); } }, applyValidations: function(validations) { if (validations) { if (!Ext.isArray(validations)) { validations = [validations]; } this.addValidations(validations); } }, addValidations: function(validations) { this.self.validations.addAll(validations); }, /** * @method setFields * Updates the collection of Fields that all instances of this Model use. **Does not** update field values in a Model * instance (use {@link #set} for that), instead this updates which fields are available on the Model class. This * is normally used when creating or updating Model definitions dynamically, for example if you allow your users to * define their own Models and save the fields configuration to a database, this method allows you to change those * fields later. * @return {Array} */ applyFields: function(fields) { var superFields = this.superclass.fields; if (superFields) { fields = superFields.items.concat(fields || []); } return fields || []; }, updateFields: function(fields) { var ln = fields.length, me = this, prototype = me.self.prototype, idProperty = this.getIdProperty(), idField, fieldsCollection, field, i; /** * @property {Ext.util.MixedCollection} fields * The fields defined on this model. */ fieldsCollection = me._fields = me.fields = new Ext.util.Collection(prototype.getFieldName); for (i = 0; i < ln; i++) { field = fields[i]; if (!field.isField) { field = new Ext.data.Field(fields[i]); } fieldsCollection.add(field); } // We want every Model to have an id property field idField = fieldsCollection.get(idProperty); if (!idField) { fieldsCollection.add(new Ext.data.Field(idProperty)); } else { idField.setType('auto'); } fieldsCollection.addSorter(prototype.sortConvertFields); }, applyIdentifier: function(identifier) { if (typeof identifier === 'string') { identifier = { type: identifier }; } return Ext.factory(identifier, Ext.data.identifier.Simple, this.getIdentifier(), 'data.identifier'); }, /** * This method is used by the fields collection to retrieve the key for a field * based on it's name. * @param {String} field * @return {String} * @private */ getFieldName: function(field) { return field.getName(); }, /** * This method is being used to sort the fields based on their convert method. If * a field has a custom convert method, we ensure its more to the bottom of the collection. * @param {String} field1 * @param {String} field2 * @return {Number} * @private */ sortConvertFields: function(field1, field2) { var f1SpecialConvert = field1.hasCustomConvert(), f2SpecialConvert = field2.hasCustomConvert(); if (f1SpecialConvert && !f2SpecialConvert) { return 1; } if (!f1SpecialConvert && f2SpecialConvert) { return -1; } return 0; }, /** * @private */ onClassExtended: function(cls, data, hooks) { var onBeforeClassCreated = hooks.onBeforeCreated, Model = this, prototype = Model.prototype, configNameCache = Ext.Class.configNameCache, staticConfigs = prototype.staticConfigs.concat(data.staticConfigs || []), defaultConfig = prototype.config, config = data.config || {}, key; // Convert old properties in data into a config object // <deprecated product=touch since=2.0> if (data.idgen || config.idgen) { config.identifier = data.idgen || config.idgen; // <debug warn> Ext.Logger.deprecate('idgen is deprecated as a property. Please put it inside the config object' + ' under the new "identifier" configuration'); // </debug> } for (key in defaultConfig) { if (key in data) { config[key] = data[key]; delete data[key]; // <debug warn> Ext.Logger.deprecate(key + ' is deprecated as a property directly on the Model prototype. ' + 'Please put it inside the config object.'); // </debug> } } // </deprecated> data.config = config; hooks.onBeforeCreated = function(cls, data) { var dependencies = [], prototype = cls.prototype, statics = {}, config = prototype.config, staticConfigsLn = staticConfigs.length, copyMethods = ['set', 'get'], copyMethodsLn = copyMethods.length, associations = config.associations || [], name = Ext.getClassName(cls), key, methodName, i, j, ln; // Create static setters and getters for each config option for (i = 0; i < staticConfigsLn; i++) { key = staticConfigs[i]; for (j = 0; j < copyMethodsLn; j++) { methodName = configNameCache[key][copyMethods[j]]; if (methodName in prototype) { statics[methodName] = Model.generateProxyMethod(methodName); } } } cls.addStatics(statics); // Save modelName on class and its prototype cls.modelName = name; prototype.modelName = name; // Take out dependencies on other associations and the proxy type if (config.belongsTo) { dependencies.push('association.belongsto'); } if (config.hasMany) { dependencies.push('association.hasmany'); } if (config.hasOne) { dependencies.push('association.hasone'); } for (i = 0,ln = associations.length; i < ln; ++i) { dependencies.push('association.' + associations[i].type.toLowerCase()); } if (config.identifier) { if (typeof config.identifier === 'string') { dependencies.push('data.identifier.' + config.identifier); } else if (typeof config.identifier.type === 'string') { dependencies.push('data.identifier.' + config.identifier.type); } } if (config.proxy) { if (typeof config.proxy === 'string') { dependencies.push('proxy.' + config.proxy); } else if (typeof config.proxy.type === 'string') { dependencies.push('proxy.' + config.proxy.type); } } if (config.validations) { dependencies.push('Ext.data.Validations'); } Ext.require(dependencies, function() { Ext.Function.interceptBefore(hooks, 'onCreated', function() { Ext.data.ModelManager.registerType(name, cls); var superCls = cls.prototype.superclass; /** * @property {Ext.util.Collection} associations * The associations defined on this model. */ cls.prototype.associations = cls.associations = cls.prototype._associations = (superCls && superCls.associations) ? superCls.associations.clone() : new Ext.util.Collection(function(association) { return association.getName(); }); /** * @property {Ext.util.Collection} validations * The validations defined on this model. */ cls.prototype.validations = cls.validations = cls.prototype._validations = (superCls && superCls.validations) ? superCls.validations.clone() : new Ext.util.Collection(function(validation) { return validation.field ? (validation.field + '-' + validation.type) : (validation.name + '-' + validation.type); }); cls.prototype = Ext.Object.chain(cls.prototype); cls.prototype.initConfig.call(cls.prototype, config); delete cls.prototype.initConfig; }); onBeforeClassCreated.call(Model, cls, data, hooks); }); }; } });


This page is an adaption of the example given here. This page demonstrates using React using just thee Github web interface, i.e: - We can edit code in Github online editor and changes will be automatically deployed to github pages. - There is no upload, download, local dev env etc. needed. This is fast for prototyping. On the other hand, React libs are loaded without removing unwanted parts. So production websites will be slower to load. For JSX support without building we have to use babel, which again increases the loading time and maybe degrades performance beyond just the website loading performance. Also Babel seems to have some issues with the ES6 import and export syntax. Alternatives are to directly use React.createElement() (simple, straightforward) or to use https://github.com/developit/htm


You're signed up to be automatically notified when your Meteor projects' dependencies need updating.
{{else}}Sign in to be automatically notified when your Meteor projects' dependencies need updating
{{> loginButtons}} {{/if}}A Meteor Global Hackathon project by @mrw34 | View on GitHub


---
layout: default
title: Postings filed under "Personal"
---
Postings filed under "Personal"
- October 09, 2010 - Quick update on everything as of late
- July 16, 2010 - To do list
- January 12, 2009 - A few short-term (and hopefully long-term) goals: this is, of course, the belated New Years Resolution Post
- March 21, 2008 - Quarter's done. Now...
- December 05, 2007 - Another week
- December 03, 2007 - Journeys
- November 21, 2007 - Inevitable academic probation
- November 08, 2007 - Good shit(s)
- September 04, 2007 - Café Allegro, and a chat with the owner
- August 14, 2007 - Smoking
- August 08, 2007 - Books


{% extends "base.html" %} {% block meta %}{% endblock %} {% block body %}
{{ _("Welcome to the SRCF's platform for events. For event organisers, this website allows you to host a custom web page that connects to our free video conferencing service, Timeout.") }}
{{ _("Log in with Raven") }} {% endblock %}


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 2
This salad has so much to celebrate: salty cured ham, juicy chicken breasts, crunchy croûtons and a creamy dressing. Wow.
Preheat the grill to high.
Place the speck or proscuitto onto a baking sheet and place under the grill for 3-4 minutes, or until crisp. Remove speck and place on a plate lined with kitchen paper to drain.
Cut both chicken breasts through the middle, without cutting through, to form one large flat piece. Season, to taste, with salt and black pepper and brush with olive oil.
Heat a griddle pan until hot then place the chicken breasts on it and cook for 2-3 minutes on each side, or until just cooked through.
Heat a frying pan until hot and add the butter and then the cubed bread. Fry until golden brown, then remove.
Separate the leaves from the lettuce and cut into chunky pieces.
For the dressing, in a medium saucepan, bring the garlic and wine to a boil and simmer for about 5 minutes, until the garlic has softened. Leave to cool.
Combine the wine and garlic with the egg yolks, anchovy and cheese in a mixing bowl. Blend with a hand blender or food processor until smooth. Drizzle in the oil in a thin steady stream, taking care not to add it too quickly, otherwise it could split and curdle. Stir in the mustard and add seasoning to taste.
Add the crisp-fried speck, croutons and lettuce to the dressing and toss to combine. To serve, place salad on plate, top with chicken and pour the dressing over.


Tags tokens based on entity chunks and tokens
Converts IOB or IOB2 representation of NER to user-friendly.
Works with different NER representations as tags Supports: IOB and IOB2 https://en.wikipedia.org/wiki/Inside%E2%80%93outside%E2%80%93beginning_(tagging)
Converts IOB or IOB2 representation of NER to user-friendly. See https://en.wikipedia.org/wiki/Inside%E2%80%93outside%E2%80%93beginning_(tagging)


DAZED AND CONFUSED A film review by David Landers Copyright 1997 David Landers
RATING: *** out of **** - 7.0 out of 10.0 CAST: Jason London (Randall "Pink" Floyd), Milla Jovovich (Michelle), Rory Cochrane (Slater), Sasha Jenson (Don Dawson), Joey Lauren Adams (Simone), Michelle Burke (Jodi), Wiley Wiggins (Mitch), Ben Affleck (O'Bannion), Matthew McConaughey (Wooderson) DIRECTOR: Richard Linklater CERTIFICATION: R (USA) for language, drug use, and mild violence YEAR OF PRODUCTION: 1993
First off, I must say that DAZED AND CONFUSED is definitely not my favorite type of movie. In fact, the only real reason I saw it was because of how everyone kept telling me how good it was. So, I decided to finally watch it, and I must say that it was actually better than I thought it would be, but it also could've been better.
DAZED AND CONFUSED seems to be a type of "hit and miss" in it's portrayal of the last day of school in a small Texas town in the year 1976. The incoming Seniors, now the rulers of the school, inflict the initiation rituals upon the soon-to-be Freshmen. For the Senior guys, the hazing is more physical than that of the Senior girls, who basically humiliate the younger Freshmen. The main target of the Senior guys pain-inflicting services, led mainly by O'Bannion (Ben Affleck), is Mitch (Wiley Wiggins). Mitch stands up to the hazing as best he can, and proves that he can take whatever they can dish out. This proves him well to the Seniors, and he is invited to "hang out" with them on their night of fun, which includes drinking, smoking marijuana, fighting, and even more.
Randall "Pink" Floyd (Jason London) is the star quarterback of the high school's football team.  But, the coach of the football team doesn't want this to be an option for him or any of the football players, and asks them to basically sign away their fun in favor of dedicating themselves to the football team.
And do they. Everyone and anyone. It's a night of fun, in their minds. One strange thing about the movie is that you really never figure out who it centers on. At times, it looks like Randall "Pink" Floyd is the main character, but then at other instances, it's almost definite that Mitch is the centerpiece. In my opinion, I think it is actually both characters who share the spotlight. Yet, I feel that the concentration on Mitch is the best overall. Here's a young boy, fresh out of junior high and heading into high school. After attempting to avoid the hazing of the Seniors, he shows courage and strength by standing up to them. Then, after being accepted into the group, he blends in strikingly well with the rest of the group. Very well done, indeed.
For some reason, I really enjoyed the performance of another character in the movie. This character, who did not emerge until late in the film, had a next to meaningless part in the film, yet I found him very likeable. The character is Wooderson, a high school drop out doing nothing with his life played very well by Matthew McConaughey. I guess it was just something about the character that I liked. Wooderson, despite his status, still hangs out with his old high school friends and does whatever they do. It was also his character who inspired Mitch to buy his first six pack of beer, another very good scene.
DAZED AND CONFUSED, which could be argued on its accuracy, seems to be a very well depicted look into the lives of teenagers of the 70's. And the diversity of the teenagers it expands on, from the respected jock to the pot-head stoner, is extremely unique and well done. Your interpretation of this film depends on the way you look at it and the way you look at the 70's, in general. Many people who experienced this era have said that this is a very accurate portrayal, but I'm sure there are those who think just the opposite. Watch it and judge for yourself.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


DIFlags
public struct DIFlags : OptionSet
Enumerates a set of flags that can be applied to metadata nodes to change their interpretation at compile time or attach additional semantic significance at runtime.
-
Declaration
Swift
public let rawValue: LLVMDIFlags.RawValue
-
Declaration
Swift
public init(rawValue: LLVMDIFlags.RawValue)
-
Denotes the
private
visibility attribute.Declaration
Swift
public static let `private`: DIFlags
-
Denotes the
protected
visibility attribute.Declaration
Swift
public static let protected: DIFlags
-
Denotes the
public
visibility attribute.Declaration
Swift
public static let `public`: DIFlags
-
Denotes a forward declaration.
Declaration
Swift
public static let forwardDeclaration: DIFlags
-
Denotes a block object.
Declaration
Swift
public static let appleBlock: DIFlags
-
Denotes a virtual function or dynamic dispatch.
Declaration
Swift
public static let virtual: DIFlags
-
Denotes a compiler-generated declaration that may not appear in source.
Declaration
Swift
public static let artificial: DIFlags
-
Denotes an
explicit
-annotated declaration.Declaration
Swift
public static let explicit: DIFlags
-
Denotes a prototype declaration.
Declaration
Swift
public static let prototyped: DIFlags
-
Denotes an Objective-C class whose definition is visible to the compiler.
Declaration
Swift
public static let objectiveCClassComplete: DIFlags
-
Denotes a pointer value that is known to point to a C++ or Objective-C object - usually
self
orthis
.Declaration
Swift
public static let objectPointer: DIFlags
-
Denotes a vector type.
Declaration
Swift
public static let vector: DIFlags
-
Denotes a static member.
Declaration
Swift
public static let staticMember: DIFlags
-
Denotes an lvalue reference.
Declaration
Swift
public static let lValueReference: DIFlags
-
Denotes an rvalue reference.
Declaration
Swift
public static let rValueReference: DIFlags
-
Denotes a class type that is part of a single inheritance class hierarchy. This flag is required to be set for CodeView compatibility.
Declaration
Swift
public static let singleInheritance: DIFlags
-
Denotes a class type that is part of a multiple inheritance class hierarchy. This flag is required to be set for CodeView compatibility.
Declaration
Swift
public static let multipleInheritance: DIFlags
-
Denotes a class type whose inheritance involves virtual members. This flag is required to be set for CodeView compatibility.
Declaration
Swift
public static let virtualInheritance: DIFlags
-
Denotes a class type that introduces virtual members. This is needed for the MS C++ ABI does not include all virtual methods from non-primary bases in the vtable for the most derived class
Declaration
Swift
public static let introducedVirtual: DIFlags
-
Denotes a bitfield type.
Declaration
Swift
public static let bitField: DIFlags
-
Denotes a
noreturn
function.Declaration
Swift
public static let noReturn: DIFlags
-
Denotes a parameter that is passed by value according to the target’s calling convention.
Declaration
Swift
public static let passByValue: DIFlags
-
Denotes a parameter that is passed by indirect reference according to the target’s calling convention.
Declaration
Swift
public static let passByReference: DIFlags
-
Denotes a “fixed enum” type e.g. a C++
enum class
.Declaration
Swift
public static let enumClass: DIFlags
-
Denotes a thunk function.
Declaration
Swift
public static let thunk: DIFlags
-
Denotes a class that has a non-trivial default constructor or is not trivially copiable.
Declaration
Swift
public static let nonTrivial: DIFlags
-
Denotes an indirect virtual base class.
Declaration
Swift
public static let indirectVirtualBase: DIFlags
-
The mask for
singleInheritance
,multipleInheritance
, andvirtualInheritance
.Declaration
Swift
public static let pointerToMemberRep: DIFlags


Navigating with Mood
This topic suggests some possible UI designs for mood-based playlists. The designs presented are suggestions only. The Mood APIs are flexible and can support most any type of UI that can be designed.
Slider Navigation
Slider Mood Navigation is shown below. Gracenote recommends this design because of its simplicity and ease-of-use in an automotive environment. It can support a touch-screen or scroll-wheel interface for selecting values. This design provides the ability to choose five discrete values on each dimension of Valence and Arousal.
Grid Navigation
Grid navigation is shown below. It is similar to the slider design.  With this design, the user can select 25 discrete values as cells on a two-dimensional grid of Valence/Arousal values. This design supports a touch-screen easily, but may be more difficult to map to a scroll-wheel interface. Grid navigation can implement a heat-map design to indicate the relative number of tracks matching each grid. For example, the more tracks there are in a cell, the darker the shade of the cell. In this example, the vertical axis corresponds to Valence values, and the horizontal axis corresponds to Arousal values.
Bubble Magnitude Navigation
Bubble Magnitude navigation is shown below. This interface differs by using state bubbles to show the user what moods exist in the collection. Bubbles that are filled-in contain tracks for that mood. The size of the bubble indicates the relative number of tracks (the magnitude) in that mood category. This is similar to the heat-map design used in Grid navigation.
The bubbles are placed in a Valence/Arousal grid to provide an intuitive way to select mood playlists. The implementation supports a touch screen easily, but may be more difficult to map to a scroll-wheel interface..
The example below shows Bubble Magnitude navigation for the Level 2 set of 100 moods. This implementation is based on the Gracenote Habu mobile application for the iPad. Automotive applications should provide Level 1 moods (25 bubbles). As in the other implementations, selecting a bubble creates a playlist for the Valence/Arousal value.
Other Mood Design Considerations
Whichever interface design you implement, your application should follow these guidelines when a user selects a mood.
- When the user selects a new mood, go directly to the Selection Results Browser with the refreshed playlist.
- After several seconds of Mood being active, go directly to Selection Results Browser and start playback of the tracks. This allows the user to activate Mood and continue to use the mood selection from the last time Mood was used.
In addition to the UI designs presented above, you can add other components to enhance the mood experience. Examples of these enhancements are:
- Voice Commands: Mood playlist navigation by voice is a feature that can improve the automobile music listening experience. As a mood playlist is playing for instance, a user could speak More Positive or Less Dark to have the playlist automatically adjust to their tastes. All of the interfaces presented above could support a voice interface like this, but the Slider navigation interface visually maps more directly to these commands.
- Genre Filtering: The Grid navigation interface can be further enhanced to include a genre filter button. This filter lets the user to refine mood playlist to specific genres. To keep the filter selection simple, limit the available genres to only those in the user’s collection. Your application can provide filters based on other track metadata as well, such as era and artist type.
- 100 Mood Option: Both Grid and Bubble Magnitude navigation interfaces can support Level 2 (100 moods). The Slider navigation interface can also support Level 2 using two dimensions of 10 buttons each. However, the Level 1 (25 mood) design is optimal for this interface.


BravoPh / SDR data decoder
Trigger level:
0-bit ratio:
1-bit ratio:
0/1 slop (+/-):
Input data:
Sample A
Sample B
Sample C
Sample D
Sample E (orig, BAD)
Sample E (modified, GOOD)
Sample F
Sample G
Sample H
(Play to begin)


| # | Team | S | M | L | O |
|---|---|---|---|---|---|
| 1 | Test Points | 10 | 0 | 5 | 1 |
| 2 | Test Points 2 | 10 | 0 | 5 | 1 |
| 3 | Test Points 3 | 10 | 0 | 5 | 1 |
| 4 | Test Points 4 | 10 | 0 | 5 | 1 |
| 5 | Test Points 5 | 10 | 0 | 5 | 1 |
| 6 | Test Points 6 | 10 | 0 | 5 | 1 |
| 7 | Test Points 7 | 10 | 0 | 5 | 1 |
| 8 | Test Points 8 | 10 | 0 | 5 | 1 |
| 9 | Test Points 9 | 10 | 0 | 5 | 1 |
| 10 | Test Points 10 | 10 | 0 | 5 | 1 |
| 11 | Test Points 11 | 10 | 0 | 5 | 1 |
| 12 | Test Points 12 | 10 | 0 | 5 | 1 |
| 13 | Test Points 13 | 10 | 0 | 5 | 1 |
| 14 | Test Points 14 | 10 | 0 | 5 | 1 |
| 15 | Test Points 15 | 10 | 0 | 5 | 1 |
| 16 | Test Points 16 | 10 | 0 | 5 | 1 |
| 17 | Test Points 17 | 10 | 0 | 5 | 1 |
| 18 | Test Points 18 | 10 | 0 | 5 | 1 |
| 19 | Test Points 19 | 10 | 0 | 5 | 1 |
| 20 | Test Points 20 | 10 | 0 | 5 | 1 |


My Visuals
As a researcher, I'm always looking for new ways to make information more accessible. My interests lie in the intersection between data, people, and technology.
- 01.15.2019 | Senate Vote Percentage
Most of my work uses the D3.js javascript library.
My visuals are run with a front-end Angular 5+ framework.
As a researcher, I'm always looking for new ways to make information more accessible. My interests lie in the intersection between data, people, and technology.


| ZotWeb | book | |
| Src Url | [[Graupe]] (2013) | |
undefined
Graupe, Ph.D
Citer: (Graupe, 2013)
FTag: Graupe-2013
APA7: Graupe, D. (2013). Principles of artificial neural networks (3rd edition). World Scientific.
University of Illinois, Chicago, USA
Introduction and Role of Artificial Neural Networks
he Perceptron’s Input-Output Princi
n Learning Proce
Predicting Price Movement in Market Microstructure viaLAMSTAR
he cognitron network employs both inhibitory and excitory neurons in its various layers
Cognition is a network designed mainly with recognition of patterns in mind.
#cognitron


Gophers drain 14 3-pointers, rout Central Michigan 82-57
by APMINNEAPOLIS — Marcus Carr had 19 points and Minnesota tied the second-best 3-point mark in school history with 14 made 3s in an 82-57 win against Central Michigan on Thursday night.
Payton Willis scored 18 points and Gabe Kalscheur added 15 for the Gophers (2-3), which were 14 of 30 from beyond the arc, the third game this season with double-digit made 3s. Kalscheur was 5 of 11 from 3-point territory, while Willis was 4 of 6.
Daniel Oturu added nine points, 12 rebounds and three blocks for Minnesota.
Kevin McKay led Central Michigan (4-1) with 16 points and eight rebounds. Dallas Morgan added 10 points for the Chippewas, who shot a season-low 33.3 percent (22 of 66).
The increased emphasis on the 3 comes with Carr and Willis in their first season with Minnesota after transferring, respectively, from Pittsburgh and Vanderbilt. The Gophers were among the nation’s least-productive teams from 3 last season and had just four games with double-digit made 3s.
The last time Minnesota had as many as 14 made 3s in a game was in 2002. The school record is 16, set against Michigan State in 2001.
Central Michigan went without a field goal in the final 2:35 of the first half as the Gophers built a 19-point advantage at halftime. Minnesota led by as many as 29 in the second half.
BIG PICTURE
Central Michigan: The first big test led to the first time struggling offensively for the Chippewas. Central Michigan entered the game second in the country in points per game (108.8) and scoring margin (plus-40). The Chippewas will see better defenses down the road and will need to shoot better.
Minnesota: With the 3s falling, the Gophers can be dangerous when considering Oturu’s ability inside. Returning home should help the feeling too, after three road losses to Power 5 teams. Minnesota can get comfortable and gain some confidence with a five-game homestand that started Thursday. More winnable games appear on the horizon before the homestand concludes against Clemson as part of the Big Ten/ACC Challenge.
UP NEXT
Central Michigan returns home on Saturday to face Trinity Christian for the first time, though the Chippewas are 17-0 against non-Division I teams under coach Keno Davis.
Minnesota’s season-long homestand continues Sunday evening against North Dakota, the first meeting between the two schools since Dec. 8, 2014.


ES6 EASY SPIRIT(ES) Boilerplate
A boilerplate for developing ES6+ apps using JSPM & Gulp for EASY SPIRIT.
JSPM
JSPM is an all-in-one command line tool for package management, module loading and transpilation. Read more about it here and here.
Requirements
- Global installed NodeJS (All features)
- Global installed git client
Boilerplate Features
- Uses JSPM instead of Bower to manage packages
- Transpiles ES6+ automagically using Babel via JSPM
- Uses SystemJS to load modules via JSPM
- SASS compilation using LibSass and Autoprefixer
- Local dev server with LiveReload using Gulp Connect
- Testing using Karma with Mocha + Chai (bonus: write your tests in ES6)
- Linting with ESLint and SCSS-Lint
- Generates documentation automatically using ESDoc and SassDoc
Usage
- Clone this repo from
https://bitbucket.easy.de/scm/esc/es-cfw-boilerplate.git
- Run
npm install
in the root directory - Run
gulp theme
- Run
gulp
ornpm start
to start the local dev server (you may need to install Gulp globally usingnpm install -g gulp
) - Write an awesome app! ☺
Testing
Run karma start
or npm test
to run tests once.
Run npm run test:watch
to run tests continuously.
Generating documentation
Run npm run docs
to generate documentation for your JavaScript and SASS automatically in the docs
folder.
Building
Run gulp build
or npm run build
to build the project for distribution in the dist
folder.
Browser Sync
More information about browser sync you can find here, following folders are supported
Source folder
Run gulp serve:src
Build folder
Run gulp serve:dist
Example folder
Run gulp serve:example
TODO´s
- Implement SonarQube (Code Analytic/Metric)
- ...more;-)


Step 1- Statement: 'I was reading about {{childChoice}} and found this fun fact:''
{{trivia.question}}
- No, the correct answer is...
{{trivia.correct_answer}}!
Step 2- Ask: Do you keep up on any {{childChoice}}?
Step 3- Listen: Pay attention to their response and nod along.
Step 4- If response is positive: Add something about yourself. Maybe riff on your favorite {{childChoice}}.
Step 5- If response is negative or conversation dwindles: Move to the next topic of conversation or ask, "What have you been up to lately?"
Remember: Take turns talking. Breathe, smile, and stay hydrated! Everyone feels awkward in conversation.


--- layout: post date: 2010-06-04 time: "09:00:00" authors: ["Greg Wilson"] title: Concept Map tags: ["Content"] ---
While re-designing the Software Carpentry course, I have realized that we rely over and over again on some underyling concepts that are hard to capture as lecture topics. I think these concepts are the heart of any useful definition of "computational thinking". The diagram below is a first attempt to capture what these concepts are and how they're related. (The list below the diagram summarizes the relationships in textual form for easier reading.) Suggestions for improvements would be very welcome...
| A model | is implemented as a | data structure |
| A model | must account for | missing or incomplete information |
| A data format | conforms to a | model |
| Instructions | for a computer are abstracted as an | algorithm |
| An algorithm | operates on a | model |
| Choice of algorithm | determines | machine performance |
| Data | is abstracted as a | model |
| Data | almost always has | missing or incomplete information |
| An archive | stores | data |
| An archive | conforms to a | data format |
| An archive | is parsed to create | a data structure |
| An abstract machine | is implemented by | a library |
| A program | is a kind of | data |
| A program | operates on | a data structure |
| A program | conforms to | a specification |
| A data structure | is persisted to create | an archive |
| Data structure | choice helps determine | machine performance |
| A specification | can be defined by | testing |
| Testing | checks | a program |
| Testing | requires | a specification |
| Tools | are | programs |
| Tools | support use of | software development techniques |
| Software development techniques | support use of | tools |
| Modularization | is used to structure | programs |
| Modularization | aids | testing |
| Modularization | is used to create | a library |
| Hardware | is represented to programmers by | an abstract machine |
| Hardware | architecture changes | machine performance |
| Machine performance | can be traded off against | human performance |
| A library | can extend | an abstract machine |
| Experience | is captured in | a library |
| Human performance | is determined by | software development techniques |
| Human performance | can be traded off against | machine performance |
| Human performance | depends on | experience |


Tomato demo website
Who doesn’t enjoy a tomato with lettuce?
Home >
Art >
Reosal
Projects >
Tomato
Chinese Checkers
Fuzzy clock
Markdown
About
Home
Markdown
About
Art
Projects
Reosal
This is the name of a fantasy setting. It includes:
a map
a story
a
conlang


03 July 1998
Disease Outbreak Reported
According to a statement from the European Commission, they have decided to lift the ban on fresh fish imports from eastern Africa imposed after a cholera epidemic. The decision affects imports from Tanzania, Kenya, Uganda and Mozambique. The decision is effective 1 July 1998 and reverses earlier measures imposed in January 1998 to limit the import of fishery products because of the cholera epidemic that swept much of eastern Africa in late 1997 and early 1998.


{% load define_action %} {% assign ""|add:source_type|add:" "|add:year as source_text %} {% assign "Learn more about spending in the "|add:source_type|add:" as PDF" as pdf_text %} {% assign "Learn more about spending in the "|add:source_type|add:" as Excel" as excel_text %} {% assign "Dataset Guide for "|add:source_type as guide_text %}
In addition to exploring the department budget by programmes, the budget is classified according to Economic Classification.
The Economic Classification of a department's expenditure distinguishes between various categories of current expenditure and capital expenditure. The purpose of the economic classification is to categorise transactions according to type of object or input, such as compensation of employees or capital assets.
This visualisation highlights how many categories of expenditure there are for this department at Economic Classification level 4, and which ones are the biggest.


Please select the number of players (2-4):
Please select unique roles
Thank you for playing! Refresh the page, or click the new game button to start a new game.
You have eaten all of the treasures and escaped the island! Thank you for playing! Refresh the page, or click the new game button to start a new game.


List test page
Sort by
Price
Price
Author
Author
Name
Name
All
Gogen
Sezann
Bacon
Klimt
Munk
Picasso
Kuning
When is the wedding
Gogen
$ 300M
Players in cards
Sezann
$ 250M
Woman III
Kuning
$ 137M
Gold Adele
Klimt
$ 135M
The Scream
Munk
$ 119M
Nude, green leaves and bust
Picasso
$ 106M
Three Studies of Lucian Freud
Bacon
$ 142M