Link to Source Code from TypeDoc Documentation - typedoc

I've documented a function and I can see that the generator has captured the line number:
Is it possible to configure TypeDoc so that a user can click through to see the actual source code? The full repository is here.

There is a TypeDoc plugin that might address your problem:
https://github.com/gdelmas/typedoc-plugin-sourcefile-url
It doesn't work for my situation because for some reason the URLs to the GitHub source I'm connecting to must contain blob/master, which this plugin doesn't add. But I add it here in case it's useful to you.

Related

Using prototype citation grouping feature of MediaWiki Extension:Cite

I use MediaWiki 1.35.1.
MediaWiki Cite extension has a prototype reference collecting feature. I'd like to use it in my wiki. According to the note below, this one is only available in the Beta-Cluster and indeed, I can use it on its sample pages. The Beta-Cluster Special:Version points to 69a5435 revision of the extension being used. However, if I download this snapshot and place it in my extension folder, this feature still doesn't work and extends attribute is still not recognized. The error I've got is
Cite error: Invalid <ref> tag; invalid names, e.g. too many
How can I enable this feature in my own wiki?
As it turned out, I need to set in LocalSettings.php following option:
$wgCiteBookReferencing = true;
I missed this because this is not mentioned anywhere in Help:Cite page. I've found it later in Extension:Cite page.

Live templates in PhpStorm not useful

I installed "Live Templates for Angular" plugin in PhpStorm. I think something is wrong with suggestion (triggered with Ctrl + Space). I have to write whole snippet a-component to get to right suggestion.
Can I improve it somehow in settings?
Here is a gif:
It's because the template name (abbreviation) has a dash - in it ... and when completing IDE treats a and component as separate parts until whole match is found (in case you were doing some subtraction operation with two variables). At very least that's my understanding of this behaviour based on my own usage experience.
You may just change the abbreviation and remove - from there and it will be much better recognized as valid completion item. But that may not be ideal in long run (potentially may have issues when plugin will be updated with new templates etc.)
To bypass it ... just use Live Template specific completion where only Live Templates will be listed. For that invoke shortcut assigned to Code | Insert Live Template... action (Ctrl + J on Windows using Default keymap) at any time when you're typing your Live Template abbreviation.
Please make sure the applicable context yet.
Apply to the specified type of file, or check everywhere.
Like below:

Is there an example of how to do a XAdES-BES enveloped signature with the XAdES4j library?

I'm trying to use the XAdES4j library to sign xml with an enveloped signature. From everything I've read it looks like it is possible to do exactly what I'd like to do, but I've not been able to find a simple example to help me to understand the workflow better. The library is found here:
https://github.com/luisgoncalves/xades4j
It includes a wiki, but the wiki does not give a clear example. It refers you to the unit tests in the code. However, in the code for the unit tests, there are numerous methods that do not exist in the main code stream. I'm looking for a simple example for a XAdES-BES enveloping signature to be added to xml given these variables:
The path to my xml file: /path/to/xml/myXmlFile.xml
The root element in my xml file: invoice
The path to my cert: /path/to/cert/myCert.p12
Password to my cert: "myPassword"
Can anybody help me out with a clear example?
Thanks so much in advance :)
Here's a full example provided by another user within an issue in GitHub. It illustrates both XAdES-BES and XAdES-T.
On the project's wiki you have detail instructions on which classes need to be used and pointers to more detailed information.
Regarding the unit tests, there are some common/helper methods on the base classes that can be useful in other scenarios, namely on SignatureServicesTestBase and SignerTestBase
Hope this helps.

Fixing deprecated files

I'm trying to eliminate the console warnings (of deprecation) from the iron-flex-layout element.
When I load my app, I get the following errors in the console:
iron-shadow-flex-layout.html:12 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-shadow-flex-layout.html:12
iron-flex-layout.html:14 This file is deprecated. Please use iron-flex-layout/iron-flex-layout-classes.html, and one of the specific dom-modules instead
(anonymous)
iron-flex-layout.html:14
iron-fit-behavior.html:221 /deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
When I inspect the file paths, I see the following:
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
http://localhost:8080/bower_components/iron-flex-layout/classes/iron-flex-layout.html
http://localhost:8080/bower_components/iron-fit-behavior/iron-fit-behavior.html
I am reluctant to go tinkering around and manually deleting files in my bower_components directory.
So, how can I fix these errors? What is the recommended best practice?
Edit
Here is the deprecated file on Github. Line 14 writes the console warning. But this deprecated file is not being imported anywhere in the app. (I know because I did a global search on the string iron-flex-layout/classes and, separately, on iron-shadow-flex-layout.html). Instead, I have done as the warning suggests; I imported iron-flex-layout/iron-flex-layout-classes.html everywhere instead. But the warning persists nevertheless.
I assume the element owners and Google overlords want to retain the console warnings in place (and not accept a PR which removes it). So, what is the best practice? Live with the warnings? (It doesn't seem quite right to edit my local copy and just comment out the warnings.) Or should I do something else? (Maybe there is another option I'm not aware of.)
Edit2
per #tony19:
I recommend setting a breakpoint in the deprecated file (on the console.log() line) to see who's importing it. – tony19
So now, I'm using this:
https://github.com/PolymerElements/iron-flex-layout/blob/master/classes/iron-flex-layout.html
<script>
console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
debugger;
</script>
I'm seeing some information appear when the app reaches the breakpoint. But nothing so far indicates what's causing the import of the iron-flex-layout element. Or what to do to fix it.
Is there a command or something that can log what file imported another file? I've looked all over for how I might accomplish that. Could anyone please describe in detail what that might look like?
The warning indicates that an HTML file in your source or dependencies is importing ../iron-flex-layout/classes/iron-flex-layout.html, which is deprecated. The import must be in your tree somewhere, or else the warning wouldn't appear. I recommend setting a breakpoint on the console.log() line of the deprecated file to track down the offender.
If you're in control of the offending element that imports this deprecated file, you can update the import to use iron-flex-layout-classes.html that the warning recommends. Otherwise, you can petition the maintainer of the offending element to update their dependencies (or submit a PR ;).
I had this same issue today and thought the same thing. However, diving a bit deeper I found a few third party components were using paper-styles/paper-styles which called in iron-flex-layout/classes/iron-flex-layout.html. The reference it'd be there somewhere I'm certain. Hope that helps.

HTML in Jenkins job descriptions

I have two Jenkins instances running. An old (legacy) one at version 1.614 and a new one with 1.633.
In the old one it is possible to use HTML in the job description (it even does syntax highlighting editing it). The new one doesn't. HTML content is escaped and shown as plain text. I could not find a change in the release notes explaining this behavior. Is there a configuration that I'm missing?
In the Global security menu:
Select this value to display HTML:
For enabling it via config: you have to install the configuration as code (CASC) plugin (https://plugins.jenkins.io/configuration-as-code/) , and add the following entries to your config file(s - I guess, it is better to have multiple files for a better overview):
markupFormatter:
rawHtml:
disableSyntaxHighLighting: false
If you don't need highlighting, change it to true