webpage

Android barcode scanner integration with web page

人走茶凉 提交于 2019-12-02 15:54:41
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 found solutions on how to do this and then go to a different page, but it is important that the user

How do i set expiration on CSS, JS and Images

半世苍凉 提交于 2019-12-02 14:38:59
I have recently analysed my website with pagespeed addon on firebug. It suggested me to set expiration on CSS, JS and image files. I am wondering how do i do this? This is the one I use to fix the exact same thing when I ran the PageSpeed Addon: <FilesMatch "\.(jpg|jpeg|png|gif|swf)$"> Header set Cache-Control "max-age=604800, public" </FilesMatch> This goes into your .htaccess file. Read up on this page for more information about how to set cache for additional file types and/or change the cache length: http://www.askapache.com/htaccess/apache-speed-cache-control.html Mohammed Sufian i would

excel macro to search a website and extract results

会有一股神秘感。 提交于 2019-12-02 14:03:49
I have a value in Sheet 1, A1. It is either a business name, or its associated business number (as the site searches by number or name). Once I have entered the business name (or number) of the business I need the details on, I want to be able to click a "search" button and have the results of the search displayed in a table with 2 columns (say sheet 1, A5:B9) with the labels in left column of table and the results in the right. the site i need to search is http://www.abr.business.gov.au/ eg. If i search for the business number 31701562618 these are the results i get (and how i need displayed

Web scraping - how to identify main content on a webpage

折月煮酒 提交于 2019-12-02 14:01:43
Given a news article webpage (from any major news source such as times or bloomberg), I want to identify the main article content on that page and throw out the other misc elements such as ads, menus, sidebars, user comments. What's a generic way of doing this that will work on most major news sites? What are some good tools or libraries for data mining? (preferably python based) There's no way to do this that's guaranteed to work, but one strategy you might use is to try to find the element with the most visible text inside of it. There are a number of ways to do it, but, none will always

How do I save a webpage using C++? Windows or Linux System

江枫思渺然 提交于 2019-12-02 12:25:18
I need to know how to save a webpage using C++ on a Windows and/or Linux. Step 1) This is my current code that opens the webpage: ShellExecute(NULL, "open", websiteURL, NULL, NULL, SW_SHOWNORMAL); Step 2) This is the step where I will save the webpage that is opened as a .txt Your help here. Step 3) This is my attempt at closing the webpage after saving it as a .txt; However, it does not work currently. ShellExecute(NULL, "close", websiteURL, NULL, NULL, SW_SHOWNORMAL); This is Windows version. Note, the Windows functions are Unicode UTF-16, but the output file could be ANSI or UTF-8. #include

Android - HTTP Get - Explicit Termination not called error. What am I missing?

别等时光非礼了梦想. 提交于 2019-12-02 11:17:17
I am working on a fairly simple android app that should get the last modified/updated date for a webpage but it seems to crash with the following message 05-27 10:50:15.581 2638-2652/android.process.acore E/DictionaryBackupAgent﹕ Couldn't read from the cursor 05-27 10:50:20.658 2638-2647/android.process.acore E/StrictMode﹕ A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. java.lang.Throwable: Explicit termination method 'close' not called at dalvik.system.CloseGuard.open(CloseGuard.java:184) at android.os

Difference between static & dynamic pages?

老子叫甜甜 提交于 2019-12-02 08:28:35
问题 I was doing some research on the types of web pages available and I came across these 2 types: static & dynamic. However, the sites which I read it from does not provide me with much information for me to understand what does these types of pages do and preferred for what kinds of websites/functions. Can anyone explain to me the functions of each of these 2 webpage types and tell me the difference/when to use them? Thanks! :) 回答1: From Wikipedia: A static web page (sometimes called a flat

How to write webpage to cache?

隐身守侯 提交于 2019-12-02 08:02:18
I want to load a webpage, and if it was already loaded before and not modified then load it from cache. If it is found to be modified, then clear this page in the cache and reload. How can I do this? Write the webpage into the cache Find the webpage in the cache Show the webpage from the cache Clear the cache and load a new version if the page was modified Please help me. It would be awesome if can show me the code for each of the above. Best regards. If you are ok with using Webview then LOAD_NORMAL is for u. webView.getSettings().setCacheMode(WebSettings.LOAD_NORMAL); webView.loadUrl(HELPER

Get a page's last modified date using Java

吃可爱长大的小学妹 提交于 2019-12-02 00:56:49
Is there a standard way to tell when a page was last modified? Currently I am doing this: URLConnection uCon = url.openConnection(); uCon.setConnectTimeout(5000); // 5 seconds String lastMod = uCon.getHeaderField("Last-Modified"); System.out.println("last mod: "+lastMod); However it looks like some sites do not have a Last-Modified field. http://www.cbc.ca has these header fields: X-Origin-Server Connection Expires null Date Server Content-Type Transfer-Encoding Cache-Control I could parse a page to try and get its date but this seems like a major pain. What is the standard? (If possible I

Clicking in a online js button with python

耗尽温柔 提交于 2019-12-02 00:21:54
问题 I'm trying to click on the "Search all flights" button in http://www.priceline.com/ but i'm having some problems. I know that mechanize doesn't work with javascript so I tried so look on the source code trying to do what the button does but i can't find the function. There's any other way to do this? 回答1: I suggest using selenium (download link), which has very heavy support for javascript. All docs here. Here is a quick example of how you can do that: from selenium import webdriver driver =