my gwt app uses an external lib to render charts (birt). this lib is able to provide an html/js-imagamap with the rendered png.
but what is the best way to integrate it in gwt front-end? my first idea was to let the lib generate html with imagemap and embedded (base64) image. the html could be easily integrated?!
but base64 is noot good for ie6/7 (ie8 max 32kb). so is there a way to link the image in html and write an servlet/gwt-service to fetch image on loading the html? or is ther a much easier way?
If you already have the html+js/css generated, why not just render that as an iframe in your main app? its simple and effective.
Related
I'm trying to make some automatic captcha input systems (recognition of figures in captcha image by deep learning and input the figure automatically)
.
For that, the captcha image should be inputted to some deep learning system.
The captcha image in some online web page is in the img src but the src is not ending with some file extension like jpg, png..
It look like the below(it is an example).
img src="/nn/mm/captchaimg?/kk=image"
The above image shown in the web browser is changing after some time periods(about 1,2 min).
If the web including the above image is reloaded, the captcha is changed to another captcha image
(It means that in web crawler, the image is changed to by each request to server).
How to save the above image which has the above special properties in html in crawler?
I'm now doing it with goquery in Golang.
I should do
Saving the captcha image in the web page got by requesting in crawler.
Getting the figures in the above captcha image using my deep learning system.
Input the figures to the form in the above web page in step 1(with maintaining the session, reload or retry of requesting should not be done) and submit
I have done deep learning system in Step 2(test be done, it works well).
But I have no idea of Step 1, 3.
Any advice will be helpful to me.
Thank you in advance.
There are lots of documents about downloading the image in golang crawlier.
But I cannot find the methods to download the images changing by requesting the image URL
(I want to download the first image when I request the web page including the image at first time).
I'm trying to scrape an Instagram page using SwiftSoup, but when I run let html = try String(contentsOf: URL("https://www.instagram.com/sasawpi/"), I get back a bunch of JS functions and CSS styles like this, probably because Instagram uses React and some package control to send files over from the server. My question is, can I render it as an HTML DOM, like a browser would, and get it as a text inside of SwiftUI using SwiftSoup or some other library. WebView renders web pages so one of my suggestions was to render it with WebView but I don't know how to get this HTML DOM as text from WebView either.
I'm running a Vanilla Forum with a FileUpload plugin, allowing users to upload images and insert the corresponding code directly into the body of their post. These images work with FancyBox when clicked, linking together nicely within the page. However, should a user use a third-party image hosting site (i.e. Imagevenue, Imageshack, Postimage.org) and copy and paste the resulting image code, it deactivates the FancyBox feature associated with all images previously on the page, so when you click on an image uploaded via FileUpload it opens in a new window now instead of in a FancyBox.
My question is one of two things:
a) Is it possible to fix this formatting issue so that if a user does choose to use a third-party image hosting service then it will not affect the fancybox of my previous images.
or
b) Is it possible to block this type of image code from being inputted in the body of a post to prevent this from ever happening.
Thank you and please reply if you would like more information!
Most likely the generated code from those third-party hosting sites has not an image extension (JPG, PNG, GIF) so fancybox doesn't know what type of content needs to handle.
If you are binding fancybox like
$(".fancybox").fancybox();
... you could force the type of content to image like
$(".fancybox").fancybox({
type : "image"
});
I don't really see how pasting the code of a new image will disable the code for existing ones if you want to elaborate.
I am new HTML5 and Ajax and I was wonder if it's possible with these technologies to write a service that would allow a user to upload an image for example in the background so they could continue browsing different pages on the same site while the upload is in progress?
XHR2 AJAX request can submit binary data like images:
https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications#Example.3A_Uploading_a_user-selected_file
However, changing the address bar (windows.location) will interrupt the upload as the new page is loaded. You can work around of this by loading pages via AJAX and using History API:
https://developer.mozilla.org/en-US/docs/DOM/Manipulating_the_browser_history
Optionally you can resize image on the client-side using <canvas> to decrease the needed bandwidth and the server load
Resizing an image in an HTML5 canvas
Also if you touch the image in <canvas> you might want to keep JPEG metadata, like rotation and GPS coordinates around,
https://github.com/miohtama/Krusovice/blob/master/src/tools/resizer.js
Jsonp can be used to fetch data from supporting services but can i use it to upload images. As far as i understand javascript cannot access your file system making it impossible to upload an image using pure javascript techniques.However is there a work around. Can an image be uploaded to a server using jsonp?
I don't think you can just using json. The closest you can get is posting to a seperate iframe. Jquery has a feature where you can post a form to a hidden iframe.
http://aspzone.com/tech/jquery-file-upload-in-asp-net-mvc-without-using-flash/
If you are using jquery: http://plugins.jquery.com/plugin-tags/ajax-upload