Line data Source code
1 : import { MobileJsonWireProtocol,
2 : errors } from 'mobile-json-wire-protocol';
3 1 : import commands from './commands';
4 : import log from './logger';
5 : import { desiredCapabilityConstraints, validator } from './desired-caps';
6 : import B from 'bluebird';
7 : import _ from 'lodash';
8 6 :
9 1 : validator.promise = B;
10 12 : validator.prettify = (val) => { return val; };
11 :
12 23 : const NEW_COMMAND_TIMEOUT_MS = 60 * 1000;
13 :
14 : class BaseDriver extends MobileJsonWireProtocol {
15 :
16 4 : constructor (shouldValidateCaps = true) {
17 23 : super();
18 23 : this.sessionId = null;
19 23 : this.caps = null;
20 23 : this.newCommandTimeoutMs = NEW_COMMAND_TIMEOUT_MS;
21 23 : this._constraints = _.cloneDeep(desiredCapabilityConstraints);
22 :
23 : // base-driver internals
24 23 : this.curCommand = new B((r) => { r(); }); // see note in execute
25 23 : this.noCommandTimer = null;
26 23 : this.shouldValidateCaps = shouldValidateCaps;
27 : }
28 1 :
29 : // we only want subclasses to ever extend the contraints
30 1 : set desiredCapConstraints (constraints) {
31 4 : this._constraints = Object.assign(this._constraints, constraints);
32 1 : }
33 :
34 1 : get desiredCapConstraints () {
35 0 : return this._constraints;
36 1 : }
37 :
38 1 : // method required by MJSONWP in order to determine whether it should
39 : // respond with an invalid session response
40 1 : sessionExists (sessionId) {
41 14 : if (!sessionId) return false;
42 14 : return sessionId === this.sessionId;
43 : }
44 1 :
45 : logExtraCaps (caps) {
46 18 : let extraCaps = _.difference(_.keys(caps),
47 : _.keys(this._constraints));
48 18 : if (extraCaps.length) {
49 3 : log.warn(`The following capabilities were provided, but are not ` +
50 : `recognized by appium: ${extraCaps.join(', ')}.`);
51 : }
52 : }
53 :
54 : validateDesiredCaps (caps) {
55 25 : if (!this.shouldValidateCaps) {
56 0 : return true;
57 1 : }
58 :
59 25 : let validationOptions = {fullMessages: false};
60 :
61 25 : let validationErrors = validator.validate(caps,
62 : this._constraints,
63 : validationOptions);
64 :
65 :
66 25 : if (validationErrors) {
67 7 : let message = `The desiredCapabilities object was not valid for the ` +
68 : `following reason(s):`;
69 :
70 :
71 7 : for (let [attribute, reasons] of _.pairs(validationErrors)) {
72 11 : for (let reason of reasons) {
73 12 : message += ` ${attribute} ${reason},`;
74 : }
75 : }
76 7 : message = message.slice(0, -1) + '.';
77 1 :
78 7 : throw new errors.SessionNotCreatedError(message);
79 1 : }
80 :
81 18 : this.logExtraCaps(caps);
82 :
83 18 : return true;
84 : }
85 :
86 : // This is the main command handler for the driver. It wraps command
87 : // execution with timeout logic, checking that we have a valid session,
88 : // and ensuring that we execute commands one at a time. This method is called
89 : // by MJSONWP's express router.
90 32 : async execute (cmd, ...args) {
91 : // if we had a command timer running, clear it now that we're starting
92 : // a new command and so don't want to time out
93 57 : if (this.noCommandTimer) {
94 7 : clearTimeout(this.noCommandTimer);
95 : }
96 :
97 : // if we don't have this command, it must not be implemented
98 : if (!this[cmd]) {
99 : throw new errors.NotYetImplementedError();
100 : }
101 :
102 : // What we're doing here is pretty clever. this.curCommand is always
103 : // a promise representing the command currently being executed by the
104 : // driver, or the last command executed by the driver (it starts off as
105 : // essentially a pre-resolved promise). When a command comes in, we tack it
106 : // to the end of this.curCommand, essentially saying we want to execute it
107 : // whenever this.curCommand is done. We call this new promise nextCommand,
108 : // and its resolution is what we ultimately will return to whomever called
109 : // us. Meanwhile, we reset this.curCommand to _be_ nextCommand (but
110 7 : // ignoring any rejections), so that if another command comes into the
111 7 : // server, it gets tacked on to the end of nextCommand. Thus we create
112 7 : // a chain of promises that acts as a queue with single concurrency.
113 57 : let nextCommand = this.curCommand.then(() => {
114 57 : return this[cmd](...args);
115 : });
116 57 : this.curCommand = nextCommand.catch(() => {});
117 56 : let res = await nextCommand;
118 11 :
119 11 : // if we have set a new command timeout (which is the default), start a
120 11 : // timer once we've finished executing this command. If we don't clear
121 11 : // the timer (which is done when a new command comes in), we will trigger
122 11 : // automatic session deletion in this.onCommandTimeout. Of course we don't
123 : // want to trigger the timer when the user is shutting down the session
124 11 : // intentionally
125 56 : if (this.newCommandTimeoutMs && cmd !== 'deleteSession') {
126 12 : this.noCommandTimer = setTimeout(this.onCommandTimeout.bind(this),
127 : this.newCommandTimeoutMs);
128 : }
129 :
130 : return res;
131 0 : }
132 0 :
133 : async onCommandTimeout () {
134 11 : log.warn(`Shutting down because we waited ` +
135 11 : `${this.newCommandTimeoutMs / 1000} seconds for a command`);
136 0 : await this.deleteSession();
137 : }
138 :
139 11 : }
140 0 :
141 1 : for (let [cmd, fn] of _.pairs(commands)) {
142 4 : BaseDriver.prototype[cmd] = fn;
143 : }
144 :
145 : export { BaseDriver };
|


