I have tried to inline-embedding an image inside an Internet Shortcut .URL file:
[InternetShortcut]
URL=https://de.wikipedia.org/wiki/Data-URL
<img src="data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP
C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA
AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J
REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq
ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0
vr4MkhoXe0rZigAAAABJRU5ErkJggg==" alt="red dot" />
The aim is to display the shortcut file as an image (in this case a red dot image) in Windows File Explorer.
Unfortunately, the above code example does not work in the intended way.
Is it generally possible at all to inline-embed an image inside an Internet Shortcut .URL file in a similar way?
You can't include an img-tag into an .url file. The file is structured like an .ini file in Windows.
However, it is possible to link an icon (.ico) file by specifying IconFile.
cf. https://superuser.com/questions/898669/what-makes-internet-shortcut-files-special
Related
I'm making a simple Lua script to download images. I get the URL of the image, and then this is my code to download it:
content = http.request(imageurl)
file = io.open("E:\\Users\\Me\\Documents\\Lua\\IMGDownload\\output.jpg", "w")
file:write(content)
print("Wrote content")
I get a 4KB file, however it isn't what I want it to be.
For reference, here is the image that I want to download:
RealImage http://cdn.akamai.steamstatic.com/steamcommunity/public/images/avatars/bd/bd05e23129b5d03ecb3f933589ff1477fbff4e92_full.jpg
This is what I actually get:
Can anyone pinpoint me as to the cause?
You probably just need to open the file with "wb" mode to get Windows to open the file in binary mode and not do line-ending conversion on you.
Try io.open("E:\\Users\\Me\\Documents\\Lua\\IMGDownload\\output.jpg", "wb").
We are using AzureReader2 plugin to read the blob urls and ImageResizer plugin to re-size images on fly.
Our container name is - img
AzureReader2 prefix name is also - img
<add name="AzureReader2" prefix="~/img/" connectionString="DefaultEndpointsProtocol=https;AccountName=my;AccountKey=my endpoint="http://<account>.blob.core.windows.net/" />
So, the image url is looking like below:
http://.blob.core.windows.net/img/img/1GKS2EEF2BR171185/f81c8448-47cb-4448-b1d3-d59a07394bb4.jpg?w=500
img is repeated twice.
Is there any way to handle this?
Can we use empty prefix with ImageResizer?
Any advise is helpful.
Based on the example URL you've provided, I think you are misunderstanding the process. The cloud architecture page can be helpful here.
Your image URL should not be http://myaccount.blob.core.windows.net/img/img/1GKS2EEF2BR171185/f81c8448-47cb-4448-b1d3-d59a07394bb4.jpg?w=500
Without a CDN, it should be in the form http://myserverwithimageresizer.com/img/img/f81c8448-47cb-4448-b1d3-d59a07394bb4.jpg?w=500
Azure's Blob store doesn't know what to do with ?w=500. Your URLs in your HTML pages should never point to blob.core.windows.net; they should point to your server - or, a CDN that points to your server (not the blobstore!).
This question is old but nonetheless as Nathanael's answer says the image URL should be:
http://myserverwithimageresizer.com/img/img/f81c8448-47cb-4448-b1d3-d59a07394bb4.jpg?w=500
Or for example if you are running locally :
http://localhost:<PORT>/img/img/f81c8448-47cb-4448-b1d3-d59a07394bb4.jpg?width=200
To use image resizer you should point to your website then set the reference to blob storage in your web.config file. If it directly access blob storage the image won't have a chance to be resized.
To set the prefix to nothing in web config put the following:
<add name="AzureReader2" prefix="~/" connectionString="DefaultEndpointsProtocol=https;AccountName=my;AccountKey=my endpoint="http://<account>.blob.core.windows.net/" />
By default the prefix is "~/azure" to set it to nothing it should be "~/"
This should make it so if you navigate to
http://myserverwithimageresizer.com/img/f81c8448-47cb-4448-b1d3-d59a07394bb4.jpg?w=500 that your image is retrieved from blob storage and resized.
I like to find all .js file (for example sss.js) and file without file type (the extension, the suffix, the file type after .dot)
I tried
for ..... In (*,*.js) ....
But not working, it will go through all files it found.
Please advice how to select the file that no filetype
You almost had it correct. You just need a dot after the first asterisk.
for ... in (*. *.js) ...
I got a problem with setting a path to image within the resource file (.rc).
For some reasone it was not possible to concatenate defined string and the text.
e.g.
File1:
#define Path "Brand_1"
File2:
#include File1
Logo BITMAP Path "\Logo.bmp"
Borland resource compiler (5.4) throws error message: 39: Cannot open file: Brand_1
EDIT:
My question would be: Is is possible to combine the path for loading image using resource string variable and a string (file name).
Also, project I'm working on relates to a file (Logo.bmp) being present in two locations. I would like to have a switch (.bat file) to generate a different resouce file depending on requirements.
Thanks.
BRCC32 accepts -i as search path seperated by semicolon, so you could create a bat file like this
compile_res.bat
brcc32 -ic:\mypath1;c:\mypath2 resource_script
and you define your resource_script as normal, for ex:
resource_script.rc
myImg BITMAP Logo.bmp
myDOC RCDATA mydoc.doc
when you run the compile_res.bat, it will run the brcc32.exe with the search path, and having the bat file saves you from retyping the search path every time.
You're not concatenating anything. You're compiling to Logo BITMAP "Brand_1" "\Logo.bmp", and "Brand_1" isn't a valid path to a bitmap file.
#define in the resource compiler acts sort of like find/replace in a text processor - not exactly, but close enough in this case.
You might get by (untested) with removing the quotes and space between them, as long as there are no space characters in either the path or filename; otherwise, you're probably out of luck. (Not sure what you're trying to accomplish, anyway.)
We're generating PartCover reports via the command line tool along with our CruiseControl.Net unit tests. This generates an xml file that displays the results nicely on the cruisecontrol dashboard. The xslt transforms that are included only show you the percentage of coverage in an individual class. We want to know exactly what lines are not being covered. The problem ist when we open the report in the PartCover browser and double click a method it doesn't show us our cs files. I know the PartCover browser is capable of showing you the files because of the following.
Here's a screenshot of PartCover browser with the lines of code showing: http://kjkpub.s3.amazonaws.com/blog/img/partcover-browse.png.
The information looks like it should be available to the browser because the report contains this:
<Method name="get_DeviceType" sig="Cathexis.IDBlue.DeviceType ()" bodysize="19" flags="0" iflags="0">
<pt visit="2" pos="0" len="1" fid="82" sl="35" sc="13" el="35" ec="14" />
<pt visit="2" pos="1" len="4" fid="82" sl="36" sc="17" el="36" ec="39" />
<pt visit="2" pos="5" len="2" fid="82" sl="37" sc="13" el="37" ec="14" />
</Method>
and this:
<File id="66" url="D:\sandbox\idblue\idblue\trunk\software\code\driver\dotnet\Common\AsyncEventQueue.cs" />
All I want to be able to do is view what lines of code are not being covered in my test cases without having to figure out what the xml above is trying to tell me.
Thanks to anyone in advance who replies.
I figured out why the cs files were not displaying. The paths were incorrect in the xml file because our test project was being built on a different machine than the one partcover was on. (partcover must generate the .cs file paths from pdb files maybe?) Once I search and replaced the file switching the base directory of our subversion location to the one on the other machine all was well.