Tomato is an app for your mobile which gives you alerts in the case your phone gets stolen by someone. It provides three tier of security to your phone:
Send a text to your phone "track (last 4 characters of your password)". If your phone is not switched off and is connected to internet, you will soon get back location updates to the "superhero numbers" you have added earlier.
The features which makes Tomato different is that it is super light - doesn't take a big bite from your phone's memory, processor or battery.
Suppose you misplaced your phone in your home or somewhere around you. You can try to ring your phone to locate it. Brilliant!!! But what if it is in silent mode?? Here, Tomato comes handy. Send a SMS "siren (last 4 characters of your password)".
No, not at all. We can assure you that we are not the "bad guys". We do not collect any user identifying information. Tomato Safety app is available as an open source project. You can sneak a look here. You can also visit us at toroshulabs.co
You can catch your friends when they play prank on you by hiding your phone. In that situation the siren feature of the app comes handy.
You should turn off the Tomato protection before doing that. After putting in the new SIM you can turn on the protection. Please note that if you are using a dual SIM phone the order of SIM cards does matter.


The map method runs a block for each element in an array. It is used in enumerator objects. We commonly effectuate calculations or changes inside arrays. For example, lets say that you want to add a number to every element inside an array, you would then use the map method. The map method iterates through an array, element by element until it goes through each elemet and finishes. At the end, map returns the outcome based on the instructions addressed inside the block of map. Here is a quick example:
array = [10 ,20 , 30, 40, 50, 60] --> here we have an array containing numbers. lets say those numbers represented the age of artfacts in a museum two years ago, so now its time to add 2 years to each artfact for the array to represent the current ago. To do this we need to use the map method. array.map{|x| x + 2}.
After the map method finishes the iteration, it returns the outcome in an array. This can be very helpful to alot of us, but imagine if you actually wanted to mutate the original array definitely. For this we would add a bang(!) to the map method. so, it would look like this: array.map!{|x| x + 2}. This modifies the original array and returns it instead of creating a


Script for json to csv for weather underground API fetching historical data
2013-12-16
Based on this https://github.com/PythonJournos/LearningPython/blob/master/tutorials/convert_json_to_csv.py, the script as follows,
import urllib2 import json import csv outfile_path='history.csv' writer = csv.writer(open(outfile_path, 'w')) headers = ['date'] writer.writerow(headers) req = urllib2.Request("http://api.wunderground.com/api/YOUR_KEY/history_20131001/q/India/Coimbatore.json") opener = urllib2.build_opener() f = opener.open(req) data = json.load(f) for history in data['history']['observations']: row = [] row.append(str(history['date']['pretty'])) row.append(str(history['tempm'])) writer.writerow(row)
Now the URL has to be iterated to give a range of historical data required, and most important the date range has to set.
The date range constructed from this answer http://stackoverflow.com/questions/1060279/iterating-through-a-range-of-dates-in-python
from datetime import date from dateutil.rrule import rrule, DAILY a = date(2009, 5, 30) b = date(2009, 6, 9) for dt in rrule(DAILY, dtstart=a, until=b): print dt.strftime("%Y-%m-%d")
The URL itration based on this answer http://stackoverflow.com/questions/16632569/for-loops-in-python-to-read-long-url-from-shortened-url
import urllib2 from BeautifulSoup import BeautifulSoup for x in ('20131011','20131012'): shortURL = 'http://api.wunderground.com/api/4d09b615cbc7726e/history_'+str(x)+'/q/India/Coimbatore.json' output = urllib2.urlopen(shortURL) print output.url
now the problem is how to take the for loop date range into the URL for looping, long searched for making a list from the print
dt.strftime(“%Y-%m-%d”)
finally got write by the empty array. Append, hoorah! http://learnpythonthehardway.org/book/ex32.html
import urllib2 from datetime import date from dateutil.rrule import rrule, DAILY a = date(2009, 6, 3) b = date(2009, 6, 9) dtm = [] for dt in rrule(DAILY, dtstart=a, until=b): print dt.strftime(“%Y%m%d”) dtm.append(dt.strftime(“%Y%m%d”)) print dtm for x in (dtm): shortURL = ‘http://api.wunderground.com/api/YOURKEY/history_’+str(x)+‘/q/India/Coimbatore.json’ output = urllib2.urlopen(shortURL) print output.url ``` the out put looks 20090603 20090604 ——— 20090609 [‘20090603’, ‘20090604’, ‘20090605’, ‘20090606’, ‘20090607’, ‘20090608’, ‘20090609’] http://api.wunderground.com/api/YOURKEY/history_20090603/q/India/Coimbatore.json —————- http://api.wunderground.com/api/YOURKEY/history_20090609/q/India/Coimbatore.json
now the challenge is how to integrate the above code with csv write code. The solution is another for loop for urllib. the final code is
import urllib2 import json import csv from datetime import date from dateutil.rrule import rrule, DAILY outfile_path='history.csv' writer = csv.writer(open(outfile_path, 'w')) headers = ['TimeIST','TemperatureC','Dew PointC','Humidity','Wind SpeedKm/h','Gust SpeedKm/h','Wind DirectionDe','Wind Direction','VisibilityKm','Sea Level PressurehPa','Events','Heatindex','Precipitationmm','Conditions'] writer.writerow(headers) a = date(2013, 8, 1) b = date(2013, 8, 2) dtm = [] for dt in rrule(DAILY, dtstart=a, until=b): dtm.append(dt.strftime("%Y%m%d")) for x in (dtm): url = 'http://api.wunderground.com/api/4d09b615cbc7726e/history_'+str(x)+'/q/India/Coimbatore.json' req = urllib2.Request(url) opener = urllib2.build_opener() f = opener.open(req) data = json.load(f) for history in data['history']['observations']: row = [] datewu = history['date']['year']+'-'+history['date']['mon']+'-'+history['date']['mday']+'T'+history['date']['hour']+':'+history['date']['min']+':00.000000+0530' row.append(str(datewu)) row.append(str(history['tempm'])) row.append(str(history['dewptm'])) row.append(str(history['hum'])) row.append(str(history['wspdm'])) row.append(str(history['wgustm'])) row.append(str(history['wdird'])) row.append(str(history['wdire'])) row.append(str(history['vism'])) row.append(str(history['pressurem'])) row.append(str(history['windchillm'])) row.append(str(history['heatindexm'])) row.append(str(history['precipm'])) row.append(str(history['conds'])) writer.writerow(row)
The above code does not do the job; it only takes the last date from the date range, the code has to change. The final working code
import urllib2 import json import csv from datetime import date from dateutil.rrule import rrule, DAILY outfile_path=‘history1.csv’ writer = csv.writer(open(outfile_path, ‘w’)) headers = [‘TimeIST’,‘TemperatureC’,‘Dew PointC’,‘Humidity’,‘Wind SpeedKm/h’,‘Gust SpeedKm/h’,‘Wind DirectionDe’,‘Wind Direction’,‘VisibilityKm’,‘Sea Level PressurehPa’,‘Events’,‘Heatindex’,‘Precipitationmm’,‘Conditions’] writer.writerow(headers) a = date(2013, 8, 5) b = date(2013, 8, 10) dtm = [] for dt in rrule(DAILY, dtstart=a, until=b): # print dt.strftime(“%Y%m%d”) dtm.append(dt.strftime(“%Y%m%d”)) dtl = [] for x in (dtm): shortURL = ‘http://api.wunderground.com/api/4d09b615cbc7726e/history_’+str(x)+‘/q/India/Coimbatore.json’ output = urllib2.urlopen(shortURL) # print output.url dtl.append(output.url) print dtl dtd = [] for url in (dtl): req = urllib2.Request(url) opener = urllib2.build_opener() f = opener.open(req) data = json.load(f) # print data dtd.append(data) for d in (dtd): for history in d[‘history’][‘observations’]: if d != history: row = [] datewu = history[‘date’][‘year’]+’-‘+history[’date’][‘mon’]+’-‘+history[’date’][‘mday’]+‘T’+history[‘date’][‘hour’]+’:‘+history[’date’][‘min’]+’:00.000000+0530’ row.append(str(datewu)) row.append(str(history[‘tempm’])) row.append(str(history[‘dewptm’])) row.append(str(history[‘hum’])) row.append(str(history[‘wspdm’])) row.append(str(history[‘wgustm’])) row.append(str(history[‘wdird’])) row.append(str(history[‘wdire’])) row.append(str(history[‘vism’])) row.append(str(history[‘pressurem’])) row.append(str(history[‘windchillm’])) row.append(str(history[‘heatindexm’])) row.append(str(history[‘precipm’])) row.append(str(history[‘conds’])) writer.writerow(row) print data
Create a csv from Json for WU current observations, the nonworking code for the past 5 hours
import urllib2 import json import csv from datetime import date #from dateutil.rrule import rrule, DAILY outfile_path='CART.DAT' writer = csv.writer(open(outfile_path, 'w')) headers = ['urn:ogc:def:parameter:x-istsos:1.0:time:iso8601','urn:ogc:def:parameter:x-istsos:1.0:cbe:aws:dewpont','urn:ogc:def:parameter:x-ists$ writer.writerow(headers) req = urllib2.Request("http://api.wunderground.com/api/4d09b615cbc7726e/conditions/q/India/Coimbatore.json") opener = urllib2.build_opener() f = opener.open(req) data = json.load(f) for current_observation in data['current_observation']: print ['station_id']
one working code for converting json into csv
import csv import json x="""[ { "pk": 22, "model": "auth.permission", "fields": { "codename": "add_logentry", "name": "Can add log entry", "content_type": 8 } }, { "pk": 23, "model": "auth.permission", "fields": { "codename": "change_logentry", "name": "Can change log entry", "content_type": 8 } }, { "pk": 24, "model": "auth.permission", "fields": { "codename": "delete_logentry", "name": "Can delete log entry", "content_type": 8 } } ]""" x = json.loads(x) f = csv.writer(open("test.csv", "wb+")) # Write CSV Header, If you dont need that, remove this line f.writerow(["pk", "model", "codename", "name", "content_type"]) for x in x: f.writerow([x["pk"], x["model"], x["fields"]["codename"], x["fields"]["name"], x["fields"]["content_type"]])
always getting
TypeError: string indices must be integers
hrrr! finally got working code based on experience that, with current json file of sin gle row, it is unnecessary and erroneous to callfor loop
, (took 5 hours to realize) and as per this answer http://stackoverflow.com/questions/14784334/python-csv-error-sequence-expected so the working code is as followsNow having problem in converting the date time formate of wu date formate to istsos’s. followed this for converting last answer, http://stackoverflow.com/questions/13350909/convert-other-time-values-to-datetime-format-in-python but that answer has a mistake, in specifying the shortened version of month, it should be %b not %m as specified in the answer. this is from http://www.lightbird.net/py-by-example/datetime.date-module.html so the final code for converting the date and making a csv.DAT is this
import csv import json import urllib2 from datetime import datetime outfile_path='CART.DAT' writer = csv.writer(open(outfile_path, 'w')) headers = ['urn:ogc:def:parameter:x-istsos:1.0:time:iso8601','urn:ogc:def:parameter:x-istsos:1.0:cbe:aws:dewpont'] writer.writerow(headers) req = urllib2.Request("http://api.wunderground.com/api/4d09b615cbc7726e/conditions/q/India/Coimbatore.json") opener = urllib2.build_opener() f = opener.open(req) data = json.load(f) #for data in data: dateNF = data['current_observation']['observation_time_rfc822'].strip( '+0530' ); print dateNF dateITS = datetime.strptime (dateNF, "%a, %d %b %Y %H:%M:%S ").strftime("%Y-%m-%dT%H:%M:%S.000000+0530") print dateITS rows = [dateITS,data["current_observation"]["temp_c"]] writer.writerow(rows)