My family and I love Portugal. It is a beautiful country with many gorgeous beaches, lovely food and very friendly people.
We have gone on holiday to Portugal for the past 10 years, usually to the lovely town of Alvor, which is full of Irish people and Irish pubs.
After a few years in Portugal we fell in love with it and haven't even considered going anywhere else since!
I hope to go there someday with my own family.
America is a huge country with many opportunities and amazing things to see. From movies, tv shows and recommendations from people who have visited, it is definitely a place I'd like to explore.
In third year of BIS, students have an opportunity to go working in the States in places like Boston so I hope to be one of those lucky few.


It is the example of quite simple XSS filter based on strict_dom It removes script tags and onerror attributes (other events should work)


v
Cy-Curity
add
Lock
Close
** Secured **
Lock
Unlock
Show
Blinds
Close
** Secured **
Show
Close
Create New Device
Device Name
Ip Address
Device Type
Select Device Type
Lock
Blinds
Secure Device
No
Yes
Connect Device
Are you sure you want to delete
Yes
No


Semantics
Consider a typed programming language where we divide the
constructors into three colours:
- Value constructors,
which can be copied or discarded,
such as 0, succ,
true, cons.
- Central constructors,
which cannot be copied or discarded,
such as ref or
rand.
- Process constructors,
where order of evaluation is important,
such as := or
print.
We have seen example flow graphs for such a language, but
what structures are necessary to give it a semantics?


Transition probabilities.
SVR12—sustained virologic response twelve weeks after the end of treatment.


Labcas 2.0
Downloading your files... please wait until complete, window will redirect back to previous page!


Angular.js - optional parent component
parent component present
accordion behavior like
accordion group 1 content
accordion group 2 content
accordion group 3 content
accordion group 4 content
accordion group 5 content
parent component not present
list of components
group 1 content
group 2 content
group 3 content
group 4 content
group 5 content
Advanced Angular 1.x: Component Communication with Require | codelord.net
2016/11/30


