Exact description of parent inheritance - maven

Both the official documentation and Nexus Book have only a superficial description.
There are some details on merging plugin configuration, but that's all.
I just noticed a weird behavior: namely adding a <resources>/<resource> element seems to override parent declarations rather than doing an append or merge.
Can I find a more detailed description of the merge algorithm somewhere on the Web, or is reading the source code the only way to find out?
If it's just code can somebody point where to look, or should I just check what effective-pom mojo calls?

Related

Cypress screenshot comparison with image-snapshot vs plugin-snapshot dependency

To compare screenshots, we can use either cypress-image-snapshot or cypress-plugin-snapshot.
Are there any differences between these plugins in terms of comparing images please ?. I searched , couldn't find exact reasons.
If you take a quick look at the npm dependencies of both you can see what image processing dependency they use, and as far as I can tell it's jest-image-snapshot for cypress-image-snapshot and pixelmatch for cypress-plugin-snapshots. You can then decide which one looks better by number of dependents/downloads/versions if you lack better technical knowledge like I do.
On another hand, I decided for cypress-visual-regression in the end as cypress-image-snapshot shows some "resolve dependency tree" errors with latest cypress versions, and cypress-plugin-snapshots still has some "Caveats" listed in their description, plus they're not often updated.

Where do I find API docs for Angular CDK Collections SelectionModel?

I expected to find something about SelectionModel in the Angular CDK docs, but keep coming up short.
There are many API pages; for example, Angular Components docs for MatTable. Yes, the code for SelectionModel is on GitHub, but I would like to:
read the an overview" like the many such pages on **angular.io* while also
learning from examples like those on angular.io or from third-parties, and
reading the code.
What I seem to be missing is #1, but only for certain classes.
Some other non-component classes are documented at angular.io. MatTableDataSource can be found in right-hand column of the MatTable API documentation. Okay, that's not exactly obvious, but it is a useful location. I might have expected to find collections somewhere like CDK Collections page, but alas it is not there.
Is angular.io the official location for such stuff?
Have I missed a way to find API documentation for SelectionModel
class and maybe other classes in cdk\collection or am I really just reporting a website bug?
I THINK that this is another case of Google's lacklustre attitude towards documentation. Time and time again I come across situations where their docs are either incorrect, out-of-date or missing entirely. This is not specific to Angular, but to any of their products.
Yes, to the largest part the Angular docs are fantastic. The Material docs, however, often have holes like this and are inconsistent at times.
I don't think you're missing anything, Paul.
I know this is a year "late". I had the same question now and stumbled upon this unanswered reflection of my frustrations :-)
Here is document page
https://github.com/angular/components/blob/master/src/cdk/collections/collections.md
The collections package provides a set of utilities for managing collections.
SelectionModel
SelectionModel is a utility for powering selection of one or more options from a list. This model is used in components such as the selection list, table selections and chip lists.

How to simply get custom content into Maven-generated index.html?