clustering_eval_toolbox module¶
@author: The KnowEnG dev team
-
class
clustering_eval_toolbox.
ColumnType
[source]¶ Bases:
enum.Enum
Two categories of phenotype traits.
-
CATEGORICAL
= 'categorical'¶
-
CONTINUOUS
= 'continuous'¶
-
-
clustering_eval_toolbox.
chisquare
(phenotype_df)[source]¶ Perform a chi-square test and report the results.
- Parameters:
- phenotype_df: dataframe with two columns with clusters and phenotype trait values. ret: result of the phenotype dataframe.
-
clustering_eval_toolbox.
clustering_evaluation
(run_parameters)[source]¶ Run clustering evaluation on the whole dataframe of phenotype data. Save the results to tsv file.
-
clustering_eval_toolbox.
combine_phenotype_data_and_clustering
(run_parameters)[source]¶ This is to insert the sample clusters column into the phenotype dataframe.
- Returns:
- phenotype_df: phenotype dataframe with the first column as sample clusters.
-
clustering_eval_toolbox.
f_oneway
(phenotype_df)[source]¶ Perform a f_oneway test and report the results.
- Parameters:
- phenotype_df: dataframe with two columns with clusters and phenotype trait values. ret: result of the phenotype dataframe.
-
clustering_eval_toolbox.
run_post_processing_phenotype_clustering_data
(cluster_phenotype_df, threshold)[source]¶ This is the clean up function of phenotype data with nans removed.
- Parameters:
- cluster_phenotype_df: phenotype dataframe with the first column as sample clusters. threshold: threshold to determine which phenotype to remove.
- Returns:
- output_dict: dictionary with keys to be categories of phenotype data and values to be a list of related dataframes.


Kenrick Tan
I desire to be a T-shaped problem solver and I believe in solving everyday problems with technology. I love working in teams, doing pair-programming and improving my workflow. I always keen to learn new technology. Most importantly, I believe in paying it forward.