Bitbucket is a distributed version control system (DVCS) code hosting site that supports Mercurial and Git. It provides a fully-featured environment for managing development project, including code repository, wiki, powerful issue tracker and easy collaboration with others. The most important thing is that it is free to create a Private repository compare to GitHub, so it is a cheap and convenient way for individuals or a small team to manage their private projects. Here assume that you already have a BitBucket account. (If not, register here)
Create repository on BitBucket
Create a private/public repository, then on the overview page, you can get the repository information you created. Click the repository you created, then you will access the overview of the repository, see below The URL marked by a red line is repository URL which we will use later to import project into Eclipse.
Make Eclipse ready for Git
Open Eclipse and click on Help
menu, then click Install New Softwares
After that, click add
button, on the pop-up window, input eGit
to name and the URL http://download.eclipse.org/egit/updates
to Location.
Select Git integration for Eclipse and Java implementation for Git options and click next and finish install.
Add Git to Perspective
Open Perspective (red zone of below image) and choose Git from list.
Clone Repository from BitBucket
Enter Git Perspective, and click clone repository button. Then enter your Bitbucket URL and User Information as mentioned in below diagram. Click Next and Finish. No need to change other configuration in next window. Now, You should see your Bitbucket repository now in eclipse.
Import project to Eclipse
Import the project so you can work on the source code.
Click: File
> Import
> Git
> Projects from Git
> Existing local repository
> Select a Git Repository
> Import as General Project
> Next
> Finish
.
The code should then appear in your ‘Project Explorer’ window as a normal project. Then you can make changes to your file as you want, and you can look at Git Staging
view to see your changed files.


You are receiving this email because you requested a password reset. Please click on the link below to continue. Reset Password for ${username}


--- layout: post title: So long, fairwell... date: 2010-07-24 21:41:56.000000000 -04:00 type: post published: true status: publish categories: - eating out & going out - travel tags: - cruise - friends & family - travel meta: tagazine-media: a:7:{s:7:"primary";s:0:"";s:6:"images";a:0:{}s:6:"videos";a:0:{}s:11:"image_count";s:1:"0";s:6:"author";s:7:"9073083";s:7:"blog_id";s:7:"8808538";s:9:"mod_stamp";s:19:"2010-07-25 01:41:56";} jabber_published: '1280022116' _wp_old_slug: '' _oembed_3c43f84e1da5a19e3ec6a6861f9a096b: author: login: sophie email<EMAIL_ADDRESS>display_name: Pika first_name: '' last_name: '' ---
But do not worry! I am coming back...August 10th. My dad, grandma, and I are leaving for a 11 day cruise in northern Europe. Expect to see many food and travel pics when I return!
Peace out,
Sophie


We're sorry but Syllable doesn't work properly without JavaScript enabled. Please enable it to continue.


See: Description
| Interface | Description |
|---|---|
| CoronaActivity.OnActivityResultHandler |
Handler that is invoked by the
CoronaActivity when a result has been received from a
child Activity. |
| CoronaActivity.OnNewIntentResultHandler |
Handler that is invoked by the
CoronaActivity when it receives a new
Intent from outside the application. |
| CoronaActivity.OnRequestPermissionsResultHandler |
Handler that is invoked by the
CoronaActivity when a result has been received from the request permission dialog. |
| CoronaRuntimeListener |
Receives events from the
CoronaRuntime to detect when it is loaded, started, suspended, etc. |
| CoronaRuntimeTask |
Represents a single task to be executed by the
CoronaRuntime ,
just before it renders a frame. |
| Class | Description |
|---|---|
| ApplicationContextProvider |
Provides access to the application context.
|
| CoronaActivity |
The activity window that hosts the Corona project.
|
| CoronaEnvironment |
Provides simple methods for launching and accessing a
CoronaActivity as well as setting up
listeners for receiving events from the CoronaRuntime . |
| CoronaLua |
Provides a set of convenience functions for use with the
LuaState . |
| CoronaLuaEvent |
CoronaLuaEvent.java contains generic property keys used in Corona
events dispatched to Lua.
|
| CoronaRuntime |
Provides access to a running Corona project and its
LuaState . |
| CoronaRuntimeTaskDispatcher |
Allows you to send tasks to be executed on the
CoronaRuntime's thread, just before Corona
renders a frame. |


