Adding images shod be simple why am I having trouble? - html

I am making a web site with the opson to see and print bar codes and now im at the stage where i shod be ading the bar codes and be done, yet for some reoson i can't write the code right for displaying images.
I used
<img scr="img,name" alt="img,img"/>
As the simplest way to do so thinksing it who'd work, but no. I thinking it could be the ```
Command

Related

Latex to html conversion

I am building a website with an implemented forum using Xobor. I want to make a button in the toolbar of the Textwindow that can convert Latex to html. Something like [Latex] \sqrt{a^2+b^2} [/Latex] would be great. Alternativly it can also be a button that creates a popup window, where Latex code can be written. Something like this:
Here you can click on the Button fx and a new window pops up, where you can enter latex code, which is then converted
I already found converters like Mathjax and Katex but I don't think, that they do what I need, because these tools seem to work only for the website text itself, but not for the forum posts.
I honestly don't know much about html, so maybe I am mistaken (I have a friend that will help me implement these things as soon as I find a tool that is fit to do what we need).
I can create the button itself like this (picture below), but obviously it doesn't convert anything yet.
So basically what I am looking for, are some lines of Code that I can put in that textbox shown in the picture above, which create a button in the toolbox, to be able to write formulas and other latex math stuff in my forum.
I really hope that this makes sense.
Thanks in advance!
After installing katex in my Angular project (npm install ng-katex --save
) I use it like:
Typescript:
var equaciones = [' H = \\sum_{i=1}^{m} p_{i} log_{2} (p_{i})']
Html:
<ng-katex [equation]="equaciones[0]"></ng-katex>
Result:
You can see an example of the result here: web_example

How to put a image in HTML?

I am going to learn HTML. And I want to put my image from gallery to my web. How do I do that?
Please correct this code if I'm wrong because the image from my gallery is not displaying to my webpage.
Code:
<img src="/storage/emulated/0/DCIM/Camera/IMG_20190717_104912.jpg" alt=" "/ >
/storage/emulated/0/DCIM/Camera/IMG_20190717_104912.jpg looks like a file path on an Android phone; it's probably not right. If you end up deploying your HTML file at http://site.example/index.html then the browser will try to fetch http://site.example/storage/emulated/0/DCIM/Camera/IMG_20190717_104912.jpg which probably isn't your Android phone.
The best thing to do is to copy the image to the same place as your HTML file and then refer to it this way:
<img src="IMG_20190717_104912.jpg">
Here's a couple of other tips about your markup:
First, img is what's called a self-closing tag; you do not need to write /> at the end. You might see that sometimes in books from a period in the early 2000s where some people thought HTML might become an application of XML; that did not pan out. It is harmless to write /> but it is not useful so don't do it. (Note that if you do want to make your HTML be XML, I think you need to write /> with no space between them.) If you're learning HTML and see /> in it, try to find a more up-to-date resource to learn from.
Second, "alt" text is very useful to humans and machines, so use it; but if you have no useful content don't put a space in there—that's not useful.

Gmod Lua Coding - How to place an HTML5 Page (Website) Inside of a Box

I've been working with a friend and we both have a problem, in a Garry's Mod Server, ok so we have a box saying Rules, and when we go to place a website INSIDE OF THAT BOX, it shows exactly this:
http://cloud-4.steamusercontent.com/ugc/37489242708029141/B4E51CC2F089F13DF25AA8F4F3E9BF7A07619427/
As you can see, it shows a box with the HTML5 coding, not sure if I can place:
http://www.sparkperp.com/Rules/index.html on that box.
I would like to know how to do that, if it's possible.
Thanks for your help
Please give your code in the future. Since I'm unable to view your code I'm limited in how much I can help, but I will try my best anyway!
You need to use the HTML vgui element vgui.Create("HTML") and use :OpenURL(weblink) on it. You can also use :SetHTML(htmlstring) if required. You should get the idea from the below code block:
local MOTD = vgui.Create( "HTML", parent )
MOTD:OpenURL("http://www.sparkperp.com/Rules/index.html")
If you can't get it working, update your question with your code and I'll be able to help further.

Showing picture from other site displays weird picture instead

I am making a Facebook-app were you can browse you and your friend's likes on a webpage that displays lots of funny pictures. The problem is that when I link to these pictures, they appear as something completly else. Like a placeholder or something. It displays correctly if it's cached (I think).
Take a look at this jsfiddle: http://jsfiddle.net/jVBSk/ . If you rightclick at the image, you get an other filename than the one in the source.
How can I avoid this, making the page display the correct images?
It seems to have some kind of hot-linking protection on it. This one's not very well made, so it's quite easy to bypass.
<?php
$file = file_get_contents($_GET['image']);
header("Content-Type: image/jpeg");
$image = imagecreatefromstring($file);
imagejpeg($image);
imagedestroy($image);
?>
Then call the script like this: script.php?image=http%3A%2F%2Fgif.artige.no%2Fstore%2F10%2F10002.jpg
The image URL has to be encoded. This can be done using urlencode() in PHP, or here's an online tool to do it: http://meyerweb.com/eric/tools/dencoder/
So in HTML that'd be something like this: <img src="script.php?image=http%3A%2F%2Fgif.artige.no%2Fstore%2F10%2F10002.jpg" alt="[Image]" />
The website is checking the referrer to see if it's their domain, or not. If it's not, it's returning this "do not steal this" image. (If anyone can translate that, I'm sure that's what it's saying).
See http://en.wikipedia.org/wiki/HTTP_referrer and http://en.wikipedia.org/wiki/Referrer_spoofing.
What you do is called hot-linking and is frowned-upon by many website owners..
The problem is that you are stealing their bandwidth, and as a solution they provide a different image instead of the requested one when the requesting page is not from their own domain..

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).