Shifty is a JavaScript tweening engine designed to fit any number of tweening needs. Its features include:
- Speed: Shifty is optimized for performance.
- Playback control (play/pause/stop)
- Extensibility: Shifty's
Tweenable
object works well as the base in a prototype chain. - Small download size: The standard distribution (which includes all extensions) is less than 2Kb when minified and gzipped. The core of the library (
shifty.core.js
) is less than 1Kb.
Shifty is an excellent animation solution for scenarios in which jQuery's animate()
function is either unavailable or insufficient. It's particularly effective for creating <canvas>
animations.
Another use for Shifty is computing single, specific frames of a tween, as it is used to do in Rekapi and Joe Lambert's Morf library. Using Shifty in this way would also be very useful in a non-browser environment such as Node.js.
If used without an AMD or CommonJS script loader, Shifty exposes only one object globally: Tweenable
. To create a basic tween, you could have something like this:
var tweenable = new Tweenable(); tweenable.tween({ from: { 'x': 0 }, to: { 'x': 10 }, duration: 1000, finish: function (state) { alert('Hooray, all done! Final value: ' + state.x); } });
This snippet tweens the x
variable from 0 to 10 over one second, and then alerts the final value. You can tween as many properties at once as you'd like.
Shifty also allows you to define filters to transform tweened values (for example, to support data types more complex than JavaScript number
s. The standard distribution of Shifty provides support for CSS strings and is capable of animating the DOM. All of this functionality is described in detail in the API documentation and project README.
A collection of Robert Penner's easing functions have been adapted for use with Shifty and are included in the standard download.
Please fork, use and contribute to Shifty! It is distributed under the MIT License, and experimentation is encouraged. If you find a bug or have a question about Shifty, please submit it the the Github issue tracker.
Here's another example of Shifty in use:


An error is caught, then an error is thrown (only the last one is recorded and stacks aren't mixed between the 2 errors)


public class LinearTemporaryImpact
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
PriorConditionalCombiner |
combiner()
Retrieve the Prior/Conditional Distributions Combiner
|
double |
driftExpectationEstimate()
Retrieve the Drift Expectation Estimate
|
double |
driftVolatilityEstimate()
Retrieve the Drift Volatility Estimate
|
double |
finishTime()
Retrieve the Finish Time
|
double |
grossPriceChange()
Retrieve the Gross Price Change
|
double |
instantaneousTradeRate()
Retrieve the Instantaneous Trade Rate
|
TransactionFunctionLinear |
linearTemporaryImpact()
Retrieve the Linear Temporary Market Impact Function
|
double |
spotHoldings()
Retrieve the Spot Holdings
|
double |
spotTime()
Retrieve the Spot Time
|
double |
staticTransactionCost()
Estimate of the Static Transaction Cost
|
EfficientTradingTrajectoryContinuous |
trajectory()
Retrieve the Holdings Trajectory
|
double |
transactionCostGain()
Estimate the Transaction Cost Gain available from the Bayesian Drift
|
static LinearTemporaryImpact |
Unconstrained(double dblSpotTime,
double dblFinishTime,
double dblSpotHoldings,
PriorConditionalCombiner pcc,
double dblGrossPriceChange,
TransactionFunctionLinear tflTemporary)
Generate an Unconstrained LinearTemporaryImpact Instance
|
public static final LinearTemporaryImpact Unconstrained(double dblSpotTime, double dblFinishTime, double dblSpotHoldings, PriorConditionalCombiner pcc, double dblGrossPriceChange, TransactionFunctionLinear tflTemporary)
dblSpotTime
- Spot TimedblFinishTime
- Finish TimedblSpotHoldings
- Spot Holdingspcc
- The Prior/Conditional CombinerdblGrossPriceChange
- The Gross Price ChangetflTemporary
- The Temporary Linear Impact Functionpublic double spotTime()
public double finishTime()
public double spotHoldings()
public PriorConditionalCombiner combiner()
public double grossPriceChange()
public double driftExpectationEstimate()
public double driftVolatilityEstimate()
public TransactionFunctionLinear linearTemporaryImpact()
public EfficientTradingTrajectoryContinuous trajectory()
public double instantaneousTradeRate()
public double staticTransactionCost()
public double transactionCostGain()


Islanders among folk music awards nominees
by Mike DevlinVancouver Island and area were well represented Tuesday when 105 nominees in 19 categories from across Canada drew nods at the 2020 Canadian Folk Music Awards.
The number of eligible nominees in four major categories — contemporary album of the year, new/emerging artist of the year, solo artist of the year and English songwriter(s) of the year — was expanded this year, resulting in more nominations than ever.
That was good news for Island-area acts heading into the awards show’s 15th edition, set for April 3-4 in Charlottetown, P.E.I.
This year’s local nominees include: Victoria’s Pierre Schryer and Pender Island’s Adam Dobres, for instrumental group of the year and world group of the year; Gabriola Island’s the Kerplunks, for children’s album of the year; Victoria’s the Sweet Lowdown, for vocal group of the year; Victoria’s Quinn Bachand and Haley Richardson, for ensemble of the year; Victoria’s the Unfaithful Servants, for new/emerging artists of the year; and Pender Island’s Lester Quitzau of Tri-Continental, for the Oliver Schroer Pushing the Boundaries Award. For more information, visit folkawards.ca.


Table of Contents
Special Matrices in ML
Matrix Cookbook
Diagonal Matrices
-
Definition.
Diagonal matrices are square matrices \(A\) with \(A_{ij} = 0 \text{, when } i \ne j.\)
-
Properties:
- Diagonal matrices correspond to quadratic functions that are simple sums of squares, of the form:
$$q(x) = \sum_{i=1}^n \lambda_i x_i^2 = x^T \mathbf{diag}(\lambda) x.$$
- They are easy to invert \(A^{-1}_ {ii} = 1/A_ {ii} \: \forall i \in [1, n]\)
- The pseudo-inverse is easy to compute: keep zero diagonal elements as zero
- Allow easier matrix multiplication and powers
- Diagonal matrices correspond to quadratic functions that are simple sums of squares, of the form:
Symmetric Matrices
-
Definition:
Symmetric matrices are square matrices that satisfy \(A_{ij} = A_{ji}\) for every pair \((i,j).\)The set of symmetric \((n \times n)\) matrices is denoted \(\mathbf{S}^n\). This set is a subspace of \(\mathbf{R}^{n \times n}\).
- Properties:
- Has orthonormal eigenvectors (even with repeated eigenvalues)
- Its inverse is also symmetric
- All eigenvalues of a symmetric matrix are real
- \(A^TA\) is invertible iff columns of \(A\) are linearly independent
- Every symmetric matrix \(S\) can be diagonalized (factorized) with \(Q\) formed by the orthonormal eigenvectors \(v_i\) of \(S\) and \(\Lambda\) is a diagonal matrix holding all the eigenvalues:
$$\begin{aligned} S&=Q \Lambda Q^{T} \\ &= \lambda_{1} v_{1} v_{1}^{T}+\ldots+\lambda_{n} v_{n} v_{h}^{T} = \sum_{i=1}^n \lambda_i v_i v_i^T \end{aligned}$$
- One can create a symmetric matrix from any matrix by:
$$M = {\displaystyle {\tfrac {1}{2}}\left(A+A^{\textsf {T}}\right)}$$
- Examples:
Skew-Symmetric Matrices
-
Definition.
-
Properties:
-
Asynchronous:
Covariance Matrices
- Definition.
Standard Form:$$\Sigma :=\mathrm {E} \left[\left(\mathbf {X} -\mathrm {E} [\mathbf {X} ]\right)\left(\mathbf {X} -\mathrm {E} [\mathbf {X} ]\right)^{\rm {T}}\right]$$
$$ \Sigma := \dfrac{1}{m} \sum_{k=1}^m (x_k - \hat{x})(x_k - \hat{x})^T. $$
Matrix Form:
$$ \Sigma := \dfrac{X^TX}{n} $$
valid only for (1) \(X\) w/ samples in rows and variables in columns (2) \(X\) is centered (mean=0)
- Properties:
-
The sample covariance matrix allows to find the variance along any direction in data space.
-
The diagonal elements of \(\Sigma\) give the variances of each vector in the data.
-
The trace of \(\Sigma\) gives the sum of all the variances.
-
The matrix \(\Sigma\) is positive semi-definite, since the associated quadratic form \(u \rightarrow u^T \Sigma u\) is non-negative everywhere.
-
It is Symmetric.
- Every symmetric positive semi-definite matrix is a covariance matrix.
Proof.
OR, Visit the website
- The sample variance along direction \(u\) can be expressed as a quadratic form in \(u\):
\(\sigma^2(u) = \dfrac{1}{n} \sum_{k=1}^n [u^T(x_k-\hat{x})]^2 = u^T \Sigma u,\) -
The diminsion of the matrix is \((n \times n)\), where \(n\) is the number of variables/features/columns.
-
The inverse of this matrix, \({\displaystyle \Sigma ^{-1},}\) if it exists, is the inverse covariance matrix, also known as the concentration matrix or precision matrix.
-
If a vector of \(n\) possibly correlated random variables is jointly normally distributed, or more generally elliptically distributed, then its probability density function can be expressed in terms of the covariance matrix.
-
\(\Sigma =\mathrm {E} (\mathbf {XX^{\rm {T}}} )-{\boldsymbol {\mu }}{\boldsymbol {\mu }}^{\rm {T}}\).
-
\({\displaystyle \operatorname {var} (\mathbf {AX} +\mathbf {a} )=\mathbf {A} \,\operatorname {var} (\mathbf {X} )\,\mathbf {A^{\rm {T}}} }\).
-
\(\operatorname {cov} (\mathbf {X} ,\mathbf {Y} )=\operatorname {cov} (\mathbf {Y} ,\mathbf {X} )^{\rm {T}}\).
-
\(\operatorname {cov} (\mathbf {X}_ {1}+\mathbf {X}_ {2},\mathbf {Y} )=\operatorname {cov} (\mathbf {X}_ {1},\mathbf {Y} )+\operatorname {cov} (\mathbf {X}_ {2},\mathbf {Y} )\).
-
If \((p = q)\), then \(\operatorname {var} (\mathbf {X} +\mathbf {Y} )=\operatorname {var} (\mathbf {X} )+\operatorname {cov} (\mathbf {X} ,\mathbf {Y} )+\operatorname {cov} (\mathbf {Y} ,\mathbf {X} )+\operatorname {var} (\mathbf {Y} )\).
-
\(\operatorname {cov} (\mathbf {AX} +\mathbf {a} ,\mathbf {B} ^{\rm {T}}\mathbf {Y} +\mathbf {b} )=\mathbf {A} \,\operatorname {cov} (\mathbf {X} ,\mathbf {Y} )\,\mathbf {B}\).
-
If \({\displaystyle \mathbf {X} }\) and \({\displaystyle \mathbf {Y} }\) are independent (or somewhat less restrictedly, if every random variable in \({\displaystyle \mathbf {X} }\) is uncorrelated with every random variable in \({\displaystyle \mathbf {Y} }\)), then \({\displaystyle \operatorname {cov} (\mathbf {X} ,\mathbf {Y} )=\mathbf {0} }\).
- \(\operatorname {var} (\mathbf {b} ^{\rm {T}}\mathbf {X} )= \mathbf {b} ^{\rm {T}}\operatorname {cov} (\mathbf {X} )\mathbf {b} = \operatorname {cov} (\mathbf{b}^T\mathbf {X}, \mathbf{b}^T\mathbf {X} ) \geq 0,\,\).
This quantity is NON-Negative because it’s variance.
Maybe \(= \mathbf {b} ^{\rm {T}}\operatorname {var} (\mathbf {X} )\mathbf {b}\)?? -
An identity covariance matrix, \(\Sigma = I\) has variance \(= 1\) for all variables.
-
A covariance matrix of the form, \(\Sigma=\sigma^2I\) has variance \(= \sigma^2\) for all variables.
-
A diagonal covariance matrix has variance \(\sigma_i^2\) for the \(i-th\) variable.
- When the mean \(\hat{x}\) is not known the denominator of the “SAMPLE COVARIANCE MATRIX” should be \((n-1)\) and not \(n\).
where, \({\displaystyle \mathbf {X} ,\mathbf {X} _{1}},\) and \({\displaystyle \mathbf {X} _{2}}\) are random \((p\times 1)\) vectors, \({\displaystyle \mathbf {Y} }\) is a random \((q\times 1)\) vector, \({\displaystyle \mathbf {a} }\) is a \((q\times 1)\) vector, \({\displaystyle \mathbf {b} }\) is a \((p\times 1)\) vector, and \({\displaystyle \mathbf {A} }\) and \({\displaystyle \mathbf {B} }\) are \((q\times p)\) matrices of constants.
-
- \(\Sigma\) as a Linear Operator:
- Applied to one vector, the covariance matrix maps a linear combination, \(c\), of the random variables, \(X\), onto a vector of covariances with those variables:
- Treated as a bilinear form, it yields the covariance between the two linear combinations:
- The variance of a linear combination is then (its covariance with itself)
- The (pseudo-)inverse covariance matrix provides an inner product, \({\displaystyle \langle c-\mu \|\Sigma ^{+}\| c-\mu \rangle }\) which induces the Mahalanobis distance, a measure of the “unlikelihood” of \(c\).
- Applications [Examples]:
-
The Whitening Transformation: allows one to completely decorrelate the data, Equivalently,
allows one to find an optimal basis for representing the data in a compact way. -
Portfolio Theory: The matrix of covariances among various assets’ returns is used to determine, under certain assumptions, the relative amounts of different assets that investors should (in a normative analysis) or are predicted to (in a positive analysis) choose to hold in a context of diversification.
-
Positive Semi-Definite Matrices
-
Definition:
A symmetric \({\displaystyle n\times n}\) real matrix \({\displaystyle M}\) is said to be positive semi-definite if the scalar \({\displaystyle z^{\textsf {T}}Mz}\) is non-negative for every non-zero column vector \({\displaystyle z}\) of \(n\) real numbers.Mathematically:
$$M \text { positive semi-definite } \Longleftrightarrow \quad x^{\top} M x \geq 0 \text { for all } x \in \mathbb{R}^{n}$$
-
Properties:
- \(AA^T\) and \(A^TA\) are PSD
- \(M\) is positive definite if All pivots > 0
- \(M\) is positive definite if and only if all of its eigenvalues are non-negative.
- Covariance Matrices \(\Sigma\) are PSD
Positive Definite Matrices
-
Definition:
A symmetric \({\displaystyle n\times n}\) real matrix \({\displaystyle M}\) is said to be positive definite if the scalar \({\displaystyle z^{\textsf {T}}Mz}\) is strictly positive for every non-zero column vector \({\displaystyle z}\) of \(n\) real numbers.Mathematically:
$$M \text { positive definite } \Longleftrightarrow x^{\top} M x>0 \text { for all } x \in \mathbb{R}^{n} \backslash \mathbf{0}$$
-
Properties:
- \(M\) is positive definite if and only if all of its eigenvalues are positive
- The matrix \({\displaystyle M}\) is positive definite if and only if the bilinear form \({\displaystyle \langle z,w\rangle =z^{\textsf {T}}Mw}\) is positive definite
- A symmetric matrix \({\displaystyle M}\) is positive definite if and only if its quadratic form is a strictly convex function
- Every positive definite matrix is invertible and its inverse is also positive definite.
- \(M\) is positive definite if All pivots > 0
- Covariance Matrices \(\Sigma\) are positive definite unless one variable is an exact linear function of the others. Conversely, every positive semi-definite matrix is the covariance matrix of some multivariate distribution
- Any quadratic function from \({\displaystyle \mathbb {R} ^{n}}\) to \({\displaystyle \mathbb {R} }\) can be written as \({\displaystyle x^{\textsf {T}}Mx+x^{\textsf {T}}b+c}\) where \({\displaystyle M}\) is a symmetric \({\displaystyle n\times n}\) matrix, \(b\) is a real \(n\)-vector, and \(c\) a real constant. This quadratic function is strictly convex, and hence has a unique finite global minimum, if and only if \({\displaystyle M}\) is positive definite.
Orthogonal Matrices
-
Definition.
Orthogonal (or, unitary (complex)) matrices are square matrices, such that the columns form an orthonormal basis.
- Properties:
- If \(U = [u_1, \ldots, u_n]\) is an orthogonal matrix, then
$$u_i^Tu_j = \left\{ \begin{array}{ll} 1 & \mbox{if } i=j, \\ 0 & \mbox{otherwise.} \end{array} \right. $$
-
\(U^TU = UU^T = I_n\).
- Easy inverse:
$$U^{-1} = U^T$$
- Geometrically, orthogonal matrices correspond to rotations (around a point) or reflections (around a line passing through the origin).
i.e. they preserve length and angles!
Proof. Part 5 and 6. - For all vectors \(\vec{x}\),
\(\|Ux\|_2^2 = (Ux)^T(Ux) = x^TU^TUx = x^Tx = \|x\|_2^2 .\)Known as, the rotational invariance of the Euclidean norm.
Thus, If we multiply x with an orthogonal matrix, the errors present in x will not be magnified. This behavior is very desirable for maintaining numerical stability. - If \(x, y\) are two vectors with unit norm, then the angle \(\theta\) between them satisfies \(\cos \theta = x^Ty\)
while the angle \(\theta'\) between the rotated vectors \(x' = Ux, y' = Uy\) satisfies \(\cos \theta' = (x')^Ty'\).
Since, \((Ux)^T(Uy) = x^T U^TU y = x^Ty,\) we obtain that the angles are the same.
- If \(U = [u_1, \ldots, u_n]\) is an orthogonal matrix, then
- Examples:
Dyads
-
Definition.
A matrix \(A \in \mathbf{R}^{m \times n}\) is a dyad if it is of the form \(A = uv^T\) for some vectors \(u \in \mathbf{R}^m, v \in \mathbf{R}^n\).The dyad acts on an input vector \(x \in \mathbf{R}^n\) as follows:
$$ Ax = (uv^T) x = (v^Tx) u.$$
- Properties:
-
The output always points in the same direction \(u\) in output space (\(\mathbf{R}^m\)), no matter what the input \(x\) is.
-
The output is always a simple scaled version of \(u\).
-
The amount of scaling depends on the vector \(v\), via the linear function \(x \rightarrow v^Tx\).
-
- Examples:
-
- Normalized dyads:
- We can always normalize the dyad, by assuming that both u,v are of unit (Euclidean) norm, and using a factor to capture their scale.
- That is, any dyad can be written in normalized form:
- \[A = uv^T = (\|u\|_2 \cdot |v|_2 ) \cdot (\dfrac{u}{\|u\|_2}) ( \dfrac{v}{\|v\|_2}) ^T = \sigma \tilde{u}\tilde{v}^T,\]
- where \(\sigma > 0\), and \(\|\tilde{u}\|_2 = \|\tilde{v}\|_2 = 1.\)
-
- Symmetric dyads:
- Another important class of symmetric matrices is that of the form \(uu^T\), where \(u \in \mathbf{R}^n\).
The matrix has elements \(u_iu_j\), and is symmetric.
If \(\|u\|_2 = 1\), then the dyad is said to be normalized.
- \[uu^T = \left(\begin{array}{ccc} u_1^2 & u_1u_2 & u_1u_3 \\ u_1u_2 & u_2^2 & u_2u_3 \\ u_1u_3 & u_2u_3 & u_3^2 \end{array} \right)\]
-
- Properties:
- Symmetric dyads corresponds to quadratic functions that are simply squared linear forms:
\(q(x) = (u^Tx)^2\) - When the vector \(u\) is normalized (unit), then:
\(\mathbf{Tr}(uu^T) = \|u\|_2^2 = 1^2 = 1\)This follows from the fact that the diagonal entries of a symmetric dyad are just \(u_i^2, \forall i \in [1, n]\)
- Symmetric dyads corresponds to quadratic functions that are simply squared linear forms:
- Properties:
Correlation matrix
-
- Definition.
- \[{\text{corr}}(\mathbf {X} )=\left({\text{diag}}(\Sigma )\right)^{-{\frac {1}{2}}}\,\Sigma \,\left({\text{diag}}(\Sigma )\right)^{-{\frac {1}{2}}}\]
- Properties:
-
It is the matrix of “Pearson product-moment correlation coefficients” between each of the random variables in the random vector \({\displaystyle \mathbf {X} }\).
-
The correlation matrix can be seen as the covariance matrix of the standardized random variables \({\displaystyle X_{i}/\sigma (X_{i})}\) for \({\displaystyle i=1,\dots ,n}\).
-
Each element on the principal diagonal of a correlation matrix is the correlation of a random variable with itself, which always equals 1.
-
Each off-diagonal element is between 1 and –1 inclusive.
-


{% trans 'Are you sure you want to delete this report?' %}
{% blocktrans %}
Deleting this will break the apps below, which refer to this report.
In addition, there may be older app versions that depend on these reports but are not displayed here.
Please delete with caution.
{% endblocktrans %}


Here we can present the user with data we want them to work on.
Note the use of the ${place_holder}
notation: <img src="${place_holder}">
We use the notation in order to load in data from a list of data.
It is possible to have as many ${place_holder}
values as you want.
index.html
) into the template field to see how it will be renered.
${place_holder}
${place_holder}


Our team will begin to ideate different project ideas, and explore different datasets that could be collected. Our team will begin narrow in on ideated project ideas and begin selecting a project scope that is both rich in exploration as well as limited enough that it would be feasible within the scope of the term project.
Acceptance Criteria:
Group formalized and submitted to the course instructor
Shortlist of project ideas
Selection of project idea
Project Planning
Overall:
Following the selection of a project theme, in our team’s case, the selection of the theme of “Hurricane Analysis” we will begin to explore potential data sources available for the chosen theme. These data sources will be selected, and the scope of the project will be defined. The initial setup of the webpage will take place and the development of the project plan will also take place.
Acceptance Criteria:
Project Idea Chosen
Data-sources has been collected
The webpage has been submitted
Data Collection:
Overall:
Following preliminary data sources being selected, these data sources will begin to be explored and appropriate documentation will be recorded. The initial data exploration will consist of exploring various parameters as well as supplemental external research to inform how this data could be further processed and analyzed in future steps. This supplemental research will be crucial as it will inform what types of analysis will be most fruitful in its exploration.
Acceptance Criteria:
The table of data sources will be updated to include appropriate documentation
Data Preparation
Overall:
Initial analysis of the data will begin to occur such as querying data to explore various existing and potential relationships, utilization of geoprocessing tools to develop heatmaps, charts, and other visualization options. This initial analysis will serve to begin to explore how this data can begin to tell an informative story on the prevalence and extent of hurricanes.
Acceptance Criteria:
Adding initial results from the processing of data and analysis to the web-page
Data Processing
Overall:
Following the initial exploration, plans for further analysis will be developed and these plans will be executed to present desired analytics of the data. Where outlined to be possible, the use of the Model Builder will be used to automate various arduous tasks. Following the analysis, this will then be published to ArcGIS Online for future reference.
Acceptance Criteria:
Screenshots of the Model Builder Processes
Documentation of the Model Builder Processes
Final Analyses Presented
ArcGIS Online links added to the webpage
Presentation
Overall:
Final adjustments will be made to the presentation of the data. The story map will be created and published in ArcGIS Online. This will then be used for the final presentation of the term project.


My name is Luis Alfonso Castillo, I'm a visual designer and web developer with a business background. I'm passionate about branding and enjoy developing an identity for a business. I have seven years of design experience using Adobe Creative Suite and all of my work is very detail-oriented.
I'm currently available for freelance projects, contractual positions, and internships. If you're interested in working with me please contact me by email at<EMAIL_ADDRESS>This site has been designed and developed by me from the ground up. It's designed on Adobe Illustrator as well as Adobe Photoshop and is developed using HTML, CSS, and JavaScript on Adobe Dreamweaver. It uses Open Sans designed by Steve Matteson of Ascender Corp. as the typeface via Google Fonts.
I turn your vision into creative, detail-oriented, and innovative results that capture your consumer's attention. Check out the portfolio page to see examples of my work and the contact page to start a project or get in touch with me.
| Expert | Advanced | Int. | Beginner | |
| Photoshop | ||||
| Illustator | ||||
| Dreamweaver | ||||
| InDesign | ||||
| After Effects | ||||
| HTML | ||||
| CSS | ||||
| Javascript |


This page basically makes invocations to another domain using cross-site XMLHttpRequest mitigated by Access Control. This is the simple scenario that is NOT preflighted, and the invocation to a resource on another domain takes place using a simple HTTP GET.


New year, new site
February 2, 2020
- Reading Time: 6 mins
Oh jeez, what a great year it has been so far. I won’t remind you as to not ruin the “vibe” of this post, however, let’s hope things improve/become stable. If you’re one of the 22,000 readers of this “blog,” you may have noticed the design has changed… again. “Why is that?” you might ask. Well, it started with me noticing that I had an abundance of repositories on GitHub. 83 to be exact. Granted most of these were private, sandbox repositories, so it’s not as though I’m a pioneer, creating “amazing” and “revolutionary” bits of software for the free world. Honestly, I’ve treated GitHub as a sort of playground where I shitpost various bits of code that I’ve most likely moved from my Thinkpad to my neglected WSL instance, or my current—and probably doomed—Manjaro install (let’s hope this one lasts more than two weeks).
The kicker of this realization is that some of these repositories weren’t actually mine. Which makes sense, right? Pull requests, issues, tickets, all of the usual byproducts around contributing to open source software. However, it occurred to me that I hadn’t contributed to most, if any, of these projects. That’s right, these forks were sitting on my account collecting digital dust due to my horrible maid and open source contributer skills. From the old, “1000+ commits ahead” JavaScript libraries to the many underutilized webpack + babbel + dabble + gabble.io boilerplate starter projects, my profile looked like the offramp of an old highway, littered with sadness and tiny shoes. The funniest part was that I don’t actually write JavaScript. It’s not my cup of tea, it doesn’t resonate with me, it doesn’t tickle my fancy, it doesn’t… not get my goat(?) If you couldn’t tell, I’m not a fan. I know this sound hypocritical coming from a guy who’s claims to fame were JavaScript-based projects. Please don’t make fun of me on IRC using your 68%, farm-to-pcb key switch keyboard, slapping away at the various tmux and or i3 hotkeys you’ve graced your headless arch installation with. I really hope you can forgive me on Twitter using your emacs-embedded web browser.
Anyways, as I haven’t done any JavaScript development in many moons, I got to cleaning! Delete, confirm, archive, confirm.
My CTRL+C
and CTRL+V
keys were worn like the armor of a Spartan after a long day’s battle. And finally, after wiping the various
fluids that my 68% keyboard accrued over the 20+ minute duel, the peasants rejoiced.
No longer was I plagued by outdated libraries that I had no intention of contributing to in the first place.
No longer will I shudder while looking for that “stupid ass, poorly named” library that
is only three, nondescript letters long. My GitHub repository list is now at peace
and can rest for the time being. But there was a looming question, how did I get so many repositories in the first place?
I feel that—with the “socialization” of open source software—I treated that innocent “fork” button as a pseudo “super like” button. See something I like? FORK. Oh, do I want to save this for later? FORK. Sure this could be dismissed as a naive user’s misuse of a version-control platform, however, I don’t think I’m the only one with this problem. I went through my followers/following on GitHub and looked through each forked repository on their account. I recommend you do the same as filtering by forks makes this very easy. To my surprise their repository list looked almost identical to mine. “300+ commits behind,” “0 commits ahead,” “last commit: 8 months ago,” I digress. So why is there an overindulgence in the forking of repositories on GitHub? I think, and could very well be wrong, that many of us use the fork button as a “save for later” button instead. This could be due to many factors, but in my case it’s because I:
- Want to keep a copy of the repository for my own personal use/preservation;
- Plan on actually contributing;
- Am afraid that the repository might disappear in the future.
Sure these reasons are okay on the surface, but these reasons are also—in my case again—a little disingenuous. For example, one of the repositories I had on my kill list was a JavaScript library that converted vertical scrolling to horizontal. It was a very small library that I used in a project that never saw the light of day. The only open issues were minor questions and documentation requests, all many years old. The last commit was around the same age. My point is that the repository wasn’t worth a fork. Not that it wasn’t good, it did exactly what it said it would. But something to keep for “personal preservation?” Yeah, I’m not so sure. Sure, maybe I was going to contribute to the <250 SLOC JavaScript library, maybe.
However, I think my inner data hording demon came out in full force when I forked that repository many years ago.
You see, I used to love having gigabytes of PDFs I knew I would never read, or tons of bookmarks
to articles I would “totally look at later.” I think we’re all like that to a certain extent.
We all like having the things we need, when we need them; especially developers.
No one wants to need that really awesome “stb_image.h,” only to find out the last mirror of it got deleted during the A.I singularity.
But that’s not what the fork button is for, it’s meant for pull requests and issues and testing and the magical friendship gained through open source software.
If you wanted to save this code for future you’s possible dire strait, you could use the beautifully simple “Download ZIP” button.
No muss, no fuss. Only the bliss of a perfect copy, converted to a format worthy of storing. I mean sure, that’s great and all, but then future you has to UNZIP A FILE. Oh no, anything but that!
What if ApocalypticArch doesn’t ship with tar
because Richard Stallman’s GNU + A.I created malware that deleted it and any other file utility from every system known to man?! What then?!
Well then I guess you and your 952 repositories on GitHub can laugh at the robot overlords and their failed attempt to remove open source software from the internet.
All jokes aside I’ve now started to change my habits around forking and cloning things on GitHub. In fact, I’ve even moved most of my “important” projects to Sourcehut as I like the idea behind it and the fact that they have first-class support for Mercurial. But man, even though I’m tidying up my account and moving away from the platform… nothing felt greater than watching that little chocolate bar thingy, knowing I had a completely separate copy on my account, untouched by the patches and commits of an angry BDFL.
So anyways that’s why my blog/site looks different now. Hope you’re having a great day.


--- layout: false title: Emmet date: 2018-3-28 tags: - Web ---
Emmet is a web-developer’s toolkit that can greatly improve your HTML & CSS workflow:
Basically, most text editors out there allow you to store and re-use commonly used code chunks, called “snippets”. While snippets are a good way to boost your productivity, all implementations have common pitfalls: you have to define the snippet first and you can’t extend them in runtime.
Emmet takes the snippets idea to a whole new level: you can type CSS-like expressions that can be dynamically parsed, and produce output depending on what you type in the abbreviation. Emmet is developed and optimised for web-developers whose workflow depends on HTML/XML and CSS, but can be used with programming languages too.
a{click}+b{here}
a>{click}+b{here}
p>{click }+a{here}+{ to continue}
clickhere
clickhere
click here to continue
div.box>(div.box_img>img[src="img/$$$.jpg"]{image$@10})*5
image10
image11
image12
image13
image14
#page>div.logo+ul.navigation>li*5>a{Item $@-}^^^bq+.section1.section2>(div>dl>(dt+dd>a[href="#" title])*3)+div#footer
Those are equal
| .wrap>.content | div.wrap>div.content |
| em>.info | em>span.info |
| ul>.item*3 | ul>li.item*3 |
| table>#row$*4>[colspan=2] | table>tr#row$*4>td[colspan=2] |
"Lorem ipsum" dummy text is used by many web-developers to test how their HTML templates will look with real data. Using Emmet just expand lorem or lipsum abbreviations to get the snippet, i.e. ul.generic-list>lorem15.item*4:
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Debitis tempore fugit maiores quas ut fugiat.
- Doloremque exercitationem ratione autem facilis, explicabo recusandae dolorum error quod eveniet sapiente fugiat dolore magnam!
- Ipsam odio minima expedita, suscipit tempore quos consequuntur dolorum. Ab debitis provident eius. Dolorem, est.
- Odio, vitae animi exercitationem. Vitae quas dolorem assumenda molestiae facere aliquid dolor fugit quod atque.
Emmet has a few aliases for commonly used values:
Emmet has a few aliases for commonly used colors:
How it works?
| m10 | margin: 10px; | m1.5 | margin: 1.5em; |
| m10ex-5 | margin: 10ex -5px; | m10ex-20em | margin: 10ex -20em; |
| c#3 | color: #333; | bd5#0s | border: 5px #000 solid; |
| lh2 | line-height: 2; | fw400 | font-weight: 400; |
Emmet Explicit vendor prefixed:
-wm-trf
-webkit-transform: ;
-moz-transform: ;
transform: ;
-bdrs
-webkit-border-radius: ;
-moz-border-radius: ;
-ms-border-radius: ;
-o-border-radius: ;
border-radius: ;
lg(left,#fco 30%,red)
background-image: -webkit-linear-gradient(left, #fco 30%, red);
background-image: -o-linear-gradient(left, #fco 30%, red);
background-image: linear-gradient(to right, #fco 30%, red);
border-image:lg(left,yellow 30%,red)
-webkit-border-image: -webkit-linear-gradient(yellow 30%, red);
-o-border-image: -o-linear-gradient(yellow 30%, red);
border-image: linear-gradient(yellow 30%, red);


Overview
- Handling user input with forms is the cornerstone of many web applications
- Angular provides two different approaches:
- Template-driven forms
- Reactive forms
- Reactive and template-driven forms process and manage data differently
Choosing an approach
- Reactive forms
- They provide a direct explicit access to the underlying forms object model
- More scalable, reuseable and testable
- Choose reactive forms if forms are a key part of the application
- Template-driven forms
- Easier to implement
- Choose if the requirements and logic can be managed solely in the template
Common form foundation classes
- Both reactive and template-driven forms are built on the following base classes
FormControl
tracks the value and validation status of an individual form control
FormGroup
tracks the same values and status for a collection of form controls
FormArray
tracks the same values and status for an array of form controls
ControlValueAccessor
creates a bridge between Angular FormControl instances and native DOM elements
Data flow
Reactive (View to model)
- The user types a value into the input element, in this case the favorite color 'Blue'.
- The form input element emits an "input" event with the latest value.
- The control value accessor listening for events on the form input element immediately relays the new value to the
FormControl
instance.
- The
FormControl
instance emits the new value through the valueChanges
observable.
- Any subscribers to the
valueChanges
observable receive the new value.
Data flow
Reactive (Model to view)
- The user calls the
favoriteColorControl.setValue()
method, which updates the FormControl
value.
- The
FormControl
instance emits the new value through the valueChanges
observable.
- Any subscribers to the
valueChanges
observable receive the new value.
- The control value accessor on the form input element updates the element with the new value.
Data flow
Template-driven (View to model)
- The user types a value into the input element, in this case the favorite color 'Blue'
- The form input element emits an "input" event with the latest value
- The control value accessor attached to the input triggers the
setValue()
method on the FormControl
instance
- The
FormControl
instance emits the new value through the valueChanges
observable
- Any subscribers to the
valueChanges
observable receive the new value
- The control value accessor also calls the
NgModel.viewToModelUpdate()
method which emits an ngModelChange
event
- Because the component template uses two-way data binding for the
favoriteColor
property, the favoriteColor
property in the component is updated to the value emitted by the ngModelChange
event (Blue)
Data flow
Template-driven (Model to view)
- The
favoriteColor
value is updated in the component
- Change detection begins
- During change detection, the
ngOnChanges
lifecycle hook is called on the NgModel
directive instance because the value of one of its inputs has changed
- The
ngOnChanges()
method queues an async task to set the value for the internal FormControl
instance
- Change detection completes
- On the next tick, the task to set the
FormControl
instance value is executed
- The
FormControl
instance emits the latest value through the valueChanges
observable
- Any subscribers to the
valueChanges
observable receive the new value
- The control value accessor updates the form input element in the view with the latest
favoriteColor
value
Overview
- Control elements are bound to data properties
- Implicitly creates data model
- Template directives
NgForm
–Creates a top-level instance and binds it to a form to track aggregate form value and validation status
NgModel
—used to mark HTML elements as part of the data model (different context that two-way data binding from Lesson 01)
NgModelGroup
—represents a part of the form. Used to group elements together
- Template-driven forms rely on mutability of the data model
Template-driven form – class
examples/lesson04-forms/projects/template-driven/src/app/app.component.ts
Template-driven form – Template
examples/lesson04-forms/projects/template-driven/src/app/app.component.html
Overview
- The reactive directives come with
ReactiveFormsModule
- Reactive directives
formGroup
—binds to an instance of FormGroup
that represents the entire form model
formGroupName
—used when binding to nested FormGroup
objects
formControl
—used for individual controls without the need to create a model, but want Forms API features
formControlName
—used when binding to nested FormControl
objects
- Define data model in component class
ReactiveForm – Class
examples/lesson04-forms/projects/reactive/src/app/app.component.ts
Reactive – Template
examples/lesson04-forms/projects/reactive/src/app/app.component.html
ReactiveForm – Class
examples/lesson04-forms/projects/reactive/src/app/app.component.ts
Dynamic forms
- Some use cases requires adding/removing controls based on input and/or state
- Use
FormArray
to manage any number of unnamed controls
- A great option when the number of controls is not known in advance
- Use
push(control: AbstractControl)
to add controls
- Use
removeAt(index: number)
to remove controls
- Bind in template with the
formArrayName
directive
Dynamic form – Class
examples/lesson04-forms/projects/dynamic-forms/src/app/app.component.ts
Dynamic form – Template
examples/lesson04-forms/projects/dynamic-forms/src/app/app.component.html
Updating form control values
- Reactive forms methods to change a form control's value programmatically
- There are two methods
setValue()
—updates the values in the form data model. Must match the complete form date model
patchValue()
—updates selected properties in the form data model. Used when partially updating form data model
- Provide developers with the flexibility to change control values without user interaction
Overview
- Improve overall data quality
- Accuracy-are users providing a usable value?
- Completeness-are they providing all values needed?
- Display useful messages to users
- Guide the user to input valid data
- Every time the value of a form control changes
- Angular runs validation
- Generates a list of validation errors
- Results in
VALID
or INVALID
- The class
Validators
from Forms API provide built-in validators for the most common use cases
Built-in validators
min
/max
—value must be greater/less than or equal to the provided number
required
—value must be non-empty
requiredTrue
—value must be true
email
—value must pass an email validation test
minLength
/maxLength
—value must be greater/less than or equal to the provided number. Intented for types with numeric length
value
pattern
—value must match a regex pattern
null validator
—Validator that performs no operation
compose
/composeAsync
—compose multiple (async) validators into a single function that returns the union of the individual error maps
Template-driven form
examples/lesson04-forms/projects/template-driven-validation/src/app/app.component.html
Reactive form
examples/lesson04-forms/projects/reactive-validation/src/app/app.component.ts
Custom validators
- Apply application-specific validation
- Cross-field validation
- Validate values in two different form controls in a form
- Mutually incompatible–Select only one of two options
- Dependencies—Select only an option, if another one is selected
- Asynchronous validators
- Similar to thier synchronous counterparts
- They must return a
Promise
or an Observable
- The observable must be finite (is has to complete at some point in time)
- Add directive for template-driven forms
- Create a
Directive
and implement the Validator
interface
Triggering validation
- Angular will trigger validation whenever a form control changes per default
- This can be overridden with
updateOn
property
change
—the value is checked as soon as it changes. Default setting
blur
—the value is checked when the control loses focus
submit
—the value is checked when the form is submitted
- Can be applied to individual form controls or complete forms
Angular vs. HTML5 validation
- HTML5 offers native contraint validation
- Disabled by Angular by default
- Add
ngNativeValidate
to the <form>
element to use native validation in combination with the Angular-based validation
Key differences
- Setup of form model
- Template-driven Implicit, created by directives
- Reactive Explicit, created in component class
- Data model
- Template-driven Unstructured and mutable
- Reactive Structured and immutable
- Data flow
- Template-driven Asynchronous
- Reactive Synchronous
- Form validation
- Template-driven Directives
- Reactive Functions


Memphis, Tennessee
Synopsis:
Memphis is a city located along the Mississippi River in southwestern Shelby County, Tennessee, United States. The 2017 city population was 652,236,[5] making Memphis the largest city on the Mississippi River,[6] the second most populous city in Tennessee, as well as the 26th largest city in the United States. Greater Memphis is the 42nd largest metropolitan area in the United States, with a population of 1,348,260 in 2017.[7] The city is the anchor of West Tennessee and the greater Mid-South region, which includes portions of neighboring Arkansas and Mississippi. Memphis is the seat of Shelby County, the most populous county in Tennessee. As one of the most historic and cultural cities of the southern United States, the city features a wide variety of landscapes[citation needed] and distinct neighborhoods.
Early Memphis:
In 1795 the Spanish Governor-General of Louisiana, Francisco Luis Héctor de Carondelet sent his Lieutenant Governor, Manuel Gayoso de Lemos, to negotiate and secure consent from the local Chickasaw so that a Spanish fort could be erected on the bluff; Fort San Fernando de las Barrancas was the result.[20][19]:71 Holmes notes that consent was reached despite opposition from "disappointed Americans and a pro-American faction of the Chickasaws", when the "pro-Spanish faction signed the Chickasaw Bluffs Cession and Spain provided the Chickasaws with a trading post…".[19]:71
19th Century:
The city of Memphis was founded on May 22, 1819 (incorporated December 19, 1826) by John Overton, James Winchester and Andrew Jackson.[24][25] They named it after the ancient capital of Egypt on the Nile River.[26] Memphis developed as a trade and transportation center in the 19th century because of its flood-free location high above the Mississippi River. Located in the low-lying delta region along the river, its outlying areas were developed as cotton plantations, and the city became a major cotton market and brokerage center.


Jeffrey Sabol
Slides @ csudh.jeffreystephensabol.org
Opens up the research output of the university to the world.
Enables and encourages iinterdisciplinary approaches to research.
Facilitates the development and sharing of digital teaching materials and aids.
Discoverability
Faculty's participation
Institutional support
Born-digital, open source, media-rich scholarly publishing that's as easy as blogging.
Allows access to the Journal regardless of citizenship, geography or institutional affiliation.
Most reputable OA journals are built on a sustainable model to insure continued publication.
Reach a larger audience then even the most prestigious journals.
Puts into practice the principles of a public university, namely that academic scholarship is a public good.
Does not have the exclusivity of most high impact journals
APC - article processing charges
Promotion and Tenure not aligned with OA journals
Library publisher mission:
For profit publisher mission:
Significatly lower cost than for profit publishers
Mostly open source, allowing for greater access to information.
Jeffrey Sabol
Slides @ csudh.jeffreystephensabol.org


This will export the payments sent by Lumenaut to a given Public Key. Input the Public Key bellow and press the button "Load" to get the payment's information directly from the network. If desired you can export a CSV file with the payment's information by pressing the button "Export CSV".
We don't store anything on our server, calculation is done locally on your browser. More Info| Date | Amount |
|---|---|
| No Public Key loaded... |


- Since the webOS WebView widget is pretty out of date, signing into Gmail can be a bit difficult.
- The first thing you must do is remove any existing Google accounts if you have any. You can do this by pressing the 'remove' button on the Gmail sign-in page.
- After that, add a Google account and sign in.
- If you are sent to the account settings page, simply tap the header at the top of your screen to be sent to your inbox.
- PreMail makes it easy to navigate through Gmail.
- At the top of your screen, you'll find the header bar. It is divided into three parts. The left and right sections feature the back and forward navigation controls, while the center of the header functions as a refresh button.
- At the bottom of your screen, you'll find buttons to go visit your inbox, compose a new email, view your contacts, take a look at your starred emails, and search your mail.
- You can tap the button in the top left corner to view the application menu. Here, you'll find several more helpful shortcuts and features. Most of these have keyboard shortcuts assigned to them.
- Some functions in PreMail can be called with shortcuts. You can find all of PreMail's shortcuts listed in the app menu next to their respective functions.
- To activate a shortcut, rest your finger in the gesture area and press a key.


Item one
Item two Item two Item two Item two Item two Item two Item two Item two Item two Item two Item two Item two Item two Item two Item two
Item three


|
vroom vroom
An HTTP server that interprets server-side JavaScript
|
#include <http_server.h>
Public Member Functions | |
| HTTPServer (unsigned short port) | |
| void | handle () |
| Public Member Functions inherited from vv::Server | |
| Server (unsigned short port) | |
| virtual | ~Server () |
Static Protected Member Functions | |
| static string | accept (const Socket &client) |
| static HTTPResponse | process (const string &message) |
Static Private Member Functions | |
| static bool | is_valid_http_message (string &message) |
| static unordered_map< string, string > | parse_post_data (const string &message) |
| static unordered_map< string, string > | parse_get_data (const string &message) |
| static unordered_map< string, string > | url_encoded_variables_to_map (const string &content) |
| static unsigned char | from_hex (unsigned char ch) |
| static const string | url_decode (const string &str) |
Additional Inherited Members | |
| Protected Attributes inherited from vv::Server | |
| unsigned short | port_ |
| Socket | socket_ |
Handles HTTP requests from clients, and processes response to send back generated HTTP response.
| HTTPServer::HTTPServer | ( | unsigned short | port | ) |
Creates an HTTPServer with a given port.
| port | the port to open for the server |
|
staticprotected |
Accepts a client socket to receive the request string.
| client | the client socket |
|
staticprivate |
Convert a hexadecimal character into the ASCII value it represents.
| ch | the hexadecimal-encoded character |
|
virtual |
Handles a client request in a separate thread.
Implements vv::Server.
|
staticprivate |
Determines if a given HTTP message is complete and valid.
| message | the HTTP message to validate |
|
staticprivate |
Parses the HTTP request to retrieve its GET data, and stores them into an unordered map to be used when interpreting the file requested.
|
staticprivate |
Parses the HTTP request to retrieve its POST data, and stores them into an unordered map to be used when interpreting the file requested.
|
staticprotected |
Processes an HTTP request to handle the logic required to generate a response.
| message | the full HTTP request |
|
staticprivate |
Decodes a URL-encoded string.
| str | the URL-encoded string |
|
staticprivate |
Parses the string of url-encoded key-value pairs from an HTTP request into an unordered map.


The band was formed by frontman Gerard Way and drummer Matt Pelissier in Newark, New Jersey, soon after the September 11 attacks. Witnessing the World Trade Center towers fall influenced Way's life to the extent that he decided to start a band. Way wrote the song "Skylines and Turnstiles" to express his feelings about September 11 and shortly thereafter, Ray Toro was recruited as the band's guitarist because at the time Way could not sing and play the guitar simultaneously. The name of the band was suggested by bass guitarist Mikey Way, younger brother of Gerard, who was working in a Barnes & Noble when he was struck by the title of a book by Irvine Welsh named Ecstasy: Three Tales of Chemical Romance.
The first recording sessions were undertakenin Pelissier's attic, where the songs "Our Lady of Sorrows" and "Cubicles" were recorded. The band refers to those sessions as The Attic Demos. After hearing the demo and dropping out of college, Mikey Way decided to join the band. While with Eyeball Records, the band met Frank Iero, the lead vocalist and guitarist for Pencey Prep. Following Pencey Prep's split in 2002, Iero became a member of My Chemical Romance, just days prior to the recording of the band's debut album. They recorded their debut album, I Brought You My Bullets, You Brought Me Your Love, just three months after the formation of the band and released it in 2002 through Eyeball Records. My Chemical Romance offered free downloads through PureVolume and the social networking website MySpace, where they gained an initial fan base.
In 2003, the band signed a deal with Reprise Records. Following a tour with Avenged Sevenfold, the band began working on their second album, which was entitled Three Cheers for Sweet Revenge, which was released on June 8, 2004. A month after the album's release, the band replaced Matt Pelissier with Bob Bryar. The band released four singles from the album: "I'm Not Okay (I Promise)", "Thank You for the Venom", "Helena", and "The Ghost of You". The album went platinum in just over a year of its release.
At the beginning of 2005, the band was featured on the first Taste of Chaos tour along with The Used and Killswitch Engage. The band also was the opening act for Green Day on their American Idiot tour. They then co-headlined Warped Tour 2005 with Fall Out Boy and co-headlined a tour with Alkaline Trio and Reggie and the Full Effect around the US. That same year, My Chemical Romance collaborated with The Used for a cover of the Queen and David Bowie classic, "Under Pressure", which was released as a benefit single for tsunami relief on iTunes and other Internet outlets.
In March 2006, the album Life on the Murder Scene was released, incorporating a CD and two DVDs. It included one documentary DVD chronicling the band's history, and a second DVD with music videos, the making of their videos and live performances. An unauthorized biography DVD Things That Make You Go MMM! was also released in June 2006. The DVD does not actually feature any My Chemical Romance music clips or performances but contains interviews with those who knew the band before much of their fame. A biography titled Something Incredible This Way Comes was also released, written by Paul Stenning and published in 2006.
My Chemical Romance started recording their third studio album on April 10, 2006 with Rob Cavallo, producer of many of Green Day's albums. It was originally thought to be titled The Rise and Fall of My Chemical Romance (in reference to The Rise and Fall of Ziggy Stardust and the Spiders from Mars by David Bowie), but in an interview with Kerrang! magazine, Gerard Way suggested this was just the album's working title, stating "It was never the title of the album, more a spoof, or joke."
On August 22, 2006, the band played a special one-off show at the 1,800-capacity London Hammersmith Palais. The show sold out in 15 minutes, prompting tickets to be re-sold on eBay well over the tickets' face value. The name of the album was announced and 20 people dressed in black capes with their faces obscured paraded around the Hammersmith venue, followed by a large group of fans and street team members with signs saying "The Black Parade". Later during the show, the album title and the UK release date were confirmed. Before the band took the stage, it was announced that My Chemical Romance was unable to play, but they would be replaced by The Black Parade. After initial crowd hostility, it became clear the band was simply performing under a pseudonym in keeping with the theme of the album. Since then, the band would often perform under the alias "The Black Parade", wearing the costumes seen in the album's music videos. Gerard Way would adopt the persona of the leader of the marching band, The Black Parade, and vary his behavior and performance accordingly.
"Welcome to the Black Parade" was released as a single on September 11, 2006. The single became the band's first number one on the UK Singles Chart in October 2006. The Black Parade was released on October 23, 2006, in the United Kingdom and on October 24, 2006, in the United States to positive reviews.
Most of the concerts of The Black Parade World Tour involved use of pyrotechnics, especially during "Mama" and "Famous Last Words". The Black Parade World Tour commenced on February 22, 2007, with the eventuating 133 shows featuring Rise Against, Thursday and Muse as support acts. Reggie and the Full Effect frontman James Dewees joined the band to play keyboards and synthesizer from there on. The band later featured on Linkin Park's Projekt Revolution tour in 2007, along with Placebo, Mindless Self Indulgence, Saosin, Taking Back Sunday and HIM.
The band announced in a blog on their website that they would be going on a final tour in the United States before taking a break.
At the same time, they announced they will be releasing a live DVD/CD collection titled The Black Parade Is Dead!, which includes
two concerts from October 2007, the final Black Parade concert in Mexico, and a small show at Maxwell's in New Jersey.
The DVD/CD was meant to be released on June 24 in the United States and June 30 in the UK, but was postponed to July 1
because of a technical fault with the Mexico concert. In February 2009, an EP of B-side songs
from singles on The Black Parade was released, titled The Black Parade: The B-Sides.
In 2009, My Chemical Romance released a new single entitled "Desolation Row" (a cover of the Bob Dylan song) on February 1, 2009. It was recorded to feature as the end credit track for the 2009 film Watchmen, an adaptation of the graphic novel of the same name. The band then announced that they would be releasing "a collection of nine never-before-seen live videos, straight from the encore set of the Mexico City show from October 2007", entitled ¡Venganza!. The release came on a bullet-shaped flash drive and also contained exclusive photos of the band from the show. It was released on April 29, 2009.
On May 27, 2009, My Chemical Romance's web designer, Jeff Watson, announced via the band's website that the band was headed to the studio to record their fourth full-length album. The recording took place over the following few weeks with producer Brendan O'Brien, who has worked with AC/DC, Mastodon, and Pearl Jam.
In an interview with NME, Gerard Way said the band's next record would be a rock album, saying, "I think (the next album) will definitely be stripped down. I think the band misses being a rock band." In a separate interview with Idiomag, Way commented that the next release would be less theatrical in scope, stating that "it's not going to be hiding behind a veil of fiction or uniforms and makeup anymore." In an interview with PopEater, Way also stated that the next album will be "full of hate." He also said "over the years that we've been hearing ourselves live and hearing us on records, we kind of prefer the live. There's more of a garage feel and more energy. I'd like to capture some of that, finally. That's the goal for the next one."
On July 31 and August 1, 2009, My Chemical Romance played two "secret" shows at The Roxy Theater in Los Angeles. The shows were the first concerts the band had played since Madison Square Garden in May 2008. The band also premiered several new songs said to be from their upcoming fourth album during the shows, one reportedly titled "Death Before Disco", a song that Way said he was particularly excited about. The song was since renamed "Party Poison" and was included on the new album. Way explained further in a Rolling Stone interview that "it's a completely different sound for the band — it's like an anti-party song that you can party to. I can't wait for people to hear it. It brings back, lyrically, some of that wonderful fiction from the first album."
Gerard Way also said in a November 2009 interview with Rock Sound that the fourth album would be their defining work. "A friend who heard the record recently said he now had no interest in listening to our older work anymore, that we had made all our old material redundant. I took it as a compliment, the next thing you should always make the last thing seem unimportant and I think that will happen when we finally release this album."
On March 3, 2010, Iero announced on their official website that Bob Bryar had left the band, writing:
As of 4 weeks ago, My Chemical Romance and Bob Bryar parted ways. This was a painful decision for all of us to make and was not taken lightly. We wish him the best of luck in his future endeavors and expect you all to do the same.
— Frank Iero
In a March 2010 MTV interview about the new album, Way explained, "There's no title yet ... I'm actually kind of excited about that. It's kind of 'anything goes' at this point, but I'm so happy with the songs." Though the band since decided on the title of their fourth album, it continued to go unannounced, with various rumors circulating and the band stating on their website that it will be revealed "all in due time" and in Way's words, "a special way this time. Maybe some sort of event, something fun, something soon."
In September, a trailer video was uploaded to My Chemical Romance's official YouTube page entitled Art is a Weapon, which announced the title of the album: Danger Days: The True Lives of the Fabulous Killjoys. The video featured the band wearing strangely coloured outfits and battling unusual characters in a desert surrounding, and featuring a sample of music from the song "Na Na Na (Na Na Na Na Na Na Na Na Na)". Notable comic book author and the band's personal friend, Grant Morrison, makes a special appearance, in the role of an enemy and leader of a band of masked characters. On September 22, 2010, the band premiered their song "Na Na Na (Na Na Na Na Na Na Na Na Na)" on Zane Lowe's BBC Radio 1 show, and Los Angeles-based radio station KROQ-FM. The album was released on November 22, 2010.
Rock Sound had a preview of the album and gave a positive review, commenting "the way they've used everything they learned on The Black Parade and tightened up in certain places feels natural and confident" and that it sees "the creativity of the band taking flight musically, graphically and literally."
Michael Pedicone joined the band as a touring drummer late in 2010, replacing Bryar.During a performance at Wembley Arena on February 12, 2011, Way announced that the band would be appearing at a UK festival later in the year, later confirmed as the Reading and Leeds Festivals, which they headlined. They also performed at Radio 1's Big Weekend in Carlisle, England on May 15, 2011.
On September 4, 2011, it was revealed through various sources that Jarrod Alexander will be the new touring drummer for the remainder of the Honda Civic tour. He also performed with them in late October at Voodoo Experience and at their Australian + New Zealand shows at Big Day Out in early 2012.
In an interview with Rolling Stone in October 2011, guitarist Frank Iero revealed that new music could be out "by summer".
On April 28, 2011, US broadcaster Glenn Beck labelled the My Chemical Romance song "Sing" as "propaganda" after it was featured and covered on the US musical drama TV series Glee in February 2011. Beck stated "It's an anthem saying 'Join us'. How can you and I possibly win against that?" The lyrics that Beck pointed out were: "Cleaned up corporation progress, dying in the process / Children that can talk about it living on the railways [sic] / People moving sideways / Sell it till your last days / Buy yourself the motivation / Generation nothing / Nothing but a dead scene / Product of a white dream". Gerard Way responded to the accusation on the band's official website, writing, "I think the word Glenn Beck was looking for was 'subversion' not 'propaganda', because I don't know what it would be considered propaganda for—truth? Sentiment?" He also said that he was "shocked that no actual fact-checking was done on the lyrics". Bassist Mikey Way told the BBC, "If we're getting reaction from people like that we're doing something right."
In February 2012, members of My Chemical Romance revealed that they had been building a studio in Los Angeles to record music for the band's fifth album under the working title MCR5, now with touring keyboardist James Dewees as an official member. The band worked with engineer Doug McKean, who previously worked on The Black Parade and Danger Days: The True Lives of the Fabulous Killjoys. On September 14, 2012, Frank Iero announced through the band's official website a new project entitled Conventional Weapons. The project revolved around 10 unreleased songs that were recorded in 2009, prior to the making of Danger Days. The band released two songs each month for five months from the Conventional Weapons sessions, starting in October 2012 and finishing in February 2013. According to the October 2012 issue of Q magazine, Frank Iero reported early sessions for MCR's next album with the new drummer Jarrod Alexander were progressing well. "Jarrod is a rad guy and a fantastic player. It's been really fun making music with him these past few months," Iero commented.
On March 22, 2013, the band announced their break-up on their official website, issuing this statement:
"Being in this band for the past 12 years has been a true blessing. We've gotten to go places we never knew we would. We've been able to see and experience things we never imagined possible. We've shared the stage with people we admire, people we look up to, and best of all, our friends. And now, like all great things, it has come time for it to end. Thanks for all of your support, and for being part of the adventure."
Gerard Way posted an extended tweet on his Twitter account two days after the website announcement, where he confirmed the disbanding of the group but denied that altercations between band members were the reason for the split.


Expensive F and B in Singapore if you want
The following are eateries/shops where the offerings have been thought of as ‘expensive’ by others or myself. I list them with an example of the prices (in SGD), which I myself have paid while I was there.
- A chicken thigh with rice cost $6.80, at Lam’s. https://www.lamskitchen.com/outlets
- A cup of hot chocolate cost $10.67, at Laurent Bernard Chocolatier. https://www.facebook.com/Laurentbernardchocolatier/
- A serving (one glass, not a bottle) of whisky cost close to $30, at Quaich. https://www.quaichbar.com.sg/contact-us
- A stick of baguette cost $4, at Slow Bakes. https://www.happycow.net/reviews/slow-bakes-central-singapore-118886
- A plate of sliced beef, done Korean-style, cost $10, at Kim Dae Mun. https://www.facebook.com/KimDaeMun/
- A burger cost approximately $40, after a discount, at Morton’s. https://www.mortons.com/singapore/
- A four-course meat-free meal cost between $20 to $30, if I am not mistaken, at Sufood. https://sufood.com.sg/contact-us/


word VMClose( VMFileHandle file, Boolean noErrorFlag);
This routine updates and closes a VM file. If it is successful, it returns
false
. If it fails, it returns a member a
VMStatus
error code. Note that the routine closes the file even if it could not successfully update the file; in this case, any changes since the last update will be lost. For this reason, it is safest to call
VMUpdate()
first, then (after the file has been successfully updated) call
VMClose()
.
If
noErrorFlag
is FILE_NO_ERRORS,
VMClose()
will fatal-error if it could not succesfully update and close the file. If
noErrorFlag
is neither FILE_NO_ERRORS nor zero,
VMClose()
will crash.
Include: vm.h
Boolean VMCompareVMChains( VMFileHandle sourceFile, VMChain sourceChain, VMFileHandle destFile, VMChain destChain);
This routine compares two VM chains or DB items. It returns true if the two are identical; otherwise it returns false .
Include: vm.h
VMBlockHandle VMCopyVMBlock( VMFileHandle sourceFile, VMBlockHandle sourceBlock, VMFileHandle destFile);
This routine creates a duplicate of a VM block in the specified destination file (which may be the same as the source file). It returns the duplicate block's handle. The duplicate will have the same user ID as the original block.
Include: vm.h
VMChain VMCopyVMChain( VMFileHandle sourceFile, VMChain sourceChain, VMFileHandle destFile);
This routine creates a duplicate of a VM chain (or DB item) in the specified destination file (which may be the same as the source file). It returns the duplicate's
VMChain
structure. All blocks in the duplicate will have the same user ID numbers as the corresponding original blocks.
Include: vm.h
MemHandle VMDetach( VMFileHandle file, VMBlockHandle block, GeodeHandle owner); /* Pass zero to have block owned by * current thread's owner */
This routine detaches a global memory block from a VM block. If the VM block is not currently in memory,
VMDetach()
allocates a memory block and copies the VM block into it. If the VM block is dirty,
VMDetach()
will update the block to the file before detaching it.
Include: vm.h
VMBlockHandle VMFind( VMFileHandle file, VMBlockHandle startBlock, word userID);
This routine finds a VM block with the specified user ID number. If the second argument is
NullHandle
the routine will return the matching block with the lowest handle. If the second argument is non-null, it will return the first matching block whose handle is larger than the one passed (in numerical order).
Include: vm.h
void VMFree( VMFileHandle file, VMBlockHandle block);
This routine frees the specified VM block. If a global memory block is currently attached to the VM block, it is freed too.
Include: vm.h
void VMFreeVMChain( VMFileHandle file, VMChain chain);
This routine frees the specified VM chain or DB item. If a chain is specified, all blocks in the chain will be freed.
Include: vm.h
word VMGetAttributes( VMFileHandle file);
Each VM file contains a set of
VMAttributes
flags. These determine how the VM manager will treat the file. This routine returns the current flags.
Include: vm.h
Tips and Tricks: When the Document Control objects create files, they automatically initialize the attributes appropriately.
See Also: VMSetAttributes()
.
word VMGetDirtyState( VMFileHandle file);
This routine finds out if a file has been dirtied. It returns a word-sized value. The upper byte of the return value is non-zero if the file has not been dirtied since the last save, auto-save, or update; the lower byte is non-zero if the file has not been dirtied since the last save. Thus, if the return value is zero, the file must be updated.
Include: vm.h
Tips and Tricks:
VMUpdate()
is optimized for updating clean files. For this reason, it is faster to call
VMUpdate()
then it is to first check the dirty state, then call
VMUpdate()
only if the file is dirty.


So who else feels like Arnold in Total Recall when trying to work out CSS?
Now I don't know if you saw the film. That isn't relevant, but it is a science fiction classic and don't watch the 2000 remake.  I'm not going to offer a solution, but I'll try to write out some concepts that make sense to me, but may not make any sense to you.
Did you know that web design generally consists of utilizing lots of boxes in order to look aesthetically pleasing to the eye?
If you look at a picture, it's likely to be in a box. If you look at a paragraph, it's also sitting in a box. As a user, it is easy to take this concept for granted because users mays assume it is as easy as cobbling together a powerpoint presentation. However, it is far more difficult to build than what you may use to.
HTML is like making a skeleton (the tags) and throwing a few organs (the substance/information) in there. However, it doesn't look pretty and people like looking at projects with a little more "meat." CSS is the muscle and skin that makes the website feel alive. In order to accomplish this, CSS treats the HTML as a series of boxes that surround different elements. Starting from there, let's focus on the box model.
Every box has a border in css even if you don't see it. Imagine if you were a mime pretending you were stuck in a box all day. Afraid of mimes? How about if you imagine yourself in a workplace in a stereotypical cube shaped cubicle?
So the box model is a concept regarding boxes in CSS using terms such as margins, padding, and borders. There are hundreds of sites that explain it via a picture, model, or sample. I figure I would take a diffferent approach and attempt to explain it via my homemade example from Office Space (an all-time favorite film).
Let's pretend we have Milton (a memorable character form the film) is stuck in this confining cubicle that is surrounded by walls. These walls would make up the border.
Is Milton stuck in this cubicle? Is his entire body rigidly stuck within the confines of his borders? Nah, there is definitely some wiggle room! In CSS terms, this would be padding." Padding is the space between the content of the box and the border. Thankfully, Milton can move around his cubicle!
In this blog, you can see the padding space between the text and the border.Now, let us imagine Milton leaving the comfortable padding of his cubicle to beg for office birthday cake. Outside the borders, Milton is now in the margin .The margin is all the space outside the box. On a website, it is completely transparent. Notice on this website, I don't have boxes taking up the entire width of the page? The margin is all space outside these boxes that I have created.
I don't need to get into CSS manipulation because you could get it out of any book or web site. It is more important to conceptually imagine and experiment with the walls. For example, Milton wants more space for his "red stapler." We can re-adjust via {padding} in order to center Milton more. Maybe he wants to be closer to one wall of the cubicle? How about we can increase the padding by focusing on the left? How about increasing the ceiling height? We could increase the padding top value!
Margins are trickier. Just imagine if Milton wanted to separate his cubicle from other cubicles and wanted some solidarity. You could increase the margin on various sides to separate him from other workers (box elements)!
So to summarize, Milton is the element on a web page. CSS treats each element as a box surrounded by a border with padding inside. Outside of this box, the margin exists as usable space. Hope you appreciate the Office Space example and feel free to comment!


Home
About
To-do List
Letters
Games
Addition
Subtraction
Multiplication
Division
Contact
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Reset


MovieLens Dataset¶
The MovieLens Dataset was collected by GroupLens Research. The data set contains some user information, movie information, and many movie ratings from [1-5]. The data sets have many version depending on the size of set. We use MovieLens 1M Dataset as a demo dataset, which contains 1 million ratings from 6000 users on 4000 movies. Released 2/2003.
Dataset Features¶
In ml-1m Dataset, there are many features in these dataset. The data files (which have ”.dat” extension) in ml-1m Dataset is basically CSV file that delimiter is ”::”. The description in README we quote here.
RATINGS FILE DESCRIPTION(ratings.dat)¶
All ratings are contained in the file “ratings.dat” and are in the following format:
UserID::MovieID::Rating::Timestamp
- UserIDs range between 1 and 6040
- MovieIDs range between 1 and 3952
- Ratings are made on a 5-star scale (whole-star ratings only)
- Timestamp is represented in seconds since the epoch as returned by time(2)
- Each user has at least 20 ratings
USERS FILE DESCRIPTION(users.dat)¶
User information is in the file “users.dat” and is in the following format:
UserID::Gender::Age::Occupation::Zip-code
All demographic information is provided voluntarily by the users and is not checked for accuracy. Only users who have provided some demographic information are included in this data set.
- Gender is denoted by a “M” for male and “F” for female
- Age is chosen from the following ranges:
- 1: “Under 18”
- 18: “18-24”
- 25: “25-34”
- 35: “35-44”
- 45: “45-49”
- 50: “50-55”
- 56: “56+”
- Occupation is chosen from the following choices:
- 0: “other” or not specified
- 1: “academic/educator”
- 2: “artist”
- 3: “clerical/admin”
- 4: “college/grad student”
- 5: “customer service”
- 6: “doctor/health care”
- 7: “executive/managerial”
- 8: “farmer”
- 9: “homemaker”
- 10: “K-12 student”
- 11: “lawyer”
- 12: “programmer”
- 13: “retired”
- 14: “sales/marketing”
- 15: “scientist”
- 16: “self-employed”
- 17: “technician/engineer”
- 18: “tradesman/craftsman”
- 19: “unemployed”
- 20: “writer”
MOVIES FILE DESCRIPTION(movies.dat)¶
Movie information is in the file “movies.dat” and is in the following format:
MovieID::Title::Genres
- Titles are identical to titles provided by the IMDB (including year of release)
- Genres are pipe-separated and are selected from the following genres:
- Action
- Adventure
- Animation
- Children’s
- Comedy
- Crime
- Documentary
- Drama
- Fantasy
- Film-Noir
- Horror
- Musical
- Mystery
- Romance
- Sci-Fi
- Thriller
- War
- Western
- Some MovieIDs do not correspond to a movie due to accidental duplicate entries and/or test entries
- Movies are mostly entered by hand, so errors and inconsistencies may exist


Locker.Server
A utility module that helps in creating GenServer
processes that
are registered in locker.
This module implements functions for
keeping up the registration. It accepts two parameters, namely
:lease_length
and :lease_threshold
, which defaults to 5 seconds
and one second. Based on these options, the process registration is
updated in the progess registry.
Example
You can create a standard GenServer
process that is registered
under locker
like this:
defmodule MyServer do
use Locker.Server, lease_length: 10000
def init(_) do
{:ok, %{}}
end
end
Note that Locker.Server
provides start/2
and start_link/2
functions that you don’t need to implement yourself. If the opts
contains key name
, this name will be registered under
Locker.Registry
.
Note also that if you need to override terminate/2
to do some
cleaning up, you need to remember to add call to `super(reason,
state)` so that the process will be unregistered on termination.
defmodule MyServer do
use Locker.Server
def init(_) do
{:ok, %{}}
end
def terminate(reason, state) do
super(reason, state) # will call Locker.Server.terminate/2.
end
end


Drop Zone
File Name
Type
Actions
Person 1
April 1 2015
Delete
Person 2
April 2 2015
Delete
Person 3
April 3 2015
Delete


For some Context
There are a lot of good resources about using context
packages in software based on your programming language. However, I found that most of these do not address the basic questions of motivation behind the need of context:
- How does the use of context help us in programming?
- When should a programmer use context?
In this blog post, I will share what I understand about context
.
Motivation
Consider you are an event manager of a restaurant. A customer wants to throw a party for 50 people on New Year Eve and you are tasked with organizing the event. Given the magnitude of the event, you start planning and assign jobs to your suboridinates: - waiters are instructed to look their best, – chefs must prepare the grocery list, - errand boys to fetch the grocery. - playlist for the “DJ”, - someone for decoration
The preparations are going smoothly on your end and you expect a picturesque celebration under your leadership. However, a couple of days later the same customer profusely apologizes for cancelling the event due to some reason. Even though you are disappointed by this request, you accept the apology.
There are two alternates for you to choose from: 1. Immediately cancel all the arrangements 2. Wait till the New Year Eve for some other miraculous booking
Being a rational manager, you immeditately start off to cancel all arrangements rather than waiting till the New Year’s eve because you do not want to waste resources(time and money).
This is exactly what “context” is used for in programming: - Cancellation progropagation - Scoping values (passing grocery list around, organizing the playlist) The use of context can make programs efficient with respect to use of computer resources as well as graceful fallback mechanism.
Let us understand how we can use context
with a simple example.
// Some time consuming process like:
// - API calls
// - Cruching data from database
//
func someFunc() {
fmt.Println("Starting computation")
time.Sleep(10*time.Second)
fmt.Println("Completed computing")
Now, the caller of this function is expected to wait for a while (10s in this case) until the processing is complete. However, if the user somehow decides to cancel this process before it completes, he is at a loss. The only way the user can exit is by CTRL
+ C
i.e by sending an interuption signal to the running process; this maynot even be possible all the time. However, the use of context
provides him a way to set time deadlines or logical cancellations. Maybe the user wants to wait for atmost 5 seconds before cancelling; the context gives him this power.


Everybody knows that rabbits are adorable pets. If you love animals and like them around you all the time, you will definitely love to have a bunny. Despite the usual problems that any house pet can cause, a rabbit can easily become your best furry friend.

Here is a list of foods that your pet rabbit can and should eat:
Here is a list of foods that are harmful to your rabbit and should NOT be given to them:
This serious and potentially fatal condition occurs more commonly in rabbits than one would like to imagine. And what makes it so serious is that the symptoms are extremely difficult to spot.
G stasis occurs when the rabbit’s digestive system comes to a halt. Any rabbit food that the rabbit consumes is no longer processed and the metabolism is shut down.
Lethargy, lack of appetite, bloating and reduced fecal matter. One of the easiest ways to detect GI Stasis in rabbits is to rest your ears on your bunny’s abdomen gently and listen for sounds of the digestive system functioning normally. There’s typically a gurgling sound or something similar. If you do not hear any sounds at all, then there are chances that the digestive system may have shut down.
Ear Mites are undoubtedly among the most common health conditions that can occur in rabbits. That’s irrespective of whether you keep your bunny indoors or outdoors. The good news is that the condition appears to be a lot more serious than it actually is. It is easily treatable. Having said that, if left untreated, it can quickly progress into secondary infections of the middle and inner ear. In extreme cases, mite infestations can also progress to meningitis. So, like any other health condition, you might want to start diagnosis and early treatment for ear mites.
Ear mites are contagious. So the chances of your bunny picking up mites after coming into contact with another infected bunny are high.
One of the first symptoms of an ear mite infestation is intense bouts of itching around the ears, neck and head. The itching may be generalized or focused mainly around the ears. There will be scales on the inner ear which will eventually form thick crusted lesions. There may be hair loss and occasional peeling of the skin. If the infestation has penetrated into the inner ear, it may cause loss of balance or head tilt in bunnies. Mite infestations can also spread to other parts of the rabbit’s body especially the belly and the area that surrounds the anus.
‘sore hocks’ is a condition in which the sole on the rabbit’s rear legs get infected and inflamed. The condition is typically localized in the area of the rabbit’s feet which come into contact with the floor as the rabbit rests.
Sore Hocks can range from mild to severe and are usually graded depending on the severity of the condition. In grades I to III, the condition is considered moderate and the bunny will show signs of hair loss near the bottom of the rear feet. Swelling is rare but not unusual. In some cases, the skin will become excessively red and may form scabs and ulcers which can be prone to infection.
Rabbits by nature, are free-roaming and able to get as much exercise as they need throughout the day. Pet rabbits are no different than wild rabbits in that they require regular exercise to remain as healthy as possible.
If your rabbit’s diet isn’t on point, it may be at risk of health issues. Just like us humans, your rabbits need a well-balanced and nutritional food. Unlike us humans, domesticated rabbits can’t control what they eat. So, it’s down to you as the owner to ensure you’re feeding it the best food.
You should make an effort to visit the vet at least once a year excluding the rabbit's shots. Also when you notice symptoms like the one's stated above in the health section make a point of visiting the vet as soon as possible as it may be serious.


Welcome to the best pizza place in town
Please log in to order our delicious pizza\'s
Mozzarella, Tomato & Double Pepperoni
Mozzarella, Tomato, Pepperoni, Jalapenos, Salami & Bell Peppers
Mozzarella, Tomato, Mushroom, Red Onion, Olives, Fresh Tomato, Sweetcorn & Bell Peppers
Log in to call a private (secured) server endpoint.
The secured call will fetch the residences from Google (if you used Google to access this site) and store them in the user_metadata


Samples Pending
| Block Pos | Group | Member | Sample | Solvent | Experiments |
New Sample
| Block Pos | Group | Member | Sample | Solvent | Experiments | ||
|
|
Please save the file in the directory: nmrdata :: downloads/Eric/remoteUsers
Change the browser download options to ask the user where a file should be saved


Olympics: Tokyo governor gives reluctant consent to move marathon
TOKYO (Reuters) - Tokyo Governor Yuriko Koike gave her reluctant consent to moving the marathon venue to Sapporo for next year’s Summer Games, ending a showdown between the Japanese capital and the International Olympics Committee over staging the event.
“I think we must move forward,” Koike said at a four-party meeting with representatives from the IOC, the 2020 organizing committee and the national government, which was open to media. “I don’t approve but the decision can’t be avoided.”


Introduction
TypeScript was designed by Anders Hejlsberg at Microsoft to help write entersprise scale JavaScript.[1] It is a superset of JavaScript with optional static typing and has support for ES2015 features like classes, arrow functions and template literals.
Many teams from large companies have continually arrived at the conclusion that adding types enhances quality and understandability of code.[2] However static typing does add complexity and visual clutter. Especially if you need to manually specify a type (like in Java). Fortunately TypeScript does not force you to use types and will try to infer as much type information as it can in order to give you type safety. As a result TypeScript can provide compile time type safety for your JavaScript code.
Besides beeing a stronlgy-typed language, one of the biggest selling points of TypeScript is the tooling it provides. IDEs can take adavantage of feature like advanced autocompletion and code navigation to improve the development experience. Especially displaying errors that otherwhise would only show up once the code is deployed to the browser saves a lot of time and frustation. Also, the fact that intellisense and basic refactoring (e.g. renaming a symbol) are reliable makes a huge impact on the process of writing and refactoring code.
While TypeScript greatly improves the coding experience, it adds an additional step to the build process. Since browsers can not intepret TypeScript your code has to be transpilled to JavaScript. But since you usually have a complex build process that is handled by a task runner anyway the added complexity can easily be solved by using an existing plugin, like gulp-typescript[3].