| Home | Libraries | People | FAQ | More |
The following are treated as valid digraphs when used as a collating name:
作为对照元素名称时下面的情况被当作合法的连字：
"ae", "Ae", "AE", "ch", "Ch", "CH", "ll", "Ll", "LL", "ss", "Ss", "SS", "nj", "Nj", "NJ", "dz", "Dz", "DZ", "lj", "Lj", "LJ".
So for example the expression:
如下例：
[[.ae.]-c]
will match any character that collates between the digraph "ae"
and the character "c".
可以匹配在连字"ae"到字符"c"范围之间的任意字符。


Break lookup in hierarchy
encapsulated model Test import Modelica.Mechanics.Rotational; Rotational.Components.Inertia inertia; // lookup successful Modelica.Mechanics.Translational.SlidingMass slidingMass; // lookup fails equation ... end Test;
class_definition : [ encapsulated ] [ partial ] ( class | model | record | block | connector | type | package | function ) IDENT class_specifier
When an element, equation or algorithm is instantiated, any name is looked up sequentially in each member of the ordered set of parents until a match is found or a parent is encapsulated. In the latter case the lookup stops except for the predefined types, functions and operators defined in this specification. For these cases the lookup continues in the global scope, where they are defined. [E.g., abs is searched upwards in the hierarchy as usual. If an encapsulated boundary is reached, abs is searched in the global scope instead. The operator abs cannot be redefined in the global scope, because an existing class cannot be redefined at the same level.]


Not one to fail to get the last word, I responded:
[snip]
Dear Pete:
No education system is perfect. If a society expects to enjoy
the fruits of a decentralized educational process that effectively
removes problems of bureaucracy, racism, sexism, religious bigotry,
and all forms of discrimination based on physical appearance or abilities,
it will also have to deal with the roots of poverty.
Because obviously you can't expect someone to telelearn
if he or she can't afford a computer and a modem,
or whatever particular technical form of access exists.
With all due respect to you and my alma mater, however, your question
borders on hypocrisy. It's a lot easier to take out a loan
to purchase a PC, a cable modem and Internet access than it is
to take out a four-year loan to matriculate at BTU, that's for sure!
I mean, what gives you the idea that access to education
was universal under the old system?
EFG


See https://github.com/WICG/async-cookies-api for an explanation of the proposed asynchronous cookies API.
Cookies: this website uses HTTP cookies - small files stored on your computer and automatically sent with subsequent HTTP requests - to demonstrate and exercise an asynchronous cookie API for scripts. Some cookies may persist even after your browsing session is ended and may continue to be sent in future browsing sessions. If you click or otherwise activate any buttons on this website you indicate your acceptance of and consent to all of this website's uses of cookies in your web browser now and in the future.
This should be more interesting with the developer tools JS console open.
At present this requires a browser built on Chromium release 53 or later with the
Experimental JavaScript flag active - type chrome://flags/#enable-javascript-harmony
into
the address bar to check the value of that flag and change it if desired. In Chromium release 55 or later
the needed language features are available by default.
The document-based
polyfill included by this page runs best in 🔒 an https
page -
the polyfill is also usable but some tests fail when run in ⚠ an unsecured http
page due
to its reliance on Secure
cookie access.


WebSite
Name
Toggle navigation
Home
(current)
Settings
Profile
Help
Fill the form below
Complete the below form to get instant access.
Choose service...
B2B
B2C
Send request


Portfolio
-
Joust
Video Game designed in CSSE220 was an exact replica of Joust
-
Processor
Processor built in CSSE232 replicated a mips-like design that ran Euclids algorithm
-
Robotics
Labview experience with robotics specifically in designing autonomous drive
-
Editor Trees
Experience with tree data structures in rotating, and sorting Java project


