This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "validation:", resp['x-w3c-validator-status'], resp['x-w3c-validator-errors'], resp['x-w3c-validator-warnings'] | |
fres.write("validation: " + resp['x-w3c-validator-status'] + " " + resp['x-w3c-validator-errors'] + " " + resp['x-w3c-validator-warnings'] + "\n") | |
print "encoding: " + respg['content-type'] + " " + encoding | |
fres.write("encoding: " + respg['content-type'] + " " + encoding+"\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onerror = function(message, url, linenumber) { | |
if (window.XMLHttpRequest) { | |
var xhr = new XMLHttpRequest(); | |
var scripturl = "http://127.0.0.1:8069/log"; | |
var log = linenumber + message + url; | |
xhr.open("POST", scripturl); | |
xhr.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); | |
xhr.send(log); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On http://map.hackerwatch.org/hwmap/javascript/main.js | |
// Determine browser type and platform. | |
if (navigator.appName.indexOf("Netscape")>=0) { | |
m_sClientBrowserType = 'Netscape'; | |
} else if (navigator.appName.indexOf('Microsoft') >=0) { | |
m_sClientBrowserType = 'IE'; | |
} else { | |
window.location = "unsupported.htm"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4.1. 304 Not Modified | |
The 304 status code indicates that a conditional GET request has been | |
received and would have resulted in a 200 (OK) response if it were | |
not for the fact that the condition has evaluated to false. In other | |
words, there is no need for the server to transfer a representation | |
of the target resource because the client's request indicates that it | |
already has a valid representation, as indicated by the 304 response | |
header fields, and is therefore redirecting the client to make use of | |
that stored representation as if it were the payload of a 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
→ curl -iI -v -A " " "http://www.la-grange.net/" | |
* About to connect() to www.la-grange.net port 80 (#0) | |
* Trying 128.30.54.58... connected | |
* Connected to www.la-grange.net (128.30.54.58) port 80 (#0) | |
> HEAD / HTTP/1.1 | |
> User-Agent: | |
> Host: www.la-grange.net | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Browser","Market Share % March 2011 to March 2012" | |
"IE",40.99 | |
"Firefox",27.11 | |
"Chrome",23.73 | |
"Safari",5.67 | |
"Opera",1.84 | |
"Maxthon",0.13 | |
"Sony PS3",0.13 | |
"Android",0.11 | |
"Chromium",0.05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In http://d2b4ufapzmnxpw.cloudfront.net/build/3751/static/kronos/css/fitnessReports.css | |
# from the Web site http://runkeeper.com/ | |
.runkeeper .fitnessReports .totalsArea { | |
width: 729px; | |
background-color: #333; | |
-ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#888', endColorstr='#333'); | |
background: -webkit-gradient(linear, left top, left bottom, from(#888), to(#333)); | |
background: -moz-linear-gradient(top, #888, #333); | |
margin: 30px auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script in http://donottrack.us/js/index.js | |
var aboutexpanded = false; | |
var developerexpanded = false; | |
var policyexpanded = false; | |
$(document).ready(function() { | |
// Show browser support region | |
$('#browser_support').show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>>from lxml import etree | |
>>> xml = u'<?xml version="1.0" encoding="utf-8" ?><foo><bar/></foo>' | |
>>> etree.XML(xml) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "lxml.etree.pyx", line 2736, in lxml.etree.XML (src/lxml/lxml.etree.c:54437) | |
File "parser.pxi", line 1569, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:82685) | |
ValueError: Unicode strings with encoding declaration are not supported. | |
>>> etree.HTML(xml) | |
Traceback (most recent call last): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import cssutils | |
>>> cssutils.parseUrl("http://m.vk.com/css/s_mb.css?177") | |
WARNING 'charmap' codec can't decode byte 0x98 in position 810: character maps to <undefined> | |
>>> import requests | |
>>> r = requests.get("http://m.vk.com/css/s_mb.css?177") | |
>>> r.headers | |
{'content-encoding': 'gzip', 'transfer-encoding': 'chunked', 'expires': 'Tue, 14 Aug 2012 02:14:05 GMT', 'vary': 'Host,Accept-Encoding', 'server': 'nginx/1.2.1', 'connection': 'keep-alive', 'pragma': 'no-cache', 'cache-control': 'max-age=604800', 'date': 'Tue, 07 Aug 2012 02:14:05 GMT', 'x-powered-by': 'PHP/5.3.3-7+squeeze3', 'content-type': 'text/css; charset=windows-1251'} | |
>>> r.headers['content-type'] | |
'text/css; charset=windows-1251' |
OlderNewer