This file contains hidden or 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
#pinger | |
from optparse import OptionParser | |
parser = OptionParser() | |
parser.add_option("-u", "--url", dest="url", help="url to ping" ) | |
parser.add_option("-l", "--log", dest="log", help="log file for pinging this URL" ) | |
options, args = parser.parse_args() |
This file contains hidden or 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 clr | |
clr.AddReference( "Lucene.Net.dll" ) | |
from System.IO import FileInfo | |
idx_dir = FileInfo( "index" ) | |
from Lucene.Net.Index import IndexWriter, IndexReader | |
from Lucene.Net.Analysis.Standard import StandardAnalyzer | |
from Lucene.Net.Analysis import StopFilter |
This file contains hidden or 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 cherrypy | |
from jinja2 import Environment, Template, FileSystemLoader | |
env = Environment( loader = FileSystemLoader('./templates') ) | |
class Root: | |
@cherrypy.expose | |
def index(self): | |
return env.get_template( "index.html" ).render( months = [ '2010-01', '2010-02', '2010-03', '2010-04', '2010-05', '2010-06' ] ) |
This file contains hidden or 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 sys | |
sys.path.append('C:\\Program Files\\Quest Software\\Site Administrator for SharePoint\\SharePoint Information Portal\\Python25\\Lib') | |
sys.path.append( 'C:\\Program Files\\Quest Software\\Site Administrator for SharePoint\\SharePoint Information Portal\\Python25\\DLLs' ) | |
sys.path.append('C:\\Program Files\\Quest Software\\Site Administrator for SharePoint\\SharePoint Information Portal') | |
sys.path.append('C:\\Program Files\\Quest Software\\Site Administrator for SharePoint\\SharePoint Information Portal\\Application') | |
sys.path.append( r'C:\Program Files\Quest Software\Site Administrator for SharePoint\SharePoint Information Portal\Python25\Lib\site-packages' ) |
This file contains hidden or 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 logging | |
logging.basicConfig( filename = r"C:\Program Files\Quest Software\Site Administrator for SharePoint\SharePoint Information Portal\iis\test.log", level = logging.INFO ) | |
log = logging.info | |
import isapi_wsgi | |
try: | |
import django.core.handlers.wsgi |
This file contains hidden or 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
goog.net.XhrIo.send('http://www.example.com/testdata.txt', function(e) { | |
// e.type will be goog.net.EventType.COMPLETE | |
var xhr = /** @type {goog.net.XhrIo} */ (e.target); | |
alert(xhr.getResponseText()); | |
}); |
This file contains hidden or 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
var bulkLoader = new goog.net.BulkLoader(urls); | |
goog.events.listen(bulkLoader, | |
[goog.net.EventType.SUCCESS, goog.net.EventType.ERROR], | |
function(e) { | |
if (e.type == goog.net.EventType.SUCCESS) { | |
// We use unsafeParse here because we trust the source of the data. | |
var loader = /** @type {goog.net.BulkLoader} */ (e.target); | |
var json = goog.array.map(loader.getResponseTexts(), | |
goog.json.unsafeParse), | |
showEventsOnCalendar(json); |
This file contains hidden or 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
function testCreateTable() { | |
if (!database) { | |
return; | |
} | |
var created = database.queryValue('SELECT 1 FROM SQLITE_MASTER ' + | |
'WHERE TYPE=? AND NAME=?', | |
'table', | |
'Test') != null; | |
assertTrue('Test table could not be created', created); |
This file contains hidden or 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
<html> | |
<head> | |
<script src="static/scripts/jquery/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script> | |
<script src="static/scripts/jquery/json2.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> | |
This file contains hidden or 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
goog.require( 'goog.ui.TabBar' ); | |
goog.provide( 'infoportal.ui' ); | |
infoportal.ui.init = function () { | |
tb = new goog.ui.TabBar(); | |
goog.array.forEach( | |
['Enterprise', 'Farms', 'Web Application', 'Site Collections', 'Sites'], |
OlderNewer