How can I fix these Linter Issues in Atom? - html

I'm currently learning WebDev with an Instructor from Udemy and I noticed that the behavior of my Atom is not the same as here (Even though I installed the same packages as she did).
The following pictures are from the instructor's screen
When I create an error like the picture below, I get a linter suggestion at the bottom, however, I do not get the pop-up annotation like the picture: Picture1
I also do not receive an alphabetical order suggestion like the picture below in CSS either:
Picture2
I don't receive any errors on HTML pages or see a red dot on the left like this:
Picture3
Instructor's Packages (besides the default ones) : Atom Packages
How can I fix my atom linter?
PS: I did write in the Q&A section of the course but no reply, I'm on Windows 10 if it makes a difference (the instructor is using a mac).
Thanks in advance for the help.

In the first one you should use
h1 { color: red; }
instead of:
h1 { color red; }
With number two I am not quite sure what is meant there and that's why I don't want to say anything wrong.
In number 3, 2 same Id's were used. If you want to use more than one then you should use class instead of id. In CSS you address id's with # and classes with ..

Turns out it was all because Node.JS was not installed.
Once I installed it and ran it, everything started to work.

Related

how to remove items from DOM and XPath in my browser?

I hope somebody can help. I'm trying to remove items from ebay listings with the Firefox addon RIP (remove it permanently) which uses XPath and removes selected paths. As a side note: the addon is quite old and so it only works with old versions of Firefox. But I think the addon itself is not really relevant for the solution since I guess it's an XPath problem that needs to be solved.
So for example, if I want to remove every item on this ebay listing:
ebay listing
that contains the keyword "Agfa" I try this (after checking the source code of the webpage):
//li[#class='s-item s-item__pl-on-bottom']/img[contains(#alt,'Agfa')]
I have also tried different approaches but to no avail. The items would not get removed. Note that the ebay listings are updated all the time, so you will need to try with other keywords that are currently in the listing.
does anybody have a clue how to do it?
What I sucessfully done to remove Agfa item in dev tools of your browser:
$x('//li[#data-viewport][contains(., "AGFA")]')[0].remove()
For multiples items:
$x('//li[#data-viewport][contains(., "AGFA")]').filter(elt => elt.remove())
If you just need the XPath to feed RIP :
'//li[#data-viewport][contains(., "AGFA")]'

Obsidian formats code in a wierd way when in Read-Mode

I am fairly new to Obsidian and have run into an issue that I can't resolve:
When in Edit-Mode the code I put into my note gets looks normal and how I formatted it to look like, but as soon as I switch into Read-Mode, the formatting is all over the place.
(See picture below: left is edit-mode and right is read-mode)
This only happens in this instance (so far), all my other code blocks get displayed fine. It is react code marked with JFX.
I have tried importing the code again and reformatting it by hand but get the same result.
Also I have searched for code-format plugins.
I have found the answer:
It was the Theme I had selected (Everforest) that messed the code-formatting up.

SSRS - Accessing System.Drawing.Image.FromStream

I am currently trying to center an image on screen in SSRS. While this functionality is not directly support it is possible to provide custom padding based on the image size. This is an external image provided by a database, so the image changes repeatedly and I cannot hard code a padding. I am trying to retrieve the width of the image using:
=System.Drawing.Image.FromStream(new System.IO.MemoryStream(CType(System.Convert.FromBase64String(Fields!HomeLogoImage.Value), Byte()))).Width
However when this is entered into an expression place holder, "FromStream" is not recognised.
I can confirm that I have added the reference to the system.drawing assembly and I am using version 4.0.0.0.
I am returning to SSRS for the first time in quite a while so any advice on this would be greatfully received. Or even if there is a way to center images without resorting to the System.Drawing method, I would love to hear.
Many thanks.
Try the following. I've tested this against some .png database images I had lying around and it seemed to work.
=System.Drawing.Image.FromStream
(new System.IO.MemoryStream(CType(Fields!Image.Value,Byte())))
.Width
EDIT after OP update
To do the same with an external image you can use the following
=System.Drawing.Image.FromStream
(new System.IO.FileStream(Fields!HomeLogoImage.Value, IO.FileMode.Open))
.Width
This assumes that the HomeLogoImage field contains a valid path and filename to the image.
However You will probably encounter a permissions error. I have not done this myself so I can only point you to a link that discusses the issue with possible solutions. I've not done anything other than a quick search to find this so better solutions may be available
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/31490332-c2f7-48a4-9928-29916ce002b4/request-for-the-permission-of-type-systemsecuritypermissionssecuritypermission-mscorlib?forum=sqlreportingservices

DPL DynamicPageList MediaWiki Errors - Showing HTML Instead of Links

Just did a fresh install of MediaWiki and DynamicPageList (DPL) but something is not quite configured right and I am having a hard time figuring out what is off exactly.
Instead of showing links to the pages, it is showing some oddly formatted HTML code like this:
<html>Bird Dog Daily Checklist</html>
If I view source, it actually looks like this:
<li><html><a href="/tjos/index.php/Bird_Dog_Daily_Checklist" title="Bird Dog Daily Checklist">Bird Dog Daily Checklist</a></html></li>
Any ideas on why it is doing that and how to fix it so that it works right?
James, I find a way to fix this. that's because some html tags are forbidden by wiki. we can add "$wgRawHtml=true" into LocalSettings.php.
for more information,please see:
http://www.mediawiki.org/wiki/Manual:$wgRawHtml
This seems to be caused by a change in MediaWiki 1.16. See http://semeb.com/dpldemo/index.php?title=Issue:DPL_incompatible_with_MW_1.16_alpha.
I tried adding $wgRawHtml=true to my LocalSettings.php. It causes the wiki to break (servor error 500).

Any tools to identify undefined CSS/HTML classes?

Are there any tools out there that can look at my website HTML and tell me that (for example) "there is an HTML element at mysite.com/example.html using a class of SOMECLASS but SOMECLASS is not defined in any included CSS files".
?
I've created a snippet that does exactly that: https://gist.github.com/kdzwinel/426a0f76f113643fa285
You can run it in the DevTools console and the sample output will look like this:
You could try out a Firefox plugin like Dust-me-selectors
You could try inspecting with Firebug
There is a free Windows desktop tool that can scan a local web project folder and output undefined css classes, i.e. classes that are used in html but are not defined in any css. It also takes JavaScript into account to some degree.
https://sourceforge.net/projects/cssscanner/
All other answers either didn't work for me or didnt understand the question (including the accepted answer). This one I just tested myself and it works surprisingly well, though it won't catch every edge case.