In a Maven project with subprojects, each subproject gets an index.html with some content that comes from its POM's description element.
In one of these subprojects, I need that content to contain additional information, including links. There is a section of the doc that suggests I should not do it by trying to put HTML markup in CDATA in the description element (in fact, that doesn't work anyway; the HTML markup just comes out literal). Instead, it suggests there is some better way to get my own content included in the file.
While this element can be specified as CDATA to enable the use of HTML tags
within the description, it is discouraged to allow plain text representation.
If you need to modify the index page of the generated web site, you are able
to specify your own instead of adjusting this text.
Can anyone describe how to do that? I have tried several methods unsuccessfully (I can supply Markdown files with other names and they generate HTML, but a subproject's index.md has no effect on the generated index.html). I have also read about the custom element in site.xml but it seems to require writing a custom Velocity template for the site; I hope the passage "you are able to specify your own" must mean there is some method more straightforward than that.
Of course I would also appreciate a pointer into the docs if there is already an answer I have simply failed to find. (Just pointing me to docs I've already read isn't in itself helpful, though pointing out the answer I missed would be helpful, if it's there.)
In response to inquiries
Directory structure under src/site:
src/site
src/site/resources
src/site/resources/images
src/site/markdown
src/site/markdown/use
src/site/markdown/install
src/site/markdown/examples
src/site/markdown/build
maven-site-plugin version: 3.4
What I mean by 'adding a link':
The part of the index.html that comes from the POM description element
is the central content of the page (not the navigation bar, not the sidebar menus, but the actual content).
I would like that actual-content portion of the page to be able to have a paragraph or two explaining that this is a generated page for developers, and providing links (HTML <a href=...>) for people who arrived at the page from a web search but are really looking for the user-oriented pages.
I can't put that in the description element (even using CDATA), because HTML elements just come out literal. A comment below gives a link to a page on writing a whole custom Velocity template for the site, but is there honestly no simpler way to accomplish this?
I have the same issue. The only thing the generated index.html gives you of value is the list of modules. You can add your own index.md page to src/site/markdown, putting in whatever content you want. To reproduce the list of modules, include something like this:
###Project Modules
This project has declared the following modules:
| Name | Description |
|-|-|
|[Module1 name](module1/index.html)| Module 1 description|
|-|-|
|[Module2 name](module2/index.html)| Module 2 description|
Of course the text is not lifted from the POM. You also have to manually change this file if you have a new module. Not a perfect solution, but the best I could come up with.
Where I wrote:
I can supply Markdown files with other names and they generate HTML,
but a subproject's index.md has no effect on the generated index.html
it turns out the truth is more complex. In a project with subprojects,
there are two places such an index.md might go: in src/site/markdown/subproject-name of the parent project (where all of the other human-written docs for the whole project happen to be), or in a new src/site/markdown directory created within the subproject. A file with any other non-special name can be added in either place, and end up where you expect it in the target. But not for index.md, in that case only the second location can work, and even then, only after a clean.
I had tried both places without success, but trying the second again with a full clean install site site:stage makes it work. Out of the four combinations (parent/clean, parent/noclean, sub/clean, sub/noclean), that was the one I missed trying before posting the question, so of course that's the one that works. :)
If there had been an answer or comment like "hmm, are you sure an index.md in the subproject doesn't work, it works for me?" it probably would have put me quickly back on track. Sometimes after trying several avenues all without success, all that's needed is to know which of them is the one that's supposed to work (if indeed one of them is) and therefore worth spending more time on.

VS2010 syntax coloring: how to obtain the previous classification type

I'm trying to play with the new syntax coloring capabilities of VS2010 based on Noah Richards' diff coloring sample. The goal is to create syntax coloring for SpecFlow (http://www.specflow.org).
In my case, finding the syntax elements are fairly complex and not line-level. Therefore, when I implement the GetClassificationSpans I don't want to re-parse the entire file, but rather take the state of the beginning of the changed text and parsing the content from that point on.
I thought that I can get the previous classifications as ClassificationTags. I did this using the IBufferTagAggregatorFactoryService class.
It works, but I'm not sure whether this is the best way to go. Shall I create only tag aggregator for the entire classifier class or I can create it every time when GetClassificationSpans is called? Shall I create a special tag to remember the parsing state?
Maybe this is anyway not the right way to go, I'm also interested in other suggestions.
Br,
Gaspar
Edit: I've found a good article series in the topic: http://www.hill30.com/MikeFeingoldBlog/index.php/2009/07/31/django-editor-in-vs-2010-part-1-colors/
Essentially, you'll have to remember the state yourself. Most VS language services keep a state cookie for the beginning of each line that they update on text change.
At any point, getting classifications (through either a classifier aggregator or tag aggregator) will always result into a call into the current classifiers/taggers, so it won't be returning any type of cached state (or the "last" classifications returned). The editor doesn't really cache this information, and just acts as a dumb pass-through for the information your classifier provides to the visible lines being formatted.
Also, If you do it from a classifier (provided by either an IClassifierProvider or ITaggerProvider), you are setting yourself up for some nasty recursion, especially if your classifier responds to GetClassificationSpans by calling into the aggregator (which then calls back into your classifier for some earlier text, etc.). If your classifier needs to consume other classifications to work correctly (and not its own classifications), the only safe way to write that is to:
Implement your "classifier" as an ITagger<IClassificationTag>, and provide it from an IViewTaggerProvider.
Grab an ITagAggregator<IClassificationTag> from an IBufferTagAggregatorFactoryService, but only once.
Implement IDisposable on your tagger and dispose the tag aggregator in Dispose().

Reddit's commenting system (hierarchial)

For those of you who have looked at Reddit's source code, where exactly is the logic where it manages the comments hierarchial structure?
I downloaded the code, but couldn't even find the database structure let alone where the reads and writes are for the commenting.
Is it doing updates on lots of comments if someone replies to someone mid-way through a thread?
The class definition for the Comment model is in r2/models/link.py .

Resources