Using Templates¶
Templates can save precious time!
Set up a jail and create a template from it. All packages and preconfigured settings remain available for deployment to new jails within seconds.
Any jail can be converted between jail and template as needed. Essentially, a template is just another jail which has the property template set to yes. The difference is templates are not started by iocage.
Create a template with iocage:
- Create a jail:
# iocage create -r 11.0-RELEASE -n mytemplate
. - Configure the jail’s networking.
- Install packages and/or customize the jail as needed.
- Once finished with customization, stop the jail:
# iocage stop mytemplate
. - It is recommended to add notes to the jail, so the specific jail
customizations are easily remembered:
# iocage set notes="customized PHP,nginx jail" mytemplate
- Set the template property on:
# iocage set template=yes mytemplate
. - Find the new template with iocage list -t.
Use the created template:
Use iocage create -t to create a new jail from the new template:
# iocage create -t mytemplate -n jailfromtemplate
- Find the new jail with iocage list.
- Start the jail with
# iocage start jailfromtemplate
.
Done!
Customizing a template:
To make further customizations or just patch the template, there are two options:
- Convert the template back to a jail with iocage set template=no [UUID | NAME], then start the jail with iocage start [UUID | NAME].
- If network access is unnecessary to make the changes, use iocage chroot [UUID | NAME] [Command ...] to run the needed commands inside the template.


When you have nested functions, the most internal function
has access to the local variables of the most external function.
(And boy, this can get complicated)
* Exemple 1
* It seems complicated, but there's an advantage here:
You can use the closure of functions to store state,
without resorting to global variables.
* Exemple: Bank account
* Another example: logging errors
I think I'll have to come back here later, but OK, NEXT!


| Home | Libraries | People | FAQ | More |
| Test | Type | Description | If failing... |
|---|---|---|---|
run |
Test functionality of 测试 |
||
run |
Ensure that calling 确保用已经过期失效的插槽调用
|
||
run |
Test postconstruction/predestruction functionality of
测试 |
||
run |
Test deletion of slots. 测试插槽的删除。 |
||
run |
Test slot group ordering. 测试插槽组排序。 |
||
run |
Tests for various bugs that have occurred in the past, to make sure they are fixed and stay fixed. 测试过去发生的各种错误，以确保它们已被修复并保持修复。 |
||
run |
Basic test of signal/slot connections and invocation using the
使用
|
||
run |
Test automatic connection management of signals and slots. 测试信号和插槽的自动连接管理。 |


Which web server diagnostics logs can be enabled or disabled for a Web App?
DNS Resolution Error Logging
What is contained within the Detailed Error Log?
HTTP transaction information saved in the W3C extended log file format.
Information for HTTP status codes (400 or greater) that indicate a failure, plus additional information that may help determine what caused the server to return the error.
Trace of IIS components used to process requests with the time taken within each component.
What is contained within the Failed Request Tracing log?
Trace of IIS components used to process requests with the time taken within each component.
HTTP transaction information saved in the W3C extended log file format.
Information for HTTP status codes (400 or greater) that indicate a failure, plus additional information that may help determine what caused the server to return the error.
What is contained within the Web Server Logs?
Information for HTTP status codes (400 or greater) that indicate a failure, plus additional information that may help determine what caused the server to return the error.
Trace of IIS components used to process requests with the time taken within each component.
HTTP transaction information saved in the W3C extended log file format.
What is used to write to the Application diagnostics log from an ASP.NET application?
System.Diagnostics.EventLog
What is the physical location of the Log Files folder on the Web App server?
Which directory are the Application logs stored?
/LogFiles/W3SVC#########/
/LogFiles/DetailedErrors/
Which directory are the Failed Request Traces stored?
/LogFiles/W3SVC#########/
/LogFiles/DetailedErrors/
Which directory are the Detailed Error Logs stored?
/LogFiles/W3SVC#########/
/LogFiles/DetailedErrors/
Which directory are the Web Server Logs stored?
/LogFiles/W3SVC#########/
/LogFiles/DetailedErrors/
Which directory are the Deployment Logs stored?
/LogFiles/W3SVC#########/
/LogFiles/DetailedErrors/


Owning Palette: Map Classes, Controls, and VIs
Requires: Labstache
Retrieves a Mustache data value based on the key. Keys can only be strings.
| Map In represents a Mustache map value using a LabVIEW array of key-value pair clusters. | |
| Error In describes error conditions that occur before this node runs. This input provides standard error in functionality. Right-click the Error In indicator on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error. |
|
| Key is a string that uniquely identifies a Mustache data value in the collection of key-value pairs. | |
| Value is the Mustache data value associated with the Key. If a key-value pair matching the Key is not found, then this will be a Null object. | |
| Map Out is the same object from Map In. | |
| Found? is a boolean value indicating if a key-value pair matching the Key was found (TRUE) or not (FALSE). | |
| Error Out contains error information. This provides standard error out functionality. Right-click the Error Out indicator on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error. |


