webpage

Android barcode scanner integration with web page

大兔子大兔子 提交于 2019-12-04 07:43:04
问题 I have been researching all morning about integrating an android barcode scanner app into a web page, but haven't found exactly what I need to know. I want to have a web page that the user can fill in text fields by using an android barcode scanner. So the user would be on a web page and would either click inside the text field or click a button next to the text field that would start the android barcode scanner. They would then scan the barcode and the text field would be filled in. I have

Favicon for all the pages in my website

只谈情不闲聊 提交于 2019-12-03 23:13:12
I've learned that the way to add favicon for a web page is to have the following lines in the page. <link rel="SHORTCUT ICON" type="image/x-icon" href="http://mysite.com/faviconfilename.ico"/> <link rel="icon" type="image/x-icon" href="http://mysite.com/faviconfilename.ico" /> Should i add this code in each and every page my site has?? I use Apache - tomcat clustering to serve pages. Is there any other easy way to do this? It is usually enough to place a file called "favicon.ico" in the root of your website. Meetai.com You can get rid of the unnecessary processing and traffic as well as the

Web page Capture and save to image using phantomjs lib

十年热恋 提交于 2019-12-03 23:05:17
i was searching google to get any js lib which can capture the image of any website or url. i came to know that phantomjs library can do it. here i got a small code which capture and convert the github home page to png image if anyone familiar with phantomjs then please tell me what is the meaning of this line var page = require('webpage').create(); here i can give any name instead of webpage ? if i need to capture the portion of any webpage then how can i do it with the help of this library. anyone can guide me. var page = require('webpage').create(); page.open('http://github.com/', function

Inter-Page communication in WWW?

 ̄綄美尐妖づ 提交于 2019-12-03 20:55:51
Is there a way to make client-side interprocess communication between multiple web pages in javascript? Ideally I'd like to accomplish this without any complex server status updating, pinging, etc. and make it work solely on the client. If I could make this cross-browser as well, I would be in heaven haha. Any ideas? Thanks! datasedai There are many ways of doing inter-window communication. They are Window.postMessage, Local Storage, WebRTC, and nowadays Shared Web Workers. Each of these has their own advantages/disadvantages: Local Storage only works on same-origin pages (origin is protocol:/

generate image (e.g. jpg) of a web page?

青春壹個敷衍的年華 提交于 2019-12-03 15:26:25
问题 I want to create an image what a web page looks like, e.g. create a small thumbnail of the html + images. it does not have to be perfect (e.g. flash /javascript rendering). I will call use the code on linux, ideally would be some java library, but a command line tool would be cool as well. any ideas? 回答1: Try CutyCapt, a command-line utility. It uses Webkit for rendering and outputs in various formats (SVG, PNG, etc.). 回答2: you can get it nearly perfect, and cross platform too, by using a

Is there a way to listen to an event in the phantom context from page context?

…衆ロ難τιáo~ 提交于 2019-12-03 14:37:18
问题 For example: I open a page with PhantomJS, evaluate an asynchronous script (e.g. ajax). When it succeeds, I want to let the phantom context (outside of page.evaluate() ) know that the asynchronous process is finished. I don't want to use setTimeout and setInteval to wait and check continously in the phantom context that the process is finished. 回答1: That is exactly what the onCallback and window.callPhantom() pair is for. So, if you have an asynchronous call in the page context like an AJAX

What algorithms could I use to identify content on a web page

江枫思渺然 提交于 2019-12-03 12:40:32
问题 I have a web page loaded up in the browser (i.e. its DOM and element positioning are both accessible to me) and I want to find the block element (or a sorted list of these elements), which likely contains the most content (as in a continuous block of text). The goal is to exclude things like menus, headers, footers and such. 回答1: This is my personal favorite: VIPS: a Vision-based Page Segmentation Algorithm 回答2: First, if you need to parse a web page, I would use HTMLAgilityPack to transform

How to translate into other languages my web page?

浪尽此生 提交于 2019-12-03 09:48:58
How can I translate my web pages? Actually what technology or what scripting-if require- should be used? For info; I have all translated text. But I do not want to create something like clone site for other language. I used just javascript -including jquery . Just using JavaScript... <script type="text/javascript"> // JSON-formatted, potentially read from a database var article = { title: { en_US: "Article Title", fr_FR: "Titre de l\'Article" }, content: { en_US: "Content of the Article.", fr_FR: "Contenu de l\'Article." } } // simple function to write the info to the page function get_i18n

How to invoke an iMacro from JavaScript?

心不动则不痛 提交于 2019-12-03 08:30:33
I have an iMacro ' Test.iim ' and I want to play or call this iMacro from a javascript that is attached into a button click event in my webpage. Please Help with some sample code. The answer is this. iimPlay("Test.iim") When calling a macro inside a Macros folder put "" around the macro and it will play it. Also you can add timer for that macro like this. iimPlay("Test.iim",60) This means the macro has maximum 60 seconds to complete. When playing the macro which is declared as variable inside the .js file then you do it like this var test; test ="CODE:"; test +="SET !ERRORIGNORE YES "+"\n";

How to design a webpage to be print friendly?

懵懂的女人 提交于 2019-12-03 08:10:36
What are the right sizes for a webpage to be printed on A4 size paper? What other stuff should be considered? *inline CSS is preferred in this case Clarification: This web-page's only propose is to be printed, since it is a receipt. Clarification # 2: This web-page is for the internal use of the company I'm working for. They would like it to look professionally designed receipt. Clarification # 3: This web-page must be printed on one page -of A4 size- only. Answer I'd recommend using two different style sheets. For viewing in the browser you could set the table width to the width of an A4