Powershell v7 Text Background highlighting - json

So I set up my new laptop with both powershell 5.1 to powershell 7 and I just have this weird problem with powershell 7 where it highlights the background of the text which I just don't like.
I do not face this problem with powershell 5.1.
I tried to change that background in the color scheme in "settings.json" to an alpha channel for transparency but powershell doesn't accept rgba values so it errors out.
Here's an example image of the problem I'm facing
PowerShell 7:
PowerShell 5.1:
Please help me resolve this issue :)

PowerShell 7.2 introduced the automatic variable $PSStyle for a new feature called PSAnsiRendering. You can use ANSI rendering to control text decorations, such as colour and font styling, in PowerShell. See Get-Help about_ANSI_Terminals for more information.
This includes File Info formatting when using Get-Childitem, you can alter the formatting with $PSStyle.FileInfo.Directory for example
$PSStyle.FileInfo.Directory = "`e[4;1m"
Or disable with
$PSStyle.OutputRendering = "Plaintext"
If you'd like to keep this consistent for each session then you'll need to add it to your PowerShell profile script.

Related

start browser at an anchor possibly using a tag

I am developing an interactive software for thermodynamic calculations using an html help file with "anchor/target" features to select the appropriate part of the help file when the user types a ? as answer to a question.
This works well but at present a new browser window is opened each time the user types a "?". I would prefer to start a new tag if there already is a browser window opened.
At present my program activate the help by creating a character with the content: browser "file:helpfile#target"
and then call the Fortran subroutine execute_system_command(character).
"browser" can be firefox or whatever is the preferred browser by the user (on Mac including path);
"helpfile" contains the path and name of the my html help file;
"target" is a text which depend on the question asked by the software to localize the appropriate help text.
How can I modify this so I open a new tag in the browser (if it is already opened) rather than starting a new browser window?
Maybe something like "target=_blank" can be added?
My program is written in the new Fortran standard so I have no facilities that might be available in Java or Python. It must work using different browsers on different OS.
As #Vladimir pointed out I ment a "tab", there are so many terms. But the answers I had made me reconsider which browser I could use. And I made some new discoveries.
On Windows I used the old Explorer because the path to Firefox contains a space and when I tried to start Firefox to open a file
I had to enclose "C:\Program ...\firefox" within double quotes. That works to start the browser but if I want the browser to open a file I must enclose that also within double quote and that did not work. I am not sure if the problem was the Fortran intrinsic EXECUTE_COMMAND_LINE(txt) or deeper down. But the old Explorer I could start without "" and just enclose "file:/help.html" with "".
So now I tried to be smart wrote a test program enclosing just the directories with a space within using "" i.e.
C:"Program Files\Mozilla Firefox"\firefox.exe "file:/help.html"
in the call to EXEXUTE...
and that worked and opened the helpfile in a tab as is my default.
Problem solved? No, when I had exchanged the browser with path in the program and tested it did not find the browser. The reason was that I have a test that the browser exist using another Fortran intrinsic INQUIRE and as I understand doublequotes are not legal inside file names so INQUIRE did not find firefox when there are " inside the path. Only if " are used around the whole file name it worked. So back to square one? No, I simply removed the " in the path+browser before calling INQUIRE, then used the path with "" inside when calling EXECTUE ...
and now it everything works as I wanted!

Doxygen project brief not including spaces

I am developing a project and using Doxygen for the documentation. In the config file, I have put PROJECT_BRIEF = dynamic and effective, but for some weird reason on the HTML, it is appearing as dynamicandeffictive without spaces in between. Is there some sort of configuration which stops this from happening?
As there are spaces in the PROJECT_BRIEF, the sentence should be in quotes like:
PROJECT_BRIEF = "dynamic and effective"
(Pity that you didn't tell us which version of doxygen you are using, so I tried it with the current version 1.8.18, but most likely it will have the same effect on older versions).

Check for visual presence of character on page?

I'm in an odd situation where I need to check, via a test, that a currency symbol is being properly displayed on our web page.
We've been running into issues where sometimes the unicode alphanumeric value is showing up on the page instead of the actual currency symbol itself.
Is there a way to check for something like this? Like with some type of visual checking library, or through javascript?
The answer to this issue was to specifically copy and paste the unicode character I was looking to test against into my text editor.
So using the Protractor framework, I would find my css element, and if I have a known price of 17.99 that should be returning, my test function would return:
return expect(myPriceElement.getText()).to.eventually.equal(£17.99);
If on my webpage, £17.99 shows up, then my test will pass

HTML Syntax Highlighting within Freemarker .FTL Spring STS

After a clean install of Spring Tool Suite and the necessary plugins my current project requires (of which Freemarker is one) I find that HTML seems to be ignored within all of my .FTLs and is just displayed as black text (see image of settings). Prior to this, any HTML tags, comments and strings were picked up and highlighted in the default colours given.
To clarify, now it's only the Freemarker specific syntax that is now detected.(Directives - Blue and Freemarker variables - Pink)
If anyone knows how to fix this issue I would be greatly appreciative!
Freemarker Preferences Image
That's https://issues.jboss.org/browse/JBIDE-22631. If you are using file .html.ftl or .xml.ftl (or ftlh or ftlx when JBIDE-22636 will be merged) file extension, it starts doing some highlighting, though it doesn't colorize the attributes differently anymore.

Custom HTML Module - does not support joomla 3.0

I am using advanced version of joomla, but facing problems when I am using custom html module or using HTML for articles too. The all attributes in HTML are replased by the / and "
Here's what is happening:
0. To start with, all the images were displaying as per the install just fine.
Copied the default module "Image Module", with a new name of "Image Module Me"
Set the menus so that the original module displays in the default menu, and the new one in my test menu
Somewhere along the line the images stoped displaying properly (showing a broken image link) for both the default Image Module and my copy.
When I look at the image module, I can see that the html has been changed.
Reset the html by reinserting the image, which generates the following html:
img src="images/headers/walden-pond.jpg"
note that the image appears just fine in the admin editor at this point
Save the module
Click on custom output - an lo and behold I've got a broken image link. When I check out the html I can see the following:
img src="\"images/headers/walden-pond.jpg\""
EDIT1 :
This is just because of Magic_quotes. How to disable magic quotes in joomla 3.0?
To disable magic quotes you have to edit the php.ini file in your server. In all honesty I'm surprised you could even install Joomla 3.0 as its a requirement for Joomla 3.0 that magic quotes is disabled. If you can edit the php.ini file you must add in:
; Magic quotes
;
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
You may need to contact your host to do this. In a last resort (and only in a last resort) edit your .htaccess file something along the lines of:
php_flag magic_quotes_gpc Off
etc.