Movies
${len(recently_added['movie'])} New Movie${'s' if len(recently_added['movie']) != 1 else ''}
${movie['title']}
TV Shows
${len(recently_added['show'])} New TV Show${'s' if len(recently_added['show']) != 1 else ''} / <% total_episodes = sum(season['episode_count'] for show in recently_added['show'] for season in show['season']) %> ${total_episodes} New Episode${'s' if total != 1 else ''}
${show['title']}
% elif i == 7 and show['season_count'] > 8: <% remaining_seasons = show['season_count'] - 8 %> ...plus ${remaining_seasons} more season${'s' if remaining_seasons > 1 else ''}! % endif % endfor


| alo_star_men | Replication data for Lin 2013 |
| commarobust | Build lm_robust object from lm fit |
| declaration_to_condition_pr_mat | Builds condition probability matrices for Horvitz-Thompson estimation from 'randomizr' declaration |
| difference_in_means | Design-based difference-in-means estimator |
| estimatr | estimatr |
| estimatr_glancers | Glance at an estimatr object |
| estimatr_tidiers | Tidy an estimatr object |
| extract.iv_robust | Extract model data for 'texreg' package |
| extract.lm_robust | Extract model data for 'texreg' package |
| extract.robust_default | Extract model data for 'texreg' package |
| gen_pr_matrix_cluster | Generate condition probability matrix given clusters and probabilities |
| glance.difference_in_means | Glance at an estimatr object |
| glance.horvitz_thompson | Glance at an estimatr object |
| glance.iv_robust | Glance at an estimatr object |
| glance.lh_robust | Glance at an estimatr object |
| glance.lm_robust | Glance at an estimatr object |
| horvitz_thompson | Horvitz-Thompson estimator for two-armed trials |
| iv_robust | Two-Stage Least Squares Instrumental Variables Regression |
| lh_robust | Linear Hypothesis for Ordinary Least Squares with Robust Standard Errors |
| lm_lin | Linear regression with the Lin (2013) covariate adjustment |
| lm_robust | Ordinary Least Squares with Robust Standard Errors |
| lm_robust_fit | Internal method that creates linear fits |
| na.omit_detailed.data.frame | Extra logging on na.omit handler |
| permutations_to_condition_pr_mat | Builds condition probability matrices for Horvitz-Thompson estimation from permutation matrix |
| predict.lm_robust | Predict method for 'lm_robust' object |
| starprep | Prepare model fits for stargazer |
| tidy.difference_in_means | Tidy an estimatr object |
| tidy.horvitz_thompson | Tidy an estimatr object |
| tidy.iv_robust | Tidy an estimatr object |
| tidy.lh | Tidy an estimatr object |
| tidy.lh_robust | Tidy an estimatr object |
| tidy.lm_robust | Tidy an estimatr object |


PAGE UNDER CONSTRUCTION
Projects
- MagPhase Vocoder (Author)
- Matide – Python IDE for MATLAB Users (Author)
- Merlin: The Neural Network (NN) based Speech Synthesis System (Contributor)
- WavGenSR (Author)
Sound Synthesis
- Analog Synth
- Vowel (Formant) Synth
Audio Analysis
- Emotions in Music
- Automatic Music Transcription
Speech Processing
- New feature extraction for speaker verification
- Speech recognition
- Denoiser (Spectral Substraction)
- My old speech processing page
Audio Effects
- Real Time
- Reverberation
- Stereo Delay
- Digital Room Correction
- Off Line
- Time Stretching (Phase Vocoder)
- Pitch Shifting (Phase Vocoder)
Digital Signal Processing
- Automatic Bubble Size Classification by Using Ultrasound
- Scaling and Product Quantization Sensitivity of Digital Filters
- IFIR Filters
iOS Programming
- Acoustic Enclosure Calc (my first iOS app)
- Lab Game
- Space Invaders Drum Machine
- ‘Infinite’ Bands Parametric Equalizer
Computer Vision
Adaptive Filtering


