I'm looking for a way, if this is possible, to use a custom reference from another MD file. The most similar question I could find, but not exactly what I'm looking to do, was here: Markdown: Reference to section from another file
Say I have to files; content.md & references.md, and references.md contains the following:
[Click Me][custom-reference]
[custom-reference]: https://stackoverflow.com
Which results in this:
Click Me
If I want to use [custom-reference] in content.md is it possible?
Related
There is an option to navigate to symbol in file, but if a file contains many classes it is not very helpful.
Is there an option to navigate within the current class?
In VS we have combo boxes at the top of the file that let us choose the class and the symbol within the class.
In Rider it is possible to open the file structure and look for the symbol there, but it is less convenient.
Am I missing anything?
Instead of the file-specific Go to File Member that you mentioned, try using the more generic Search Everywhere that looks for symbols globally. From there, you can filter to only include members in a certain class: for example, if you're looking for myMember in ClassFoo, enter something like cf mm (or the full ClassFoo myMember if you're not a fan of lowerCamelHumps).
I would expect Go to File Member to also support this kind of filters but it looks like it doesn't.
I'm making a personal website with Hakyll, and I'd like to list my publications.
I've found this module and this guide for how to print the references from a markdown document at the bottom.
The problem with this is, it assumes you've got some document, where you cite all the things you want printed.
What I want is to generate a document that lists every document my .bib file. In particular:
I don't want to have to manually write the bibtex name of each publication I want listed
I just want the "references" section printed, i.e. there's no place in the document where the publication is referenced, they're just listed at the end.
Is it possible to get this information from the Hakyll.Web.Pandoc.Biblio module? Or do I need to separately parse the .bib file to get this? And once I do, how would I make go about generating this page with Hakyll?
You could use this trick from the pandoc's manual, the equivalent of biblatex's \nocite{*}:
It is possible to create a bibliography with all the citations,
whether or not they appear in the document, by using a wildcard:
---
nocite: |
#*
---
Hey so my question might be basic but I am a little lost on how to implement it.
If I was reading a file, for example an HTML File. How do I grab a specific parts of the file. For example what I want to do is
blahblahblahblah<br>blahblahblah
how do I find the tag that starts off with < and ends with > and grab the string inside which is br in Python?
This is a very broad question there are a couple of ways you could retrieve a single string from a html file.
First option would be to parse the file with a library like BeautifulSoup, this option is also valid for xml files too.
Second option would be, if the file is relatively small you could use regex to locate a string you want and return it.
First option is what I would recommend, if you use a library like BeautifulSoup you have a lot of functionality, eg. to find the parent element of a selected tag and so on.
I wanted to rename one of my files, mypage.php into myprofile.php, but PHPStorm does not find any file references.
In the code, mypage.php is referenced without the file extension. For example:
<a href='../user/mypage/'>
So it has to look for mypage, not mypage.php and rename it myprofile, without file extension.
How can I tell the program to do this?
IDE cannot do that because (as you have mentioned yourself) the file name does not match actual URL reference.
Your only option here is to use ordinary Find & Replace functionality, e.g. Replace in Path to find all occurrences of /user/mypage/ and replace them into /user/myprofile/ in all files in a project (note; you can limit the scope for this action to a specific folder or custom scope -- check docs)
After installing my files using WIX 3.5 I would like to changes some values in one of my xml files.
Currently there are multiple entries like this:
<endpoint address="net.tcp://localhost/XYZ" .../>
I would like to change the localhost to the real servername wich is available due to a property. How can I perform this replacement on each entry inside this xml file? Is there a way to do this without writing an own CA?
Thanks in advance!
XmlConfig and/or XmlFile elements are your friends here.
UPDATE: Well, according to the comments below, it turns out that only part of the attribute (or element) value should be changed. This seems not to be supported by either of two referenced elements.
I would take one of the two approaches then:
Use third-party "read XML" actions, like this one
It's better than creating your own because you can rely on deeper testing in this case
Teach your build script to control the string pattern
Let's say you put `net.tcp://localhost/XYZ` to build file and your code is pointed out to take this value as a string pattern to use at install time. For instance, keep the string pattern as a Property in your MSI package. When it changes, e.g. to `net.tcp://localhost/ABC` you'll have to change nothing in your action. In this case from a XMLFile perspective you always know your FROM and TO attribute values.
If your XML configuration file is not large, you can load the file into memory and perform replace using JScript.
var s = "<endpoint address=\"net.tcp://localhost/XYZ\" .../>";
var re = /"net.tcp:\/\/localhost\//g;
var r = s.replace(re, "\"http://newhost.com/");
Here s is your complete XML file, re is the regular expression, and r would contain the result or replace.
You can read and write to public properties of Windows Installer using JScript. Yet there's still one problem: you have to read your XML file and to write it back to disk. To do it, you can use Win32_ReadFile and Win32_WriteFile custom actions from the AppSecInc. MSI Extensions library referenced by Yan in his answer.
However, it could be easier to write a complete Custom Action which will load your XML configuration file, do the replace, and write the file back to disk. To do it you can use XSLT and JScript (see an example code).
InstallShield has a built-in data driven custom action called Text Search. It basically allows for RegEx style replacements like what you are describing.
WiX doesn't have this functionality but you could write a custom action ( say using C#/DTF ) to do it for you.
There nothing in Wix, you can do to change something in a file without using a custom action. If you don't want to use CA, you can consider saving the settings in some other place e.g. User's registry and always read that setting from there