In case of "Error: invalid_client"/"Invalid application ID." errors from Google/Facebook please check the configuration on the Web Console and read the Quick start guide and the detailed documentation of the Configuration possibilities.


Images derived from a 'parent' file can be used to extract a section from that parent for display. This is useful for large files where the network transfer time becomes prohibitive, or large image dimensions where the browser memory requirements become a problem. In either case, you first display a blocked "represenation" image and then use it to extract smaller image sections.
You can manually specify the center (in physical coordinates from the 'parent' file) and image size (again, relative to the 'parent'). You also can use a Regions box cursor to specify position and size, or use a combination of the two.
For binary tables, you can extract a new table (native format) or convert the extracted rows into an image. The former allows you to operate on the new file as a table, e.g., bin and filter the new table using the Binning plugin. However, the new table might not be much smaller than the 'parent' table if the selected section includes most of the rows (e.g. extracting a bright source).


This accessor allows you to use Angular forms with contenteditable elements with ease. It has zero dependencies, other than Angular itself as peer and works with Angular 4+ in all modern browsers, including Internet Explorer 11.
Simply import ContenteditableValueAccessorModule
along with either
Angular's form modules and use like that:

<form [formGroup]="group">

</form>
Tip: You can apply disabled styles by [contenteditable="false"]
CSS
selector
Tip: updateOn FormHooks also work, this example is set to 'blur'
Tip: disabling parent FormGroup/FormArray also works


A Brief Commentary on Comments
Posted January 10, 2019
Code isn't art. It's a living, breathing roadmap, and good developers provide directions.
Good developers never have
"no comment"
If you're not a developer, it's hard to convey how important comments are. See the code in orange in the image up top? Those are comments. The end user never sees them and they don't affect functionality. But they provide invaluable information to other team members or developers who come along later to make revisions, such as what a block of code does, what vital connection it provides, what functionality resides in the next few lines, etc. Comments are so important that while every language denotes them in a different way, they all have a method for adding them to your HTML, CSS, JavaScript, etc.
Comments are to code what road signs are to driving. Even that's not completely accurate, because a road sign doesn't tell you why you should go 35, only that you should. Good comments explain the code ahead, justify its presence, and if you're lucky, help you make sense of potential errors you might encounter if you try to modify or update the existing code. And did I mention they save time?
My full-stack instructor, TAs, tutor and random people walking down the hall between classes hammered it home: good comments are as important as good code. For the past two days, I've disentangled code written by someone who never got that message. So when I saw the cheeky tweet tonight pictured here that begins, "When someone asks me why my code isn't documented ..." I didn't laugh.
No phone, no lights, no motor car ...
Comment-free code was the least of the problems I inherited on the page I had to update. It was created with Sitecore, a content management system, but because the original developer built the page with custom HTML, CSS and JavaScript, I had to understand every piece of code in order to move it around and still have the video modals (a.k.a. popups) work correctly.
I quickly realized much of code on the page wasn't actually being used. On-page styles were split up in different places. One of the many scripts on the page was commented out <!-- like this --> rendering the script inoperable. Even then, the developer should've explained why he left the script on the page.
Repeat after me: Comments aren't a luxury
Commenting out an unused script without context is like leaving a deflated basketball in the middle of the court. It had a purpose at one time; it might still be useful if you had a pump. But right now it's just taking up space, and you're gonna have to move it if you don't want to trip on it once the game starts.
The good news is despite the previous developer's bad practices, I figured out which code to save and which to toss. The modals work, the code is cleaner for the next dev who comes along, and I had a topic to blog about. But back to that tweet ... code isn't art. And developers who can't be bothered to comment their work aren't artists, they're lazy. As far as I'm concerned, they should be banished to build radios out of coconuts on Gilligan's Island to atone for their sins. Try that without directions, mate! Cause that's what it's like to trying to navigate your sloppy code. :)